Fork me on GitHub
#babashka
<
2020-10-21
>
jvtrigueros01:10:52

Hi, I'm attempting to create an uberscript, but when I execute the final file I'm getting this error:

line 1: ns: command not found
....
I'm creating this uberscript with this command BABASHKA_CLASSPATH=$(lein with-profile -dev classpath) bb -f src/demo/main.clj -m demo.main --uberscript demo.clj On the resulting demo.clj file, I see the main.clj source and appended there's another line of code added. I'm thinking that I'm using this command incorrectly, but I wasn't able to find any example.

jvtrigueros01:10:41

Ok this turned out being user error. I forgot to add the #!/usr/bin/env bb to the top of the file before executing it 😛

borkdude19:10:12

babashka v0.2.3 released! https://github.com/borkdude/babashka/blob/master/CHANGELOG.md#v023-2020-10-21 Featuring babashka/process: a new Clojure library around dealing with java.lang.Process and many other additions and fixes.

3
Santiago20:10:31

do I need to do something else before using pods? bootleg and clj-kondo works fine

> (pods/load-pod "pod-babashka-hsqldb")
> java.io.IOException: Cannot run program "pod-babashka-hsqldb": error=2, No such file or directory [at <repl>:5:1]

borkdude20:10:48

This assumes you have pod-babashka-hsqldb on your path.

borkdude20:10:05

@UFPEDL1LY If used from the local dir, you need to prepend it with "./" like on the command line

Santiago20:10:17

ah I get it.. thought I had installed it with brew but didn’t. thanks

borkdude21:10:10

btw about the aws pod: it uses the Go SDK under the hood so maybe you can find it in their docs

Santiago21:10:05

you’re everywhere @U04V15CAJ 😄 yeah looking at them now

isak21:10:56

Is it possible to change the default print method used by babashka? (How last form in the script is printed). For example, I'd like to try rendering it to the console with indenting + colors with puget.

borkdude21:10:49

currently that's not configurable

borkdude22:10:03

unless you print yourself and return nil

isak22:10:06

Not sure if this is a good idea, but what about auto pprinting in some instances, like when connected to a terminal?