3 ms·
Which is the better introduction to Lisp: On Lisp (by pg), SICP, or another text (maybe on Common Lisp)? Or is it better to just go straight to Clojure these d
by jammygit 7y ago
Which is the better introduction to Lisp: On Lisp (by pg), SICP, or another text (maybe on Common Lisp)?
Or is it better to just go straight to Clojure these days?
- armitron 7y agoOn Lisp is an advanced text about Lisp macros, not recommended as an introduction (but highly recommended if you've written Common Lisp). SICP is great but not really about Lisp. I recommend Norvig's PAIP [1] or Graham's ANSI Common Lisp [2]. Another book that's often recommended is Practical Common Lisp but I think it's dated and hasn't aged well. It's also nowhere near as mind expanding as PAIP/Graham's books. [1] https://github.com/norvig/paip-lisp https://github.com/norvig/paip-lisp [2] PDFs can be found on Google Clojure is not recommended as it is very different to Lisp. Lisp code needs to be entirely rewritten before it will run on Clojure. That is not true for Common Lisp, Emacs Lisp and even Scheme.
- lerax 7y agoClojure is always the wrong option to get into the principles of Lisp. * Clojure utilizes non-standard Lisp syntax like []{}, weird function declaration and differ semantics of some forms (like cond usage, a powerful specie of switch-case of Lisp); * Clojure don't have cons pairs, neither car and cdr operators. Cons pairs are fundamental Data Structures to build compound data, very well explored in SICP and any LISP text book. * Clojure has the batteries of Java, so you will own a giant ecosystem to build complex software, but the evil parts of jvm will be inherited too. For the first contact with Lisp, this can be a unnecessary pain in the ass. I would recommend to start a LISP journey with Land of Lisp or Practical Common Lisp (PCL), both focused in Common Lisp. Land of Lisp has a lot of history about the beginning of Lisp and the author write the book in a fun way, lot of charges and xkcd-like humor. The book has a collection of game projects per chapter, one at time, teaching principles of the language. PCL it's very useful for understanding specific parts of the language, I used as complement when Land of Lisp was not sufficient (loop topic on PCL is very good).
- tosh 7y agoanother angle: while Clojure is a Lisp with its own distinct flavor it gives you … * a large community of practitioners and professionals (great for asking questions, finding collaborators, …) * easy access to libraries in the js/jvm/.net ecosystems * a style that relies more on data and transformations of data (illuminating simplicity) in any case: it is worth digging deeper, one thing that kept me away was not knowing where to start (analysis paralysis). in hindsight picking any Lisp would have been great (instead of postponing). Find a thread and start pulling :) Rich Hickey’s talks were a great entry point for me https://github.com/tallesl/Rich-Hickey-fanclub https://github.com/tallesl/Rich-Hickey-fanclub e.g. https://www.youtube.com/watch?v=rI8tNMsozo0 https://www.youtube.com/watch?v=rI8tNMsozo0 (the “Simplicity Matters” keynote at Rails Conf 2012) edit: Land of Lisp is a great book as well
- iLemming 7y ago> Clojure is always the wrong option to get into the principles of Lisp. Yet, somehow out of all Lisp dialects, Clojure today remains the most pragmatic choice. Clojurescript is arguably the best alt-js choice, where Elm, Reason and Purescript for various reasons still can't reach its level of the simplicity and practicality. Clojure has immutability by default, which alone has number of great benefits. It is FP focused. It can be learned à la carte, which greatly simplifies process of learning. Clojure community is one of the friendliest and most diverse communities of developers. In comparison, Common Lisp today (sadly) becoming like Latin of programming languages. It is cool to learn it and know it, but in many circles the practicality of that knowledge remains somewhat questionable.
- pmoriarty 7y agoI'd personally avoid SICP unless you have an interest in writing programming languages or solving math problems. I personally found it really boring, and couldn't get through it. My own personal taste also leans towards Scheme (especially Chicken Scheme), so that's what I'd recommend. To me it feels more elegant, more modern, and of lighter weight than Common Lisp. I'm also kind of allergic to the JVM and Clojure's non-lispy innovations in syntax, so I'd personally avoid it too. That said, I myself started with Common Lisp and then moved on to Scheme and then Emacs Lisp (which is a decent choice of Lisp to learn, in that, despite some shortcomings, it puts the entire Emacs ecosystem at your fingertips). Once I'd learned Common Lisp, I found learning the rest to be quite easy.
- iLemming 7y agoSICP is not about Lisp, Scheme was chosen because of its simplicity, but the book is not about Scheme. If you always wanted to go through the book, maybe also take a look at "How to design programs." It's a bit like a SICP, but it's written in a different style, you may prefer that one instead. - If you want something practical - do try Clojure. Don't listen to JVM haters and Lisp "purists". JVM is a pretty robust piece of tech and Clojure is a proper Lisp dialect. Besides, Clojurescript is a lot of fun. - If you like Lua, and want to make simple, fun games try Fennel. If you're into math and enjoy playing with fractals and such, do try Racket. - If you are serious about Lisp, sooner or later you may want to learn Common Lisp. Especially if you already using Emacs and want to improve your emacs-lisp skills.
- SamReidHughes 7y agoClojure is a better language, and a better Lisp, and a better tool for making software, but not "really" a Lisp. If you want to learn about Lisp, I think you should zero in on Scheme, Common Lisp, and Emacs Lisp. But this of course depends on what you want. The cons cell thing is a big deal. Cons cells are a stupid language construct. But that's baked into the identity of what Lisp is.