On Feb 9, 2016, at 7:53 PM, Matthew Flatt <mfl...@cs.utah.edu> wrote:

> I think the main issue is that `htdp/bsl/runtime` changed the way it
> configures the printer. Instead of setting `current-print`, it sets
> `global-port-print-handler`. Meanwhile, `interaction` prints within the
> sandbox only if `current-print` is changed from its default value,
> which is `pretty-print-handler`. Since the default value is in place
> with the revised `htdp/bsl/runtime`, `global-port-print-handler` isn't
> used for rendering results.
> 
> You can work around that problem by replacing
> 
>   (me '(current-print pretty-print-handler))
> 
> with
> 
>   (me '(current-print (lambda (v) (unless (void? v) (print v)))))
> 
> 
> Meanwhile it seems that `htdp/bsl/runtime` was never configured to add
> a `make-` prefix for printing structure instances. To fix that, after
> 
>    (call-in-sandbox-context me (lambda () (namespace-require module-lang)))
> 
> add
> 
>    (me '(require mzlib/pconvert))
>    (me '(add-make-prefix-to-constructor #t))
> 


The first step was necessary. The second replacement did something weird. 
It printed all structures as (make-entry ...) or (make-phone-number ...)

Now I am suffering from a different problem. This link will take you to the
end of Exercise 68. Just below there is an interaction involving Tara Harper
and Shriram Fisler: 

  
http://www.ccs.neu.edu/home/matthias/HtDP2e/Draft/part_one.html#%28counter._%28exercise._struct3a%29%29

What parameter will restrict the width of the output now? Thanks -- Matthias

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to