Re: [racket-users] Re: How to make DrRacket interactions window use the same reader as the definitions window?

2020-06-03 Thread Matthew Flatt
At Fri, 29 May 2020 09:25:58 -0700 (PDT), Thomas Dickerson wrote: > On Friday, May 29, 2020 at 11:29:38 AM UTC-4, Matthew Flatt wrote: > > DrRacket uses `pretty-print`, which will print numbers using > > `number->string`, and so (I think) won't go through your parameter. > > This sounds like a

Re: [racket-users] Re: How to make DrRacket interactions window use the same reader as the definitions window?

2020-05-29 Thread Thomas Dickerson
Jens - Interesting - does the default #%top-interaction behave differently from #%module-begin w.r.t. to a #lang's read? Right now my main.rkt is providing the standard #%module-begin, #%top-interaction, #%app, #%datum, and #%top, in addition to my language's functions + macros. Thanks! On Fri,

Re: [racket-users] Re: How to make DrRacket interactions window use the same reader as the definitions window?

2020-05-29 Thread Jens Axel S√łgaard
There may be other solutions, but one way to control the evaluation of expressions entered in the REPL is to provide an #%top-interaction, which sets the appropriate parameters. /Jens Axel -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To

Re: [racket-users] Re: How to make DrRacket interactions window use the same reader as the definitions window?

2020-05-29 Thread Thomas Dickerson
Quick follow-up: It looks like I may somehow be able to change DrRacket's printing and reading behavior on a per-language basis somehow using the classes here https://docs.racket-lang.org/tools/drracket_language.html?q=drracket%3Alanguage%3Asimple-settings-printing-style but the documentation

Re: [racket-users] Re: How to make DrRacket interactions window use the same reader as the definitions window?

2020-05-29 Thread Thomas Dickerson
On Friday, May 29, 2020 at 11:29:38 AM UTC-4, Matthew Flatt wrote: > > DrRacket uses `pretty-print`, which will print numbers using > `number->string`, and so (I think) won't go through your parameter. > This sounds like a good lead - curious if this also applies to `write` and `display` as

Re: [racket-users] Re: How to make DrRacket interactions window use the same reader as the definitions window?

2020-05-29 Thread Matthew Flatt
DrRacket uses `pretty-print`, which will print numbers using `number->string`, and so (I think) won't go through your parameter. I think there may be problems with parametering the core printer, partly because printing is is sometimes used where `read` is supposed to work on the result, but I

[racket-users] Re: How to make DrRacket interactions window use the same reader as the definitions window?

2020-05-29 Thread Thomas Dickerson
On an apparently related note: I have modified Racket to allow parameterized control over how numbers are written/printed/displayed ( cf. https://github.com/racket/racket/pull/3222 ). This works fine from command-line racket, but DrRacket (installed using `raco pkg install -i drracket` of my