Notes on structured concurrency, or: Go statement considered harmful
Every concurrency API needs a way to run code concurrently. Here's some examples of what that looks like using different APIs:
Posts that commenters keep linking to, ranked by how many different people have cited them in Hacker News comments. 42 posts.
Every concurrency API needs a way to run code concurrently. Here's some examples of what that looks like using different APIs:
A catalogue of software constructs, languages, or APIs which are unexpectedly Turing-complete; implications for security and reliability.
An introduction to the idea that code should be approached with a mindset towards compressing it semantically, rather than orienting it around objects.
Minimodem can play and capture audio modem tones in real-time via the system audio device, or in batched mode via audio files.
My blog post on falling in love with Rust got quite a bit of attention – with many being surprised by what had surprised me as well: the high performance of my naive Rust versus my (putatively less naive?) C. However, others viewed it as irresponsible to report these performance differences, believing that these…
As I was listening to Anil talk about daemons spawning processes and sysadmins killing them, I thought, "What a great user interface!" Imagine running around with a shotgun blowing away your daemons and processes, never needing to type kill -9 again.
Keeping two or more copies of the same document synchronized with each other in real-time is a complex challenge. This paper describes the differential synchronization algorithm. Differential synchronization offers scalability, fault-tolerance, and responsive collaborative editing across an unreliable network.
The text in these files is the unedited original manuscript. M-K has fine copy editors, who have fixed all the minor typos, spelling, and grammar errors in the printed book, but if you come across factual errors I'd still appreciate help getting all the details of linking and loading as complete and correct as…
Is IEEE floating-point math deterministic? Will you always get the same results from the same inputs? The answer is an unequivocal “yes”. Unfortunately the answer is also an unequivocal “no”. I’m a…
In this post I want to explore the costs of threads on modern Linux machines, both in terms of time and space. The background context is designing high-load concurrent servers, where using threads is one of the common schemes .
A while ago I did a blog post about how long DNS resolvers hold results in cache for, using RIPE Atlas probes testing against their default resolvers (in a lot of cases, the DNS cache on their modem/router).
Note: This blog post from 2018 predates the Intel Ice Lake (Sunny Core) and AMD Zen 4 processors. These newer processors are not affected by the issues described in this blog post. Our processors typically do computations using small data stores called registers. On 64-bit processors, 64-bit registers are frequently…
Programming with dates, times, and timezones is hard. But here's some help.
The recent reveal of Meltdown and Spectre reminded me of the time I found a related design bug in the Xbox 360 CPU – a newly added instruction whose mere existence was dangerous. Back in 2005 I was…
Please read this update instead: Why Create a New Unix Shell? (2021) . This page is obsolete!
This post discusses how maps are implemented in Go. It is based on a presentation I gave at the GoCon Spring 2018 conference in Tokyo, Japan.
This is the introduction of a multipart series. It is to give a high level overview without really deeply diving into any individual component.
Vyacheslav Egorov, who goes by mraleph on the Web, wrote a responseto my article “Oxidizing Source Maps with Rust and WebAssembly”titled “Maybe you don’t nee...
See also Dennis Ritchie on aliasing, PLOS article , pointer alias in C and remarks on the purpose of C.
bpftrace (DTrace 2.0) for Linux 2018: the bpftrace front-end
tl;dr: Rebuilding a target because its mtime is older than the mtimes of its dependencies, like `make` does, is very error prone. redo does...
The story of these attacks starts in late 2004. I had submitted my doctoral thesis and had a few months before flying back to Oxford for my defense, so I turned to some light reading: Intel's latest "Optimization Manual", full of tips on how to write faster code. (Eking out every last nanosecond of performance has…
As a rule, "sophisticated" progrmming is pretty boring - optimizing the unnecessary to speed up the uninteresting. Here, however, is an incredibly sophisticated package intended for fun and games. The more you know about software, the more astounded you will become as you read this.
Zombies probably won’t consume 32 GB of your memory like they did to me, but zombie processes do exist, and I can help you find them and make sure that developers fix them. Tool source link is at t…
I got a call that on newer hardware some performance regression tests have become slower. Not a big deal. Usually it is a bad configuration somewhere in Windows or some BIOS settings were set to no…
By now, everyone knows that something “big” just got announced regarding computer security. Heck, when the Daily Mail does a report on it …
I’ve spent a good deal of my professional life arguing against using protobuffers. They’re clearly written by amateurs, unbelievably ad-hoc, mired in gotchas, tricky to compile, and solve a problem that nobody but Google really has. If these problems of protobuffers remained quarantined in serialization abstractions…
Back in 2015, I wrote a popular post comparing the performance of a number of microSD cards when used with the Raspberry Pi. In the intervening three years, the marketplace hasn't changed a ton, but there have been two new revisions to the Raspberry Pi (the model 3 B and just-released model 3 B+). In that article, I…