babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
Schpaa 2020-10-27T15:38:19.104400Z

Is there an easy method of using your own modules in baba? Say I just wanted to extract some functions, already written, and use them in several scripts…

Schpaa 2020-10-27T15:38:44.104800Z

(like I would use include files in C, for instance)

borkdude 2020-10-27T15:41:34.106500Z

@schpaencoder Sure. You can make libraries like you would with clj and then add them to your classpath with export BABASHKA_CLASSPATH=$(clojure -Spath ...) You can use github repositories as dependencies with clojure. Another option is to just add your utilities to the classpath with export BABASHKA_CLASSPATH=/home/foobar/babashka_libs for example

Schpaa 2020-10-27T15:43:43.107100Z

Does the last option require me to create .jar-files or will plain source.clj do?

borkdude 2020-10-27T15:44:12.107600Z

@schpaencoder It doesn't require you to make .jar files. You can use any directory on the classpath.

Schpaa 2020-10-27T15:44:24.107900Z

Oh, what a relief!

Schpaa 2020-10-27T15:44:29.108100Z

Thanks!

borkdude 2020-10-27T15:44:49.108600Z

It does follow the convention of clojure in that foo-bar.baz searches for /foo_bar/baz.clj

Schpaa 2020-10-27T15:44:59.108800Z

right

Schpaa 2020-10-27T15:45:19.109100Z

thank you again, you just saved me some gray hair

borkdude 2020-10-27T15:45:27.109300Z

:thumbsup:

borkdude 2020-10-27T15:47:11.109900Z

@schpaencoder The docs for classpath are here: https://github.com/borkdude/babashka#classpath

Schpaa 2020-10-27T15:49:23.110500Z

indeed, I can do this!

Schpaa 2020-10-27T15:54:13.111100Z

I think that the BABASHKA_PRELOADS was the feature I really was looking for

borkdude 2020-10-27T15:55:16.111400Z

yeah, you can also use that