Lisplog

Blogging in Lisp

Search

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 github.com/billstclair/Lisplog

I'm looking for work. My resumé is at lisplog.org/resume.html

Server Updated to Ubuntu 16.04LTS

Submitted by Bill St. Clair on Fri, 27 Apr 2018 12:51:49 GMT

With the release of Ubuntu 18.04LTS, I have upgraded the server for this web site to Ubuntu 16.04LTS. I feel no need to follow the bleeding edge for a stable operating system, but 14.04 will only be supported for another year, so it was time to go to 16.04.

Add comment   Edit post   Add post

XKCD April Fools 2018

Submitted by Bill St. Clair on Mon, 02 Apr 2018 19:32:30 GMT

There's an amazing XKCD for April Fool's Day 2018. Right-click for pop-up menus and a marvel in JavaScript.

https://xkcd.com/1975/

Archived at lisplog.org/xkcd-right-click

Add comment   Edit post   Add post

JSMaze Returns, in Elm!

Submitted by Bill St. Clair on Thu, 29 Mar 2018 03:52:05 GMT

I mentioned JSMaze.com in my last post. Here are some more details.

I wrote a little maze game in 2012, as my first introduction to Node.js, and put it up on an Amazon AWS machine at JSMaze.com. I took it down a few months back, to save the $18/month it was costing me. I decided to remake it, in Elm, and it's back up, running on one of my Digital Ocean VMs, for no additional cost, again at JSMaze.com. Link there to GitHub repository.

So far I have the basic 2D and perspective rendering working, with movement via keyboard or buttons. It works in a touch-screen browser, though the keyboard is a much nicer control interface.

Next I'll work on a maze editor and persistent storage for mazes. Then a server, with war mode and the nice spinning bullet animation I did before. Then I'll add chat and sound, and I'll be back where I was before, but with code that's much easier to understand and expand.

My plan then is to do what I had in mind for the original, but that was too painful in plain JavaScript, the ability to have lots of mazes running at once, invitations to private mazes, drawings and uploaded images on the walls.

I'm having a blast!

Add comment   Edit post   Add post

elm-svg-button

Submitted by Bill St. Clair on Wed, 21 Mar 2018 18:29:55 GMT

I just published billstclair/elm-svg-button, making it fairly easy to create Svg buttons that handle single or repeating clicks, and work with mouse or touch screen. I'm using it to make buttons to control JSMaze.com on a touch screen, where there's no keyboard (the keyboard controls are hugely more satisfying).

http://package.elm-lang.org/packages/billstclair/elm-svg-button/latest

Add comment   Edit post   Add post

NearlyFreeSpeech.NET Stupid Bureaucratic Rules Compliance Department

Submitted by Bill St. Clair on Wed, 21 Mar 2018 18:23:32 GMT

Back when I was still inventing the name for Xossbow, I registered the domain xosbow.com. I decided on the two-S spelling, so I'm letting the old domain expire. I received this hilarious emai from my domain registrar>


PLEASE DO NOT REPLY TO THIS EMAIL. This message is required by ICANN regardless of whether its content is applicable to your situation, and it is automatically generated by a domain registrar system not under our control.

Your domain name xosbow.com expired on March 21, 2018. It won't work while it is expired, and if you don't renew it before April 26, 2018 then you will lose it.

If you haven't explicitly told our system that you don't want to renew this domain, we've been sending you a bunch of reminders about it already and we'll be sending a few more.

If you *did* explicitly tell our system that you don't want to renew this domain, well, the thing that you asked for and that our system told you would happen, happened just like you asked and just like our system told you it would.

In the finest bureaucratic traditions, sending you this message is pointless, redundant, and mandatory either way.

Please visit the Domains tab in the NearlyFreeSpeech.NET member interface ( https://members.nearlyfreespeech.net/domains/ ) to review your domain renewal settings and status, or if you decide do you want to renew this name.

Please visit the Support tab in the NearlyFreeSpeech.NET member interface ( https://members.nearlyfreespeech.net/support/ ) to review your support options if you have questions or need further assistance.

Sincerely,

The NearlyFreeSpeech.NET Stupid Bureaucratic Rules Compliance Department

Add comment   Edit post   Add post

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.

Live: https://gibgoygames.com/zippy

Demo: https://youtu.be/lRRDAxeUUoQ

Code: https://github.com/billstclair/elm-zippy

Add comment   Edit post   Add post

elm-oauth-middleware

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

Twitterrific

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",
 "id":933692459351265280,
 "id_str":"933692459351265280",
 "text":"Will be doing a live Thanksgiving Video Teleconference with Members of the Military...",
 "truncated":true,
 "source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" ...",
 "in_reply_to_status_id":933662564587855877,
 "in_reply_to_status_id_str":"933662564587855877",
 "in_reply_to_user_id":25073877,
 "in_reply_to_user_id_str":"25073877",
 "in_reply_to_screen_name":"realDonaldTrump",
 "user":{"id":25073877,"id_str":"25073877"},
 "geo":null,
 "coordinates":null,
 "place":null,
 "contributors":null,
 "is_quote_status":false,
 "retweet_count":5122,
 "favorite_count":28375,
 "favorited":false,
 "retweeted":false,
 "lang":"en"
}

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'
{"ids":[742479627592052736,2209081703,140410587,848195164673855490,3854255787],
 "next_cursor":0,
 "next_cursor_str":"0",
 "previous_cursor":0,
 "previous_cursor_str":"0"
}

Lookup details on one of those user IDs:

$ twurl '/1.1/users/lookup.json?user_id=140410587&include_entities=0'
[{"id":140410587,
  "id_str":"140410587",
  "name":"Trump supporter",
  "screen_name":"EdMendez1969",
  "location":"",
  "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.

https://youtu.be/wmEqgjT61FA

1 comment   Edit post   Add post