Pascal Scripting Engines

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Pascal Scripting Engines

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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal Scripting Engines

Jorge Aldo G. de F. Junior
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 <[hidden email]>:

> 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  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal Scripting Engines

Andrew Brunner
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 <[hidden email]> 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 <[hidden email]>:
> 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  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal Scripting Engines

Lee Jenkins
In reply to this post by Andrew Brunner
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.


--
Warm Regards,

Lee

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal Scripting Engines

David Butler
In reply to this post by Andrew Brunner
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.



On 10 December 2010 21:18, Andrew Brunner <[hidden email]> 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.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal Scripting Engines

Marcos Douglas B. Santos
In reply to this post by Lee Jenkins
On Fri, Dec 10, 2010 at 5:23 PM, Lee Jenkins <[hidden email]> wrote:

>
> 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal Scripting Engines

Sven Barth-2
In reply to this post by Andrew Brunner
On 10.12.2010 20:18, 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.

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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal Scripting Engines

leledumbo
Administrator
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!
Reply | Threaded
Open this post in threaded view
|

Re: Pascal Scripting Engines

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

On 13 December 2010 18:16, leledumbo <[hidden email]> wrote:

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 archive at Nabble.com.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal Scripting Engines

Benjamin Jan Alexander Rosseaux-2
In reply to this post by Andrew Brunner

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.

Am 10.12.2010 20:18, schrieb 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  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal