
Is there any way to use snip styles to, say, change a word to another language?

(Rather than just recoloring it and changing the font.)

I guess I ‘could’ extend the text% class to have change-style take in different arguments. But that still seems cludgy.

Quick question, how does equal-hash-code
compose hash values for lists? I’m implementing something similar for our reference checking but I’d like to do it the Racket Way™

@leif I don’t think snip styles will work for that

@cowbs https://github.com/racket/racket/blob/master/racket/src/racket/src/hash.c#L1556 or https://github.com/racket/racket7/blob/master/racket/src/cs/rumble/hash-code.ss#L108 Those are not the same, obviously, and the latter is based on Chez Scheme’s code, but they’re similar.

@mflatt thanks!

@samth The test is checking to make sure that the #:use-place
connection option achieves its goal of allowing other Racket threads to execute during long queries. The test works by spawning a thread that increments a counter between naps, running the query, and then comparing the counter against the elapsed time. There’s already a fudge factor of 0.5 compared to absolutely fair scheduling.

I can relax the test even more, but I wonder whether this is a Travis idiosyncrasy or a change to the Mac OS scheduler. And if the latter, is there anything that Racket can and/or should do to compensate? (@mflatt?)

Can you look back to see when it started failing, and see if that corresponded to some Racket change?

I can do that once I’m back at a real computer

@mflatt Sad, thanks though.

My recollection is it happened around the time that people said Travis changed the Mac OS version they used. I can’t dig into it right now, though.

should be easy: can I write a pict to a file? Slideshow can do it, right? I’m hoping to write to… an SVG? A PDF? I feel like I must just not be looking in quite the right place in the docs.

@jbclements maybe draw-pict
combined with svg-dc%
or pdf-dc%
?

From https://docs.racket-lang.org/pict/Pict_Datatype.html?q=convertible#%28tech._pict%29: “A pict is a convertible datatype through the file/convertible protocol. Supported conversions include ’png-bytes, ’eps-bytes, ’pdf-bytes, ’svg-bytes, and variants such as ’png-bytes+bounds and ’png-bytes+bounds8.”

so, (convert your-pict 'png-bytes)
will give you a byte-string that’s easy to save as a .png file

huh, I didn’t know about file/convertible

when it works, it’s great :slightly_smiling_face:

I’ve used that… it’s really elegant