Wave 4: add sequences/vectors/files chapters, 23 exercises, quiz3, finish ceremony, PCL table

This commit is contained in:
venomade committed 2026-11-22 11:15:35 +00:00
1 parent 77843402fa
commit 4675bd1106
76 files changed
+2505 -14

No files matched your search

+48 -2
View File
@@ -115,7 +115,7 @@ live in the same file you edit, which is the Lispy way.
## The course
70 exercises in 20 chapters, from first forms to restarts, macros,
105 exercises in 23 chapters, from first forms to restarts, macros,
and a tiny Lisp interpreter:
```text
@@ -123,13 +123,59 @@ and a tiny Lisp interpreter:
04_conditionals 05_predicates 06_lists 07_recursion
08_functional 09_strings 10_loops 11_numbers
12_structs 13_hash_tables 14_packages 15_clos
16_conditions 17_macros 18_dynamic quizzes
16_conditions 17_macros 18_dynamic 19_sequences
20_vectors 21_files quizzes
```
Each chapter directory has a README with a two-line summary of the
ideas, and every exercise has a hint (`h`) and a solved twin under
`solutions/`.
## Chapter to book mapping
Two references will carry you from here. [Practical Common Lisp]
(http://www.gigamonkeys.com/book/) ("PCL") is the book this course
runs parallel to; the [Common Lisp HyperSpec]
(https://www.lispworks.com/documentation/HyperSpec/Front/) ("CLHS")
is the language's complete reference. Where each chapter points:
| Lisplings chapter | PCL | CLHS |
| --- | --- | --- |
| 00_intro | ch. 1-2 (Introduction; A Tour of the REPL) | n/a |
| 01_sexps | ch. 4 (Syntax and Semantics) | §2-3 (character syntax, evaluation) |
| 02_functions | ch. 5 (Functions) | §3 (lambda, function) |
| 03_variables | ch. 6 (Variables) | §3 (let, let*, defvar), §5 (setf) |
| 04_conditionals | ch. 7 (Macros: Standard Control Constructs) | §5 (data and control flow) |
| 05_predicates | n/a (equality bits live in ch. 4 and ch. 10) | §4 (types), §5 (eq, eql, equal, equalp) |
| 06_lists | ch. 11-12 (Collections; List Processing) | §14 (conses) |
| 07_recursion | ch. 12-13 (lists, trees) | §14 (conses) |
| 08_functional | ch. 5, ch. 11-12 (function values; mapcar and friends) | §17 (mapcar), §5 (funcall, apply) |
| 09_strings | ch. 10 (Numbers, Characters, and Strings); ch. 18 (A Few FORMAT Recipes) | §16 (strings), §22 (format) |
| 10_loops | ch. 7 (dolist, dotimes); LOOP for Black Belts | §6 (iteration) |
| 11_numbers | ch. 10 (Numbers, Characters, and Strings) | §12 (numbers) |
| 12_structs | n/a (PCL goes straight to objects, ch. 16-17) | §8 (structures) |
| 13_hash_tables | ch. 11 (Collections) | §18 (hash tables) |
| 14_packages | n/a (no dedicated PCL chapter) | §11 (packages) |
| 15_clos | ch. 16-17 (Object Reorientation) | §7 (objects) |
| 16_conditions | ch. 19 (Beyond Exception Handling: Conditions and Restarts) | §9 (conditions) |
| 17_macros | ch. 7-8 (Standard Control Constructs; Defining Your Own) | §3 (defmacro, macroexpand) |
| 18_dynamic | ch. 6 (closures, special variables) | §3 (dynamic binding), §5 (catch, throw) |
| 19_sequences | ch. 11 (Collections: sequence functions) | §17 (sequences) |
| 20_vectors | ch. 11 (vectors; strings are vectors, ch. 10) | §15 (arrays), §16 (strings) |
| 21_files | ch. 14-15 (Files and File I/O; A Portable Pathnames Library) | §19-21 (filenames, files, streams) |
| quizzes | quiz3: ch. 11, ch. 13; quiz1: ch. 3, ch. 13; quiz2: ch. 4 | n/a |
## The finish line
When the last check of the last exercise passes, lisplings prints
its closing message: the lambda from the top of this README, now
yours, plus where to go next - which Practical Common Lisp
chapters follow the course, how Quicklisp and ASDF fit in, and a
reminder that (describe) and (apropos) answer questions right in
the REPL. The text lives in `info.sexp` under `:final`; make it
yours. Want to keep going? Add the exercise you wish had been
there - the recipe is in "Hacking on lisplings" below.
## Hacking on lisplings
Lisplings itself is a few hundred lines of SBCL with no dependencies: