Fork me on GitHub

Who'da thought: just tried bb 0.0.81 on Windows 10 and babashka.curl worked out of the box!

C:\Users\borkdude\Downloads>bb -e "(:status (curl/get """"))"

😎 24

I didn't even know Windows shipped with curl these days


nice that it works -- i think we discussed that windows had curl a bit back though 🙂


so going with curl seems to be a really good choice then, cross-platform


yes, that is true


Thanks for adding shutdown hooks! I have a script that launches a repl using clojure and when I hit ctrl-c the jvm process would run away with an io error. Adding a shutdown hook to kill the jvm process works like a charm.


good to hear!

👍 4

I ran into a problem with babashka.curl, the header parsing from the same stream as the effective response sometimes leads to problems. That's why it's now moved to dumping to a tempfile and then parsing that. But curl won't write the header file before you start reading the input stream. It basically waits for you to consume it and then starts the request it seems. That's why I did this: But maybe that can be improved. It feels like a stupid workaround.

👍 4

Hmm, the issue is course that you don't know when curl is done writing that file. So maybe this is the correct way, because if you can consume the first byte, the headers must already be there.


has somebody here connected Cursive REPL to babaskha? I tried with nrepl, but that generates tons of errors, and with socket repl the connection doesn’t start, so I wonder if someone figure how to make this integration works


@wilkerlucio It might help starting it with BABASHKA_DEV=true bb --nrepl-server to see what messages it receives


I've heard reports from vim-iced and Calva that the nREPL server works for them and I've tested CIDER and lein repl :connect myself


The socket repl is pretty simple so I'm surprised that doesn't work, but maybe Cursive assumes something about bb that it doesn't have


I was doing some googling, I got to make it work using:


this thread explains why it doesn’t work with socket connection in Cursive out of the box:!msg/cursive/GfbTm-Tut4M/r2VRlaCsBAAJ


That's a nice link to put in the README maybe

👍 4