11 ms·
Ask HN: What is the best way to learn Lisp in 2020?
I've been eyeing Lisp out of the corner of my eye for years. I know I should learn it and it will likely change the way I think about programming.
What is the best way to learn Lisp in 2020? I tend to learn best when I have a project to work on that plays to the strength of the language.
Some questions:
- Should I start with Common Lisp, or some popular dialect (Clojure?)
- What are the big patterns that I should be aware of? What is easier to do Lisp than is missing from functional languages like Python?
- What are some big projects built in Lisp (other than this site)?
- If it's so good, why isn't it more popular?
- rman666 6y agoClearly, the best way to learn Lisp is recursively.
- jim-jim-jim 6y agoI'd learn Scheme before CL or Clojure. Way smaller; lets you focus on the idea of Lisp instead of a specific (bloated, warty) Lisp dialect.
- wikibob 6y agoCheck out DrRacket and associated books
- chrismatheson 6y ago2nd. I’m currently in the early stages of my lisp/scheme/racket journey and enjoying it a lot. I found it way easier to setup and get going than CL & Clojure.
- krat0sprakhar 6y agoI can't say its the best way, but I found learning Clojure as my first was really helpful for me. Like you, I prefer working on real projects as well. Given how easy it is to use both Java and JS libraries (Clojurescript) there's a bunch of real-world project ideas I could execute on (web apps, CLI tools, cloud-related tooling)
- y-y 6y agoWhat features of lisp are you looking forward to? If you just want to learn new concepts you want to keep things simple so could just stick with mit-scheme. You didn’t ask, but I would also learn SML (or Haskell) after you have learned some scheme because you will see the diff between type systems and get a lot of practice.
- fmakunbound 6y agoTry learning Common Lisp. There are many book resources and it’s way more fun. Don’t know what you mean you mean by patterns. Meta programming is way easier with Lisps. Python would not normally be classified as functional btw.
- thayne 6y ago> Python would not normally be classified as functional btw. For that matter, Common Lisp isn't a functional language by the modern definition either.
- flavio81 6y agoPython doesn't really have anonymous functions (unless they are 1-line functions, which, in python, means they can't do much.) This pretty much disqualifies it as a functional programming language. Additionally, Guido and the community in general discourage functional programming. While the Common Lisp community already has a lot of libraries for FP, like FSET and others.
- thayne 6y agoSure. CL certainly supports a functional programming style, and there are some good libraries designed for this, and it certainly lends itself more to functional programming than python. But CL isn't a functional programming language the way haskell, or even other lisps like scheme and clojure, are. CL is really a multi-paradigm language. You can use it for FP, or OOP, or straight imperative, and probably some other less-mainstream paradigm. It's up to you.
- papaf 6y agoThere are many book resources and it’s way more fun. I recommend Practical Common Lisp - its free online: http://www.gigamonkeys.com/book/ http://www.gigamonkeys.com/book/
- sdegutis 6y agoThe main things about Lisp: 1. The syntax: It's just parens/brackets, where the first item dictates the meaning of the rest, all separated by whitespace. That's the whole syntax of Lisps. If you have a good IDE (e.g. Emacs + CIDER), this can make you slightly faster at editing code than normal. 2. Functional programming: Many lisps traditionally use recursion. It's not necessarily a core part of Lisp nor is it super great (I avoid it whenever possible). Most of the FP you get from Lisp you can also get from JavaScript and a good FP library (e.g. lodash). 3. Immutability: This isn't traditionally part of Lisps either, mostly just Clojure, and it can be done with libraries in JS. But people often mix these up and think it's a Lisp thing so I listed it here. 4. Macros: Many other languages have good macros now (Elixir, Rust, etc). It can be useful in certain situations, especially how it's used in Rust's stdlib and third party libs, but it's not a panacea as commonly thought. 5. Homoiconicity: This is one of the biggest touted features of Lisps and I just really don't think it's that great. It's mostly useful in writing macros, but other languages have macro systems that don't really suffer from not having this. 6. Bootstrapping: The original idea of Lisp being a language that can bootstrap an interpreter of itself using only a tiny set of special-cased evaluation rules ("special forms") is intellectually neat but not practically useful. 7. Common Lisp: This is its own thing. It's super complex and some people really love it and swear by it. It's kind of like a C++ competitor. It honestly shouldn't even be categorized with the rest of the Lisp family. That's like saying Europe is part of Italy.
- papaf 6y agoYou make some good points but I disagree with: 4. Macros: Many other languages have good macros now (Elixir, Rust, etc). It can be useful in certain situations, especially how it's used in Rust's stdlib and third party libs, but it's not a panacea as commonly thought. For me, the big deal with lisp macros, is that you write the macros in lisp itself and can call lisp functions at compile time. The last time I wrote a Rust Macro they only supported pattern matching and templating -- any rust code was only run by the final compiled program. Have Rust macros got that much more powerful now?
- geofft 6y agoThe built-in macros haven't but there's good support for procedural macros ("proc macros"), which are Rust code run at compile time that transform AST to AST. However, this is "just" a particularly well-polished form of compiler plugins - technically you can run C code at compile time with a GCC plugin, do cool things with libclang, etc. Writing project-specific compiler plugins is unusual but not totally unheard of: Linux has a couple, for instance.
- pjmlp 6y agoGet hold of the educational versions of Allegro or Lisp Works and learn the real deal. https://franz.com/downloads/clp/survey https://franz.com/downloads/clp/survey http://www.lispworks.com/products/lispworks.html#personal http://www.lispworks.com/products/lispworks.html#personal They are the surviving experience from what Interlisp-D/Lisp Machines were thought to be. Or in case you go Clojure, get yourself a copy of Cursive, https://cursive-ide.com/ https://cursive-ide.com/
- zenlot 6y agoYou could start with How to Design Programs 2e, free[1]. You'll get good feeling of Lisp working with Racket-like language (it's not a book about Racket). Then you could go with Clojure and work on some real projects. [1] https://htdp.org https://htdp.org
- scns 6y agoThere are two MOOCs based on this on edx.org, taught by Gregor Kiczales, called "How to code simple data" and "how to code complex data".
- momo-reina 6y agoAlgorithm book using Lisp https://leanpub.com/progalgs/read#leanpub-auto-data-structures-vs-algorithms https://leanpub.com/progalgs/read#leanpub-auto-data-structur... Or a book like Barski’s Land of Lisp https://www.amazon.com/Land-Lisp-Learn-Program-Game/dp/1593272812 https://www.amazon.com/Land-Lisp-Learn-Program-Game/dp/15932... I would start with Common Lisp.
- smabie 6y agoI would suggest you start with Racket. It's cleaner than both Common Lisp and Racket and the bundled with a nice and beginner friendly IDE. https://racket-lang.org/ https://racket-lang.org/ Also it comes bundled with tons of useful libraries.
- xsys 6y agoI would recommend Racket over CL and Clojure. The ecosystem is self-contained (unlike Clojure) and the design is very clean (unlike Common Lisp). Also it comes bundled with a nice and simple IDE. https://racket-lang.org/ https://racket-lang.org/
- herdrick 6y agoYour best bet is a wonderful book, The Little Schemer.
- hestefisk 6y agoI started on Emacs with elisp. Then picked up Clojure afterwards. It’s a nice way to reason about programs, esp closures, so highly recommend it.
- typon 6y agoI would recommend learning Clojure because you can immediately build useful and fun programs with it (e.g. websites with Clojurescript/Reagent).
- retonom 6y agoI'd say via Emacs is the easiest way. You can use org-mode as well which is the best (most customizable and individual) TODO solution that exist IMO. When you want to adapt Emacs to your workflow you are kind of forced to learn Lisp and once you have learned the basics you may be seeing yourself writing Emacs packages even. Progress with learning Clojure from there.
- tmalsburg2 6y agoThis is how I learned Lisp. It's not just a good way to learn lisp, it's also fun and has some nice side effects.
- praptak 6y agoElisp is a bit quirky, I don't think it makes sense to invest time in it unless you plan to become an Emacs power user. That said Steve Yegge "Emergency Elisp" is a great intro.
- twalla 6y agoRacket is nice, as it's very "batteries-included", you get a nice IDE in DrRacket plus a fairly complete standard library. I feel like most people seem to gravitate towards Clojure afterwards for "real" projects - it definitely has the most real world adoption. The Java interop and JVM runtime feel like simultaneously Clojure's biggest strength and biggest weakness. Here are some resources for both: [Racket] https://docs.racket-lang.org/guide/intro.html https://docs.racket-lang.org/guide/intro.html https://htdp.org/ https://htdp.org/ https://beautifulracket.com/ https://beautifulracket.com/ [Clojure] https://www.maria.cloud/ https://www.maria.cloud/ https://www.braveclojure.com/clojure-for-the-brave-and-true/ https://www.braveclojure.com/clojure-for-the-brave-and-true/
- fulafel 6y agoBesides JVM Clojure, ClojureScript is significant too as it lets you do apps on JSVM based platforms - besides browser this includes Electron, React Native, node/npm ecosystem, etc and you can share code with your JVM backend when convenient.
- curryst 6y agoI've dabbled in a tiny bit of Clojure and Racket. Thus far I'm enjoying Racket more. The two things I dislike about Clojure: 1. Running on the JVM means that you can use Java libraries, but the syntax to invoke them is messy. The errors you get are also often rather opaque, and as someone who didn't know Java going in, I ended up having to learn how Java works as well to actually use them. 2. It produces Java artifacts. That means slow start up times, which is annoying for CLI tools. I know there's Graal, but last time I tried there were some issues using the stdlib CLI parsing library. You can also do ClojureScript, but it doesn't support everything Clojure does. I like that Racket produces native executables, and having so much stuff built into the stdlib removes a lot of the "I need a database connection, what are people using for that now?" questions.
- didibus 6y ago> Should I start with Common Lisp, or some popular dialect (Clojure?) Clojure is not a dialect of Common Lisp. That would be like saying that C#, Go, Kotlin or Scala are dialects of Java. They are both Lisps, but neither is a dialect of one another. I use Clojure at work and recreationally, and I learned Lisps first from it, so I am a bit biased, but I do think Clojure is a good Lisp to learn in 2020. I'd say Racket is a close second. So my rec would be to learn Clojure, and this is my curriculum of choice: 1. Read through: https://kimh.github.io/clojure-by-example/#about https://kimh.github.io/clojure-by-example/#about 2. Then read through: https://aphyr.com/posts/301-clojure-from-the-ground-up-welcome https://aphyr.com/posts/301-clojure-from-the-ground-up-welco... 3. Then read through: https://clojure.org/reference/reader https://clojure.org/reference/reader 4. Now start referring to the Cheatsheet: https://clojure.org/api/cheatsheet https://clojure.org/api/cheatsheet and https://clojuredocs.org https://clojuredocs.org and https://cljdoc.org https://cljdoc.org. Bookmark them. 5. Finally, read through guides here: https://clojure.org/guides/getting_started https://clojure.org/guides/getting_started 6. Now go to: https://4clojure.org https://4clojure.org and go through the exercises, start with elementary and easy. Even better, get the Android app, so you can practice on the go, the bus, the bathroom. Also for some reason the order of exercise in the Android app is the best, so I'd try and follow that. You don't need to go through them all, you can probably stop after easy or medium. 7. Once that's done, get Clojure Cookbook and go through the recipes. 8. Oh and, always go to the Clojure slack beginner channel and don't hesitate to ask questions and for help. Maybe always have it open in a tab: https://clojurians.slack.com/?redir=%2Fmessages%2Fbeginners%2F https://clojurians.slack.com/?redir=%2Fmessages%2Fbeginners%... 9. Now try to build something from scratch, like try to write a tic-tac-toe game, or write a search engine, or whatever you prefer. > What is easier to do Lisp than is missing from functional languages like Python? There are two kinds of Functional language. There are those who rely on first-class functions as their unit of abstraction. In those, functions close over their environment, and can be passed around as values. Python has support for this type of functional programming, but it is somewhat mediocre compared to most Lisps. Python still relies a lot on Classes and Objects, and there are some constraints with the way its functions are first-class especially around anonymous functions and partial application. Scheme and Racket are pros at this when it comes to Lisps. And then there are those where data is immutable, and most functions are pure. In those, everything will be an expression that returns a value, instead of a statement which returns nothing. Recursion will be used for looping, because data can't mutate, so it must be passed along. Records will be value based, instead of identity based, because they are immutable. Clojure is the king here when it comes to Lisps. Nothing will be easier to do, especially to you, someone unfamiliar with Lisps, and learning it. But it should be more fun and more rewarding. The development process is more interactive, Lisp languages tend to have every feature under the sun for you to learn and mess around with. Performance should be better than Python, especially if you go for Clojure, Chez Scheme, or SBCL. Also expressiveness is really high, that means anything a little boilerplate, or requiring too much typing or contortioning can be factored out by a Macro. And structural editing is quite productive once you learn how to use it properly. And once you know a Lisp, you can start exploring Emacs, and understanding how Emacs work, and how to modify it to your liking, which is a very fun new world of possibilities. > What are some big projects built in Lisp (other than this site)? There's Emacs. I know that Walmart was(still is?) using Clojure for their backend listings I think. I use it at my work for secret stuff ;), but it's handling backend micro-services processing thousands of requests per second. Circle CI pretty sure have a mostly Clojure based stack. Consumer Reports online is apparently built in Clojure. Apparently Atlassian have some Clojure backends. Boeing apparently runs some Clojure based in-flight diagnostic. ITA apparently uses CL for searching for airfares. And AutoCad uses CL it seems. NuBank is entirely written in Clojure, a pretty big fintech bank in Brazil of 5000 devs. AdZerk an ad serving company, and NextJournal, an awesome data-science notebook offering both have full on Clojure stacks. Apparently Cisco has a product called Threat Grid which is implemented in Clojure. Clojure/Script really dominates in that area compared to other Lisp from what I know here. > If it's so good, why isn't it more popular? Because everyone that could learn it, like you, back out because they ask this question :p Chicken and Egg is the answer really. Though I'd say, Lisp is tailored to experts, it doesn't make things easy and obvious, it kind of gives you infinite flexibility and customization. It has the opposite mantra of Python, the one and only one way, Lisp is like all and every possible way. So imagine a language that gives you infinite flexibility and customization, and every possible way to do anything and everything, yet is dynamic and without static type to help guide you in any of it, and has a syntax that isn't like anything you've learned in school, not like the math you know, not like the English you speak. That kind of language can't be wielded by just anybody.
- praptak 6y agoMy vote goes to Clojure because it has been reworked from scratch to drop the inessential cruft. To my knowledge hasn't re-accummulated the cruft (yet :-) ). It also has quite a lot of ideas that are useful outside Clojure, like its concepts around concurrency, state and immutability.
- _ph_ 6y agoI would recommend either a Scheme or Common Lisp, if you really want to learn and understand Lisp. Clojure is an interesting derivative, but if you want to learn Lisp, you should start with one of the above, a little bit dependant on what kind of application appeals to you most. But if you want me to narrow down my recommendation to a single answer, it would be Common Lisp. It has one single comprehensive standard and there is a lot of real-world development done in Common Lisp. Scheme has a smaller standard, so while that is easier to pick up quickly, most Scheme implementations have a lot of extensions for all the stuff not in the small standard :p. So with Common Lisp, you have a much larger overlap between implementations. For development, SBCL is great, as it is a free and open source implementation of Common Lisp which also has one of the best compilers to native code around, with well written code, you can get amazingly fast speed. Practicall Common Lisp is a great resource for learning. It is very comprehensive, covering the important parts of the language and has some real-world examples. Land of Lisp is very nice, a bit more playful.
- bjoli 6y agoi would say CL for serious work and scheme for what it teaches you. I would say that the principle of scheme with a few well chosen primitives that compose into efficient abstractions is something I will forever carry with me. Common lisp is amazing as well. large and full of warts, but incredibly practical and battle-tested. if I were to write a larger project from scratch I would either pick SBCL or chez scheme, even though I myself am a guile weenie. if I had access to Allegro CL or lispworks I doubt I would ever leave the comfort of them.
- potta_coffee 6y agoHave you tried Chicken? I'm playing with Scheme again and trying to decide between Chicken and Chez.
- bjoli 6y agochicken's IRC channel taught me scheme. A bunch of very nice people. I have called it the friendliest place online for years. I ended up having to write some portable r6rs code, and that is easier in guile and chez, so that's why I went. I still feel a bit like I owe them to spread the word. Chicken is a very capable and plenty fast scheme. installing 3rd party software is a lot easier in chicken than any other scheme. I would say that it is slightly faster than, or just as fast as guile3, but slower than chez.
- deleted 6y ago[deleted]
- distantaidenn 6y agoBest way to learn any language: build something. I picked Clojure and haven't looked back since. If you keep wondering what's the best implementation, then you will suffer from analysis paralysis -- you'll end up spinning your wheels and doing nothing. Flip a coin, pick something, and start building.
- clauderoux 6y agoyou might want to try this one: https://github.com/naver/tamgu/wiki/7.-Lisp-Interpreter https://github.com/naver/tamgu/wiki/7.-Lisp-Interpreter
- knbknb 6y agoIf you like MOOCs and video training, checkout this introductory course for absolute beginners: "How to Code: Simple Data" on edX, by Gregor Gregor Kiczales from the University of British Columbia. https://courses.edx.org/courses/course-v1:UBCx+HtC1x+2T2017/course/ https://courses.edx.org/courses/course-v1:UBCx+HtC1x+2T2017/... The course teaches the Racket language, but proceeds at a rapid pace. It follows the "How to Design Programs" methodology developed in the 1990s (?) at MIT (and elsewhere). This is a test-driven-design method, AFAICT. (I think the MOOC author co-developed it while at MIT). https://htdp.org/2003-09-26/ https://htdp.org/2003-09-26/ Someone has ported all the SICP exercises to Racket, so you can follow along with that book, too. https://en.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs https://en.wikipedia.org/wiki/Structure_and_Interpretation_o... There is a follow-up course, "How to Code: Complex data" but I didn't take it.
- pm321 6y agoWork on a project under the broad umbrella of Guix Guile, GNU-Emacs, etoys squeak? (I am undecided.)
- j-pb 6y agoGo with clojure, it's by far the most mind altering Lisp because of it's extremely nice immutable datatypes. Common lisp by comparison, feels arcane, outdated and non lispy. You have to learn non composable macro syntaxes, and it's often way too low level and concerned about memory and imperative code and OOP. Scheme is nice in terms of self contained purity, but then again not as nice to use and not as mind altering as clojure. Clojure is basically a lisp build around immutable datastructures, common lisp is a lisp build around metaprogramming, and scheme is a lisp build around lambdas.
- dunefox 6y ago> Common Lisp feels non lispy Man, now I've heard everything.
- j-pb 6y agoThe origins of lisp are that of a mathematical tool. Clojure is much closer to math with its referential transparency, immutable datatypes, deep proper object equality, and data first philosophy, than common lisp with its systems programming, lisp machine, need for speed approach.
- travv0 6y agoIf we're talking origins of lisp, the original description of lisp[1] spends much of its time describing cons cells, something that clojure lacks completely. [1] http://www-formal.stanford.edu/jmc/recursive/node4.html http://www-formal.stanford.edu/jmc/recursive/node4.html
- j-pb 6y agoYeah and the original cons cells had proper equality defined on them, which common lisp doesn't have. Also the original lisp wasn't a lisp-2. In clojure you can trivially use your own cons cells and get equality for free, in common lisp you can't build the proper mathematical properties without essentially reinventing clojure.
- tester89 6y agoFor learning Common Lisp (which is what I’d recommend) there are: * Practical Common Lisp by Peter Sibel. An award-winning book that serves as a serious introduction to the language with many practical projects. [Available to read for free online.](http://www.gigamonkeys.com/book/ http://www.gigamonkeys.com/book/) * Land of Lisp By Conrad Barski. A fun introduction involving writing silly retro games in Lisp. The author based his book of a short introduction he wrote called [Casting SPELs in Lisp](http://www.lisperati.com/casting.html http://www.lisperati.com/casting.html) As an IDE if you’re comfortable with Emacs use Sly, Vim use SLIMV. For Atom there’s SLIMA, a port of Sly should become available for Sublime Text in a month’s time (or whenever ST4 is announced). The reason I recommend Common Lisp is because it’s multi-paradigm, unlike Clojure and Scheme which force you down the functional rabbit-hole (not a bad thing but you won’t learn as much). Another reason is with the tools above it’s very-easy to setup a live coding environment. I would recommend against learning Clojure because the error messages often tie too closely to the JVM, which might be annoying. In terms of big projects, there’s of course HN, also * Emacs * Google Flights * Grammarly * Some quantum computing stuff One of the things which is easier in Lisp is the creation of a Domain-Specific-Languages Look at how [messy and hacky HTML DSL in Python is](https://github.com/duyixian1234/html_dsl https://github.com/duyixian1234/html_dsl), implementing this in Lisp would’ve been far easier and less hacky than that. But really the main thing is macros (which enable the above), macros allow for easy customisation of the language syntax to better suit the problem at hand.
- omilu 6y agoWatch the SICP video series: https://www.youtube.com/watch?v=-J_xL4IGhJA&list=PLE18841CABEA24090 https://www.youtube.com/watch?v=-J_xL4IGhJA&list=PLE18841CAB...
- j-pb 6y agoSince you're a newcomer I'd go by community. Clojure has by far the biggest and the friendliest community. Then there's scheme with an equally friendly but smaller community. And then theres common lisp. The community is probably bigger than the scheme one, but it's also where the zealots are. This thread is the perfect example, all the non CL posts get downvoted no matter how well reasoned they are. And it's like that in basically every other clojure/lisp post on HN, theres always a small number of toxic common lispers with their "the other lisps aren't the real lisps" and "you're using it wrong".
- lispm 6y agoClaiming that Common Lisp feels unlispy ( see your other comment https://news.ycombinator.com/item?id=22914659 https://news.ycombinator.com/item?id=22914659 ) does not help to advance your case. Don't complain that you get downvoted, when you post nonsense.
- j-pb 6y agoAh there he is, our favourite zealot. Claiming that other peoples experiences are "wrong" is exactly the kind of thing typical for the CL community.
- lispm 6y agoPersonal attacks also don't advance your case.
- j-pb 6y agoNo attack meant, just an observation, I had actually written the post with you in mind. Although in all fairness despite your zealotry you are the most objective of them. Also what's my "cause" even supposed to be? Convince op to use clojure? I gave my recommendation because they asked, that's all.
- jmeister 6y agoScheme + SICP https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html https://mitpress.mit.edu/sites/default/files/sicp/full-text/... A classic time-tested route that will teach you the “spirit” of Lisp. Has made countless students across generations fall in love with Lisp/programming/computer science
- misframer 6y agoTry writing an interpreter! “Make a Lisp“[0] and Norvig’s “(How to Write a (Lisp) Interpreter (in Python))”[1] really helped me understand the basics. [0] https://github.com/kanaka/mal https://github.com/kanaka/mal [1] https://norvig.com/lispy.html https://norvig.com/lispy.html
- avmich 6y ago> it will likely change the way I think about programming For some important ideas Lisp brings to the table, I'd recommend the following approach. 1) Read this - https://stevelosh.com/blog/2013/03/list-out-of-lambda/ https://stevelosh.com/blog/2013/03/list-out-of-lambda/ . If you're not familiar with lambda calculus - and if you do, you wouldn't likely ask this question - this article has a good chance to make you pause and re-evaluate importance and versatility of functions. The benefit of this article is that the code is in a more traditional JavaScript, and it talks about just some ideas - not the whole landscape, so it's relatively short. 2) Then read this - http://www.michaelnielsen.org/ddi/lisp-as-the-maxwells-equations-of-software/ http://www.michaelnielsen.org/ddi/lisp-as-the-maxwells-equat... . It's quite a project to read this an make all tacitly suggested exercises. The big point is that you can have an expression, which evaluates other expressions - in a chunk one can hope to bite. After this you can aim to write your own interpreters. 3) Go to Norvig's JScheme - which adds mechanisms from more real Scheme, like tail recursion optimization. By this time you'll have some practical ideas about how closures are built; Michael Nielsen uses Python's functions for that. 4) Read about continuations. Look at "Structure and interpretation of Computer Programs" for solid foundations. Look at "On Lisp" for e.g. treating of macros - both of these books are on the Internet to read. I'd also recommend checking "Paradigms of Artificial Intelligence Programming" - another book (by Norvig) available on the Internet to read - which teaches Lisp while providing plenty of examples of its use for interesting problems. "The Little Schemer" book (an awesome series) talks about patterns for how to apply Lisp for problems; look at them. You will probably get most out of pp.1 and 2, but the others will expand your horizons. You'd see why Lisp is at times called "a big ball of mud", and how this old language somehow manages to become inspiration for new languages, while absorbing new ideas from modern language research.
- matthewn 6y agoIf you'd like to start with a light, fun introduction, "Lists and Lists" is an old interactive fiction game from the illustrious Andrew Plotkin, in which a genie gives you puzzles to solve using Scheme. It's a delightful introduction to Lisp-y thinking. You can play online, or download and play offline: https://ifdb.tads.org/viewgame?id=zj3ie12ewi1mrj1t https://ifdb.tads.org/viewgame?id=zj3ie12ewi1mrj1t
- akater 6y agoUnless you go with commercial Lisps, you likely won't get far without Emacs. Thus, one option to consider (esp. if you're not fond of learning by the book) is to just start learning Emacs since you will need it anyway, use Emacs Lisp to configure it and learn the basics hands-on way. That will likely feel “different” enough already to change the way you think about programming, if that's one of the goals. No need for books, no need to setup anything, you're simply dropped into a huge introspection-enabled sandbox that is about to become your main tool.
- kazinator 6y agoTry TXR Lisp: https://www.nongnu.org/txr https://www.nongnu.org/txr. You will have a very useful companion going forward, no matter what you work with. No Emacs required; there is a REPL with persistent history and a decent multi-line editing mode built in, and the project provides an pretty accurate Vim syntax highlighting file (two actually, for the two languages). It's conveniently documented in a single man page, like another Unix tool. That man page is also available as a hyperlinked HTML document, also all in one page.
- linguae 6y agoI had exposure to Scheme during my undergraduate years taking courses in programming languages and compilers, but earlier this year I started learning Common Lisp and I'm really enjoying the language. It's a large language and so mastering it will take a considerable amount of time, but just like C++ you don't have to know the entire language to be productive in it. I use SBCL on macOS as my Common Lisp compiler. Regarding developer environments, although I'm a longtime vi user, I'm starting to get into Emacs and SLIME, which is an approximation to commercial Lisp environments. Common Lisp is best experienced in an environment like SLIME that has a live Lisp environment (kind of like Python's REPL on steroids). I'm pining for the days of Symbolics Genera, the operating system for Symbolics LISP machines, but sadly it's not open source and it's extremely difficult to obtain a legal copy these days. Regarding resources, the best introduction I've found is the 1990 book "Common Lisp: A Gentle Introduction to Symbolic Computation," which is available online at https://www.cs.cmu.edu/~dst/LispBook/ https://www.cs.cmu.edu/~dst/LispBook/. This does not cover the entire language, but it covers the basics of the language, including macros. I went through this text and enjoyed its gentle introduction to the language. I plan to purchase the following books to continue my Common Lisp education: "Common Lisp Recipes" (2016) by Edmund Weitz (http://weitz.de/cl-recipes/ http://weitz.de/cl-recipes/) and "The Art of the Metaobject Protocol" (1991) by Gregor Kiczales et al (https://mitpress.mit.edu/books/art-metaobject-protocol https://mitpress.mit.edu/books/art-metaobject-protocol) For general references to the language, Guy Steele's "Common Lisp the Language, 2nd Edition" is available online at https://www.cs.cmu.edu/Groups/AI/html/cltl/cltl2.html https://www.cs.cmu.edu/Groups/AI/html/cltl/cltl2.html, and the Common Lisp HyperSpec is located at https://www.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/FrontMatter/index.html https://www.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Fr.... Good luck and have fun!