Safe Languages :-)

Timothy S. Nelson wayland at smartchat.net.au
Fri Apr 2 07:41:02 CST 2004


On Fri, 2 Apr 2004, Scott Penrose wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Dudes,
> 
> I am writing a module in our Portal which allows the execution of code 
> from people we do not trust - students.
> 
> 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.
> 
> 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.
> 
> How would I go about providing a Safe environment for those languages. 
> I do not have the luxury of a separate machine, but I can run separate 
> processors.

	Hmm.  ...on what OS?  I did a search for "user mode linux", and came 
up with:
---------------------------------
Ever wish you had a place to let your Linux applications play -- where they 
wouldn't hurt anything else? Do your killer apps spend too much time killing 
each other? Originally conceived as a kernel developer's tool, UML lets you 
set up multiple virtual machines that are isolated from each other and from 
the hardware. Now, you can test applications all the way to failure without 
breaking the host system -- or even requiring a reboot. 
---------------------------------

> Ideally I would have some of the following:
> 
> 	* Perl - maybe just a tiny subset of perl
> 	* Logo - that would be ideal
> 	* C - Hmm... tricker, but don't need to support everything, just some 
> syntax
> 	* Java - As for C
> 	* Lips/Scheme - There is a Perl module for this isn't there?
> 	* Miranda ?
> 
> 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).
> 
> Ideas welcome :-)

	The way I see it, you've got two options:
1.	Find some kind of sandbox to put existing languages in
2.	Write (or find) languages with existing sandboxen

	If you're going the second route (which your comments imply you are), 
then there's also:

http://ajlogo.com/

	That's a Java version of Logo, which might fit the bill, at least in 
the short term.  

	:)


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: wayland at smartchat.net.au | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+ s:- a- C++>++++$ U++ P++ L++ E- W+++ N+ w>--- V- Y+>++ 
PGP->++ R !tv b++ DI++++ D+ G e++>++++ h! y-
-----END GEEK CODE BLOCK-----





More information about the Melbourne-pm mailing list