News for hackers. Stuff that matters.
Re:One Major Difference Between Clojure and Common Lisp by 59nadir on Saturday September 12, 2015 @03:41AM (#10207560)
> That's true. Clojure is not a Lisp, but partially derived from it.

Clojure is a Lisp. It may not be Lisp, but it's a Lisp. Just like any nix OS is not UNIX but is a Unix OS.

Clojure is most definitely a dialect of Lisp. From clojure.org:

> Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system.

The intent of the design of Clojure was clearly to be a dialect of Lisp, hence the above quote from Rich Hickey proudly displayed on their site.

Re:One Major Difference Between Clojure and Common Lisp by dkersten on Sunday September 13, 2015 @05:36PM (#10212871)
I think the problem is that people seem to equate "Lisp" to "Common Lisp". Clojure is a Lisp, but Clojure is not Common Lisp.

LISP appeared in the late 50's/early 60's. Common Lisp only appeared in the early-to-mid 80's. There were many other lisps in between and many since. Common Lisp is only one of many dialects of Lisp. Clojure is another.

(Not saying that this is what lispm did in this case, (s)he seems to know a lot about lisp; rather this is a common confusion I've seen)

Re:One Major Difference Between Clojure and Common Lisp by lispm on Sunday September 13, 2015 @09:30PM (#10213332)
If Clojure is Lisp, why doesn't it run any Lisp code?

Take code from any Lisp book from the past 50 years and type it into Clojure. It won't work. Even really basic Lisp code won't work.

> There were many other lisps in between and many since.

They all share a core language.

Simple REPL in Emacs Lisp:

    ELISP> (defun read-eval-print-loop ()
             (do* ((input (read) (read))
                   (value (eval input) (eval input)))
                 ((equal input '(quote quit))
                  'done)
                 (print 'input>)
                 (princ input)
                 (print 'value>)
                 (princ input)
                 (print value)))
    read-eval-print-loop
    ELISP> (read-eval-print-loop)

    input>
    (mapcar (quote +) (quote (1 2 3)))
    value>
    (mapcar (quote +) (quote (1 2 3)))
    (1 2 3)
    done
Now OpenLisp, an implementation of ISLisp.

Code unchanged.

    ; OpenLisp v10.1.0 (Build: 5932) by C. Jullien [Aug 30 2014 - 07:38:27]
    ;; WARNING: \"startup.lsp\" file not loaded.
    ? (defun read-eval-print-loop ()
    1>   (do* ((input (read) (read))
    3>         (value (eval input) (eval input)))
    2>        ((equal input '(quote quit))
    3>         'done)
    2>     (print 'input>)
    2>     (princ input)
    2>     (print 'value>)
    2>     (princ input)
    2>     (print value)))
    ;; elapsed time =  0.000s, (0 gc).
    = read-eval-print-loop
    ? (read-eval-print-loop)
    ? (mapcar #'1+ '(1 2 3))
    input>
    (mapcar #'1+ '(1 2 3))value>
    (mapcar #'1+ '(1 2 3))(2 3 4)
The output lacks correct formatting, but generally it works.

The same code unchanged in Common Lisp:

    CL-USER> (defun read-eval-print-loop ()
               (do* ((input (read) (read))
                     (value (eval input) (eval input)))
                    ((equal input '(quote quit))
                     'done)
                 (print 'input>)
                 (princ input)
                 (print 'value>)
                 (princ input)
                 (print value)))
    READ-EVAL-PRINT-LOOP
    CL-USER> (read-eval-print-loop)
    (mapcar '+ '(1 2 3))

    INPUT> (MAPCAR (QUOTE +) (QUOTE (1 2 3)))
    VALUE> (MAPCAR (QUOTE +) (QUOTE (1 2 3)))
    (1 2 3) 
    'quit

    DONE
Every language I would name Lisp runs this code mostly unchanged.

If it does not, it is not Lisp. Then it would be Scheme, Logo, Dylan, Clojure or some other language.

Re:One Major Difference Between Clojure and Common Lisp by hga on Sunday September 13, 2015 @06:41PM (#10213026)
Common Lisp, though, is the lineal descendant of the original LISP, so a case needs to be made for anything else like Scheme and Clojure that claim to be Lisps. I guess I'm saying it's a debatable point.