Fork me on GitHub
#babashka
<
2020-12-27
>
nate03:12:48

oh man, I used https://github.com/weavejester/progrock for the first time and it's amazing how nice it is to have a progress bar in my scripts (script is binning picture files into directories by year/month):

$ bin-pics
inspecting 253 files...
253/253   100% [==================================================]  ETA: 00:00
copying 221 images...
221/221   100% [==================================================]  ETA: 00:00

đź‘Ť 9
🎉 9
Roman Tsopin15:12:53

Hey, I’m trying to build a toy static site generator with bb and hooking up selmer with deps/add-deps but got error “couldn’t resolve symbol thread-bound?” Is there any workaround?

borkdude15:12:22

@romantsopin Not all libraries are compatible with babashka. I think your best bet in using selmer is via bootleg as a pod: https://github.com/retrogradeorbit/bootleg#babashka-pod-usage

Roman Tsopin15:12:37

Yea, I thought it’s quite common, so there should be a simple way :) thank you!

borkdude15:12:56

Please do report incompatibilities with clojure, such as the one you have encountered and they may get fixed in the new release

borkdude15:12:39

A peek of what is coming in 0.2.6: https://book.babashka.org/master.html#_pod_registry This should work with babashka master (available on #babashka_circleci_builds)

David Pham16:12:36

This is great, and the example is also one of the most featured request haha

borkdude15:12:01

Btw, comb is a templating library that does work with bb: https://github.com/borkdude/babashka/blob/master/doc/projects.md#comb

đź‘Ť 3
Roman Tsopin15:12:16

That’s what I’m looking for!

borkdude15:12:39

(require '[babashka.deps :as deps])

(deps/add-deps '{:deps {comb/comb {:mvn/version "0.1.1"}}})

(require '[comb.template :as template])

(template/eval "<% (dotimes [x 3] %>foo<% ) %>")
^ @romantsopin

Roman Tsopin16:12:39

Also another question, maybe there is a common way to watch directory and run a command on change? Something similar to hawk (which seems like incompatible)

Roman Tsopin16:12:38

Great, will try it out

borkdude16:12:02

I'm using it to preview the babashka documentation while writing: https://github.com/babashka/book/blob/master/script/watch.clj

borkdude16:12:49

We are working on making pods installable from a central pod registry from within bb itself, it will take a few days. For now install via brew if you're on linux or macos or download manually