All notes tagged with quicklisp.

June 10, 2022

lisp quicklisp

How to install Quicklisp

Before starting, make sure you have installed SBCL. Then, get the quicklisp file, which lets you bootstrap and install Quicklisp.

cd ~/downloads
curl -O http://beta.quicklisp.org/quicklisp.lisp
sbcl --load quicklisp.lisp

Now you are in the REPL, and you can install Quicklisp. By default, it will be installed in ~/quicklisp, but I like to keep my home directory clean and install it in ~/.local/share/quicklisp. Thus the :path argument.

(quicklisp-quickstart:install :path "~/.local/share/quicklisp/")

I also prefer Quicklisp to be available when I start SBCL, so I add it to my init file:

(ql:add-to-init-file)

That’s it! Happy Lisping!

Make your own packages available to Quicklisp

In Lisp it’s quite common to have your own helper libraries, which are packaged as ASDF packages. To be able to use your libraries in other projects, you need to let ASDF know how to find them.

First create the directory ~/.config/common-lisp/source-registry.conf.d/

There create a file with any name of your choice but with the type conf, for instance 50-petar-lisp.conf.

In this file, add the following line to tell ASDF to recursively scan all the subdirectories under /home/petar/lisp/ for .asd files: (:tree "/home/petar/lisp/").