Blogging in Lisp


Lisplog is a templating system that blends Apache and Hunchentoot to aid in the maintenance of a blog-like web site.

It is open source, written in Common Lisp, and the code is at

I'm looking for work. My resumé is at

Going Supersonic in Elon Musk's Test Hyperloop Tube

Submitted by Bill St. Clair on Mon, 28 Aug 2017 12:43:10 GMT

Elon Musk tweeted that it "Might be possible to go supersonic in our test Hyperloop tube, even though it's only 0.8 miles long." This post computes the acceleration necessary for that.

Speed of sound: 767 mph = 1125 feet/second
1/2 test track length = 0.4 * 5280 feet = 2112 feet

t = time in seconds
a = acceleration in feet/second

1. 1/2 * a * t^2 = 2112 (distance from acceleration and time)
2. t * a = 1125 (speed from acceleration and time)

3. t = 1125 / a (divide both sides of 2 by a)
4. 1/2 * a * (1125/a)^2 = 2112 (plug 3 into 1)
5. 1/2 * a * 1,265,625 / a^2 = 2112 (do the square in 4)
6. 632812.5 / a = 2112 (do the arithmetic in 5)
7. a = 632812.5 / 2112 (multiply both sides of 6 by a and divide by 2112)
8. a = 299.6 feet/second
9. g = 32 feet/second^2 (acceleration due to gravity)
10. a = 299.6 / 32 = 9.4 g (divide 8 by (32 feet/second)/g)
11. t = 2 * 1125 / a = 7.6 seconds (time to accelerate AND decelerate)

So a Hyperloop vehicle could accelerate to the speed of sound and decelerate back to a standstill in 0.8 miles by accelerating at 9.4 g for 3.8 seconds and then decelerating at 9.4 g for 3.8 seconds.

Wikipedia's G-force page says that untrained humans can survive 10 g horizontal, eyes in or out, for 1 minute, so it's survivable.

Add comment   Edit post   Add post

2017 iMac

Submitted by Bill St. Clair on Sat, 05 Aug 2017 13:15:54 GMT

I got a new iMac last Wednesday. contains photos of its birth.


Add comment   Edit post   Add post

Spokes is Done!

Submitted by Bill St. Clair on Sat, 29 Jul 2017 11:19:08 GMT

I have only worked on it occasionally since getting a new full-time, paying Lisp gig, but this morning, I fixed the last known bug in Spokes, the board game that my son invented, and that I've been implementing in Elm. There are still some desirable features to add, but I'll wait until users beat down my door with requests before spending more time on it. For now, I'm going to switch my spare-time Elm programming back to Xossbow.

Spokes now has chat, voting on impossible resolution (it was too time-consuming and difficult to do that automatically), public games, and a textual game state representation that allows you to restart a saved game.

You can play at


Add comment   Edit post   Add post


Submitted by Bill St. Clair on Mon, 12 Jun 2017 00:11:43 GMT

Spokes is a board game invented by my son, Chris St. Clair. I've been working on an Elm implementation of it for almost a month. It works, and there are only a few issues left before it's feature complete.

The rendering is based on Elm's SVG package, much like Kakuro Dojo. But it has a server, written almost entirely in Elm, and running on my Xossbow droplet, in Node.js. I've always considered Node.js to have a brittle architecture, but my jsMaze Amazon AWS machine just runs and runs, with nary a problem.

Check out Spokes. Click on the "Help" and "Rules" links near the bottom of the page to learn how to play, try it out in "local" mode, or with a friend or three, and let me know what you think.


Add comment   Edit post   Add post

Mirroring a Blogspot Site

Submitted by Bill St. Clair on Thu, 13 Apr 2017 10:58:31 GMT

William Norman Grigg died yesterday. RIP.

When an important blogger passes, I often mirror their web site(s). I've been doing that with Mr. Grigg's Pro Libertate. site. It's on Blogspot, so doing a simple "wget -mk" pulls a separate file for each comment to each post, even though all those copies are identical. I finally figured out how to tell wget to NOT keep those files. It still downloads them all, scans for links that it already knows about, and then deletes them, but at least they don't stay to waste disk space. I have found no way to tell it to completely ignore those files. Mirroring would be much faster if that were possible. It took a few minutes to pull the 1,030 html files, and then a long time to pull and discard all the "?showComment" files.

I named the script that does this mirror-blogspot. The important line is:

wget -mk -R "*?showComment*" -pH
 -D "$DOMAIN,,,," $1

-m is the standard wget mirror command. It enables recursive download, disables limits on that, and ensures that no links outside of the initial argument will be followed.

-k is --convert-links. It causes internal links to be changed from absolute to relative, so <a href='$1/foo'> becomes <a href='foo'>, with all the right stuff done to make that work correctly. Unfortunately, there's no way to tell wget to do that process on an existing mirror, so if your mirror quits before it's done, you're SOL.

-R is --reject. It's the important thing I learned yesterday. It tells wget to reject files whose names match the argument, which is either a list of file types or a pattern (not a regular expression).

-p is --page-requisites. It tells wget to download inline images, but will NOT by itself make it download from another domain.

-H is --span-hosts.

-D is --domains. If not specified with -r, then only files from the domain mentioned as the final argument will be downloaded. It allows you to add other domains, but also requires that you include the domain on the command line; hence $DOMAIN in that list. The * domains are where Blogspot stores images.

1 comment   Edit post   Add post

Xossbow Progress Report

Submitted by Bill St. Clair on Mon, 10 Apr 2017 10:26:54 GMT

I've made significant progress with Xossbow, my Elm-based blogging package. billstclair/elm-html-template now supports a nearly complete version of Markdown, and the Xossbow website uses that for most of its content.

I'm working on adding navigation, so that pages have URLs, hence you won't always have to first visit the home page any time you go to the site. Then I'll learn how to make "PUT" work in Apache, so that I can create editing forms for settings and pages.

Below is an example of the "Tag Classes" extension I made to Markup. You can specify, with a JavaScript-style object (key/value pairs), the CSS class for HTML elements generated by the Markdown. Click on the image for full resolution display (730x999).

Xossbow table example

Add comment   Edit post   Add post

Diceware Passphrase Generator Updated

Submitted by Bill St. Clair on Mon, 10 Apr 2017 03:22:51 GMT

I updated my Diceware Passphrase Generator, adding the EFF's two new (as of last July) wordlists for random passphrases.

The default is now six words from their short (4-die) table, instead of five words from the original (5-die) Diceware table.

I also improved the user interface for rolling your own physical dice. Instead of separate boxes for the dice rolls, there is now just one input box, it limits input to the number of dice necessary (4 or 5), and pressing the Enter/Return key will look up a word.

Add comment   Edit post   Add post

Xossbow Baby Steps

Submitted by Bill St. Clair on Mon, 27 Mar 2017 13:14:28 GMT

I renamed XosBow to Xossbow and modified the HtmlTemplate example code to suit. It's now serving its own web site (eating my own dog food). Lots of work still to do, as evidenced by my growing list of GitHub issues. And, the new name evinced a new logo. There are a couple of other ideas at the site, but I think this one will stick. "Elm Inside!"

Xossbow Logo

Add comment   Edit post   Add post

Web Pages from JSON Templates in Elm

Submitted by Bill St. Clair on Fri, 24 Mar 2017 16:30:26 GMT

One of the problems I find with Elm is that the HTML is compiled into the JavaScript code for a web site. I wrote a template package to enable more data-driven HTML generation.

It's in the Elm repository at

There's a live example website at

I'm switching now to a WordPress-like blogging package built on top of it. It will be similar to Lisplog (this web site), but will do all the rendering in the client browser, just as is done by the example, but with forms to create and edit content.

It's called XosBow, pronounced "Crossbow". That web site is a one-page place-holder for now, but once enough works, it will itself be done in XosBow.

Add comment   Edit post   Add post

Cryptographically-Secure Random Numbers in Elm

Submitted by Bill St. Clair on Fri, 24 Mar 2017 16:24:28 GMT

Elm contains a random number generator, and if you seed it well, it's not too bad, but JavaScript has a real cryptographically-secure random number generator, window.crypto.getRandomValue(). I built an interface to that.

It's in the Elm package repository at There's a live example, which generates Diceware passphrases, at

Add comment   Edit post   Add post