On Git Refs
On Git Refs Oct 7, 2026 I have recently improved my mental model of Git. Consider these two git commands: $ git fetch origin master $ git switch -c my-feature origin/master Do you understand why is i
Creator of rust-analyzer. TigerBeetle engineer. Expert on IDE tooling and language servers.
https://matklad.github.ioOn Git Refs Oct 7, 2026 I have recently improved my mental model of Git. Consider these two git commands: $ git fetch origin master $ git switch -c my-feature origin/master Do you understand why is i
Benchmark In Milliseconds Oct 5, 2026 How long should a micro benchmark run? My rule of thumb is to tweak the input size until the benchmark takes about 300ms, for the following reasons: 1.31s with 2
Finding Bugs Sep 19, 2026 Are generative (randomized) tests significantly more effective than example-based unit-tests at discovering bugs? There’s an interesting discussion about this on lobste.rs.
Static Allocation, Constant Work Sep 2, 2026 In reply to this email: Memory Safety’s Hardest Problem named something I’d hit but couldn’t articulate. Your case is a pointer into one union variant sur
Cancelation Terminology Aug 31, 2026 A short note explaining the difference between synchronous cancelation, asynchronous cancelation, and graceful shutdown. I am not too attached to these specific t
Rust Glancer Aug 21, 2026 Rust Glancer, a functional LSP server for Rust which uses two orders of magnitude less RAM, is incredibly cool. Go check it out! This post started as a comment on lobste.rs,
Better Batteries Aug 20, 2026 One of the eternal schisms in programming is over the question of whether the standard library should be minimal or encompassing. This is the wrong question to ask. The
Printing Lists Aug 14, 2026 To print a comma-separated list, a concise idiom is to optionally print the comma first, before the element: for (items, 0..) |item, item_index| { if (item_index > 0)
Zig’s Io.Threaded is Neat Aug 6, 2026 std.Io.Threaded is one of the implementations of Zig’s new Io interface that enables concurrency. This is a boring “just use threads” impl. I personally find it
Memory Safety’s Hardest Problem Jul 20, 2026 Uplifting a lobsters comment for easier reference. The central memory safety counter example, the hardest case to solve, doesn’t have anything to do with
CSS: Unavoidable Bad Parts Jun 4, 2026 An ersatz CSS tutorial for people who need to style a web page, but aren’t web developers. I am a wrong person to write this kind of thing, as I have neither th
TIL: Symlinking NixOS Dotfiles May 21, 2026 The standard answer to managing dotfiles on NixOS is home-manager. I’ve never used it, due to two aesthetic and one practical objection: The approach I lik
Always Be Blaming May 18, 2026 A few tips on 4D-ing your code comprehension skills. I wrote on the importance of reading code before: Look Out For Bugs My default approach to reading is “predictive”:
Catch Flakes On Main May 14, 2026 A small Mechanical Habit today: When using not rocket science rule / merge queue, continue to redundantly run the full test suite on main. Maintain an easily accessi
Learning Software Architecture May 12, 2026 In reply to an email asking about learning software design skills as a researcher physicist: I was attached to a bioinformatics lab early in my career, so
Steering Zig Fmt May 8, 2026 Two tips on using zig fmt effectively. Read this if you are writing Zig, or if you are implementing a code formatter. For me, zig fmt is better than any other formatter I
Minimal Viable Zig Error Contexts May 3, 2026 fn process_file(io: Io, path: []const u8) !void { errdefer log.err("path={s}", .{path}); const fd = try Io.Dir.cwd().openFile(io, path, .{})
256 Lines or Less: Test Case Minimization Apr 20, 2026 Property Based Testing and fuzzing are a deep and science-intensive topic. There are enough advanced techniques there for a couple of PhDs, a PB
Consensus Board Game Mar 19, 2026 I have an early adulthood trauma from struggling to understand consensus amidst a myriad of poor explanations. I am overcompensating for that by adding my own attemp
JJ LSP Follow Up Mar 5, 2026 In Majjit LSP, I described an idea of implementing Magit style UX for jj once and for all, leveraging LSP protocol. I’ve learned today that the upcoming 3.18 version of L