[plt-scheme] Can I create module on the fly?
On Jul 17, Gregory Woodhouse wrote:
> 
> On Jul 17, 2008, at 1:57 PM, Eli Barzilay wrote:
> 
> > In both cases you evaluate random code.
> 
> That's one reason why I had been thinking about writing an
> interpreter that would reasonably safe (kind of like the Java
> sandbox concept).  But then, that raises the question of whether I
> can leverage PLT Scheme instead of trying to interpret everything at
> runtime.
There are two options here -- if you want to just have a kind of a
remote procedure call facility, then what I posted earlier should be
the best fit -- you control the functions that are available
completely.  If you want a restricted evaluation, you can use `eval'
in a namespace that you construct carefully so that it doesn't have
any `dangerous' bindings in -- but that's not possible unless you
*really* restrict your language (eg, my signature).  A much better
solution is to just use the sandbox library:
  http://docs.plt-scheme.org/reference/Sandboxed_Evaluation.html
> The other reason i that I really enjoyed SICP when I read it a year
> or two ago and wanted to give PLAI a go.
Sure, you can write an interpreter, but that's a completely different
thing.
-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!