wanna_code_perl has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
For a personal "fun" project I've had rattling around for a long time: is there any way (or are there any existing projects) to implement a subset of Perl? More to the point, I'm thinking about an educational game for grade school kids to learn some basic programming concepts without, you know, BASIC. I don't need a super-secure hack-proof system--it's not that important. Mainly I just want to limit the students' ability to shoot themselves (and each other) in the foot, and also limit their access to cheat by taking liberties with namespaces and object innards. Off the top of my head, I'd want to eliminate or limit:
I realize I'll at the very least need a custom Perl installation, with many core modules removed, stubbed, or overridden. I imagine there are some compile flags that would help as well. Students would not have the ability to run their code directly; it would be saved in a web-based editor and run by a harness of my creation (so default pragmas, overrides, source filters, etc., can be taken care of). To limit the performance hit from the inevitable runaway loops (despite best efforts to detect and kill them), as well as provide a bit of partitioning, I'm thinking of just keeping several lightweight VMs running with finite resource limits, which would serve requests round-robin.
I'm sure I haven't thought of everything (and it certainly doesn't need to be perfect), but with any luck I'm closer to over-thinking this than under-thinking. Thoughts? Existing projects I haven't been able to find?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Subset of Perl language
by fglock (Vicar) on Jul 30, 2013 at 13:17 UTC | |
|
Re: Subset of Perl language
by jfroebe (Parson) on Jul 30, 2013 at 14:48 UTC | |
|
Re: Subset of Perl language
by AnomalousMonk (Archbishop) on Jul 30, 2013 at 16:43 UTC | |
by wanna_code_perl (Friar) on Jul 31, 2013 at 01:13 UTC | |
|
Re: Subset of Perl language
by daxim (Curate) on Jul 30, 2013 at 13:26 UTC | |
by wanna_code_perl (Friar) on Jul 31, 2013 at 01:18 UTC | |
|
Re: Subset of Perl language (Safe::World)
by Anonymous Monk on Jul 30, 2013 at 13:27 UTC |