sarna.dev
2021-3-19 07:57:31

I ran <http://prl.ccs.neu.edu/blog/2016/05/24/measuring-gc-latencies-in-haskell-ocaml-racket/|this benchmark> on Racket 8, all the major GCs are now >50ms :( most of them is 60–85ms (before it was ~20ms)


sorawee
2021-3-19 08:07:54

@laurent.orseau --use-errortrace is an option of raco profile


soegaard2
2021-3-19 08:09:41

sorawee
2021-3-19 08:15:27

I’m amused that in every thread related to Racket, there gotta be a new account that links to https://www.youtube.com/watch?v=_wY7FBtr7_c


soegaard2
2021-3-19 08:16:11

I saw that. The account was less than one hour old.


laurent.orseau
2021-3-19 08:37:16

aha, here it is then! I’m not mad \o/


laurent.orseau
2021-3-19 08:46:23

“amused” is not exactly the word I’d choose :smile:


raoul.schorer
2021-3-19 10:09:13

Well… language oriented towards pedagogy => lots of students => lots of youngsters confronting their first failures (real or imagined)


shu--hung
2021-3-19 14:00:08

Cool lol I specifically looked up the option @sorawee added to scribble but it’s --errortrace


sorawee
2021-3-19 14:04:10

@shu—hung how difficult would it be to add this option to compiler/test?


massung
2021-3-19 14:06:46

oh neat, i’ll have to take a look. ty for the video


shu--hung
2021-3-19 14:07:51

No clue. I was looking at https://github.com/racket/racket/blob/master/pkgs/compiler-lib/compiler/commands/test.rkt but maybe I was checking the wrong file all the time!


sorawee
2021-3-19 14:09:03

That looks like the right file to me. The recently added --output feature was also implemented here.


alec.mills
2021-3-19 15:37:13
4[]]=[——-

philip.mcgrath
2021-3-19 17:00:51

That’s surprising. I don’t know how parallel GC is logged: maybe that could inflate the numbers while actually reducing latency? My anecdotal impression has been that 7.9 CS was a radical improvement in GC pause times.


sarna.dev
2021-3-19 17:02:13

@philip.mcgrath maybe you can test it on your machine? it’s a matter of cloning the repo and running make run-racket-instrumented or something similar


sarna.dev
2021-3-19 17:03:50

it also tests a very specific case from what I gathered - that is large objects in the old generation


mflatt
2021-3-19 17:13:20

The problem is that CS does not have true incremental GC. It has an approximation that works well for things like interactive graphics, but the workload in this case is designed to test for truer incremental behavior.


samth
2021-3-19 17:18:13

And, just to be clear, the performance of Racket CS and of Racket BC didn’t get worse since the blog post — we just switched the default to CS.


samth
2021-3-19 17:40:23

@popa.bogdanp question about your word-count code: is it possible for too many words with the same hash to cause probing to run into the next hash?


laurent.orseau
2021-3-19 17:43:53

Re word-count: It would be nice if everyone output the number of different ‘words’ to ensure consistency. I found 32188.


soegaard2
2021-3-19 17:50:10

How fast is wc ?


popa.bogdanp
2021-3-19 17:52:40

It’s possible for it to behave pathologically and thus be slow, but collisions like that should not be possible. An entry can occupy a slot another hash would’ve taken, but then that new hash itself would just probe for another slot. Slots are only newly-occupied if they’re already empty.


popa.bogdanp
2021-3-19 17:54:10

For my code, I just added a test case in the original repo so that’s how I’ve been making sure it’s correct.


samth
2021-3-19 17:54:18

Ah, ok, I see.


popa.bogdanp
2021-3-19 17:55:11

I also tried quadratic probing at one point but that made no difference.


laurent.orseau
2021-3-19 17:56:28

wery cooeek?


soegaard2
2021-3-19 17:57:10

Very quick?


samth
2021-3-19 17:58:31

wc is about .25 seconds on my machine


laurent.orseau
2021-3-19 17:58:39

well, the common unix tools are usually as fast as possible in my experience—oh, you meant for word-count? But that’s not exactly the problem definition though


soegaard2
2021-3-19 18:00:09

I admit not reading the problem statement :slightly_smiling_face:


laurent.orseau
2021-3-19 18:01:35

It’s about counting occurrences of all words, and printing them sorted


laurent.orseau
2021-3-19 18:02:22

@soegaard2 Welcome into the rabbithole ;)


popa.bogdanp
2021-3-19 18:04:09

Instead of open addressing, separate chaining with two vectors for the ks and vs for every slot might also be worth a try, but it might also not make much of a difference. IIRC, when I last measured, about 20% of the total time was spent in the hashing function so maybe there’s a way to make that faster, too.


popa.bogdanp
2021-3-19 18:05:29

soegaard2
2021-3-19 18:07:33

Mumble.

tr -cs 'a-zA-Z0-9' '\n' &lt;file.txt \| grep -v "^\s*$" \| sort \| uniq -c \| sort -bnr


sarna.dev
2021-3-19 18:09:33

@mflatt are there any plans to make it better? I may be totally mistaken here, but I think “a lot of big objects sticking around” could happen when writing long-lived web servers (mostly caches)


soegaard2
2021-3-19 18:09:57

This reminds me of something - is this problem from a Kernighan book or perhaps in Bentley book on programming pearls?


raoul.schorer
2021-3-19 18:11:03

soegaard2
2021-3-19 18:12:15

Next time I’ll read the problem statement.

I promise!


mflatt
2021-3-19 19:22:34

I don’t have any plans to work on that myself, at least.


kellysmith12.21
2021-3-19 21:23:46

(Not a Racket question, but I’ve the impression that someone here may be able to point me in the right direction.) I’ve some questions about type systems, and even if no one here can answer them, if I could be directed to someone or somewhere that I could discuss my questions, I’d greatly appreciate the help.


samdphillips
2021-3-19 21:32:51

I figured this was probably a semi-annual HN thing, but I guess about every year someone rediscovers HTDP. https://news.ycombinator.com/item?id=26510360


samdphillips
2021-3-19 22:32:34

Is it possible with the current Racket to cross-compile to a different OS/Arch with raco exe and raco distribute ?


samdphillips
2021-3-19 22:33:21

I’ve done literally no research on this so far so apologies if this is something trivially google-able…


samdphillips
2021-3-19 22:44:51

mflatt
2021-3-19 22:45:57

For CS, things were not quite set up right for v8.0. Thanks to Bogdan’s help, the snapshot builds can do that. https://www.cs.utah.edu/plt/snapshots/current/doc/raco/cross-system.html https://www.cs.utah.edu/plt/snapshots/current/doc/inside/ios-cross-compilation.html

You need to have an installation with the core executables for the target platform — probably using the “Tarball” variants of Minimal Racket.



spdegabrielle
2021-3-19 23:31:45

I’m now wondering if ‘Logic Programming in Scheme’ is worth a read?


samth
2021-3-20 01:30:30

jesse697
2021-3-20 05:53:15

any tips on making a “no docs” install of Racket? I install Racket 8.0 CS on my servers using the Unix source + built packages option. I then do make install there. Building the docs is unnecessary in this context because I don’t use documentation on those machines. Any ideas how I could set that up?


sorawee
2021-3-20 05:55:37

You can use PLT_SETUP_OPTIONS with -D, I think.


jesse697
2021-3-20 06:02:52

(I’d also love to have a fully headless Racket “variant”, too — no DrRacket, no embedded C libraries needed only for DrRacket, and so on. But I realize this is more ambitious and might be harder to specify than I’m making it out to be.)


sorawee
2021-3-20 06:03:31

Minimal Racket doesn’t have DrRacket. Would that do what you want?


jesse697
2021-3-20 06:03:52

I think so, but doesn’t it take forever to build?


sorawee
2021-3-20 06:05:01

Yep lol


jesse697
2021-3-20 06:07:53

I guess that’s OK — I can make it once and then take a snapshot of the machine; servers that I fire up later can just be based on that snapshot