blocks

It can be a humbling experience to revist old code. And I’m not talking about the dynamic simulation stuff, which is obviously a hack on top of a pile of hacks. No, this week I returned to my old pal ansiconv, the program that converts text files to images of the text file, rendering it as if you had ANSI.SYS loaded and typed TYPE KOOL.ANS at the cee colon backslash prompt. This program had achieved a modicum of success in its heyday but lately various alternatives have popped up written in languages such as C# and PHP. Being the C bigot that I am (one who writes Java for a living), I thought I would update this one great program, slap a PHP module interface on it, and unleash it upon the world.

Stylistically, the program was a mess: 2-space indentations, curly braces on the same line as the function definition, spaces (( after the )) parentheses, seemingly no rhyme or reason to naming of typedefs, and, horror of horrors, extensive use of studlyCaps. Oh, how I had strayed from the Unix flock. Even worse, I found an obvious bug in TAB character handling; a memleak or two in the error paths; infrequent to non-existent use of the static keyword; global variables aplenty, in one place documented “to ease calling into functions” (had I some phobia of struct?); and even a case of a function returning a pointer to a global variable. Take that ctime(3). All this in the space of some 2 KLOC.

The good news is, a few hours with vim and the codebase is much better: no more globals, no more leaks, no more uglyNamingConventions. I changed the build to create a library with a single entry point, which the ansiconv binary uses to work its magic. All the CGI support code was ripped out, and I wrote a small PHP module that utilizes libansiconv to do stuff on the web. Finally, I borrowed an enhancement from our friends who wrote the newer ansi converters, which is to emit 4 bits-per-pixel images when we can to reduce their size.

The other ansi converters are more full-featured, but C still wins in speed, hands down. A rough test shows ansiconv converts around 2500 ansis/minute, compared with 270 ansis/min for another popular PHP converter (both tests include the overhead of starting the PHP interpreter).

If you have no freakin clue what this post is on about, visit Doug’s great page, 16c.

Denied

Bob,
We appreciate you coming by on Wednesday. Your playing was awesome, however we do not feel that that style would fit in the direction that we would like go. Good luck in your future endeavors.

Oh well.

Rodgered

Well, Herring and the boys put on a fine show last Friday night. Rodgers reprised his Codetalkers role as the twangy-voiced banjo picker, Herring blazed through his usual set of chromatic runs and intervallic melodies, Sipe served up an amazing drum solo, and Fountain rounded out the group, hefting a six string bass to sub-1kHz heights. I will admit to nearly falling asleep during some of the more wordy songs, especially the one about unicorns and rainbows, but the odd reference to guts splattered on walls reeled me back in. I wouldn’t mind seeing JH let loose a bit more, but of course I’m biased.

In other guitar hero news, I have an audition tonight. This will actually be the third band I’ve auditioned with post-SD, to no avail so far. We’ll see how it goes.

Cod

Wondering what to do this weekend? Well here you go: Herring, Rodgers, Sipe, and Fountain are playing at the State’s late show on Saturday. Yup, that’s Jimmy Herring (ARU, ProjectZ, Dragonflies, Jazz is Dead, Codetalkers), the best unknown guitarist alive today. Rodgers (Codetalkers) is no slouch himself. The other guys I have no idea, but I do know this will be a kick ass show. 10pm.

Engaged


Engagement ring
Originally uploaded by bluesterror.

Here’s the pretty present I gave to Angeline yesterday. Yes, that’s right, I’m soon to be among the few people on earth to have both code in the Linux kernel, and a wife.

She came over to my house after work, where I had candles burning and a half dozen roses in hand. Then I produced the ring box, knelt, and popped the question, to an enthusiastic ‘yes!’

She knew it was coming so it wasn’t a huge surprise, but I kept dinner secret, so she was thrilled when we showed up at Galileo for dinner. There, we enjoyed a three course meal that was delicious, though skimpy (we skipped the pasta course which is probably why I’m starving this morning). Angeline had candied beet salad, breaded sea bass for the entree, and three kinds of chocolate for dessert, while I partook of the grilled tuna salad, three kinds of rabbit, and three kinds of gelato. Marvelous, but still needs work to match up to Five Guys.

So far no concrete plans have been made regarding dates, venues and all that but I’m sure I’ll blog about various wedding minutiae in the year to come.

105

What I want to know is: when are we going to get the terrorists for making it so hot?

Picks

I was feeling craft-y today so I made fridge magnets out of guitar picks. The Derek Trucks Band one came from a Derek Trucks Band merch stand, though.

Philly

Last weekend I jumped on a bus full of snippy former Atlantans and visited my favorite city within a 3 hour drive (DC excepted of course)… and that is Philadelphia. But you already knew that because of the subject. So you probably also figured that I would speak again about how good Amoroso’s rolls are when covered in beef and provolone, and you’d be wrong, because this time I got Cheez-whiz. Anyhow, our goal was to go watch a Braves-Phillies game in the stadium over there, but it rained all afternoon, so instead we watched “Phillie [sic] Phanatic Goes To Hollywood” on the jumbotron until they called the game. Then we ran up the steps of the art museum just like Rocky, if Rocky was really uncoordinated and was nine out of shape people who have never been in a fight. Finally we had awful food in an awful bar, then came home. I swear I had something interesting to say but I forgot what exactly. Oh well.

Kicks

They’ve been around a while and made the blog rounds a year ago, but for the first time I saw a pair of these in the wild. From the people who brought you MP3 player shoes come the coolest thing I have ever seen: shoes with spinners.

Delayed

Delays on Metro today:

  • A train experiencing mechanical problems at Reagan National
  • A broken track circuit at Federal Triangle
  • A sick guy at Pentagon City

I might consider this some sort of perfect storm of mishaps, all just happening to occur during a single commute on all of the lines I take, except that this is starting to be the norm.