Best of 2018

The blog posts Hacker News loved most in 2018. 1,274 posts.

Software Engineering
1120

When the Compiler Bites

So far this year I’ve been bitten three times by compiler edge cases in GCC and Clang, each time catching me totally by surprise. Two were caused by historical artifacts, where an ambiguous specification lead to diverging implementations. The third was a compiler optimization being far more clever than I expected…

1123

Basics of Futexes

The futex (short for "Fast userspace mutex") mechanism was proposed by Linux contributors from IBM in 2002 [1] ; it was integrated into the kernel in late 2003. The main idea is to enable a more efficient way for userspace code to synchronize multiple threads, with minimal kernel involvement.

1130

What is Software Engineering?

Nearly all of Go’s distinctive design decisions were aimed at making software engineering simpler and easier. We’ve said this often. The canonical reference is Rob Pike’s 2012 article, “ Go at Google: Language Design in the Service of Software Engineering .” But what is software engineering?

1134

Sum Types Are Coming (2015)

Just as all mainstream languages now have lambda functions, I predict sum types are the next construct to spread outward from the typed functional programming community to the mainstream. Sum types are very useful, and after living with them in Haskell for a while, I miss them deeply when using languages without them…

1136

The Value of Undefined Behavior

In several places, the C and C++ language specifications use a curious, and fairly controversial, phrase: undefined behavior . For certain program constructs, the specification prescribes no specific behavior, instead allowing anything to happen . Such constructs are considered erroneous, and so the result depends on…