So, while trying to discover the minor version of the Android 2.2 running on my G-2, I touched the tab labeled “Open source licenses”. Scrolled down, and “Eric S. Raymond” popped out at me.
One of the comments that got lost in the recent database restore was a pointer to a backup program I can’t offhand remember the name of. I remember that it’s a command-line tool written in Perl (alas) and meant to be done by a cron job; what it does underneath is rsync with hardlinks to the remote target, so you get a Time-Machine-like effect for not much beyond the space requirement of the initial dump. Can someone remind me what this is. please?
Also, I’m in the market for a dropbox-like service that I can rsync to and from, for off-site backup. Any suggestions?
UPDATE: rsnapshot is what I was trying to remember. A very elegant little tool, thoughtfully written and handy. I may go with rsync.net for offsite backup.
OK, I’m officially coming out of my cave now, after what amounted to a two-week coding orgy. I’ve shipped reposurgeon 0.5; the code looks and feels pretty solid, the documentation is written, the test suite is in place, and I’ve got working repo-rebuild support for two systems, one of which is not git.
The rest is cleanup and polishing. Likely the next release or the one after will be 1.0. It’s time for an after-action report. As usual, I learned a few things from this project. Some are worth sharing.
Regular readers of this blog are probably pretty clued in about my better-known software projects – gpsd, fetchmail, giflib, libpng, INTERCAL, ncurses, Battle for Wesnoth, Emacs VC and GUD modes, and the like. If those are the best, what about the rest? Here’s a tour of some of the lesser-known stuff I’ve written or had my fingers in. Warning: obscurity, trivia, and obsolescence lie ahead!
This is the story of the INTERCAL Reconstruction Massacree, an essay in risk versus skepticism and verification in software development with a nod in the general direction of Arlo Guthrie.
About three hours ago as I began to write, I delivered on a promise to probably my most distinguished customer ever – Dr. Donald Knuth. Don (he asked me to call him that, honest!) had requested a bug fix in INTERCAL, which he plans to use as the subject of a chapter in his forthcoming book Selected Papers on Fun And Games. As of those three hours ago Donald Knuth’s program is part of the INTERCAL compiler’s regression-test suite.
But I’m not actually here today to talk about Donald Knuth, I’m here to talk about risk versus skepticism and verification in software engineering – in five part harmony and full orchestration, using as a case study my recent experiences in (once again) calling INTERCAL forth from the realm of the restless dead.
During the controversy I described in Condemning Censorship, Even of Werewolves one of the parties characterized me as “nuts and in decline.”. This failed to bother me, and not because I’m insulated against such insults by my natural arrogance. OK, I am largely insulated against such insults by my natural arrogance, but that’s not the main reason I easily shed this one.
In general I’m much less bothered about people who think I’m crazy than they usually think I should be because I know a lot about the life cycle of reform movements. I studied this topic rather carefully in early 1998, just after Netscape announced its intention to release the Mozilla sources, when I noticed that a burgeoning reform movement seemed to need me to lead it. I was particularly influenced in my thinking by the history of John Humphrey Noyes and the Oneida Community.
Here is part of what I learned: There comes a point in the development of every reform movement at which it has to kill the founder. Or anathematize him, or declare him out of his mind. Or neutralize him in a more subtle way by putting him on a pedestal so high that he can’t actually influence events on the ground.
An article published yesterday, I could license you to use this software, but then Iâ€™d have to kill you calls out some odd outliers in the open-source licensing space – odder, actually, than any I ever reviewed when I was the founding president of the Open Source Initiative. I wonder, though, if the author actually gets all the levels of the joke.
Yes, GPSD is way cooler than your project. You know how I can tell?
Because my latest feature request is from a scientist who wants to use GPSD as part of the control software for an autonomous robot submarine. That’s how I can tell.
No word yet on whether the robot submarine will have a frickin’ laser mounted on its frickin’ head. But I’m hoping.
A correspondent pointed me at a paper by Carliss Baldwin and Eric von Hippel, Modeling a Paradigm Shift: From Producer Innovation to User and Open Collaborative Innovation, which builds on my papers in some interesting ways. Here’s one of the money quotes:
Building on arguments of Ghosh (1998), Raymond (1999), and von Hippel and von
Krogh (2003), Baldwin and Clark (2006 b) showed formally that, if communication costs are low
relative to design costs, then any degree of modularity suffices to cause rational innovators that
do not compete with respect to the design being developed to prefer collaborative innovation
over independent innovation. This result hinges on the fact that the innovative design itself is a
non-rival good: each participant in a collaborative effort gets the value of the whole design, but
incurs only a fraction of the design cost.
IBM has issued another statement on the TurboHercules imbroglio. This one is reported by the Linux Foundation, but comes from Dan Frye. Dan Frye heads IBM’s Linux Technology Center and was actually at the top of my mental shortlist of likely voices of sanity over there. (Full disclosure: Dan kept me supplied with IBM Thinkpads for a couple of years as a thank-you gesture.)
The good news is that Dan says IBM will stand by the letter of its 2005 pledge. Furthermore, the second sentence of Dan’s pledge leaves no room for doubt that Hercules is a covered project. This is in flat contradiction to whatever brainless droid the Wall Street quoted yesterday on IBM reserving some right to decide that Hercules is ineligible. It also contradicts the previous implication that IBM is prepared to go to court over those two patents.
The bad news is that Dan leaves open the possibility that IBM may sue over the other close to 200 patents. I think it’s important not to overreact to this; his statement was clearly immediate damage control rather than a final ukase. The effect is that IBM now looks as though somebody with a clue has woken up to how much reputation damage their previous blunders have done them.
My guess is that the matter is now being debated (or soon will be) at a level higher than Frye or either of the pair of clowns who had previously made IBM’s posture look so very wrong. This might, still, blow over.
But IBM should hear this, loud and clear: the letter of your pledge is not enough. You cannot simultaneously hold yourself forth as an ally of open source and conduct patent warfare against an open-source project. Betrayal stings; we won’t abide it, and I wouldn’t argue that we should even if I thought I could win that argument. If you try to have this both ways, you will enrage the community more than if you had been a frank enemy all along.
Understand that our intransigence on this score this is only partly on behalf of Hercules itself. We detest the patent weapon, even in the hands of a sometime ally, because we fear it so much. What IBM does in this matter will set a precedent for the behavior of others; if IBM chooses to set the wrong precedent, it will make enemies of us.
Yesterday I blogged about the escalating dispute between IBM and TurboHercules SAS. I said, and will repeat now, that the central issue for the open-source community in this matter is not the antitrust allegations, but rather the fact that IBM has raised a patent threat alleging that Hercules violates its intellectual property. And especially, that IBM in doing so has cited two patents that were explicitly listed in its 2005 pledge to the open-source community.
IBM has now made matters worse. Much worse.
Sadly, Florian Mueller’s scream of outrage (IBM breaks the taboo and betrays its promise to the FOSS community is not an April Fool’s joke. IBM has done what it swore not to in 2005 – picked up the patent weapon and aimed it to block an open-source project.
I was thoroughly briefed on this about ten days ago by Jay Jurata, a lawyer working for CCIA (Computer and Communications Industry Association), which is even now bringing an antitrust action against IBM over the matter. Assisting him was Jay Maynard, an Armed & Dangerous regular who happens to be the lead of a project called Hercules.
Hercules is an open-source emulator for IBM mainframes. Words cannot easily describe my degree of bogglement the first time Jay brought it up an a Linux laptop in my presence and I saw the unmistakable arcane runes of a 360 boot sequence – and in an old-school band-printer-style font, too. Now, after 11 years during which IBM nodded when its own employees used and contributed to Hercules, Big Blue has brought down the hammer.
No, not the Central Intelligence Agency. I refer to CIA.vc, a nifty free service that monitors commits on open-source repositories in real time and echoes notifications to IRC. And not really abuse, either – rather, I just implemented a way to make it do something else useful. Others might consider doing likewise.
Me, on the GPSD mailing list:
Once upon a time, I did not hate autotools. Yea verily, it was the morning of the world and all things (even autotools) seemed fresh and new). I’d say this innocence lasted until about, oh, 1995.
But autotools was a kluge. And it did accrete kluges and crocks around it, adding layers of complexity until it became sore difficult to tell which end was up. And lo, it became a festering pile of special cases and obscure semi-documented rules, leading to a combinatorial explosion of unplanned interactions and obscure lossage.
Like, say, the fact that our make check insists on running gps-makeregress twice and in spite of being a genuine autotools expert with fifteen years of experience bear-wrestling the sorry fscker I cannot figure out why it is doing this.
Oh, there’s a reason, all right. And if I were willing to quintuple the three hours I just spent poking at our build setup I’m sure I could find it. But that was three hours wasted as far as solving any real problem was concerned. Life is too short for such nonsense.
Autotools has reached the Chandrasekhar mass limit of software and become a black hole of suck that consumes endless hours of bright peoples’ time without any good result. It is well past time for it to die.
I’ve been doing some heavy work on the core code of gpsd recently, and realized it would be a good idea to explain the whys and wherefores to my co-developers on the project. After I wrote my explanation and reread it, I realized I had managed to generate something that might be relatively accessible, and perhaps even interesting, to people who aren’t intimate with the GPSD codebase.
I guess I’m aiming this at junior programmers and particularly curious non-programmers. It’s a slice of what software systems design — the thing that project leads and architects do — is like in the real world, where the weight of history is often as pressing as today’s requirements list. I think this note shows an example of doing it right, or at least not getting it too badly wrong.
If you find the technicalese in here difficult, it may be useful to refer back to some of my previous posts about this project:
I’ve been wanting to migrate the GPSD codebase off Subversion to a distributed version control system for many months now. GPSD has a particular reason for DVCS; our developers often have to test GPSD sensors outdoors and aren’t necessarily in range of WiFi when they do it.
GPSD also needs to change hosting sites, for reliability reasons I’ve written about before. Though I’m a fan of Mercurial, I determined that moving to git would give us a wider range of hosting options. Also, git and hg are similar enough to make intermigration really easy – from SVN to either is 90% of the way to the other.
This blog entry records two problems I ran into, and solutions for them. One is that the standard way of converting repos does unfortunate things with tags directories. The second is that the CIA hook scripts for git are stale and rather broken.
I’ve had learning the computer language Haskell on my to-do list for some time. I’m actually stepping up to learn it now, thanks to a temporary lull in my other activities and a vicious cold that has left me disinclined to strenuous work. I may associate Haskell with the taste of zinc gluconate for the rest of my days; both have an astringent and medicinal quality and produce fervent claims of effectiveness about which I am moderately optimistic but which I have not yet personally verified.
Haskell is very obviously a language built by mathematical logicians for mathematical logicians. Category theory lurks behind it in the same way that the lambda calculus lurks behind LISP. The following is an effort to make Haskell’s way of carving up the world intelligible, written partly to clarify my own thoughts.
In a previous post, How smartphones will disrupt PCs, I explained how and why I think small, ultra-portable, general-purpose computers that we’ll think of and use as “smartphones” are going to displace the PC. I promised then to explain why the software of these devices will be open source.
Go read Androids Will Challenge the iPad. It isn’t about smartphones, but the logic that will break the iPhone business model is clearly set out in it for anyone who’s paying attention. What we’re about to see in the smartphone and tablet markets is a repeat of the way the IBM PC shouldered aside the Apple II after 1980. Google’s deliberately slow-balled launch of Android via the G1 was just prelude; it’s with the Motorola Droid, the unlocked Nexus One and the generic Android tablets that the game begins in earnest.
This is an attempt to throw a valuable debugging heuristic into the ether where future Google searches will see it.
Yesterday, my friend and regular A&D commenter Jay Maynard called me about a bug in Hercules, an IBM360 emulator that he maintains. It was segfaulting on interpretation of a particular 360 assembler instruction. But building the emulator with either -g for symbolic debugging or its own internal trace facility enabled made the bug go away.
This is thus a classic example of heisenbug, that goes away when you try to observe or probe it. When he first called, I couldn’t think of anything helpful. But there was a tickle in the back of my brain, some insight trying to break into full consciousness, and a few minutes later it succeeded.
I called Jay back and said “Turn off your compiler’s optimizer”.
Compiler optimizers take the output stream from some compiler stage and transform it to use fewer instructions. They may operate at the level of serialized expression trees, or of a compiler intermediate representation at a slightly later stage, or on the stream of assembler instructions emitted very late (just before assembly and linking). They look for patterns in the output and rewrite them into more economical patterns.
Optimizer pattern rewrites aren’t supposed to change the behavior of the code in any way other then making it faster and smaller. Unfortunately, proving the correctness of an optimization is excruciatingly difficult and mistakes are easy. Mistaken optimizations that almost always work are, though rare in absolute terms, among the most common compiler bugs.
Optimization bugs have a strong tendency to be heisenbugs. Enabling debugging symbols with -g can change the output stream just enough that the optimizer no longer sees the pattern that triggers the defective rule. So can enabling the conditioned-out code for a trace facility.
When I told Jay this, he reported that Hercules normally builds with -O3, which under GCC is a very aggressive (that is to say somewhat risky) optimization level.
“OK, set your optimizer to -O0,”, I told Jay, “and test. If it fails to segfault, you have an optimizer bug. Walk the optimization level upwards until the bug reproduces, then back off one.”
I knew of this technique because I’ve been in this kind of mess myself more than once – most recently the code for interpreting IS-GPS-200, the low-level bit-serial protocol used on GPS satellite-to-ground radio links. It was compromised by an optimizer heisenbug that was later fixed in GCC 4.0.
This morning Jay left a message in my voicemail confirming that my diagnosis was correct.
I said above that optimizer bugs have a strong tendency to be heisenbugs. If you are coding with an optimizing compiler, the reverse implication is also true, especially of segfault heisenbugs. The first thing to try when you trip over one of these is to turn off your optimizer.
You won’t hit this failure case very often — I’ve seen it maybe three or four times in nearly thirty years of C programming. But when you do, knowing this heuristic can save you many, many hours of grief.