This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-13
Channels
- # aleph (3)
- # announcements (2)
- # babashka (15)
- # beginners (84)
- # biff (28)
- # calva (2)
- # cherry (1)
- # clj-kondo (24)
- # clojure (69)
- # clojure-austin (35)
- # clojure-brasil (7)
- # clojure-conj (2)
- # clojure-europe (83)
- # clojure-losangeles (1)
- # clojure-nl (1)
- # clojure-norway (13)
- # clojure-portugal (5)
- # clojure-turkiye (2)
- # clojurescript (25)
- # css (4)
- # cursive (11)
- # data-science (26)
- # datahike (4)
- # datalevin (2)
- # emacs (19)
- # gratitude (1)
- # honeysql (1)
- # hyperfiddle (45)
- # introduce-yourself (5)
- # lsp (53)
- # malli (8)
- # mid-cities-meetup (1)
- # nrepl (19)
- # pathom (23)
- # practicalli (2)
- # proletarian (1)
- # rdf (2)
- # reagent (28)
- # releases (4)
- # shadow-cljs (11)
- # sql (13)
- # uncomplicate (6)
- # vim (7)
- # xtdb (3)
I think it could partly be because there is seldom much reason to use those utilities directly when in an environment like CIDER. To me, I seldom spend much time in the user
namespace so having the utilities available only there wouldn’t bring me much joy. Anyway, I implemented the same default in Calva now. It could get weird with some namespaces to have it always happen. https://clojurians.slack.com/archives/CBE668G4R/p1681337488164959
Indeed. When add-lib
is part of Clojure I guess CIDER and Calva will just provide wrappers for working with it, so I doubt many people will have to use it directly in the REPL.
one common style of working is to leave your interactive repl in user but eval from the editor most of the time - I do that in Cursive and Calva
Some people actually work entirely in user, but I'm not sure that's very common :)
I use jack-in
The interactive REPL is the output/repl window? I can’t make that stay in user as I evaluate things in various files. What am I missing here? 😃
this is the peril of using multiple editors all the time
So, essentially, Calva makes that workflow impossible, because of the convenience of helping you switch namespace. I wonder if we should fix that…
I'm not asking for anything :)
Not saying you are. It is more that I just became aware of a workflow I have shut down. 😃 Not that I think Calva needs to support all workflows, and this one is supported if you start an interactive REPL in a terminal and connect to it. Jack-in is convenience, after all. But anyway, I prefer to take such decisions consciously.
So if I understand correctly, when you eval in a REPL from an editor, does Calva switch the ns for that REPL before evaluating? Cursive binds *ns*
dynamically for the scope of the eval, so only the single form sent from the editor is in that ns, and the REPL stays where the user left it.
Yes. Calva switches the ns of the REPL. It has not always done this, but at some point that was what most people did manually anyway.
I think in Calva it mostly doesn’t matter. Users don’t fiddle around at the REPL prompt much. Once I get around to replace the prompt with a web view I think it’ll open up for other ways to make it clear in which ns something was evaluated and we can switch back to letting the prompt stay in whatever ns the user left it.