Programming in prolog book

Programming in Prolog

My next self-directed study series will be the book Programming in Prolog (Fourth Edition) by W.F. Clocksin and C.S. Mellish. This is a classic textbook that I did use at University. I learned Lisp and Prolog as the alternative languages but I never used them since that one off course. I remember liking it. I no longer have my original textbook but I picked up a copy really cheaply from AbeBooks.

I like the cover of this edition of the book published in 1996. The colours are nice. Here’s a picture of the front and back covers of the book that I took with a nice Lumix camera that I’ve had sitting in the closet for about 5 years. I bought it to make videos when a friend and I were developing a course but never used it since. I thought it would be in keeping with the less cloud-connected approach I am using on my re-discovery path. I don’t really know all the features of this camera but it might be fun to use it and find out.

Programming in prolog book
Programming in prolog book back

SWI Prolog

I decided to install SWI Prolog for the following reasons:

  • It supports Edinburgh-style Prolog, which is the basis for most classic textbooks
  • It is actively maintained but backward-compatible
  • It has good documentation and an interactive REPL
  • It is available on all major platforms (good for consistency as I am using multiple machines)

Install on MacOS

brew install swi-prolog
swipl

Install on Ubuntu

sudo apt update
sudo apt install swi-prolog
swipl

I have another old book that I’m also going to use in this series called Prolog Programming for Students by David Callear published in 1994. It was a bargain. I’ll use it for another reference whilst working through the main book. In the same AbeBooks order I also picked up a more advanced book that I might work through later on. Back in the day I had a whole bookcase full of “nerd” books as I called them. I kept all my University textbooks because they had been so expensive to me at the time. But somewhere on the path of life I gave them all away. It’s so cheap to pick up old copies now and pdfs are also available. Having some books is a good reminder of what I liked and still do. They bring me joy.