Overview
Content
- CLOS: Common Lisp Object System
Characters
Characters in Common Lisp are a distinct type.
Working with Strings
Common Lisp Environment
Since i had a long time difficulties to understand what SBCL is, how it is related to Slime / Sly and what ASDF is and how it’s different from Quicklisp, i decided to write down some notes on the Common Lisp Environment which tries to explain it in an easy way.
SBCL
If you want to program in Lisp you need a Lisp implementation. SBCL is a good choice. SBCL is the Common Lisp implementation i use. It’s the most common lisp (no pun intendet) dialect today. SBCL stands for ‘Steel Bank Common Lisp’. Lisp is a interpreted language, but SBCL allows code compilation, interactive debgugging, multithreading and stands on the ANSI Common Lisp standard. You can get it here: sbcl.org.
SLIME / SLY
SLIME (Superior Lisp Interaction Mode for Emacs) and Sly (Sylvester the Lisp Yet) are Emacs modes for developing Common Lisp Code. They both have a powerfull REPL (Read Evaluate Print Loop), which is basically the interface from Emacs to your Lisp implementation on your local machine. When you evaluate lisp code in Emacs it is send to your REPL, where it is read, evaluated and the result is printed. After this the REPL is set back to start and waits for the next run. Sly is a more modern Emacs Mode and has better debugging tools, auto completion and inspector functions. You can install from inside Emacs with MELPA.
ASDF
ASDF (Another System Definition Facility) is a build and package system for Common Lisp. It loads and organizes projects and their dependencies. It is part of SBCL.
Projects are organized as ‘Systems’ and defined in .asd
files. A System consits of sourcefiles and dependencies. ASDF can load and organize these systems.
Quicklisp
Quicklisp advances ASDF with a repository of libraries. With Quicklisp you can load and install packages from the internet in a convenient way.
Libraries
Mapcar
A example for a nested mapcar. This allows a