Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 2,851 posts.

Math & Algorithms
Any year
432

A Branchless UTF-8 Decoder

This week I took a crack at writing a branchless UTF-8 decoder: a function that decodes a single UTF-8 code point from a byte stream without any if statements, loops, short-circuit operators, or other sorts of conditional jumps. You can find the source code here along with a test suite and benchmark:

443

The game of life emulated in the game of life

Conway's Game of Life, emulated in Conway's Game of Life: The life simulator used is Golly which has a built-in script to generate these metapixel grids (select a pattern, and choose "metafier.py" from the scripts list). Outer Totalistic Cellular Automata Meta-Pixel: The metacell uses a period 184 tractor beam, which…