Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 2,391 posts.

Math & Algorithms
Any year
883

My favorite prime number generator

Many years ago I've re-posted a Stack Overflow answer with Python code for a terse prime sieve function that generates a potentially infinite sequence of prime numbers ("potentially" because it will run out of memory eventually). Since then, I've used this code many times - mostly because it's short and clear. In this…

888

How Far Can You Get From McDonald's?

This summer, cruising down the I-5 through California’s Central Valley to the Los Angeles Basin, I unwittingly stumbled upon a most exasperating development: the country strip mall . First, let me state that I don’t hate. I’ve got nothing against Petco, Starbucks, OfficeMax, et al. When overcome by the desire for a…

900

The new APT 3.0 solver

APT 2.9.3 introduces the first iteration of the new solver codenamed solver3, and now available with the –solver 3.0 option. The new solver works fundamentally different from the old one. How does it work? Solver3 is a fully backtracking dependency solving algorithm that defers choices to as late as possible. It…