In reply to this email:
matklad
• Alex Kladov
matklad's Arts&Crafts
matklad
• Alex Kladov
In reply to this email:
matklad
• Alex Kladov
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.
matklad
• Alex Kladov
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!
matklad
• Alex Kladov
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:
matklad
• Alex Kladov
To print a comma-separated list, a concise idiom is to optionally print the comma first, before the element:
matklad
• Alex Kladov
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.
matklad
• Alex Kladov
Uplifting a lobsters comment for easier reference.
matklad
• Alex Kladov
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 the time, nor experience. I'd much rather read a book about this. Alas, I had to learn all this stuff from trawling MDN, so perhaps it is valuable to document what I have so far.
matklad
• Alex Kladov
The standard answer to managing dotfiles on NixOS is home-manager. I've never used it, due to two aesthetic and one practical objection:
matklad
• Alex Kladov
A few tips on 4D-ing your code comprehension skills.
matklad
• Alex Kladov
A small Mechanical Habit today:
matklad
• Alex Kladov
In reply to an email asking about learning software design skills as a researcher physicist:
matklad
• Alex Kladov
Two tips on using zig fmt effectively. Read this if you are writing Zig, or if you are implementing a code formatter.
matklad
• Alex Kladov
Out of the box, Zig provides minimal and sufficient facilities for error handling --- strongly-typed error codes. Error reporting is left to the user. Idiomatic solution is to pass a Diagnostics out parameter (sink) to materialize human-readable strings as needed.
matklad
• Alex Kladov
Property Based Testing and fuzzing are a deep and science-intensive topic. There are enough advanced techniques there for a couple of PhDs, a PBT daemon, and a client-server architecture. But I have this weird parlor-trick PBT library, implementable in a couple of hundred lines of code in one sitting.
matklad
• Alex Kladov
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 attempts to the fray. Today, I want to draw a series of pictures which could be helpful. You can see this post as a set of missing illustrations for Notes on Paxos, or, alternatively, you can view that post as a more formal narrative counter-part for the present one.
matklad
• Alex Kladov
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 LSP has a feature to make this massively less hacky: Text Document Content Request