Best of 2021

The blog posts Hacker News loved most in 2021. 1,517 posts.

Software Engineering
1476

Constexpr is a Platform (2020)

Let me share a useful insight with you: constexpr is a platform. Just like you write code that targets Windows or a microcontroller, you write code that targets compile-time execution. In both cases you restrict yourself to the subset of C++ that works on your target platform, use conditional compilation if your code…

1491

Documents ≠ Programs

I've recently become active again on twtxt.net , the platform that puts the "social" in "anti-social social media". There is a lot of intelligent discussion to be had there, and for the past couple days a discussion has been going on about technology buzzwords and, later, unnecessary complexity on websites. I was…

1494

Introduction to WebAssembly Components

WebAssembly and WASI show great promise for the future of computing outside the browser, and the WebAssembly component model aims to improve the portability, cross-language, and composition story for Wasm. This article explains the goals of the component model, and showcases how to use tooling from the Bytecode…

1498

; Echo “Shell Injection”

This is an introductory article about shell injection, a security vulnerability allowing an attacker to execute arbitrary code on the user's machine. This is a well-studied problem, and there are simple and efficient solutions to it. It's relatively easy to design library API in such a way as to shield the application…

1500

When can glibc be built with Clang?

Updated in 2026: glibc 2.43 added experimental support for building with Clang. In September 2021, I wrote "So, dear glibc, will you be happy with my sending Clang patches?" in Build glibc with LLD 13. We have come to a turning point. In Linux Plumbers Conference 2021, at the glibc Birds of a Feather session, I asked…