Live data from Hacker News

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

hyperpolyglot.org

11–20 of 48 posts

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

#11
As someone who's not a programmer but has beginner - medium python & C skills. I'm in middle of learning lisp (elisp to be precise) and it feels like reading poetry. It's a transcendent experience that's hard to explain. Such beautiful concepts. Everything flows in a way it doesn't in C based langs

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

#12
Notes on CL:

- why nothing on the "compiler" line? Everytime you load a snippet or a file with SBCL, it compiles it (to machine code). There's also compile-file.

- interpreter: likewise, all code is compiled by default with SBCL, not interpreted, even in the REPL. To use the interpreter, we must do this: https://github.com/lisp-tips/lisp-tips/issues/52

- command line program: the racket cell shows the use of -e (eval), the same can be done with any CL implementation.

- since the string split line introduces cl-ppcre, one could mention cl-str :D (plug) (much terser join, trim, concat etc)

- ah ok, for dates and times, flattening a list, hash-table literals… we need more libraries.

- more files operations: https://lispcookbook.github.io/cl-cookbook/files.html

- emacs buffers: now compare with Lem buffers 8-)

- posix-getenv: I'd rather use uiop:getenv (comes in implementations).

- uiop:*command-line-arguments*

- exit: uiop:quit

- uiop:run-program (sync) / launch-program (async)

- java interop: with LispWorks or ABCL (or other libraries)

my 2c

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

#13

Nice comparison. But makes me think we'd be better off if we all just focused on a single one, and grew it, made it better. Not having 4 versions of something almost identical. Fragmentation can hurt adoption.

That’s what Common Lisp is.

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

#14

Notes on CL: - why nothing on the "compiler" line? Everytime you load a snippet or a file with SBCL, it compiles it (to machine code). There's also compile-file. - interpreter: likewise, all code is compiled by default with SBCL, not interpreted, even in the REPL. To use the interpreter, we must do this: https://github.com/lisp-tips/lisp-tips/issues/52 - command line program: the racket cell shows the use of -e (eval…

Since you are also commenting libraries, I think that FSet (1) for inmutable memory,and perhaps a comparison with clojure, and the quick-lisp package manager could be mentioned.

(1) https://news.ycombinator.com/item?id=47779659

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

#15
post #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))))

Shouldn't it be (+ a (apply + b))

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

#17

Perhaps related, I'm maintaining a "cheatsheet" to let Python programmers see what an Elisp equivalent to typical Python functions/methods are. https://kickingvegas.github.io/elisp-for-python/

Are `(push s x)` and `(push x s)` correct for push and insert, resp.?

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

#18

Nice comparison. But makes me think we'd be better off if we all just focused on a single one, and grew it, made it better. Not having 4 versions of something almost identical. Fragmentation can hurt adoption.

There are deep reasons for the variations, especially around (reader) macros.

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

#19
post #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))))

Worse: Using recursion in Common Lisp isn't idiomatic, given that CL doesn't guarantee tail-call optimisation in the specification.

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

#20

Nice comparison. But makes me think we'd be better off if we all just focused on a single one, and grew it, made it better. Not having 4 versions of something almost identical. Fragmentation can hurt adoption.

They are as different from one another as Java is from C# is from JavaScript.
Post reply on HN