Topics /

Math & Algorithms

The most popular blog posts about math & algorithms on Hacker News. 215 posts.

2018
62

Probabilistic Filters By Example

Probablistic filters are high-speed, space-efficient data structures that support set-membership tests with a one-sided error. These filters can claim that a given entry is definitely not represented in a set of entries, or might be represented in the set. That is, negative responses are conclusive, whereas positive…

65

A study of musical scales (2017)

PREFACE. This essay was written in 2009. Since then, a few errata have been corrected and I embedded the youtube videos, but there have been no substantial additions. I think it still holds up fairly well, but if I were to rewrite it today, I would change some things. My main regret is using the criteria of maximum…

67

Deciphering the postcard-sized raytracer

"He's done it again!" was my first thought as I looked at the back of a postcard sized Pixar flier [1] which was covered in code. In the lower right corner, the blob of statements and expressions had been signed by none other than Andrew Kensler. For those who are not familiar with him, Andrew is the programmer who…

68

Secrets of smooth Béziers

I haven’t posted here much lately, and I admit, it’s because I’ve gotten sidetracked thinking about curves again. I did my PhD thesis on curves, so spent years thinking about them, then put that on hold for a while, aside from some work in crunching font file sizes down.

73

An Introduction to Cache-Oblivious Data Structures

If you read my recent post about Postgres you may have noted that Postgres operates primarily with fixed-size blocks of memory called “pages.” By default, Postgres pages are 8KB. This number is tuned to match operating system page sizes which are tuned to match hardware cache sizes. If you were to run Postgres on…

85

Why Y? Deriving the Y Combinator in JavaScript

In this essay, after a brief review of the work we’ve already done on the Mockingbird, we’ll derive the Why Bird, known most famously as the Y Combinator . The why bird provides all the benefits of the mockingbird, but allows us to write more idiomatic JavaScript. We’ll see that one of the benefits of writing…