[racket] simple sandboxing
Hi all,
I wanted to play with sandboxes(for the first time) and tried to write
down a simple program which reads a source file (.rkt) and evaluates it
in a sandbox.
#lang racket
(require racket/sandbox)
(define beginner-file-path
(string->path (string-append (path->string (current-directory))
"beginner.rkt")))
(sandbox-path-permissions
(list
(list 'read
(current-directory))))
(define beginner-evaluator
(make-evaluator 'lang/htdp-beginner
))
Sadly:
(beginner-evaluator beginner-file-path)
module: name is not defined, not a parameter, and not a primitive name
in: module
I remember that I read somewhere in docs the #lang $ is read by the
reader as (module *name* $ ...)
and that *name* is derived from the actual name of the file containing $.
Even if this is somehow related to my issue above, I don't know how to
solve it.
Any points? I feel like I'm missing the obvious again.
Thanks!
-- caner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <http://lists.racket-lang.org/users/archive/attachments/20110129/c85a302b/attachment.sig>