Lisplings: Rustlings-style exercises for Common Lisp

70 exercises in 20 chapters, from first s-expressions to restarts,
macros, CLOS, and a tiny Lisp interpreter. Each exercise ships
broken with a solved twin and a hint. Includes a watch-mode runner,
a plain-CL check harness, a nix flake, and verification tooling.
All plain SBCL, no dependencies.
This commit is contained in:
venomade committed 2026-11-22 03:30:19 +00:00
commit 4df60ead93
172 files changed
+4403

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
;;; LISPLINGS
;;;
;;; This first exercise has no errors. It is here to show you the flow:
;;;
;;; 1. Lisplings is watching this file. Every time you save it, the
;;; exercise runs again in the terminal.
;;; 2. The exercises that follow contain an error: the file does not
;;; load, or a check at the bottom fails. Your job is to fix them.
;;; 3. When everything passes, press n in this terminal to move on.
;;; 4. Stuck? Press h for a hint.
;;;
;;; Try it now: add a line to the banner below, save the file, and
;;; watch what happens in the terminal.
(format t "~%")
(format t " /~%")
(format t " /~%")
(format t " /~%")
(format t " /\\~%")
(format t " / \\~%")
(format t "/ \\~%")
(format t "~%")
(format t " Welcome to Lisplings!~%")
(format t " Small exercises to get you used to reading and~%")
(format t " writing Common Lisp code.~%~%")
(format t "This exercise is exercises/00_intro/intro1.lisp.~%")
(format t "Edit it in your editor of choice and save; the output~%")
(format t "appears here automatically. Press n when you are ready.~%")
+11
View File
@@ -0,0 +1,11 @@
;;; INTRO 2: READING AN ERROR
;;;
;;; This exercise does not run. Read the error in the terminal, then
;;; fix it so the greeting prints.
;;;
;;; The ~a below is a format directive: "put a value here". But no
;;; value was given after the format string...
(format t "Hello, ~a! Welcome to Common Lisp.~%")
(format t "Save this file with your fix; lisplings runs it again.~%")