diary at Telent Netowrks

Not only was yesterday's entry almost criminally dull, rereading shows it not#

Wed, 04 Jun 2003 00:24:46 +0000

Not only was yesterday's entry almost criminally dull, rereading shows it not to have been terribly clear either.

The project here is an automatic download/install tool for SBCL, along the lines of CPAN.pm. How it works: it looks up cliki pages with the same name as the package you tell it you want, and it downloads the url that the :(package ...) link on that page points at. Yes, all the stuff about deprecated tokens was talking about CLiki markup syntax. If the url pointed to is relative, it gets merged against the URL for the cclan dispatcher, so you eventually end up downloading from some cclan site that you chose earlier.

CL is actually the third language it's written in: it started life as a shell script, then as all shell scripts over twenty lines tend to do, turned into a Perl script. After a couple of hours screwing around with pathnames in Perl, I decided that CL would have been the better choice after all.

Yesterday, in accordance with the "small tools that do one thing each" Unix Philosophy, I was executing wget in a subshell to actually get the file. Due to the way that cliki and cclan are arranged, this can potentially involve several redirects. Today I determined that to additionally get the PGP signature file for the package I'd have to grep the standard output of wget -S looking for a line (actually, the last of n lines) matching Location, my "brittle interfaces" meter pegged, and so I decided it'd be quicker to write a small HTTP client.

Today's version of asdf-install.lisp is in the same place as yesterday's (see? I told you it was a temporary location) and does approximately as little as yesterday's, but in a marginally more sane way. Seems to cope with proxies (tested using the NTL proxy system) but doesn't do any lind of proxy authentication yet. Nor FTP, which limits it to cCLan nodes that are available by HTTP.

A word of warning: this represents a software engineering advance on yesterday's code. It is still not, in absolute terms, anything you should even briefly entertain the idea of reusing for other purposes: there are some much better designed network client libraries out there. The sole purpose of this one is to provide the minimal code necessary that the user can easily download and install one of them.