This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # alda (1)
- # announcements (18)
- # babashka (132)
- # beginners (110)
- # calva (17)
- # cider (53)
- # clara (18)
- # clj-kondo (35)
- # cljdoc (6)
- # clojure (152)
- # clojure-europe (9)
- # clojure-portugal (4)
- # clojure-spec (20)
- # clojure-survey (7)
- # clojure-sweden (10)
- # clojure-uk (10)
- # clojured (1)
- # clojurescript (29)
- # core-async (7)
- # cursive (4)
- # datomic (11)
- # defnpodcast (2)
- # dirac (1)
- # emacs (13)
- # events (2)
- # figwheel-main (1)
- # fulcro (1)
- # jobs (14)
- # jobs-discuss (17)
- # leiningen (2)
- # malli (1)
- # off-topic (74)
- # overtone (1)
- # pedestal (4)
- # planck (2)
- # re-frame (7)
- # reitit (4)
- # remote-jobs (4)
- # shadow-cljs (78)
- # slack-help (3)
- # spacemacs (56)
- # test-check (3)
- # tools-deps (8)
Now removed the reliance on any private sun or Unix-specific class by applying a trick: https://github.com/borkdude/babashka/blob/2b0cb6fb1cf2f86a9bdf22dd6b954a35ec1be21f/src/babashka/impl/classes.clj#L178 Reflection happens on the public class and that seems to work
this is the jdk11 branch, right? seems to have worked here :thumbsup: got to hear my fans spin up
may be you saw that https://github.com/oracle/graal/issues/2015#event-2928406659 was labeled as a bug within the last day?
Curious about this line in the rationale of
> This offers an arguably easier way to get going with deps.edn based projects in CI. Just download an installer script, execute it with bash or Powershell and you’re set. Installer scripts are provided for linux, macOS and Windows.
Isn’t that essentially the same installation process as tools.deps?
First successful linux build of babashka on JDK11. Binary for the grabbing in #babashka_circleci_builds !
Is there a way to retrieve the path from the code of the current file that is being executed? E.g. in
bb src/path/foo.bb I would like to get the value
Is this on purpose?
user=> (.getName *ns*) Method getName on class sci.impl.vars.SciNamespace not allowed! [at line , column ]
In case you are interested, I'm trying to build a script in babashka that can delegate to clojure when needed:
(defn handle-in-clj [msg cli-args] (println msg) ;; TODO stream output with ProcessBuilder instead #_(def ws (-> (ProcessBuilder. (into ["clj"] args)) (.start))) (let [cmd (into ["clj" *file*] (map str) cli-args) ; _ (prn "CMD" cmd) p (apply clojure.java.shell/sh cmd)] (exit (:exit p) (if (zero? (:exit p)) (:out p) (if (clojure.string/blank? (:err p)) (:out p) (:err p)))))) (defmacro delegate-to-clj [& body] #?(:bb `(handle-in-clj "Delegating to clj" *args*) :clj `(do [email protected])))
For simple scripts you have the benefit of minimal boot time. For things that require clojure you can already do some input validation before starting the heavy process and saving you time in case of errors. All without having to think about it 😎
spartan.test, a test lib that can be used with bb, now has
Some progress made on adding clojure.data.xml. Feel free to read+test: https://github.com/borkdude/babashka/issues/153
Seems it also works with 11.0.5:
[email protected]:/tmp$ ./bb Babashka v0.0.61-SNAPSHOT REPL. user=> (require '[clojure.data.xml :as xml]) nil user=> (let [xml (xml/parse-str "<items><item>1</item><item>2</item></items>")] (xml/emit-str xml)) "<?xml version=\"1.0\" encoding=\"UTF-8\"?><items><item>1</item><item>2</item></items>" user=> (System/getProperty "java.version") "11.0.5"
I'm always a bit wary of making choices of what should go into babashka. E.g. should I have added clojure.data.json instead of cheshire.core since I already have the other clojure.* stuff? Should I remove core.async because nobody is using it? What will happen to the binary size in the long run?
one of my selling points to coworkers is "you can do/fetch things in parallel in a way that's not completely ridiculous like in bash"
I'm not sure how much binary size matters to people. Does only the download size matter, or also the extracted size? What's still acceptable?
Anyway. Adding clojure.data.xml seems like a good idea, but I'd like to hear if it's not 🙂
now we just need something like this for babashka, pick your own libraries https://jqueryui.com/download/
the only way to make that work currently is to let users enable the libraries via some UI and circleci will build it
and if someone already has chosen the exact combination of libs before, you will just get the already compiled version immediately
yeah, I don't think that's going to work. I think it has to be curated manually somehow
there could be a branch where people could PR their new favorite library bindings and some config so this UI knows how to enable it
but if people really want their personal libs in bb, they might as well just fork it
if we finally release an api for http://nextjournal.com notebooks we could build it there
@mkvlr what memory / CPU / resource restrictions do you have in nextjournal for free / OSS use?
@mkvlr in babashka.main.clj there is a map which determines which namespaces are included. dissoc-ing that map would already have an effect of which libs are left out
I think graalvm is clever enough to see that it should leave out the libs from the compiled artifact if you dissoc them
but in the end I would do this via some edn config file probably that is read at build time
ok, so we want to allow to pass in the whole map via edn or how do you envision the api?
Syntax error (ClassNotFoundException) compiling at (babashka/impl/classes.clj:188:16). java.lang.UNIXProcess$ProcessPipeOutputStream
there is no mention anymore of UnixProcess classes, removed that today, so I can't explain that error. Can you show the git sha?
Execution error (FileNotFoundException) at babashka.impl.clojure.core.server/loading (server.clj:12). Could not locate sci/core__init.class, sci/core.clj or sci/core.cljc on classpath.
ah you need to check out recursively. https://github.com/borkdude/babashka/blob/master/doc/dev.md