New
The latest blog posts to take off on Hacker News. 2,391 posts.
Square roots and maxima
A brief numerical and graphical check on a 3Blue1Brown video.
Accidentally writing a SAT solver
where my words occasionally escape /dev/null
Fine, I'll Play With Skiplists
Follow me on Bluesky! A Log-Structured Merge tree, or LSM, is a popular data structure for storage engines. It’s what is used by RocksDB, which is sort of...
The Art and Mathematics of Genji-Ko
You might think it’s unlikely for any interesting mathematics to arise from incense appreciation, but that’s only because you’re unfamiliar with the peculiar character of Muromachi (室町) era Japanese nobles. There has never been a group of people, in any time or place, who were so driven to display their sophistication…
SQL, Homomorphisms and Constraint Satisfaction Problems
Database queries are a pretty surprisingly powerful tool that can solve seemingly intractable problems.
AlphaProof's Greatest Hits
Here I’ll try to explain the coolest ideas in each of AlphaProof’s IMO 2024 solutions. AlphaProof produces proofs in Lean, and each Lean proof is composed of a series of tactics. So I’ll pick out the tactics that correspond to these ideas in the proofs for problems 1, 2 and 6 (the three problems that AlphaProof…
Nash equilibria in Ballmer's binary-search interview game
Yesterday John Graham-Cumming posted about “Steve Ballmer’s incorrect binary search interview question,” and in the Hacker News discussion, among the predictable “interview culture is flawed!!” complaints, there was some discussion of whether binary search was even the right way to solve Ballmer’s puzzle. Here’s a…
An alternative construction of Shannon entropy
The underpinning of information theory is Shannon’s formula for the entropy H of a discrete probability distribution P. Derived in 1948 in the paper “A mathematical theory of communication”, this is given by \[ H[P] = -\sum_{i=1}^N p_i \log p_i \] where \( p_i = p(x_i) \) is the probability of sampling \( x_i \) from…
How Chordcat works – a chord naming algorithm
chordcat is a chord-naming application and a pet project of mine. It is written in C++ and SFML.
Diffusion models are evolutionary algorithms
Authors: Yanbo Zhang, Benedikt Hartl, Hananel Hazan, Michael Levin
My Notes on Apple Math Notes
Apple's effort to improve the UX of math.
Perceptually lossless (talking head) video compression at 22kbit/s
Achieving extreme video compression rates using the LivePortrait model for talking head videos.
Alonzo Church: Architect of computer intelligence
The man who gave us the solution to the Entscheidungsproblem
Adventures in Probability
I hope everyone had a good weekend. I went on a hike. It was great. Statistics One of my great school regrets, next to “taking three years of business...
A Hamiltonian Circuit for Rubik's Cube
At last, the Hamiltonian circuit problem for Rubik's Cube has a solution! To be a little more mathematically precise, a Hamiltonian circuit of the quarter-turn metric Cayley graph for the Rubik's Cube group has been found.
Demystifying the regular expression that checks if a number is prime (2016)
Ever wondered how the ^.?$|^(..+?)\1+$ regular expression can tell you if a number is not prime? In this blog post you'll learn how and why it works. Code examples in Java, JavaScript, Python and Perl are provided.
Probability-generating functions
I have long struggled with understanding what probability-generating functions are and how to intuit them. There were two pieces of the puzzle missing for me, and we’ll go through both in this article.
Sets, types and type checking
My currently understanding of types
Goodhart’s law isn’t as useful as you might think (2023)
Goodhart's Law is useless. It tells you about a phenomenon, but it doesn't tell you how to solve it. We look at how organisations actually prevent Goodhart's Law, and illustrate this with Amazon's Weekly Business Review as an example.
Adventures in algorithmic trading on the Runescape Grand Exchange
Runescape has been a game near and dear to my heart since I was a child. Though I do not actively play anymore, it still functions as an interesting programming project substrate. Most recently, I created a bot that automatically executes trades on the Grand Exchange in order to conduct market making via common…
Category Theory Illustrated: Logic (2021)
Now let’s talk about one more seemingly unrelated topic just so we can “surprise” ourselves when we realize it’s category theory. By the way, in this chapter there will be another surprise in addition to that, so don’t fall asleep.
Sinusoidal Sunlight
The graph of daylight over the course of a year looks like a sine wave, but is it?
Yes, we did discover the Higgs
Ben Recht got my attention with a tweet about his blog post "The Higgs discovery did not take place.” I’m generally a fan of Ben’s writing, but I think he’s off base on a number of issues, and I’ll explain why. [Updated Oct 23rd, 2024] Ben's …
TLA from First Principles
Building an intuition for the mathematics behind the "TLA" in "TLA+"
Adding row polymorphism to Damas-Hindley-Milner
Intro to HM
One Plus One Equals Two (2006)
From the highly eclectic blog of Mark Dominus