
Practical Common Lisp (2009) - tosh
http://www.gigamonkeys.com/book/
======
alexott
[https://github.com/pcl-ru/pcl-ru](https://github.com/pcl-ru/pcl-ru) \-
Russian translation of the book, if anybody interested

------
m0skit0
Can anyone please comment what advantages and short-comings Common LISP has
over "modern LISP" (i.e. Clojure)?

~~~
armitron
(Mostly talking about SBCL)

Mature native code compilation (including runtime assembler), type
declarations that lead to optimizations in generated code, SBCL compiler can
use declared types for compile-time type checks, read/compiler macros,
extremely easy interface to C (JNI is a pain in the ass), multi-paradigm and
doesn't prematurely optimize like Clojure (I have no need for STM or immutable
data structures in 99% of the things I do), very powerful and flexible
debugger, CLOS, more sophisticated interactive development.

Clojure is a no-go for me primarily because it's tied to the JVM (or worse,
Javascript) and the Java ecosystem but also because it prematurely optimizes
with the sort of decisions it has made in the design space (immutability, STM,
crippled reader, not Lispy-enough debugging and so on).

Common Lisp is much more flexible in the sort of problems it allows you to
explore and attack. Even the special features of Clojure (STM, immutable data
structures) can be used in Common Lisp via existing libraries.

Finally, for me Lisp == Lisp Machines and Clojure is a big step back in that
regard (and not really modern at all) since it de-emphasizes (by lacking
things that Common Lisp has) the interactivity that made Genera so
iconoclastic and powerful.

~~~
lilactown
Clojure was my first lisp; I use it every day at work, especially on
JavaScript. ;) The (semi-)joke is that the reason Clojure targets the JVM and
JS runtimes is so we can get paid to write it.

However, I have started playing with Lisp (SBCL) a bit in my off time and am
finding it interesting. I have a desire to write some CLI applications and
think Lisp might be a better fit than Clojure. I was drawn to it for a lot of
the reasons you note:

1\. Native compilation

2\. Reader macros

3\. C FFI

4\. Debugger

But it's also a bit like learning how to write with my left hand; my brain has
been warped by Clojure to eschew place-oriented development and reduce
mutability to a pinpoint. Lisp is completely, unabashedly mutable (which gives
a lot of room for improved performance vs. immutable) and I'm struggling with
it.

~~~
ScottBurson
If you want to use functional (immutable) collections in Common Lisp, try FSet
[0]. (It's QuickLisp-loadable.) FSet greatly expands the space of programs
that can naturally be written in a functional style in CL.

[0] [https://github.com/slburson/fset](https://github.com/slburson/fset)

~~~
lilactown
I have looked heavily at FSet :). I'm at a cross roads now with whether I try
and push the Lisp block into the Clojure hole in my brain, or whether I should
try and learn Lisp as it is and it's idioms.

FSet is really cool and I'll probably end up using it in conjunction with
[https://github.com/fiddlerwoaroof/cl-
edn](https://github.com/fiddlerwoaroof/cl-edn)

~~~
Jach
When learning new languages I think it's always beneficial to drink the kool-
aid and go as full idiomatic as you can, then step back and reflect once
you're competent enough. (That may take a while with CL if you're not doing it
professionally, there's a lot in there! I'm still on my own plodding journey
to CL competence...) My reasons are for the personal side that doing so should
help maximize the "learn new language to change how you think about
programming"¹ side-effects and on the social side doing so should help
understanding and interacting with other users and code in that community. It
can be really frustrating to me when I read Python code written by a career
Java developer who never bothered to understand what "Pythonic" is. I don't
want to be that guy for someone else.

¹Incidentally this [http://www.nhplace.com/kent/Papers/Condition-
Handling-2001.h...](http://www.nhplace.com/kent/Papers/Condition-
Handling-2001.html) is my favorite high-level article around one of those
potentially mind blowing differences that is Lisp's condition system, written
by someone who has spent a lot of time considering fundamentals of programming
like what it means to be in an exceptional situation and how to handle it.

~~~
armitron
It is illuminating to read the output of such minds as Kent Pitman, Dan
Weinreb, David Moon, Richard Gabriel, Rodney Brooks, Guy Steele and what they
have to say about Common Lisp and the standardization process, in places such
as comp.lang.lisp (the entire archive can be found online) and elsewhere. The
depth and clarity of thought, the foresight, the attention to detail and the
guiding principle of trying to find the "right" vs the "easy" solution (this
is beautifully illustrated in "worse is better" by RPG).

Compare and contrast with the designers of today's popular programming
languages. There is something severely lacking in the minds behind
PHP/Javascript/Python/Ruby and other languages where projected popular appeal
and "easy" is the prime design consideration.

Are we worse off? I think so, not just for technical reasons, but because we
have lost something greater that can not be easily put into words.

~~~
todd8
Yes, the evolution of Lisp was guided by brilliant people. I regret throwing
out so many of my old Computer Science related books over the years (e.g. the
Interlisp Reference Manual) because the few that remain remind me of the
history of programming that has occupied so much of my life.

While being nostalgic about the early days of programming languages, I am not
as pessimistic about the current state of the art. There were plenty of old
programming languages that have faded away despite being important in their
day (IBM's PL/1) and lots of work on new languages is pushing in interesting
directions (Haskell, Idris).

Common Lisp has hung on and perhaps survivor bias has made it seem special,
but to me, it is special. While working with it I feel that I am working with
a language of the future from the past.

The landscape of calculation is much bigger than it was half a century ago,
when I started programming. It is populated by an enormous ecosystem of
processing units from tiny to enormous, embedded to networked across the
planet, with single processors to high performance multiprocessors. All of
this is controlled by programming and the programmers that wrestle the world
of computing into submission. In this Hobbesian ecosystem some languages have
prevailed for many years, like Java and C, others have survived even longer
like FORTRAN and LISP, and some have simply proliferated rapidly, like Python,
all for reasons that are complex and involve human abilities and computer
architectures. Not all of them are beautiful, Lisp is, but all of them have a
place even if only to reveal what does and doesn't work.

------
juliangamble
This twitter post from Peter Seibel about his book being translated into
Clojure was hilarious: [http://juliangamble.com/blog/2012/07/13/amazing-lisp-
books-l...](http://juliangamble.com/blog/2012/07/13/amazing-lisp-books-living-
again-in-clojure/)

------
todd8
Note that while this is one of the really good books on Common Lisp it is not
new. The copyright is 2003-2005.

~~~
gecko
Has anything really changed, though? QuickLisp, I guess, but that feels like
about it.

~~~
weavie
Also Lisp in a Box is no longer available. Nevertheless this book is always on
my desk. I refer to it almost on a weekly basis.

~~~
phoe-krk
It has been superseded by Portacle.

[http://portacle.github.io/](http://portacle.github.io/)

------
Areading314
This is a great book, but the subject of dealing with mp3s looks painfully
dated.

~~~
tosh
I wonder what would be a great replacement topic nowadays. Ruby on Rails era
was the blog in 5 minutes. What is "the project" now?

~~~
grblovrflowerrr
For front-end the community seems to have landed todo lists as "the project".

~~~
techbio
Todo lists lack so much basic app functionality. They are only low-hanging
fruit for a common article pattern.

------
theshadowknows
I want to learn Clojure but every time I try I get bogged down thinking I need
to learn Common Lisp first. I’m sure that’s silly but it seems like it would
be important. Am I wrong?

~~~
jimbokun
Common Lisp is a very different language, I doubt it will help you to learn
Clojure. Clojure is a smaller language than Common Lisp in a lot of ways, so
learning it first, then Common Lisp later might actually be the faster
approach.

