Casaderic Compendivm

Posts

Declarative Systems With Nix

A local development environment is usually a set-and-forget affair (until something breaks, anyway). Mine had accreted for years across two machines and two operating systems, and the state of each was known only to whichever shell history survived last. So I rebuilt the whole thing declaratively with Nix, and I have been enjoying the process far more than I expected to.

Zero-Allocation Logging in Go

Go’s structured logging library (log/slog) is quite the clever piece of standard library code. This is thanks to the processing of log attributes {key:value} with zero heap allocations. And despite the slog.Logger interface (inspired by packages uber-go/zap and rs/zerolog) now long being the go-to idiom for any generic logging use-cases in Go; it is additionally highly-optimized for use in application hot-paths.