Topic
Everything filed under Algorithms, newest first.
RSS · JSON · All topics
Felix Palmer announces A5 v1.0, the pentagonal Discrete Global Grid System that encodes any point, line or polygon on Earth as 64-bit cell IDs. The release freezes a permanent cell ID definition and adds compacted coverings with set operations, spatial hierarchy functions, equal-area cells and faster indexing across languages.
6 min · 1,313 words
Tetris in d dimensions: how we rightsize Kubernetes nodes
Emmanuel Bakare explains how CostGraph rightsizes Kubernetes nodes as a vector bin packing problem: sizing pods from real usage percentiles, checking placements against scheduler hard constraints, and using Dot Product and L2 heuristics from Panigrahy et al. instead of first fit decreasing.
12 min · 2,675 words
We are going to kill “unalive”
Anil Dash argues that euphemisms like “unalive”, “grape” and censored captions exist to appease platform algorithms, that a generation has grown up with its language chosen by Big Tech, and that the fix is to say what you mean, build presence on independent platforms, and make noise when platforms push back.
8 min · 1,897 words
Two-Stack Sliding-Window Aggregation
An aggregation is some kind of summary of a set of data. This can be the sum, length, minimum, etc. It is quite common to want to calculate such a summary repeatedly, e.g. “the maximum noise level in dB for the past 30 seconds” for a nuisance detector. In such a case we say there is a sliding window over our data, and we want to aggregate over our window.
5 min · 1,195 words
Making np.searchsorted up to 25× Faster in NumPy 2.5
Alejandro Candioti explains how NumPy 2.5 makes np.searchsorted up to 25 times faster by batching many binary searches so their independent memory accesses overlap, starting from a vectorized Python prototype that beat NumPy 2.4's native code, and discusses cache-friendly layouts like Eytzinger as a future direction.
12 min · 2,861 words
Stelios Petrakis describes building a C raycaster around the maze generation algorithm of the Atari 2600 game Entombed (1983), whose mysterious lookup table builds the maze one row at a time within 128 bytes of RAM, then reskinning it as a Backrooms-style game with a browser-playable Three.js version.
4 min · 1,013 words
Mathematicians Build Long-Awaited Graph SandwichThe proof of a decades-old conjecture has given researchers a new way to understand complex networks.
Paulina Rowińska explains how Behague, Iľkovič, and Montgomery completed Kim and Vu's sandwich conjecture, letting hard properties of random regular graphs follow from easier binomial-graph results.
7 min · 1,621 words
In April 1542 a letter left Rome for the court of Charles V in Spain. On its first page the Italian stops in the middle of a line and digits begin: Figure 1. The opening of the cipher, f. 70r. Archivio Apostolico Vaticano (AAV), Segr. Stato, Spagna 1A, photograph supplied through DECODE record 92. Detail enlarged from the photograph.
42 min · 9,580 words
English: a vs anWhy vowel letters are the wrong rule for indefinite articles in generated text
Amit Patel (Red Blob Games) digs into when English wants “a” versus “an”: the rule tracks spoken vowel sounds, not written vowel letters, and only a small set of common words need exceptions for procedural text generation.
1 min · 274 words
The author designs a compact binary encoding scheme for national flags using a layered model and Huffman coding. Most flags can be represented in 55–76 bits by exploiting the statistical regularity of flag elements — stripes, stars, crescents, common aspect ratios — while allowing longer codes for complex outliers like Qatar.
2 min · 351 wordsagent-written
Thomas Ahle presents a technique for evaluating polynomials in roughly half the multiplications that Horner's method requires, by preprocessing the coefficients offline. An interactive tool lets users input a polynomial and field to see the optimised evaluation chain.
1 min · 234 wordsagent-written
Optimizing anamorphic sculptures
Thiago Cardoso walks through creating and optimizing anamorphic sculptures—images that resolve only from a specific vantage—using computational geometry techniques.
6 min · 1,436 words
Jędrzej Maczan explains PyTorch's activation-checkpointing memory planner as a 0/1 knapsack problem and introduces dp_knapsack_sliding_hirschberg, a sliding-window DP with Hirschberg-style reconstruction that cuts peak RAM during memory planning by about 20x.
7 min · 1,724 words
Reservoir SamplingOriginal article link with an AI-written directory summary
An interactive explanation of choosing a fair random sample from a stream of unknown length. Sam Rose develops reservoir sampling with simple arithmetic, visual examples, and an implementation readers can follow.
1 min · 76 wordsagent-written
Bloom FiltersOriginal article link with an AI-written directory summary
A visual introduction to Bloom filters and their tradeoffs. Sam Rose explains how a compact probabilistic structure can answer membership questions, including why false positives are possible and when that compromise is useful.
1 min · 78 wordsagent-written
Three ways to parse the nested lists from Advent of Code 2022 day 13 in the array language BQN: leaning on •BQN, a recursive descent parser, and an array-style parser, with simple benchmarks comparing them.
22 min · 5,091 words
Sid Bala's classic high-level walkthrough of how H.264 video compression works: why raw video is huge, frequency-domain thinking, chroma subsampling, quantization, motion compensation between frames, and entropy coding, explaining how the codec gets such dramatic bandwidth savings.
11 min · 2,553 words
Jeremy Kun explains hybrid images, pictures that read differently up close and from afar, using Fourier analysis: an intuitive tour of the discrete Fourier transform, low- and high-pass Gaussian filtering, and Python code that blends Marilyn Monroe and Albert Einstein into one image, with ideas for further experiments.
10 min · 2,292 words
How Hacker News ranking really works: scoring, controversy, and penalties
Ken Shirriff reverse-engineers Hacker News ranking: the gravity formula, controversy penalties after ~40 comments, title/domain penalties (including historical NSA demotion), and how ~20% of front-page stories are tweaked.
15 min · 3,547 words
Some problems of recursive descent parsers
Eli Bendersky revisits the recursive descent parser from his earlier article, examining problems such as handling left-associative binary operators and proposing practical solutions to make the parser correct.
5 min · 1,234 words