iPX Directory

Directory Technology

matklad

1 person subscribes

Paste it into any podcast app or feed reader to subscribe.

matklad's Arts&Crafts

Latest posts

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 it origin master in one command, and origin/master in the other? I didn’t, until a few weeks ago! My understanding was that git is a content-addressable database. Git stores commits, a commit is identif

7 Oct 2026
Benchmark In Milliseconds

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: Milliseconds are integers ranging from 1 to 999. Enough precision to notice even a small improvement, and easy to scan visually. No need for different units or floating points (compare 1.31s with 239ms ). Anything

5 Oct 2026
Finding Bugs

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 . One argument in favor of unit tests is, paraphrasing My generic fuzzer wasn’t able to find this tricky bug in Rust regex crate. To me, it seems that generative testing should shake out that particular

19 Sep 2026
Static Allocation, Constant Work

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 surviving a write of a different variant, so live typed pointers end up reading bytes that belong to something else now. Last year I wrote a limit-order matching engine and shipped a use-after-free: a can

2 Sep 2026
Cancelation Terminology

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 three terms , but I want to call your attention to the three things behind them, which are important not to confuse with each other. synchronous cancelation is an (often implicit) control flow structure

31 Aug 2026
Rust Glancer

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, but I figured it out that it’s better to publish it somewhat more prominently. Don’t expect polished writing though! Some thoughts: rust-analyzer uses rowan for syntax tree representation Yeah, rowan

21 Aug 2026
Better Batteries

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 right one is: Which social architecture creates a high-quality standard library? Python is always brought up as example of leaky batteries exploding in slow motion, but this has nothing to do with size

20 Aug 2026
Printing Lists

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 ) std.debug.print( ", " ); std.debug.print( "{}" , .{item}); }

14 Aug 2026
Zig's Io.Threaded is Neat

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 neat though — it does this weird thing that I wanted to do for ages , that to my knowledge no one else is doing properly, and implements it better than I thought to be possible. Io.Threaded uses blocki

6 Aug 2026
Memory Safety's Hardest Problem

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 destructors or heap: const std = @import ( "std" ); const E = union ( enum ) { a: u128 , b: [] const u8 , }; pub fn main () void { const bad_addr: u128 = @intFromPtr ( & main); var e: E = .{ .b = "hell

20 Jul 2026