I’ve attempted to summarize the discussion of build options for the repository-surgery machine. You should see a link at the top of the page: if not, it’s here I invite all the commenters who have shown an interest to critique these build proposals. Naturally, I’d like to make sure we have a solid parts list… Continue reading Building the perfect beast
Category: Software
Black magic and the Great Beast
Something of significance to the design discussion for the Great Beast occurred today. I have finally – finally! – achieved significant insight into the core merge code, the “black magic” section of cvs-fast-export. If you look in merge.c in the repo head version you’ll see a bunch of detailed comments that weren’t there before. I… Continue reading Black magic and the Great Beast
A low-performance mystery: Sometimes you gotta simplify
This series of posts is increasingly misnamed, as there is not much mystery left about cvs-fast-export’s performance issues and it is now blazingly, screamingly, bat-out-of-hell fast. As in both threaded and unthreaded version convert the entire history of groff (15593 CVS deltas in 1549 files in 13 seconds flat. That would be about 10K CVS… Continue reading A low-performance mystery: Sometimes you gotta simplify
A low-performance mystery: the adventure continues
The mystery I described two posts back has actually been mostly solved (I think) but I’m having a great deal of fun trying to make cvs-fast-export run even faster, and my regulars are not only kibitzing with glee but have even thrown money at me so I can upgrade my PC and run tests on… Continue reading A low-performance mystery: the adventure continues
A low-performance mystery, part deux
Well, the good news is, I get to feel wizardly this morning. Following sensible advice from a couple of my regulars, I rebuilt my dispatcher to use threads allocated at start time and looping until the list of masters is exhausted. 78 LOC. Fewer mutexes. And it worked correctly first time I ran it. W00t… Continue reading A low-performance mystery, part deux
A low-performance mystery
OK, I’ll admit it. I’m stumped by a software-engineering problem. This is not a thing that happens often, but I’m in waters relatively unknown to me. I’ve been assiduously avoiding multi-threaded programming for a long time, because solving deadlock, starvation, and insidious data-corruption-by-concurrency problems isn’t really my idea of fun. Other than one minor brush… Continue reading A low-performance mystery
Apologies for premature epostulation
I made a finger error. Full version of A Low Performance Mystery to follow shortly.
Implementing re-entrant parsers in Bison and Flex
In days of yore, Yacc and Lex were two of the most useful tools in a Unix hacker’s kit. The way they interfaced to client code was, however, pretty ugly – global variables and magic macros hanging out all over the place. Their modern descendants, Bison and Flex, have preserved that ugliness in order to… Continue reading Implementing re-entrant parsers in Bison and Flex
Time, Clock and Calendar Programming 1.0
A bit late, because I’ve been hammering on some code the last several days. But here it is: Time, Clock, and Calendar Programming In C. Suggestions for 1.1 revisions and improvements will of course be cheerfully accepted. Comments here or email will be fine.
48-hour release heads-up for Time-Clock-Calendar HOWTO
I’ve been gifted with a lot of help on my draft of Time, Clock, and Calendar Programming In C. I think it’s almost time to ship 1.0, and plan to do so this weekend. Get your last-minute fixes in now! I will of course continue to accept corrections and additions after 1.0. Thanks to everyone… Continue reading 48-hour release heads-up for Time-Clock-Calendar HOWTO
Announcing: Time, Clock, and Calendar Programming In C
The C/UNIX library support for time and calendar programming is a nasty mess of historical contingency. I have grown tired of having to re-learn its quirks every time I’ve had to deal with it, so I’m doing something about that. Announcing Time, Clock, and Calendar Programming In C, a document which attempts to chart the… Continue reading Announcing: Time, Clock, and Calendar Programming In C
Program Provability and the Rule of Technical Greed
In a recent discussion on G+, a friend of mine made a conservative argument for textual over binary interchange protocols on the grounds that programs always need to be debugged, and thus readability of the protocol streams by humans trumps the minor efficiency gains from binary packing. I agree with this argument; I’ve made it… Continue reading Program Provability and the Rule of Technical Greed
Announcing microjson
If you’ve ever wanted a JSON parser that can unpack directly to fixed-extent C storage (look, ma, no malloc!) I’ve got the code for you. The microjson parser is tiny (less than 700LOC), fast, and very sparing of memory. It is suitable for use in small-memory embedded environments and deployments where malloc() is forbidden in… Continue reading Announcing microjson
Never let an invariant go untested
I’ve been blog-silent the last couple of days because I’ve been chasing down the bug I mentioned in Request for help – I need a statistician. I have since found and fixed it. Thereby hangs a tale, and a cautionary lesson.
Request for help – I need a statistician
GPSD has a serious bug somewhere in its error modeling. What it effects is position-error estimates GPSD computes for GPSes that don’t compute them internally themselves and report them on the wire. The code produces plausible-looking error estimates, but they lack a symmetry property that they should have to be correct. I need a couple… Continue reading Request for help – I need a statistician
Request for code review: cvs-fast-export
Sometimes reading code is really difficult, even when it’s good code. I have a challenge for all you hackers out there…
Adverse selection and old technology
Yesterday I shipped cvs-fast-export 1.15, with a significant performance improvement produced by replacing a naive O(n**3) sort with a properly tuned O(n log n) version. In ensuing discussion on G+, one of my followers there asked if I thought this was likely to produce a real performance improvement, as in small inputs the constant setup… Continue reading Adverse selection and old technology
Phase-of-moon-dependent bugs suck
I just had a rather hair-raising experience with a phase-of-moon-dependent bug. I released GPSD 3.11 this last Saturday (three days ago) to meet a deadline for a Debian freeze. Code tested ninety-six different ways, run through four different static analyzers, the whole works. Because it was a hurried release I deliberately deferred a bunch of… Continue reading Phase-of-moon-dependent bugs suck
Master Foo and the Hardware Designer
The newest addition to Rootless Root:
Ignoring: complex cases
I shipped point releases of cvs-fast-export and reposurgeon today. Both of them are intended to fix some issues around the translation of ignore patterns in CVS and Subversion repositories. Both releases illustrate, I think, a general point about software engineering: sometimes, it’s better to punt tricky edge cases to a human than to write code… Continue reading Ignoring: complex cases