Hi all!

How does the REPL print values? In some circumstances I see graph printing 
markers, even though `(print-graph)` is disabled. Because these are error 
messages for students using teaching languages, cycle printing is not an option.

messages.rkt> (print-graph)
#f
messages.rkt> (list (game-state p p p))
(list (game-state (posn 150 100) (posn 150 100) (posn 150 100)))
messages.rkt> (~v (list (game-state p p p)))
"(list (game-state #0=(posn 150 100) #0# #0#))"

Funnily, that doesn't happen in DrRacket, but it does happen both in 
racket-mode, in my actual production environment, and under raco test. In 
particular, test results in DrRacket are the ones I'd want, but are 
inconsistent with the ones everywhere else.

Apart from being frustrated at parameters, how do I gain control over this?

PS: I've just found that `global-port-print-handler` is customized by DrRacket. 
That seems incompatible with using `print` and relying on it producing certain 
results. I understand that's the point of `print`, but neither `write` nor 
`display` does what I want.

HTDP code itself uses `~e` (also in htdp/error), but finding the appropriate 
handler to install isn't trivial either; and that's not enough, because 
sometimes I need to show the source code we evaluated.

Sorry for how chaotic is this message — I guess that reflects my confusion at 
Racket printing. (I've taken some looks at the relevant documentation, but not 
at all of it).

Cheers,
Paolo

-- 
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