A Fair, Cancelable Semaphore in Go
Building a fair, cancelable semaphore in Go from scratch, exploring concurrency challenges and implementing FIFO ordering with context cancellation.
Andrew Healey writes about programming languages, compiler design, systems programming, and performance optimization. His blog covers building interpreters, compilers, sandboxes, games, and creative developer tooling, often with a focus on speed and efficiency.
123 articles from this blog
Building a fair, cancelable semaphore in Go from scratch, exploring concurrency challenges and implementing FIFO ordering with context cancellation.
A developer details building a solver for the NYT Pips puzzle using TypeScript, DFS, and optimizations, including a debug UI and tree visualization.
A developer builds a bytecode compiler and VM for a Forth-like language, explaining its stack mechanics, loops, and variables.
Introducing Icepath, a unique 2D programming language inspired by sliding puzzles, where code execution visually traverses a grid of opcodes.
A technical deep dive into optimizing word count performance using Python, C, and SIMD programming, achieving massive speed improvements.
A developer details performance optimizations for a macOS disk usage tool, achieving a 28% speed increase by switching from Tokio to Rayon for parallelism.
A developer creates a faster disk usage tool for macOS using concurrency and system-specific APIs, benchmarking it against existing solutions.
A technical exploration of llmfs, a FUSE filesystem where all file operations are dynamically generated and controlled by an LLM.
A developer details creating a best-first search solver for the word puzzle game Queuedle, analyzing its search space and heuristic.
A developer explains the creation of Queuedle, a daily word puzzle game combining Wordle and Scrabble mechanics, including its seeded random generation.
Explains how bitboards use 64-bit integers and bitwise operations to efficiently represent and manipulate chess game states.
A developer explores package manager performance by building a custom tool, benchmarking it against bun, and analyzing the results.
A developer explores using the LÖVE framework and Lua to build game prototypes and a chess UI, sharing code snippets and insights.
A technical guide on compiling a Lisp variant to bytecode and executing it in a custom, stack-based virtual machine.
Explores algorithms for generating perfect 2D mazes, including Aldous Broder and Random DFS, with code examples and visualizations.
Explores methods to make Python's random number generation deterministic for debugging, from mocking to intercepting system calls.
A developer shares technical notes on building a 2D multiplayer arena shooter from scratch, covering game object management and client/server sync.
A developer details adding constant folding, propagation, and dead-code elimination optimizations to their Lisp-to-JavaScript compiler.
A developer details building a Lisp-to-JavaScript compiler in Rust, covering parsing, AST generation, and code transformation.
A developer adds a line profiler to their custom programming language to measure and optimize performance directly in the terminal.