4 ms·
It looks cool, but I never understand "obsession" with having nice [Lisp] REPL in the terminal. I almost never type directly in the REPL, even when I have it in
by iLemming 7y ago
It looks cool, but I never understand "obsession" with having nice [Lisp] REPL in the terminal. I almost never type directly in the REPL, even when I have it in my IDE. One of the selling points of Lisp that you can eval any expression from your editor, isn't that right?
- capableweb 7y agoWhat languages do you usually use? REPLs for languages like python and nodejs are never as integrated and well working as REPLs for lisp languages like Clojure. Probably the structure of the code that lisp almost forces you to have, makes the REPL experience much easier. Especially in Clojure where most functions are side-effect free which means you can run them out-of-context, as long as you've defined the vars it's using since before.
- finalfantasia 7y agoI think what @iLemming meant is that she/he doesn’t understand the appeal of having a fancy REPL _UI_ (mostly virtual terminal emulator-based readline implementations) and working with it _directly_ as opposed to sending forms from your editor of choice to a REPL server. I kind of hold the same opinion. Being more powerful, feature-rich, flexible than readline implementations, editors are, by design, more suited to editing forms. And, I believe, “sending forms from your editor to the REPL” is what the “REPL-driven development” encourages.
- capableweb 7y agoIlemming doesn't seem to care about the UI to the REPL. They simply don't care about REPLs at all. At least that's what I understand from: > I almost never type directly in the REPL, even when I have it in my IDE I agree that it's more comfortable to be able to send forms from your editor to be evaled somewhere else, I myself don't use the CLI REPL very much, but since I use vim-fireplace, I guess my REPL is in the terminal anyways. Since it wasn't clear in https://news.ycombinator.com/item?id=22193862 https://news.ycombinator.com/item?id=22193862 what language iLemming uses or have experience with REPLs, I just wanted them to clarify.
- iLemming 7y agoSorry my bad, I should've probably clarified that I meant Lisp REPLs specifically.
- pjmlp 7y agoChrome dev tools are much closer to a Smalltalk developer experience than CLI repls. As for Python, https://visualstudio.microsoft.com/vs/features/python/ https://visualstudio.microsoft.com/vs/features/python/
- iLemming 7y agoWhen you write Clojurescript, you don't need to use Chrome Dev Tools much. You can eval things in your IDE and the changes will be [almost immediately] reflected in the UI.
- pjmlp 7y agoSure, I was mentioning it related to JavaScript REPL experience, and having nice things like immediate visualization of data structures, debugging tooltips and such. Naturally Clojure based IDEs like Cursive are also quite nice.
- iLemming 7y agoBecause 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.
- capableweb 7y agoFeels 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?
- iLemming 7y agoWell, we're not in a private chat. Other people may read it as well.
- capableweb 7y agoAre you OK?
- ballpark 7y agoBased on Eric Normand's REPL Driven Development series, if I'm not mistaken, he considers evaling from the editor part of the REPL driven development flow, so it seems that evaling from the editor could also be considered "using the repl" edit... I think I'm seeing that your question is more of a point that you're making. Yes, it's nice to be able eval from the editor, but now being a professional Clojure developer after having been a Python developer for years, I would agree with the arguments that typing lisp (s-expression) code in a repl is much easier than Python, because you don't have to worry about indentation. This probably applies to other languages for different reasons. eg. Java... I can't even imagine what a REPL would be there. My repl usage in python was usually just calling a function I wrote in the editor. Same with my little experience in Ruby.