Many software projects take a long time to compile. Sometimes that’s just due to the sheer amount of code, like in the LLVM project. But often a build is slower than it should be for dumb, fixable reasons. I’ve had the suspicion that most builds are doing dumb stuff, but I had no way to see it. So I’ve been working on a cross-platform tool to help speed up builds (you can try it, see below).| danielchasehooper.com
My last article about generic data structures in C was written to set the stage for today’s topic: A data structure that can be used in place of dynamic arrays, has stable pointers, and works well with arena allocators. It’s been independently discovered by different programmers over the years and so goes by different names. A 2001 paper called it a “levelwise-allocated pile” (bleh). Zig calls it a “Segmented List”. Then theres C++ with std::deque, which is only somewhat similar.| danielchasehooper.com
I write type safe generic data structures in C using a technique that I haven’t seen elsewhere1. It uses unions to associate type information with a generic data structure, but we’ll get to that. My approach works for any type of data structure: maps, arrays, binary trees… but for this article I illustrate the ideas by implementing a basic linked list. Since many people aren’t aware you can do C generics at all, I figured I’d start simple and build up to this:| danielchasehooper.com
The origin story of a 3D Modeler made very quickly Read the whole article on danielchasehooper.com →| Daniel Hooper
Ideas every programmer likes and why Garbage Collection and Object Oriented Programming don’t count| danielchasehooper.com
My journey making a Sudoku variant that doesn’t have rows or columns| danielchasehooper.com
An interactive guide on making 2d animations using signed distance fields in GPU shaders| danielchasehooper.com
How a 10 year old design choice for Swift’s type checker still haunts us to this day| danielchasehooper.com