
As I mentioned in last week's episode, the first step in my purported web project was to get a webserver up and running. I tried GNU MyServer, but, couldn't figure out the setup, and then I tried GNU Serveez, which was out of date.
My hacked version of Serveez, which I'm calling Serveez-MG for now, it up in my space on Github. It seems to run great, and works with Guile 2.0.
This hack was interesting because I changed philosphies a few times along the way.
Stage 1: Professionalism
At first I thought I was going to do a clean update of the GNU Serveez. I was making atomic commits, writing decent ChangeLog entries, and pulling the project piece by piece into a modern Automake / Autoconf / Libtool / Gnulib project. But, realized this was going to take forever, and it is a waste of our few beautiful summer days, so I quickly moved on to ...
Stage 2: Hackery
Screw this. Why be so methodical on some software that nobody, nobody, is ever going to use except for me? And probably not even me, since I'll probably just use Apache anyway.
I dug in and changed everything with abandon. I replaced everything that annoyed me. I untangled their beautiful but labyrinthine #define macros.
The #ifdef branches were deeply nested, so I ripped that all out, too. Multiplatform: gone. Configurable: gone. Removed all the code to handle possibly missing functions.
Stage 3: Purity
Maybe I wasn't just being unprofessional. Maybe, I said to myself, I had a plan all along. I started to audit the code by comparing it to the Linux Standards Base database keeping only the functions that were LSB compliant. Eventually I had code that should compile cleanly on LSB systems.
It was actually kind of fun: looking in the LSB database navigator to see what functions and constants had good acceptance among the distros.
I also attacked the autotools with a vengance. I tried to make the Autoconf and Automake files as trivial as possible. Doing so led me to make libserveez subdirectory into an Autoconf subproject: that was a great simplification.
Stage 4: Finishing
And now the code is all clean and shiny, but, the commits that got me here are a tangle, with many changelog messages like "hack" or a 500 line commit called simply ".".
Maybe I should start back at step 1 and do it for real this time, now that I know the endgame.
Or maybe I should try to spend more time in the sun.