David Schwartz 427 Posted Friday at 10:09 PM I'm curious if anybody knows of any FOSS Delphi interpreters. TMS has had one for quite a while, and I worked with it on a project many years ago. But I think it's overkill for what I'm looking for. Besides, it's not FOSS. What I'm interested in is building a REST service that runs on a standard Linux host (eg., CentOS) and has a way of adding services by uploading a source file written in Delphi rather than having to upload compiled code. Delphi purists will say that's way too inefficient, but It's not like running interpreters on back-end servers is an unusual thing, since most such services are written in php, python, and even VB. Anyway, it doesn't need to "run fast", as long as you can easily spin-up multiple servers running the same code. I don't think it needs to support 100% of the latest Delphi language features, maybe just to D7 or even the version after D2010 with stable generics. As an aside, I cannot comprehend why Delphi has no support for Linux except for distros that conform to specific UI needs, when most people want to use Linux to run services, and most Linux hosting is all headless. There should be a way to build headless apps (ie, no UI parts) for common Linux distros in all Delphi versions. Share this post Link to post
Darian Miller 365 Posted Saturday at 04:14 AM This one has a long history: https://github.com/remobjects/pascalscript 1 Share this post Link to post
Darian Miller 365 Posted Saturday at 04:16 AM This is probably the better choice: https://www.delphitools.info/dwscript/ 3 Share this post Link to post
Anders Melander 1795 Posted Saturday at 06:22 AM (edited) I have used DWScript as a scripting system in several products. Used either to provide business rules (no UI, just logic) or as a app/plugin (with UI). The OP language support and performance is excellent. The learning curve is extremely high (no documentation, few examples). Here's an IDE/debugger I wrote for it: DWScriptStudio FWIW, https://www.beginend.net is powered by DWScript. Edited Saturday at 06:24 AM by Anders Melander 6 2 Share this post Link to post
David Schwartz 427 Posted Sunday at 05:08 AM (edited) 22 hours ago, Anders Melander said: I have used DWScript as a scripting system in several products. Used either to provide business rules (no UI, just logic) or as a app/plugin (with UI). The OP language support and performance is excellent. The learning curve is extremely high (no documentation, few examples). Here's an IDE/debugger I wrote for it: DWScriptStudio FWIW, https://www.beginend.net is powered by DWScript. Thanks for this. Is it useful without a run-time license for DevEx? if you use generic Delphi code that can be tested in Delphi then loaded somewhere to run under DWScript, can you get by without DevEx? Edited Sunday at 05:11 AM by David Schwartz Share this post Link to post
Anders Melander 1795 Posted Sunday at 08:39 AM 3 hours ago, David Schwartz said: Is it useful without a run-time license for DevEx? My debugger requires DevExpress but DWScript itself has no external dependencies. I chose to use DevExpress mainly because I wanted a docked layout and from prior experience I know that the VCL's docking suuuucks. It should be possible to replace it with something else, if one wanted to. I also have a DWScript RTL that uses DevExpress controls for the GUI stuff but you don't need to use my RTL; DWScript comes with its own non-UI RTL that covers the basic stuff. Actually, AFAIK, I'm the only one doing UI with DWScript. At least I haven't seen anyone else do it. 3 hours ago, David Schwartz said: if you use generic Delphi code that can be tested in Delphi then loaded somewhere to run under DWScript, can you get by without DevEx? Yes. Share this post Link to post
Bob Devine 11 Posted Monday at 12:00 AM On 11/29/2024 at 10:09 PM, David Schwartz said: There should be a way to build headless apps (ie, no UI parts) for common Linux distros in all Delphi versions You should try FPC for Linux servers. The absence of Linux in Delphi Pro or Community is one of the reasons I let my Delphi subscription recently lapse. It's not even so much the cost, but the lack of an open community means I've no idea how stable Delphi Linux is, so it's not worth the risk. FPC/Linux has been rock solid for the two years I've been using it (with mORMot). Share this post Link to post