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 50 lines of code, and leverages DWScript, SynEdit, & ChromiumEmbedded.
And yes, you’re allowed to make mistakes, have infinite loops and other coding horrors. Not that you should ;-), but while entering code, they’ll most certainly happen.
9 thoughts on ““Live” IDE scripting for DWScript”
Impressive! Where can we download this test app?
This looks very good and powerful!
I haven’t had time to play with DWScript yet but plan to do so as I’m a user of PaxCompiler right now and I would like to compare both of them.
Currently Delphi/Pascal-only is keeping me busy enough, there are no plans for compiling other languages, though a CodeGen to other platforms than JS might be a possibility.
AFAICT PaxCompiler (and PascalScript) has a different goals, it supports multiple languages and compiles to machine code.
DWScript is more about executing Pascal source in a safe/sandboxed fashion, meaning that scripts are “allowed” to crash, to (try to) do ugly things, or to be terminated outright without warning by the host application, without threatening the stability (which is what makes the above demo possible). You can make the choice of breaking the sandboxing by exposing thin-wrappers around RTL functions or using RTTI, but the engine is designed to have the choice of staying sandboxed as well.
Thanks for your answer. Great job!
That looks very nice! Is the source available somewhere?
Does this mean we can look forward to seeing the other IDE features recently proposed by Bret Victor
by the end of the month? I am especially interested in the stuff demonstrated in the context of the binary search, 17 minutes in.
This is great! I’m wondering what issues the ‘mistakes’ this concept would take you on a 3D graphics journey. 🙂
Comments are closed.