(Partly generated by LLM)
This guide walks through the installation of Steel Bank Common Lisp (SBCL) and the CIEL library, a modern development environment for Common Lisp. We’ll cover the basic setup, package management, and essential tools.
Install SBCL
SBCL is a high-performance Common Lisp compiler. We’ll install it from source and set up the environment.
# get binaries for Linux x86-64
wget http://prdownloads.sourceforge.net/sbcl/sbcl-2.5.5-x86-64-linux-binary.tar.bz2
tar xvf sbcl-2.5.5-x86-64-linux-binary.tar.bz2
cd sbcl-2.5.5-x86-64-linux-binary
# Install SBCL to a custom directory
sh install.sh --prefix=/home/username/sbcl/
# Add SBCL to your PATH (using fish shell for bash, edit .bashrc file)
fish_add_path /home/username/sbcl/bin/
# Start SBCL with readline wrapper for better REPL experience
rlwrap sbcl
Setup ASDF
ASDF (Another System Definition Facility) is Common Lisp’s build system and package manager. It’s included with SBCL but it is old version. We need to update it for installing CIEL.
;; Verify ASDF installation and version
(require :asdf)
(asdf:asdf-version) ; => "3.3.1"
;; Optional: Update ASDF to latest version
;; First, create necessary directories
mkdir ~/common-lisp
wget https://common-lisp.net/project/asdf/archives/asdf.tar.gz
tar xvf asdf.tar.gz
cp -r asdf-3.3.7/* ~/common-lisp/asdf/
At this point, you can manually load asdf, but it won’t be loaded automatically on start. For autoreload on start, we need to install quicklisp.
Install Quicklisp
Quicklisp is the de facto package manager for Common Lisp. It makes it easy to install and load libraries.
;; Download and start Quicklisp installer
rlwrap sbcl --load ~/Downloads/sbcl-2.5.4-x86-64-linux-binary/quicklisp.lisp
;; Install Quicklisp and add it to your init file
(quicklisp-quickstart:install)
(ql:add-to-init-file) ; This ensures Quicklisp loads automatically
Now you can restart sbcl and check asdf version. It should point to 3.3.7 now.
Install Ultralisp and CIEL
Ultralisp is a distribution of Common Lisp libraries that updates more frequently than Quicklisp. CIEL is a modern development environment that provides additional tools and utilities.
;; Add Ultralisp distribution for access to more recent libraries
(ql-dist:install-dist "http://dist.ultralisp.org/")
;; Install CIEL - a modern development environment
(ql:quickload "ciel")
After completing these steps, you’ll have a fully functional Common Lisp development environment with:
- SBCL as your Lisp implementation
- ASDF for system management
- Quicklisp for package management
- Ultralisp for access to bleeding-edge libraries
- CIEL for enhanced development tools
You can start developing by running rlwrap sbcl
in your terminal.