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

SynEdit LogoJust 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 highlighter has been moved to the SynEdit SVN, the copy in the DWScript SVN will no longer be the primary reference

edit 27/12: committed another optimization, AFAICT, when working on large files, SynEdit is now faster than the Delphi IDE code editor and *way* faster than Scintilla/notepad++ 5.9.6.2 (with and without a syntax highlighter like DWS’s)

DWS news + OP4JS aka SmartMobileStudio

A quick news roundup before Christmas.
 

OP4JS Alpha aka SmartMobileStudio is in the wild

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 the alpha was a clock, check it in your iOS or Android Browser or in the Android market. Source is included in the alpha. Will be beautified it later on 🙂

I’ve been playing on another one, head over to YouTube to see a small video, you can also get the apk (47 kB), but beware it’s basic, ugly, and definitely early alpha, but it’s coded in Pascal!

Below is a snippet of the source code (using DWS inline implementations for illustration and compactness purposes, most of OP4JS is written in the more classic interface/implementation style), it’s a snip of the root class of the mini-engine of the game (yes, virtual methods are supported):

type
   TEntity = class
      X, Y : Float;

      function Progress : Boolean; virtual;
      begin
         // does nothing by default
      end;

      constructor Create(aX, aY : Float);
      begin
         X := aX;
         Y := aY;
      end;

      function Dist2(entity : TEntity) : Float;
      begin
         Result := Sqr(X-entity.X)+Sqr(Y-entity.Y);
      end;
   end;
 

Other recent changes to the DWScript SVN

  • Added sample/simple IndyWebServer demo, implements basic “pascal server pages” and demonstrates how to use DWS in a multi-threaded environment. Makes use of RTTI Environment class to expose WebRequest & WebResponse. Expect more details in a future post.
  • TTerminatorThread has been replaced by TGuardianThread, which can “guard” multiple executions
  • Dotted unit names are now supported
  • Random no longer uses the Delphi RTL but XorShift
  • unit name symbols are now included in the Symbol Dictionary
  • include references are now included in the Symbol Dictionary
  • TdwsSuggestions can now optionally suggest reserved words (begin, procedure, etc.)
  • fixes for Inc() & Dec() when operating on references with side-effects.
  • improved several error messages related to parameter passing.
  • other misc. fixes and optimizations, more unit tests.