The Shape of Lisp
Symbols, functions and lists — why the whole language is a handful of ideas wearing parentheses.
Read →CLOS chooses a method by the types of every argument at once. A field
guide to multiple dispatch, mixins, and call-next-method — taught with
dragons, warriors, and a great deal of fire.
almighty/dragons.lisp
CL-USER
;; the method is chosen by the types of BOTH arguments
(defmethod attack ((a dragon) (target warrior))
(format t "~&The dragon breathes fire on the ~a!~%"
(name target))
(call-next-method))
The dragon breathes fire on the warrior! Fire hits armor! 80% deflected.
Symbols, functions and lists — why the whole language is a handful of ideas wearing parentheses.
Read →Code that writes code — backquote, splicing, hygiene, and when not to reach for one.
Read →Start in the menus. Earn your keybindings one C-x at a time. No memorizing.
Restarts turn a crash into a dialogue. Signal, handle, recover — keep the image alive.
Read →The macro the purists warned you about is also the friendliest iteration DSL anywhere.
Read →From a live image to a single executable you hand to anyone. Nothing to install.
Read →An almighty language that summons its users to become almighty.
The macros are waiting · the REPL is loaded · become almighty
Other books teach Common Lisp but leave you stranded at the Emacs wall. This one pulls you up and over it — the language and its editor in a single volume, so proficiency with both compounds instead of competing.
You'll be barfing and slurping while you C-c C-c macros in no time.
Read the book →