On 27 November 2015 at 03:48, Robby Findler <ro...@eecs.northwestern.edu> wrote:
> DrRacket pulls some shenanigans with the language dialog-based
> teaching languages and it needs some adjust to make things work the
> way you want with printing in 'raco test' and 'racket'.

I fear I've seen that — but this goes beyond teaching languages. I've
opened a separate thread for that.

> Probably there
> isn't a simple path to that precise goal, but maybe there is a way to
> another goal?

> Is it the case that you're trying to get things set up so that output
> that you produce running inside the handin server is suitable to be
> presented to students so that you can tell them that their submission
> failed somehow?

Yeah. With the complication that I'm also running tests of my own. And
that we're perfectionist PhD students, so we're trying to have
checkers with the same quality as the other HtDP material, without
being Racket experts. Mid-semester.

> (In which case, I might just prefix the error message
> with "This is not exactly the error that you will see in DrRacket,
> where you'll get a clearer message. Please run your program there.")

Yeah, I'm afraid we'll have to do something like that. But then, I
also need to reimplement `!test` because of different requirements:
our checkers have tests that users don't have, and must pretty-print
results to report errso

Luckily, I can still copy more of it :-). Meanwhile, I've rediscovered
the libraries in the handin-server which try to do that. There's code
using mzlib/pconvert which gives me more hope, however legacy that
library is declared.

> My hope is to find time to get the #lang htdp/bsl (etc) languages up
> to stuff so that my advice would switch to "use #lang htdp/bsl and all
> will be fine" but I'm not there yet.

That'd be... cool! At least Racket-generated errors would be better.
Still, that doesn't help when implementing `!test` — unless I managed
to do (!eval `(print ,v)). Should try that.

Cheers,
Paolo

> On Thu, Nov 26, 2015 at 6:16 PM, Paolo Giarrusso <p.giarru...@gmail.com> 
> wrote:
>> 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.



-- 
Paolo G. Giarrusso - Ph.D. Student, Tübingen University
http://ps.informatik.uni-tuebingen.de/team/giarrusso/

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