“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 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

  1. 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.

    Do you have any plans to add any other native languages (such as JavaScript) instead of Delphi/Pascal in a future version or, as the name implies, it will forever be a Delphi/Pascal script only ?

  2. @John
    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.

  3. Excellent work!

    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.


Comments are closed.