Skip to content

Instantly share code, notes, and snippets.

Last active Jan 15, 2022
What would you like to do?
Scratchpad: 100 days of Common Lisp

Scratchpad: 100 days of Common Lisp

I'd like to organize a "100 days of Common Lisp" (inspired by 100 days of Swift).

I'll use this as a scratch space to collect resources and organize my thoughts.


  • atoms: numbers, strings
  • symbols, binding using setq
  • list evaluation, (+ 1 1) etc
  • quote
  • declaring functions, lambda
  • lists
  • vectors
  • alists
  • hash tables

resources to use:

Day X: Install CLISP

On a Mac, install Homebrew and then use Homebrew to install CLISP.

  • Open a terminal
  • Run bash -c "$(curl -fsSL"
  • Run brew install clisp
  • Run clisp
    • Hit CTRL+d (or type (quit) at the REPL prompt) to exit CLISP.

Day X: CLISP REPL, part 1

When you run clisp, it starts a REPL (read-eval-print loop), where you can type in Common Lisp code and have it executed.

Try typing in (+ 1 1), which should evaluate to 2:

[1]> (+ 1 1)

Try typing in foo:

[2]> foo

*** - SYSTEM::READ-EVAL-PRINT: variable FOO has no value
The following restarts are available:
USE-VALUE      :R1      Input a value to be used instead of FOO.
STORE-VALUE    :R2      Input a new value for FOO.
ABORT          :R3      Abort main loop
Break 1 [3]> 

Here we see a condition bring thrown (called exceptions in other languages), which starts the debugger.

You can always exit the debugger by hitting CTRL+d.

Day X: Atom + SLIMA

Download the Atom editor.

Install the SLIMA package.

Set up (or memorize) key bindings for compiling and evaluating forms.

Day X: HyperSpec

The HyperSpec describes the 1994 ANSI standardization of Common Lisp (which is the most recent version of Common Lisp).

The list of all symbols is very useful.

Day X: Simplified Common Lisp Reference


Day X: ashok-khanna/lisp-notes


Day X: CSCI 330 lisp examples


Day X: Common Lisp Cookbook


Day X: 40ants/lisp-project-of-the-day


Day X:


Day X: UltraSpec


Day X: quicklisp

Quicklisp is the defacto package manager for Common Lisp.

Day X: Quickdocs

Quickdocs is a documentation portal for quicklisp packages.

Day X: Quicklisp blog

Xach publishes a Quicklisp news blog which highlights newly added projects. Check it out and consider subscribing to stay on top of new libraries.

Day X: asdf


Day X: roswell


Day X: The most popular Quicklisp projects

Occaisionally, Xach publishes a blog post with quicklisp project download stats, which you can use to figure out which quicklisp libraries are most commonly used.

See also

See also

Day X: alexandria


Day X:


Day X: Practical Common Lisp


Day X: Exercism

See -

Day X: bordeaux-threads


Day X: Rainer Joswig


Day X: Common Lisp standards


Day X: Advent of Code solutions

Day X: Neil Munro tutorial videos


Day X: equality

eq, eql, equal, equalp, =, char=, char-equal, string=, string-equal

  • = only works on numbers, will match ints and floats
  • eq is t for same, identical objects
  • eql is eq + numbers (same type) + characters
  • equal is eql + deep list comparison,
  • equalp also arrays, structures, hash tables, but is case insensitive?!?

Day X: set, setq

  • (set 'a 1)
  • (setq a 1)
  • (setf (symbol-value 'a) 1)
  • (boundp 'a), (makunbound 'a)

note: set doesn't work with lexical variables, but setq does.

Day X: value cells

  • symbol-value
  • (setf (symbol-value 'a) 1)

Day X: ANSI Common Lisp, ch 2.1

Day X: ANSI Common Lisp, ch 2.2

Day X: ANSI Common Lisp, ch 2.3

Day X: ANSI Common Lisp, ch 2.4

Day X: ANSI Common Lisp, ch 2.5

Day X: ANSI Common Lisp, ch 2.6

Day X: ANSI Common Lisp, ch 2.7

Day X: ANSI Common Lisp, ch 2.8

Day X: ANSI Common Lisp, ch 2.9

Day X: ANSI Common Lisp, ch 2.10

Day X: ANSI Common Lisp, ch 2.11

Day X: ANSI Common Lisp, ch 2.12

Day X: ANSI Common Lisp, ch 2.13

Day X: ANSI Common Lisp, ch 2.14

Day X: ANSI Common Lisp, ch 2.15

Day X: ANSI Common Lisp, ch 2.16

Day X: Aliasing a function

Aliasing evenp as even?:

(setf (fdefinition 'even?) #'evenp)


(setf (fdefinition (quote even?)) (function evenp))


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment