Show newer

I like that a songbird produces birdsong. It's good symmetry.

glaebhoerl boosted

Dating back to 1969, this song has been an anthem of the Israeli peace movement for decades.

Yitzhak Rabin was the last Israeli PM who genuinely tried to work towards peace and coexistence. He had sung this song to the crowd at a peace rally in 1995 just minutes before he was shot by a far-right Israeli Jew.

The lyrics had been in his pocket.

I feel that peace died that day.

Show thread
glaebhoerl boosted

Just posted a blog post about some work I've done on SpiderMonkey and JavaScript performance over the past year: cfallin.org/blog/2023/10/11/sp

Various use-cases run SpiderMonkey *inside* a Wasm module; this brings JS to new platforms and is a nice sandboxing technique. Wasm doesn't allow JIT, however. I wrote a new interpreter tier for SM that *interprets* inline caches, and am contributing it upstream. Also touches briefly on future plans (partial evaluation, ...). It's been a very fun project!

glaebhoerl boosted

I wrote a thing! About using the AVX-512 instruction set (and its predication registers!) to implement a GPU's programming model ("single instruction multiple thread") on a CPU. Specifically, about making a compiler for a toy C-like language that emits AVX-512 code that runs the given program 8 times at once.

litherum.blogspot.com/2023/10/

glaebhoerl boosted

👋 The old person uses the internet
👉 The Elder Scrolls

glaebhoerl boosted

@rygorous By PSX-era do you mean PSX specifically or also, like, N64?

glaebhoerl boosted

@fgaz At a job long in the past, I had a coworker who was very enamored of a particular do-everything Python library which I will not name at this time. This library included some built-in logging facilities, but he didn't actually need the log for the thing he was making, so he set it to log to `/dev/null`.

It turns out that this library had automatic log rotation built in. The way it worked was that it kept track of the number of bytes written to a log, and when it crossed a certain threshold, it would rename the file it was logging to, and open a new log file.

Unfortunately, the thing my coworker built ran as `root`. It started up and ran fine for a while, merrily logging to `/dev/null` as instructed. After a while, though, it noticed "oh hey I've written more than a megabyte of logs, time to rotate the log file" - it then renamed `/dev/null` to `/dev/null.YYYY-mm-dd.HH:MM:SS` and created a new `/dev/null` that was just a regular text file. From that point onward, anything that got written to `/dev/null` actually got written to disk. Chaos ensued.

That one took a whole day to figure out...

glaebhoerl boosted

why did we call it "differentiation" when "disintegration" is _right there_

glaebhoerl boosted

I think this is basic folklore for researchers, but here's some simple rules of thumb about hashing a set of keys to a universe of integers that I find useful for designing data structures:

1. If you want to bound the probability of at least one collision to a constant (say 0.5), you need a universe quadratic in the set size.

2. If you want to avoid collisions "with high probability" (i.e., 1 - poly(1/N), where N is set size), you need a universe cubic in the set size.

3. If your universe is the same size as the set, you can expect a fraction of 1/e empty buckets and a fraction of 1/e buckets containing a single key. That means that if you've sized your buckets for just one key, a fraction 1 - 2/e ~= 26% will overflow!

4. If your universe is the same size as the set and you want to avoid overflow, you can use the fact that the max load is bounded WHP by 3 * (ln N/ln ln N)[0].

5. For the same case, the "power of two choices"[0] tells us that if we always pick the less loaded of 2 randomly chosen bins, max load is bounded WHP by lg lg N + O(1)! (I don't know a formula for the additive constant, but you can always approximate it by simulation.)

[0] old.corelab.ntua.gr/courses/ra

glaebhoerl boosted
glaebhoerl boosted
glaebhoerl boosted

Uncle Bob's® All-in-One™
- Hand soap
- Dish soap
- Shower gel
- Shampoo
- Conditioner
- Hard-surface cleaner
- Toothpaste
- Window cleaner
- Laundry detergent
- Engine degreaser
- Drain cleaner
- Antiseptic
- Wood polish

"Specialization is for insects!"™

glaebhoerl boosted

Started to sketch out the parsing example with the left-fold postorder consumer design. I haven't had the time to write tests yet, but hey it passes the type checker. Figured I'd post up the WIP and I'll finish it off tomorrow.

gist.github.com/pervognsen/cf7

glaebhoerl boosted
glaebhoerl boosted

Great example of how closure-based APIs are inherently safer than RAII-based APIs: cliffle.com/blog/lilos-cancel-. This is famously true for Rust threads and I've also found it true for transactions.

Show older
Mastodon

a Schelling point for those who seek one