Pascal Costanza’s highly opinionated guide to Lisp

Pascal Costanza’s highly opinionated guide to Lisp

Pascal Costanza’s Highly Opinionated Guide to Lisp

Part introduction, part paean to the language’s power, part study guide, while dipping into an eclectically-chosen subset of Lisp features that really illustrate what makes it different.

A road to Common Lisp

A road to Common Lisp

A Road to Common Lisp

This a really brief, yet really interesting, approach to introducing Lisp to someone. Interesting because it covers all the usual ground, but also has copious pointers to other material slightly-beyond-introductory (“Where to go from here”). It also links to material that’s essential to modern practice, such as Lisp packages and systems, and the essential “standard libraries” such as Alexandria, Bordeaux, CL-PPCRE, usocket, and the like: the things that are needed in practice and which in other languages would probably be built-in and included directly in an introduction.

A Mathematician’s Apology

G.H. Hardy (1940)

A short dispatch from another world. It’s hard to recognise the academia portrayed by Hardy, and I’m not sure that’s a bad thing. One has to admire its purity, though: a principled neglect of everything outside a particular field of study, and the deeply interwoven social life that goes with it. It sounds at once attractive and claustrophobic, inspiring and shallow.

Hardy is a perfect narrator and exemplar, being so diffident about his own accomplishments as to characterise them as having worked with one excellent mathematician (Littlewood) and discovered another (Ramanujan). He was a lot more than that within the small world of number theory in which he worked, including being a foundational contributor to computational complexity theory (although not in the exact definition currently used).

Reading this book sometimes feels like an intellectual making a trip to the world of Brideshead Revisited, and that may be the right way to think of academia in the inter-war years: tied-up in upper-class privilege, class-consciousness, and repression.

3/5. Finished Friday 24 May, 2024.

(Originally published on Goodreads.)

First installation of BirdNET-Pi

First installation of BirdNET-Pi

The BirdNET-Pi system aims to provide out-of-the-box bird identification. It’s slightly more awkward than that, but still pretty straightforward to get up and running.

My first hardware plan was to use a Raspberry Pi Zero as the compute host with a Waveshare WM8960 HAT for the sound capture. It turns out that BirdNET needs a 64-bit platform – why I’m not sure – and the Pi Zero only runs 32-bit Linux. I therefore moved to a Raspberry Pi B that I had lying around, and put a 64-bit “lite” install on it to run headless.

I then basically just followed the installation guide. There was an issue with the installation script when cloning the GitHub repo: I suspect this was because of limited memory on the Pi. I downloaded manually, and manually ran the rest of the install script, which did a lot of setup of services and a PHP web server.

I compiled the drivers for the HAT, which worked fine. The new sound card is recognised but is not the system default.

The installed components seem to include:

  • icecast2, a streaming server, used to replay recordings
  • caddy web server
  • PHP for serving the web pages
  • arecord to actually record audio
  • ffmpeg to extract waveforms
  • sqlite for the database
  • the actual machine learning model used for recognition

The recognition models are built with TensorFlow. This is a great example of how the standard Linux tools and services can be combined to get a scientific-grade sensor platform. (Caddy doesn’t seem to be running over TLS by default, which would be an issue outside a firewall.)

Since the sound card isn’t the default, the easiest way to get the system listening to the right mics is to change the device in the “advanced settings” panel: in my case I changed from “default” to “hw:2,0”, reflecting the output of arecord -l that shows the sound card devices.

I then deployed the Pi out of the kitchen window.

nil

To start with it wasn’t hearing anything, which I think may be because of the waterfall in the courtyard: turning this off made things much more effective:

nil

That’s an appropriate set of birds being seen – and we hardly ever see magpies, but know they’re around. There’s actually quite a lot of background noise even in such a quiet village, but the bird calls do stand out.

I can’t see any reason for the manual installation on bare metal: as far as I can see everything could be containerised, which would make deployment and management a lot easier.

Sideshow: Kissinger, Nixon & the Destruction of Cambodia

William Shawcross (1979)

A shocking tale of aggression and duplicity, where a country whose only fault is to be too weak to resist incursions by another is attacked and undermined by a third country still claiming the moral high ground.

Alost every character comes out badly from this story – but especially Henry Kissinger, whose willingness to sacrifice foreign lives while protecting his own reputation and influence are quite breathtaking. It’s troubling that Nixon’s fall was for reasons other than his orders to bomb Cambodia and his willingness to lie to Congress (whom he was constitution-bound to consult and inform). The fact that the Cambodian leadership of Lon Nol and Sihanouk were also corrupt and self-serving offers no excuse. The US Joint Chiefs stood behind him because it suited them to extend the Vietnam War rather than end it, even after the point that they knew it was un-winnable and were extracting their own ground forces. Together these people all opened the door for the Khmer Rouge and the killing fields that followed, and did so knowing the risks they were running.

4/5. Finished Saturday 18 May, 2024.

(Originally published on Goodreads.)