How SHA-2 works step-by-step (SHA-256)
Learn to code from scratch with hands-on lessons, a structured curriculum, and real projects. Stop watching tutorials, start writing code for free now.
Sphere Eversion
Topology is the study of the properties of geometric objects which aren’t changed by continuous deformation. A standard low-grade math joke is that toplogists consider a coffee mug and a doughnut equivalent because they’re both torii—(pauses for laughter)—one can be continuously deformed into the other, called a…
Is every game of Slay the Spire winnable?
There is a lot of randomness in a game of Slay the Spire. From the cards and relics offered, to the potions dropped, to the map layouts and random encounters, very little remains the same between two playthroughs. This is part of the beauty of the game, forcing you to adapt and make the most out of the resources you…
Reminder of Complexity
An impressive poster summarizing biochemical pathways reminds us how complex life is, and how interconnected the world is.
Modern Portfolio Theory: A Case Study on Turnips
And how having friends makes the stalk market a lot more profitable.
Banned math book
The applied math classic Courant & Hilbert was banned in Nazi Germany. The US seized the copyright and published an English edition.
Making the Monty Hall problem weirder but obvious
It’s this simple: Do you want what’s behind one door or the other nine?
The Stack Monoid
(Updated 2020-09-06 with pointers to related work and a bit more explanation)
Faster than radix sort: Kirkpatrick-Reisch sorting
Radix sort sorts n w-bit integers by splitting them up into chunks of logn\log nlogn bits each, and sorting each chunk in linear time. Thus it achieves O(nw/logn)O(nw/\log n)O(nw/logn) time.
Understanding Programs Using Graphs
I want to show you a little of what this sea-of-nodes graph data structure looks like and how it works, and I think it’s worth doing this for this for a couple of reasons.
The 2,500 year old history of why Python’s all([]) returns True
How a Python function relates to a two thousand year old debate in philosophy
Introduction to Clifford Algebra (2006)
Clifford algebra gives a unified view of many things that otherwise would need to be understood separately.
Algorithm for Drawing Trees
I recently wanted to take a hierarchy of items and draw them in a nice tree structure. For example, a Family Tree. At the time, I thought “This will be easy, I’ll just Google for an alg…
Dissecting Lemire's nearly divisionless random number generator
A very late blog post announcing the readability contest winners, a new (very) annotated implementation, and a surprising sort-of security issue found along the way.
Want to make good business decisions? Learn causality
In some organizations, earnest efforts to be “data-driven” devolve into a culture of false certainty in which the influence of metrics is dictated not by the...
Reverse-engineering the problematic tail behavior of Fivethirtyeight forecast
We’ve been writing a bit about some odd tail behavior in the Fivethirtyeight election forecast, for example that it was giving Joe Biden a 3% chance of winning Alabama (which seemed high), it was displaying Trump winning California as in “the range of scenarios our model thinks is possible” (which didn’t seem right)…
Why Bayesian Stats Needs Monte-Carlo Methods
Bayesian statistics rely heavily on Monte-Carlo methods. A common question that arises is “isn’t there an easier, analytical solution?” This post explores a bit more why this is by breaking down the analysis of a Bayesian A/B test and showing how tricky the analytical path is and exploring more of t
Roman Finger Counting
I recently wrote a final paper on the history of written numerals. In the process, I discovered this fascinating tidbit that didn’t really fit in my paper, but I wanted to put it somewhere. So I’m writing about it here.
A Software Engineer’s Guide to Cybernetics
Before ‘cyber’ was a prefix for everything internet and computers, it was how mathematicians were going to conquer the world.
What are Differential Equations and how do they work?
Science News, Physics, Science, Philosophy, Philosophy of Science
Hindley-Milner Type Inference (2012)
Robin Milner's type system with parametric polymorphism was a significant advance over the systems of Russell and Church. Arguably it is the ability to use type-variables that makes higher order logic a practical vehicle for proving non-trivial theorems. The Hindley-Milner algorithm is used to automatically infer…
Lambda Calculus Diagrams (2015)
The following table shows diagrams of identity, the booleans, some standard combinators, some Church numerals, the predecessor function on Church numerals, and Omega. term definition diagram alternative I/1 λx.x K/true λx.λy.x false/0 λx.λy.y S λx.λy.λz.(x z)(y z) Y λf.(λx.x x)(λx.f(x x)) 2 λf.λx.f(f x) 3 λf.λx.f(f(f…
Weighing a Car with Tire Pressures
The first thing I wanted to do with my Saab 96 was to establish a baseline weight.
Toward an API for the Real Numbers
Towards an API for the real numbers, Boehm, PLDI’20 Last time out we saw that even in scientific computing applications built by experts, problems with floating point numbers are commonplace. …
A brief introduction to the beauty of Information Theory
Lambdaclass's blog about distributed systems, machine learning, compilers, operating systems, security and cryptography.