Re: [racket-users] What is the purpose of "compact" code paths in print.c?

2020-05-28 Thread Thomas Dickerson
Perfect, thanks for insight =)

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CA%2BHWosVZGa1aOEbznUnAi535a%2BcqrX_zDGfZNejaiOeCnTgCyQ%40mail.gmail.com.


Re: [racket-users] What is the purpose of "compact" code paths in print.c?

2020-05-28 Thread Ryan Culpepper
Based on a quick look, I believe it has to do with serializing compiled
code, including quoted values embedded in compiled code. Serializing
compiled code uses the same entry point as the other printing functions.
For example, try this:

(write (compile '(quote (1 2 3

and compare the output against the contents of some .zo file.

You probably don't want to make any changes that affect the behavior when
compact is true, unless you're trying to add support for a new quotable and
readable data type. In that case, ask Matthew for help :)

Ryan


On Thu, May 28, 2020 at 8:01 PM Thomas Dickerson <
thomas_dicker...@alumni.brown.edu> wrote:

> I'm working on an enhancement for write/print/display, and thought I had
> it all implemented in io/print/main.rkt before realizing that code is only
> used for Racket-CS.
>
> Now I'm working on making equivalent changes in print.c for the
> traditional implementation, and that code is substantially more complex.
> Among other things, print has a bunch of checks against a variable called
> "compact", but I can't find any comments (either in the source or in the
> git log) as to what its for / when its used.
> Can anyone comment?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/1a2b4d7d-bdf7-4cbb-bf9e-6565c7bfec28%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CANy33qnYbuqks3NKbPXj0y6F_68nAp2bouHa386bqzHNmc07FA%40mail.gmail.com.