Hacker News new | ask | show | jobs
by shanked 5659 days ago
I'm just beginning my road down the path of learning Lisp. My plan for learning is:

1. Read the Practical Common Lisp chapters which introduce Lisp features.

2. Write a web application using Common Lisp (Hunchentoot/Postmodern). After all, the only way to learn a language is to use a language.

3. Re-read Practical Common Lisp and/or other Lisp books.

I realize that I won't remember 90% of the material read in Practical Common Lisp in Step 1. However, I'm hoping that I can get an overview of the features available in the language to help design a better web application. Knowing some names of features like CLOS, cons cells, plists, alists (and others that I haven't gotten to yet) will just make it easier for me to search for help when I run into problems.

If anyone has any references to good materials for the following:

- Learning Common Lisp

- Creating CL applications using Hunchentoot and/or Postmodern

- Quality Common Lisp API specs

- Any other tips for an aspiring Lisper

I'd be grateful for any additional information that might help me along the way.

4 comments

I am not sure that writing a web app is the best way to learn common lisp; it introduces a lot of extra complexity (libraries, web server, etc) in a language that is itself quite complex. You'd better start from a simple CLI application as your first project.

Books: there is also Graham's "ANSI Common Lisp", which has a different approach from PCL; I found it clearer as first text (but PCL is a necessary reading anyway, for various reasons). But it's a matter of cognitive styles, start from the one that you prefer.

Absolutely download the Common Lisp Hyperspec and familiarize with it. Is the main everyday referemce tool of any CLisper.

Environment: Emacs + SLIME is the most popular option. Commercial lisps (and their free evaluation versions) also have good IDEs.

Have fun!

Well, I had an idea for a web application that I'd otherwise create in Python. I figured I'd use Lisp to get some experience using it (also, my AI class next semester uses Lisp).

While it will probably cause some additional hurdles of complexity (such as figuring how how to use ASDF and manage packages), I find it is hard to motivate myself without a shiny carrot in front of me. The web application is something that I would use and want to build, whereas writing a simple and purely educational program doesn't provide the same kind of motivation.

If you can handle, go for it! But if after a while you'll think that lisp is not so different from the other languages after all, it's probably because you tried to learn too many things at once. In that case, persist. :-)
A few tips from another aspiring lisper, who's only a little bit ahead down the road:

- Read a lot of code. Its essential to learn to read and understand common lisp code with little effort. In many cases, a lot of libraries have incomplete or outdated documentation, so the source code is the best documentation available.

- You'll have to learn to piece together a lot of incomplete information, scattered around in blogs, documentation, wikies, and source code.

- Prefer portable libraries rather than implementation specific extensions, if possible.

- Learn emacs.

- I would suggest also learning a bit about the history of lisp, a lot of weird things in lisp make a lot more sense if you consider the historical context in which many design decisions were made.

- Don't whine or complain, be a doer. My favorite quote from "The bipolar lisp programmer" is at the end: "Lisp is, like life, what you make of it." You have to take matters into your own hands in order for things to get better. Even though I've only been using common lisp for a few months, i like to think of myself as personally responsible for the state of the Lisp ecosystem, because im not writing libraries or documentation, nobody is going to do this stuff for you. There simply aren't enough of us.

- Avoid the "Smug lisp weenie" mentality, its not helping. Sure, lisp is better than java(by some criteria), but feeling smug about this isn't helping at all. It only drives people away.

Im currently compiling a larger list of such tips and opinions. I hope to be able to publish it soon, so more experienced lispers can help me with it.

In addition to reading archives of comp.lang.lisp, I recommend exploring Lispforum.com, planet.lisp.org, common-lisp.net/pipermail/pro, and searches such as https://github.com/search?q=common+lisp.

As a new lisper coming from Python, my impression is that while there is a ton of good reference material going way back, it's also important to find where the contemporary work and discussion happens, what the current best practices are, and so on.

For books for the beginner to intermediate programmer, I would go with PCL and Successful Lisp in tandem; for cross-platform implementations SBCL and Clozure (formerly OpenMCL).

And of course, this: http://abhishek.geek.nz/docs/lisp-answers/.

Rather than re-read PCL, you could use this to review after reading the tutorial introduction:

ftp://ftp.walrond.org/cl/Practical%20Common%20Lisp%20-%20Distilled.pdf

If you have your heart set on a web app, here are a few links I've stashed away on web apps with CL:

http://postabon.posterous.com/a-simple-lisp-webapp-for-begin...

http://www.adampetersen.se/articles/lispweb.htm

I've heard that the second one is a bit out of date, but I'm not sure. Maybe someone else can comment on whether these are any good? I haven't gotten to the write-a-web-app stage of my Lisp study yet...