Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 1,421 posts.

Software Engineering
2026
1055

Memory layout in Zig with formulas

I was recently encouraged to watch A Practical Guide to Applying Data Oriented Design (DoD) by Andrew Kelley, the creator of Zig1. Just 10 minutes into the talk, I was confronted with a skill I had never formally learned… the arithmetic behind memory layout of types. Zig is a modern, C-like programming language which…