Best of 2022

The blog posts Hacker News loved most in 2022. 1,551 posts.

Software Engineering
1323

SQL + M4 = Composable SQL

I often work with clients who have large “data lakes” or big star schema style enterprise databases with fact and dimension tables as far as the eye can see. Invariably said clients end up with a substantial SQL codebase composed of hundreds of independent queries with lots of overlap between them. I want to be able…

1324

Practising Programming

When we see a world-class musician flawlessly play challenging music, it can be tempting to imagine that they were always able to do so. A moment’s thought makes it obvious that they must have had to spend huge amounts of time practising basic techniques in order to reach that level. What’s less obvious is that they…

1325

Arc and Mutex in Rust

When writing concurrent Rust you will encounter Arc and Mutex types sooner or later. And although Mutex might already sound familiar as it's a concept known in many languages, chances are you haven't heard about Arc before Rust. What's more, you can't fully understand these concepts without tying them to the ownership…

1344

Faster Sorting with Go Generics

Recently, a new set of sorting functions has landed in Go's golang.org/x/exp/slices package [1] . These functions leverage Go generics to provide a more ergonomic API for sorting (without requiring users to implement sort.Interface ), and also deliver a nice performance improvement, as the CL demonstrates.