The VikiD Truth

Knowledge base / Computing / Lisp family

Read This! | | Quick Links | Algorithms | AssemblyLanguage | BASH | C-Programmming | CommonLisp | Computer Security | Databases | Emacs | Exploitation | Functional Programming | Firewalls | Git | Haskell | Javascipt | Julia | Social Engineering | Picolisp | Pharo Smalltalk | Linux | Python | Operating Systems | Machine Learning | Metasploit | Open Data Science | Networking | Machine Learning | Racket | Scheme | Unity | vim | Web Development | Windows WSL

Common Lisp

Here is the truth that took me years to see: Common Lisp is not an old language that refused to die – it’s a living system that was finished early. It was standardised in 1994, and code written then still runs unchanged today on fast, native-code compilers. Few languages can say that.

What it is, in plain words

Common Lisp (CL) is a member of the Lisp family, defined by the ANSI X3.226 standard. Programs are written as s-expressions – nested lists in parentheses – and because code is list data, Lisp programs can write and transform Lisp programs. That’s what macros are.

Its personality, in a few lines:

Why it matters

Common Lisp shows what programming feels like when the language never stops you: you can grow it with macros, fix bugs in a live program, inspect any object, and get native speed. Those ideas – REPL-driven development, hot reloading, code as data, generic functions – keep being rediscovered by newer languages. Learning CL is learning where they came from. And for someone who loves PicoLisp, CL is the big, batteries-included cousin: different philosophy (PicoLisp is tiny, interpreted and dynamically bound; CL is large, compiled and lexically scoped), same joy.

An everyday analogy: a workshop you can rebuild while working in it

Most languages are like a factory: design, build, then run, and to change anything you stop the line. Common Lisp is a workshop where you can swap the drill bit, rebuild the workbench and add a new tool while you’re still holding the piece you’re working on – and the piece doesn’t fall on the floor.

flowchart LR
  E[Emacs + SLIME/Sly] <-- Swank --> I[Running SBCL image]
  I --> C[compile function]
  C --> I
  I -- error --> D[Debugger with restarts]
  D -- fix & continue --> I

A hands-on example

Install SBCL (Void: sudo xbps-install -S sbcl, Arch: sudo pacman -S sbcl) and start it with sbcl.

;; A function
(defun square (x) (* x x))
(square 12)                     ; => 144

;; Higher-order functions
(mapcar #'square '(1 2 3 4))    ; => (1 4 9 16)
(remove-if-not #'evenp '(1 2 3 4 5 6)) ; => (2 4 6)

;; The famous LOOP mini-language
(loop for i from 1 to 10
      when (oddp i) collect (* i i))   ; => (1 9 25 49 81)

;; A tiny CLOS class with a generic function
(defclass machine () ((name :initarg :name :reader name)
                      (wm   :initarg :wm   :reader wm)))
(defgeneric describe-box (m))
(defmethod describe-box ((m machine))
  (format nil "~a runs ~a" (name m) (wm m)))
(describe-box (make-instance 'machine :name "vikix" :wm "StumpWM"))
;; => "vikix runs StumpWM"

;; A macro: new syntax in five lines
(defmacro while (test &body body)
  `(loop (unless ,test (return)) ,@body))
(let ((n 3)) (while (> n 0) (print n) (decf n)))

That last one is the heart of Lisp: while isn’t in the standard, so we added it, and now it’s as real as anything built in.

The modern toolchain (2026)

Common misconceptions

Connections

Functions of Interest

Rip Tutorial Book A Road to Common Lisp Common Lisp: A Gentle Introduction to Symbolic Computation. Practical Common Lisp learn x in y minutes Let Over Lambda Lisp-Lang QuickLisp Slime LearnXinYminutes Common Lisp Common Lisp on Emacs Graphics Lessons in Mac Common Lisp Quick Reference Nyxt browser: Documentation

Last edited · 13 revisions

Tags: #Computing