News for hackers. Stuff that matters.
Re:On Lisp by neurostimulant on Monday August 26, 2013 @02:36AM (#6275521)
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.

Re:On Lisp by terhechte on Monday August 26, 2013 @04:51AM (#6275883)
Something 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.
Re:On Lisp by agumonkey on Monday August 26, 2013 @06:30AM (#6276154)
Not totally about lisp, but carries a lot of principles used in lisp (recursive types, closures), and uses scheme : http://htdp.org/

Exercises includes sorting, search in binary trees etc etc

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.

Re:On Lisp by eru on Monday August 26, 2013 @03:16AM (#6275627)
You 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.

Re:On Lisp by pavelludiq on Monday August 26, 2013 @03:24AM (#6275640)
I'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?
Re:On Lisp by eru on Monday August 26, 2013 @04:00AM (#6275740)
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.

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.

Re:On Lisp by serf on Monday August 26, 2013 @05:03AM (#6275917)
>>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.

Re:On Lisp by klibertp on Monday August 26, 2013 @07:22AM (#6276310)
> 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.

Re:On Lisp by pavelludiq on Monday August 26, 2013 @07:41AM (#6276388)
Bullshit!

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.

Re:On Lisp by cgag on Monday August 26, 2013 @05:12PM (#6279943)
Can you give some examples of those ways?
Re:On Lisp by AeroNotix on Monday August 26, 2013 @04:30AM (#6275827)
Any particular reason against Common Lisp?
Re:On Lisp by eru on Monday August 26, 2013 @04:53AM (#6275888)
Common Lisp is ugly (e.g. see 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.)

Re:On Lisp by PuercoPop on Monday August 26, 2013 @05:31AM (#6275987)
Oh 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

Re:On Lisp by eru on Tuesday August 27, 2013 @02:08AM (#6281753)
You can have CLOS in Racket, too. And Macros.

What's practical about a Lisp-2?

Re:On Lisp by PuercoPop on Monday August 26, 2013 @05:37AM (#6276011)
Have 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/

Re:On Lisp by bitdiddle on Monday August 26, 2013 @07:11AM (#6276269)
emacs