Best of 2019

The blog posts Hacker News loved most in 2019. 4,838 posts.

Any topic
932

Go Slices Are Fat Pointers

One of the frequent challenges in C is that pointers are nothing but a memory address. A callee who is passed a pointer doesn’t truly know anything other than the type of object being pointed at, which says some things about alignment and how that pointer can be used… maybe. If it’s a pointer to void ( void * ) then…

935

How Rust optimizes async/await

The issue to stabilize an initial version of async/await in Rust has left final comment period. The feature looks slated to stabilize in an upcoming release, most likely 1.39. This represents the culmination of an enormous amount of work by people all over the Rust community. But it’s also only the beginning of…

937

The Power of Shower Thoughts

One of the best ways to learn and come up with new ideas is to focus intensely on a problem, then let your mind wander. I’ve enjoyed doing this when problem solving and learning, and recently I’ve been thinking about how weird it is to build trust in your unconscious to do the work for you, especially when it comes to…

939

Popcount CPU instruction

Most CPU architectures in use today have an instruction called popcount , short for “population count”. Here’s what it does: it counts the number of set bits in a machine word. For example (assuming 8-bit words for simplicity), popcount(00100110) is 3 and popcount(01100000) is 2 .

942

Zero Cost Abstractions

The idea of a zero cost abstraction is very important to certain programming languages, like Rust and C++, which intend to enable users to write programs with excellent performance profiles with relatively little effort. Since this idea is fundamental to the design of Rust and my work, I want to investigate, for a…

944

The Day I Fell in Love with Fuzzing

In 2007 I wrote a pair of modding tools, binitools , for a space trading and combat simulation game named Freelancer . The game stores its non-art assets in the format of “binary INI” files, or “BINI” files. The motivation for the binary format over traditional INI files was probably performance: it’s faster to load…

955

The Illustrated Word2vec

Discussions: Hacker News (347 points, 37 comments), Reddit r/MachineLearning (151 points, 19 comments) Translations: Chinese (Simplified), French, Korean, Portuguese, Russian “There is in all things a pattern that is part of our universe. It has symmetry, elegance, and grace - those qualities you find always in that…

960

Day of the Tentacle

Although they didn’t know one another at the time, Dave Grossman and Tim Schafer both found themselves at a similar place in life in the summer of 1989: just out of university and uncertain what to do next. Both saw the same unusual advertisement in the newspaper: an advertisement for programmers who could also write…