SRC, four years later

Four years ago, I wrote an entire version-control system in a 14-hour burst of inspiration. It’s a small, lightweight tool designed for solo single-file projects that allows several histories to coexist in a single directory – good for /etc files, HOWTOs, or that script collection in your ~/bin directory. I wasn’t certain, at the time,… Continue reading SRC, four years later

Reposurgeon’s Excellent Journey and the Waning of Python

Time to make it public and official. The entire reposurgeon suite (not just repocutter and repomapper, which have already been ported) is changing implementation languages from Python to Go. Reposurgeon itself is about 50% translated, with pretty good unit-test coverage. Three of my collaborators on the project (Daniel Brooks, Eric Sunshine, and Edward Cree) have… Continue reading Reposurgeon’s Excellent Journey and the Waning of Python

Solving shtoopid problems

There is a kind of programming trap I occasionally fall into that is so damn irritating that it needs a name. The task is easy to specify and apparently easy to write tests for. The code can be instrumented so that you can see exactly what is going on during every run. You think you… Continue reading Solving shtoopid problems

Published
Categorized as Software

Unix != open source

Yesterday a well-meaning hacker sent me a newly-recovered koan of Master Foo in which an angry antagonist berated Master Foo for promoting an ethic of open-source software at the expense of programmers’ livelihoods. Alas, I knew at once that he had been misled by a forgery, or perhaps some dreadful chain of copying errors, at… Continue reading Unix != open source

Defect attractors

There’s a phrase I’ve used on this blog more than once that I had reason to Google just now and found that (to my surprise) the top hits are mostly my writings. It is “defect attractor”. In this post I’m going to explain why I think this is an important concept that needs to be… Continue reading Defect attractors

Published
Categorized as Software

Embrace the SICK

There’s a very interesting article just out, C Is Not a Low-level Language;. in which David Chisnall punctures the comforting illusion that C is really a “close-to-the-metal” language and relates this illusion to the high costs of Spectre and other processor-level bugs. Those of us who think seriously about language design have long been aware… Continue reading Embrace the SICK

The UPSide state diagram

I think this diagram is now stable enough to put on the record. Both this diagram and the Go code for the policy logic are generated from this pseudocode: render.state(“DaemonUp”, “Daemon running”) render.action(“DaemonUp”, “ChargeWait”, CHARGING) render.state(“ChargeWait”, “Charge wait”) render.action(“ChargeWait”, “MainsUp”, CHARGED) render.action(“ChargeWait”, “OnBattery”, MAINSDROP) render.state(“MainsUp”, “On mains power”) render.action(“DaemonUp”, “OnBattery”, MAINSOFF) render.state(“OnBattery”, “On battery power”)… Continue reading The UPSide state diagram

How to get started on the UPSide project

The current state of play is: We have a high-level system design and a map of the behavior states. We have a capacity target (300W for 15 mins) and a peak-continuous-load spec (400W) We know we’re going to build a double-conversion design and we’re considering a couple of alternative topologies. We pretty much know the… Continue reading How to get started on the UPSide project

Stop logging in local time!

Inertia is a powerful force. The computing world retains a lot of practices that are odd little dysfunctional relics of past stages of its technology. The one I’m here to talk about today looks like this: Mar 6 15:11:07 snark postfix/qmgr[3927]: 0422513A6C53: removed That’s a log message hot’n’fresh from my /var/log/mail.log file. It’s entirely typical… Continue reading Stop logging in local time!

Published
Categorized as Software

“The Lost Art of C Structure Packing” now covers Go and Rust

I have issued a new version, 1.19, of The Lost Art of C Structure Packing. The document now covers Go and Rust as well as C, reflecting their increasing prominence as systems-programming languages competing with C and being deployed in contexts where structure-size optimizations can be of some importance. TL;DR: C alignment and packing rules… Continue reading “The Lost Art of C Structure Packing” now covers Go and Rust

Published
Categorized as Software

C, Python, Go, and the Generalized Greenspun Law

In recent discussion on this blog of the GCC repository transition and reposurgeon, I observed “If I’d been restricted to C, forget it – reposurgeon wouldn’t have happened at all” I should be more specific about this, since I think the underlying problem is general to a great deal more that the implementation of reposurgeon.… Continue reading C, Python, Go, and the Generalized Greenspun Law

You’re gonna need a bigger Beast

I’m taking a management-approved break from NTPsec to do a repository conversion that dwarfs any I’ve ever seen before. Yep, more history than Emacs – much much more. More backtrail than entire BSD distributions, in fact about an order of magnitude larger than any repo I’ve previously encountered. Over 255000 commits dating back to 1989… Continue reading You’re gonna need a bigger Beast

The long goodbye to C

I was thinking a couple of days ago about the new wave of systems languages now challenging C for its place at the top of the systems-programming heap – Go and Rust, in particular. I reached a startling realization – I have 35 years of experience in C. I write C code pretty much every… Continue reading The long goodbye to C