<div dir="ltr">Unfortunately the language I am using does not provide a #%top-interaction, so REPL like interactions won't work. All it provides is #%module-begin.<div>What I really want is to evaluate:</div><div><br></div>
<div>#lang planet dyoo/bf<br>SOME-PROGRAM</div><div><br></div><div>where SOME-PROGRAM is determined at runtime. I'm guessing sandboxed evaluators are not the way to go?<br><br>--Spencer</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Sep 26, 2013 at 10:11 PM, Eli Barzilay <span dir="ltr"><<a href="mailto:eli@barzilay.org" target="_blank">eli@barzilay.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">40 minutes ago, Spencer florence wrote:<br>
> How can I use make-evaluator with a planet package as a language?<br>
><br>
> If I were to do (make-evaluator '(planet dyoo/bf:1:8/language))<br>
><br>
> I get the error "#%require: not at top-level or in module body in:<br>
> (#%require (planet dyoo/bf:1:8/language))"<br>
<br>
</div>You should generally prefer `make-module-evaluator', which is similar<br>
to getting a DrRacket REPL in the context of a language rather than<br>
`make-evaluator' which is more like running a Racket REPL. Something<br>
like<br>
<br>
(make-module-evaluator '(module foo (planet dyoo/bf:1:8/language)))<br>
<br>
or<br>
<br>
(make-module-evaluator "#lang planet dyoo/bf:1:8/language")<br>
<br>
But I don't remember if it'll do what you want wrt getting strings and<br>
using a custom reader.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:<br>
<a href="http://barzilay.org/" target="_blank">http://barzilay.org/</a> Maze is Life!<br>
</font></span></blockquote></div><br></div>