News for hackers. Stuff that matters.
Re:Lisp is Abstract Syntax by brudgers on Thursday April 17, 2014 @07:43PM (#7607232)
I'm a fan of Rich Hickey, too. And I think Clojure is a solid language. But I wouldn't suggest Clojure as the entry point when seeking a overall understanding of Lisp. There's too much baggage and history swirling around it for explanations ever to be comfortable - e.g. even if Rich Hickey always makes convincing arguments, it's important to note that they are always arguments.

That is there always seems to be at least as much of a subtext of Clojure defining itself by what it isn't as an explicit statement of what Clojure is. So much of what is said about it is said in the context of "Clojure is not Java, or Haskell, or Scala, or Scheme, or Common Lisp" and because that is so much a part of its culture, it has details drawn from 'the best parts' of each and mashed up.

Like Common Lisp, it is a language for working programmers and will trade practical accretion over striving for internal conceptual consistency. Unlike Common Lisp or Scheme, it doesn't have the sort of simple core that lends itself to tutorials from first principles and even if it did, the community tends to be experienced where just jumping into the middle is more the norm.

That's nothing against Clojure. It's just that any sort of gentle introduction to Lisp is probably better sought in those places where it already exists - SICP or the Racket ecosystem or Practical Common Lisp or PG's On Lisp are probably better introductions to what makes Lisp different. Clojure is probably a better second Lisp dialect for many people once they are ready for full tilt production code.

Re:Lisp is Abstract Syntax by minikomi on Friday April 18, 2014 @12:15AM (#7607915)
In learning Clojure first then Racket, it struck me how many good ideas came from racket.. and now how many are still being mined - typed racket being the obvious one.
Re:Lisp is Abstract Syntax by brudgers on Friday April 18, 2014 @09:57AM (#7609136)
That's the advantage of Racket's close relationship with academia...'Implementing x in Racket' is publishable and 'A y Library for Racket' is a Master's Degree project.
Re:Lisp is Abstract Syntax by lispm on Friday April 18, 2014 @02:59AM (#7608228)
I don't know how much Rich Hickey used Racket, but he used Common Lisp for several years and wrote some complex libaries for it. There is also a sketch of Clojure early on written in Common Lisp.
Re:Lisp is Abstract Syntax by hga on Friday April 18, 2014 @08:24AM (#7608893)
Racket started out as a Scheme, and Clojure has mined quite a bit from Scheme. Both are Lisp-1s, loop/recur, not accepting a lot of mainline LISP (e.g. Common Lisp nowadays) baggage, etc.
Re:Lisp is Abstract Syntax by lispm on Friday April 18, 2014 @03:25PM (#7610815)
Actually there is not much Clojure got from Scheme. Lisp 1 is not tied to Scheme. loop/recur is much less powerful than Scheme's TCO.
Re:Lisp is Abstract Syntax by hga on Friday April 18, 2014 @04:31PM (#7611146)
Lisp-1 is pretty firmly tied in most people's minds to Scheme: at the very least the paper that coined the terms (http://www.nhplace.com/kent/Papers/Technical-Issues.html) ascribed it to Scheme, and as far as I know it first came from Scheme (although it's so easy to create a low performance Lisp I wouldn't be surprised if that had been tried before).

loop/recur is of course much less powerful than TCO, because the JVM doesn't natively support it (it's not trivial, security wise). There are three other Lisps on the JVM that I know of: SISC Scheme is mostly dead but does TCO at a cost in speed, Kawa Scheme has as of late added fine grain control over TCO, and Armed Bear Common Lisp doesn't try, as Common Lisps are not required to.

But loop/recur sure looks to be ultimately inspired by Scheme style use of TCO; I just did a set of functions using it for the first time and everything I learned from SICP/6.001 applied and made that part of it trivial.

Re:Lisp is Abstract Syntax by lispm on Friday April 18, 2014 @04:50PM (#7611238)
Haskell also has only one namespace. I propose that Clojure took it from there, including persistent data structures, lazy data structures, ...

> But loop/recur sure looks to be ultimately inspired by Scheme style use of TCO;

To me it looks more like ancient Lisp with prog and goto.

    (defun foo ()
      (prog ((a 1))
        start
        (print a)
        (when (< a 10)
          (incf a)
          (go start))))
Old Lisp code is full of that. It's basically what LOOP/RECUR provides.