Saturday, July 30, 2011

Good news, everyone: 'pgperf' dropped

Yesterday I started a branch in SVN to experiment with changing the directory layout of the project.

While reorganizing everything I had to think about how to handle 'pgperf', the customized version of GNU gperf that shipped with the original LambdaMOO server. gperf is a "perfect hash generator" that creates a hashing function and a lookup function for the LambdaMOO programming language. It generates the file 'keywords.c' in the project. LambdaMOO came with a hacked version because in 1997 gperf didn't support case-insensitive lookup tables, and the original author of LambdaMOO added this feature and included it with the project.

The idea for the project reorganization I have is at the top level of the Waverous project you will see the standard directories you see in a lot of open source projects:
bash-3.2$ ls -l
total 376
-rw-r--r--    1 swain  swain  145516 Jul 29 19:57 ChangeLog
-rw-r--r--    1 swain  swain    8605 Jul 29 19:47 LICENSE
-rw-r--r--    1 swain  swain     343 Jul 29 19:44 Makefile
-rw-r--r--    1 swain  swain   10770 Jul 29 19:47 README
-rw-r--r--    1 swain  swain    2907 Jul 29 19:47 README.Minimal
-rw-r--r--    1 swain  swain   10121 Jul 29 19:47 README.rX
drwxr-xr-x    7 swain  swain     238 Jul 29 22:40 databases
drwxr-xr-x    8 swain  swain     272 Jul 29 19:49 doc
drwxr-xr-x   17 swain  swain     578 Jul 30 09:19 examples
drwxr-xr-x    5 swain  swain     170 Jul 29 19:46 extensions
drwxr-xr-x    5 swain  swain     170 Jul 29 20:00 extras
drwxr-xr-x  148 swain  swain    5032 Jul 30 09:38 src
drwxr-xr-x    8 swain  swain     272 Jul 29 19:45 tools
My goal is to write a Makefile.am that handled the subdirectories that formed "standalone" projects: src (the server), doc (the manual and Doxygen docs), and extras/pgperf.

While waiting for my wife's oil change at the dealership (yay free wi-fi!) I tried to compile 'pgperf' as shipped with the project. Compilation failed due a dependency on varargs.h, "gcc" telling me it was obsolete. This brought to mind a task I've thought about a number of times but hadn't written down: drop pgperf for GNU gperf IFF gperf now supported case-insensitive lookup tables.

GNU gperf added support in 2002 with the flag --ignore-case, so after an afternoon of tinkering, regenerating files, recompiling and testing I've gotten everything working just fine with gperf. I've dropped pgperf entirely from SVN.

On a side note, working with Subversion is so painfully slow now -- I've been using Git for the past six months -- that I'm going to switch the project to Git quite soonish now that Google Code supports Git.

Thursday, July 14, 2011

File I/O is here at last: now a compile-time option

Tonight I did all the legwork (fingerwork?) to make File I/O a compilation option. File I/O is a patch to the LambdaMOO server that allows programmers to manipulate files outside the server.

Someone mentioned my Waverous project on the MOO-talk mailing list back in December 2010, and a followup poster made a disparaging remark about FUP (ext-FUP is the other extension to the server for file manipulation, and they have very different ways of doing it).

I was not sure I had the most recent version of File I/O, which I downloaded from the MOO Resources site. Ken Fox created it originally, but now discourages its use. The person who patched and released it later was Andy Bakun, working at yelp.com these days; he was kind enough to reply to my email that File I/O 1.5p1 was the most recent version to his recollection.

As of now, the version in HEAD of the repository has the configure option --with-fileio and will try to compile File I/O into the server, but it fails quite spectacularly; probably because it won't compile as C++. I have to pick through the errors and fix it up. (addendum, July 2011: it works just fine now. It did need some tweaking so g++ would compile it).

The other task I need to remember -- I should file a ticket -- is if File I/O is compiled in, then there has to be a target directory created to store the files manipulated by the MOO server. The original install instructions call for this directory (simply called "files") to be made in the server directory. I'll have to figure out how to handle this when I get around to developing a proper "install" target to "make."

Thursday, July 7, 2011

New configure options, MCP included in distro

I've moved a couple of the constants out of options.h into configure.ac/config.h.in/configure, so they are now flags to ./configure (see ./configure --help).

I've had troubles for weeks trying to commit changes, getting some 405 error back from Google Code; but I thought today my repository copy might be borked so I checked out a new one and was able to do all my commits just fine. Tho I'm at a library, so that might have made a difference (this 405 issue seems to happen when I'm in a hotel).

See http://code.google.com/p/waverous/