Here is a short guide to learn Lisp in a few months:
1) Find a implementation that works on your platform. Clisp works almost everywhere and is actively developed.
2) Start reading Practical Common Lisp (PCL) because it is free. Skip the part about SLIME and Emacs if you are not familiar with Emacs. Start Clisp and type out every example in PCL. You need to train your fingers to handle parentheses. Notice that Clisp does some amount of paren matching.
3) Soon you will want to save your work. So you will need to choose an editor. Either Emacs or Vim will work. If you are unfamiliar with either try to learn Emacs as it is the standard for Lisp. Vim is servicable if you have already trained your Vim reflexes. I am Vim-brain-washed so Emacs is doubly hard to learn. Vim supports Lisp very well with paren matching, automatic indenting, and syntax highlighting.
4) Choose either SLIME or a two-window environment. I prefer a two window environment with Vim in one and Clisp in the other. In vim create files instead of typing forms at the REPL. Run these files with: clisp file.lisp
5) Keep typing examples from Practical Common Lisp. At some point I switched to ANSI Common Lisp (ACL). I found it had more and better examples. Paul Graham's prose is clearer than Seibel's. Typing out examples is key for learning Lisp quickly. It forces you to put the time in to really understand the language and trains your hands for typing lisp.
6) Read, Type, Repeat. Again you cannot get around this. Read a section of PCL or ACL. Type out the examples. Reread the section and study the code.
7) Another good step is to add unit-tests to the examples in the books. This can be as simple as wrapping an example in a deftest or converting the REPL forms to tests. You can also use unit-tests to asks questions of the example for improved understanding. I wrote a unit-test package and a code-printing utility that have grown while I learned Lisp: unit-test and print-code (insert links here)
8) Get Darcs - At some point you will need a code repository to keep you from blowing away your precious code. Darcs seemed to be widely used in Lisp projects. It's a breath of fresh air if you have been using CVS.
More in the next post...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment