Fork me on GitHub
#babashka
<
2020-07-07
>
Crispin01:07:19

Hope its uploaded later. 2am my time so won't be able to tune in.

sogaiu04:07:47

yes, an upload would be great!

Felipe Cortez19:07:34

is there a way to pipe edn to a babashka repl? something like curl ... | jet --from json --to edn | bb which starts a repl I can then use to explore the data structure

borkdude20:07:59

@clojurians884 Not in this way, because piping stdin to a REPL will just execute that input in the REPL:

$ echo '(+ 1 2 3)' | bb
Babashka v0.1.3 REPL.
Use :repl/quit or :repl/exit to quit the REPL.
Clojure rocks, Bash reaches.

user=> 6

borkdude20:07:42

in a REPL stdin is used for user input, so you cannot have both EDN input and user input at the same time

borkdude20:07:21

However, you can maybe shell out to curl + jet from within the REPL. But a better option is probably to use babashka.curl + cheshire in the REPL

Felipe Cortez20:07:28

got it! thanks 🙂