HACKER Q&A
📣 dusted

Which Lisp should I learn?


I'm a hands-on kind of person, so I need to install something on my computer and play with alongside reading..

My one requirement is that it must be available in ubuntus repositories.

Where should I start?


  👤 db48x Accepted Answer ✓
Scheme is the best pedagogical language, primarily because it is simplified specifically so that it is easier to teach, while still retaining all of the power of Lisp. It also has the absolute best computer science textbook, The Structure and Interpretation of Computer Programs.

Common Lisp is the most practical Lisp, because it's actually designed for building large systems and for supporting all possible programming paradigms (procedural, functional, object-oriented, logical, etc). There are also a lot of great books written about it. On the other hand, it's a much larger language with many more parts, so learning it is not as easy. You can still get started with simple programs pretty quickly, and gradually learn the large standard library and the more complex features over time.

If you're at all interested in physics and you've read SICP, then you should also read The Structure and Interpretation of Classical Mechanics. This is a very advanced book, but it uses some really clever language extensions present in MIT Scheme to do both numeric and symbolic calculus in order to both teach and implement physics. MIT Scheme is worth checking out if you're interested in advanced programming language design, even if you're not particularly interested in physics.


👤 Wezl
Common Lisp[1] is pretty easy to set up, you can use portacle[2]. It's also one of the oldest and most popular. If portacle isn't in the repos, sbcl[3] is.

EDIT: For reading you can try Practical Common Lisp[4] or the Land of Lisp[5] if you want a dead tree. These I've read but there are more[6].

[1]: https://common-lisp.net/downloads

[2]: https://portacle.github.io/

[3]: http://www.sbcl.org/ (EDIT: fixed link)

[4]: http://www.gigamonkeys.com/book/

[5]: http://landoflisp.com/

[6]: https://www.cliki.net/Lisp%20books


👤 brudgers
What are you going to be reading alongside it?

Common Lisp goes well with Peter Norvig's Paradigms of Artificial Intelligence: case studies in Common Lisp. And Norvig's book is a good way to learn what makes Common Lisp a big deal from an engineering perspective while still being entirely accessible to a below average programmer with some experience (at least that's my experience).

Racket goes well with the many Racket tutorials online and Felleisen's How to Design Programs. HtDP is a good beginner resource for software engineering and the many online Racket tutorials are suitable for many other levels of experience.

Racket will work with Structure and Interpretation of Computer Programs with a bit of configuration. But MIT Scheme is simpler to use with SICP right out of the box.

There are reasons Clojure is popular and I think it's a great language, but learning Clojure is more about learning Clojure than about learning what people usually mean by "Lisp."

Emacs Lisp (elisp) is great if what you are going to be reading is it's documentation and it maps up reasonably well with a lot of Common Lisp. It's a very good language that becomes a great language if you like Lisp and EMACS because it hooks into "Emacs as an operating system" natively. It's a practical approximation of the mythical LispMachines at your finger tips.


👤 haakonhr
Racket is also worth a look if you're curious about programming language design as it is very easy to make small DSLs. It is also a great language and eco-system if you're looking for a playground to explore different programming concepts. The community is also very helpful.

👤 st3fan
Clojure is pretty popular. Big community. Lots of code. Definitely more momentum than Common Lisp. If that is what you are looking for.

👤 kazinator
Try TXR Lisp.

Though not available in a Ubuntu repository, there are binaries for Ubuntu 18 (32 or 64 bit) in tarball format: you can unpack these relative to / to get it into /usr/local. Or anwyhere in your tree: TXR is self-contained and relocatable: it will run from wherever you unpack it, finding its own files relative to the executable location.

It's easy to build from sources: just clone the repo; ./configure; make; make install. In the most recent release, I dropped the build-time dependencies on several tools, to make things even easier. The only special library you need is libffi (so at build time you need the libffi-devel package on Ubuntu). It will configure and build without it, but then you can't use FFI.

Git: http://www.kylheku.com/cgit/txr/

The documentation is all in one big man page, which is very convenient in the GNU/Linux and Unix environment. There is a hyperlinked HTML form:

https://www.nongnu.org/txr/txr-manpage.html


👤 timonoko
Emacs and elisp is the only sensible choice, because gained knowledge will not be wasted.

Lisp is not fun general purpose programming language and tiny examples teach you nothing. Only when you are confronted with huge datasets and enormous problems you might appreciate freedom of expression in Clojure vs Javascript.


👤 philly_flowers
Try out Gerbil. It's a very practical scheme, built on top of Gambit, for systems programming. It also supports the actor model out of the box. It's also very fast, with lots of batteries included.

https://cons.io


👤 lumberjack
Last I touched Lisp I had settled on Chicken Scheme after trying them all. Don't quite remember why.