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)
@laurent.orseau --use-errortrace
is an option of raco profile
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
I saw that. The account was less than one hour old.
aha, here it is then! I’m not mad \o/
“amused” is not exactly the word I’d choose :smile:
Well… language oriented towards pedagogy => lots of students => lots of youngsters confronting their first failures (real or imagined)
Cool lol I specifically looked up the option @sorawee added to scribble but it’s --errortrace
@shu—hung how difficult would it be to add this option to compiler/test?
oh neat, i’ll have to take a look. ty for the video
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!
That looks like the right file to me. The recently added --output
feature was also implemented here.
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.
@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
it also tests a very specific case from what I gathered - that is large objects in the old generation
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.
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.
@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?
Re word-count: It would be nice if everyone output the number of different ‘words’ to ensure consistency. I found 32188.
How fast is wc
?
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.
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.
Ah, ok, I see.
I also tried quadratic probing at one point but that made no difference.
wery cooeek?
Very quick?
wc
is about .25 seconds on my machine
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
I admit not reading the problem statement :slightly_smiling_face:
It’s about counting occurrences of all words, and printing them sorted
@soegaard2 Welcome into the rabbithole ;)
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.
Mumble.
tr -cs 'a-zA-Z0-9' '\n' <file.txt \| grep -v "^\s*$" \| sort \| uniq -c \| sort -bnr
@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)
This reminds me of something - is this problem from a Kernighan book or perhaps in Bentley book on programming pearls?
Next time I’ll read the problem statement.
I promise!
I don’t have any plans to work on that myself, at least.
(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.
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
Is it possible with the current Racket to cross-compile to a different OS/Arch with raco exe
and raco distribute
?
I’ve done literally no research on this so far so apologies if this is something trivially google-able…
Answer: yes it is possible https://groups.google.com/g/racket-users/c/PI9cD1cVtZk?pli=1
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.
Check out the types zulip:https://typ.zulipchat.com/login/#all_messages\|https://typ.zulipchat.com/login/#all_messages
I’m now wondering if ‘Logic Programming in Scheme’ is worth a read?
@gregor.kiczales you might like this story: https://news.ycombinator.com/item?id=26510204\|https://news.ycombinator.com/item?id=26510204
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?
You can use PLT_SETUP_OPTIONS
with -D
, I think.
(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.)
Minimal Racket doesn’t have DrRacket. Would that do what you want?
I think so, but doesn’t it take forever to build?
Yep lol
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