This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-17
Channels
- # adventofcode (56)
- # announcements (1)
- # aws (6)
- # beginners (127)
- # bristol-clojurians (1)
- # calva (29)
- # cider (7)
- # clj-kondo (37)
- # cljdoc (20)
- # cljsrn (7)
- # clojure (159)
- # clojure-europe (67)
- # clojure-italy (23)
- # clojure-nl (4)
- # clojure-provo (3)
- # clojure-uk (18)
- # clojurescript (19)
- # code-reviews (59)
- # community-development (105)
- # conjure (6)
- # core-async (16)
- # core-logic (1)
- # cursive (21)
- # datomic (19)
- # defnpodcast (1)
- # emacs (8)
- # events (2)
- # fulcro (71)
- # graalvm (23)
- # jobs-discuss (1)
- # kaocha (5)
- # luminus (5)
- # meander (16)
- # nrepl (32)
- # off-topic (6)
- # pathom (159)
- # pedestal (3)
- # reagent (14)
- # reitit (8)
- # reveal (12)
- # rewrite-clj (9)
- # shadow-cljs (169)
- # spacemacs (16)
- # specter (2)
- # sql (19)
- # tools-deps (36)
- # vim (6)
👋 Does anyone know of a stand-alone nREPL client with similar featureset to REPL-y but with fewer/smaller dependencies? Ideally no JVM Readline and tab complete would be the main things I’m after
there is https://github.com/eraserhd/rep. i've never tried it, so i can't speak to what features it has, but maybe it fits the bill
the scenario is i’ve got some tools we’re bundling into a container that will include connecting to an nrepl server, and i’d like to avoid having to include a whole jvm in there if possible
@glenjamin it's possible to interact with an nREPL server from a bb script as well: https://book.babashka.org/#_interacting_with_an_nrepl_server
I'm using this on our CI to send commands to our production app, e.g. to clear caches
i suspect for now we’ll just bundle the usual lein repl
stack, we did briefly try a graal compile and quickly abandoned it
@glenjamin if you would like to do without lein:
clojure -Sdeps '{:deps {reply/reply {:mvn/version "0.4.4"}}}' -M -m reply.main --attach localhost:1667
cheers, we might try that, but i think once we’ve got the JVM in there then lein
isn’t much on top
@glenjamin There's a list of clients here: https://nrepl.org/nrepl/0.8/usage/clients.html#command-line-clients Not sure if any of them fit the bill.

@glenjamin I have some success with reply on GraalVM, working around some issues in complete.core, reflection etc, etc.
$ ./reply --attach localhost:52612
REPL-y 0.4.4, nREPL 0.6.0
Clojure 1.10.0
OpenJDK 64-Bit Server VM 11.0.8+10
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
user=> (+ 1 2 3)
ExecutionException java.io.FileNotFoundException: Could not locate reply/parsing__init.class, reply/parsing.clj or reply/parsing.cljc on classpath.
This could potentially work. I'm willing to take a bet that if nothing comes out of it, you owe me nothing, but if I get it working, I do want to get paid for the hours I'm going to put in it :)please don’t sink time into it on my account! This was only a “it’d be nice if my container was a few hundred MB smaller” idle thought
At least this works if I close the REPL:
$ ./reply --attach localhost:52612
ConnectException Connection refused (Connection refused)
$ ./reply --attach localhost:63307 <<< '(+ 1 2 3)'
REPL-y 0.4.4, nREPL 0.6.0
Clojure 1.10.0
OpenJDK 64-Bit Server VM 11.0.8+10
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
user=> (+ 1 2 3)
6
user=> Bye for now!
@glenjamin I just realized, I've been using CircleCI so much for my open source projects, I owe at least to publish this code, if you're interested.
One of the issues is that some of the work is done in futures on the top-level. This causes trouble. So I just copied the source and fixed some of that. Some reflection issues. Some other hacks. It basically works if you run script/compile
and set GRAALVM_HOME
to 20.3.0 java 11. I'll make a private repo (which contains the hacky code, not meant for open source consumption yet)
@glenjamin I invited you to the repo