News for hackers. Stuff that matters.
Re:Clojure 15th Anniversary: A Retrospective by funstuff007 on Saturday October 22, 2022 @03:32AM (#33296282)
> you only start a REPL once, so does not really matter

People say this a lot in Clojure, but don't you worry about global vars that no longer point to what you thought they pointed to? For this reason alone, I almost always load a new Python REPL.

Re:Clojure 15th Anniversary: A Retrospective by kimi on Saturday October 22, 2022 @03:45AM (#33296327)
Not sure what you mean here, but... no. You can rebind, of course, but I never found myself in a situation where the REPL was too bad to be used.

I usually restart the REPL only when I add a dependency, so it will be fetched without me caring about it.

Re:Clojure 15th Anniversary: A Retrospective by phtrivier on Saturday October 22, 2022 @04:50AM (#33296602)
I kept getting in this exact situation when defining tests and wanting to _forget_ a test.

And the OC's onboarding experience reminds me of mine. You need some external tutorial / book to get setup.

Also, last time I used calva, the only thing I got was kondo complaining they the default test created in a brand new project were using unknown symbols, or something. So I assumed my setup was wrong, and gave up.

Clojure is "simple made easy _once you've done all the hard part as a bizuthage_"

Re:Clojure 15th Anniversary: A Retrospective by kimi on Sunday October 23, 2022 @02:15AM (#33304976)
Why do you need to "forget" ? I either change a test, or - wordst case - redefine it as being empty.
Re:Clojure 15th Anniversary: A Retrospective by phtrivier on Monday October 24, 2022 @08:28AM (#33315801)
Usually something as trivial as renaming the test function.
Re:Clojure 15th Anniversary: A Retrospective by kimi on Monday October 24, 2022 @11:02AM (#33317611)
Yes that's a pain
Re:Clojure 15th Anniversary: A Retrospective by kaba0 on Saturday October 22, 2022 @03:56AM (#33296371)
FP languages are quite immune to that. Sure, you can probably do some stupid thing, but that likely never happens. At least that’s my experience with Clojure REPLs and Haskell’s GHCI.
Re:Clojure 15th Anniversary: A Retrospective by mjul on Saturday October 22, 2022 @04:22AM (#33296477)
Exactly. It ties to the excessive startup overhead. If you rename things and change stuff you must run the tests in a fresh JVM to ensure that everything has been evaluated in a consistent state rather ad hoc evaluation in the REPL. This means running from the command line in addition to your REPL or restarting the REPL regularly.
Re:Clojure 15th Anniversary: A Retrospective by frou_dh on Saturday October 22, 2022 @04:55AM (#33296626)
I don't know - the kind of programmer who's always worried about every what-if probably shouldn't choose any dynamic interactive language in the first place. There are plenty of language permutations out there for all sensibilities.
Re:Clojure 15th Anniversary: A Retrospective by synthc on Saturday October 22, 2022 @10:04AM (#33298406)
But programmers should be worried about every what-if scenario, regardless of language.
Re:Clojure 15th Anniversary: A Retrospective by funstuff007 on Saturday October 22, 2022 @06:17PM (#33302701)
> worried about every what-if

I hear you about this, but during prototyping one cannot be excessively concerned with did I change the global state enough such that it's better to just start a new REPL (and have to worry about the associated costs)? And if you ask this question a lot, long running REPLs are not a good idea for development.

Re:Clojure 15th Anniversary: A Retrospective by synthc on Sunday October 23, 2022 @03:09AM (#33305174)
for prototyping a long running repl is fine.

For validation/testing starting with a clean slate takes away a lot of my worries.

Re:Clojure 15th Anniversary: A Retrospective by CraigJPerry on Saturday October 22, 2022 @07:33AM (#33297396)
There’s a tool called Clerk which among other things resolves this concern about out of sync definitions https://github.com/nextjournal/clerk