Re: [racket] Sandboxed evaluation with 2htdp/image requires

2012-03-02 Thread Matthew Flatt
At Sun, 5 Feb 2012 10:35:47 -0700, Matthew Flatt wrote: > The decision of whether `racket/gui/base' is available is made through > `gui-available?'. That the check happens once at the top level of > `racket/sandbox', which unfortunately makes it sensitive to the order > of modules in the program th

Re: [racket] Sandboxed evaluation with 2htdp/image requires

2012-02-05 Thread Matthew Flatt
The `make-module-evaluator' function should attach an instance of `racket/gui/base' in its module's namespace to the newly created sandboxed namespace, but there is a problem... The decision of whether `racket/gui/base' is available is made through `gui-available?'. That the check happens once at

Re: [racket] Sandboxed evaluation with 2htdp/image requires

2012-02-05 Thread Nadeem Abdul Hamid
As a follow-up question, here is what I've been doing to load in student files, which may be either plain text files, or in the WXME format. (It used to work, but I guess not since the update to the GUI framework.) First, I use file->bytes to read in the bytes of their file. Then, given: data : b

[racket] Sandboxed evaluation with 2htdp/image requires

2012-02-05 Thread Nadeem Abdul Hamid
I'm having a problem with the error "cannot instantiate `racket/gui/base' a second time in the same process" in a script that I have to perform automated testing of student BSL programs. My script requires 2htdp/image for its own purposes and uses make-module-evaluator to create an evaluator for a