LISP - Home
A Modern Introduction to Lisp
Section titled “A Modern Introduction to Lisp”Welcome to the world of Lisp! While it is the second-oldest high-level programming language (after Fortran), Lisp is far from a relic. Its core principles—code is data (homoiconicity), interactive development, and powerful macro system—have profoundly influenced modern languages like Python, Ruby, and JavaScript, and remain highly relevant today.
This tutorial focuses on Common Lisp, the standardized, industrial-strength dialect known for its stability, performance, and extensive feature set. You will learn not just the syntax, but the ‘Lisp way’ of solving problems, which emphasizes rapid prototyping and building extensible systems.
Who is This Tutorial For?
Section titled “Who is This Tutorial For?”This guide is for anyone curious about Lisp, from beginners with basic programming knowledge to experienced developers looking to expand their toolkit. If you know what a variable, a function, and a loop are, you’re ready to start.
Prerequisites: Setting Up a Modern Lisp Environment
Section titled “Prerequisites: Setting Up a Modern Lisp Environment”To follow this tutorial, you’ll need a Common Lisp implementation and a good development environment. The Lisp experience shines brightest when development is interactive.
- Lisp Implementation: We recommend SBCL (Steel Bank Common Lisp). It’s a high-performance, open-source, and widely used implementation. Download it from sbcl.org.
- Quicklisp: This is the de-facto package manager for Common Lisp. It lets you install hundreds of libraries with a single command. Instructions are at quicklisp.beta.quicklisp.org.
- Development Environment: A REPL (Read-Eval-Print Loop) is central to Lisp. For the best experience, we recommend:
- Emacs + SLIME or Sly: The classic, most powerful setup for interactive Lisp development.
- VS Code + Alive: A modern and increasingly popular alternative that brings a solid interactive experience to a familiar editor.
- Portacle: A portable, pre-configured Lisp environment containing SBCL, Emacs, SLIME, and Git.
Setting up your environment is a crucial first step. The time you invest here will pay off immensely in productivity and enjoyment.
The Lisp Philosophy
Section titled “The Lisp Philosophy”As you go through this tutorial, keep these core ideas in mind:
- Interactivity: Don’t just write and run scripts. Connect to your running Lisp image, evaluate code snippet by snippet, redefine functions on the fly, and inspect program state without restarts. Your editor is your command center.
- Extensibility: Lisp’s macro system allows you to extend the language itself. When the language is missing a feature you need, you can add it. This makes Lisp exceptionally good for building domain-specific languages (DSLs).
- Pragmatism: Common Lisp is not just an academic language. It’s a practical tool with everything you need for modern software development: object-oriented programming (CLOS), robust condition handling, native code compilation, and a vast ecosystem of libraries via Quicklisp.