Learn
Getting started
A Lisp on your machine, an editor that talks to it, and the libraries: an afternoon's work.
Common Lisp is not a language you write, compile and run. You start a Lisp, keep it running, and talk to it: each definition you write goes into the live image, and what you have built so far stays up while you change it. So a working setup is three things: a running Lisp, an editor connected to it, and a way to fetch libraries. This page takes them in turn, and ends with two ways to try Lisp without installing anything.
- Install it: SBCL on your own machine, Quicklisp beside it, your editor connected. The usual way.
- Run it in a container: nothing to install but Docker.
- Try it in the browser: nothing installed at all.
Install a Lisp
Steel Bank Common Lisp (SBCL) is the implementation most people start with: a fast native compiler, free, well kept, on every platform. Your package manager has it:
brew install sbcl # macOS
sudo apt install sbcl # Debian, Ubuntu
sudo dnf install sbcl # Fedora
sudo pacman -S sbcl # ArchOn Windows, SBCL's download page has an installer, and WSL with the Debian line above works as well. Then start it:
$ sbcl
* (+ 1 2)
3
* (defun greet (name) (format nil "Hello, ~a." name))
GREET
* (greet "Lisp")
"Hello, Lisp."The * is the prompt of the REPL, the read-eval-print loop, and the
place where Lisp is written; (quit) leaves it.
Clozure Common Lisp (CCL) is the other
common free choice, quick to compile and comfortable to debug in.
The implementations page has the rest, including
the commercial ones and their free editions.
Add the libraries
Quicklisp fetches and loads any of some 1,500 libraries with one form. Install it once:
curl -O https://beta.quicklisp.org/quicklisp.lisp
sbcl --load quicklisp.lisp
* (quicklisp-quickstart:install)
* (ql:add-to-init-file)From then on, in any session:
* (ql:quickload "alexandria")Quicklisp's releases are what most of the Lisp world runs. Two newer tools serve particular needs: ocicl keeps each project's libraries with the project, fetched from an OCI registry, and Qlot pins versions in a lockfile the way npm or Cargo do. Underneath them all is ASDF, the system definition tool that comes with every implementation. The libraries page says where to look for what there is.
Connect an editor
Any editor can edit a .lisp file. The one you want is connected to
the running Lisp: a key sends the form under the cursor to it, the
result comes back beside it, and the documentation, the inspector and
the debugger are a keystroke away. There are two kinds of tool for
that: the editor you already use, taught to talk to a running Lisp;
or an IDE that is itself written in Lisp.
Your editor, connected to a running Lisp
The editor runs as its own program and talks to a Lisp running beside it, almost always over Swank, the protocol SLIME introduced. One Lisp can serve several editors, and it can be on another machine.
Emacs, with SLIME or SLY
The long-standing choice, and still the deepest. SLIME is the original; SLY is its fork with a few more comforts. The Cookbook's guide sets either up in ten minutes.
VS Code, with Alive
Alive gives VS Code a REPL, inline evaluation and a debugger over SBCL. OLIVE is another extension, which connects through SLIME's Swank instead. If VS Code is already your editor, start here.
Portacle bundles Emacs, SBCL, Quicklisp and Git into one download that runs from a folder, on Windows too. It was last released in 2020, so its parts are a few years behind the current ones; it still works, and for a first week it asks nothing of you.
IDEs written in Lisp
Here the editor is a Lisp program too, and you can change it in the language you are learning.
Lem
Lem is a general-purpose editor written in Common Lisp, with Emacs keys by default and vi keys if you ask. Its REPL can run in Lem's own image, with the editor's code at hand, or drive a separate Lisp the way SLIME does.
mine
mine is an IDE for Common Lisp and Coalton made for newcomers first: one download for Windows, macOS or Linux, SBCL built in, a REPL, a debugger and projects, in the spirit of QBASIC and Borland's Turbo tools. It is new, and its authors call it alpha-quality.
The commercial IDEs
LispWorks and Allegro CL each come with an IDE that runs in the same image as your program: editor, inspector, debugger and the program itself all one Lisp. Both have free editions to learn on, the LispWorks Personal Edition and the Allegro CL Express Edition.
Clozure CL has an IDE of its own on macOS. Second Climacs, a new Emacs-like editor in Common Lisp, is worth watching, though not yet one to start on.
Or run it in a container
With Docker (or Podman) and nothing else, the site's images give a Lisp prompt in one command:
docker run --rm -it clfoundation/sbclReplace sbcl with ccl, ecl, abcl, clasp, clisp or cmucl;
what the images are and how they are built.
That is a bare Lisp, good for a look, and the same image is a sound
base for a project's own container.
A whole environment, editor included
Basalt starts a set of
containers with one command: an Emacs console with SLIME already
connected, Lisp engines on SBCL and on CCL with Quicklisp aboard, and
a monitor that restarts whatever hangs. Your ~/projects directory
appears inside. Every service also answers
MCP, so an AI coding agent on your
machine can evaluate code in the same Lisp you are working in, and you
watch it do so from the console. Nothing is installed on the host
beyond Docker.
git clone https://github.com/genworks/basalt
cd basalt
./basalt up
./basalt emacsWorth knowing before you choose it: the editor is Emacs, in a terminal; the engines are Gendl images, a full SBCL or CCL with a knowledge-based engineering layer loaded on top, which a newcomer can leave alone; and Basalt comes from Genworks, the company of one of this site's maintainers. The console on its own, as a container or as a configuration for an Emacs you already have, is Readymacs.
Or try it in the browser
JSCL is a Lisp that runs on the web page itself. It is not a complete Common Lisp, but it is enough for a first taste of the parentheses, and nothing to clean up afterwards.
The first week
- Read. Practical Common Lisp is the book to work through: it teaches the language by building things. The documentation page lists the others, the language standard and the references.
- Keep the Cookbook open. The Common Lisp Cookbook has a page for whatever you are doing: strings, files, the web, testing, starting a project.
- Ask.
#commonlispand#clschoolon Libera.Chat answer beginners' questions all day; the community page has the rest. - Give it a home. When the project is real, common-lisp.net hosts open source Lisp projects.
Another guide: CLiki's.
Something wrong or missing here? Edit this page on GitLab.