news
Programming Leftovers
-
Roman Kashitsyn ☛ The third hard problem
Hierarchies are so natural to us that they have become our universal organizing tool. We sort things and ideas into labeled boxes and put these into larger boxes. For physical objects, we have no choice: a book can only be on one shelf in one library at a time. Ideas and information, however, resist taxonomies. They form intricate, far-reaching webs.
Trees formalize hierarchies. They are universal space organizers: B-trees slice keys in databases, k-d trees partition space in graphics, and abstract syntax trees group token sequences in compilers.
-
Josh Lospinoso ☛ Varargs: The Function Call With Missing Type Information | Josh Lospinoso
The caller may pass an int, a double, a pointer, a promoted char, a promoted float, or a sequence chosen at runtime by another layer. The callee does not receive a typed source-level parameter list for those unnamed values. It receives a fixed parameter, a va_list mechanism, ABI-defined register and stack state, and, for printf, a runtime format string that tells it what to ask for.
That is why varargs are the function call with missing type information.
-
DJ Adams ☛ Book Overflow and two architectural patterns in CAP
The Ports And Adapters pattern is another name for Hexagonal Architecture, brought into this world and popularised by Alistair Cockburn. It's the ultimate approach to making agnosticism and abstraction first class players in system design.
-
CoryDoctorow ☛ Pluralistic: Delusion as a service (04 Jun 2026)
There's an analogy here to technology debt: technologically unsophisticated people think of software as a machine that never wears out and has no incremental usage costs (apart from electricity). In this framing, software is the perfect asset, one that never depreciates. But the reality is that software is a liability, not an asset:
https://pluralistic.net/2026/01/06/1000x-liability/#graceful-failure-modes
Software exists in a system, and while software might function perfectly under the conditions in which it is first created and deployed, there are continuous changes to all the technology that is upstream, downstream and adjacent to the software, which means that systems that are robust and secure at the time of deployment can become brittle and dangerous, even though the software doesn't change at all: [...]
-
HFT University ☛ The C++ Standard Library Has Been Walking Itself Back for Fifteen Years, and the Receipts Are Public
This is not unusual. The C++ committee has been writing that sentence about its own features since C++11 was new. Sometimes the sentence is formal (a paper number, a deprecation in the standard, a removal one cycle later). Sometimes the sentence is what every senior engineer tells every junior engineer on day one ("never reach for that, here is what to use instead"). And sometimes the sentence cannot be written into the standard at all, because the broken thing is locked in by ABI compatibility, so it stays in the standard library as the default that every tutorial reaches for and every production codebase quietly replaces. The pattern is so consistent that it deserves its own catalogue, with paper numbers next to every entry, so the next time someone tells you the new C++ feature is the future you can ask them to estimate how long until the next paper deprecates it.
-
Christoffer Kaser ☛ Branchless Quicksort
Performance results naturally depend on the underlying hardware. The following benchmarks show the execution times for sorting 50 million doubles using different sorting implementations. The measurements were taken on an Apple M1 system using Clang and on an AMD Ryzen 3 Linux system using GCC, both compiled with the -O3 option.
-
KDAB ☛ How long does it take for an Item to become visible?
Qt Quick doesn’t drop frames - but it can render them later than expected. This article presents a practical C++ technique to measure when a QQuickItem actually becomes visible, identify late-rendered components, and quantify delays in dropped frames using the Qt scene graph lifecycle.
-
Andrew Nesbitt ☛ Skills Registry Threat Models
Because a skill can declare dependencies on packages from npm, pip, cargo, brew, go, apt, or anything else, often several at once, a skills registry is a strict superset of a package-manager client. Installing one skill runs install commands across several package managers on the user’s machine, on behalf of a manifest the user never read, so every threat the package-manager world has spent the last decade documenting still applies inside a skill’s install path.
-
Shell/Bash/Zsh/Ksh
-
The Linux Field Guide ☛ The terminal, the TTY, and the shell
What you actually mean when you say 'I work in the terminal' - the terminal emulator, the pseudo-terminal (TTY/pty), and the shell (bash, zsh, fish) as three independent layers cooperating through a kernel object, with line discipline and VT100 escape sequences in the middle.
-