> (defun pudding-eater (person)
(cond ((eq person 'henry) (setf *arch-enemy* 'stupid-lisp-alien) '(curse you lisp alien – you ate my pudding))
((eq person 'johnny) (setf *arch-enemy* 'useless-old-johnny) '(i hope you choked on my pudding johnny))
(t '(why you eat my pudding stranger ?))))
> (pudding-eater 'johnny)
(I HOPE YOU CHOKED ON MY PUDDING JOHNNY)
> *arch-enemy*
JOHNNY
arch-enemy at this time should hold the value 'useless-old-johnny, not 'johnnyAt least the intent of the code is still clear.
CL-USER> (defvar *arch-enemy* nil)
(defun pudding-eater (person)
(cond ((eq person 'henry)(setf *arch-enemy* 'stupid-lisp-alien)'(curse you lisp alien - you ate my pudding))
((eq person 'johnny)(setf *arch-enemy* 'useless-old-johnny)'(i hope you choked on my pudding johnny))
(t'(why you ate my pudding stranger?))))
PUDDING-EATER
CL-USER> *arch-enemy*
NIL
CL-USER> (pudding-eater 'johnny)
(I HOPE YOU CHOKED ON MY PUDDING JOHNNY)
CL-USER> *arch-enemy*
USELESS-OLD-JOHNNY
CL-USER>Long Live Lisp.
FWIW, the proof used the halting problem and went like this. Assume there is a an unoptimized program that, when ran, would go through a series of motions but ultimately halt without any useful output or side-effect. Assume there existed a perfect compiler, PC; that compiler would need to be sufficiently smart enough to translate the problem to a single HALT instruction (or "Label X: goto X".) But since the halting of programs can not be proven analytically, it stands to reason that PC does not exist.
This might be just the perfect companion to "Pratical Common Lisp" by Peter Seibel. I always thought PCL is an excellent book for someone who already knows some Lisp. With these two books, I believe you really achieve a powerfull combo to start learning and using Lisp!
And the music is very cool too :-)
Will this book be available for Kindle by any chance?
I.e., we could produce a native ebook (not pdf) file for the Kindle, iPad, Nook, Sony, and a bunch of other dedicated e-reader devices.
Also: I have really enjoyed your writing on the web for a long time!
Just ordered. (The ebook seems to be working fine now.)
After some 3 attempts of download, I could download the book. All I can say is that this book is really awesome!
And thank you for the book and the awesome video and comic! :-)
I'll be lurking in this thread today and tomorrow... feel free to post any questions about the book or about Lisp in general and I will answer them.
Here's the only coupon code currently for the book. I'm posting it exclusively on HN and proggit: 76738380768586 (ASCII for LISPLUV :-)
It gives a 35% discount on the Book+eBook combo on the No Starch site (http://nostarch.com/lisp.htm). It expires 11/3. (FYI- If you just want the eBook, No Starch already has a 50% off sale right now across the board. If you only want the print copy, Amazon has a heavily discounted price already, for reasons that are mysterious to me. Oh, and if you've already pre-ordered, just cancel and reorder to get the discount.)