Best of 2021

The blog posts Hacker News loved most in 2021. 358 posts.

Systems & Performance
187

The macOS Sandbox File Limit

There has recently been some renewed discussion on Twitter about the limitation that the macOS sandbox places on the number of open files an app can access at once. Apps are still running into problems because of this limitation, and there is not a lot of technical detail available on it outside of Apple, so I’d like…

193

The Future Needs Files

For many mobile users, files are like dinosaurs, a holdover from the bygone desktop era. Sure, they “work” but, they’re mostly there because, you know, ancient history. I’ve discussed this issue for the last 2 years and I usually get some version of “get over it grandpa”.

195

Design Issues in LLVM IR

On the whole, LLVM has a well-designed intermediate representation (IR), which is specified in the language reference . However, there are a number of areas where design mistakes have been made. And while the LLVM project is generally open to addressing such issues, mistakes in core IR design tend to be firmly…

206

Branchless Coding in Go

So, I was recently inspired by a coworker’s design to pack what would have been JSON (JavaScript Object Notation) data into a bunch of bit fields in an array of 64-bit elements. Binary arithmetic, bit-packing, and high performance are fun for me, so I thought of some ways to improve it, for learning purposes. Then I…

209

Fast CSV Processing with SIMD

I recently learned of csvquote , a tool that encodes troublesome CSV characters such that unix tools can correctly process them. It reverses the encoding at the end of the pipeline, recovering the original input. The original implementation handles CSV quotes using the straightforward, naive method. However, there’s a…