News for hackers. Stuff that matters.
Re:REPL vs CLI: IDE wars by dragonwriter on Thursday July 01, 2021 @11:06AM (#27699793)
Homoiconicity isn't required for that, all you need is to be able to map between source and AST enough to identify expression boundaries.

Plenty of development environments for non-homoiconic languages provide the ability to evaluate a selected expression (not just the last one) in a linked REPL on demand.

I love the Lisp family, but I don't know why its advocates often sound like they haven't seen a dev environment for a non-Lisp language since the early 1980s when pointing to “unique” advantages of Lisps.

Re:REPL vs CLI: IDE wars by marcosdumay on Thursday July 01, 2021 @11:12AM (#27699887)
Homoiconicity is an ill-defined concept. If you take every subjective feature from it, all it implies is that you are able to cut your code into well defined AST structures (what all languages have, but for some it's easier than for others).

So, yeah, anything people do with Lisp could be done for any other language, it only requires more complex tooling. How much more complexity depending on the language, and it varies from "barely perceptibly more" into "that's completely not practical".

Re:REPL vs CLI: IDE wars by thanato0s on Saturday July 10, 2021 @10:18AM (#27793489)
To me, "only" and "complex" shouldn't be used in the same sentence. Big part of the job of a developer is to reduce complexity, and we barely do it (depending of the system). What is "barely perceptible" now can be "completely not practical" 2 years down the road.
Re:REPL vs CLI: IDE wars by js2 on Thursday July 01, 2021 @12:18PM (#27700773)
Re:REPL vs CLI: IDE wars by elamje on Thursday July 01, 2021 @11:39AM (#27700255)
Maybe it's not required. However, I can confidently say Clojure in emacs feels like an entirely different development experience than my daily Python work in PyCharm/VSCode and C# in VS. I recommend trying it out if you haven't already.
Re:REPL vs CLI: IDE wars by pjmlp on Thursday July 01, 2021 @12:49PM (#27701189)
And I recommend trying out Smalltalk.
Re:REPL vs CLI: IDE wars by theshadowknows on Thursday July 01, 2021 @08:05PM (#27706447)
As a hobby I want to learn a lisp. Where should I begin? :)
Re:REPL vs CLI: IDE wars by falcolas on Thursday July 01, 2021 @11:03PM (#27707442)
MAL. AKA Make A Lisp. Instructions to write a tail recursion lisp interpreter in a weekend in almost any language. It teaches almost anything you want to know about lisp, plus some practical compiler/interpreter knowledge.
Re:REPL vs CLI: IDE wars by lispm on Friday July 02, 2021 @03:51AM (#27708890)
Install sbcl, slime, gnu emacs in some form.

See the book Practical Common Lisp for an intro: https://gigamonkeys.com/book/

Re:REPL vs CLI: IDE wars by pjmlp on Friday July 02, 2021 @02:41AM (#27708455)
If you want to see how Lisp environments used to be on the hey day of Lisp, check the community editions from Lisp Works and Allegro Common Lisp.
Re:REPL vs CLI: IDE wars by vmladenov on Thursday July 01, 2021 @08:28PM (#27706612)
Scheme is a nice start. You can write a basic interpreter for it over the course of a few weeks
Re:REPL vs CLI: IDE wars by dgb23 on Thursday July 01, 2021 @11:35AM (#27700206)
There is a significant, qualitative difference between using a language that designed for REPL use and one that isn’t.

Those boundaries you talk of are the crux of the issue. A highly dynamic, completely expression based language is going to enable a much different experience. Homoiconicity also plays an important role here, because you can ispect and parse code within the language, with the same functions and algorithms as everything else.

Re:REPL vs CLI: IDE wars by leephillips on Thursday July 01, 2021 @11:33AM (#27700184)
Indeed; I do this every day with Vim and its term command, with Julia, Python, bash, Elixir—it works with any language with a REPL of any kind.
Re:REPL vs CLI: IDE wars by nlitened on Thursday July 01, 2021 @12:09PM (#27700649)
I am not familiar with how Julia and Elixir work, but form my experience Python’s REPL is not the same at all as REPL in Clojure or other lisps.

In Clojure, you literally built your program in memory while you’re writing the source code file, updating the memory representation of your running program part-by-part without ever stopping it.

This experience is absolutely magical, and it’s very hard to go back to edit-compile-run loop in other languages after that. It is completely different from “my language has a REPL and I can execute parts of code in it”.

Re:REPL vs CLI: IDE wars by leephillips on Thursday July 01, 2021 @12:24PM (#27700853)
No, Julia and Elixir are the same as Python in that regard (Python is more annoying because of the indentation problem). I was just talking about interactive evaluation of expressions selected in the editor. Although I’ve messed with Clojure a bit, I admit I don’t fully appreciate what you’re describing. I’m a little afraid to find out, frankly, because it sounds seductive.
Re:REPL vs CLI: IDE wars by shele on Thursday July 01, 2021 @03:35PM (#27703530)
Julia is much closer to Clojure than to Python in this regard, which brings back the point from above that homoiconity isn't the key ingredient
Re:REPL vs CLI: IDE wars by leephillips on Thursday July 01, 2021 @03:53PM (#27703808)
How so? In julia, one problem is that you can’t redefine datatypes in the REPL. You need to restart.
Re:REPL vs CLI: IDE wars by shele on Thursday July 01, 2021 @05:49PM (#27705320)
Yes, that restart is painful exactly because it interrupts the "built your program in memory while you’re writing the source code file" OP talks about.
Re:REPL vs CLI: IDE wars by utxaa on Thursday July 01, 2021 @04:58PM (#27704777)
my inkling is that the more special forms the more difficult it is to repl a language. if everything is an expression not only can you eval parts of it, but that is enough to support quite a bit of extensibility sans macro.
Re:REPL vs CLI: IDE wars by afiori on Friday July 02, 2021 @02:49AM (#27708511)
a comment here some time ago explained nicely what most of these "unique" advantages of homoicinicity are actually about; it was essentially another step on the same spectrum of statement-languages and expression-languages.

in particular this does not mean that it is better but the same advantages of being able to put anything into anything that you find in expression languages like rust in lispy languages are also syntactically in editing source code.

since I started using shrink/grow selection in vscode I have much increased interest for simple syntax aware editing, something simple would be moving blocks of code token by token

Re:REPL vs CLI: IDE wars by pjmlp on Thursday July 01, 2021 @12:48PM (#27701180)
Not only that, Smalltalk, Mesa and Mesa/Cedar workstations, all shared the same interactivity as Interlisp-D at Xerox PARC.