This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-27
Channels
- # aws-lambda (2)
- # babashka (22)
- # beginners (188)
- # calva (24)
- # cider (16)
- # clj-kondo (2)
- # cljfx (5)
- # clojars (15)
- # clojure (146)
- # clojure-czech (1)
- # clojure-europe (10)
- # clojure-france (3)
- # clojure-provo (1)
- # clojure-sweden (8)
- # clojure-uk (6)
- # clojurescript (28)
- # conjure (3)
- # core-logic (1)
- # cursive (13)
- # datahike (2)
- # datomic (18)
- # defnpodcast (2)
- # figwheel-main (2)
- # fulcro (1)
- # honeysql (4)
- # hoplon (21)
- # jobs (3)
- # jobs-rus (1)
- # kaocha (5)
- # off-topic (49)
- # pathom (86)
- # reagent (4)
- # remote-jobs (2)
- # ring (4)
- # schema (1)
- # shadow-cljs (40)
- # spacemacs (12)
- # sql (20)
- # startup-in-a-month (30)
- # xtdb (19)
I came across https://practicalli.github.io/clojure/clojure-tools/data-browsers/ using data browsers inside a clojure project. I was wondering if this also would be possible when using BB?
It should be possible: From here: https://practicalli.github.io/clojure/clojure-tools/data-browsers/reveal.html > Use Reveal with https://practicalli.github.io/clojure/clojure-tools/data-browsers/reveal.html#using-reveal-in-a-terminal, a https://practicalli.github.io/clojure/clojure-tools/data-browsers/reveal.html#using-reveal-with-nrepl-editors, such as Emacs Cider and Spacemacs. Reveal can be added as a tap source to any running REPL, eg. using https://practicalli.github.io/clojure/clojure-tools/data-browsers/reveal.html#using-reveal-with-rebel-and-tap. And here: https://book.babashka.org/#repl
@marco.pasopas Try portal:
(require '[babashka.deps :as deps])
(deps/add-deps '{:deps {djblue/portal {:mvn/version "0.9.0"}}})
(require '[portal.api :as p])
(.addShutdownHook (Runtime/getRuntime)
(Thread. (fn [] (p/close))))
(p/open)
(p/tap)
(tap> [1 2 3])
@(promise)
@djblue Is the shutdown hook still needed or is this included by portal itself now? ^
You can also do this "one-liner" to view e.g. an EDN file:
$ cat deps.edn | bb -e "(babashka.deps/add-deps '{:deps {djblue/portal {:mvn/version \"0.9.0\"}}})" \
-e "(require 'portal.main)" \
-e "(portal.main/-main \"edn\")"
@jayzawrotny Now release 0.0.2 with static linux versions: https://github.com/babashka/babashka-sql-pods/releases/tag/v0.0.2
Out of curiosity would it have been possible to uberjar the jdbc + postgresql driver? When should a pod be chosen over creating an uberjar?
@jayzawrotny babashka doesn't run a JVM so just a postgres driver doesn't work.
I see so the pod is a specific package written for babashka where as an uberjar is suited for cross-platform or already babashka friendly code?
a pod can be written in any language, as long as it offers the API in a certain format. a pod is basically another CLI that acts as a service