Safe Languages :-)
Simon Taylor
simon at unisolve.com.au
Sun Apr 4 18:43:58 CDT 2004
Hi Scott,
> I am writing a module in our Portal which allows the execution of code
> from people we do not trust - students.
Including my 14 year old son, who now has a MyInternet account at school and
whose code you must not trust under any circumstances ;-)
> The idea is to provide a module that allows languages to be programmed
> with very simple inputs and outputs.
>
> A simple example is - Enter some Logo Code and the output is a GIF.
Sounds very cool.
> I can use Safe (perldoc Safe) to do perl code with some level of
> safety, but what I am really looking for is better educational
> languages.
[snip]
> Anyway - Obviously what ever I choose they are mostly limited in that
> they are restricted to general programming with only a very basic input
> and output (at this stage a single line of input and plain text output
> - or generation of a graphic).
My 10c worth is that Safe is a clever package, and it (along with Opcode) will
let you construct an environment in which only a subset of perl is allowed.
It seems to me that building a mini-language out of an existing language
has to be easier than buiding one from scratch.
Having said that, you could always implement the kind of language you're
describing with Parse::RecDescent
A third option, what about parrot? I read last week that they now have a
working tcl interpreter implemented against the parrot machine. You could
target a new mini language like logo at parrot. Perhaps someone is already
doing this....
Regards,
Simon
--
Unisolve Pty Ltd - Melbourne, Australia
+61 3 9568 2005
More information about the Melbourne-pm
mailing list