This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-26
Channels
- # announcements (19)
- # babashka (27)
- # beginners (24)
- # calva (14)
- # clerk (5)
- # clj-commons (21)
- # clojure (51)
- # clojure-europe (14)
- # clojure-madison (1)
- # clojure-nl (1)
- # clojure-norway (9)
- # clojure-uk (4)
- # clojuredesign-podcast (32)
- # core-async (14)
- # datomic (7)
- # events (1)
- # honeysql (3)
- # hyperfiddle (14)
- # introduce-yourself (2)
- # kaocha (7)
- # malli (21)
- # off-topic (50)
- # portal (2)
- # reagent (41)
- # reitit (41)
- # releases (1)
- # scittle (6)
- # shadow-cljs (90)
- # tools-deps (10)
- # xtdb (1)
- # yamlscript (1)
Hi, I have a noob question. Is it possible to load arbitrary JAR files in Babashka classpath? Specifically, I am trying to use https://github.com/pgvector/pgvector-java
Thanks
I've been wondering how to package yamlscript for nixos. A few people have been asking for it. I don't use nix or know much about it. This weekend I talked to a friend who loves nix. I had the idea, let's see is babashka has a "flake". Of course it did. I saw that it builds from a released babashka jar file. I got feedback that it would be better if built from sources. I said that was likely hard to do but that I would ask here. Can you talk a bit about the experience of creating this flake and why it's done this way?
I see
If bb pods were fully developed early on in the bb lifetime, would you have built-in less libs? (I just found out about pods this morning (very exciting) so forgive me if the question doesn't make sense)
I'm not sure if I would have left out any. Perhaps clojure.data.csv since that works from source as well. tools.cli works from source also, maybe some others. I had my doubts about transit and YAML since you can do that with a pod as well, but pods do have their downsizes as well (it's another binary to download and to maintain)
thanks
This might be folly: I have this annoying workflow where I have to run a script then do one thing in a browser. Is it reasonable to try to open a browser from a command line invocation of a babashka script?
https://github.com/clj-commons/etaoin is bb-compatible, so I don’t see why not
re Pods. I'd like to add support for using pods from my project.
Looking at https://github.com/babashka/babashka/blob/master/src/babashka/impl/pods.clj#L1-L8
Noob question but can I dep on babashka.impl.pods
babashka.impl.common
and babashka.pods.sci
?
Would I just dep on babashka/babashka "1.3.189"
?
you would dep on https://github.com/babashka/pods
.impl namespaces are not a public API and subject to change. it's fine to look at those for example and copying though
so in short: do not depend on babashka to use those .impl namespaces, please don't. just use babashka.pods(.sci) (public)
That's why I asked. 🙂
I actually started by adding the babashka.pods
ns to my SCI context,
I get this:
$ YS --clj -e '(println babashka.pods/load-pod)'
#object[babashka.pods$load_pod 0x4c51077d babashka.pods$load_pod@4c51077d]
$ YS --clj -e "(require '[babashka.pods :as pods])" -e "(pods/load-pod 'org.babashka/go-sqlite3 \"0.1.0\")" -c
(require '[babashka.pods :as pods])
(pods/load-pod 'org.babashka/go-sqlite3 "0.1.0")
$ YS --clj -e "(require '[babashka.pods :as pods])" -p
nil
$ YS --clj -e "(require '[babashka.pods :as pods])" -e "(pods/load-pod 'org.babashka/go-sqlite3 \"0.1.0\")"
--- hangs for at least 30 seconds before I kill it ---
Any idea why it hangs?
--clj
means just use Clojure code.
I ran the above code in bb without problems
Hard to say what's happening unless you can make (the tiniest possible) repro. Might also be helpful to look at the test suite of babashka.pods
can you tell me the url for the test suite?
I can try to make a tiny repro
@U04V15CAJ Here you go https://github.com/babashka/pods/issues/70 Links to a minimal repro of the problems I encountered...