I just discovered the following blog article by Bill Clementson, from way back in 2003. Luckily, the links still worked, so I was able to get Info pages today for the Common Lisp HyperSpec courtesy of the GCL project.
Once installed, I found I could not easily lookup documentation
for, say, mapcar, because it’s actually on the page
for mapc. But SLIME’s
hyperspec.el contained the indexing info I needed to
write a new module which fires up the Info system on the correct
section for the symbol you want defined.
This new module is called cl-info.el and is
available from my Lisp
repository. It rebinds the standard Emacs key for function help
(C-h f) to lookup help in the HyperSpec instead, if
you’re in a lisp-mode buffer.
NOTE: A fellow Lisper pointed me to
this blog entry which offers a much nicer way to get the
HyperSpec in Info form. It’s a little more work, but the quality of
the result is superior and it has an index! Also, it makes my
cl-info.el unnecessary, by relying entirely on the
Info system itself.
This week’s script of the week is so simple, it doesn’t really deserve to be called a script. But since it’s highly useful and comes as a surprise to many people that it can be done so easily, here it is.
The purpose of this script is to create momentary TCP routes. TCP routing is also called Layer 4 routing. That is, one machine momentarily serves as a transparent gateway between two TCP ports on two other machines. The advantages to layer 4 routing are:
Here’s an example: Let’s say you use a web server sitting on a private network which you access over VPN. You can see the server just fine by typing it’s address in your web browser. One day, however, you find a bug on the server, but it only happen on that server like for your friend — who knows about such servers — to see what’s happening, but you obviously can’t grant him access to your secured network.
What would be really cool is if your friend could connect to your machine instead, and have your machine transparently proxy the connection into the VPN and over to that web server. It would also proxy responses back, so that from your friend’s point of view: your machine becomes the web server for as long as you keep the link up.
Here’s the command to do this, assuming I expose port 8080 on my machine for my friend to connect to, and I’m linking him to port 80 on the VPN’s web server:
$ tcpserver <MY-PUBLIC-IP> 8080 nc <VPN-WEB-SERVER-IP> 80
Did I mention that this doesn’t even require root privileges to work?

Note: If you have the socat utility installed, things get even simpler. In that case, the above command is just this:
$ socat tcp-listen:8080 tcp:<VPN-WEB-SERVER-IP>:80
Now you have a transparent route from port 8080 on your machine to your secured web server. After your friend is done checking things out, just cancel the command and the tunnel is destroyed. This is the best way I can think of to temporary and easily create transparent tunnels into otherwise inaccessible networks.
For this scriptlet to work, you’ll need ucspi-tcp installed (for the
tcpserver command), and netcat, which comes
pre-installed on OS X 10.5.
In my earlier article on running Hunchentoot behind Apache, I mentioned that it would not be very difficult to have Common Lisp persist your runtime state across a system reboot. Well, after a bit of work, I now have that support available. I’ve revised the article to reflect these changes, so please read there for more information!
After upgrading my system to Leopard this weekend, I decided to refresh Ready Lisp as well. It now contains both 32-bit and 64-bit builds of SBCL (which has been bumped to 1.0.11), so if you have a Core 2 Duo machine, you’ll be running Lisp at full 64-bit! Alas, Emacs itself cannot support 64-bit as a Carbon app, because there are no 64-bit Carbon libraries. SLIME has also been updated, to CVS latest as of today. Aquamacs is still the same version at 1.2a.
I did spend several hours trying to build a fully Universal
package that would run on PowerPC as well (I have a PowerBook G4 in
addition to this MacBook Pro), but it seems Leopard has broken the
PowerPC port of SBCL. Some of the core OS structures have changed,
such as os_context_t.
Ready Lisp is now being versioned according to the SBCL version it contains, which makes today’s release ReadyLisp-1.0.11-10.5-x86.dmg. The older version, which still works on 10.4, can be downloaded here.
NOTE: The recent loading bug for Leopard users has been fixed. Please re-download. Also, it still does not work on OS X 10.4 (Tiger) at the moment. I will have to create a separate build of SBCL for that version this weekend.