Writing a C Compiler, in Zig (2025)
First foray into the Zig programming language
The latest blog posts to take off on Hacker News. 3,707 posts.
First foray into the Zig programming language
Many people, including myself, have implemented garbage collection (GC)libraries for Rust. Manish Goregaokar wrote up a fantastic survey of thisspace a few y...
C interpreters are a common language implementation technique and the basis for the reference implementations of languages such as Lua, Ruby, and Python. Unfortunately, C interpreters are slow, especially compared to language implementations powered by JIT compilers. In this post I’m going to show that it is possible…
I made a programming language. I'm sorry.
At a party, Sydney Von Arx asked if I could name 40 programming languages. Yeah, that's the Bay for you. Racket, Agda, Clean, Elm, TypeScript, sh, ASP, Verilog, JavaScript, Scheme, Rust, Nim, INTERCAL, sed, Isabelle, Visual Basic, zsh, AlokScript, Coq, Idris, Hack, Prolog, Whitespace, PureScript, Go, Odin, Haskell…
Ever wondered how Clojure's persistent vector actually works? This is part 1 of a blog series which aims to explain them.
Exploring tail-call-style interpreter implementation with an optimized Uxn emulator, on ARM, x86, and WebAssembly
You already know that a + b * c + d is calculated as a + (b * c) + d. But how do you encode that knowledge precisely enough for a machine to act on it?
News flash: C++26 is done! 🎉 On Saturday, the ISO C++ committee completed technical work on C++26 in (partly) sunny London Croydon, UK. We resolved the remaining international comments on the C++26…
TruffleRuby started as my internship project at Oracle Labs in early 2013. It is an implementation of the Ruby programming language on the JVM, using the Graal dynamic compiler and the Truffle AST interpreter framework . TruffleRuby can achieve peak performance well beyond that possible in JRuby at the same time as…
My new book guides you through the start-to-finish build of a real world web application in Go — covering topics like how to structure your code, manage dependencies, create dynamic database-driven pages, and how to authenticate and authorize users securely .
Writing, compiling, loading, and querying eBPF programs in one Lisp form.
Coherence and the orphan rules are a frequent source of complaints about Rust, and a common topic of language proposals. This post covers most of the existing proposals around coherence and my vision for how we should solve coherence once and for all.
A deep dive into the intricacies of the LLVM optimisation pipeline.
Curried functions are probably one of the first new things you come across if you go from an imperative language to a functional language. In purely functional languages, the convention is to define an n-parameter function inductively by staggering the parameters: applying the function to argument #1 returns a…
I spend a lot of time developing and teaching people about Clojure's open source tools for working with data. Almost everybody who wants to use Clojure…
I had seen many talks about coroutines but it never really clicked where I could use them outisde of async IO. Until I looked at how Unity uses them in C#.
A beginner's exploration of the many layers of Common Lisp development environments.
Java 26 is here, and its main purpose seems to be to provide a solid foundation for future things to come. It comes with a few new features, some performance improvements and multiple enhancements that mention Project Valhalla as the inspiration for their existence. This post has all the info!
Python 3.15’s JIT is now back on track
A draft design document describing lightweight userland cooperative threads for SBCL.
Erlang's mailbox design is more disciplined than Go's channels: only the owning process can read from a mailbox, and sends are asynchronous. Yet the four failure modes of shared mutable state still show up, just in different shapes.
C++26 brings us a small but meaningful cleanup to the language: deprecating ellipsis parameters without a preceding comma. This change, proposed in P3176R1, aims to improve C compatibility, reduce confusion, and pave the way for future language features. The proposal’s name is a playful reference to the Oxford comma …
Why 'indirection has a cost' is usually the wrong reason to inline and what actually costs you.
In the previous article we explored how Go’s memory allocator manages heap memory — grabbing large arenas from the OS, dividing them into spans and size classes, and using a three-level hierarchy (mcache, mcentral, mheap) to make most allocations lock-free. A key detail was that each P (processor) gets its own memory…
I built a tiny programming language where programs are candy grids, complete with a renderer, photo decoder, AST tree, and execution trace.
The four-pane System Browser has shaped Smalltalk development for forty years. It’s still brilliant at providing context. But the real problem may not be the browser itself—it may be the lack of composition between the tools that surround it.
I don’t think I’ve ever quite articulated my “grand vision” for Rust, despite having written a fair bit about the language and its features. There is a lot I could say here, but currently there are three directions of development which I find particularly interesting: