Fork me on GitHub
#babashka
<
2020-12-25
>
borkdude08:12:23

apparently you can also def a map in project.clj?

borkdude08:12:57

wow this works:

(def project '{:version "0.0.1"
               :dependencies [[org.clojure/clojure "1.10.2-rc1"]]})

😮 1
borkdude20:12:40

Playing around with a pod resolver (downloads a pod if it's not downloaded yet). Example:

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

;; this will download the hsqldb pod, takes a while the first time, fast the second time
(pods/load-pod 'org.babashka/pod-babashka-hsqldb)

(require '[pod.babashka.hsqldb :as db])

(def db "jdbc:hsqldb:mem:testdb;sql.syntax_mys=true")

(db/execute! db ["create table foo ( foo int );"])

(db/execute! db ["insert into foo values (1, 2, 3);"])

(db/execute! db ["select * from foo;"])
The above example should work with: - linux version: https://13945-201467090-gh.circle-artifacts.com/0/release/babashka-0.2.6-SNAPSHOT-linux-amd64.zip - macos version: https://13944-201467090-gh.circle-artifacts.com/0/release/babashka-0.2.6-SNAPSHOT-macos-amd64.zip (windows TODO, should work, but the pod doesn't have a Windows version)

🎉 8
borkdude20:12:35

(merry xmas btw!)

🎄 6
👍 1