Question

Tomorrow I will go on trip to Italy. I will only have my laptop with elementaryOS 32-bit running. I will most likely have no Internet connection. I decided, that I would like to spend my free time there to learn Lisp. I installed emacs, sbcl and slime, but I'm not really sure how sbcl works, and I'm worried that if I have to do something a little bit more complicated, I will require someone's help from web, and I won't have it there. I've also found and downloaded 2 free lisp books - Common Lisp - An Interactive Approach and Common Lisp - A Gentle Introduction To Symbolic Computation. I hope that these will be enough.

I have C++ programming background, but with C++ it looks simpler to me - we have standard that defines what should compiler have, we have few compilers that are used most(G++, clang, MSVC++), and since I know how to compile, it isn't hard to me anymore. Also, for beginners, there are IDE that compile code for you. Lisp, afaik, has no defined standard. Also, I don't know it, so I don't really know how to compile its code.

Question is: what should I install to have it running there? What materials should I take to be self-sufficient? I would be glad if you could provide me with link to some tutorial on how to compile my first code - I want to test it before I go(simple "hello, world" would be sufficient).

Was it helpful?

Solution

Get a copy of Practical Common Lisp: http://www.gigamonkeys.com/book/ The book gives more motivation about using Common Lisp and explains it.

Also download the HTML version of the Common Lisp standard from here: Common Lisp Documentation. Especially the Common Lisp HyperSpec 7.0.

Get the SBCL documentation from sbcl.org

OTHER TIPS

Being from an C++ background you probably already learned other Algol dialects and because of they all are different dialects they usually are pretty easy to learn. It's pretty much the same as learning another spoken language closely related to the ones you know are easier than the ones farthest away.

LISP is not an Algol dialect so expect it to be different than the transition between C++ and Java. LISP dialects share most of the original specification made by McCarthy in 1958 so learning a new Lisp dialect when knowing one is simple. I recommend you start with Paul Grahams essay and his Common Lisp version of eval. There are numerous historical and current books you can download for free but for Common Lisp the CLHS (hyperspec, direct link) is the most important. Paul Grahams book On LISP is freely available too but it's more for intermediate Lispers.

I love Land of Lisp. It's a nice book where you learn the essence of Common Lisp. Previous version of an early chapter and chapter 8 from it are freely available. I've bought this book and think it's a fun way to learn Common Lisp. (I also bough the new Racket (Scheme dialect) version of the book called Realm of Racket, but I think the old LOL is slightly better book while the RoR has cooler (graphical) games)

I learned Common Lisp as my first Lisp. I don't think it's important what dialect you choose to learn but it's important to think in Lisp and making your own Eval from scratch (making your own dialect or subset of LISP) in LISP. Also if you like interpreters and compilers you should try to make one in something different than Lisp as well. You'll learn a lot from it.

I use Clisp when doing Common Lisp tasks since it has readline support and I think it's easier to understand it's error messages and debug interface. I even run my programs in it unless I need more performance. It doesn't happen often but then I use SBCL.

Good luck :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top