Skip to content
← All sources

matklad

Blog by Alex Kladov

Mute matklad?

Its posts will be hidden from Latest, topic feeds and Favourites in this browser.

Your saved links, read history and favourite selection stay unchanged. You can still open the source’s own page.

Unmute it here or in Reading preferences whenever you like.

matklad's Arts&Crafts

6 posts in the last 90 days · newest 29 Oct

10 of 10 posts on this page

matklad

On Git Refs

I have recently improved my mental model of Git. Consider these two git commands:

5 min read

matklad

Benchmark In Milliseconds

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:

matklad

Finding Bugs

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

10 min read

matklad

Cancelation Terminology

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…

5 min read

matklad

Rust Glancer

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…

4 min read

matklad

Better Batteries

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:

1 min read

matklad

Printing Lists

To print a comma-separated list, a concise idiom is to optionally print the comma first, before the element:

matklad

Zig's Io.Threaded is Neat

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…

4 min read