Writing my own dithering algorithm in Racket
My journey implementing a new dithering algorithm in the Racket programming language.
Topics /
The most popular blog posts about math & algorithms on Hacker News. 2,391 posts.
My journey implementing a new dithering algorithm in the Racket programming language.
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…
Two of my favorite numbers are pi: $latex \pi = 3.14159… $ and the golden ratio: $latex \displaystyle{ \Phi = \frac{\sqrt{5} + 1}{2} } = 1.6180339… $ They’re related: $latex \pi =…
Searching through millions of points in an instant
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…
A modest mathematical framing of language
The first thing I wanted to do with my Saab 96 was to establish a baseline weight.
Where did complex numbers come from? You might think that people invented \(i\) just so that they had a solution to the quadratic equat...
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. …
An introduction to learned image compression using neural networks.
In 2019, Google and Cloudflare ran an experiment where they upgraded HTTPS for many "real users’ connections" to use post-quantum encryption. They then reported statistics on how affordable this was. Google had also run a similar experiment in 2016: "While it's still very early days for quantum computers, we're…
Why the HJB is Bellman's equation in continuous time, why continuous time matters, and how to solve the resulting control problem with neural policy iteration.
Some time ago I gave a talk in which I showed that something unexpected happened with a deck of playing cards. I had some volunteers try it, and while they did so I talked about just how many orderings there are for 52 cards. I computed (an approximation to) $52!$ (52 factorial) by hand. It's not so hard - you just…
In some ways path tracing is one of the simplest and most intuitive ways to do ray tracing.
This post explores some concepts behind Gaussian processes, such as stochastic processes and the kernel function. We will build up deeper understanding of Gaussian process regression by implementing them from scratch using Python and NumPy.
Lambdaclass's blog about distributed systems, machine learning, compilers, operating systems, security and cryptography.
Mathematicians study a variety of different mathematical structures, but perhaps the structures that are most commonly associated with mathematics are the number systems, such as the integers $late…
Overview In this post, I will describe a collaborative effort that proved that unwinnable Slay the Spire seeds exist. This project is joint work with gamerpuppy and ForgottenArbiter and is based on the several attempts that have been made to prove unwinnability for seeds in Slay the Spire.
We have been using Signals in production for years via several modern front-end frameworks like Solid, Vue, and others, but few of us are able to explain how they work internally. I wanted to dig into it, especially diving deep into the push-pull based algorithm, the core mechanism behind their reactivity.
Klein - Realtime Projective Geometric Algebra
Interactive ternary chart of citrus ancestry
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…