Topics /

Math & Algorithms

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

2025
182

Set theory with types

It is known that mathematics is heavily reliant on set theory, but no one can agree on what set theory is. Many people today understand that we have a choice between set theory and type theory , but they don’t know what type theory is either. Many think that type theory refers to some sort of dependent type theory, as…

184

The Mathematics of Crochet

I remember thinking at school when will I ever in my “real life” use maths. Well much to my utter surprise I’ve come to the stark realisation that there is a link between mathematics and crochet. …

189

Parser Combinators Beat Regexes

Someone online was solving Advent of Code problems, and had a question about last years’ day 3 . They had a working solution using regular expressions (regexes) on String values, but they wanted to use ByteString values instead for performance reasons. They were surprised, however, that there seems to be a lack of…

197

Lossless Float Image Compression

Back in 2021 I looked at OpenEXR lossless compression options (and I think my findings led a change of the default zip compression level , as well as change of the compression library from zlib to libdeflate . Yay blogging about things!) . Then in 2023 I looked at losslessly compressing a bunch of floating point data…

203

Million Times Million

Is a million times a million a billion or is it a trillion ? For my entire childhood, it was a billion, only for me to grow up and realise, as an adult, that it had better be a trillion!

210

Picturing Mathematics

I’m a great believer in low-tech math. I don’t like to rely on things a computer tells me; what if there’s a bug in the code? I prefer trusting things that I can check for myself. At the same…