[racket] scribble examples using student language printer

From: David Van Horn (dvanhorn at ccs.neu.edu)
Date: Tue Nov 9 22:00:36 EST 2010

On 11/7/10 6:58 AM, Matthew Flatt wrote:
> At Sun, 07 Nov 2010 01:51:29 -0400, David Van Horn wrote:
>> Is there a way to make scribble render the result of evaluating examples
>> as if the examples were run in a student language in DrRacket?
>
> In addition to initializing the namespace, you need to set
> printer-related parameters in the evaluator.
>
> We're in the process of putting all the relevant settings for student
> languages in one place. It's currently in `htdp/bsl/runtime' as
> parameterized over options for a specific student language, where each
> `htdp/Xsl/reader' provides the options for a given language. So, set up
> `the-eval' like this:
>
>   (call-in-sandbox-context
>    the-eval
>    (lambda () ((dynamic-require 'htdp/bsl/runtime 'configure)
>                (dynamic-require 'htdp/isl/lang/reader 'options))))

Thanks -- this worked for me.

A related question: is it possible to use `scriblib/gui-eval' to render 
student language examples that involve 2htdp/image values?

David


Posted on the users mailing list.