• 2 Posts
  • 17 Comments
Joined 2 years ago
cake
Cake day: July 1st, 2023

help-circle

  • The real meat of the story is in the referenced blog post: https://blog.codingconfessions.com/p/how-unix-spell-ran-in-64kb-ram

    TL;DR

    If you’re short on time, here’s the key engineering story:

    • McIlroy’s first innovation was a clever linguistics-based stemming algorithm that reduced the dictionary to just 25,000 words while improving accuracy.

    • For fast lookups, he initially used a Bloom filter—perhaps one of its first production uses. Interestingly, Dennis Ritchie provided the implementation. They tuned it to have such a low false positive rate that they could skip actual dictionary lookups.

    • When the dictionary grew to 30,000 words, the Bloom filter approach became impractical, leading to innovative hash compression techniques.

    • They computed that 27-bit hash codes would keep collision probability acceptably low, but needed compression.

    • McIlroy’s solution was to store differences between sorted hash codes, after discovering these differences followed a geometric distribution.

    • Using Golomb’s code, a compression scheme designed for geometric distributions, he achieved 13.60 bits per word—remarkably close to the theoretical minimum of 13.57 bits.

    • Finally, he partitioned the compressed data to speed up lookups, trading a small memory increase (final size ~14 bits per word) for significantly faster performance.


  • I had a similar thing with a pen, the very same year I think… I had a mildly special pen which one day I lost. Went looking for it and found it sitting on a (slightly older) classmate’s desk, so i grabbed it and said “hey, that’s mine”. He tried to pretend that no, it was his, and he sounded very convincing about it, and even got the teacher involved. They both looked at me with infuriatingly condescending expressions as I explained how it was mine.

    The teacher suggested “just let him have it” to the classmate, who conceded.

    I went back to my desk fuming and scratched my initials into it before returning to show them, "look, see, it was mine! The classmate immediately pointed out “you scratched those in just now” and I think I mumbled something incoherent before going back to my desk, to the teacher’s mortification with the whole situation.

    It had already begun dawning on me at this point that the classmate was right… That wasn’t my pen. It was his and just looked like mine. But it was too late at this point and I didn’t know how to handle it other than to keep quiet and try to forget about it.


  • You should try tea that isn’t shocked… Green tea is especially bitter and unpleasant if the water’s too hot. The recommended temperature is 80°C, if I remember right.

    But even black tea tastes less bitter if you use slightly rested water after boiling (and if you remove the teabag without squeezing it out). You’re probably used to teas being astringent, but they don’t have to be. They can be smooth and “rounded” and rich.







  • When I take off, well, I know I’m gonna be

    I’m gonna be the drone who takes off towards you

    When I blow up, yeah, I know I’m gonna be

    I’m gonna be the drone who blows along with you

    If I get jammed, well, I know I’m gonna be

    I’m gonna be the drone who gets jammed next to you

    And if I reach ya, yeah, I know I’m gonna be

    I’m gonna be the drone who’s reaching down to you

    [Chorus]

    But I would fly six hundred miles

    And I would fly four hundred more

    Just to be the drone who flew a thousand

    Miles to fall down on your door