Why Python's integer division floors (2010)
I was asked (again) today to explain why integer division in Python returns the floor of the result instead of truncating towards zero like...
The latest blog posts to take off on Hacker News. 2,391 posts.
I was asked (again) today to explain why integer division in Python returns the floor of the result instead of truncating towards zero like...
Drawing with the Fourier Series
I recently stumbled upon a blog post by Alejandra González (a.k.a @blyxyas) that seeks to compress a tic-tac-toe game state into as few bits as possible. She arrived at a solution in 18 bits. This got me thinking, can we do better?
A visual, interactive guide to what bloom filters are, when you would use them, and how they work.
Compute this limit more accurately with one weird trick!
The enduring success of her early 19th century novels are in large part due to their persistent relevance
Cut out everything that's not surprising.
Making math a daily habit
This blog is intended to be a place to share ideas and results that are too weird, incomplete, or off-topic to turn into an academic paper, but that I think may be important. Let me know what you think! Contact links to the left.
Tired of equations and matrices? Ready to learn the easy way? This post explains the Kalman Filter simply with pictures and examples!
A blog about math by Nic Ford
In many large-scale web services, multiple layers of stateless and stateful services are seperated by load balancers. Load balancing can be done with dedicated hardware, with dedicated software load balancers, using DNS trickery or through a load-balancing mechanism in the client. In large systems, the resources and…
Musings on Hofstadter’s phenomenal book about computation, consciousness, and epistemology.
The boolean satisfiability problem (“SAT” for short) is arguably the most famous NP-complete problem in theoretical computer science. According to Wikipedia, it is “the problem of determining if there exists an interpretation that satisfies a given Boolean formula ”; or, in simpler terms, if there is at least one…
This article attempts to outline, in informal terms, a new theory of combinators, related to the theory of Combinatory Logic pioneered by Moses Schonfinkel, Haskell Curry, and others in the 1930s. Although not essential, an understanding of the classical theory of combinators may be helpful (see the links at the…
For reasons beyond the scope of this entry, I have been investigating elliptical and ovoid shapes. The Wikipedia article for Moss’s egg has a link to a tutorial on Euclidean Eggs by Freyja Hreinsdóttir which (amongst other things) describes how to construct the “four point egg”. I think it is a nicer shape than Moss’s…
I often drive between Boston and New Haven. While on the road, I find myself pondering a simple question: If my only goal is to arrive as fast as possible, how fast should I drive? Ignoring things …
A deep dive into investigating and reducing the flutter distortion on the soundtrack of Steamboat Willie (1928).
I first encountered Jenkins in 2007 while contributing to the Apache Nutch project. It was called Hudson back then. The nightly builds for the project ran on Hudson at that time. I remember sifting through my emails and reviewing build result notifications to keep an eye on the patches that got merged into the trunk…
Humans are notoriously bad at coming up with random numbers. I wanted to be able to quickly generate “random enough” numbers. I’m not looking for anything that great, I just want to be able to come up with the random digits in half a minute. Some looking around brought me to an old usenet post by George Marsaglia…
An online book about collision detection using Processing.
Backpropagation is the key algorithm that makes training deep models computationally tractable. For modern neural networks, it can make training with gradient descent as much as ten million times faster, relative to a naive implementation. That’s the difference between a model taking a week to train and taking 200,000…
I recently passed 100 days of practicing math every single day 💯 I’ve wanted to beef up my math chops for a while, but I needed a good reason that would justify the time investment. Plus…
While reading Real-World Cryptography , I came across the "million message attack" . This is an attack that Daniel Bleichenbacher demonstrated in 1998, which effectively broke RSA with a particular encoding function called PKCS #1 . It was only mentioned briefly, so I dug in and decided to try to understand the…
This post is an anecdote from over a decade ago, of which I lost the actual code. So please forgive me if I do not accurately remember all the details. Some details are also simplified so that anyone that likes computer security can enjoy this article, not just those who have played World of Warcraft (although the…
This year’s Advent of Code has been brutal (compare the stats of 2023 with that of 2022, especially day 1 part 1 vs. day 1 part 2). It included a problem to solve with dynamic programming as soon as day 12, which discouraged some people I know. This specific problem was particularly gnarly for Advent […]