Topics /

Math & Algorithms

The most popular blog posts about math & algorithms on Hacker News. 2,851 posts.

Any year
422

The Truth About Linear Regression (2015)

This is basically a compilation of the lecture notes I wrote when teaching 36-401, Modern Regression, in fall 2015 . I offer it here on the chance that it might be of interest to those learning, or teaching, linear regression. There's no shortage of resources on that, but I have tried to present the subject as though…

428

“Why not just use Lean?”

I have been told that when proposing to formalise mathematics these days, you have to explain why you are not using Lean. And that reminds me why I left the dependent-typed world 40 years ago: its cultism, insularity and conformity. Lean is a great language with good tools, a large library and a huge, enthusiastic…

431

Functorio

You might have heard people say that functional programming is more academic, and real engineering is done in imperative style. I’m going to show you that real engineering is functional, and …

432

A Branchless UTF-8 Decoder

This week I took a crack at writing a branchless UTF-8 decoder: a function that decodes a single UTF-8 code point from a byte stream without any if statements, loops, short-circuit operators, or other sorts of conditional jumps. You can find the source code here along with a test suite and benchmark:

433

Why isn't there a replication crisis in math?

The replication crisis is a major problem in medicine and social science; we know that a huge fraction of the published literature is outright wrong. But in math we don't seem to have a similar crisis, despite reasonably frequent minor errors in published papers. Why not, and what can this tell us about the fields…

442

Dynamic Progamming: First Principles

Many problems of todays world require multiple decisions made throughout the lifetime of the problem. Choices are made based upon information, including previous decisions made in the problem. This article looks at how Dynamic Programming can be applied to help solve these problems in an efficient manner.

443

The game of life emulated in the game of life

Conway's Game of Life, emulated in Conway's Game of Life: The life simulator used is Golly which has a built-in script to generate these metapixel grids (select a pattern, and choose "metafier.py" from the scripts list). Outer Totalistic Cellular Automata Meta-Pixel: The metacell uses a period 184 tractor beam, which…