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, so merely using SSE2 at the time was enough. But the Delphi 64bits compiler makes good use of SSE2, so the only way to edge it out would be to leverage AVX2 and vectorisation.
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 is not active/usable yet.
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 32 bit JIT.
Units to support the TurboJPEG library is now available in the DWScript repository, you can find the relevant files in the Libraries\GraphicsLib folder, they have been tested with Delphi 10.3 in both Win32 and Win64. The DLLs are those of the latest 2.05 version.
The TurboJPEG library (aka “libjpeg-turbo”) provides a fast implementation of the libjpeg API, but the files here target the TurboJPEG core, rather than the libjpeg compatibility layer (see its documention).
The TurboJPEG API is less rich, but quite simple to use and very convenient.
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 experiment with JIT compilation of neural networks maths with Delphi.
TensorFlow and Python are cool, but they feel a bit too much like Minecraft, another sandbox of ready-made blocks 😉
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).
This is going to be a work in progress over a few weeks, in part because the JS implementation is rather bare-bones with few support functions, and in part because with the BigInt type, the JS designers did away with some automated and implicit casting (uh?).
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 is asking for trouble.
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 version of DWScript and add a few missing features.
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.