Following a recent post by A. Bouchez about an optimized CRC32 hash, I took it as an opportunity to re-run a small String Hashing Shootout on the worst hash function collision torture test I know: ZIP codes in UTF-16 (Delphi’s default String format).
We’ve all encoutered reCAPTCHA, as it’s one of the few effective ways to protect form submissions from bots on the internet.
Acquired by google in 2009, it comes with multiple plugins for various web environment, here is a plugin for DWScript.
Here is a small snippet to illustrate how you can perform a conditional HTTP 301 redirection in DWScript, and can serve as an illustration on serving “special” HTTP responses.
This is useful when a website is moved from one domain to another, but the server is not, ie. if both old and new domains are hosted by the same server.
An utility that was added to the DWScript sample WebServer during the 4 TeraPixel Mandelbrot experiment is the BackgroundWorkers API.
This is a rather low-level threading facility that can work well with Global Queues to handle background tasks or serializing tasks.
I recently posted abut the new Slim R/W Locks introduced with Vista, and how they were vastly more efficient than TMREWS.
Apparently, they’re also more efficient than Critical Sections…
Setting up an SSL with DWScript Web Server (and other http.sys services like mORMot) is simple, and it’s cheap, free even thanks to StartCOM. Encryption is also pretty darn fast on recent Windows server versions.
Here is a quick guide to get you started.
Here are a few findings on Multi-Read Exclusive-Write Synchronizer from a recent upgrade of DWScript‘s GlobalVar functions.
I ran some comparisons between a plain Critical Section, Delphi’s TMultiReadExclusiveWriteSynchronizer and Windows Slim Reader/Writer Lock, of which an implementation was added to the dwsXPlatform unit.
I’ve activated a small random pass phrase secure service based on DWScript Web Server.
You can reach it at
Here is a small utility I made whose purpose is to flush (empty) the Windows file cache. It can also flush and purge memory working sets, standby and modified lists.
It can be useful to reduce memory usage of a particular VM (on a host with dynamic memory) or for testing and bench-marking purposes.
Delphi offers two ways of enumerating files in a directory and its sub-directories, the first is the classic (and buggy) FindFirst/FindNext, the second is IOUtils TDirectory.GetFiles and not very efficient.
Here is why and how I implemented DWScript‘s dwsXPlatform.CollectFiles, and a tip about getting a small system-wide boost as a bonus.