Top posts
Every blog post that took off on Hacker News, ranked by the votes of its best submission. 2,851 posts.
Maximum likelihood estimation and loss functions
When I started learning about loss functions, I could always understand the intuition behind them. For example, the mean squared error (MSE) for regression seemed logical—penalizing large deviations from the ground-truth makes sense. But one thing always bothered me: I could never come up with those loss functions on…
Homotopy Type Theory and Higher Inductive Types
In this article, we explore the possibilities allowed by higher inductive types. They enable a much more intuitive formalization of integers and new mind-blowing definitions of the (homotopical) ci…
Nonograms: a practical guide with interactive examples
This is a very important technique: only fill cells when you’re certain; no guessing.
Not so fast, Mr. Fourier
A real explanation of discrete Fourier transform (DFT, FFT), discrete cosine transform (DCT), and their inverses.
The formula for pi buried in a hydrogen atom
When most people think about pi, they associate the mathematical constant with arcs and circles. Mathematicians, however, are accustomed to seeing it in a variety of fields. But two University physicists were still surprised to find it lurking in a quantum mechanics formula for the energy states of the hydrogen atom.
Painting with math: A gentle study of raymarching
A compilation of my Raymarching and Signed Distance Field learnings and work. In it, I teach you how to leverage those techniques along with lighting models, smoothmin, soft shadows, and some math to create beautiful 3D raymarched scenes ranging from abstract shapes to infinite realistic-looking landscapes.
Dijkstra's Algorithm
I was at SCNA the other day, and someone approached me about TDD and Dijkstra’s algorithm. He wondered if you could find a sequence of tests that would lead you to the algorithm. This sounded like a fun little exercise, so I decided to give it a try here.
Solving Programming Puzzles Without Using Your Brain
This post is a write-up of a solution to part of a programming puzzle I did yesterday. It’s a little different than the usual “solution + theory” approach, though: I’m going to talk about the actual steps you’d need to take to get to the solution (i.e. what to google, what intermediate code looks like, etc.). Often…
A new algorithm for smoother 360 video viewing
Visit the post for more.
Smaller than Bloom filters
I've been looking at what would be needed in order to have a global view of CRLs in browsers. At the moment revocation has three problems: privacy (by asking the CA about the status of a certificate you're revealing to them what you're looking at), performance (OCSP checks take hundreds of milliseconds which adds up…
Strange Attractors (2018)
Interactive Mathematical Applets and Animations
Learning to solve hard problems in RL for LLMs by never giving up
This is a blog post for my recent paper on RL post-training of LLMs: introducing the Matthew Effect and proposing to solve it with Never Give Up. It is presented interactively and less formally, more like how I give the talk. For a deeper, more technical dive, check out the paper on arxiv and code on github. The…
Singular Value Decomposition for Programmers
Today's article is a short one. Not because Singular Value Decomposition (SVD) is not important, but because it is so ubiquitous that we'll touch it in other...
An Algorithm for Polygon Intersections
In this post we'll work our way towards an algorithm that can compute convex polygon intersections. We'll also explore a method for intersections between axis-aligned rectangles, a function that can determine the intersection of two line segments, as well as a point in polygon test.
Camera Calibration from Scratch Using Rust
Learn the theory behind how to perform sensor and camera calibration.
Heritability of human life span is ~50% when heritability is redefined
ratios will be ratios
MathML in Chromium
A joint effort to add native MathML-Core support to web browsers.
Loop invariants can give you coding superpowers
A loop invariant is a simple yet powerful tool for designing, testing, modifying, documenting and proving code correct.
The Math I Learned After I Thought Had Already Learned Math
True story: it’s possible to fly through your own secondary math education — honor roll bumper sticker on your mom’s minivan and all —Â but miss some of the Very Big Ideas of secondary …
Cylinders in Spheres
What is the largest volume cylinder it is possible to carve from a solid sphere? Also, so you know about the napkin ring problem?
Constraint Solving with MiniZinc
This is part one of a two-part article. Part two is here. A while back somebody told me to check out MiniZinc. Eventually I did and really enjoyed it, so figured I’d write about it here. This is actually going to be a two part article. Right now we’re talking about what it is and how it works, and in the next post…
Sets, types and type checking
My currently understanding of types