Live data from Hacker News

Hyperpolyglot Lisp: Common Lisp, Racket, Clojure, Emacs Lisp

hyperpolyglot.org

1–10 of 48 posts

Re: Hyperpolyglot Lisp: Common Lisp, Racket, Clojure, Emacs Lisp

#6
I know that the purpose of the page is to compare syntax of common lisp, racket, clojure, and emacs lisp. But some examples could be more idiomatic, for instance instead of

  (defun add (a &rest b)
    (if (null b)
        a
        (+ a (eval (cons '+ b)))))
One should avoid eval and use endp instead of null:

   (defun add (a &rest b)
        (if (endp b) a
            (apply #'add (+ a (first b)) (rest b))))

Re: Hyperpolyglot Lisp: Common Lisp, Racket, Clojure, Emacs Lisp

#7
This is really neat.

Something I've been meaning to do is try putting together a cross-lisp package manager -- if only because it'd be fun. Maybe it would favor code that could be readily run or eval'd or maybe with some sort of clj/cljs type dynamic dispatch for anything implementation specific.

Re: Hyperpolyglot Lisp: Common Lisp, Racket, Clojure, Emacs Lisp

#8
The page indicates that there is not function for documentation in common lisp, but

  (documentation 'documentation 'function)
      "Return the documentation string of Doc-Type for X, or NIL if none 
        exists. 
        System doc-types are VARIABLE, FUNCTION, STRUCTURE, TYPE, SETF, and T.

 Also http://rosettacode.org for computer tasks implemented in many computer languages to allow you compare syntax and code.
Post reply on HN