On 10/05/2012 02:28 PM, Grant Rettke wrote:
Hi,

My goal is to use Scribble to document some code and evaluated code
using the Scribble eval environments, but I want to do "external
evaluation" for example against a R6RS Scheme and something totally
separate like Clojure for example.

Has anyone done this before?

What are some clues or pointers where I might start?

I guess you can make a sandbox evaluator that "evaluates" by sending terms to an external process and then reading the results. There are evaluation hooks provided by the racket/sandbox library; there's also the current-eval parameter, which also affects sandbox evaluation. I'm not sure which is better suited to what you want.

Another issue, though, is that you may wish to distribute your documentation sources for other people to build even if they don't have all of the external programs you want to call. I have a similar situation with the 'db' library. You can use 'make-log-based-eval' from 'unstable/sandbox' to record the interactions on your development machine and then check in the logs so that anyone can build the docs without the external dependencies. It probably won't compose cleanly with the other eval hooks you'll need to install, so you may have to adapt the code yourself. If you work out a clean way of composing it with your code, let me know.

Ryan

____________________
 Racket Users list:
 http://lists.racket-lang.org/users

Reply via email to