Top posts

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

Software Engineering
Any year
3902

Brilliant or insane code?

I came upon a very interesting and cryptic snippet of code somewhere nameless , and I can’t decide if it is brilliant or completely insane. It is a very obscure way of accomplishing the required task, but it’s around four times faster than the alternatives I’ve tried, so I have to admit that it’s not completely…

3903

This code smells of desperation

A few weeks ago I had the questionable pleasure of diving into the math exception handler of WIN87EM.DLL, the Windows 3.1 math emulator and FPU support library. Actually WIN87EM.DLL appears to have been first shipped with Windows 3.0, and the version in Windows 3.1 is more or less identical. The version shipped with…

3905

Building friend catchers

As a 13 year old, my dad’s advice on internet presence was: “Everything you post will be used against you in the future. So you should never associate your name with anything on the internet”. As a rebellious teenager my view was the opposite: “Everything you post on the internet will get lost. You should associate…

3913

Better Compression with Zstandard

I think I first heard about the Zstandard compression algorithm at a Mercurial developer sprint in 2015. At one end of a large table a few people were uttering expletives out of sheer excitement. At developer gatherings, that's the universal signal for something is awesome . Long story short, a Facebook engineer…

3917

Chip

I made this today while experimenting with cellular automata parameters , and I found it uniquely beautiful. After a while the patterns stabilise and start to look like a kind of constantly-moving circuit diagram. I call it Chip . The source is on GitHub if you're that way inclined.

3918

What's In A GIF

We sill start off by walking though the different parts of a GIF file. (The information on this page is primarily drawn from the W3C GIF89a specification .) A GIF file is made up of a bunch of different "blocks" of data. The following diagram shows all of the different types of blocks and where they belong in the…

3920

My website is one binary (2022)

my website is one binary 2022-04-06 ---------------------------- a.k.a. this one weird trick that inspires me to program creatively i have struggled for years to figure out a website framework that feels good to me. i tried all of the classics, including but limited to: - ghost - hugo - jekyll - sr.ht + tarball …

3923

Programming trick questions

Note: me telling you up front that these are trick questions rather gives the answers away in most cases, but oh well. Questions Question 1 What's the fastest way to sort a jumbled array, given that the array has length N and contains all the integers from 1 to N inclusi...

3930

Four months with Haskell

At the end of January of this year, I switched to a new job, almost exclusively because I was enticed by the idea of being able to write Haskell. The concept of using such an interesting programming language every day instead of what I’d been doing before (mostly Rails and JavaScript) was very exciting, and I’m…