5 ms·
Any advice or link for someone new to Lisp like me? Also, is there any good open source project using Lisp that I can fork/download and tinker with? I'm still h
by neurostimulant 13y ago
Any advice or link for someone new to Lisp like me? Also, is there any good open source project using Lisp that I can fork/download and tinker with? I'm still having problem wrapping my head around Lisp. Even implementing some simple algorithms in Lisp took some time for me.
I think this is due to the fact that I learned to program in C. Nowadays I work mainly with python/ruby/javascript, but I got the feeling that I could improve myself as a programmer by learning Lisp.
- eru 13y agoYou could have a look at the software below Hacker News. It's written in the Arc Lisp dialect (which itself is implemented on top of the Racket Lisp dialect). Apart from Racket, Clojure is also a nice Lisp to get started with. It runs on the JVM. I'd advice against learning Common Lisp as your first Lisp these days, even though Common Lisp is what On Lisp is about.
- pavelludiq 13y agoI'd advise exactly the opposite. While clojure and racket are excellent languages, they are very different from one another and CL. Telling someone to learn python or ruby if they ask about learning lua isn't a good advice, is it?
- eru 13y agoOh, if your goal is to learn one of the Lisps, then don't spend any time on Common Lisp. It's old and ugly. Similar, if someone asked about a modern scripting language, I'd send them away from Perl in favour of Python or Ruby. If they goal was explicitly Perl (or Common Lisp) that would be a different thing, though.
- serf 13y ago>>Oh, if your goal is to learn one of the Lisps, then don't spend any time on Common Lisp. It's old and ugly. why? I don't find that at all, and a large reason for learning common lisp is as a learning exercise to become more intimately familiar with lambda calculus and s-expressions. The increased expressivity of clojure (for example) may hinder the very thought processes that make lisp a dialect worth learning. Of course they are both fine languages, but most people now advocate the learning of a LISP not for practicalities sake, but rather just to demonstrate real life things that those sets of languages do differently than nearly every other language, and to allow the programmer to take from those experiences and apply them to their language of choice. From THAT standpoint, i'd advocate CL first, if not only for forcing the user of the language to experience the follies of certain practices, such as the namespace issues that Clojure tried to fix about CL.
- klibertp 13y ago> as a learning exercise to become more intimately familiar with lambda calculus and s-expressions Any Scheme implementation will be better for this. Much less primitives, one namespace for everything, hygienic macros, immutablity by default/encouraged. CL is exactly the opposite of that - it's complicated because it wants to be practical. And for the most part it is. It supports procedural, functional and OO programming, probably logic programming too with the right library. It's designed as a real system for solving real problems - and as such is not the best tool for learning about lambda calculus. Actually you could program imperatively in CL for the long time before ever feeling awkward. Scheme, with it's mandatory TCO and encouraged immutability is much better for learning lambda calculus... and about Lisp in general.
- pavelludiq 13y agoBullshit! In many ways Common Lisp is still a much better language than Clojure or Racket. It isn't old, compared to pretty much anything from the 80's it has aged unbelievably well, and while it has some "stale" parts you can call ugly, I find many parts of clojure or racket much uglier. All in all, it is one of the best high level languages around.
- cgag 13y agoCan you give some examples of those ways?
- AeroNotix 13y agoAny particular reason against Common Lisp?
- eru 13y agoCommon Lisp is ugly (e.g. see https://en.wikipedia.org/wiki/Lisp-1_vs._Lisp-2 https://en.wikipedia.org/wiki/Lisp-1_vs._Lisp-2) and not particularly functional. There are a few reasons you might want to learn it nonetheless, but they don't apply to someone new to Lisp. (In case you ask: Common Lisp is a useful target, if you want to port programs from even older Lisps, like emacs' elisp.)
- PuercoPop 13y agoOh I see by Ugly you mean practical. Lisp is about Metaprogramming not referential transparency. On the otherhand once you start diving in the source code of Clojure you quickly find yourself looking at javaclasses ime. On the other hand CL has CLOS, an object system which puts others to shame. And reader macros to define your own syntax. See cl-annot to see the decorator syntax from python being ported to CL or how to give hashmaps Ruby syntax [1]. [1]: http://frank.kank.net/essays/hash.html http://frank.kank.net/essays/hash.html
- eru 13y agoYou can have CLOS in Racket, too. And Macros. What's practical about a Lisp-2?
- terhechte 13y agoSomething that helped me (even though I didn't plan it that way) was switching over to emacs for coding and extending it using elisp. Suddenly, whenever I felt that there was a function or enhancement that I'd like the editor to have, I could implement it right away elisp and use it right away. You don't even need to create a plugin file or anything, you just hop over to the scratch buffer, write your function, evaluate it, and you extended the functionality. It is so easy that I do it all the time now. That really helped me learn more lisp.
- PuercoPop 13y agoHave you given Practical Common Lisp[1] a try? Also SICP is a very good book, albeit a big deal time commitment. You can try Fukamachi's libraries or redline6561's cl-6502 as code bases to read and play around with. [1]:http://www.gigamonkeys.com/book/ http://www.gigamonkeys.com/book/
- agumonkey 13y agoNot totally about lisp, but carries a lot of principles used in lisp (recursive types, closures), and uses scheme : http://htdp.org/ http://htdp.org/ Exercises includes sorting, search in binary trees etc etc http://mitpress.mit.edu/sicp/ http://mitpress.mit.edu/sicp/ is almost the same but with more math/physic background (uses numerical oriented exercises very early). You'll have to write recursive subset, n-queens, matrix-composition functions.
- bitdiddle 13y agoemacs