All guides
Every guide, newest first. Browse by topic instead, or read the daily tips and puzzles.
-
GCC 16.2: std::print, ranges::to, and from_range — What Actually Compiles, and the Macro That Does Not Exist C++
On GCC 16.2.0, std::print, ranges::to, and the from_range constructor all compile and run, and std::hazard_pointer fails at the include because the header is not shipped. The macro that tests from_range is __cpp_lib_containers_ranges, not __cpp_lib_ranges_from_range, which is not a standard macro name at all.
-
epoll vs poll vs select, Measured: Where the Crossover Actually Is Sysadmin
One wait call over 10,000 idle file descriptors costs poll 0.30 ms and epoll 0.0003 ms. Wake latency ties at 10 fds and differs 30-fold at 10,000.
-
Copying a 1 GiB File: dd at bs=512 Is 9x Slower — and cp Ties dd Once the Block Size Is Right Sysadmin
dd at bs=512 takes 3.6 seconds to copy a 1 GiB file; at bs=1M it takes 0.4 — and plain cp ties it. The block size is the decision, not the tool.
-
C++20 Coroutines + io_uring: A co_await File Read That Actually Runs C++
A hand-rolled C++20 coroutine reads a file through io_uring with no coroutine library: one pump, 36 bytes, content verified. liburing 2.16 built from source, GCC 13.3.0, and the two fixes the build needed.
-
Which Lines Are in Both Files? comm vs grep vs sort|uniq vs Python, Measured Sysadmin
comm finds the 500,000 shared lines in two million-line files in 0.14 seconds; grep takes 2.60. But the second-fastest method, sort|uniq -d, is wrong unless both files are already deduplicated.
-
Are These Two Files the Same? cmp vs diff, Measured — Plain diff Costs 100x on Text and Nothing Extra on Binary Sysadmin
On a 1 GiB binary file cmp, diff -q and plain diff cost the same. On a million-line text file, plain diff costs 100x more than diff -q when the difference is on line 1. The equality check is -q, not diff itself.
-
cgroup v2 CPU Quota: What Actually Happens When the Throttle Bites, Measured Sysadmin
A 50% CPU quota makes the same fixed work take 1.92 times as long; a 25% quota makes it 3.95 times as long. cpu.stat shows why: the CPU time is nearly flat, and almost every 100 ms period is throttled.
-
systemd Timers vs Cron: What Actually Happens When a Run Is Missed Sysadmin
A systemd timer stopped for 34 seconds fired exactly once when it came back, one run for four missed elapses, while cron fired zero times for a minute already past. A 10-second timer with AccuracySec=30s ran 2 of 8 elapses when the offset was 8.87 seconds. The measured catch-up counts, fire-time offsets, and dropped elapses.
-
Bare-Metal STM32 in Rust: No HAL, No Embassy — and It Actually Runs Under QEMU Rust
A three-crate Rust firmware with no HAL and no Embassy builds in 3.18 seconds and prints under QEMU on both machines, while the HAL app hangs at init. The measured sizes, the timed loop counts, and the fault matrix for a wrong flash base.
-
rsync's 2,729x Speedup Is 1% Slower on the Clock: Delta vs Whole-File, Measured in Wall-Clock Sysadmin
rsync reported 'speedup is 2,729.37' for a delta transfer that moved 32,768 literal bytes — and the clock said it took 35.00 seconds against 34.63 for the whole-file copy. The same probe last night said 43 percent slower. The byte counter is not a clock, and the gap does not reproduce.
-
The Regex That Hangs: Catastrophic Backtracking, Measured Across Five Engines Sysadmin
The same pattern, (a+)+$, on the same failing input: Python re takes 16.5 seconds at n=28, grep -P errors out at its backtracking limit, and ripgrep, Rust regex, and grep -E answer in about 2 ms. One possessive character fixes it 811-fold.
-
Ninja vs GNU Make, Measured: the Clean Build Is a Wash — the No-Op Isn't C++
Same 200-file C++ project, same compiler, 32-way parallelism: the clean build is a wash (Ninja 3.437 s vs Make 3.566 s), the no-op rebuild is 11 times faster under Ninja (0.014 s vs 0.154 s), and both binaries are byte-identical. The measured table, and why the old 20 percent clean-build claim does not reproduce.
-
nginx Reload vs Restart: What Actually Happens to In-Flight Requests Sysadmin
A reload dropped zero requests in three loops of about 26,000 each, with the longest pause 0.040 seconds. A restart dropped about 4,000 connection attempts per loop and left a 0.22-second hole. A slow download finished through a reload and through a graceful quit, and was cut to 39.1 percent by a stop. The counts, the verbatim errors, and the bad-config cases.
-
Logrotate copytruncate vs create: Measured What Happens to a Live Writer Sysadmin
A live writer holds its log file open across a rotation. Under create, 7,087 lines land in the rotated file and 0 in the new one. Under copytruncate, 50 lines vanish in a 56 ms window. Measured on logrotate 3.21.0.
-
How Fast Does std::jthread Actually Stop? Measured Shutdown Latency C++
A std::jthread worker that polls its stop token every 100 ms takes a median 46 to 73 ms to stop after request_stop. The same worker waiting on a condition variable stops in about 0.10 ms. Measured on GCC 13 and Clang 18.
-
GNU Parallel Is Slower Than Serial: xargs -P vs GNU Parallel vs Serial, Measured Sysadmin
GNU Parallel, the tool built for parallelism, is slower than a serial loop at every job count on short jobs, and floors at about 0.61 seconds on the heavy arm while xargs keeps scaling to 11.90x.
-
Your Docker Build Context Taxes Every Rebuild — Even the Cached Ones Sysadmin
A 1 GB build context slows a no-change, fully cached Docker rebuild from 0.66 s to 2.72 s on the classic builder, for a byte-identical image. One .dockerignore line restores 0.63 s.
-
Writing Git Packfiles in C++: Deltas, Indexes, and the Streaming Win C++
A C++ program writes a three-object Git packfile in 221 bytes, hand-encodes REF_DELTA deltas that real Git accepts, and streams a 5 MB blob at 2.94x lower peak memory than the in-memory Python version.
-
cgroup v2 MemoryMax: What Actually Happens When a Process Hits the Limit, Measured Sysadmin
A process that crosses a 128 MiB MemoryMax cap dies in about 25 milliseconds, with memory.peak exactly at the cap and almost no pressure stall. The same allocator under a 96 MiB MemoryHigh throttle takes about 101 seconds per 16 MiB step instead.
-
Write Git Objects by Hand: A Mini-git in C++ C++
A C++ program writes loose git objects by hand, and git agrees with every hash: blob, tree, and commit checked with hash-object, mktree, cat-file, and fsck.
-
Turning strict On in a Codebase That Never Had It: TypeScript 5.9 to 7.0 TypeScript
A four-file TypeScript codebase that never set strict passes 5.9.3 with zero errors, then reports 22 errors under 6.0.3 and the identical 22 under 7.0.2. This guide runs all three versions, reads the error classes, fixes the config pair first, and takes the count from 22 to 4 to zero.
-
std::formatter That Compiles: A Clang-Only Specialization Project C++
A working std::formatter specialization project under Clang 18: a quoted-string formatter, a delegating formatter for a point type, the compile-time versus runtime error split, and the range-formatting verdicts that only a GCC 16 frontend can give, because GCC 16 with C++23 does not assemble.
-
Rust Embassy on STM32: What Compiles, What Runs, and the QEMU Gap Rust
A real Embassy program for the STM32F103C8 compiles with embassy-stm32 0.4.0, and an executor-only firmware prints under QEMU. The full app does not run under QEMU: embassy_stm32::init() hangs on the emulated board, and QEMU's STM32F100 machine faults on the same binary.
-
Three std::mdspan Traps: The Missing operator(), submdspan in C++26, and assert C++
Three std::mdspan traps, each proved by a compiled program: libstdc++ 16 ships no operator(), submdspan runs only in C++26, and assert() breaks on a comma in a subscript.
-
Testing Cancellation with Go's synctest Bubble: 5 Seconds in 0.00 Go
A 5-second deadline fires at exactly 5 seconds of virtual time and 0.00 seconds of real time inside a synctest bubble. This guide tests an errgroup pool's cancellation deterministically, explains what the bubble does and does not fake, and shows the race-detector sanity check on the same pool.
-
Go errgroup Worker Pool: The Race the Compiler Won't Catch Go
Build a bounded errgroup worker pool in Go, watch the race detector fail it with five data races, fix it with one mutex, and learn the SetLimit ceiling, the cancellation timing, and the deadlock trap — every result run.
-
GCC 16 Defaults to C++20: What Breaks in Your Old Code C++
GCC 16.2.0 compiles C++ as C++20 unless told otherwise. A five-idiom legacy codebase fails with 6 error lines under the new default and runs clean under -std=c++17 and GCC 13. This guide runs each breakage, quotes the errors verbatim, corrects three supposed breakages that are not, and shows the fixed code compiling on both.
-
C++20 Coroutine Pitfalls: Three Fixtures, Three Compilers, Same Answer C++
Three small coroutine programs, each run on GCC 13, GCC 16, and Clang 18 at C++20 with byte-identical output: eager versus lazy start, frame destruction on an early exit, and a lazy task that runs nothing until resumed.
-
Migrating to a uv Workspace: The Traps, in the Order They Bite Python
Migrate two standalone Python packages into one uv workspace, in the order the failures actually bite: the virtual root, the >=3.13 default, and the flag that does not exist — every error quoted verbatim from uv 0.12.23.
-
Testing C++20 Modules: Direct Commands, Then CMake and CTest C++
Test a C++20 module with direct compiler commands first, then CMake and CTest: the GCC and Clang commands that work, the GCC 13 configure failure quoted verbatim, and the GCC 14 or newer floor for module scanning.