Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-12

Pascal Scripting Engines

10 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Brunner

Hi there,

I'm considering pascal scripting engines in stead of hot-swaped compiled stored objects/dlls for server back-end development for clients (namely WebSocket/JS). I came across a few relatively recent solutions and wanted to know if there are any obscure "light weight" scripting engines but yet leverage byte code. My largest problem would be security though. I would want to limit script engine access to OS level calls. I need to be able to "sandbox" these back-end apps so they don't interfere with the server process.

Any thoughts/recommendations? Thanks.

Jorge Aldo G. de F. Junior
to Andrew Brunner

I once wrote a script engine that generated bytecodes.

At the time it was harder due to defective variants support (something like that).

Now it would be easier.

2010/12/10 Andrew Brunner :

Show quoted text 17 lines
Hi there, I'm considering pascal scripting engines in stead of hot-swaped compiled stored objects/dlls for server back-end development for clients (namely WebSocket/JS).  I came across a few relatively recent solutions and wanted to know if there are any obscure "light weight" scripting engines but yet leverage byte code.  My largest problem would be security though.  I would want to limit script engine access to OS level calls.  I need to be able to "sandbox" these back-end apps so they don't interfere with the server process. Any thoughts/recommendations?  Thanks. _______________________________________________ fpc-pascal maillist  -   http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Andrew Brunner
to Jorge Aldo G. de F. Junior

I think FPC in general could benefit from a native FPC script. They have a link to a port of REM objects but the website said it was with flaws and tests were needed under linux.

A light-weight scripting engine would need to be restricted to methods and object code. And perhaps some level of access to the networking engine each script would be called from.

IMO, the scripting engine would either be completely thread safe or would have to have multiple instances one per thread.

Do you still have your code? I wonder if the FPC memory manager could handle such an engine running over and over again without losing memory.

On Fri, Dec 10, 2010 at 1:27 PM, Jorge Aldo G. de F. Junior <

Show quoted text 34 lines
wrote: I once wrote a script engine that generated bytecodes. At the time it was harder due to defective variants support (something like that). Now it would be easier. 2010/12/10 Andrew Brunner : > Hi there, > > I'm considering pascal scripting engines in stead of hot-swaped compiled > stored objects/dlls for server back-end development for clients (namely > WebSocket/JS). I came across a few relatively recent solutions and wanted > to know if there are any obscure "light weight" scripting engines but yet > leverage byte code. My largest problem would be security though. I would > want to limit script engine access to OS level calls. I need to be able to > "sandbox" these back-end apps so they don't interfere with the server > process. > > Any thoughts/recommendations? Thanks. > > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Lee Jenkins
to Andrew Brunner: I'm considering pascal scripting engines in stead of hot-swaped compiled stored…
Andrew Brunner wrote 12 lines
Hi there, I'm considering pascal scripting engines in stead of hot-swaped compiled stored objects/dlls for server back-end development for clients (namely WebSocket/JS). I came across a few relatively recent solutions and wanted to know if there are any obscure "light weight" scripting engines but yet leverage byte code. My largest problem would be security though. I would want to limit script engine access to OS level calls. I need to be able to "sandbox" these back-end apps so they don't interfere with the server process. Any thoughts/recommendations? Thanks.

RemObject's PascalScript and FastScript both work with FPC.

RemObject's is free to use IRRC.

Warm Regards, Lee
David Butler
to Andrew Brunner: I'm considering pascal scripting engines in stead of hot-swaped compiled stored…

A while back I wrote a scripting language based on Pascal that features byte code generation. I haven't worked on it in many years though.

http://www.eternallines.com/blaise/
<http://www.eternallines.com/blaise/>

Andrew Brunner wrote 17 lines
Hi there, I'm considering pascal scripting engines in stead of hot-swaped compiled stored objects/dlls for server back-end development for clients (namely WebSocket/JS). I came across a few relatively recent solutions and wanted to know if there are any obscure "light weight" scripting engines but yet leverage byte code. My largest problem would be security though. I would want to limit script engine access to OS level calls. I need to be able to "sandbox" these back-end apps so they don't interfere with the server process. Any thoughts/recommendations? Thanks. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Marcos Douglas
to Lee Jenkins: RemObject's PascalScript and FastScript both work with FPC. RemObject's is free to use…
Lee Jenkins wrote 19 lines
On 12/10/2010 2:18 PM, Andrew Brunner wrote: > > Hi there, > > I'm considering pascal scripting engines in stead of hot-swaped compiled stored > objects/dlls for server back-end development for clients (namely WebSocket/JS). > I came across a few relatively recent solutions and wanted to know if there are > any obscure "light weight" scripting engines but yet leverage byte code.  My > largest problem would be security though.  I would want to limit script engine > access to OS level calls.  I need to be able to "sandbox" these back-end apps so > they don't interfere with the server process. > > Any thoughts/recommendations?  Thanks. > RemObject's PascalScript and FastScript both work with FPC. RemObject's is free to use IRRC.

There is also the lysee language. See http://code.google.com/p/lysee/

"Lysee is a small, fast, reliable and cross platform script language. It can be embedded into Pascal programs as a critical mission controler, or to be embedded into HTML to develop active WEB sites."

Marcos Douglas

Sven Barth
to Andrew Brunner: I'm considering pascal scripting engines in stead of hot-swaped compiled stored…
Andrew Brunner wrote 12 lines
Hi there, I'm considering pascal scripting engines in stead of hot-swaped compiled stored objects/dlls for server back-end development for clients (namely WebSocket/JS). I came across a few relatively recent solutions and wanted to know if there are any obscure "light weight" scripting engines but yet leverage byte code. My largest problem would be security though. I would want to limit script engine access to OS level calls. I need to be able to "sandbox" these back-end apps so they don't interfere with the server process. Any thoughts/recommendations? Thanks.

Some time ago I have converted Delphi Web Script (see http://sourceforge.net/projects/dws/ ). Don't let the name fool you though. It's a normal scripting engine and I'm successfully running it on i386-win32, i386-linux and x86_64-linux. I've also tested a simple script on arm-wince.

But DWS hasn't been updated since quite some time and recently someone else has started a fork of it with focus on Delphi 2009+ compatibility. I'm currently trying to compile this new variant with FPC, but the author has decided to use many Delphi 2009+ features like extended records (luckily the author isn't using variant parts, so I can use objects), extended RTTI (although that is concentrated in one unit), generics (solveable with some ifdefs) and nested types (I'll have to test trunk here, because 2.4.2 has problems with Delphi's syntax).

A link to the author's blog is here: http://delphitools.info/dwscript/ I'd suggest you to read through his DWS related blog entries ( http://delphitools.info/tag/dws/ ) as they contain some interesting performance information as well - which might not be valid for the old DWS though.

Regards,
Sven

leledumbo
to Sven Barth

RemObjects' PascalScript for me. Definitely what I want. Small, bytecode compiled, cross-platform (to some limits due to the use of assembler), no built-in function (for your security needs), easy registration of functions and classes, has unit importer, and something you won't have in any other scripting language: it's STRONGLY AND STATICALLY TYPED!

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Pascal-Scripting-Engines-tp3300827p3303364.html Sent from the Free Pascal - General mailing list .
David Butler
to leledumbo

Blaise also offers strongly and statically typed variables. In fact, Blaise allows both statically and dynamically types variables.

leledumbo wrote 14 lines
RemObjects' PascalScript for me. Definitely what I want. Small, bytecode compiled, cross-platform (to some limits due to the use of assembler), no built-in function (for your security needs), easy registration of functions and classes, has unit importer, and something you won't have in any other scripting language: it's STRONGLY AND STATICALLY TYPED! -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Pascal-Scripting-Engines-tp3300827p3303364.html Sent from the Free Pascal - General mailing list . _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Benjamin Jan Alexander Rosseaux
to Andrew Brunner: I'm considering pascal scripting engines in stead of hot-swaped compiled stored…

You can also have a look to BESEN http://besen.sourceforge.net/ which is a full ECMAscript 5th Edition (a ka JavaScript) standard compliant scripting engine, which is developed by me. It has even a JIT for x86 & x64.

Andrew Brunner wrote 18 lines
Hi there, I'm considering pascal scripting engines in stead of hot-swaped compiled stored objects/dlls for server back-end development for clients (namely WebSocket/JS). I came across a few relatively recent solutions and wanted to know if there are any obscure "light weight" scripting engines but yet leverage byte code. My largest problem would be security though. I would want to limit script engine access to OS level calls. I need to be able to "sandbox" these back-end apps so they don't interfere with the server process. Any thoughts/recommendations? Thanks. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal