does bb socket-repl serve nREPL?
ah, it's nrepl-server
lein repl and gloat --repl and let-go start a nrepl server then connect a client to it. They also can both connect to each other that way. let-go's repl client can't yet connect to a nrepl server. but gloat can connect to the nrepl server that let-go's client starts.
I can't see how bb the client can connect to a server.
you can connect to an nREPL server by sending bencode to it and implementing the nREPL protocol. a little bit of that is done here for a programmatic invocation: https://github.com/babashka/nrepl-client clojure-mcp-lite also has a bb script that connects to an nREPL server to eval stuff. https://github.com/bhauman/clojure-mcp-light the normal bb repl is just a console REPL, similar to how clj does it. no nREPL needed to self-connect to.
what is socket-repl for?
it implements a socket REPL just like clojure has
https://clojure.org/reference/repl_and_main#_launching_a_socket_server
gonna get some sleep now, will reply more later
bb (& lein & gloat & let-go) can start a server, and lein & gloat (& calva & etc clients) can connect to that server. It seems like it would be nice if the bb CLI could do the same (be a client).
The socket repl is my preferred connection type. Very straightforward
@dpsutton gloat --srepl creates a socket repl.
Also gloat --repl=+bb (or +clj or +lein or +let-go) starts an nrepl server for that program and connects a Gloat repl CLI client to it (a gloat --repl)
This means you can get all the Gloat CLI REPL Features (https://gloathub.org/doc/gloat-repl/#feature-comparison) for bb or the others.