Re: [racket-users] How to recover whitespace from syntax->string

2021-04-09 Thread Jeff Henrikson
It turns out that I have more trouble with printing whitespace from syntax.  Consider this: (require racket) (require syntax/to-string) (define (syntax-on-lines-v1 xs)   (define (iter fin ys)     (let ((y (read-syntax "" fin)))   (if (eof-object? y)  

Re: [racket-users] How to recover whitespace from syntax->string

2021-04-09 Thread Jeff Henrikson
Laurent, Thank you very much.  It probably would have taken me a long time on my own to think of the possibility that the port was at fault. Jeff On 4/9/21 4:29 AM, Laurent wrote: You need to enable line/character counting with `port-count-lines!`: #lang racket (require syntax/to-string)

[racket-users] racket text://protocol client

2021-04-09 Thread Petite Abeille
Hello, Would you know of any racket text://protocol clients? Or servers? [1][2][3] Thanks in advance. [1] https://textprotocol.org [2] https://github.com/textprotocol/public [3] https://github.com/textprotocol/publictext -- You received this message because you are subscribed to the Google

Re: [racket-users] How to recover whitespace from syntax->string

2021-04-09 Thread Laurent
You need to enable line/character counting with `port-count-lines!`: #lang racket (require syntax/to-string) (define in (open-input-string "(comment\n \"hello world\"\n line)")) (port-count-lines! in) (syntax->string (read-syntax "mystring" in)) ; -> "comment\n \"hello world\"\n line" On

Re: [racket-users] Werid contract violation blame erros

2021-04-09 Thread epi via Racket Users
Thank you, Robby, This clarifies it a little bit. So far I've avoided reading about the racket module system in details, but I think now is as good time as ever. April 7, 2021 10:40 PM, "Robby Findler" mailto:ro...@cs.northwestern.edu?to=%22Robby%20Findler%22%20)> wrote: The short answer: you