Installing Common Lisp locally

Learn how to install Common Lisp locally to solve Exercism's exercises on your own machine


What's needed

The basic items needed for developing in Common Lisp are:

  • A Lisp "Implementation", which will allow you to compile and execute code, as well as supply a REPL.
  • A Text editor with facilities for Lisp code.
  • (Nice to have) The often-used reference for the Common Lisp language, the "Common Lisp Hyperspec".

Roswell

Roswell is a command to install and manage Common Lisp implementations, and many features to make developing and distrubuting Lisp applications easy. We're using it to simplify the install and testing steps.

Install Roswell

See the Installation Guide and follow the instructions for your platform. For most users, the following will be sufficient:

  • For MacOS and Linux, Homebrew makes this simple:
    brew install roswell
    
  • For Windows, use Scoop:
    scoop install roswell
    

The first time you use Roswell, it will fetch and install SBCL and Quicklisp. Just run this:

ros help

Enter the REPL with

ros run

Configure your text editor

For people new to Common Lisp, particularly ones with previous experience with Emacs, can get an easy & quick start by installing Portacle, the Portable Common Lisp Environment. Free and full featured, it works in all common platforms and comes preconfigured "out of the box". This will supply:

  • A Lisp implementation: SBCL, including Quicklisp and ASDF.
  • A Text editor: Emacs

... with lots of add-ons for writing with Lisp code:

  • SLIME, the "Superior Lisp Interaction Mode for Emacs" turns Emacs into a Common Lisp IDE
  • ParEdit, which makes working with parentheses easy.

Everything comes already configured out of the box. Install Portacle by downloading from the front page.

Note: Emacs (text editor) can be disorienting at first, if you're not accustomed to it. Fortunately there are many primers on Emacs and SLIME available online.

Traditional Start

If you prefer installing the needed tools separately you will need to install and set up: