5 ms·
I can't say I'm familiar with Lisp (or its dialects). How does one get started learning a Lisp variant (in terms of learning resources/guides), and why use Lis
by applecrazy 7y ago
I can't say I'm familiar with Lisp (or its dialects).
How does one get started learning a Lisp variant (in terms of learning resources/guides), and why use Lisp over other languages?
- sincerely 7y agoScheme is the teaching version of Lisp that gets used in a lot of first year university CS classes, you can probably work through an online syllabus pretty quickly if you have experience in another language.
- aasasd 7y agoIn my experience: just pick one that you'll be using, e.g. Emacs Lisp or something for scripting, and dive into practice. Most of a lisp is little different from other imperative-functional languages, except for a taste of weirdety from the 60s and more functional freedom. You could pick something like ClojureScript if you're using JS elsewhere―in the Lumo incarnation to avoid JVM's compilation and startup time. Though ClojureScript does add a level of complication. Other transcompiling variants like Fennel or Hy are also feasible but are probably poor on documentation and tools for a beginner.
- dreamcompiler 7y agoGet a copy of The Little Schemer and follow it step by step in Racket, which is freely downloadable. It is better when learning to experience Lisp in this way than to read an explanation of why Lisp is good. It activates a different part of your brain. For many people, it feels like a dormant part of your brain has just awakened for the first time.
- cylinder714 7y agoAs I understand it, Scheme was intended to be a dialect suitable for teaching programming. The usual first texts are The Little Schemer, How to Design Programs (https://htdp.org/ https://htdp.org/ but apparently a third edition is forthcoming: https://felleisen.org/matthias/HtDP3e/index.html https://felleisen.org/matthias/HtDP3e/index.html) and the inestimable SICP: http://sarabander.github.io/sicp/ http://sarabander.github.io/sicp/ (HN discussion: https://news.ycombinator.com/item?id=13918465 https://news.ycombinator.com/item?id=13918465) "A bad day writing code in Scheme is better than a good day writing code in C." —David Stigant In another man's opinion, "Common Lisp is the best language to learn programming": https://oneofus.la/have-emacs-will-hack/2011-10-30-common-lisp-is-the-best-language-to-learn-programming.html https://oneofus.la/have-emacs-will-hack/2011-10-30-common-li... Another resource for learning Common Lisp is Stuart C. Shapiro's Common Lisp: An Interactive Approach: https://cse.buffalo.edu/~shapiro/Commonlisp/ https://cse.buffalo.edu/~shapiro/Commonlisp/
- sedachv 7y agoHarvey and Wright's _Simply Scheme_ is another excellent book that does not get enough mention.
- JohnStrangeII 7y agoFor me, the biggest advantage of Lisp dialects is that they make it easy to introduce very powerful and far-reaching abstractions - and idiomatic good code encourages these. For some tasks that's pretty awesome, for example anything that has to do with classic symbolic A.I. or expert systems. You abstract every data type your program uses and write small functions that operate on these types. It's similar to classical OOP, except that you're not forced to use OOP for everything but can instead use a more functional style. Another big advantage is the syntax, because it almost doesn't exist. The language allows you to focus on the semantics whereas the syntax of expressions becomes neglectable. S-expressions are also among the main reasons why abstractions work so well in Lisp. Finally, and this only applies to CommonLisp: CommonLisp is very complete in terms of language capabilities. It has static and dynamic types, lexical and dynamic scoping, has OOP and allows for functional programming, and so on. It has less artificial limitations than any of the more recent languages. It doesn't attempt to "hold your hand" by e.g. disallowing the use of OOP with multiple inheritance because "it's bad for you", or any such nonsense. Most LISP dialects also have garbage collection, which saves you from crashes and saves a lot of development time.
- tim333 7y agoI found Hy quite an easy start, especially if you are familiar with Python. It's kind of Python in lisp format https://github.com/hylang/hy https://github.com/hylang/hy