This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-18
Channels
- # announcements (2)
- # babashka (35)
- # beginners (59)
- # calva (17)
- # cider (3)
- # clerk (7)
- # clj-kondo (21)
- # cljfx (9)
- # cljs-dev (76)
- # clojure (98)
- # clojure-austin (3)
- # clojure-brasil (1)
- # clojure-europe (11)
- # clojure-gamedev (4)
- # clojurescript (14)
- # consulting (7)
- # cursive (6)
- # datascript (4)
- # datomic (12)
- # emacs (18)
- # events (2)
- # graalvm (9)
- # humbleui (3)
- # hyperfiddle (18)
- # jobs (4)
- # missionary (12)
- # nextjournal (2)
- # nrepl (7)
- # off-topic (31)
- # practicalli (2)
- # rdf (6)
- # releases (2)
- # scittle (10)
- # xtdb (9)
workflow question, has anyone found a nice way to manage clj & cljs repls? eg., some way to evaluate forms and have them automatically handled by the right REPL. it always feels tedious mousing around and prevents me from using the REPL as much as I’d like in apps that mix back- and front-end
No, there isn’t at the moment, but it is annoying and I’m open to feedback about how that might work. The issue is that Cursive allows multiple open REPLs, each of which can be for any dialect. Sometimes it might be clear which should be used (i.e. you execute some CLJS code and only one of your open REPLs is CLJS, or you have two CLJS REPLs and only one of them was run with the module of the code in scope), but sometimes it’s not. Something like an indicator is probably required to say CLJ code should go here and CLJS code there, but that’s too simplistic as well - I often have a REPL running my tests, and a REPL open on a debug version of IntelliJ, both CLJ and both started from the same scope. I’m not sure how to do this in a non-annoying way.
what about.. 1. if the current REPL supports the dialect, use it 2. otherwise use the most recently active REPL that supports the dialect
that would preserve the current behaviour which is “click on the REPL you want to use, to use it” but also fallback to a likely-useful default
I’m not sure how confusing “last compatible (by whatever criteria) REPL wins” would be. I think that might be a possible option, but I think it would also need some deterministic selection tool too, such that a user could say “I want all CLJ code to go here and all CLJS code to go there”. But it also gets mixed up with the concept of the scope, e.g. for the Cursive website I have a CLJS backend and frontend, so the selection criteria would also have to include the source of the code being sent. I’m not sure what the UI would look like for that.