3 ms·
A year or so ago I stumbled across the A-normalization code discussed here: https://matt.might.net/articles/a-normalization/ https://matt.might.net/articles/a-
by dunham 4y ago
A year or so ago I stumbled across the A-normalization code discussed here:
https://matt.might.net/articles/a-normalization/ https://matt.might.net/articles/a-normalization/
I've got a fairly good grasp on recursion, but it took some effort to get a mental model of what was going on (k is what to do with the inside thing), because it's doing both recursion and continuation passing at the same time. It feels like a technique that could come in handy someday.
Not code/codebase, but I also want to mention the transform behind bzip:
https://www.hpl.hp.com/techreports/Compaq-DEC/SRC-RR-124.pdf https://www.hpl.hp.com/techreports/Compaq-DEC/SRC-RR-124.pdf
I understand how it works, but it seems magical that you can sort all of the rotations, take the last column, and still be able to recover the original text.