Early 2021 Mega Update

The last four years of my coding life have been incredibly stressful. In this time I’ve: Started a job at AMD in the GPU compiler team. Left a job at AMD for Unity in the Burst compiler team. Wrapped up my involvement as a creator of Vulkan and SPIR-V. Learnt the C# and Rust programming languages. You couple this with the absolute trainwreck that was 2020 (COVID yay) and now it looks like 2021 might be mostly a write-off too, and the fact that my dog Benji has progressively worsening epilepsy that is horrific to witness - it is safe to say that I’m probably at the highest level of stress I’ve ever been under.

Advent of Code 2020 - Review

I’ve always wanted to do the Advent of Code 2020 puzzles as a way to wind down in the run up to Christmas, but never quite got my act in gear to do it. This year I’ve changed that, and I’ve pushed all my solutions to my AOC 2020 repository on GitHub. I thought that now that I’ve completed the challenge, I’d do a review mostly of how I used Rust to complete the challenges and what I found.

Advent of Code 2020

I’ve always wanted to do the Advent of Code 2020 puzzles as a way to wind down in the run up to Christmas, but never quite got my act in gear to do it. This year I’m changing that, and I’ve just pushed my 1st day’s solutions to my AOC 2020 repository on GitHub. Solution parameters aside: I’m doing this in Rust. I started writing it out in Zig but honestly the docs are nowhere near as clear as with Rust, and the tooling isn’t there.

Exploring Hourglass APIs in Rust

There are two talks on APIs that I think every programmer should watch, learn, and study from: Designing and Evaluating Reusable Components from Casey Muratori. This absolutely wonderful talk is the fundamental source for how to design APIs. Hourglass Interfaces for C++ APIs from Stefanus Du Toit. This talk discusses having a rich API for users that is backed by a C API into proprietary code. These two talks give a really good and grounded lesson on fundamental API design - the choices you make and the ramifications they can have.

Introducing hashmap.h

I asked on twitter the other day whether anyone had a hashmap that could work with string slices - parts of a string that are not null-terminated and thus have to have an explicit length to accompany the pointer. I didn’t get any responses on this so I commented with a follow-up that I had grabbed some code written a few years back by the awesome Pete Warden of Google fame, and morphed it into what I required: