nbb 2023-01-11

hello, I'm trying to connect a REPL to nbb via Cursive, does anything has a working path to make it happen?

šŸ‘‹ 1

but still, it never finishes the connection, tried both socket repl and nrepl

Please make this known to Colin. Several people have been asking for nbb support in Cursive but there's nothing I can do. nbb nREPL works with emacs, calva, vim, etc.

thanks @borkdude, nudging there šŸ™‚

I’m seeing a somewhat odd difference of behaviour between nbb file.cljs and nbb -e:

filipesilva@Filipes-MBP ~/L/M/i/D/p/babashka (master)> nbb -e '(println "hello")\n"world"'
hello
"world"
filipesilva@Filipes-MBP ~/L/M/i/D/p/babashka (master)> cat codeblock.cljs
(println "hello")
"world"āŽ
filipesilva@Filipes-MBP ~/L/M/i/D/p/babashka (master)> nbb codeblock.cljs
hello
filipesilva@Filipes-MBP ~/L/M/i/D/p/babashka (master)>

This is the same behavior as clojure

-e prints the value, but executing a file doesn't

bb will print the value when executing the file though

filipesilva@Filipes-MBP ~/L/M/i/D/p/babashka (master)> bb -e '(println "hello")\n"world"'
hello
"world"
filipesilva@Filipes-MBP ~/L/M/i/D/p/babashka (master)> cat codeblock.clj
(println "hello")
"world"
filipesilva@Filipes-MBP ~/L/M/i/D/p/babashka (master)> bb codeblock.clj
hello
"world"
filipesilva@Filipes-MBP ~/L/M/i/D/p/babashka (master)>

yes, bb has had the "different" printing behavior but it wasn't changed because it would be breaking

I see what you mean with clj

filipesilva@Filipes-MBP ~/L/M/i/D/p/babashka (master)> clj codeblock.clj
WARNING: Implicit use of clojure.main with options is deprecated, use -M
hello

thank you for explaning this to me šŸ™

no problem :)