Fog Creek Software
Discussion Board

Learing Lisp

I wondered if anyone here could recommend learning Lisp?

I read some pretty convincing arguments for trying it at (One of the people who coded Yahoo Store)

His argument is that not all languages are equal in power and that the most powerful is Lisp because of it's macro features.

Matthew Lock
Friday, July 19, 2002

This is one of my favourite quotes from Paul Graham:

"A good programming language should have features that make the kind of people who use the phrase "software engineering" shake their heads disapprovingly. "

Matthew Lock
Friday, July 19, 2002

I can recommend learning Lisp. It's a very powerful
language and some things are much less painful in
Lisp than they are in almost any other language.
And there are some ideas in Lisp that you won't
find elsewhere, which means that learning Lisp might
expand your brain :-).

A couple of random pieces of advice.

1. Be aware that there are several dialects of Lisp.
They are quite different. I recommend that you learn
Common Lisp.

2. If you're looking for books, Paul Graham's "ANSI
Common Lisp" is a good first one.
Peter Norvig's "Paradigms of Artificial Intelligence
Programming: Case Studies in Common Lisp"
is a wonderful second one: it's one of the best
programming books I've read.

3. If all you're used to is C or C++, you will find
many things in LIsp *very* strange. Prefix syntax,
dynamic typing, a very different object system,
interactive use, macros (altogether different from
the things C calls "macros", and closer to C++
"templates" but still very different), and so on.
If this bothers you, you might want to learn Python
first: it has some "Lispy" features and is more
approachable for the beginner. But, a warning:
You may find Python so nice that you don't
proceed to Lisp. That would be a mistake. You
should learn both.

Gareth McCaughan
Saturday, July 20, 2002

Lisp has many innovative ideas. For example "conditionals",
garbage collection. But it's really a pain in the neck for beginners. My school had used Scheme as CS 101 for freshmen for a couple of years before Java was used. (Thank God!) I believe Lisp can be introduced in a compiler course. Knowing the basic theories of compiler might make the weird syntax less weird. E.g., the prefix syntax makes more sense.

OT: Talking about languages, any opinion on Pliant?

Sam Wong
Saturday, July 20, 2002

Thanks for the tips. I have downloaded clisp a Common Lisp interpretter.

I'm working through ANSI Common Lisp, by Paul Graham

Matthew Lock
Saturday, July 20, 2002

Another good option for a second book is Graham's own "On Lisp", which can be dowloaded (as PostScript or PDF) from his website. It's a very well written, concise (?!? yes, even though it's a) several hundred pages book, which illustrates just how powerful Lisp really is.

And for anyone else who hasn't yet started learning - I recommend starting with Scheme rather than Common Lisp. If you want to do high-performance commercial work in Lisp, you have to use CL as, apparently, the best native code compilers are for it. If that isn't a requirement, however, scheme is much cleaner, simpler, and more consistent.

Just for comparison, the latest Scheme specification is 50 pages long, and that contains exact semantics, syntax, standard library, an example or two, credits, table of contents and index. The latest Ansi CL specification is just over 1300 pages. CL has much more in its standard library, granted - but a large part of the difference has to do with the basics of common lisp being more complex and needing more description (e.g., of historic heritage that led to present state of affairs).

If you can afford not to have the greatest native code compiler, and don't have legacy Common (or uncommon) Lisp code to tend to, go with scheme. If you can't afford that, still learn scheme first, and then move to CL - this route will probably be shorter in the long run.

A good (the best?) Scheme meta-resource is [ ]; You can find the latest (R5RS) scheme spec over there.

Ori Berger
Saturday, July 20, 2002

I'm learning another lisp dialect (what Ori mentioned), and this basic link about the functional calculus was really valuable.

YMMV.  For me, it made it feel like I knew where things were going.

I have Graham's Ansi CL too, and find it very readable.

About using Python...  it has lispy features, but they're pretty much hidden.  When I learned lisp, my Python style completely changed.

Saturday, July 20, 2002

It's always good to learn a new language, but Lisp's been around for more than 30 years now, and it's not a popular language.

Either everyone's stupid, or there are better alternatives for real-world problems, or there are problems with Lisp that prevent its widespread adoption.

There was a great paper written many years ago by a Lisp guru explaining why Lisp lost the language wars to C -- it made the distinction between the "New Jersey" school of design and the "Boston" school of design. Unfortunately, I can't seem to find a web reference to the paper.

John Palevich
Sunday, July 21, 2002

When I said Python has some Lispy features, the main
ones I had in mind were dynamic typing, automatic
memory management,  and interactivity. Those
certainly aren't hidden. :-)

"On Lisp" is indeed a good book. I would suggest
reading it third, after "ANSI Common Lisp" and
"Paradigms of Artificial Intelligence Programming".

Scheme is certainly a simpler language than Common
Lisp. Part of that simplicity is that it lacks some of the
important features of CL: the amazing object system,
hash tables (associative arrays, maps, whatever),
and the full power of CL's macros. (Scheme's macro
system is also very cool, but in a different way.) For
an introduction to the world of Lisp-like languages,
Scheme is an excellent candidate. For a language to
do real work in, it's not such a clear choice.

Gareth McCaughan
Sunday, July 21, 2002

I think the essay you're referring to is this:

Sunday, July 21, 2002

Hi John,

Here's backgrounder on that paper:

If you're interested in a fun discussion about these models, here's a paper by John Backus, of BNF grammars and Fortran:
You might want to scroll down to p.616 for a quick comparison.  (There aren't 600 pages in this pdf, it was just taken from a journal.)

Sunday, July 21, 2002

Yes, Worse is Better is it! (Words to live by in today's PC world, I'm afraid!) Thanks to everyone who replied with a citation! I always triy to reread this article whenever I get too wrapped up in writing or using the latest language or framework. for me, I have enjoyed learning many languages over the years. While C/C++ is extrordinarily useful for a wide range of applications, there are certainly domains (such as writing one-time scripts for quick-and-dirty text processing) where other languages (like Perl and C#) are superiour.

In the old days Lisp was superior to other languages for quick development of complex projects because it was interactive, it had a powerful built-in data structure (the list), and it had garbage collection.

These days, every language compiles quickly, every language has good libraries, and nearly every language besides C/C++ has a garbage collector.

Lisp's primary remaining advantage over other programming languages is that Lisp programs are natively expressed using lists, which enables all sorts of clever (and philosophically profound) tricks.

The fact that very few other languages have tried to emulate Lisp's ability (to dynamically reason about themselves) may be a hint that this capability is not that useful for day-to-day programming.

But it is way cool!

John Palevich
Sunday, July 21, 2002

Interesting to see so many people speak highly of Lisp.  I admittedly have only a limited experience with the language, but what little I did with it was more then enough for me to want nothing to do with Lisp ever again.

It's nothing to do with it's feature set, but purely the syntax.  I'm a firm believer that a strong language is one that's easily read.  I for one didn't find Lisp even remotely easy to read, but then again it could have just been the variant I was using.  Don't recall which one it was...

Lucas Goodwin
Monday, July 22, 2002

The problem is you're used to a complex model, and now perceive it as the simpler one. 

Consider what you do when programming.  You have an algorithm.  It works on some data.  Let's write it: (algorithm data1 data2). 

This is how one thinks in lisp.  Everything you do looks like this.  You use indentation for readability, just like in C.  But with C, you always have a lot of little temporary variables, and braces, commas, semicolons and...  a lot of teachers find that lisps are far easier to teach to absolute beginners than C/Java.  But students who already have a background in C have to do some unlearning.

At first, people complain about Python's syntax too, despite it being designed to be the most readable language on Earth.

Monday, July 22, 2002

If you're used to more mainstream languages, learning Lisp is a refreshing experience. It's like yoga for the brain; it's hard (and odd) at first but you can definitely **feel** its rewards.

I learned Lisp purely as a programming exercise, so I took it slowly. I taught myself Lisp using "The Little Lisper", and Paul Graham's fine book.

Then I then moved on to more great fun via Logo (see Brian Harvey's books) and Scheme (via Oliver Grillmeyer's text), before settling on REBOL ( pronounced reh-bull, see ). REBOL is led by Carl Sassenrath, architect of the original Amiga OS.

REBOL is Scheme without all the parentheses, and it's one of the most practical members of the Lisp family. REBOL supports most major networking protocols thru a simple, consistent syntax. REBOL also has grammars based parsing (bye Perl). It's cross-platform (to a fault), and it has a nice GUI layer.

So in short, I use "mainstream" languages to make the suits happy, but I use functional languages wherever possible when I need to write good code quickly. Like, when I need to write an Internet spider or a data dashboard in an afternoon, and it **really** needs to be a finished product that afternoon.

Dusty Bottoms
Monday, July 22, 2002

XSLT, being a functional language, is also much easier for prorgrammers with at leat some Lisp, or any other functional language, exposure.

With Javascript, most of us have been exposed to associative arrays and dynamic typing. but it is still modeled after procedural languages like c/java.

Learn Lisp.

But in the end, Python rules ;-)

Dan Sickles
Monday, July 22, 2002

John Palevich writes: "Lisp's been around for more than 30 years now, and it's not a popular language.  Either everyone's stupid, or there are better alternatives for real-world problems, or there are problems with Lisp that prevent its widespread adoption."

It is basically the first of the three.  Jane Austen has been around for *two hundred* years, and I'm sure Steven King outsells her ten to one, for the very same reason.  Few would argue that greater sales prove King is better.  Why should it be any different for languages?

Paul Graham
Monday, July 22, 2002

Hey cool, Paul Graham posted to this list!

Matthew Lock
Monday, July 22, 2002

If you are interested in unique programming languages (especially functional langauges), check out the "Lambda the Ultimate" blog. It has lots of insightful articles (with an academic/research slant) and comments about  functional programming, Lisp, Java, XML, .NET, and even C++.

Banana Fred
Tuesday, July 23, 2002

I learnt Lisp to understand Genetic Programming by John Koza.

I had been using C++ for embedded coding since 1989, and so Lisp was a struggle, because I missed Lisp the first time around.

Lisp is good at handling lists of things, and the abstraction level is higher than C/C++ normally allows you to get to.

Lisp led me to understand Smalltalk more and eventually Rebol, which uses many strong features of Lisp, but is even closer to being a natural languge.

At first glance, many Lisp people say Rebol is a de-parenthesized Lisp.

Which is easier to learn first, I think maybe Rebol.  It is a little easier to get results, networking and graphical with just a couple lines of code (in part due to the default datatypes which deal with network protocols, visual interface, time, money, etc so you don't have to create them yourself or find a library to add in)

I have read Graham's book "On Lisp" and like it very much, and will be forever thankful for the contribution Lisp has made to programming--Steve Shireman

Steve Shireman
Tuesday, July 23, 2002

*  Recent Topics

*  Fog Creek Home