Generated by All in One SEO v4.9.10, this is an llms.txt file, used by LLMs to index the site. # DelphiTools DWS, Profiler and other Pascal tools ## Sitemaps - [XML Sitemap](https://www.delphitools.info/sitemap.xml): Contains all public & indexable URLs for this website. ## Posts - [DelphiCodeCoverage AI-optimized report](https://www.delphitools.info/2026/03/21/delphicodecoverage-ai-optimized-report/) - Just pushed to my fork of DelphiCodeCoverage a few enhancements to make it more AI-friendly (I'm not sure if the original repo is still maintained). The key addition one is a new "Code Coverage Gaps" .ccg format that is optimized for AI consumption, and can save a lot of tokens ($$$) when you task an [...] - [Tweaking DWScript for AI consumption](https://www.delphitools.info/2026/03/16/tweaking-dwscript-for-ai-consumption/) - Recent changes to the DWScript repository have been oriented towards making it more AI-friendly, because let's face it, humans writing code is going the way of the Dodo. Last post announced the DWScript Compendium, which lists all the new language changes below (and a few more). dwsRunner utility which has been in limbo for quite [...] - [DWScript Documentation Compendium](https://www.delphitools.info/2026/02/03/dwscript-documentation-compendium/) - Just a quick post to announce the DWScript Compendium website! This is the long overdue language documentation website for DWScript, which Gemini-cli has been patiently building over the last weeks, as it's wasn't built as a one-off documentation generation, but as a fully proved and compiled documentation. So hallucinations should be minimal! At a time [...] - [DWScript MCP server samples](https://www.delphitools.info/2025/09/25/dwscript-mcp-server-samples/) - Recently added a small DWScript-MCP repository with MCP (Model Context Protocol) samples for DWScript. This showcases how you can deploy a custom MCP server with basically nothing else than the DWSWebServer.exe. That's less than 8 MB, a couple small script files and no dependencies... and it can even run under Linux with Wine! Two tools [...] - [Textures in FMX Vertex Shaders](https://www.delphitools.info/2024/12/24/textures-in-fmx-vertex-shaders/) - FMXutils DX11 driver update adds vertex shaders texture binding and GPU device selection, enabling displacement mapping and hardware choice. - [SamplingProfiler 24.11.26 update](https://www.delphitools.info/2024/11/26/samplingprofiler-24-11-26-update/) - Discover the latest SamplingProfiler update (24.11.26) with enhanced support for ".inc" files and improved file tracking from the map file. - [GPU Computing with Delphi + FMX + WebGPU](https://www.delphitools.info/2024/11/12/gpu-computing-with-delphi-fmx-webgpu/) - Boids flocking demo showcases GPU-accelerated particle simulation using WebGPU in Delphi, self-organizing particles flocking behavior with low CPU usage - [The Three Unities of Development](https://www.delphitools.info/2024/10/31/the-three-unities-of-development/) - Three ancient rules—Unity of Action, Place, and Time—quietly govern modern code. They derive from human limits, but AI's rise may rewrite th ese rules tomorrow. - [Supporting GPU Buffers for FMX](https://www.delphitools.info/2024/10/29/supporting-gpu-buffers-for-fmx/) - FMXUtils adds GPU buffer support for Delphi FMX via DX11/WebGPU drivers. Offers 2-20x speedups, backward compatibility, and easy integration through wrappers. - [Announcing Delphi headers for WebGPU](https://www.delphitools.info/2024/09/24/announcing-delphi-headers-for-webgpu/) - The Delphi-WebGPU repository provides WebGPU headers for Delphi, enabling efficient and portable GPU programming across platforms with Dawn for Windows 64-bit. - [Faster 3D Point Cloud with FMX](https://www.delphitools.info/2024/09/05/faster-3d-point-cloud-with-fmx/) - FMX 3D rendering bottleneck identified, now to eliminate memory copies doubled performance: release modified code or reimplement? All platforms could benefit. - [Exploring 3D Point Clouds for FMX](https://www.delphitools.info/2024/09/01/exploring-3d-point-clouds-for-fmx/) - Explore 3D point cloud rendering in Delphi 12 FireMonkey. Learn techniques, performance insights, and limitations for millions of points visualization. - [Turning lowers to uppers without a branch](https://www.delphitools.info/2024/06/14/turning-lowers-to-uppers-without-a-branch/) - Looking at a mad bit-twisting dance, turning lower cases to uppers without a branch in sight! What is the trickery afoot? - [The Mischievous Case-Insensitive Hash](https://www.delphitools.info/2024/06/10/the-mischievous-case-insensitive-hash/) - In a comment to the previous article on a case insensitive hash code, Stefan Glienke pointed to an approach used in Spring4D's comparers, which is a delightful hack. Rather than converting the string to a "proper lower case", it converts the string to an "approximate lower case" using an "or ", which happens to be [...] - [The Curiouser and Curiouser Case of Case-Insensitive Tweaks](https://www.delphitools.info/2024/06/07/the-curiouser-and-curiouser-case-of-case-insensitive-tweaks/) - Recent commits to the DWScript repository doubled the compiler performance when compiling many small scripts, like happens in the unit tests suites. This started from a first profiling run where the memory allocations around the UnicodeLowerCase function came out as top bottlenecks. Thing is, Pascal being a case-insensitive language, there are lots of case-insensitive comparisons, [...] - [property reintroduce - when a method becomes a property](https://www.delphitools.info/2024/05/30/property-reintroduce-when-a-method-becomes-a-property/) - A tentative new language feature has been pushed to the DWScript repository: "property reintroduce". The aim is to allow a method to be reintroduced as a property, and do so in a non-fatal fashion so it can be pushed to production and existing code can be migrated iteratively. Take the following example: type TMyClass [...] - [DWScript issues tracker now on GitHub](https://www.delphitools.info/2024/02/05/dwscript-issues-tracker-now-on-github/) - For quite sometime the issue tracker at BitBucket has been barely usable, and Atlassian does not seem to have bothered fixing it... So if you have issues with DWScript, please now post them on the issues tracker of the GitHub DWScript mirror. As for the issue with the Atlassian issue tracker, it's the infamous "This [...] - [Triple apostrophe multi-line strings support in DWScript](https://www.delphitools.info/2023/11/17/triple-apostrophe-multi-line-strings-support-in-dwscript/) - In the wake of Delphi 12 support, DWScript just got support for the "triple apostrophe" multi-line string syntax introduced with Delphi 12. This syntax comes in addition to the previously supported multi-line syntaxes. As there is some degree of ambiguity in the new syntax, the syntax in DWScript is based on my current understanding of [...] - [Meanwhile, in the DWScript SVN...](https://www.delphitools.info/2012/02/02/meanwhile-in-the-dwscript-svn/) - This summary of recent DWS changes is coming a bit late, and there is quite a bit to cover. Here is a quick, partial roundup of what changed since the last update. Language changes: Initial support for overloads (currently limited to standalone functions/procedures). New operator "sar" for bitwise shift arithmetic right. Delphi-like "dotted unit names" [...] - [Time for DWScript v2.3!](https://www.delphitools.info/2011/11/02/time-for-dwscript-v2-3/) - Or in other words, Delphi Web Script 2.2 has been branched! "Rich. Small. Fast. Reliable. Choose any Four" With v2.2, DWScript is now aiming for that motto*, and this new release represents a major step forward from 2.1 in terms of language features and robustness. DWScript 2.2.0 (348 kB) Here is a quick summary of [...] - [DWScript update for Delphi 12](https://www.delphitools.info/2023/11/09/dwscript-update-for-delphi-12/) - DWScript has been updated for Delphi 12 support, there are only minor changes required and they are in the DWScript repository. On a side note, the Delphi 12 IDE definitely feels more snappy when navigating code or invoking code insight (ctrl+space) on large projects (more than 2 MLOC), which is nice! [...] - [Added support for readonly fields in DWScript](https://www.delphitools.info/2023/10/31/added-support-for-readonly-fields-in-dwscript/) - Support for "readonly" class fields has been added to DWScript repository. The syntax is similar to the one in Oxygene, with a qualifier following a field declaration: type TTest = class FField : Integer; readonly; end; A field marked as readonly can only be assigned at declaration or in a [...] - [SamplingProfiler 23.8.21](https://www.delphitools.info/2023/08/21/samplingprofiler-23-8-21/) - SamplingProfiler 23.8.21 is now available. This version is all about cosmetic fixes: Display Delphi internal version number for unknown Delphi versions instead of defaulting to 'XE2' Replaced old directory browser in search paths dialog Minor HDPI fixes Also the zip only includes the 64bit version now (which should work with 32bit executables). [...] - [New SamplingProfiler with HDPI support](https://www.delphitools.info/2023/04/25/new-samplingprofiler-with-hdpi-support/) - A new SamplingProfiler v23.4.25 version is now available. The main highlight of this release is support for HDPI displays, no more blurry text on that 4k monitor! This is also the first version compiled with Delphi 11.3, which fixed several HDPI issues in the VCL that were holding back HDPI support. [...] - [Optimization in the era of ChatGPT and Godbolt](https://www.delphitools.info/2023/04/18/optimization-in-the-era-of-chatgpt-and-godbolt/) - Share my current workflow for low-level optimization, a croundtrip between Delphi, SamplingProfiler, ChatGPT and Godbolt to leverage the best of C compilers. - [FocusFusion 1.4.0 - fixes and speedups](https://www.delphitools.info/2023/04/10/focusfusion-1-4-0-fixes-and-speedups/) - FocusFusion 1.4.0 update is now available in the Windows Store. This version fixes two issues introduced with 1.3.7: the wavelet focus stacking being cropped too tight and small rendering artefacts. There were also small performance improvements around memory management and caching for up to 10% faster fusion. This version also introduces the use of fused [...] - [DWScript now support Delphi 11.3 Alexandria](https://www.delphitools.info/2023/04/06/dwscript-now-support-delphi-11-3-alexandria/) - Latest commits in the DWScript repository bring compatibility with Delphi 11.3 Alexandria. There were very few changes required, and a couple bugs were fixed in the process. One test (stack overflow) had to be tweaked, apparently the new compiler uses more stack space, which caused one of the unit tests to fail in the "wrong [...] - [FocusFusion v1.3.7 is now available](https://www.delphitools.info/2023/03/31/focusfusion-v1-3-7-is-now-available/) - An update of FocusFusion v1.3.7 is available in the Windows Store. This version brings multiple improvements to focus stacking quality. - [SamplingProfiler 23.3.14 fixes release](https://www.delphitools.info/2023/03/14/samplingprofiler-23-3-14-fixes-release/) - SamplingProfiler v23.3.14 is now available. This is a bugfix release with stability and performance fixes for the recently added dynamic code support, as well as fixes to automatic source code paths (thanks Stefan Glienke for reporting testing) [...] - [SamplingProfiler 23.3.6 with support for dynamic code](https://www.delphitools.info/2023/03/06/samplingprofiler-23-3-6-with-support-for-dynamic-code/) - New SamplingProfiler v23.3.6 adds support for dynamic code and just-in-time runtime compilers with two new block declaration commands - [Initial Beta Release of FocusFusion](https://www.delphitools.info/2023/02/22/initial-beta-release-of-focusfusion/) - Just released the initial beta of FocusFusion, a focus stacking photography utility to combine shallow depth-of-field shots into an all-in-focus image. - [SamplingProfiler 23.1.23 (belated) release is available](https://www.delphitools.info/2023/01/23/samplingprofiler-23-1-23-belated-release-is-available/) - After years of beta, the 23.1.23 version of SamplingProfiler is available from its downloads & changelog page. The download ZIP includes both 32 & 64bit executables. The main change since the last version is that the code to detect Delphi browse paths was rewritten to accommodate future (unreleased) Delphi versions... as long as the registry [...] - [DWS Web Server update](https://www.delphitools.info/2014/10/15/dws-web-server-update/) - A new version 2014.10.15 of the DWS Web Server is available. This version contains a variety of improvements and fixes, along with a new sample for JS libraries. Here is the download link for the installer: DWSWebServer 2014.10.15 (1514 kB) And here is the list of changes: added support for .p2js libraries and marking functions with "export" [...] - [DWScript 22.6.28 release](https://www.delphitools.info/2022/06/28/dwscript-22-6-28-release/) - Periodic DWScript release 22.6.28 has been created on the DWScript GitHub. This release includes a variety of micro-optimizations (many memory-related) for the compiler, runtime and JavaScript codegen, as well as fixes and improvements. The language syntax has been slightly extended for the Pascal-to-Javascript transpiler to cover the case of read-only external properties. The first extension [...] - [Is "inert" the HTML Feature Of The Year?](https://www.delphitools.info/2022/06/07/is-inert-the-html-feature-of-the-year/) - With Chrome 102 HTMLElement.inert attribute is now active, it is also in the Firefox/Edge/Safari nightlies, so will hopefully become available for those soon. This inert attribute aims to make interactive HTML inert as a rock. Yes, it only took 32 years to disable interactivity like in HTML 1.0, hurrah! To quote MDN: The HTMLElement property [...] - [Everything's got to end some day...](https://www.delphitools.info/2010/12/24/everythings-got-to-end-some-day/) - ...and DWScript will likely enter RC phase before the year ends, as almost all of what I had in mind for 2.1 will be there! Recent SVN additions since the last update: 75% of the DWScript core code is now covered by unit tests (this was a psychological milestone for 2.1!). class operators have been [...] - [cefHtmlSnapshot v0.8.100 is now available](https://www.delphitools.info/2022/05/11/cefhtmlsnapshot-v0-8-100-is-now-available/) - cefHtmlSnapshot 0.8.101 release is now available on the cefHtmlSnapshot repository. This version uses CEF 101.0.15 which includes Chromium 101.0.4951.54, and is recommended for production, as it fixes multiple zero-day issues being actively exploited. Output formats of text type have been added, you can now output a plain text, HTML or console content snapshot. Output file [...] - [cefHtmlSnapshot 0.7.100 has been released](https://www.delphitools.info/2022/04/19/cefhtmlsnapshot-0-7-100-has-been-released/) - cefHtmlSnapshot 0.7.100 release is now available on the cefHtmlSnapshot repository. This version uses CEF 100.0.23 which includes Chromium 100.0.4896.127, and is recommended for production, as it fixes multiple zero-day issues being actively exploited. The bundled turbojpeg is updated to 2.1.3, though only to keep up as none of the security and fixes issues applied here. [...] - [JS Codegen & WebAPI transitioning to ECMA6](https://www.delphitools.info/2022/04/13/js-codegen-webapi-transitioning-to-ecma6/) - The DWScript JavaScript code generator is now transitioning to ECMA6, as the the LTS versions of browsers are now completing the transition. So you will now see the code generator using "let" and other ECMA6 constructs where they make sense, in terms of performance or compacity. Performance-wise, initial tests indicate there is not much to [...] - [DWScript compatible with Delphi 11.1](https://www.delphitools.info/2022/03/17/dwscript-compatible-with-delphi-11-1/) - Just downloaded and installed Delphi 11.1, and all the unit tests passed without a glitch. So I can announce that DWScript is compatible with Delphi 11.1 for Win32 and Win64! You can find links to all the Delphi 11.1 release details on Marco's blog. In other news, the tip of the DWScript repository is considered [...] - [Spotlight on Date/Time parsing and formatting](https://www.delphitools.info/2022/02/16/spotlight-on-date-time-parsing-and-formatting/) - dwsDateTime is a fast date/time parser and formatter feature of DWScript. Unlike the Delphi RTL, it is based on the format string. - [Cosmetic upgrades to DelphiCodeCoverage](https://www.delphitools.info/2022/03/02/cosmetic-upgrades-to-delphicodecoverage/) - A quick look at the recent improvements to Delphi Code Coverage HTML Report, which now has upgraded visuals and usability - [New Delphi unit for OpenBLAS](https://www.delphitools.info/2020/09/21/delphi-unit-for-openblas/) - Newly added Delphi support unit for OpenBLAS, an optimized BLAS library (Basic Linear Algebra Subprograms) - [TurboJPEG library rocks !](https://www.delphitools.info/2020/10/06/turbojpeg-rocks/) - Units to support the TurboJPEG library is now available in the DWScript repository, both of Win32 and Win64. - [BigInteger coming to JavaScript CodeGen](https://www.delphitools.info/2019/10/11/biginteger-coming-to-javascript-codegen/) - Support for BigInteger type in SmartPascal is being added in the DWScript repository, it is mapped to the new BigInt JavaScript type - [Delphi Code Coverage alive and kicking](https://www.delphitools.info/2022/02/10/delphi-code-coverage-alive-and-kicking/) - Recently noticed DelphiCodeCoverage had a new home on GitHub, with several updates that make it stable. I had been it in a previous incarnation to assess DWScript test coverage, and help pick which aspects of the engine were in need of extra tests. The DWScript tests can be quite heavy on exceptions, sub-processes and multithreading. [...] - [When a double is neither greater nor lesser, is it equal ?](https://www.delphitools.info/2021/10/29/when-a-double-is-neither-greater-nor-lesser-is-it-equal/) - When a double is neither greater nor lesser, is it equal ? This is assumed in some implementations like for RTL's VarCompareValue and other function that return the result of the comparison. In those function you can see code like else if A = B then Result := vrEqual else if A < B then [...] - [DWScript now compatible with Delphi 11](https://www.delphitools.info/2021/09/14/dwscript-now-compatible-with-delphi-11/) - Just pushed a few changes to the DWScript repository for compatibility with the just released Delphi 11 Alexandria. The only change required was related to a fix of the Delphi compiler, which now properly has integer overflow checks controlled by $OVERFLOWCHECKS while they were previously controlled by $RANGECHECKS. I also added support for the Delphi [...] - [Nested types in DWScript](https://www.delphitools.info/2021/06/22/nested-types-in-dwscript/) - Just a word of warning about a recent commit that added support for nested types in DWScript. This support is at the moment only enabled in class declarations, and very minimally tested, a lot more testing is required - and welcome :) - before it can be considered safe to use, and extended to other [...] - [SQLite as a no-SQL database](https://www.delphitools.info/2021/06/17/sqlite-as-a-no-sql-database/) - SQLite offers through its JSON1 extension a lot of capability. Generating JSON outputs from SQL, even complex structured, multi-level JSON is very straightforward. But what about the opposite use case ? When you have store data as JSON in an SQLite database, and you want to search or filter it ? This is a short [...] - [Boosting Intel laptop battery life](https://www.delphitools.info/2021/06/11/boosting-intel-laptop-battery-life/) - We all need more battery life, and for quad-core i7 & i5, a simple way to gain more battery is to simply turn off extra cores. This little setting for Windows 10 made a whole world of difference in my experience, with battery life literally doubled on my core i7, and almost 50% gains on [...] - [cefHtmlSnapshot v0.5.90 is now available](https://www.delphitools.info/2021/05/11/cefhtmlsnapshot-v0-5-90/) - cefHtmlSnapshot v0.5.90 is now available in the Github repository. This version is based on CEF4Delphi with CEF 90.6.5 (Chromium 90.0.4430.93). It also includes the updated libjpeg-turbo v2.1.0 which was recently released. There are no new major features. Both library updates are essentially security upgrades that plug vulnerabilities. The libjpeg-turbo v2.1.0 has also been pushed to [...] - [First phase of dynamic arrays refactoring completed](https://www.delphitools.info/2021/03/11/first-phase-of-dynamic-arrays-refactoring-completed/) - The first phase of dynamic arrays refactoring mentioned previously is now complete, with dedicated implementations in place for all the base types. A single interface (IScriptDynArray) is now the only common ground. Memory usage is reduced to 1/3 on average, performance is improved up to 2x (without JIT) Array indexes have thus been bumped from [...] - [cefHtmlSnapshot v0.2.88 Security features](https://www.delphitools.info/2021/01/27/cefhtmlsnapshot-v0-2-88-with-security-oriented-features/) - cefHtmlSnapshot v0.2.88 has the sandbox mode active by default and introduces new security-oriented features: added no-sandbox option support specifying the URL through a .url file added ignore-certificate-errors option fixed handling of '-h' to disambiguate between help and height zip file contains only updated cefHtmlSnapshot.exe (overwrite the one from release v0.1.88) In previous pre-releases, sandbox was [...] - [Refactoring DWScript dynamic arrays](https://www.delphitools.info/2021/01/25/refactoring-dwscript-dynamic-arrays/) - After reaching initial stages of the x86-64 JIT, work on a long overdue enhancement of the DWScript engine has started: refactoring how dynamic arrays are implemented. One of the goals when the 32bit JIT was introduced was to edge out the Delphi 32bits compiler, which was not too complicated as Delphi was using the FPU, [...] - [New pre-release cefHtmlSnapshot v0.1.88](https://www.delphitools.info/2021/01/22/new-pre-release-cefhtmlsnapshot-v0-1-88/) - A new v0.1.88 pre-release has been posted on the cefHtmlSnapshot repository. This version is based of latest DCEF4Delphi, and brings up the Chromium Embedded Version up to CEF 88.1.4 (Chromium 88.0.4324.96). There are no other active changes changes at the moment. A version which bundles everything into a solid executable is under investigation, but this [...] - [DWScript Win64 JIT work in progress](https://www.delphitools.info/2021/01/11/dwscript-win64-jit-work-in-progress/) - With the new year, work finally started on getting a Windows 64bit Just-In-Time compiler up and running for DWScript. The repository on Bitbucket and the mirror on GitHub both already hold first working elements. At the moment unit tests are passing, though with effective JIT for only a smaller subset of features than for the [...] - [Announcing cefHtmlSnapshot](https://www.delphitools.info/2020/12/18/announcing-cefhtmlsnapshot/) - A first v0.1 preview of cefHtmlSnapshot is now available at https://github.com/EricGrange/cefHtmlSnapshot. This is a command-line utility that aims to take image (PNG, JPG) or PDF snapshots of an HTML website or file, and fill in the "void" left by the abandon of Qt webkit tools like phantomjs or wkhtml2pdf. While those old utilities still work, [...] - [Matrix-Vector multiplication JIT compiler](https://www.delphitools.info/2020/09/28/matrix-vector-multiplication-jit-compiler/) - Committed to daNeuralNet a first working version of a JIT for matrix-vector multiplication that relies on the FMA instruction set (Fused Multiply and Addition). This version generates code that is up to twice faster than the OpenBLAS for matrix sizes up to CPU cache size (100x100 to 200x200 usually), and maintains a marginal lead for [...] - [SamplingProfiler 64 - test version](https://www.delphitools.info/2020/09/23/samplingprofiler-64-test-version/) - A test version of SamplingProfiler 64bit is available here (3.2 MB). It has only been tested with 64bit binaries compiled by Delphi 10.3 and detailed map files. It should work with other Delphi version, (TD32 and other debug information formats have not been tested yet). There other known issues with stack traces from DLLs, so [...] - [DWScript repository temporarily down (now back up)](https://www.delphitools.info/2020/03/03/dwscript-repository-temporarily-down/) - Update: should now be available, BitBucket staff was very responsive, and Sophos AV as well. Two false positives remain by VBA32 and Cylance, which do not appear to have proper mechanisms to report false positive (not very professional for an AV vendor IMHO). Just a quick note: the DWScript repository on BitBucket is currently down [...] - [Dabbling in Neural Nets (again)](https://www.delphitools.info/2020/09/17/dabbling-in-neural-nets-again/) - I recently dusted off an artificial neural network project, now published at https://bitbucket.org/egrange/daneuralnet/. This is a subject I've been dabbling on and off since the days of 8 bit CPUs. The goals of the project are twofold: first experiment with neural networks that would be practical to run and train on current CPUs, and second [...] - [The case for strict parameter types](https://www.delphitools.info/2019/09/30/the-case-for-strict-parameter-types/) - While refactoring a bit the way some "special" functions were handled in DWScript, I came about a case where the compiler started accepting strings as Math functions parameters. While this comes naturally as an "interesting" side-effects of automatic typecasts, it left a feeling of "wrongness", accepting literal code like Abs("foo") and then failing at run-time [...] - [Beware of TForm.SetBounds in a multi-monitor context](https://www.delphitools.info/2019/08/01/beware-of-tform-setbounds-in-a-multi-monitor-context/) - When in a multi-monitor context with monitors having varying DPI settings, TForm.SetBounds can be a little ambiguous when combined with form scaling. The issue comes from Width / Height, in Delphi 10.3.1, they are understood as applying to the monitor the form is currently one, not the monitor SetBounds could be moving the form to. [...] - [Workaround for TWICImage.ImageFactory bug in Delphi 10.x](https://www.delphitools.info/2019/07/18/workaround-for-twicimage-imagefactory-bug-in-delphi-10-x/) - After battling for half a day with that subtle bug, I am posting the workaround and analysis here, in case other stumble on it. The issue lies with the TWICImage class, which encapsulates Microsoft Windows Imaging Component, and can be triggered in multi-threaded usage scenarios, particularly in services. TWICImage interfaces with Microsoft Windows Imaging Component [...] - [Prepping up for GPDR](https://www.delphitools.info/2018/05/11/prepping-up-for-gpdr/) - As you have probably been made aware by the flurry of privacy policy updates in your mailbox, GPDR is coming. While I am not convinced GDPR will not turn into a perfect showcase for "the road to hell is paved with good intentions", this is also a good opportunity to update BeginEnd.net to use the 64bit [...] - [DWScript transition to Delphi 10.2.3](https://www.delphitools.info/2018/04/20/dwscript-transition-to-delphi-10-2-3/) - Just a quick notice that the DWScript source code has begun a transition to Delphi 10.2.3 up from Delphi XE. The goal is to target Win32 and Win64 compilers, mobile platforms and Delphi Linux are currently not in the scope. At the moment "most" of the test suite is successful in both Win32 and Win64, [...] - [DWScript multifarious tidbits](https://www.delphitools.info/2017/03/24/dwscript-multifarious-tidbits/) - Find beneath this paragraph a spring mishmash of recent happenings from the DWScript repository! Overview Dialog, Lambdas and Templates. Templates/Generics The long planned support for templates has begun! As it represents a significant workload (especially to ensure a good test coverage), it is being introduced piecemeal, type by type, expression by expression, with unit tests added [...] - [Client-Side Password Hashing](https://www.delphitools.info/2017/01/13/client-side-password-hashing/) - A lot of the advice on password hashing says that client-side password hashing is not necessary, provided you are using HTTPS or another secure protocol, for instance in Is it worth hashing passwords on the client side? https security - should password be hashed server-side or client-side? Why is client-side hashing of a password so [...] - [Fuzz Testing in Delphi](https://www.delphitools.info/2016/03/18/fuzz-testing-in-delphi/) - I am a big fan of TBCEditor by Lasse Rautiainen, in case you have not heard about it, it is fork of SynEditthat diverged very significantly and includes support for code folding, fully JSON-based syntax highlighters, minimap and many other features. Of course a code editor is a very complex piece of software, with many opportunities [...] - [Best wishes for 2017!](https://www.delphitools.info/2017/01/09/best-wishes-for-2017/) - A belated Happy New Year and Best Wishes for 2017! This site and news have been neglected for much of 2016, this year's resolution will be to try and revive it a bit. In particular announcements and articles have fallen way behind the code as far as DWScript is concerned. So I will start the year [...] - [Faster backups for large SQLite databases](https://www.delphitools.info/2016/10/06/faster-backups-for-large-sqlite-databases/) - Despite having "lite" in its name, SQLite can handle very large databases quite efficiently. The single largest I am currently dealing with just passed 100 GB, and occasionally when backing it up with the SQLite standard Command Line utility it would take many hours. After some asking on the sqlite-users list (thanks Clemens Madish & Simon Slavin), [...] - [BigInteger support in DWScript](https://www.delphitools.info/2016/04/28/biginteger-support-in-dwscript/) - DWScript now has support for the BigInteger type, which supports numbers with as many decimals as the memory allows. This support comes in two flavors, either through a MPIR dll (a GMP fork) or through Rudy Velthui's BigIntegers unit. The support can be added by having a reference to the relevant units in your project. [...] - [New SHA-3 permutation kernel](https://www.delphitools.info/2016/04/19/new-sha-3-permutation-kernel/) - A new kernel for SHA-3 (Keccak) cryptographic hashing has been committed to the DWScript repository. It is almost 3 times faster than the Pascal version, makes use of MMX asm, and involved an "ad hoc compiler". Keccak was the winner of the NIST hashing competition for a new hashing algorithm to provide an alternative to SHA-256. [...] - [SHA-3 ad hoc compiler: Reloaded](https://www.delphitools.info/2016/04/21/sha-3-ad-hoc-compiler-reloaded/) - It occurred to me that SHA-3 being a cryptographic hash, it is one of those peculiar bits of code that are fully self-testing. Any bug in a cryptographic hash will quickly cascade to a different result, no matter the bug or the input. This means the ad-hoc-compiler-monkey can be unleashed "safely", and can be allowed [...] - [Decentralized World Simulation (not Delphi-related)](https://www.delphitools.info/2016/02/23/decentralized-world-simulation-not-delphi-related/) - As I do not have a better place to drop them, here are some musings related to the Simulation Hypothesis, though not as in The Matrix. Came about them while thinking about how a decentralized simulation (not for a world) could be run, and then one thing led to another. This is basically an engineer's [...] - [The BeginEnd.net & FastMM Canary!](https://www.delphitools.info/2016/02/26/the-beginend-net-fastmm-canary/) - I have been using the feeds aggregator BeginEnd.net as more than just a news aggregator, it is also a Canary: once a new version of DWScript passes tests, it goes live there! Latest Canary feature is for the new FastMM4 multi-threading improvements by Primož Gabrijelčič, which can be found under the Locking Improvements branch. To test [...] - [Nonces and Tokens](https://www.delphitools.info/2016/01/07/nonces-and-tokens/) - I recently committed an extension to dwsCrypto lib module that exposes direct support for cryptographic nonces and tokens. What are those nonce things? A cryptographic nonce is a number that is going to be used only once, it is usually a huge number, which will usually be encoded in various, non-decimal ways. A nonce should be [...] - [Driving PhantomJS from DWScript](https://www.delphitools.info/2015/12/15/driving-phantomjs-from-dwscript/) - PhantomJS is a "headless Webkit" browser which can be used for various automation tasks, among which is the generation of thumbnails for BeginEnd.net :) This article is a quick illustration of how it can be controlled from a DWScript WebServer. PhantomJS comes as a self-contained executable which is controlled by passing it a JavaScript file as [...] - [TBCEditor Syntax-Highlighting Editor](https://www.delphitools.info/2015/05/11/tbceditor-syntax-highlighting-editor/) - A new syntax-highlighting editor has been unleashed upon the Delphi world by Lasse Rautiainen, it's named TBCEditor, and it is quite full-featured, clean, stable and fast. The main source code is TBCEditor on github and supports Delphi XE4-XE8, I have made a fork TBCEditorXE on bitbucket which supports XE. TBCEditor supports the usual syntax highlighter stuff, [...] - [Associative Arrays in DWScript](https://www.delphitools.info/2015/11/17/associative-arrays-in-dwscript/) - Associate Arrays (aka dictionary) are now in experimental form in the DWScript repository. They extend the array type declarations: in the same way you could declare an "array [TEnum] of Xxx" you can now declare an "array [String] of Xxx", and not just with strings but with any type on either side. The declaration syntax [...] - [Long strings: Hash vs Sorted vs Unsorted](https://www.delphitools.info/2015/03/17/long-strings-hash-vs-sorted-vs-unsorted/) - Hash, IndexOf, Lookup, Performance, Search, Sorted, StringAs a followup to the previous String Lookup: Hash, Sorted or Unsorted here is a look at what happens for longer strings. When the string you're searching have more than a dozen characters, and you only have a few hundreds of them, a clear winner emerges. First chart is for searching [...] - [Defeat "Print Screen" with Visual Cryptography](https://www.delphitools.info/2012/08/01/defeat-print-screen-with-visual-cryptography/) - Time for some summer fun! Someone asked in the delphi win32 newsgroup how to prevent users from doing a "Print Screen". The answer to that is that you can't really, since screen capture can be invoked from other applications, or your app can be hosted in a Virtual Machine, accessed over RDP, or a frame [...] - [Moving hosts - part 2 - CloudFlare](https://www.delphitools.info/2013/10/13/moving-hosts-part-2-cloudflare/) - I've now enabled CloudFlare as CDN, is it all it's hyped up to be? Here is a small unscientific poll to give your feeling on how or if it affected the perceived speed of this website. I'll be monitoring performance through other means, but I'm interested to know if it translates to any perceived speedups. [...] - [Chrome Web Apps in Android](https://www.delphitools.info/2013/10/16/chrome-web-apps-in-android/) - Chrome for Android 31 (currently in the beta channel) added the ability to add a web application to the home screen, which iOS fans will notice it had been available for years on their fruity phones. Upgrading a SmartMS application to allow installing on the Android Home Screen is very straightforward. Adding the Meta In [...] - [Moving Hosts - Now Settled](https://www.delphitools.info/2013/11/20/moving-hosts-now-settled/) - A month ago I started experimenting with various VPS hosting solutions for this website. Well I now consider myself settled for the time being. Here are a few of my findings for those that were interested. Nothing Delphi-related there. Note that while I am listing some Virtual Private Server vendors here, they are all from [...] - [DWScript binaries and downloads](https://www.delphitools.info/2014/03/05/dwscript-binaries-and-downloads/) - As Google Code no longer allows downloads, I will incrementally relocate the DWScript downloads on this website. The first of the new downloads is an updated binary installer for the DWS Web Server. The new version includes all latest changes from the SVN, and wraps the executable, demo website and utility batches in an installer. [...] - [Cryptographic Library for DWScript](https://www.delphitools.info/2014/03/10/cryptographic-library-for-dwscript/) - There is now an embryo of standard cryptography support for DWScript through the dwsCryptoLib module. The implementations are currently based on mORMot's SynCrypto unit, which is fast and solid. Script-side it's exposed as a System.Crypto unit, and offers the following classes: HashAlgorithm HashMD5 HashSHA1 HashSHA256 EncryptionAlgorithm EncryptionAESSHA256Full The classes are currently meant for static usage [...] - [Using reCAPTCHA in DWS WebServer](https://www.delphitools.info/2014/04/04/using-recaptcha-in-dws-webserver/) - 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. The plugin (aka unit) can be found in the DWSlibs github repository, and it [...] - [DWScript happenings and new logo](https://www.delphitools.info/2014/08/11/dwscript-happenings-and-new-logo/) - Long time, no post here, but not no happenings on the DWScript front :) Behold a "cleaned up old logo" for DWScript, which will replace the old one until a better one is made The DWS source saw mostly bug fixes and small improvements during the last months, as I became absorbed in the crypto-currency [...] - [Operator precedence changes](https://www.delphitools.info/2014/09/02/operator-precedence-changes/) - Here is a summary of recent DWScript changes, the major one is a change in operator precedence to something similar to Delphi and FreePascal. Other changes are related to sets and bug fixes. The precedence of operators has been changed to be inline with Delphi & FreePascal, this means that AND, AS, SHL, SHR and SAR [...] - [DWScript news and sneak peek](https://www.delphitools.info/2014/10/08/dwscript-news-and-sneak-peek/) - Below is a quick summary of changes in the SVN since the last post. There is also a mini-sneak peek of things to come! Recent changes Language changes Arrays can now be concatenated with the '+' operator (same as XE7), note that it is supported for static arrays too, but a concatenation of static arrays results [...] - [DWS WebServer with JavaScript CodeGen](https://www.delphitools.info/2014/10/13/dws-webserver-with-javascript-codegen/) - The pre-compiled 2014.10.13 version of the DWScript WebServer is now available! This version includes the Pascal to JavaScript CodeGen! Here is the download link for the installer: DWSWebServer 2014.10.13 (1541 kB) This version also includes all fixes and improvements in DWScript, but the main attraction is the Pascal to JavaScript compiler, which bundles a limited version of SmartMobile [...] - [Optimistic Case-Insensitive String Hash](https://www.delphitools.info/2015/02/07/optimistic-case-insensitive-string-hash/) - A trivial way to turn a case-sensitive String hash function into a case-insensitive one is to to pass a lower-case (or upper-case) version of the String. However, in our days of Unicode strings, this is not innocuous... Running a quick benchmark on SimpleStringHash (a FNV-1a derivative), I got the following figures (execution time, lower is better): SimpleStringHash( [...] - [String Lookup: Hash, Sorted or Unsorted ?](https://www.delphitools.info/2015/03/16/string-lookup-hash-sorted-or-unsorted/) - When looking up a string, what is the fastest strategy? A hash map, a sorted list or an unsorted list? Of course it depends on how many strings you have, but where are the cutoff points? Here is a quick test, and an interesting tidbit is uncovered... Without further ado, here is the result chart. [...] - [Begin End, a few months later](https://www.delphitools.info/2015/11/09/begin-end-a-few-months-later/) - A few months after its launch, BeginEnd.net is now seeing about 25k queries every day for almost 500 unique visitors, and it's time for a few polls to help me gauge things! [...] - [Non-English Blogs now on BeginEnd.net](https://www.delphitools.info/2015/06/18/non-english-blogs-now-on-beginend-net/) - Non-English Blogs have been added to BeginEnd.net, not many just yet: three in Italian, one French and one Korean! The BeginEnd.net website itself stays in English, and the posts titles & descriptions are going to be automatically-translated in English (currently through Microsoft Translator service). To see those blogs and gauge the quality of the translation, head over to [...] - [BeginEnd.net has begun, where will it end?](https://www.delphitools.info/2015/06/01/beginend-net-has-begun-where-will-it-end/) - Last week www.beginend.net was launched with the goal of aggregating Pascal and Delphi blogs in a mobile-friendly, secure website with a minimalist UI. The website is Pascal-Powered: the server is Delphi-compiled DWScript Sample Web server, the server-side page generation and APIs are handled by DWS and an SQLite database, and the client-side is a SmartPascal [...] - [Taming HTML5 verlets with Object Pascal](https://www.delphitools.info/2011/09/19/taming-html5-verlets-with-object-pascal/) - Click the image below for a little real-time verlet integration animation. And the source code for that little bit of HTML5 animation is Object Pascal, Delphi Web Script flavor, and is posted below. It shows off the inline method implementations (you can use classic implementation style, and if that code were in a unit, you [...] - [Taming the flock with Object Pascal](https://www.delphitools.info/2011/09/28/taming-the-flock-with-object-pascal/) - And now for a more interactive demo than last time, this is a full-screen HTML5 Canvas interactive demo with the source in Object Pascal, compiled to JavaScript by the DWScript JS CodeGen. Click below to see it in action and hit F11. It illustrates using records, classes, and invoking the HTML5 Canvas and jQuery directly [...] - [Floating point modulus](https://www.delphitools.info/2015/10/29/floating-point-modulus/) - Support for floating point modulus has been added to DWScript, it extends the "mod" operator to accept floats. You can now have scripts with code like r := a mod PI; On x86 CPUs, the implementation will use the FPREM CPU instruction, which provides a relatively high precision (much higher than approaches based on Frac), [...] - [Why no bytecode format?](https://www.delphitools.info/2010/10/26/why-no-bytecode-format/) - A compiled script, a TdwsProgram, cannot be saved to a file, and will not ever be. Why is that? This is a question that dates back to the first DWS, as it was re-asked recently, I will expose the rationale here. DWS has a very fast compiler, there are no performance problems compiling scripts instead [...] - [Coalesce operator for DWScript](https://www.delphitools.info/2015/05/15/coalesce-operator-for-dwscript/) - Support for ?? (double question mark) as the coalesce operator has been added to DWScript. The coalesce operator is a binary operator, which looks at its left operand, and if not "falsey", returns it, otherwise returns its right operand. At its simplest the syntax is: a := b ?? c; is inline syntax sugar for [...] - [Migrating from Google Code to BitBucket](https://www.delphitools.info/2015/03/19/migrating-from-google-code-to-bitbucket/) - Here is a quick guide on migrating a project code from Google Code (SVN) to BitBucket (git) using TortoiseGIT, so with a GUI, and with no cryptic command line in sight. Migrating Wiki/Issues is a bit more involved and not covered here. Migrating downloads has to be done by re-uploading to BitBucket (but at least [...] - [DWScript moving to BitBucket](https://www.delphitools.info/2015/03/18/dwscript-moving-to-bitbucket-2/) - With the closing of Google Code, I will be moving my projects, a priori to BitBucket. The new URL is https://bitbucket.org/egrange/dwscript If you have Issues in the Google Code Issue Tracker that matter to you, please copy-paste them to the BitBucket Issue Tracker. There are few enough active tickets, and the "automatic" import is too convoluted [...] - [Things on the radar for DWS](https://www.delphitools.info/2010/08/30/things-on-the-radar-for-dws/) - Or a roadmap of sorts. The basic idea is to maintain forward compatibility for the "external" aspects: the language and the components. At the same time, the internals of DWS will be subject to evolution, incremental Darwinian evolution, rather than a straight break into some next-gen architecture. The main goals: Strong typing: this is a [...] - [String Hashing Shootout](https://www.delphitools.info/2014/08/25/string-hashing-shootout/) - 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). Contenders CRC32 using the SynCommons CPU implementation (based on Aleksandr Sharahov asm version) KR32 hash [...] - [Delphi XE6 32bits and Scimark](https://www.delphitools.info/2014/05/08/delphi-xe6-32bits-and-scimark/) - In a Google+ comment to my recent article about inlining in XE6, Leif Uneus posted results from Scimark. It appears that XE6 is about 30% slower than previous versions at least from XE5 to XE for 32bits floating point. Note that Scimark does not make use of inlining, but does make heavy use of floating-point computations, [...] - [A Look at Improved Inlining in Delphi XE6](https://www.delphitools.info/2014/05/07/a-look-at-improved-inlining-in-delphi-xe6/) - First noticed by dewresearch, Delphi XE6 introduced a new optimization for inlined functions that return a floating-point value. Here is an exploration of what was improved... and what was not improved. When inlining was introduced in Delphi, one limitation was that functions returning a floating point values would incur an unnecessary round-trip to the stack, [...] - [New DWS WebServer release](https://www.delphitools.info/2014/04/06/new-dws-webserver-release/) - A new pre-compiled release v2014.04.04 for the DWS WebServer is available from the downloads page, it is compiled from the latest source. Besides the usual demo sites, it has been used to serve a crypto-currency block-chain explorer website that peaked at 1600 page views / hour after some successful tweets went viral. For details changes, [...] - [Optimistic Unicode case-insensitive CompareText](https://www.delphitools.info/2011/05/04/optimistic-unicode-case-insensitive-comparetext/) - In Unicode Delphi, post-Delphi 2009, there are two ways of making case-insensitive string comparisons, CompareText, which only does case-insensitivity in the ASCII range (non-accentuated characters), and the judiciously misnommed AnsiCompareText, which works on the whole Unicode range by calling into the Windows API. Alas, AnsiCompareText is slow, very slow, as illustrated by TStringList in this [...] - [Random Passphrase Generator](https://www.delphitools.info/2013/12/06/random-passphrase-generator/) - I've activated a small random pass phrase secure service based on DWScript Web Server. You can reach it at http://ssl.delphitools.info/passphrase/ Pass Phrases not Pass Words Random pass phrases are a good alternative to passwords, as they're easier to memorize and have higher entropy, for an illustration see the infamous http://xkcd.com/936/: The code of the generator itself [...] - [BackgroundWorkers in DWScript](https://www.delphitools.info/2014/02/27/backgroundworker-in-dwscript/) - 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. BackgroundWorkers static class It's found in the dwsBackgroundWorkersLibModule module, which exposes a System.Workers unit to the [...] - [HTTP Redirection in DWSWebServer](https://www.delphitools.info/2014/03/03/http-redirection-in-dwswebserver/) - 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 [...] - [DataBasePool in DWScript](https://www.delphitools.info/2014/01/14/databasepool-in-dwscript/) - A recent addition to dwsDataBase is the DataBasePool static class. As the names indicates, it facilitates pooling database connections from the script-side, while previously you had to rely on Delphi or driver-side pooling (or lack of). DataBasePool This is a really simple static class, with only three methods: Acquire(name) : acquires a DataBase object from [...] - [Pascal vs Archetypal Enemy](https://www.delphitools.info/2014/02/07/pascal-vs-archetypal-enemy/) - Once upon a time, there was a war (in the developer meaning), between Pascal, and another language whose name begin with the V and B initials. Well that war is over. Pascal won, sometimes in 2010. As proof look at the following Ohloh chart. While the Archetypal Enemy was set to finally dominate,something happened... though [...] - [Who purchased the Delphi you use?](https://www.delphitools.info/2014/01/09/who-purchased-the-delphi-you-use/) - Inspired by a recent question by Bruce McGee in the Delphi non-tech forum, here are a couple of mini-polls. Who purchase the Delphi you use? Do you use Delphi for work, hobby or both? [...] - [Globals Storages in DWScript](https://www.delphitools.info/2014/01/06/globals-storages-in-dwscript/) - DWScript has a "Globals" facility that allows storing and sharing data across scripts living in the same executable. The first are Global Vars, and is a Key-Value storage, the second are Global Queues, which are LIFO/FIFO named queues. Both are thread-safe and high performance. Enabling Support for Globals To support them, just have dwsGlobalVarsFunctions in [...] - [DWScript 2.3 preview 1](https://www.delphitools.info/2012/03/09/dwscript-2-3-preview-1/) - A new DWScript 2.3 source archive is available (417 kB) for the SVN-averse, the previous available zip was the 2.2 version, which is quite outdated. Given the continuous extension of the unit tests suite, this should hopefully be one of the most stable versions to date, in addition to being the most advanced, but it's likely [...] - [Efficient String Building in Delphi](https://www.delphitools.info/2013/10/30/efficient-string-building-in-delphi/) - As a followup to the String Concatenation article, let's take a look at a less trivial case: what if instead of concatenating a couple strings, you want to concatenate a few hundred? Sounds like a task at which TStringBuilder should excel, but one should never assume, and always measure. Eating Lots of Apples While some [...] - [SamplingProfiler 1.6.0 out of the woods](https://www.delphitools.info/2009/03/20/samplingprofiler-160-out-of-the-woods/) - Version 1.6.0 of the Delphi sampling profiler is now available from its downloads page! The main addition is the ability to have sampling conditioned by CPU usage, ie. only gather profiling information when the CPU usage is high, either for the system or the process. This was added with three goals in mind: eliminate all [...] - [Launching fractals.dwscript.net](https://www.delphitools.info/2014/01/01/launching-fractals-dwscript-net/) - Happy new Year to all! The fractals.dwscript.net is now launched to host the results of the recent Mandelbrot TeraPixel experiment. It's a small website to centralizes browser, documentations, links and downloads. There was also news of a FireMonkey client for the data set API. Raw Database Downloads now Available For those interested, in the Documentation page [...] - [And the Terapixel Became Four](https://www.delphitools.info/2013/12/27/and-the-terapixel-became-four/) - The Christmas Mandelbrot Experiment is now nearing has achieved completion of Level 13, or a Four Terapixel image! This will be the end of the experiment (at least temporarily) as the server is running out of storage space :-) Finishing Level 13 I've temporarily closed off browsing of Level 12 to make room for Level 13, at the [...] - [Slim Reader/Writer Locks Rock!](https://www.delphitools.info/2013/12/18/slim-readerwriter-locks-rock/) - 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... Following Up If you follow the comments in the previous article, some extra benchmarks where published, including "degenerate" cases where the Slim R/W Locks are used [...] - [A Terapixel Image for the DelphiWebScript Christmas!](https://www.delphitools.info/2013/12/24/a-terapixel-image-for-the-delphiwebscript-christmas/) - As a step up from the previous Mandelbrot Set explorer, I'm running a Terapixel image experience for DWScript Christmas 2013. This is again on the Mandelbrot set, and involves a massive step up in complexity from the previous version, this one isn't just server-side computed, it's "Grid Computed" :-) For the impatient, jump to the [...] - [Flush Windows File Cache](https://www.delphitools.info/2013/11/29/flush-windows-file-cache/) - 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. The [...] - [DWScript Mandelbrot Explorer (with a twist)](https://www.delphitools.info/2013/12/04/dwscript-mandelbrot-explorer-with-a-twist/) - The twist is that the computations are handled server-side, using DWScript JIT compiler, so exploration can be fairly fast and comfortable even on low-powered hardware, be it an iPad, a Smartphone or an old laptop. It can be reached at the following address: http://mandel.delphitools.info:8080 You can zoom with the mouse wheel, pinch gestures, double clicks/taps or [...] - [Slim Multi-Read Single-Write Locks](https://www.delphitools.info/2013/12/09/slim-multi-read-single-write-locks/) - 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. Test Case Workload consisted of four threads performing a certain amount of read [...] - [MapFileStats v1.5 - Improved DCU Statistics](https://www.delphitools.info/2013/12/12/mapfilestats-v1-5-improved-dcu-statistics/) - My small utility that gives binary size statistics from the Map file just got updated to version 1.5 This updates improves statistics gathered and reported for DCU file sizes, and introduces a small speedup. Here are the highlights: Auto-detect Delphi DCUs directory, DCU ratio statistics are now provided for Delphi units Prioritize DCUs from the [...] - [Setting up SSL for DWScript Web Server](https://www.delphitools.info/2013/12/17/setting-up-ssl-for-dwscript-web-server/) - 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. Getting a Certificate You can get a certificate from various certification [...] - [Möbius: Pascal without begin/end?](https://www.delphitools.info/2013/11/26/mobius-pascal-without-beginend/) - One recent announce of MSELang by Martin Schreiber reminded me of something I've been mulling over, code name "Möbius" which would be Pascal without begin and/or end. Before you prepare the tar and feathers, read on, and vote at the bottom, if you get there ;-) Pascal is a verbose language, that's why we like [...] - [Cleanup your ugly Boolean expressions with De Morgan's laws](https://www.delphitools.info/2013/01/15/cleanup-your-ugly-boolean-expressions-with-de-morgans-laws/) - This is a simple trick that can be handy to cleanup or simplify Boolean expressions, and is always good to have in your code-writing toolchest: De Morgan's laws. These two laws allow to apply a negation to an and or or expression: (not A) and (not B) not (A or B) (not A) or (not B) [...] - [XE2 / DWS 2.2, Rosetta Code, Operators](https://www.delphitools.info/2011/08/05/xe2-dws-2-2-rosetta-code-operators/) - Quite busy times with Delphi XE2 news appearing all over the web! DWScript 2.2 DWScript 2.2 is planned for release a little after XE2 comes out, so sometime in September. Goals for DWS 2.2 have been reached, so it's mostly a matter of wrapping it up at this point, and tying loose ends. Expect Win64 [...] - [Efficient File Enumeration](https://www.delphitools.info/2013/11/25/efficient-file-enumeration/) - 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. 8dot3 file naming The old [...] - [GLScene status](https://www.delphitools.info/2010/06/07/glscene-status/) - I've updated the GLScene.org main page with information on where you can find support newsgroups and forums, since the nntp newsgroup went down and are unlikely to come back up (thanks Paul Van Dinther, now from PlanetInAction, for the help in accessing the wiki). The old site has been resurrected there too, as the wiki [...] - [WebGLScene: something is brewing in the lab](https://www.delphitools.info/2012/05/31/webglscene-something-is-brewing-in-the-lab/) - This is an informal announcement that work has begun on WebGL and bringing some of GLScene browser-side! If you've got a a WebGL-capable browser (see "compatibility" below) click on the following links to see it in action: There is a simple variation on the classic NeHe tutorials templates and a first try at a heightfield, [...] - [Unicode Leftover Bug From Hell](https://www.delphitools.info/2013/11/18/unicode-leftover-bug-from-hell/) - Or in other words, before getting to the gory details, DWScript now works when compiled with {$HIGHCHARUNICODE ON} on a machine with Cyrillic code-page 1251. DWScript was converted years ago to Unicode, and been working just fine. But there was a leftover bug from that crossing of the Styx. Failing in an unexpected place Last [...] - [Casting an Interface to a Class, the efficient way](https://www.delphitools.info/2012/07/04/casting-an-interface-to-a-class-the-efficient-way/) - Delphi 2010 added support for the "as" to cast an interface reference to its implementation class. Here is an alternative that can help both performance and correctness. Cast interface as class type IFoo = interface ... end; TFoo = class (TInterfacedObject, IFoo) ... end; ... var intf : IFoo; var foo : TFoo; ... intf [...] - [Introducing dwsDatabase](https://www.delphitools.info/2013/01/23/introducing-dwsdatabase/) - DWScript now has database support classes built-in, these are based on a thin, interface-based layer, and can be used Delphi-side as well to get automatic memory management for simple DB access. It currently supports mORMot SynDB and Universal InterBase, meaning it gets high performance native connectivity to SQLite, FireBird, Oracle, ODBC and OleDB (MySQL, MS [...] - [SamplingProfiler & Windows 7](https://www.delphitools.info/2011/01/15/samplingprofiler-windows-7/) - As you may be aware, for and unknown reason SamplingProfiler doesn't work under Windows 7, the technical details as to what doesn't work under Windows 7 are in this stackoverflow question: GetThreadContext fails after a successful SuspendThread in Windows 7 If you've any idea of the answer, or know someone who might know the answer, [...] - [Poll: Templates or Generics?](https://www.delphitools.info/2011/04/15/poll-templates-or-generics/) - I'm wondering about this question in the context of scripting. The poll itself is at the bottom, of this post, so you're encouraged to read the arguments and relevant comments first ;-) Templates As a reminder, when using templates, the templated type is substituted upon template instantiation, meanings that anything you could write or perform [...] - [Poll: dynamic arrays as reference or value type?](https://www.delphitools.info/2011/06/15/poll-dynamic-arrays-as-reference-or-value-type/) - Here is a small poll to help me decide in which direction to go about dynamic arrays in DWScript. The poll is at the bottom of the post, to encourage reading before voting ;-) The Problem In Delphi, fixed-size arrays behave as value types, while dynamic arrays behave as reference type, this can be illustrated [...] - [How would you name TObject's ancestor class?](https://www.delphitools.info/2011/06/23/how-would-you-name-tobjects-ancestor-class/) - I'm looking for a good name for a "TObject ancestor" class, that would introduce no Pascal baggage: no "Create", no "Destroy", no "Free", etc. TObject would become a subclass of that root class. A good name would have to be meaningful as being the "true" root of the class hierarchy, and ideally, it would have [...] - [Old School Maze Pascal to JavaScript](https://www.delphitools.info/2012/03/13/old-school-maze-pascal-to-javascript/) - Zarko Gajic recently reposted Kostas Symeonidis's Maze, this is an old code (2004) that generates a random maze using Prim's algorithm and solves it. I wondered how it would hold its own when compiled to JavaScript, and by that I mean compiling the old 2004 source... click on the picture to the right to run [...] - [Pascalish-looking generics poll](https://www.delphitools.info/2012/11/21/pascalish-looking-generics-poll/) - Now for a bit of hypothetical polling! thinking on the generics/templates syntax, one can't quite shake the feeling Delphi got the C#/C++ generics/templates syntax. The < and > can't be read out loud, and just look like an out of place reuse of the comparison symbols. Interestingly enough, Pascal had something of a generics syntax [...] - [What client-side platforms do you develop for?](https://www.delphitools.info/2013/03/26/what-client-side-platforms-do-you-develop-for/) - What client-side platforms do you develop for? With Delphi/FreePascal or with other tools. This is a small poll to gauge the audience of this website, check all applicable, but please limit yourself to those you personally develop for (be it work or hobby), not your company or colleagues. [...] - [Zero-based Strings indexes?](https://www.delphitools.info/2011/12/15/zero-based-strings/) - In a now infamous and enormous thread I won't name, Allen Bauer dropped a bomb: Oh, and strings may become immutable and 0-based ... Currently Oxygene has zero-based strings, I was considering it for DWScript too, but the backward-compatibility implications are a bit too huge (yes, we and customers have many years of accumulated DWS [...] - [Memory Managers and String Building](https://www.delphitools.info/2013/11/07/memory-managers-and-string-building/) - [This is a guest post, written by Primož Gabrijelčič, www.thedelphigeek.com] One thing interested me since I started reading Eric's series on string concatenation performance - how would different memory managers compare in a multi-threaded scenario. Today I decided to spend an hour finding out... edit 18/11: the tests were run with debug mode, which affected TTextWriter [...] - [RTTI Exposure for DWScript](https://www.delphitools.info/2010/09/14/rtti-exposure-for-dwscript/) - New in the SVN is a dwsRTTIExposer unit, whose purpose will be to expose Delphi classes and other types via RTTI to a script. You'll need Delphi 2010 or XE to use it, the functionality is implemented as a class helper for the TdwsUnit component. Currently it supports isolated classes only, properties (non-array), methods and [...] - [Missing bits in Delphi RTTI...](https://www.delphitools.info/2010/09/15/missing-bits-in-delphi-rtti/) - To help lobby for a more complete Delphi RTTI, here are some QCs you may want to vote for (though I agree it is often more effective to make noise than vote in QC, this post shall serve both purposes). After venturing in the RTTI unit for DWScript, I bumped on some surprising omissions from [...] - [Records with methods, Improved RTTI support](https://www.delphitools.info/2011/09/16/records-with-methods-improved-rtti-support/) - Delphi Web Script version 2.2 will soon be a wrap up, I've posted a preview zip (324 kb) for the SVN-averse. Here is the summary of recent changes form the SVN side of DWS: "Records-with-methods" are now supported, you can specify visibility (private/public/published), declare properties and methods (including class methods). New TdwsRTTIConnector, exposes an RTTIVariant [...] - [TdwsRttiConnector: read anything, write anything](https://www.delphitools.info/2011/10/03/tdwsrtticonnector-read-anything-write-anything/) - ...or to be more accurate, many things the Delphi RTTI can reach, DWScript can reach. Raw RTTI connectivity for DWS The new TdwsRttiConnector components exposes a new RttiVariant type to DWScript, which can be used to dynamically read and write fields/properties, or call methods of any RTTI-exposed Delphi type. You can use it to update [...] - [Explicitly scoped enums](https://www.delphitools.info/2012/03/30/explicitly-scoped-enums/) - Oxygene syntax (aka Delphi Prism) for enumerations was recently added to DWScript, with both enum and flags contextual keywords. Enumerations scoping was already in, but optional, using these keywords make scoping explicitly required. type TMyEnum = enum (Alpha, Beta, Gamma); ... e := TMyEnum.Alpha; // works e := Alpha; // syntax error Since the scoping [...] - [Helpers added to DWScript](https://www.delphitools.info/2012/05/02/helpers-added-to-dwscript/) - In the SVN version, DWScript now has experimental support for helpers. This is a generalization of Delphi's class helpers, which can be applied to (almost) any type. You can also have multiple helpers per type. The syntax is currently the following: type TMyHelper = helper for some_type_here private ...private helper methods, class vars & class [...] - [Partial Classes in DWScript](https://www.delphitools.info/2012/05/14/partial-classes-in-dwscript/) - Support for partial classes has been added to DWScript: they can be declared as "class partial (TAncestor)" as well as with the Oxygene syntax "partial class (TAncestor)" syntax. Partial classes allow to split the definition and implementation of a class over multiple files, or over multiple sections of the same file. Partial declarations must have [...] - [From OP4JS to Smart Mobile Studio](https://www.delphitools.info/2012/05/18/from-op4js-to-smart-mobile-studio/) - With the SmartMS release a deal has also been concluded between Creative IT and Optimale Systemer AS, to safeguard their investments and ensure future evolutions, the JavaScript CodeGen portion of DWScript will no longer be developed as open-source, but will be exclusive to Optimale Systemer AS. Sales permitting, this should allow to dedicate more time [...] - [Fields default values, anonymous records](https://www.delphitools.info/2012/05/29/fields-default-values-anonymous-records/) - Recent additions to DWScript... as well as for next Smart MS version ;-) Fields default values Record and class fields can now have default values, and can be type-inferenced. The same syntax works both in record declarations and class declarations, and you can use '=' or ':=' for the assignment, for instance type TMyClass = [...] - [DWScript July 2012 news](https://www.delphitools.info/2012/07/13/dwscript-july-2012-news/) - Here is a summary of recent changes since the last news roundup. These apply to the SVN version, which will likely become 2.4 soon, as it includes quite a bit of improvements and fixes over 2.3 (which was released in march). Language Added support for initialization and finalization for units, unlike with Delphi, you're allowed [...] - [DWScript August 2012 news](https://www.delphitools.info/2012/08/21/dwscript-august-2012-news/) - Here are the recent changes for DWScript from the SVN side. As things settle down, next version should hit RC status by the end of the month. Language Added two new forms of "for in" which are fully Unicode-capable, ie. they work for characters outside the BMP, and unlike Delphi (or Java, or C#, or [...] - [New "for var" syntax in DWScript](https://www.delphitools.info/2012/11/19/new-for-var-syntax-in-dwscript/) - Latest DWScript SVN introduces support a new "for var" syntax extension for loops. It combines the loop with the loop variable declaration (type-inferred), while scoping the variable to the loop. The syntax of "for to/downto" loops is thus extended to: for var someVarName := lowBound to highBound [step someStep] do ... for var someVarName := highBound downto lowBound [step someStep] do [...] - [DWScript and the Gabelou](https://www.delphitools.info/2012/12/21/dwscript-and-the-gabelou/) - The Gabelou is now available in the DWScript SVN, this is a set of classes and rules that aims to watch over coding styles. Currently only a handful of naming rules are declared, with more coming. You can run the Gabelou by adding the dwsGabelou unit to your uses, then create an instance, add custom rules [...] - [if then (else) expressions](https://www.delphitools.info/2013/01/08/if-then-else-expressions/) - "if" expressions are now supported in DWScript SVN, those were introduced to Pascal by Oxygene a couple years back, and are Pascal's verbose version of the C ternary operator (?:). For instance var s := if (a0) then Sin(1/a) else 1; being equivalent to var s : Float; if (a0) then s := Sin(1/a) else [...] - [COM connector spring cleanup](https://www.delphitools.info/2013/04/09/com-connector-spring-cleanup/) - DWScript COM Connector has just received a spring cleanup, as it had grown a bit mouldy over the last years. The COM Connector optionally gives scripts direct access to ActiveX and COM objects. As part of the cleanup, it now support IEnumVARIANT and ComVariantArray can now be enumerated as well with "for in". In practice it means [...] - [DWScript news roundup for May 2013](https://www.delphitools.info/2013/05/07/dwscript-news-roundup-for-may-2013/) - Here are the main DWS news items for May 2012 Language and Script Engine Delphi XE4 is now supported, compiler hints for XE3 have been taken care of as well compiler now supports "in" operator across strings, for for instance "if subString in myString then" is equivalent to "if myString.Contains(subString) then" added standard "helpers" for [...] - [Dynamic arrays as stacks, tighter JavaScript](https://www.delphitools.info/2012/04/30/dynamic-arrays-as-stacks-tighter-javascript/) - Here is a summary of the changes of recent happenings in the SVN. Note that this list doesn't include the very latest changes and features, which will get an article of their own. Language dynamic arrays now support Pop(), Peek() and Push() and can be used as stacks. dynamic arrays Add() and Push() now accept [...] - [MapFileStats v1.4 - Now With More Details](https://www.delphitools.info/2013/11/15/mapfilestats-v1-4-now-with-more-details/) - MapFileStats v1.4 is now available, this version provides a lot more details about where the bytes in your executables come from. It also features improved visualization and performance. The main change in this version is the ability to drill-down into units, and see more details about the size of classes, methods, functions and meta-data (VMT [...] - [All hail the "const" parameters!](https://www.delphitools.info/2010/07/28/all-hail-the-const-parameters/) - Passing parameters as "const" is a classic Delphi optimization trick, but the mechanisms behind that "trick" go beyond cargo-cult recipes, and may actually stumble into the "good practice" territory. Why does it work? The most well known case is "const String", for which the compiler than takes advantage of the "const" to pass the String [...] - [SamplingProfiler 1.8.1](https://www.delphitools.info/2013/11/12/samplingprofiler-1-8-1/) - A new version 1.8.1 is available from the SamplingProfiler page. This minor updates fixes the displayed source code for samples gathered on a generic method ("Show Source Location" option) and other minor fixes. Change log is as follows: Delphi XE4 path added to options. Display correct file for samples on generic methods. New Icon, cosmetic [...] - [Efficient String Concatenation in Delphi](https://www.delphitools.info/2013/10/28/efficient-string-concatenation-in-delphi/) - You may all know about String concatenation in Delphi, but do you know about the implicit String variables the compiler may create for you? Along with the implicit variables come implicit exception frames, and a whole lot of hidden stack juggling, which can quickly become hidden complexity bottlenecks. Looking Innocent What's more innocent-looking than a [...] - [Pimp your WebSite with an Halloween Bat](https://www.delphitools.info/2013/10/30/pimp-your-website-with-an-halloween-bat/) - Time for some Halloween silliness: here is a quick & dirty JavaScript to pimp your website, blog or whatever with a randomly moving vampire bat animation. Or a dozen. Or a whole flock. jsbat.js (v1.2 just 1.9 kB) Installing Download the file to your website or feel free to link it here. Then add as many [...] - [Multi-Threaded String Building in Delphi](https://www.delphitools.info/2013/11/05/multi-threaded-string-building-in-delphi/) - After looking at String concatenation and String Building in Delphi, and as a conclusion, it's time to have a brief look at what happens in multi-threaded settings, such as in a server pushing JSON, XML or some other text data. Benchmark Results The test case is the same as that of the String Building article, [...] - [Source Code for the String Concatenation/Building Benchmark](https://www.delphitools.info/2013/11/06/source-code-for-the-string-concatenationbuilding-benchmark/) - By popular request, here is the source code used for the previous String benchmarks StringConcatBench.zip, essentially to test alternative memory managers. The source is nothing complicated as you will see, just a set of simple function with the test cases, and a couple function that measure run times. Only the benchmark functions are in the zip, [...] - [Using SamplingProfiler from the IDE](https://www.delphitools.info/2009/02/27/using-samplingprofiler-from-the-delphi-ide/) - SamplingProfiler comes as a stand alone-application, but it's also ready for integration in the IDE via the Tools menu. Go to the Tools menu configuration and add an entry for SamplingProfiler. Set the parameters field to $EXENAME. Voilà! From now on, when working on a project, you can compile and then hit the SamplingProfiler entry [...] - [MapFileStats v1.2 out and other news](https://www.delphitools.info/2009/04/09/mapfilestats-v12-out-and-other-news/) - MapFileStats v1.2 is now available for download, it fixes reported issues and introduces a few minor improvements, such as using the ability to abort search paths scans and remembering MAP File and Search Paths options between executions. You can find the complete list in the changelog. In other news v1.7 of SamplingProfiler should be ready [...] - [SamplingProfiler 1.6.1 released](https://www.delphitools.info/2009/03/26/samplingprofiler-161-released/) - Still hot out of the D2009 linker is v1.6.1 of SamplingProfiler. This is essentially a bugfix release which should solve the Win2k compatibility issue. Changes since from 1.6.0 to 1.6.1: Supports rough profiling when MAP file does not hold detailed information. Fixed a transient case in which irrelevant samples could be collected. Fixed a dll [...] - [Delphi 2009 hidden compiler switch?](https://www.delphitools.info/2009/04/01/delphi-2009-hidden-compiler-switch/) - This morning while debugging a statistical ichthyo-parser I stumbled upon what looked like a Delphi 2009 compiler bug: the compiler was outputting gibberish ASM opcodes... But after further investigations, it appeared this wasn't completely gibberish, but that it was (somewhat) correct MSIL bytecode! What's more, a quick hexadecimal examination of dcc32.exe yelded that this MSIL [...] - [Call for DWScript showcases](https://www.delphitools.info/2013/03/08/call-for-dwscript-showcase/) - I'm considering setting up a DWScript showcase webpage. If you're using DWScript and want to be on that page, please mail the following to "eric at delphitools.info": short description of how DWScript is used screenshot of the application where it's used website or product link Usage cases don't have to be fancy, or pretty, industrial [...] - [Function pointers, direct method implementation now in DWScript](https://www.delphitools.info/2011/04/04/function-pointers-direct-method-implementation-now-in-dwscript/) - The googlecode SVN version of DWS introduces delegates capability: Function pointers are now supported in DWS, the syntax is similar to Delphi, though no distinction is made between standalone functions and methods, ie. as long as the parameter(s) and return types match, the following will work: type TMyFunc = function (i : Integer) : String; [...] - [Compile-time evaluations, '&' prefix, internal changes](https://www.delphitools.info/2011/11/17/compile-time-evaluations-prefix-internal-changes/) - Here is a summary of recent changes for DWScript in the SVN: support for compile-time evaluation of constant records and static arrays. support for the '&' escape prefix to allow using reserved words as identifiers. fledgling math extensions (TComplex, TVector & TMatrix), currently they are still incomplete, slow and experimental. added fledgling language doc in [...] - [Spotlight on dwsJSON](https://www.delphitools.info/2012/09/17/spotlight-on-dwsjson/) - dwsJSON is a unit that supports JSON parsing/creating, it's part of DWScript but relatively "standalone", in that if you add it in your Delphi (or FPC) projects, it won't pull the whole of DWScript library, and thus can be used anywhere you need. The JSON parser in dwsJSON generates an object tree based on TdwsJSONValue [...] - [DWScript showcase: Graphics32 interactive demo](https://www.delphitools.info/2013/05/31/dwscript-showcase-graphics32-interactive-demo/) - Graphics32 is a rich, high-performance 32bits graphics library for Delphi, with extensive capability. This showcase was submitted by Christian-W Budde, who is an active contributor to the Graphics32 project. This is an interactive demo/testing tool where you can write GR32 code and immediately see its output. This can help develop complex graphics from code. While writing [...] - [Delphi 64 beta update](https://www.delphitools.info/2011/04/27/delphi-64-beta-update/) - The Delphi 64 beta which used to be an April's fool, and a few days later turned out to incidentally be official after all, might finally begin next week. Answering a question by Tobias Giesen in the non-tech forum, Tim Del Chiaro (from Embarcadero Product Marketing) wrote: > I applied with XE serial, but haven't [...] - [Delphi for JavaScript](https://www.delphitools.info/2011/05/10/delphi-for-javascript/) - A while back, I posted of FireFox 4 JavaScript engine running around Delphi when it came to floating point performance on the Mandebrot set, since then, Chrome got updated to version 11, and further raised the bar by beating FireFox by about 20% in that benchmark. That's no mean feat: current generation JavaScript engines run [...] - [What do you use for String localization in Delphi?](https://www.delphitools.info/2012/02/15/what-do-you-use-for-string-localization-in-delphi/) - Delphi an an ITE for localization (of which I'm not a fan), we've been using something very similar to gnu gettext where I work (and I like it), what other String or screen localization tools have you been using and recommending? You can vote for multiple options, and suggest new ones in the comments! [...] - [Sideloading for Delphi on Windows 8?](https://www.delphitools.info/2012/08/27/sideloading-for-delphi-on-windows-8/) - Tim Anderson wrote about what Embarcadero are planning for Delphi and Windows 8 after meeting with Embarcadero's John Ray Thomas and Jason Vokes, I encourage you to go over and read his article about what they're planning, and his reservations. In short, since Delphi XE3 can't pass validation as a WinRT app and be fully [...] - [What would get you to buy a newer Delphi version?](https://www.delphitools.info/2013/04/26/what-would-get-you-to-buy-a-newer-delphi-version/) - This is a practical poll question, what would get you to buy a newer Delphi version? What would you like to see most and foremost, and would most have a use for? To force you to choose, you can only pick two items! [...] - [String concatenation redux](https://www.delphitools.info/2010/12/15/string-concatenation-redux/) - In addition to several fixes and improved error detection and messages (thanks Alexey Kasantsev), the DWScript SVN version now includes string concatenation improvement for the common "s := s + ..." case. Just for illustration, the execution times for the following test snippet for i:=1 to 5000000 do buf := buf + IntToStr(i); are right [...] - [Memory Manager Investigations](https://www.delphitools.info/2011/10/13/memory-manager-investigations/) - André Mussche on Google+ investigated the performance of several Memory Managers for Delphi, in single-threaded & multi-threaded situations, with detailed results and charts on performance and memory usage. Great work and interesting findings! A simple multi-threaded MM speed test (D2010, tested on Windows 7, Intel Quad core). More detailed benchmark results of several Delphi memory [...] - [Fixing TCriticalSection](https://www.delphitools.info/2011/11/30/fixing-tcriticalsection/) - TCriticalSection (along with TMonitor*) suffers from a severe design flaw in which entering/leaving different TCriticalSection instances can end up serializing your threads, and the whole can even end up performing worse than if your threads had been serialized. This is because it's a small, dynamically allocated object, so several TCriticalSection instances can end up in [...] - [DWScript pre-Apocalypse news](https://www.delphitools.info/2012/12/17/dwscript-pre-apocalypse-news/) - With the end of the world in a few days, it's time to flush the what's new log for DWScript. There are two major items that will be discussed in future posts: the JSON connector, which gives direct, JS-like access to JSON-based data objects the Gabelou, which aims to become to DWScripot what StyleCop is to [...] - [Re-rooting Object Pascal](https://www.delphitools.info/2012/10/03/re-rooting-object-pascal/) - A while ago I asked about the name of TObject ancestor, well, it's now live in the SVN and its name is 'Object'. Object is thus the new root class, above TObject. Eventually, it'll be the ancestor for every other type. JObject The earliest need for migrating to a rooted type system was to unify [...] - [DWScript first bits now available](https://www.delphitools.info/2010/08/24/dwscript-first-bits-now-available/) - They are released in the SVN source repository on google code, at http://code.google.com/p/dwscript/ The core compiler and some internal libraries are there, along with a few unit tests, but no demos just yet. It's compatible with Delphi 2009 (and 2010?) only at this point. Hopefully some demos will be added, ad interim, you'll have to [...] - [Lazy parameters, $IF, compound assignments](https://www.delphitools.info/2010/12/10/lazy-parameters-if-compound-assignments/) - Here is a highlight of recent changes on the SVN side of DWScript: lazy parameters have been introduced. $IF has been added to the conditional directives, alongside the Declared() and Defined() special functions. Compound assignment operators +=, -=, *= and /= are now supported. Preparations for operator overloading. lazy parameters Discussed recently, they're an extra [...] - [Generalized class-helpers/pseudo-objects?](https://www.delphitools.info/2010/12/23/generalized-class-helperspseudo-objects/) - I've been toying with the idea of generalized "pseudo-object syntax", which would essentially be a form of syntax sugar. It would allow passing the first parameter of a function call with the method syntax, f.i. i.IntToStr(); i.Inc( 2 ); would be understood as being just a syntaxical variation of IntToStr( i ); Inc(i, 2); Essentially, [...] - [What do you think of function overloads?](https://www.delphitools.info/2012/01/26/what-do-you-think-of-functions-overloads/) - In Delphi, you can overload functions, but doing so requires using the overload directive explicitly. The following code declares two functions with the same name, one that will be invoked if you pass an integer, another that will be invoked you pass a string: function MyFunc(a : Integer) : String; overload; function MyFunc(s : String) [...] - [Status of the DWS JavaScript CodeGen](https://www.delphitools.info/2011/09/12/status-of-the-dws-javascript-codegen/) - Here is a quick summary of the current status for the DWScript JavaScript CodeGen, aka OP4JS. JavaScript CodeGen for DWScript: what works, what doesn't Pretty much everything is working, including class methods (virtual or not), var & lazy parameters, records, arrays (dynamic and static), functions/method pointers/delegates, interfaces, operator overloading, etc. in short, the list of [...] - [Taming the Chrome Web Store](https://www.delphitools.info/2011/09/30/taming-the-chrome-web-store/) - Well, "taming" is probably too ambitious given the jungle that the Chrome Web Store is, especially as this post is restricted to publishing a standalone DWScript/JavaScript app into the Web Store in a few simple steps. Interestingly enough, it seems that publishing Metro apps for Windows 8 will follow a similar process, according to the [...] - [Hello WebGL source code](https://www.delphitools.info/2012/06/21/hello-webgl-source-code/) - With SmartMS v1.0.1 out you can now use WebGL! Download HelloWebGL.zip (51 kB), it contains the first demo (in .opp form and pre-compiled), as well as the initial WebGLScene units which you'll have to copy to your "Libraries" folder (the WebGL import units should have been delivered in v1.0.1). GLS.Vectors: contains vector manipulations types as [...] - [DWScript - October 2012 - 2.3 preview 2](https://www.delphitools.info/2012/10/31/dwscript-october-2012-2-3-preview-2/) - A new DWScript 2.3 preview 2 7zip (422 kB) is available for download for those that don't use the DWScript SVN. This version should be the last before a release candidate for 2.3. As the lead version is Delphi XE, users of Delphi 2009, 2010, XE2 and XE3 are especially encouraged to report any issues they [...] - [What's coming next...](https://www.delphitools.info/2011/11/08/whats-coming-next/) - There are several things planned and underway for the next DWScript version, this post will serve as a roadmap of sorts. Of course, there is a wealth of other changes (minor or not) that aren't mentioned there, but will likely happen. What's already happening IDE Dialog : thanks to Brian Frost. comes with a documentation. [...] - [Common Unit Tests for Delphi / FreePascal](https://www.delphitools.info/2012/09/06/common-unit-tests-for-delphi-freepascal/) - Serg recent wrote an introduction to unit testing under Lazarus, showing how everything is there, but just that little bit "off" because of different unit names between FPCUnit and DUnit. Not being a fan of ifdef, the prospect of having unit tests "uses" sections littered with ifdef did not attract me, so I made a [...] - [Don't abuse FreeAndNil anymore](https://www.delphitools.info/2010/02/06/dont-abuse-freeandnil-anymore/) - A recurring subject when it comes to freeing objects and preventing is whether you should just .Free them, thus leaving a invalid reference that should however never be used anymore when the code design is correct, or if you should defensively FreeAndNil() them, thus leaving a nil value that will hopefully trigger AVs more often [...] - [DWScript 2.2 preview 2: new debugger component](https://www.delphitools.info/2011/02/14/dwscript-2-2-preview-2-new-debugger-component/) - An SVN snapshot archive is now available as DWScript 2.2 preview 2 (218 kB). It includes the changes listed there, as well as the following: new TdwsDebugger component to facilitate debugging scripts. This is a helper that wraps common debugging task in a ready-to-use fashion for a debug IDE. supports managing breakpoints. supports watches (hierarchically [...] - [First look at XE2 floating point performance](https://www.delphitools.info/2011/09/02/first-look-at-xe2-floating-point-performance/) - With XE2 now officially out, it's time for a first look at Delphi XE2 compiler floating point performance (see previous episode). For a first look I'll reuse a Mandelbrot benchmark, based on this code Mandelbrot Set in HTML 5 Canvas. What it tests are double-precision floating-point basic operations (add, sub, mult) in a tight loop, [...] - [XE2 single-precision floating point (partial) disappointment...](https://www.delphitools.info/2011/09/05/xe2-single-precision-floating-point-disappointment/) - In the previous episode, it appeared that Delphi XE2 64bit compiler was achieving quite good results, however, after further investigations, things may not be so clear-cut. Transcendental maths, which will be food for a another post, the subject of this one seems to be an issue with single-precision floating point maths. edit: it appeared there is [...] - [Happy {$EXCESSPRECISION OFF}!](https://www.delphitools.info/2011/09/09/happy-excessprecision-off/) - Just a notice: I've updated the XE2 single-precision floating point article after using the (up to now) undocumented {$EXCESSPRECISION OFF} directive, thanks to Allen Bauer for chiming in! Executive summary: this directives enables use of single-precision SSE floating point instruction by the compiler, and brings their performance in line with expectations, making Delphi XE2 64bit [...] - [Delphi XE2-64bit: bottleneck in trigonometric functions?](https://www.delphitools.info/2011/09/22/delphi-xe2-64bit-bottleneck-in-trigonometric-functions/) - The 64bit introduced SSE2 maths, replacing the silicon-based implementations of the FPU by software. Taylor Series and Angle Reduction In Delphi XE2 64bit, SSE2 is used to compute the trigonometric functions (cos, sin, etc.), and they are computed through what looks like Taylor series (with double-precision literals being coded in hexadecimal, likely to minimize compiler [...] - [Mutant records: on methods (and helpers)](https://www.delphitools.info/2012/05/07/mutant-records-on-methods-and-helpers/) - When "record with methods" were introduced, an important feature was overlooked: mutability. This article discusses the problem, and introduces a possible syntax extension to solve it. Ideas & comments welcome! The Problem Effectively, "records with methods" treat all record "const" elements as "var", even when they shouldn't, and effectively ignores the compiler option "assignable constants". [...] - [Why no native WinRT support in Delphi XE3?](https://www.delphitools.info/2012/08/23/why-no-native-winrt-support-in-delphi-xe3/) - Allen Bauer spilled the beans in reply to a question by Brandon Staggs, and speaks about "Window's 8 dirty little secret". I've quoted his reply in full below (highlights are mine): We are very keen on supporting WinRT with native Delphi & C++ code. Right now, the issues surrounding the WinRT space center around the [...] - [Introducing "unit namespace"](https://www.delphitools.info/2012/11/27/introducing-unit-namespace/) - DWScript now has a new "unit namespace" feature, which aims at killing several birds with one stone: supporting "classic" namespace as found in Java or .Net supporting aggregate namespaces and conditional units supporting unit deprecation and splitting with backward-compatibility The syntax is as follow: unit namespace Foo.Bar; [deprecated 'deprecation message';] uses Foo.Bar.One, Foo.Bar.Two, WhateverUnit; and [...] - [What innocuous-looking unit tests can uncover...](https://www.delphitools.info/2011/08/17/what-innocuous-looking-unit-tests-can-uncover/) - I've recently been adding DWScript snippets to Rosetta Code, using them as unit tests as well. Quite a few of Rosetta Code's tasks consist in mathematical tasks, and I was wondering, how many math tests do you really need? Well, quite a few! While implementing the Lucas-Lehmer test, it ended up hitting the precision boundary [...] - [Knowing what and when to optimize...](https://www.delphitools.info/2009/04/20/knowing-what-and-when-to-optimize/) - ...is as important as knowing how to optimize. In this thread on the Delphi forums Ante Bonic brought back to intention this excellent Delphi Optimization Guide in Delphi article by Robert Lee. The article has aged a bit, but many tips remain true with the Delphi 2009 compiler (sadly so). Like many optimization articles, [...] - [begin...end as bottlenecks?](https://www.delphitools.info/2009/03/25/beginend-as-bottlenecks/) - There will come a time when SamplingProfiler may report you that begin or end are your bottlenecks. This may sound a little surprising, but it's actually quite a common occurrence, and something that instrumenting profilers are not going to point out, so it might be worth a little explanation. This can be illustrated it with [...] - [Saving results & merging](https://www.delphitools.info/2009/03/09/saving-results-merging/) - SamplingProfiler run results can be saved to .spr files (Sampling Profiler Results) and later reused for comparison purposes, or for merging, one of the less obvious features of the profiler. You can merge results by right-clicking on a results tab and selecting... "Merge results", oddly enough. After this, the samples will be aggregated across the [...] - [Fiddling with L-System (part 1)](https://www.delphitools.info/2012/08/06/fiddling-with-l-system-part-1/) - The class of grammar-based fractals known as Lindenmayer system allows generating an interesting variety of geometrical and botanical visuals. To the right is a representation of a "Fractal Plant", which is generated from just two simple (if cryptic-looking) rules applied recursively. In simple terms, L-System starts from a string (called an axiom), to which rules [...] - [DWScript happenings](https://www.delphitools.info/2013/04/01/dwscript-happenings/) - This is a belated news update, with only the highlights: Language News combined property/fields declaration is now supported (same syntax as Oxygene) dynamic arrays now support a Remove method, which has the same syntax as IndexOf, and can be used to remove elements by value for var xxx in array syntax is now supported, which [...] - [GLScene source code used in FireMonkey?](https://www.delphitools.info/2011/09/05/glscene-source-code-used-in-firemonkey/) - Dan Bartlett spotted some GLScene source code in FireMonkey, see this thread in the Embarcadero forum for details, parts of the VectorGeometry.pas, Spline.pas and raycasting code have been identified. The code having been incorporated in closed-source code (KSDev's, Delphi XE2) it hadn't been spotted or reported so far (at least to my knowledge). edit: snippet [...] - [A look at the 3D side of FireMonkey](https://www.delphitools.info/2011/10/06/a-look-at-the-3d-side-of-firemonkey/) - This post was actually written sometime ago, alas XE2 Update 1 didn't change much. I've been looking at FireMonkey 3D side, by that I mean strictly the 3D side, not the UI components, or the 2D. Here are some observations, most born from maintaining and developing 3D software in C++ and later with GLScene, and [...] - [FireMonkey's TCube & Tessellation](https://www.delphitools.info/2011/10/17/firemonkeys-tcube-tessellation/) - If any of you had a look at FireMonkey's TCube object, you might have noticed rendering it is quite slow and quite complex. If you were curious enough to look at the code, you might have noticed that TCube is actually a static mesh made up of 452 vertices, 1440 indices and 480 triangles, instead of [...] - [Delphi XE2 VCL Styles and 3D](https://www.delphitools.info/2011/10/24/delphi-xe2-vcl-styles-and-3d/) - ...or when the old/new VCL mule shows it can still kick! I was asked how hard it would be to do yet-another-Cover Flow-clone with VCL+GLScene, and how that would stand vs using FireMonkey on Windows. GLFlow : VCL + OpenGL The new Delphi XE2 Styles allow to get a nice looking UI, allowing to mix [...] - [Rendering semi-transparent objects in FireMonkey](https://www.delphitools.info/2011/11/04/rendering-semi-transparent-objects-in-firemonkey/) - The question has (predictably) popped up several times now, so here is a recapitulative post with workaround. FireMonkey (as of now) doesn't support rendering semi-transparent objects in 3D. FireMonkey only supports blending of semi-transparent objects (either through the Opacity property or because of their texture, for instance a semi-transparent PNG image), but blending alone is [...] - [SamplingProfiler 1.7.0 still hot from the compiler](https://www.delphitools.info/2009/04/15/samplingprofiler-170-still-hot-from-the-compiler/) - SamplingProfiler v1.7.0 is now available, you can get the zip and release details from its changelog page. As announced last week, the changes are a fix for a bug that could drastically affect the execution speed of the profiled application when relying on MAP files for debug information, if you were hit by this bug, [...] - [Delphi "Meteors" running Web-side](https://www.delphitools.info/2012/04/24/delphi-meteors-running-web-side/) - Amongst the samples included with Delphi, you can find a "Meteors" clone. With SmartMobileStudio approaching the next beta milestone, I gave it a run at compiling old Delphi code, VCL, TCanvas-based, that was never intended to run Web-side... but now does! Click here or the image below to test it! The controls are the same [...] - [Closures in DWScript / OP4JS](https://www.delphitools.info/2012/01/21/closures-in-dwscript-op4js/) - Closures, also known as "anonymous methods" in Delphi, are now supported by DWScript for the JavaScript CodeGen, with the same syntax as in Delphi: myObject.MyEvent := procedure (Sender : TObject); begin ... end; There are of course some extensions that go beyond what Delphi supports ;-) You are allowed to use a named local procedure [...] - [Small is Beautiful](https://www.delphitools.info/2012/02/06/small-is-beautiful/) - Small JavaScript that is. Or how to go from 350 kB down to just... 25 kB 23 kB. Smaller JavaScript can help in up to three ways: faster download: faster application installation or startup. faster parsing for the browser: faster startup. smaller identifiers: faster execution for non-JITting JavaScript engines. And smaller also means you can have far [...] - ["Live" IDE scripting for DWScript](https://www.delphitools.info/2012/03/02/live-ide-scripting-for-dwscript/) - DWS compiler and execution engine are reaching very nice maturity levels, meaning they can be used to compile & execute code interactively, for instance to edit a web page, which mixes HTML, CSS, server-side dynamic Object Pascal content generation and client-side Object-Pascal scripted content. The minimalistic Test app used in the video is less than [...] - [Pascal open-source projects trending... Up!](https://www.delphitools.info/2012/11/07/pascal-open-source-projects-trending-up/) - At least according to ohloh, when measuring commits to open-source projects, the graph is below: Food for thought for Marco Cantù, the new Delphi Product Manager? The percentage figures are back in the 2004 range, and the trend after going downhill for years, reversed to shows 3+ years of growth. When looking in details though, [...] - [BASM? Yes we can!](https://www.delphitools.info/2010/11/18/basm-yes-we-can/) - BASM may not be in the Delphi 64 preview, but a proof of concept of "BASM-for-DWS" is now available for DWScript in the SVN! It builds upon recently introduced "language extensions", to allow "asm" blocks, which will be pre-parsed (to allow BASM-like references to local variables), and then fed to NASM for actual assembling (which [...] - [The limitations of Delphi's "inline"](https://www.delphitools.info/2011/02/08/the-limitations-of-delphis-inline/) - Sometimes, the most simple-looking code can cause the Delphi compiler to stumble. I bumped on such a case recently, and simplified it to a bare-bones version that still exhibits the issue: type TFloatRec = record private Field : Double; public function RecGet : Double; inline; end; TMyClass = class private FRec : TFloatRec; public function [...] - [Kudos to the Firefox 4 TraceMonkey team!](https://www.delphitools.info/2011/03/24/kudos-to-the-firefox-4-tracemonkey-team/) - I've been quite impressed with the JavaScript floating point performance in FireFox 4, which puts the Delphi compiler to shame. See for yourself this fractal rendering demo: Mandelbrot Set in HTML 5 Canvas I've made a version of the same code in Delphi XE (source + pre-compiled executable, 331 kB ZIP), and on my machine [...] - [Good Practices for JavaScript "asm" sections in DWS/OP4JS](https://www.delphitools.info/2012/01/16/good-practices-for-javascript-asm-sections-in-dwsop4js/) - The compiler supports writing "asm" aka JavaScript section in the middle of Object Pascal, there are a few good practices as well as tips to keep in mind, let's review the menu: Name conflicts and obfuscation support Do you really need an "asm" section? Don't rely on implicit parameters structure Handling callbacks with "Variant" methods [...] - [How familiar are you with code profiling?](https://www.delphitools.info/2009/03/30/how-familiar-are-you-with-code-profiling/) - SamplingProfiler was initially released in the Delphi ASM newsgroup, and I'm curious about the audience of this website, so I've setup a small poll. How familiar are you with code profiling and/or Delphi code optimization? Can you tell apart instrumenting and sampling profilers merely by their respective heisenbugs, or is that profiler business sounding like [...] - [Control sampling from your code](https://www.delphitools.info/2009/03/02/control-sampling-from-your-code/) - One issue when trying to profile a "live" application is that you may be getting a lot of noise, resulting from a particular library or section of code being executed from multiple contexts. You may also be after profiling only one particular case, and want some reproducibility between runs... in short: you want a finer [...] - [Profiling multi-threaded applications](https://www.delphitools.info/2009/05/27/profiling-multi-threaded-applications/) - SamplingProfiler has a few options to help profile a multi-threaded application which I'll go over here. In the current version, those options allow identifying CPU-related bottlenecks, as in "threads taking too much CPU resources or execution time". However, they do not provide much clues yet to pinpoint bottlenecks arising from thread synchronization issues or serialization [...] - [Gaining Visual Basic OLE super-powers](https://www.delphitools.info/2013/04/30/gaining-visual-basic-ole-super-powers/) - Visual Basic in its various incarnations and off-springs has super-powers when it comes to OLE Automation, aka late-bound COM through IDispatch. Where do they come from? Super Powers? For instance, when doing MS Word OLE automation, you can in VBS and VBA write things like WordApp.Documents[1].Name which in Delphi (and many others) has to be [...] - [Publishing pictures from an HTML5 app](https://www.delphitools.info/2013/03/15/publishing-pictures-from-an-html5-app/) - This is a belated followup to the L-System Fiddle series from last year (more like a forgotten article), which ended with a Pascal-based HTML5 app being used to generate fractals and publish them to imgur. Why imgur? Well because they have a well-documented API and they don't require registration, authentication or other personal data for uploads, [...] - [Smart Contest 2013 – Round #2](https://www.delphitools.info/2013/05/06/smart-contest-2013-round-2/) - The second Smart Context 2013 has been announced! As with the previous round, first prize is a tablet device of your own choice (up to USD 750). This time the theme is "Game Development" The rules are as follows: Registration before the 13th of May (registration at contest@smartmobilestudio.com) Deliver your contribution before 3rd of June [...] - [Fiddling with L-System (part 2)](https://www.delphitools.info/2012/08/13/fiddling-with-l-system-part-2/) - Part 1 left us with a large cryptic looking string (a recursively applied grammar applied to an axiom, for the purists). In part 2 we'll go from that big string to a visual representation, by making use of that string as a set of commands for a turtle language. Turtle graphics came to fame in [...] - [DWScript September 2012 news: FreePascal, RTTI and lambda syntax](https://www.delphitools.info/2012/09/10/dwscript-september-2012-news-freepascal-rtti-and-lambda-syntax/) - Here is the news summary for September 2012, top new items are initial FreePascal support and introduction of lambdas syntax. Minor language improvements Hexadecimal literals prefixed with '0X' (zero x/X) are now supported. Binary literals prefixed with '0B' (zero b/B) are now supported. Added ClassParent to TObject. Methods can now be marked as "empty", the [...] - [Debugging PhoneGap/Cordova apps on the Desktop](https://www.delphitools.info/2012/09/11/debugging-phonegapcordova-apps-on-the-desktop/) - If you've tried building PhoneGap/Cordova apps, be it in Object Pascal via Smart Mobile Studio or directly in JS, you'll quickly have realized that debugging on the devices, even with remote debuggers and emulators, isn't always convenient. Being able to debug in a desktop browser would be so much more convenient, eh? The most commonly [...] - [Desktop HTML5 apps game changer? node-webkit](https://www.delphitools.info/2012/12/13/desktop-html5-apps-game-changer-node-webkit/) - Recently stumbled upon node-webkit, an open-source from Intel Open Source Technology Center, which is deliciously "simple": combine a standalone webkit (Chromium) build and node.js into a runtime. Webkit/Chromium brings a high-performance HTML5 environment with JavaScript JITting compiler, WebGL, Audio, hardware accelerated Canvas, camera access, etc. Node.js brings high-performance access to the local machine resources, so that [...] - [Thirteen features of DWScript](https://www.delphitools.info/2012/12/31/thirteen-features-of-dwscript/) - After having survived the Mayan apocalypse and just before the year ends, and the US economy falls from the fiscal cliff into the pit of recession, here is a quick look at thirteen features of DWScript, so you don't come into 2013 unaware :) 1. Supercharged memory management ARC is trendy, but introduces cycles and [...] - [FieldByName, or why a Profiler is your friend](https://www.delphitools.info/2010/11/30/fieldbyname-or-why-a-profiler-is-your-friend/) - I recently bumped on a post by François on FieldByName performance, and was bit surprised by the magnitude of speedups reported by Marco Cantu in a comment: " I keep fixing similar code I see my clients use, and in some case the performance can increase 5 to 10 times, for large loops. Good you [...] - [Spotlight on DWS's IDebugger](https://www.delphitools.info/2010/12/03/spotlight-on-dwss-idebugger/) - DWScript includes a debugging facility, in the form of the IDebugger interface. The TdwsSimpleDebugger component implements that interface and can be used to simply surface the events. Debugger interface You activate a debugger by merely attaching it to a compiled script (a TdswProgram), you'll then get notified of debugging events. Note that the events will [...] - [SynEdit performance bragging rights?](https://www.delphitools.info/2011/12/29/synedit-performance-bragging-rights/) - Committed another round of speedups in the SynEdit SVN, and AFAICT SynEdit is now amongst the fastest text and highlighting editors out there! To benchmark it yourself, if you don't have a large text file hanging around, you can make a "meaningful" one easily. Go to Delphi's source\rtl\win directory and enter the following command-line: type [...] - [Getting Rid of the Middleman](https://www.delphitools.info/2012/03/28/getting-rid-of-the-middleman/) - On this StackOverflow question David Heffernan asked about a hack I'm using in DWScript's UnifyAssignString. TStringListCracker The code of the function looks like: procedure UnifyAssignString(const fromStr : UnicodeString; var toStr : UnicodeString); var i : Integer; sl : TUnifierStringList; begin if fromStr = '' then toStr := '' else begin i := Ord(fromStr[1]) and High(vCharStrings); [...] - [OptimalCode - "Delphi Optimization Guidelines"](https://www.delphitools.info/2012/04/26/optimalcode-delphi-optimization-guidelines/) - If you recognize the title of this article by Robert Lee, then chances are you've been around Delphi for a while! :-) Alas the optimalcode.com website and Robert Lee disappeared years ago without a trace, but the "Delphi Optimization Guidelines" (dating back from 2002-3003) has been safeguarded and preserved. Recently someone pointed to me that [...] - [Introducing TRefCountedObject](https://www.delphitools.info/2012/07/09/introducing-trefcountedobject/) - DWScript source code recently introduced a newcomer: TRefCountedObject. This base class takes the place of TObject in dwsUtils, and is now present throughout the DWScript code. What it adds is, well, a manually reference-counted class. If you're not interested in the DWScript internals, you just need to know it allowed to achieve a 5% to [...] - [Delphi array constructors performance (or lack of)](https://www.delphitools.info/2013/02/18/delphi-array-constructors-performance-or-lack-of/) - In Delphi you can initialize a dynamic array in two ways, either manually or via the Create magic constructor type TIntegerArray = array of Integer; procedure Test; var a : TIntegerArray; begin // magic constructor a := TIntegerArray.Create(1, 2); // manual creation SetLength(a, 2); a[0] := 1; a[1] := 2; end; The outcome in both [...] - [Code Optimization: Go For the Jugular ](https://www.delphitools.info/2009/05/06/code-optimization-go-for-the-jugular/) - Code optimization can sometimes be experienced as a lengthy process, with disruptive effects on code readability and maintainability. For effective optimization, it is crucial to focus efforts on areas where minimal work and minimal changes will have to most impact, ie. go for the jugular The Prey I will illustrate this using SamplingProfiler in a [...] - [Time-stepping for Games and Simulations](https://www.delphitools.info/2013/10/18/time-stepping-for-games-and-simulations/) - The built-in time-stepping support for the upcoming release of SmartMS got an overhaul in the form of a now frame-rate oriented Game View component, and a simulation-oriented TMetronome time-stepper. This article quickly discusses the theory, changes, and gives an introduction for use in games and simulations. Time-Stepping in Simulated Worlds Time stepping in simulated worlds [...] - [MapFileStats v1.3 update](https://www.delphitools.info/2013/10/24/mapfilestats-v1-3-update/) - My small MapFileStats utility has been updated to 1.3 (last public release was four years ago...). The utility provides simple statistics about compiled size, to help you figure out what went into your executable. This version add as few minor features and improves detection of project file, which could result in missing DFM size. Previously, [...] - [SmartMobile Studio Free for educational purposes](https://www.delphitools.info/2013/10/01/smartmobile-studio-free-for-educational-purposes/) - As posted on Google+, Smart Mobile Studio is now free for educational purposes. The Pascal Programming for Schools website had already been updated sometime ago with samples and tutorials about getting started with Smart, and is a significant online resource for teaching Pascal in general, not just Smart. Below is the announcement with details on [...] - [Crouching Smileys, Hidden Diacritics](https://www.delphitools.info/2013/10/11/crouching-smileys-hidden-diacritics/) - As noted in a recent post, Unicode is not so straightforward. Namely claims of utf-16 being simpler than utf-8, or that you do not have to care about Unicode complexities. Maybe that was the case ten years ago, but The Unicode jungle is much closer to home these days. Here are a few dangers lurking [...] - [Mobile performance - a look back](https://www.delphitools.info/2013/07/18/mobile-performance-a-look-back/) - How fast are mobile CPUs these days? Well, they are pretty fast processors. While some still consider that x86 is ten times faster than ARM, that is just not the case anymore these days, the difference is much smaller, and closer to just two times if you compare a regular smartphone to a regular laptop/desktop. [...] - [Moving to new host(s)](https://www.delphitools.info/2013/10/09/moving-to-new-hosts/) - This is just a quick notice to let you know that I've recently moved this site to a new host (currently pulseheberg), and may move it to other hosts. My previous hosting was running out, and I'm taking this as an opportunity to experiment with various VPS offerings (Linux or Windows), change registrar, tweak DNS, etc. [...] - [UTF-8, UTF-16 or both? (poll)](https://www.delphitools.info/2013/10/08/utf-8-utf-16-or-both-poll/) - The FreePascal version of DWScript has been stalled for a little while on the incomplete UnicodeString (utf-16) support among other things. It's hard to blame the FreePascal team for that, given that Linux is primarily utf-8, and that utf-8 has quite a few advantages over utf-16. utf-16 is an historical quirk Summarily, utf-16 was designed [...] - [Pascal for Work - Poll results](https://www.delphitools.info/2013/09/30/pascal-for-work-poll-results/) - I've closed the mini-pool, below are the results, obtained after 500 respondents, as well as some other stats not obviously evident from the poll results (as it was a multi-choice poll).* They're of course only relevant as the measurement to the audience of this site. Outcome 500 respondents doesn't seem much, but the percentages didn't [...] - [DWS WebServer Guide - part 1 - Getting Started](https://www.delphitools.info/2013/08/21/dws-webserver-guide-part-1-getting-started/) - A pre-compiled server executable is available from google code (1008 kB), built from current trunk version. edit 2013-08-30: the zip has now been replaced by a proper installer Below is a quick start guide to playing with that server, I hope to later find time for more complete guide up to setting up a complete "production [...] - [Updated DWSWebServer precompiled binary](https://www.delphitools.info/2013/08/30/updated-dwswebserver-precompiled-binary/) - The DWS Web Server pre-compiled binary has been updated, it is now packaged in an InnoSetup installer, comes with SQLite 3.8.0.2 and other changes (see below). The installer is still rather simple, but includes command files for service installataion/uninstallation, link to online documentations and an uninstaller. The previous Getting Started guide still applies, but is [...] - [Using IOCP for Worker Threads ](https://www.delphitools.info/2013/09/03/using-iocp-for-worker-threads/) - Implementing an efficient worker thread pool in Windows can be achieved through the use of IOCP, which is the barbaric acronym for (just as barbaric) Input/Output Completion Port API introduced by Microsoft a while ago. To make use of IOCP, one has to deal with further barbaric API functions, but the principles are (somewhat) more civilized, [...] - [DWScript now supports Delphi XE5](https://www.delphitools.info/2013/09/16/dwscript-now-supports-delphi-xe5/) - DWScript SVN version will now compile and run under XE5. There is only one gotcha due to an XE5 regression. While running the DWScript test suite through XE 5 trial, and while most of DWScript ran okay under XE5, I noticed the following regression: integer divisions by zero aren't properly wrapped, instead of an EDivByZero, [...] - [Setting up a Windows 2008 for the metered cloud - part 1](https://www.delphitools.info/2013/09/09/setting-up-a-windows-2008-for-the-metered-cloud-part-1/) - In DWScript WebServer in the metered cloud, I mentioned setting up a light weight Windows 2008 r2 Virtual Private Server to serve as web server host. A parallel series of articles deals with the DWScript Web Server itself, and this is a mini-series about setting up Windows 2008 with minimal memory, CPU, storage and vulnerability surface. [...] - [Boosting Work Classes with a mini Object Pool](https://www.delphitools.info/2013/09/26/boosting-work-classes-with-a-mini-object-pool/) - Work and processing classes are typically short-lived, created to perform one form of processing or another then freed. They can be simple collections, handle I/O of one kind of another, perform computations, pattern matching, etc. When they're used for simple workloads, their short-lived temporary nature can sometimes become a performance problem. The typical code for [...] - [Which Pascal environments do you use for WORK?](https://www.delphitools.info/2013/09/27/which-pascal-environments-do-you-use-for-work/) - ...or at Work if your prefer. This is a small poll to gauge the audience of this site,, try to answer about the environments you use for production, not for experimenting, testing or fiddling. If you use several version, feel free to check as many entries as you feel are relevant. [...] - [Peer support forum](https://www.delphitools.info/2009/03/03/peer-support-forum/) - edit: forums have since been deprecated, use StackOverflow for questions. I've opened a forum for SamplingProfiler, destined for peer support and bug reports: https://delphitools.info/forums/ I don't have any previous experience with freeforums.org as a host, but I don't expect the traffic to be huge, so it'll probably be good enough. Forums are now hosted locally. [...] - [Website getting up to speed](https://www.delphitools.info/2009/03/17/website-getting-up-to-speed/) - I've reorganized the site a bit since the relocation, tweaked WordPress behind the scenes, added OpenID support for comments and hopefully sorted out the over-aggressive spam filter. The support forums are no longer available now also hosted here, no OpenID support for them just yet, but I'll enable it as soon as it's out of beta. [...] - [DWScript WebServer in the metered cloud](https://www.delphitools.info/2013/08/13/dwscript-webserver-in-the-metered-cloud/) - I've now been running the DWScript Sample Web Server for 8 months in a metered host (Ikoula's 1€/month VM), so it's time for a more formal introduction article. It served web pages and JSON dynamically generated by DWScript, using an SQLite database for storage. It ran on a Windows 2008 R2 Standard installation, minimized so [...] - [DWScript showcase: AquaSoft SlideShow](https://www.delphitools.info/2013/04/09/dwscript-showcase-aquasoft-slideshow/) - Answering the call for showcases, Steffen Binas prepared a very nice set of screenshots for AquaSoft's Slide Show impressive product, which went far beyond the minimal requirement, so I'm posting a full-blown article about it. Following is the presentation of their software and how DWScript is used inside it. When you need a powerful showcase I'd [...] - [Immutable strings... in Delphi?](https://www.delphitools.info/2013/05/13/immutable-strings-in-delphi/) - One of the "novelties" of the NextGen Delphi compiler is immutable strings, which I find quite puzzling, for lack of a better word, given that Delphi already had reference-counted copy-on-write strings, and the NextGen compiler uses reference-counted strings. I always considered that Delphi's String type was one of its remaining strong points, being a high-level [...] - [TMonitor vs TRTLCriticalSection](https://www.delphitools.info/2013/06/06/tmonitor-vs-trtlcriticalsection/) - In this new episode of the TMonitor saga is a comparison of its locking features vs TRTLCriticalSection, aka the OS-supported critical section mechanism. Is it fair? is it fast? Fairness means that if you have several threads attempting to lock the same resources, they'll all get a chance and none of them gets the lion's share. [...] - [New theme](https://www.delphitools.info/2013/07/17/new-theme/) - Time for a summer facelift! This website is getting new responsive theme which is more mobile-device friendly and will hopefully load slightly faster. Truth be told, I was also getting tired of seeing the old look here and in 618965 other blogs and websites. I've changed the theme from the aging inove (fixed) to a customized version [...] - [DWScript Just-In-Time compiler](https://www.delphitools.info/2013/06/21/dwscript-just-in-time-compiler/) - For a couple months now, a JIT compiler has been available in the DWScript SVN for 32bits code. The JIT is meant to be transparent, that is, execution, debugging facilities and memory layouts are similar under JIT and interpretation, the only difference is the performance. The JIT also uses a hybrid architecture, which was designed [...] - [LLVM for DWScript](https://www.delphitools.info/2013/05/17/llvm-for-dwscript/) - Very experimental support for LLVM in DWScript is now in the googlecode repository, thanks to the efforts of Christian-W Budde. This is the beginning of the opening of new realms of possibilities for DWS! LLVM support is currently centered around jit compilation, and at the moment doesn't extend much beyond the needs of the Mandelbrot [...] - [Performance issue in NextGen ARC model](https://www.delphitools.info/2013/05/30/performance-issue-in-nextgen-arc-model/) - Weak references and their zeroing is managed in Delphi NextGen through a global hash table, with a global lock, see Arnaud Bouchez take on it: Performance-issue-in-NextGen-ARC-model Also apart from the global locking which itself is bad enough, there are a couple further performance issues: If the locks are really through TMonitor, rather than through OS-supported [...] - [DWScript news roundup for June 2013](https://www.delphitools.info/2013/06/03/dwscript-news-roundup-for-june-2013/) - Here is a summary of recent changes, language highlights are initial support for sets and a new Sort() method for dynamic arrays. Apart form Linq & LLVM libraries which were previously mentioned, Brian Frost made multiple updates to the IDE Dialog. There were numerous other minor fixes and improvements, related to stability, performance and compatibility [...] - [DWScript Programming enters TIOBE](https://www.delphitools.info/2013/07/11/dwscript-programming-enters-tiobe/) - As a followup to the TIOBE & Pascal micro saga, thanks to David Champion, DWScript programming is now a (very) small part of the TIOBE TPCI stats, and Oxygene became its own language at position #163. Here is an excerpt from the TIOBE update for July 2013 An interesting discussion with David Champion resulted in [...] - [TIOBE isn't the only index that needs fixing](https://www.delphitools.info/2013/06/13/tiobe-isnt-the-only-index-that-needs-fixing/) - Worst thing in popularity is not being considered, or found. Looks like TIOBE is not alone in differentiating Delphi and Pascal, other popularity indexes share the same issue: http://www.langpop.com/ http://lang-index.sourceforge.net/ More indexes I looked at didn't show the "runners up", only the top 5 or top 10, but they may as well have differentiated. For lang-index, merging [...] - [String unification](https://www.delphitools.info/2013/06/17/string-unification/) - This article deals with reference-counted String theory, it doesn't relate to String Theory, unification of gravity with other quantum forces or canadian fashion. Instead it deals with leveraging reference-counted String data to unify them and minimize memory usage requirements. edit: as pointed in the comments, the usual terminology for that optimization is interning, which is a misnomer [...] - [Pascal app hits FireFox OS](https://www.delphitools.info/2013/06/22/pascal-app-hits-firefox-os/) - A couple days ago, a Pascal game compiled with SmartMobileStudio was accepted on the FireFox MarketPlace as a packaged app. It had only been tested on the FireFox OS desktop simulator, how would it hold its own on a real device? We're not talking of flagship phones with quad-cores like a Galaxy, a Nexus 4 or [...] - [DWScript news roundup July 2013](https://www.delphitools.info/2013/07/09/dwscript-news-roundup-july-2013/) - Here is a summary of DWScript changes since the last update. Language enhancement are centered around several additions for enumeration elements and sets, as well as a standard Map() method for arrays. The JIT compiler also got more capable, and there were various improvements to the support libraries and compatibility with older (D2009) and newer (DXE3) [...] - [DWS news + OP4JS aka SmartMobileStudio](https://www.delphitools.info/2011/12/23/dws-news-op4js-aka-smartmobilestudio/) - A quick news roundup before Christmas. OP4JS Alpha aka SmartMobileStudio is in the wild Jørn Einar Angeltveit - Dec 21, 2011 - Public We've now sent "Smart Mobile Studio" Alpha version to 50 testers. Did you miss the beta invite? Visit www.SmartMobileStudio.com to participate. SmartMobileStudio leverages DWScript's JavaScript CodeGen. My first test app with [...] - [DWScript to JavaScript](https://www.delphitools.info/2011/07/26/dwscript-to-javascript/) - Not exactly breaking news for those following the OP4JS news or the DWS SVN, but a new experimental set of classes is available for DWScript, which allows compiling DWScript source into JavaScript. This allows to have Pascal code like this one for instance, be compiled into this html page (or see the outcome in jsfiddle), [...] - [Fixed TIOBE index](https://www.delphitools.info/2013/06/12/fixed-tiobe-index/) - For some unfathomable reason, the TIOBE index distinguishes between "Pascal" and "Object Pascal", and the "Pascal" category is seeing growth: So it can't be the old classic procedural Pascal, can it? That leaves only Object Pascal dialects (FreePascal the largest, but also Oxygene and SmartPascal/DWScript). Pascal programming isn't dead or dying. I'm guessing they're getting [...] - [Property expressions and statements](https://www.delphitools.info/2013/02/14/property-expressions-and-statements/) - Object Pascal does allow binding a property to a field for direct read/writer, but we all have seen properties that required a slightly more complex getter or setter, and that usually meant a method for both. DWScript (svn trunk) & Smart Pascal (1.1) now support property expressions and statements, so the syntax is extended to [...] - [Not in (interpreted) Kansas anymore](https://www.delphitools.info/2013/04/24/not-in-interpreted-kansas-anymore/) - For a few weeks now, an experimental JIT compiler has been available in the DWScript SVN for 32bits code. A more detailed article into the hows and whats and WTFs will come later. Consider this article as an extended teaser, and a sort of call for test cases, benchmarks and eyeballs on the source code. [...] - [TMonitor woes](https://www.delphitools.info/2011/05/25/tmonitor-woes/) - Primoz Gabrijelcic recently reported a possible bug with TMonitor, in the more advanced side of TMonitor. However, when experimenting with it for DWS, I bumped on issues in the basic usage scenarios too, and reverted to using critical sections. It seems that as of Delphi XE, short of a patch, TMonitor is just a waste [...] - [Once upon a time in a thread...](https://www.delphitools.info/2011/05/26/once-upon-a-time-in-a-thread/) - Last episode in the TMonitor saga. In the previous episode, Chris Rolliston posted a more complete test case, for which he got surprising results (including that a Critical Section approach wouldn't scale with the thread count). Starting from his code I initially also got similar surprising results. edit: apparently the "crash" part of the TMonitor [...] - [A Fistful of TMonitors](https://www.delphitools.info/2011/05/31/a-fistful-of-tmonitors/) - ...or why you can't hide under the complexity carpet ;-) As uncovered in previous episodes, one of the keys behind TMonitor performance issues is that it allocates a dynamic block of memory for its locking purposes, and when those blocks end up allocated on the same CPU cache line, the two TMonitor on the same [...] - [Graphics competition, two days left to register!](https://www.delphitools.info/2013/02/08/graphics-competition-two-days-left-to-register/) - ..and maybe win first prize, which is the tablet of your choice? SmartContest 2013 Round #1 This is the first competition out of four this year. So this is your chance to win some exciting prices by showing off your Object Pascal skills! The topic of this round is: graphics programming (eg. demo-scene, fractal art, [...] - [SamplingProfiler 1.8.0](https://www.delphitools.info/2013/01/17/samplingprofiler-1-8-0/) - Version 1.8.0 of SamplingProfiler is now available. The options dialog now support Delphi XE2 & Delphi XE3 search/browse paths, other changes are only indirect fixes/improvements related to the components and libraries used in SamplingProfiler. [...] - [DWScript: objects memory model](https://www.delphitools.info/2011/03/21/dwscript-objects-memory-model/) - Objects memory management in Delphi Web Script is automatic, and you never have to worry about releasing objects in a script if you don't want to. However, there are elements of manual memory management in DWS which provide greater control, and allow to enforce correctness of object-lifetime. For instance, in DWS you can avoid the [...] - [DWScript for Delphi XE3](https://www.delphitools.info/2012/10/02/dwscript-for-delphi-xe3/) - DWScript (SVN version) should now compile under Delphi XE3, thanks to Steffen Binas for providing a workaround for a compiler bug (internal error URW1147). The workaround will alas reduce performance, for a proper fix, a futureXE3 update will be required,see QC #109187. While I'm at it, I might also raise awareness of another XE3 bug, [...] - [Poor EULA clause reverted?](https://www.delphitools.info/2012/08/30/poor-eula-clause-reverted/) - Unofficial information from David Champion https://forums.embarcadero.com/thread.jspa?threadID=76231 "In fact we do listen to our customers and make representations to our developer group in the USA. Subsequently the EULA changes you were worried about have been dropped altogether." From an Embarcadero employee in Europe. Let's see if it gets officially confirmed by an Embarcadero representative or a [...] - [Buffered Image for SmartMS](https://www.delphitools.info/2012/05/24/buffered-image-for-smartms/) - Here is a small class to facilitate working with off-screen dynamic images in Smart MS: w3BufferedImage.zip (1kb) It'll be in the next Smart update, but you can already use it, it was introduced as part of WarTrail, as a way to optimize graphic elements that are complex and don't change over several frames (text, tiled [...] - [2nd PGD Challenge Official Announcement](https://www.delphitools.info/2012/03/20/2nd-pgd-challenge-official-announcement/) - Planned dates are from March 30th to April 29th, below is an excerpt from the announcement, head over to the PGD Challenge page for more details: In a couple of weeks we are going to start the next PGD Challenge with a brand new theme. As promised it will be simple, yet fun for creating [...] - [DWScript JS Smart-linker (revised)](https://www.delphitools.info/2012/02/09/dwscript-js-smart-linker-revised/) - Not long ago, I wrote the DWScript JavaScript Smart-Linker did not eliminate unused virtual methods, well that limitation is now gone. A virtual method that is never called, in its base class nor any of its subclasses, will now be eliminated. In the small game Nickel Iron which was used as illustration, that further reduces [...] - ["heredoc" multi-line strings](https://www.delphitools.info/2012/02/24/heredoc-multi-line-strings/) - DWScript now supports multi-line strings, aka "heredoc", using the same syntax as Prism/Oxygene, which involves double-quoting them, for instance: s := "Lorem ipsum 'dolor' sit amet, consectetur adipiscing elit. Duis l'ipsum odio, pretium ""hendrerit"" varius sed, aliquet vitae elit. Sed eu libero nec nisl ""malesuada"" dignissim."; is equivalent to s := 'Lorem ipsum ''dolor'' sit [...] - [2nd PGD Challenge is coming](https://www.delphitools.info/2012/02/23/2nd-pgd-challenge-is-coming/) - WILL from Pascal Game Development has pre-announced the 2nd PGD Challenge! This "Mini Game" competition is a down-sized version of the previous challenges, you're free to use your favorite flavor of Pascal, and the goals are simple so even those with less free time should be able to participate. Below is a quote from the [...] - [Spotlight on TdwsSymbolDictionary](https://www.delphitools.info/2011/02/19/spotlight-on-tsymboldictionary/) - A useful, yet not very prominent class of DWScript is TdwsSymbolDictionary. It provides a reference of all symbols mentioned in your script, where they are declared, where they are used, etc. It is optionally filled up when you compile a script with the coSymbolDictionary compile option, and can be accessed from a compiler program object or [...] - [SOPA blackout day](https://www.delphitools.info/2012/01/18/sopa-blackout-day/) - Great SOPA blackout page from Wikipedia, being one the top worldwide site, this should generate more awareness than any other! I usually avoid posting non-technical stuff, let SOPA be the exception that confirms the rule! As for a description of the problems of SOPA, see: Electronic Frontier Foundation blog post on the problems with SOPA/PIPA [...] - [MapFileStats public release](https://www.delphitools.info/2009/03/12/mapfilestats-public-release/) - MapFileStats is a simple free utility to obtain executable binary size statistics derived from a ".map" file. Use it to know which units contribute the most to an executable's size, which DFMs are the largest, which units you have dependencies on but barely use in your executable, or merely to know exactly what gets into [...] - [OP4JS: "How do I..."](https://www.delphitools.info/2012/01/06/op4js-how-do-i/) - Jon Lennart Aasenden just posted on G+ several links to new "How do I" entries in the OP4JS Documentation: Working with controls, the boxing model Using the TW3HttpRequest object Add a new form to my application Create and use a timer object Rotate a control by X degrees Plot pixels on a off-screen bitmap You [...] - [DelphiTools.info relocated](https://www.delphitools.info/2012/01/04/delphitools-info-relocated/) - The DelphiTools.info website has just been relocated, it also transitioned from a Linux host to a Windows one. There were a few glitches with WordPress during the transfer, but they should hopefully have been solved, if not, feel free to post about them here! [...] - [Christmas present for SynEdit users](https://www.delphitools.info/2011/12/26/christmas-present-for-synedit-users/) - Just committed to the SynEdit SVN a few enhancements: much improved performance for long & large files, still not quite notepad++-class just yet, but my profiler tells me there are many juicy low-hanging candies left :-) improvements to the TSynGeneralSyn highlighter (single & double quote mode, token callback, and a few other niceties) DWScript syntax [...] - [Pimp your random numbers with XorShift!](https://www.delphitools.info/2011/12/13/pimp-your-random-numbers-with-xorshift/) - A 64bit XorShift is now used to generate random numbers in DWScript, and there is a now a separate random number generator per-execution, which is auto-randomized when an execution is created. Previously, the RTL random generator was used, this was "okay" when you had only one script using random numbers at a time, but multiple [...] - [DWS news roundup](https://www.delphitools.info/2011/12/03/dws-news-roundup/) - Here is a quick summary of recent additions to DWScript: exit, break and continue are now reserved keyword (and highlighted as such), previously they weren't (as in Delphi), but having variables or functions named that way just "breaks" (pun intended) those language features (as it does in Delphi) new TdwsRTTIEnvironment, fields and properties of a [...] - [Don't publish your .dproj/.groupproj](https://www.delphitools.info/2011/11/10/dont-publish-your-dproj-groupproj/) - Just a quick reminder to everyone publishing Delphi projects with source: Please don't publish your .dproj & .groupproj, only publish the .dpr & .dpk The reason? Those files include machine specific settings, such as paths, DCU/DCP/BPL/EXE output directories, along with your favorite debug & release options, which are likely different from that of your fellow [...] - [DWScript 2.2 RC1](https://www.delphitools.info/2011/10/26/dwscript-2-2-rc1/) - A 7zip for DWScript 2.2 RC1 (345 kB) has been posted, changes since the beta: improved unit tests coverage to 90% overall, core compiler units now above 93% packages separated into compile-time & design-time (thanks Stefan Glienke) fixed several issues related to dynamic arrays of function pointers (thanks Alexey Kasantsev) fixes to exposure of public [...] - [DWScript 2.2 beta](https://www.delphitools.info/2011/10/11/dwscript-2-2-beta/) - Delphi Web Script 2.2 is now in "beta", and a DWS 2.2 Beta zip (337 kb) is available. No new features are expected up to the next stage (RC), only improvements to unit tests, to reach the psychological 90% code coverage milestone. Changes since 2.2 preview 4: extended "for in" syntax to work on all array [...] - [DWScript compatible with XE2](https://www.delphitools.info/2011/09/01/dwscript-compatible-with-xe2/) - Get it from the Delphi Web Script SVN. Both Win 32 & 64 bit targets of Delphi XE2 are supported. MacOS target may or may not be (almost) supported at the moment, but since I don't have a Mac, I can't test nuthin'. [...] - [Interfaces, build system, try..except..finally](https://www.delphitools.info/2011/08/31/interface-build-system-try-except-finally/) - There has been two major additions to Delphi Script in the SVN. Interfaces You can now declare, implement and use pure-interfaces in DWScript. Same syntax as Delphi, minus the GUID All classes from TObject can directly implement interfaces (no need to implement IUnknown or derive from TInterfacedObject) interface properties are supported "is" can be used [...] - [Sampling profiler for DWS, units, other changes](https://www.delphitools.info/2011/08/19/sampling-profiler-for-dws-units-other-changes/) - Here is the periodic news roundup for DWScript from the SVN side: a new TdwsSamplingDebugger class is available, it's a debugger for Delphi Web Script whose purpose is to offer sample profiling information for script execution. experimental support for units, with classic pascal "unit", "interface" & "implementation" sections. experimental support for explicit "uses" import statements. [...] - [Dynamic arrays for DWScript](https://www.delphitools.info/2011/07/04/dynamic-arrays-for-dwscript/) - SVN version of DWScript adds a long-missing functionality in DWS: dynamic arrays. They provide a language-based alternative to the list and collections classes that had to be used so far. They extend the "new" keyword for instantiation, and introduce pseudo-method semantics in addition to the traditional semantics for Low(), High() and Length(). var a : [...] - ["new" keyword and "default" constructors](https://www.delphitools.info/2011/06/27/new-keyword-and-default-constructors/) - DWScript SVN version just introduced support for the "new" keyword and "default" constructors. The syntax is similar to that of Oxygene/Prism, you can now create a new instance with obj1 := new TSomeObject; obj2 := new TSomeOtherObject(param1, param2); By default, the above syntax will be duck-typed to the .Create constructor of a given class, but [...] - [Faster compiler, constant records, $include_once](https://www.delphitools.info/2011/06/20/faster-compiler-constant-records-include_once/) - Executive summary of recent DWS changes from the bleeding edge: Compiler/parser performance improved by about 15%. Added support for constant records declaration. The $include_once directive is now supported, it will include a file only if it hasn't been already included (be it by a previous $include_once or a regular $include). Fixed some issues with script-side [...] - [Delphi ChromiumEmbedded](https://www.delphitools.info/2011/05/12/delphi-chromiumembedded/) - The ChromiumEmbedded project just released r231 and DelphiChromiumEmbedded has been updated by Henri Gourvest almost immediately (!), and you can grab the code directly from the SVN. In this post 2 days ago, I was remarking that Chrome 11 was now even faster than FireFox4, well, it appears that further progress has been made in [...] - [SynEdit DWS Highlighter, Unicode Identifiers, Type refactorings](https://www.delphitools.info/2011/05/05/synedit-dws-highlighter-unicode-identifiers-type-refactorings/) - Here is a summary of recent changes for DWScript SVN-side: A syntax highlighter for SynEdit (Unicode version, available in SynEdit's SVN) is now available, it introduces support for DWSScript specific features (keywords, string delimiters...). It is essentially a fork of the Pascal syntax highlighter. Unicode identifiers are now supported, though as always with Unicode identifiers, [...] - [Delphi 64 open beta now available!](https://www.delphitools.info/2011/04/01/delphi-64-open-beta-now-available/) - In a bold (or unintentional?) move, a Delphi 64 beta has been released on the Embarcadero servers, there is no official announce yet, so hit the link below while it's still there, it may not last long! Delphi 64 (maybe open?) beta download ..alas this was just for april's fool... Let's hope the next announcement [...] - [Static classes, quote-delimited strings, final, hints/warnings](https://www.delphitools.info/2011/04/13/static-classes-quote-delimited-strings-final-hintswarnings/) - Here is a quick summary of recent changes SVN-side for DWScript: static classes are now in DWS, like the Prism/C# variant, they are classes which cannot be instantiated and can only have class methods or properties, but as DWScript supports the concept of meta-classes, unlike in Prism/C#, they can be virtual and sub-classed (unless you [...] - [DWScript 2.2 preview 3](https://www.delphitools.info/2011/04/08/dwscript-2-2-preview-3/) - A source archive file for DWS 2.2 preview 3 (231 kB) is now available. This is essentially just a zip file (7zip actually) for those not using the SVN. Changes since the last post are rather limited: built-in "QuotedStr" function now accepts a second quoteChar parameter. improved compiler robustness (keeps parsing and reporting more errors [...] - [Delphi 64 beta official after all](https://www.delphitools.info/2011/04/05/delphi-64-beta-official-after-all/) - Did the attention that my little April 1st post drew help set things in motion a little earlier than planned? It'll be denied, it wasn't seen, and it can't be proven, it's just that the slides and the video look a bit rushed, but anyway, on a just released Delphi 64 sneak preview page on [...] - [DWScript: Class const, more hints, RTTI...](https://www.delphitools.info/2011/03/16/dwscript-class-const-more-hints-rtti/) - Recent additions to the SVN for Delphi Web Script: class constants are now supported. compiler will now warn about simple cases of unreachable code. new hints available when coSymbolDictionary compile option is set: compiler will hint about declared, but unused variables. compiler will hint about unused Result pseudo-variable. SymbolsLib brought over from DWSII repository and [...] - [Temporary lull](https://www.delphitools.info/2011/03/06/temporary-lull/) - Website will be in a temporary lull as I'm now involved almost full-time in a brand new offline project of the milk-drinking variety, codename "Lucie" ;-) [...] - [DWScript news: classes, exceptions, speedups](https://www.delphitools.info/2011/02/02/dwscript-news-classes-exceptions-speedups/) - There have been quite a few changes, fixes and enhancements to DelphiWebScript, available in the SVN version: class visibility is now enforced: private and protected are equivalent to Delphi's strict private and strict protected. Other levels are public (members accessible to the whole script) and published (default visibility, to be used for external exposure, RPC, [...] - [SamplingProfiler 1.7.7 released](https://www.delphitools.info/2011/01/27/samplingprofiler-1-7-7-released/) - Version 1.7.7 of Sampling Profiler has been released, you can grab it here (642 kB), this version fixes the following issues: Fixed gathering of samples in Monte-Carlo multi-threading mode. Fixed crash when closing a results page with Ctrl+F4. No longer restores to maximized or minimized state. [...] - [Leaps and bounds of DWScript](https://www.delphitools.info/2011/01/19/leaps-and-bounds-of-dwscript/) - A DWS 2.2 preview zip (199 kB) has been posted, it is an SVN snapshot, and features recent additions to DWS: Contracts are now partially supported: ensure, require and old are available and use the same syntax as Prism contracts, inheritance is supported, class invariants are not in just yet, mostly for syntax indecision reasons, [...] - [Sampling Profiler for Delphi 1.7.6 available](https://www.delphitools.info/2011/01/17/sampling-profiler-for-delphi-1-7-6-available/) - You can now download SamplingProfiler 1.7.6 (642 kB), version highlights are: Fixed support for Windows 7. Cosmetic tweaks, and fixes to the filter functionality. Compiled with Delphi XE. Thanks goes to Dan Bartlett for the suggestion that led to the Win7 compatibility fix! [...] - [Threaded script execution](https://www.delphitools.info/2011/01/13/threaded-script-execution/) - The SVN trunk version of DWS now supports threaded script execution. Things went quite smoothly given that practically all classes got affected, yet all tests pass, including a special threaded torture test, so I'm reasonably confident ;-). The changes are however breaking backward compatibility, hopefully for the best. Here are the major changes that will [...] - [DWScript 2.1 branched](https://www.delphitools.info/2011/01/10/dwscript-2-1-branched/) - DWScript 2.1 RC2 has been promoted to stable 2.1.0 status, if you already have 2.1 RC2, you don't need to download anything new. If you use SVN, there is a now a "stable-2.1" branch which will see only fixes, evolutions and additions will now resume under "trunk". What can be expected for DWS 2.2? In [...] - [Delphi Web Script 2.1 now at RC2](https://www.delphitools.info/2011/01/06/delphi-web-script-2-1-now-at-rc2/) - Thanks to all those who reported issues with RC1! DWScript 2.1 RC2, available there (186 kB) or from DWScript SVN. fixed D2009 compatibility fixed passing of "const" open arrays fixed support of exceptions raised during optimization fixed memory leaks in one of the demos and in some cases of script errors component "uglicons" are now [...] - [DWScript RC1 now available](https://www.delphitools.info/2010/12/30/dwscript-rc1-now-available/) - Delphi Web Script 2.1 RC1 is now available from google code DWS page, you can also download it directly as a zip here (184kB). Changes since the last SVN update are: Added support for FreePascal-like compile-time $INCLUDE "macros": %FILE% and %LINE% insert the current filename and line number into the source %FUNCTION% inserts the current [...] - [iif... anonymous expression parameters?](https://www.delphitools.info/2010/11/29/iif-anonymous-expression-parameters/) - While making the rounds of "compiler magic" functions, I bumped on iif, the ternary operator, which f.i. Prism, VB and other support. Which looks like: function iif (boolean; expressionIfTrue; expressionIfFalse) : value; One part of the magic goes to the type-checking, the other part which interests me here, is that in a regular function call, [...] - [Goodies from the SVN side for DWScript](https://www.delphitools.info/2010/11/16/goodies-from-the-svn-side-for-dwscript/) - Here is a summary of the recent changes: support for step in the for loop structure (step value must be >=1, enforced at compile time for constants, at runtime for dynamic values). Note that step is only a contextual keyword, and not a reserved word (you can still have variables named "step" f.i.). for i [...] - [DWScript conditional compilation directives](https://www.delphitools.info/2010/11/09/dwscript-conditional-compilation-directives/) - Current SVN version of Delphi Web Script now supports the following directives (all new but include and filter): $I, $INCLUDE, $F, $FILTER: include specified file (which can be on disk or come through the virtual file system), the FILTER variants will include the file after filtering it. {$INCLUDE 'mysource.inc'} $DEFINE, $UNDEF: define and un-define a [...] - [All the Delphi arrays...](https://www.delphitools.info/2010/11/12/all-the-delphi-arrays/) - Delphi arrays have a few quirks (as mentionned here on TURBU f.i.), which arise from there being actually four different types arrays in Delphi, with limited interoperability: array [low..high] of TSomeType: the bounded array, a value type, useful for structures, fixed-size vectors & matrices, and also piggybacked by the constant arrays. array of TSomeType: the [...] - [Faster, smaller, safer](https://www.delphitools.info/2010/11/05/faster-smaller-safer/) - Here is a summary of recent changes for DWScript, available in the SVN version: faster: compilation is now about 30% faster in situations like that benchmark, thanks to a few bug fixes (typechecks were performed multiple times) and a couple tokenizer enhancements. smaller: reduced memory usage for compiled scripts (about 15% in the infamous benchmark, [...] - [DWScript preview 4](https://www.delphitools.info/2010/10/29/dwscript-preview-4/) - Last DWS preview zip was already a while back, so I posted a new preview zip of Delphi Web Script for the SVN-averse. For the changes since the previous zip, you may want to check here, here and here), as while you're at it, you may as well check the following: reactivated the COM Connector, [...] - [Optimizing for memory: a tighter TList](https://www.delphitools.info/2010/10/28/optimizing-for-memory-a-tighter-tlist/) - One of the memory hogs when you have object trees or graphs can be good old TList and its many variants (TObjectList, TList, etc.). This is especially an issue when you have thousandths of lists that typically hold very few items, or are empty. In the DWS expression tree f.i. there are quickly thousandths of [...] - [DWS weekly news](https://www.delphitools.info/2010/10/21/dws-weekly-news/) - Here is a quick summary of what changed in the SVN since the last update: array variables can now be initialized (with [] to enclose values), ie. the code below is now supported: var abc : array [1..3] of String = ['a', 'b', 'c']; abc := [ 'hello', 'world', '!']; dwsClassesLibModule now exposes a minimalistic [...] - [DWScript SVN: method keyword and other changes](https://www.delphitools.info/2010/10/14/dwscript-svn-method-keyword-and-other-changes/) - A quick update on recent changes in the SVN: introduced support for Prism-like 'method' keyword, which can be used as an alternative for 'procedure' and 'function' for class methods. procedure TMyClass.MyMethodWithNoResult; function TMyClass.ReturnsAString : String; can now alternatively be written as method TMyClass.MyMethodWithNoResult; method TMyClass.ReturnsAString : String; both forms are supported, though if you declared [...] - [Abstracted file system for DWS, and other news](https://www.delphitools.info/2010/10/08/abstracted-file-system-for-dws-and-other-news/) - The DWScript SVN version introduced a file system abstraction (via the dwsFileSystem unit). This is a both a security fix (restrict what scripts see and what the compiler can include) and an enhancement. You can f.i. run your scripts within a virtualized file system limited to a directory, a database, or whatever. At the moment [...] - [DWScript 2.1 preview 3 - now with type inference](https://www.delphitools.info/2010/09/30/dwscript-2-1-preview-3-now-with-type-inference/) - A DWS 2.1 preview 3 7z archive is available at googlecode Delphi Web Script page, you can also get the same code via SVN of course. This versions fixes several reported and unreported issues, and adds support for type inference and Delphi Prism variable initialization syntax. Before you could write code like: var myInteger : [...] - [DWScript extended language features](https://www.delphitools.info/2010/09/23/dwscript-extended-language-features/) - DWScript has supported several extensions to the Delphi language since the beginning. Here are a few you may wish the Delphi compiler supported too (and not just Delphi Prism...): generalized case of, which supports non-ordinal type, for instance you can write case myString of 'hello': PrintLn('Hello!'); 'goodbye': PrintLn('See you!'); end; variables can be declared in-line [...] - [Delphi Web Script preview 2](https://www.delphitools.info/2010/09/21/delphi-web-script-preview-2/) - A DWS 2.1 preview 2 7z archive is available at googlecode DWScript page, you can also get the same code via SVN of course. added support for the Delphi "Exit" syntax, which allows passing a return value as in Exit("my return value") TConfiguration renamed to TdwsConfiguration, some DFM persistence tweaks (less verbose by default, should [...] - [DWScript status update](https://www.delphitools.info/2010/09/04/dwscript-status-update/) - DWScript SVN repository has been fleshed out during the last days: there are now several samples, an half-decent collection of unit tests, and the "classes" library module which offers basic containers. code should be compatible with from Delphi 2009 to Delphi XE. some more optimizations got enabled. timeouts for script execution are now specified in [...] - [SamplingProfiler v1.7.5](https://www.delphitools.info/2010/09/02/samplingprofiler-v1-7-5/) - A new version has been released which adds support for the new Delphi XE paths, you can download it here. Note that there is still a pseudo-random issue of unknown origin under Windows 7, where the utility may or may not be able to gather profiling information. If that happens, close the application and launch [...] - [Informal DelphiWebScript performance tests](https://www.delphitools.info/2010/08/20/informal-delphiwebscript-performance-tests/) - I've made some informal performance tests on DWS vs PascalScript vs Delphi. The PascalScript version was downloaded yesterday, though when compiling, I got many warnings hinting its code hasn't been fully upgraded to Unicode and D2009, so maybe it wasn't the latest version? I'm not a user of PascalScript, so if anyone want to chime [...] - [DelphiWebScript Revival](https://www.delphitools.info/2010/08/19/delphiwebscript-revival/) - I'm planning a mini resurrection of former DelphiWebScript (by Matthias Ackermann) which has been dormant for a few years already. DWS is a 100% Delphi-based Delphi-language script engines, that supports a fairly large subset of the Delphi language (including objects), with a performance high enough for use in real-time scenarios (simulators, game engine scripting...). We've [...] - [Website mobile update](https://www.delphitools.info/2010/07/31/website-mobile-update/) - DelphiTools.info has been mobile-enabled thanks to WPtouch, it should now serve a version more friendly to Android-based devices, iPhone & others. The two Android apps hosted here have been updated with QR code links to the Android Market. [...] - [Aim foot, shoot!](https://www.delphitools.info/2010/07/24/aim-foot-shoot/) - Hot on the heels of Nick Hodges being suddenly "let go", Borcodero guys engaged in a bout of pathetic self-deprecating PR disaster. Apparently along with Nick, more than a Spirit of Delphi award winner may have left Embarcadero. [...] - [glInfo for Android](https://www.delphitools.info/2010/06/10/glinfo-for-android/) - Just published glInfo in the Android Market, this is a simple utility that provides information on the OpenGL ES driver of the device it's running on (version, supported extensions, limits...) and allows to copy or mail the whole report. Its purpose is to facilitate gathering device OpenGL ES support information, when the device you're targeting [...] - [SamplingProfiler v1.7.4](https://www.delphitools.info/2009/09/08/samplingprofiler-v1-7-4/) - SamplingProfiler v1.7.4 is now available. This version adds an option for Delphi 2010 paths, and fixes a bug with the silent mode execution that would render it inoperative. There also have been other minor changes, mostly cosmetic. This release also includes preparation for an "attach to process" option, which is currently not enabled, but should [...] - [ZJDBGPack 2.0 improved "batch-ability"](https://www.delphitools.info/2009/07/10/zjdbgpack-2-0-improved-batch-ability/) - An improved version of ZJDBGPack has been released, with better error messages and non-zero exit codes when an error occurs. This makes it more usable for batches and automated builds. [...] - [SamplingProfiler v1.7.3 bug fix](https://www.delphitools.info/2009/05/22/samplingprofiler-v173-bug-fix/) - SamplingProfiler v1.7.3 has now been released and should be used in place of 1.7.2 which was pulled. 1.7.2 had a nasty bug in the timings statistics (promptly spotted by Robert Houdart) which should be fixed in 1.7.3, there are no other changes and additions in this version. [...] - [SamplingProfiler v1.7.2](https://www.delphitools.info/2009/05/20/samplingprofiler-v172/) - SamplingProfiler v1.7.2 has now been released. This version includes the following changes: added an option to display line numbers in the source preview extended the process CPU affinity options to allow individually selecting up to 16 cores The UI has been slightly rearrange to accomodate the CPU affinity options (I guess I'll need to find [...] - [Printable versions of the articles](https://www.delphitools.info/2009/05/07/printable-versions-of-the-articles/) - There is something about WordPress that reminds me of Delphi, not the language or the IDE, but the spirit. On the one hand, its a convenient and comfortable environment out of the box, to which ready-made functionality can be easily added, and on the other hand everything under the hood is still accessible and tweakable [...] - [ZJDBGPack re-release](https://www.delphitools.info/2009/05/04/zjdbgpack-re-release/) - ZJDBGPack is again available, but as an independent download (it used to be bundled with SamplingProfiler). This is a command-line utility intended for use in a build process or from the Delphi tools menu, whose purpose is to integrate debug information into an executable. The debug information format is a compressed version of JCL's JDBG. [...] - [SamplingProfiler v1.7.1 bugfix release](https://www.delphitools.info/2009/04/16/samplingprofiler-v171-bugfix-release/) - SamplingProfiler v1.7.1 is now available, it fixes the crash in the paths dialog reported by Kazan in the forums. Incidentally this was due to a very old Delphi 5 bit of code that somehow survived Delphi 2009 at the compilation level, but bombed at runtime... I dropped the code and made use of the already [...] - [Host downtime and relocation](https://www.delphitools.info/2009/03/05/host-downtime-and-relocation/) - Previous host experienced downtime issues, so DelphiTools.info has been relocated on a new host. Not everything is back up in order just yet... Update: download, screenshots & links back online, but comments seem to be lost forever... Update 2: did some tweaking with the help of YSlow, site should be loading faster now. Update 3: [...] - [DelphiTools.info](https://www.delphitools.info/2009/02/26/delphitoolsinfo/) - http://DelphiTools.info/ shall be the url for this page for the foreseeable future, the one you can bookmark! When time allows, I'll post my other Delphi-oriented tools here, hence the name of the site. For now I've just added a few links, I'll be adding more and reworking the site pages as I get more familiar [...] - [A home for SamplingProfiler...](https://www.delphitools.info/2009/02/25/a-home-for-sampling-profiler/) - ...after having long been a ghost in the Borland attachments newsgroup, this is an attempt for a more permanent home for SamplingProfiler. Hopefully you'll find news and download links here. The current released version is 1.5.2 and available from Torry.ru. A version 1.6.0 is happening, at this point it's just a version compiled with D2009. [...] ## Pages - [DWScript](https://www.delphitools.info/dwscript/) - DelphiWebScript Project See blog, the documentation compendium, get source from BitBucket or GitHub, view code samples at Rosetta Code, ask questions on StackOverflow, report issues and suggestions. DWScript is an object-oriented Delphi scripting language for Delphi, despite its name, it is general purpose and not limited to websites. An extensive unit tests suite ensures high [...] - [SamplingProfiler Changelog](https://www.delphitools.info/downloads/samplingprofiler-changelog/) - SamplingProfiler is free, but if you find it useful in your work, you can show your support by donating and contribute in a small way to future versions! 26/11/2024 - SamplingProfiler 24.11.26 (4.2 MB) Support sampling statistics for code in ".inc" files Minor HDPI fixes 21/08/2023 - SamplingProfiler 23.8.21 (4.1 MB) UI support for Delphi [...] - [Sampling Profiler](https://www.delphitools.info/samplingprofiler/) - SamplingProfiler is a performance profiling tool for Delphi, from version 5 up to both 32bits & 64bit Delphi 12.x (and likely the next ones). Its purpose is to help locate bottlenecks, even in final, optimized code running at full-speed. Downloads and changelog News, Tips and posts about SamplingProfiler Online Mini-Guide - Support, Bugs &Suggestions Main options screen [...] - [Mentions Légales](https://www.delphitools.info/mentions-legales/) - 1. Présentation du site. En vertu de l'article 6 de la loi n° 2004-575 du 21 juin 2004 pour la confiance dans l'économie numérique, il est précisé aux utilisateurs du site http://www.delphitools.info/ l'identité des différents intervenants dans le cadre de sa réalisation et de son suivi : Propriétaire : Eric Grange – 1 Rue des [...] - [FocusFusion Changelog and Release History](https://www.delphitools.info/focusfusion-changelog-and-release-history/) - The FocusFusion changelog provides a detailed list of changes made to the focus stacking utility, including fixes, performance optimizations, and new features. - [FocusFusion - Focus stacking and merging](https://www.delphitools.info/focusfusion/) - FocusFusion is a Windows Application dedicated to focus stacking, aka focus merge. It combines multiple shallow depth of field images into a single in-focus one - [Privacy Policy](https://www.delphitools.info/privacy-policy/) - Privacy This privacy policy is intended to demonstrate our commitment to the individual's right to privacy and outlines our practices for handling personal data on this website. Our privacy practices reflect current global principles and standards on handling personal data. We process your personal data in order to be able to fulfil our agreement with [...] - [MapFileStats - Delphi MAP file statistics](https://www.delphitools.info/other-tools/mapfilestats/) - MapFileStats is a developer tool for Embarcadero Delphi that provides simple binary size statistics from .MAP files that can be generated during link phase. - [MapFileStats Changelog](https://www.delphitools.info/downloads/mapfilestats-changelog/) - 2023-01-27 - MapFileStats_setup-1.6.exe (3.6 MB) Support for HDPI Comes wrapped in an installer 2013-12-12 - MapFileStats-1.5 (863 kB) Auto-detect Delphi DCUs directory Don't scan .git/.svn/__history folders Prioritize DCUs from the EXE directory 2013-11-15 - MapFileStats-1.4 (858 kB) Now provides detailed size information (classes, functions...) Added visual bar charts Improved file scanner performance Misc. cosmetic changes [...] - [ZJDBGPack](https://www.delphitools.info/other-tools/zjdbgpack/) - ZJDBGPack is a command-line utility that inserts debugging information in ZJDBG format into Delphi executables. It is intended to be used as part of a build process, or be used from the Tools menu in the Delphi IDE. Downloads and changelog ZJDBGPack starts from a .MAP file, which is converted into JDBG format (JEDI Project's [...] - [DWScript Downloads](https://www.delphitools.info/dwscript/dwscript-downloads/) - Downloads links below are for historical versions, current versions are maintained at https://github.com/EricGrange/DWScript DWScript Sample WebServer Installer Version 2014.04.04 (1359 ko) Version 2014.03.05 (1335 ko) Older downloads Google Code Downloads [...] - [Nickel Iron](https://www.delphitools.info/android/nickel-iron/) - Use your missiles to blast away the incoming waves of asteroids. This is a fast-paced arcade game with classic, addictive gameplay. How to Play: touch or click where you want you missile fired, be sure to anticipate asteroids! at most 3 missiles can be in flight, one per active base destroying asteroids increases your "+" [...] - [Cookie Policy for DelphiTools.info](https://www.delphitools.info/cookie-policy-for-delphitools-info/) - What Are Cookies As is common practice with almost all professional websites this site uses cookies, which are tiny files that are downloaded to your computer, to improve your experience. This page describes what information they gather, how we use it and why we sometimes need to store these cookies. We will also share how [...] - [Cookie Policy](https://www.delphitools.info/cookie-policy/) - This site uses cookies - small text files that are placed on your machine to help the site provide a better user experience. In general, cookies are used to retain user preferences, store information for things like shopping carts, and provide anonymised tracking data to third party applications like Google Analytics. As a rule, cookies [...] - [HTML5](https://www.delphitools.info/html5/) - These are my HTML5 demos, applications and games. The more advanced ones are written in Pascal (DWScript flavor), and compiled to JavaScript using Smart Mobile Studio. Doing so allows leveraging the advantages of Pascal (strong typing, true class hierarchy, no-nonsense no-shoot-yourself-in-the-foot syntax) along with the advantages of HTML5 (run anywhere, at high performance). WarTrail: tower [...] - [DWScript at BitBucket](https://bitbucket.org/egrange/dwscript) - [...] - [Developer Tools](https://www.delphitools.info/other-tools/) - Tools for Delphi hosted on this website. For support, questions, discussion, bug reports, suggestions got to the Delphi Tools "community" in Google+. FlushFileCache A command-line utility to have Windows flush its file cache, and more, to free up some memory. MapFileStats Simple .map file statistics. See what's making your executable large. SamplingProfiler A sampling profiler for [...] - [Showcase](https://www.delphitools.info/dwscript/showcase/) - Under construction... [...] - [WarTrail](http://www.delphitools.info/WarTrail/index.html#new_tab) - [...] - [L-System Fiddle](http://www.delphitools.info/OP4JS/LSystemFiddle/index.html#new_tab) - [...] - [Eric Grange](https://www.delphitools.info/eric-grange/) - The author's first contact with Delphi was Delphi 2. Though he previously met various incarnations of Turbo Pascal before that, he more commonly used C/C++ or VB in the last century. You may know him from GLScene, an OpenGL project which he doesn't have much time for lately, but hopes to resume working on someday. [...] - [iOS](https://www.delphitools.info/ios/) - My iOS web-applications for iPhone/iPad, you can download them from their respective pages. Nickel-Iron Arcade game where you defend Earth from waves of asteroids. [...] - [Mini-Guide](http://delphitools.info/SamplingProfilerHelp/SamplingProfiler.html) - [...] - [Links](https://www.delphitools.info/links/) - A collection of useful links for Delphi developers, at least, links that I find useful! [...] - [Nickel Iron](http://delphitools.info/android/nickel-iron/) - [...] - [Nickel Iron](http://delphitools.info/android/nickel-iron/) - [...] - [glInfo for Android OpenGL info](https://www.delphitools.info/android/glinfo/) - Small developer utility that lists a device's OpenGL ES version information, supported extensions and display configurations. The report can be copy pasted or sent via mail from the menu, to help diagnose performance issues or provide OpenGL and EGL details about your device. 1.7 - enable Froyo (2.2) apps to SD 1.6 - added compressed [...] - [Overview](http://delphitools.info/dwscript) - [...] - [Tips & News](http://delphitools.info/tag/DWS/) - [...] - [Downloads](https://www.delphitools.info/downloads/) - MapFileStats Download latest version & see Changelog. SamplingProfiler Download latest version & see Changelog. ZJDBGPack Download latest version & see Changelog. [...] - [Départements Français](https://www.delphitools.info/android/departements-francais/) - Petite référence légère et hors-ligne sur les départements français, leur code, leur région et leur préfecture. Inclus différents mode de Quiz, pour apprendre et s'amuser, avec records et chronométrages. 1.7 - nouveau Quiz sur les préfectures, Quiz Régions corrigé (nb de questions) 1.6 - ajout carte de localisation [...] - [Android](https://www.delphitools.info/android/) - My Android applications, you can find and download them from the Android Market. glInfo OpenGL ES diagnostic information. Départements Français Quiz et réference sur les département français (french only). [...] - [ZJDBGPack Changelog](https://www.delphitools.info/downloads/zjdbgpack-changelog/) - 10/07/2009 - ZJDBGPack 2.0 (203 kB) Better error messages. Now returns non-zero exit codes on errors. 09/04/2009 - ZJDBGPack 1.9 (216 kB) Delphi 2009 compatible. [...] - [Changelog & Downloads](http://delphitools.info/downloads/samplingprofiler-changelog/) - [...] - [Tips & News](http://delphitools.info/tag/profiler/) - [...] - [Overview](http://delphitools.info/samplingprofiler/) - [...] ## Categories - [Uncategorized](https://www.delphitools.info/category/uncategorized/) - [News](https://www.delphitools.info/category/news/) - DelphiTools, SamplingProfiler and General Delphi News - [Tips](https://www.delphitools.info/category/tips/) - Tips, Hints and Documentation Posts for SamplingProfiler and other Delphi Tools - [Ideas](https://www.delphitools.info/category/ideas/) ## Tags - [Command](https://www.delphitools.info/tag/command/) - [IDE](https://www.delphitools.info/tag/ide/) - [Profiler](https://www.delphitools.info/tag/profiler/) - [Reproducibility](https://www.delphitools.info/tag/reproducibility/) - [Site](https://www.delphitools.info/tag/site/) - [Download](https://www.delphitools.info/tag/download/) - [Changelog](https://www.delphitools.info/tag/changelog/) - [Delphi](https://www.delphitools.info/tag/delphi/) - [Screenshots](https://www.delphitools.info/tag/screenshots/) - [Overview](https://www.delphitools.info/tag/overview/) - [MapFileStats](https://www.delphitools.info/tag/mapfilestats/) - [Poll](https://www.delphitools.info/tag/poll/) - [Monitor](https://www.delphitools.info/tag/monitor/) - [Newsgroup](https://www.delphitools.info/tag/newsgroup/) - [Borland](https://www.delphitools.info/tag/borland/) - [Torry](https://www.delphitools.info/tag/torry/) - [WordPress](https://www.delphitools.info/tag/wordpress/) - [Tools](https://www.delphitools.info/tag/tools/) - [Integration](https://www.delphitools.info/tag/integration/) - [Configuration](https://www.delphitools.info/tag/configuration/) - [EXENAME](https://www.delphitools.info/tag/exename/) - [threadID](https://www.delphitools.info/tag/threadid/) - [OutputDebugString](https://www.delphitools.info/tag/outputdebugstring/) - [Forums](https://www.delphitools.info/tag/forums/) - [CodeGear](https://www.delphitools.info/tag/codegear/) - [Newsgroups](https://www.delphitools.info/tag/newsgroups/) - [YSlow](https://www.delphitools.info/tag/yslow/) - [CPU](https://www.delphitools.info/tag/cpu/) - [XML](https://www.delphitools.info/tag/xml/) - [Analysis](https://www.delphitools.info/tag/analysis/) - [Bottleneck](https://www.delphitools.info/tag/bottleneck/) - [Accuracy](https://www.delphitools.info/tag/accuracy/) - [MAP](https://www.delphitools.info/tag/map/) - [Size](https://www.delphitools.info/tag/size/) - [Statistics](https://www.delphitools.info/tag/statistics/) - [OpenID](https://www.delphitools.info/tag/openid/) - [Pause](https://www.delphitools.info/tag/pause/) - [Stress](https://www.delphitools.info/tag/stress/) - [Breakpoint](https://www.delphitools.info/tag/breakpoint/) - [Stack](https://www.delphitools.info/tag/stack/) - [Bugfix](https://www.delphitools.info/tag/bugfix/) - [DLL](https://www.delphitools.info/tag/dll/) - [Optimization](https://www.delphitools.info/tag/optimization/) - [asm](https://www.delphitools.info/tag/asm/) - [AJAX](https://www.delphitools.info/tag/ajax/) - [Real-time](https://www.delphitools.info/tag/real-time/) - [Methodologies](https://www.delphitools.info/tag/methodologies/) - [Compiler](https://www.delphitools.info/tag/compiler/) - [Algorithms](https://www.delphitools.info/tag/algorithms/) - [ZJDBGPack](https://www.delphitools.info/tag/zjdbgpack/) - [JCL](https://www.delphitools.info/tag/jcl/) - [Debug](https://www.delphitools.info/tag/debug/) - [Affinity](https://www.delphitools.info/tag/affinity/) - [Monte-Carlo](https://www.delphitools.info/tag/monte-carlo/) - [Multithreading](https://www.delphitools.info/tag/multithreading/) - [Silent](https://www.delphitools.info/tag/silent/) - [GLScene](https://www.delphitools.info/tag/glscene/) - [OpenGL](https://www.delphitools.info/tag/opengl/) - [Android](https://www.delphitools.info/tag/android/) - [glInfo](https://www.delphitools.info/tag/glinfo/) - [Delphi Optimization](https://www.delphitools.info/tag/delphi-optimization/) - [const](https://www.delphitools.info/tag/const/) - [DWS](https://www.delphitools.info/tag/dws/) - [Delphi XE](https://www.delphitools.info/tag/delphi-xe/) - [Windows 7](https://www.delphitools.info/tag/windows-7/) - [RTTI](https://www.delphitools.info/tag/rtti/) - [Memory](https://www.delphitools.info/tag/memory/) - [basm](https://www.delphitools.info/tag/basm/) - [SynEdit](https://www.delphitools.info/tag/synedit/) - [refactoring](https://www.delphitools.info/tag/refactoring/) - [auditing](https://www.delphitools.info/tag/auditing/) - [JavaScript](https://www.delphitools.info/tag/javascript/) - [Templates](https://www.delphitools.info/tag/templates/) - [Generics](https://www.delphitools.info/tag/generics/) - [Scripting](https://www.delphitools.info/tag/scripting/) - [Unicode](https://www.delphitools.info/tag/unicode/) - [TMonitor](https://www.delphitools.info/tag/tmonitor/) - [MPL](https://www.delphitools.info/tag/mpl/) - [FireMonkey](https://www.delphitools.info/tag/firemonkey/) - [Canvas](https://www.delphitools.info/tag/canvas/) - [Chrome](https://www.delphitools.info/tag/chrome/) - [Memory Manager](https://www.delphitools.info/tag/memory-manager/) - [3D](https://www.delphitools.info/tag/3d/) - [IDEDialog](https://www.delphitools.info/tag/idedialog/) - [FreePascal](https://www.delphitools.info/tag/freepascal/) - [Roadmap](https://www.delphitools.info/tag/roadmap/) - [Sorting](https://www.delphitools.info/tag/sorting/) - [Transparency](https://www.delphitools.info/tag/transparency/) - [TCriticalSection](https://www.delphitools.info/tag/tcriticalsection/) - [XorShift](https://www.delphitools.info/tag/xorshift/) - [Random](https://www.delphitools.info/tag/random/) - [LCG](https://www.delphitools.info/tag/lcg/) - [Mersenne Twister](https://www.delphitools.info/tag/mersenne-twister/) - [String](https://www.delphitools.info/tag/string/) - [Zero-based](https://www.delphitools.info/tag/zero-based/) - [OP4JS](https://www.delphitools.info/tag/op4js/) - [SmartMobileStudi](https://www.delphitools.info/tag/smartmobilestudi/) - [SOPA](https://www.delphitools.info/tag/sopa/) - [overload](https://www.delphitools.info/tag/overload/) - [localization](https://www.delphitools.info/tag/localization/) - [PGD](https://www.delphitools.info/tag/pgd/) - [DWScript](https://www.delphitools.info/tag/dwscript/) - [Meteors](https://www.delphitools.info/tag/meteors/) - [OptimalCode](https://www.delphitools.info/tag/optimalcode/) - [Relics](https://www.delphitools.info/tag/relics/) - [helpers](https://www.delphitools.info/tag/helpers/) - [Records](https://www.delphitools.info/tag/records/) - [Methods](https://www.delphitools.info/tag/methods/) - [Mutability](https://www.delphitools.info/tag/mutability/) - [Immutable](https://www.delphitools.info/tag/immutable/) - [SmartMS](https://www.delphitools.info/tag/smartms/) - [graphics](https://www.delphitools.info/tag/graphics/) - [interface](https://www.delphitools.info/tag/interface/) - [Visual](https://www.delphitools.info/tag/visual/) - [Cryptography](https://www.delphitools.info/tag/cryptography/) - [Perceptual](https://www.delphitools.info/tag/perceptual/) - [L-System](https://www.delphitools.info/tag/l-system/) - [Fractals](https://www.delphitools.info/tag/fractals/) - [WinRT](https://www.delphitools.info/tag/winrt/) - [PhoneGap](https://www.delphitools.info/tag/phonegap/) - [Cordova](https://www.delphitools.info/tag/cordova/) - [Emulator](https://www.delphitools.info/tag/emulator/) - [EULA](https://www.delphitools.info/tag/eula/) - [Unit Testing](https://www.delphitools.info/tag/unit-testing/) - [JSON](https://www.delphitools.info/tag/json/) - [XE3](https://www.delphitools.info/tag/xe3/) - [protoype](https://www.delphitools.info/tag/protoype/) - [Style](https://www.delphitools.info/tag/style/) - [Gabelou](https://www.delphitools.info/tag/gabelou/) - [node-webkit](https://www.delphitools.info/tag/node-webkit/) - [node.js](https://www.delphitools.info/tag/node-js/) - [Language](https://www.delphitools.info/tag/language/) - [NameSpace](https://www.delphitools.info/tag/namespace/) - [De Morgan's Laws](https://www.delphitools.info/tag/de-morgans-laws/) - [Boolean Algebra](https://www.delphitools.info/tag/boolean-algebra/) - [Database](https://www.delphitools.info/tag/database/) - [mORMot](https://www.delphitools.info/tag/mormot/) - [UIB](https://www.delphitools.info/tag/uib/) - [WebServer](https://www.delphitools.info/tag/webserver/) - [Dynamic arrays](https://www.delphitools.info/tag/dynamic-arrays/) - [Initialization](https://www.delphitools.info/tag/initialization/) - [imgur](https://www.delphitools.info/tag/imgur/) - [REST](https://www.delphitools.info/tag/rest/) - [JIT](https://www.delphitools.info/tag/jit/) - [Showcase](https://www.delphitools.info/tag/showcase/) - [AquaSoft](https://www.delphitools.info/tag/aquasoft/) - [COM](https://www.delphitools.info/tag/com/) - [WMI](https://www.delphitools.info/tag/wmi/) - [Connector](https://www.delphitools.info/tag/connector/) - [OLE](https://www.delphitools.info/tag/ole/) - [Automation](https://www.delphitools.info/tag/automation/) - [Copy-On-Write](https://www.delphitools.info/tag/copy-on-write/) - [NextGen](https://www.delphitools.info/tag/nextgen/) - [LLVM](https://www.delphitools.info/tag/llvm/) - [GR32](https://www.delphitools.info/tag/gr32/) - [TIOBE](https://www.delphitools.info/tag/tiobe/) - [Pascal](https://www.delphitools.info/tag/pascal/) - [Oxygene](https://www.delphitools.info/tag/oxygene/) - [FireFox OS](https://www.delphitools.info/tag/firefox-os/) - [Performance](https://www.delphitools.info/tag/performance/) - [x86](https://www.delphitools.info/tag/x86/) - [ARM](https://www.delphitools.info/tag/arm/) - [Mobile](https://www.delphitools.info/tag/mobile/) - [GPU](https://www.delphitools.info/tag/gpu/) - [Cloud](https://www.delphitools.info/tag/cloud/) - [IOCP](https://www.delphitools.info/tag/iocp/) - [Windows 2008](https://www.delphitools.info/tag/windows-2008/) - [Server](https://www.delphitools.info/tag/server/) - [XE5](https://www.delphitools.info/tag/xe5/) - [HTML5](https://www.delphitools.info/tag/html5/) - [Schools](https://www.delphitools.info/tag/schools/) - [utf-8](https://www.delphitools.info/tag/utf-8/) - [utf-16](https://www.delphitools.info/tag/utf-16/) - [CloudFlare](https://www.delphitools.info/tag/cloudflare/) - [Simulation](https://www.delphitools.info/tag/simulation/) - [FastMM](https://www.delphitools.info/tag/fastmm/) - [Halloween](https://www.delphitools.info/tag/halloween/) - [Bat](https://www.delphitools.info/tag/bat/) - [CSS](https://www.delphitools.info/tag/css/) - [Möbieus](https://www.delphitools.info/tag/mobieus/) - [Moebius](https://www.delphitools.info/tag/moebius/) - [FlushFileCache](https://www.delphitools.info/tag/flushfilecache/) - [Mandelbrot](https://www.delphitools.info/tag/mandelbrot/) - [SSL](https://www.delphitools.info/tag/ssl/) - [Password](https://www.delphitools.info/tag/password/) - [Passphrase](https://www.delphitools.info/tag/passphrase/) - [Globals](https://www.delphitools.info/tag/globals/) - [VB](https://www.delphitools.info/tag/vb/) - [ohloh](https://www.delphitools.info/tag/ohloh/) - [reCAPTCHA](https://www.delphitools.info/tag/recaptcha/) - [captcha](https://www.delphitools.info/tag/captcha/) - [HTTP](https://www.delphitools.info/tag/http/) - [XE6](https://www.delphitools.info/tag/xe6/) - [CRC32](https://www.delphitools.info/tag/crc32/) - [Hash](https://www.delphitools.info/tag/hash/) - [Mustache](https://www.delphitools.info/tag/mustache/) - [Search](https://www.delphitools.info/tag/search/) - [Lookup](https://www.delphitools.info/tag/lookup/) - [IndexOf](https://www.delphitools.info/tag/indexof/) - [Sorted](https://www.delphitools.info/tag/sorted/) - [ARC](https://www.delphitools.info/tag/arc/) - [BitBucket](https://www.delphitools.info/tag/bitbucket/) - [GitHub](https://www.delphitools.info/tag/github/) - [Git](https://www.delphitools.info/tag/git/) - [SVN](https://www.delphitools.info/tag/svn/) - [Components](https://www.delphitools.info/tag/components/) - [Syntax](https://www.delphitools.info/tag/syntax/) - [Editor](https://www.delphitools.info/tag/editor/) - [Coalesce](https://www.delphitools.info/tag/coalesce/) - [beginend](https://www.delphitools.info/tag/beginend/) - [rss](https://www.delphitools.info/tag/rss/) - [translation](https://www.delphitools.info/tag/translation/) - [Tips](https://www.delphitools.info/tag/tips/) - [mod](https://www.delphitools.info/tag/mod/) - [Associative arrays](https://www.delphitools.info/tag/associative-arrays/) - [Dictionary](https://www.delphitools.info/tag/dictionary/) - [Thumbnails](https://www.delphitools.info/tag/thumbnails/) - [PhantomJS](https://www.delphitools.info/tag/phantomjs/) - [nonce](https://www.delphitools.info/tag/nonce/) - [Monkey](https://www.delphitools.info/tag/monkey/) - [Fuzz](https://www.delphitools.info/tag/fuzz/) - [Testing](https://www.delphitools.info/tag/testing/) - [TBCEditor](https://www.delphitools.info/tag/tbceditor/) - [SHA-3](https://www.delphitools.info/tag/sha-3/) - [Keccak](https://www.delphitools.info/tag/keccak/) - [MMX](https://www.delphitools.info/tag/mmx/) - [Tags: Hash](https://www.delphitools.info/tag/tags-hash/) - [BigInteger](https://www.delphitools.info/tag/biginteger/) - [GMP](https://www.delphitools.info/tag/gmp/) - [mpir](https://www.delphitools.info/tag/mpir/) - [Maths](https://www.delphitools.info/tag/maths/) - [SQLite](https://www.delphitools.info/tag/sqlite/) - [HTTPS](https://www.delphitools.info/tag/https/) - [Security](https://www.delphitools.info/tag/security/) - [Tokyo](https://www.delphitools.info/tag/tokyo/) - [64](https://www.delphitools.info/tag/64/) - [TWICImage](https://www.delphitools.info/tag/twicimage/) - [Neural Networks](https://www.delphitools.info/tag/neural-networks/) - [BLAS](https://www.delphitools.info/tag/blas/) - [JPEG](https://www.delphitools.info/tag/jpeg/) - [TurboJPEG](https://www.delphitools.info/tag/turbojpeg/) - [cefHtmlSnapshot](https://www.delphitools.info/tag/cefhtmlsnapshot/) - [CEF4Delphi](https://www.delphitools.info/tag/cef4delphi/) - [Battery](https://www.delphitools.info/tag/battery/) - [Delphi 11](https://www.delphitools.info/tag/delphi-11/) - [Code coverage](https://www.delphitools.info/tag/code-coverage/) - [DateTime](https://www.delphitools.info/tag/datetime/) - [ECMA6](https://www.delphitools.info/tag/ecma6/) - [FocusFusion](https://www.delphitools.info/tag/focusfusion/) - [SamplingProfiler](https://www.delphitools.info/tag/samplingprofiler/) - [Alexandria](https://www.delphitools.info/tag/alexandria/) - [clang](https://www.delphitools.info/tag/clang/) - [icx](https://www.delphitools.info/tag/icx/) - [gcc](https://www.delphitools.info/tag/gcc/) - [Godbolt](https://www.delphitools.info/tag/godbolt/) - [ChatGPT](https://www.delphitools.info/tag/chatgpt/) - [Delphi 12](https://www.delphitools.info/tag/delphi-12/) - [FMX](https://www.delphitools.info/tag/fmx/) - [Cloud Point](https://www.delphitools.info/tag/cloud-point/) - [FMXutils](https://www.delphitools.info/tag/fmxutils/) - [WebGPU](https://www.delphitools.info/tag/webgpu/) - [DX11](https://www.delphitools.info/tag/dx11/) - [principles](https://www.delphitools.info/tag/principles/) - [LLM](https://www.delphitools.info/tag/llm/) - [MCP](https://www.delphitools.info/tag/mcp/) - [Documentation](https://www.delphitools.info/tag/documentation/) - [Compendium](https://www.delphitools.info/tag/compendium/) ## Link Library Categories - [Websites](https://www.delphitools.info/?link_library_category=websites) - Delphi websites, resources, component archives - [Blogs](https://www.delphitools.info/?link_library_category=blogs) - Delphi related blogs - [News](https://www.delphitools.info/?link_library_category=news) - Delphi news sites - [Libraries](https://www.delphitools.info/?link_library_category=libraries) - Libraries for Delphi - [Utilities](https://www.delphitools.info/?link_library_category=utilities) - Useful tools for developers - [Articles](https://www.delphitools.info/?link_library_category=articles) - Articles about optimization & code-profiling - [Smart Pascal / Object Pascal for JavaScript](https://www.delphitools.info/?link_library_category=smart-pascal-object-pascal-for-javascript) - Smart Pascal / Object Pascal for JavaScript