|
|||
Learning Lisp
Hello
I want to learn a Lisp dialect, which one do you recommend? Or maybe learn Haskell? Are there any good books? |
|
|||
What is your end goal?
|
|
|||
I want to improve my programming knowledge and maybe pursue programming career later.
I'm starting to learn Emacs and eLisp and want to continue to learn Lisp afterwards. |
|
|||
Quote:
https://www.gnu.org/software/emacs/ That page points to a number of books on how to add features to Emacs. As for learning Lisp proper, it is an interesting language, but no one is really using it today. I would suggest looking at Scheme, but MIT abandoned it in favor of Python several years ago. Functional programming promises a number of interesting features which unfortunately remain primarily at the academic fringe. The corporate world continues to accept quickly written (sloppy) code over carefully crafted code. Plus, the next person to inherit code maintenance may have no clue as to the functionalism. Last edited by ocicat; 9th July 2020 at 03:50 PM. |
|
|||
Don't start with Haskell. Your choices will be: Common Lisp, Scheme, Racket, Clojure.
There are two types: Lisp-1 which is Scheme, and Lisp-2 which is Common Lisp. Racket started out as PLT Scheme, but changed its name because it was diverging from Scheme. Clojure is also a Lisp-1. What a Lisp-1 or Lisp-2 means, to simplify it, is the namespace. In Lisp-2 you can have a function named foo and a variable named foo. In Lisp-1 you can only have a function or a variable named foo, but not both. Common Lisp is really big, but is multi-paradigm, as well as Racket and Scheme; but they all support functional. Clojure is functional. Good books based on each language: Common Lisp: "Common Lisp: A Gentle Introduction to Symbolic Computation" by David Touretzky, which uses a subset of Common Lisp. Common Lisp: "Practical Common Lisp" by Peter Seibel. Common Lisp: "Land of Lisp (LoL)" by Conrad Barski. Racket: "How to Design Programs (HtDP)" by Matthais Felleisen, Matthew Flatt, Robert Findler, Shriram Krishnamurthi. Racket: "Picturing Programs: An Introduction to Computer Programming" by Stephen Block. Racket: "Realm of Racket (RoR)" by multiple authors. Scheme: "Concrete Abstractions" by Max Hailperin. Scheme: "The Little Schemer" by Daniel Friedman and Matthais Felleisen. Scheme: "Structure and Interpretation of Computer Programs (SICP)" by Harold Abelson and Gerald Sussman. A classic and used by MIT for two decades. Scheme: "Simply Scheme" by Brian Harvey and Matthew Wright. Scheme: "Exploring Computer Science with Scheme" by Oliver Grillmeyer. Clojure: "Living Clojure" by Carin Meier. Clojure: "Clojure for the Brave and True" by Daniel Higginbotham. Selected notes about the above books: 1. Brian Harvey has written that one needs only to read HtDP or The Little Schemer or Simply Scheme, but not necessarily all three. He is the author of Simply Scheme and says it is less formal and less prescriptive than HtDP. 2. Picturing Programs takes a graphics approach using Racket, and is for what the author would call math phobes. 3. SICP is heavy on math. 4. Barski drew the cartoons for RoR in the same manner of his LoL book, but I don't see the completeness in RoR that exists in LoL. 5. HtDP was created specifically for those new to programming and teaches a recipe that can be followed for any other language. 6. You can search for "How to Design Classes" which is written by most of the authors of HtDP and is available online, but not print. It is to be read after HtDP. Scheme and Racket were both created for education. Since Racket started as a Scheme, you can use Scheme in Racket by choosing it as a #lang. Once you learn one, the others would be fairly easy to pick up. Scheme or Racket (using HtDP) would be your best choice. Racket comes with its own powerful graphical editor called DrRacket. Alex Harsanyi has a blog on Racket and writes some pretty cool applications and has the source on github. Racket also has a regular newsletter. As I said above, Common Lisp is huge, and Racket has a large library. Scheme has a few dialects and Chicken Scheme would be your best choice if going with Scheme, or maybe Chez Scheme (but doesn't have as large a library as Chicken) which was fairly recently open sourced by Cisco. Racket as of 7.5 has Racket on Chez available for production use, although as of 7.7 (current, and 7.8 expected later this month) it is not yet the default implementation. Last edited by gpatrick; 11th July 2020 at 01:42 PM. |
|
|||
Thank you!
|
|
|||
Their advice is good, but to muddle things further there's a very appealing small dialect named picolisp that I've been learning recently.
What I've been doing is to read (or start to read for the fourth time, argh) Land of Lisp by Conrad Barski and to translate the examples from Common Lisp into picolisp. It's a funny, light hearted way to start with Lisp. Has some really cute comics. picolisp is designed by an individual instead of a commitee which I think gives it special and appealing qualities that common lisp certainly doesn't have and that perhaps even scheme lacks. This will be badly misunderstood since hardly anyone likes Perl anymore, Lisp people least of all, but I like to think of Alexander Burger (inventor of picolisp) as the Larry Wall of the Lisp world. https://picolisp.com/wiki/?home Another appealing thing about it is that the interpreter is small, so it's perhaps not a hopeless task to try to read its source code to see how it's implemented or to port it to a strange platform that a mainstream lisp does not support. Last edited by thirdm; 27th July 2020 at 02:38 PM. Reason: Trim out an irrelevant possibly patronizing paragraph. |
|
|||
If you are new to the functional programming paradigm, I suggest you start with ELM. It's quite easy to learn and fun. ELM has an outstanding debugger which lets you know exactly what you are doing wrong or are forgetting. It will make learning the functional programming paradigm a breeze.
Then after you get the paradigm it's so much easier to make the shift to Haskell. Which I definitely suggest, after you get it. https://elm-lang.org/ |
Tags |
lisp |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Someone Is Learning How to Take Down the Internet | e1-531g | News | 0 | 21st October 2016 10:14 PM |
Learning to script... | RJPugh | Programming | 7 | 9th November 2014 08:04 PM |
Father of Lisp and AI John McCarthy has died | J65nko | News | 6 | 25th October 2011 05:01 PM |
Lisp can't build %.el | Mr-Biscuit | Programming | 3 | 29th January 2011 06:46 PM |
Learning Programming | Crypt | Programming | 35 | 27th October 2008 04:54 PM |