This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-11
Channels
- # babashka (13)
- # beginners (17)
- # bristol-clojurians (1)
- # calva (23)
- # cider (5)
- # clj-kondo (32)
- # cljsrn (2)
- # clojure (167)
- # clojure-dev (23)
- # clojure-europe (6)
- # clojure-uk (8)
- # clojurescript (5)
- # cursive (7)
- # datomic (12)
- # emacs (4)
- # events (6)
- # fulcro (2)
- # graalvm (1)
- # interop (10)
- # leiningen (8)
- # local-first-clojure (1)
- # luminus (2)
- # meander (36)
- # planck (3)
- # re-frame (3)
- # reagent (3)
- # sci (2)
- # spacemacs (4)
- # sql (1)
- # test-check (6)
- # tools-deps (22)
- # xtdb (75)
what is a tools.depsy way of starting (--interactive) REPL-y
connected to nrepl?
:repl {:extra-deps {nrepl {:mvn/version "0.7.0"}
reply {:mvn/version "0.4.4"}}
:main-opts ["-e" "(require,'[reply.main]),(defn,reply,[_,port,_],(reply.main/launch-nrepl,{:attach,(str,\"127.0.0.1:\",port)})),(ns,user)"
"-m" "nrepl.cmdline" "-i" "-f" "user/reply"]}}
this works (ish), but feels complex + does not exit nrepl once REPL-y is done (ctrl c / ctrl d)I have this:
{:extra-deps {reply {:mvn/version "0.4.4"}}
:main-opts ["-m" "reply.main" "--attach" "1337"]}
I think, for simplicity's sake, I'd be inclined to use two separate aliases: one to start an nREPL server (and leave it running in a window, or run it in the background), and a second alias to start REPL-y connected to that background process.
I can understand wanting a single command, but I'd probably write a small shell script that just ran two clojure
commands if it proved too annoying to run those two commands manually.
@seancorfield definitely a possibility, but if I work with several (different) apps that's a twofold repl things to run and exit from
I am just looking for "lein repl" / "boot repl" repl-y
like experience with deps.edn
Hmm, I never type into a REPL so I only care what my editor integration does. Why do you need REPL-y, specifically @tolitius?
it's connected to vi where I "finalize" my thoughts after I am done thinking in repl
I "think" in a "Rich Comment Form" in my editor -- like Stu Halloway talks about in some of his presos
yea, a lot of Clojure devs use an integrated playground to "think" that is just connected to nrepl that runs in the background. I like terminals, terminal repl works best for me since I am focused on small fragments of code at a time.
with REPL-y
this experience is simple, so I am just looking to get there with deps.edn
which I did get with an above alias
but it rather feels off + does not exit the nrepl on ctrl c/d
I think you're stuck with the complex/almost-works invocation for now. I'll have a think about it on and off and come back if I figure out anything better.
yea, nothing urgent, I was just wondering whether I am missing something obvious, i.e. a flag, an option, etc..
(I don't use nREPL at all so it'll be a fun experiment/diversion)
@tolitius Hey 😉 I am using https://github.com/bhauman/rebel-readline For your exact use case and I found some problems with multi-line expressions sometimes, I am pretty happy with it. I have two aliases I can share (the second is for cljs) not in front of the keyboard now though. Will sent them soon.