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

Zippy the Pinheads Careen across the Screen

Submitted by Bill St. Clair on Fri, 09 Mar 2018 06:14:02 GMT

In 1985, when I worked at Thinking Machines Corporation, in Kendall Square, Cambridge, MA, I wrote a little hack for the Symbolics Lisp Machine. Zippy the Pinheads, bouncing around the screen.

I've duplicated it in Elm, with Zippy, Milo, and Mr. Natural.




Add comment   Edit post   Add post


Submitted by Bill St. Clair on Sat, 23 Dec 2017 22:15:13 GMT

elm-oauth-middleware provides Elm client modules and a mostly-Elm Node.js server for the OAuth2 Authorization Code Grant Flow, allowing an Elm client to be authorized for requests with a usually-server-only OAuth2 provider. It requires a dedicated server machine (I use a Digital Ocean droplet), and requires some setup and learning about how OAuth2 works.

I have tested the included example with GitHub, Gmail, Facebook, and Gab.

I wrote it because Gab provides only Authorization Code Grant Flow, and I want to write an Elm client for their API, which was recently released to a small, invitation-only group of developers. I expect that API to go public in the not-too-distant future.

Add comment   Edit post   Add post

Haskell Joke

Submitted by Bill St. Clair on Mon, 04 Dec 2017 14:18:05 GMT

"Haskell, the programming language maintained by Scots, in Glasgow. We Scots do nuthin' until we have t', but then we do a fookin' good job." -- Bill St. Clair

Add comment   Edit post   Add post


Submitted by Bill St. Clair on Thu, 23 Nov 2017 16:50:01 GMT

I recently started using Twitterrific, a Mac and iOS Twitter client. I like that it syncs between my iMac and iPhone, and its "Delete and Edit Tweet" feature, something that I occasionally do by hand in Twitter's interfaces, to fix a typo. But I'm missing a few features:

  1. Link previews.
    I follow some accounts that link to meme images, and seeing at least part of the image before clicking on it is handy.
  2. List retweeters of a Tweet. Twitterriffic shows a retweet count, but, unlike Twitter's clients, has no way to show the list of people who retweeted.
  3. List likers of a Tweet.
    Again, Twitterrific shows a like count, but has no way to show the list of likers.

I tweeted about the second and third issues above, and received this reply:

I can find no API for listing who likes a post, but there is definitely an API for reposters.

The examples below use twurl, Twitter's curl-like command line tool, that sends raw URLs to the Twitter API, does all the OATH validation for you, and returns the raw JSON.

First, show a recent Tweet from President Trump (long lines elided):

$ twurl '/1.1/statuses/show.json?id=933692459351265280&trim_user=1&include_entities=0'
{"created_at":"Thu Nov 23 13:43:24 +0000 2017",
 "text":"Will be doing a live Thanksgiving Video Teleconference with Members of the Military...",
 "source":"\u003ca href=\"http:\/\/\/download\/iphone\" ...",

Look up the retweeters, limited to 5. The default, and maximum, is 100, though you can use a 'cursor' to fetch additional pages of 100.

$ twurl '/1.1/statuses/retweeters/ids.json?id=933692459351265280&count=5'

Lookup details on one of those user IDs:

$ twurl '/1.1/users/lookup.json?user_id=140410587&include_entities=0'
  "name":"Trump supporter",
  "description":"El comunismo no debe existir en el planeta...",

I don't know why Twitter has no API to fetch the users who liked a post (which are called "favorites" in the API docs). You can get the posts liked by a user, but not the users who like a post. Unless you screen-scrape the web UI, which is fraught with peril, and no fun.

I hope this post will encourge the Twitterrific people to add to their clients the ability to show retweeters for a post.

Add comment   Edit post   Add post

iPhone X Ad Swirling Colorful Sand

Submitted by Bill St. Clair on Sat, 04 Nov 2017 04:09:03 GMT

I finally found the artists responsible for the swirling colorful sand animation in the "iPhone X Is Here" ad.

It's WeAreColorful. There's a contact form at the bottom of that page. If enough of us ask them to package it as an app, for a dollar, maybe they'll do it.

1 comment   Edit post   Add post

Archmage Is Done!

Submitted by Bill St. Clair on Mon, 09 Oct 2017 22:10:12 GMT

When I visited my son in Tennessee in late August, he taught me two new board games that he invented. I really like one of them, which he calls Archmage, so I've been working since then on building a webapp, in Elm, to play it. I just finished that today.

Check it out at

Should it become wildly popular, I could be convinced to add score tracking and full game history, assuming I can come up with a business model to pay for the server, but I sorta doubt that's gonna happen.


Add comment   Edit post   Add post

MacOS High Sierra

Submitted by Bill St. Clair on Wed, 27 Sep 2017 15:00:55 GMT

Early in the morning of September 27, 2017, I installed MacOS High Sierra (10.13), on my 27" 2017 iMac. Just worked, almost entirely.

MacOS High Sierra About Box

Doesn't work:

Gutenprint printer drivers - didn't even remember I had this

Does work:

Emacs, 25.1.1 and 25.3.1
Brave, 0.18.36
Mailplane, 3.7.0 (3238)
XQuartz, 2.7.11 (xorg-server 1.18.4)
  Gnumeric, 1.10.17 (don't remember where I got this, possibly Homebrew).
EasyCrop, 2.6.1
Slack, 2.8.0 (App Store)
Elm, 0.18.0
Clozure Common Lisp (CCL), 1.11-r16789M (DarwinX8664)
Nimbus (IRCCloud wrapper), 0.7.5 (13)
Skype, 7.54 (409)
MenuMeters, El Capitan Port 1.9
GPGTools, 2.0 (Build: 887)
SoundSource, 3.0.2
Gimp, 2.8.14
Audio Hijack, 3.3.5
Node.js, v6.11.0 (for elm-repl, elm-test, and my Archmage server)

Apple Apps:

XCode, 9.0 (9A235), and its Simulator

My biggest problem was getting my Time Machine backup, stalled on "Preparing Backup...", to complete, before the upgrade. I deleted the "... Cache ..." files from ~/Library/Calendars/, rebooted, and ran First Aid on my boot and backup disks (both were fine). The backup eventually completed, but I'm not sure what I did to make it so.

I did the installation early in the morning, while I went back to sleep. Around 10:15am, a dialog popped up, which took me to, for a pictorial introduction.

Add comment   Edit post   Add post

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