News for hackers. Stuff that matters.
Re:Fancy Clojure REPL by iLemming on Thursday January 30, 2020 @02:35PM (#22194602)
Because non-homoiconic languages don't have "true" REPLs. At best they have "interactive environments". What's great about Lisp, and the point people complaining about parentheses miss, is that you can eval any [sub]expression without any preceding ceremony. That is not possible in almost any other language (maybe with exception of Smalltalk), simply due to the nature of the language syntax.

In Clojure, if you have something like:

(foo [a b] ((c a) b))

you can evaluate every single part of it, you'd get immediate feedback, what is `a`, what is `b` and `c`, the result of `(c a)`, the result of the entire thing, etc. Similar thing in JS would be something like:

let foo = (a, b) => { return c(a)(b); }

It's already more difficult to edit, there's no "structure", it's not easy to evaluate arbitrary pieces without "dancing around", introducing temp variables. Given Clojure code snippet is also data, it can be send over the wire, send directly to the connected REPL instance, etc.

That's what gives Lisp developers a substantial speed of development. When people talk about "what's good about Clojure", they usually say: immutable data-structures, stability, hosted nature - can target JVM, JS, BEAM and CLR, can even have interop with Python and R. But the coolest thing about Clojure and Lisps in general - they provide "true" REPLs.

Re:Fancy Clojure REPL by e12e on Thursday January 30, 2020 @06:02PM (#22196913)
Smalltalk isn't homoiconic?

You can certainly eval parts of a python or ruby program (although indentation-as-block needs some care in python).

In lisp you also need a useful scope (eg: if foo isn't bound "(foo 1 2)" won't be very useful).

Re:Fancy Clojure REPL by iLemming on Thursday January 30, 2020 @08:56PM (#22198273)
No, Smalltalk is not fully homoiconic, it has some nice "reflective" abilities, i.e. it's possible to view "code as data" that allows good REPL experience. But it's not a homoiconic language.
Re:Fancy Clojure REPL by capableweb on Thursday January 30, 2020 @02:41PM (#22194667)
Feels like we're talking past each other at this point. You're preaching to the choir here, and not sure where that came from. Basically the question was "What language do you use?" and now you're trying to tell me why lisps are great. I agree with everything you're saying, I write Clojure code professionally during the day-time, but your comment just came from nowhere.

Edit: or maybe you responded to the wrong comment?

Re:Fancy Clojure REPL by iLemming on Thursday January 30, 2020 @02:44PM (#22194697)
Well, we're not in a private chat. Other people may read it as well.
Re:Fancy Clojure REPL by capableweb on Thursday January 30, 2020 @02:46PM (#22194716)
Are you OK?
Re:Fancy Clojure REPL by iLemming on Thursday January 30, 2020 @02:58PM (#22194852)
Yes, I'm sorry for the confusion. You use Clojure, I use Clojure, we're both commenting in a Clojure related post. I know that I'm "preaching for the choir", and stating the obvious. But to many other people scrolling through the comments, all that may not be obvious.
Re:Fancy Clojure REPL by jibe on Thursday January 30, 2020 @06:53PM (#22197352)
Clojure community in a nutshell. Smart, but a little crusty.
Re:Fancy Clojure REPL by iLemming on Thursday January 30, 2020 @09:06PM (#22198328)
Please don't go that route. I've worked with several language ecosystems. Clojure community is one of the most open, acceptive, diverse and friendly communities out there. This thread is simply misunderstanding/misreading the intent of the commenters. It happens, nobody got hurt.