Trouble connecting to Babashka socket repl with Cursive

I’m having trouble connecting to a Babashka socket repl with Cursive. I start the repl at the terminal with
bb --socket-repl 1666

In cursive I set up the repl configuration like this:

When I run that repl configuration in Cursive it gets stuck at “Connecting to remote Socket REPL…” forever.

Any ideas what’s going wrong and how I fix it? I’m using Cursive v1.9.0-2018.3

1 Like

Are you able to connect with rlwrap nc 127.0.0.1 1666 from the command line?

That works fine and gives me an interactive repl. What also works fine is if I start a regular clojure socket repl with
java -cp /Users/username/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar -Dclojure.server.repl="{:port 1666 :accept clojure.core.server/repl}" clojure.main

and then connect to that with Cursive.

Maybe Cursive tries to evaluate some expression that babashka doesn’t support yet? Can you seen an error log somewhere?

There’s no error log that I can see. Usually errors show up in the repl window itself. FWIW, I can’t connect to a joker socket repl either. I’ll post on the Cursive email list and ask if anyone’s been able to connect to babashka or joker repls. Thanks anyway for your help, and let me know if you have more ideas. And of course, thank you for creating Babashka, I’m having a lot of fun playing with it and it looks super useful for scripting.

1 Like

In case anyone else comes across this, you can connect Cursive to the Babashka repl using the mfikes’ tubular. Explanation on this thread:
https://groups.google.com/d/msg/cursive/GfbTm-Tut4M/r2VRlaCsBAAJ

1 Like

Hi @tobyloxy,

Chlorine 0.4.7, a socket REPL client for Atom, now added autocomplete for babashka. I had to add some functions in babashka 0.0.71 to make this possible. Maybe Cursive is also using these functions somehow? Might be worth another shot with the newest babashka.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.