This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-09
Channels
- # announcements (16)
- # babashka (28)
- # beginners (27)
- # calva (39)
- # chlorine-clover (6)
- # cider (8)
- # clara (28)
- # cljs-dev (19)
- # cljsrn (22)
- # clojure (78)
- # clojure-australia (3)
- # clojure-europe (64)
- # clojure-nl (3)
- # clojure-norway (14)
- # clojure-spec (2)
- # clojure-uk (11)
- # clojurescript (11)
- # core-async (24)
- # datomic (3)
- # deps-new (5)
- # emacs (9)
- # fulcro (4)
- # gis (2)
- # graalvm (9)
- # honeysql (2)
- # hoplon (5)
- # instaparse (1)
- # introduce-yourself (5)
- # jobs (5)
- # luminus (4)
- # observability (7)
- # off-topic (6)
- # pathom (18)
- # pedestal (5)
- # polylith (4)
- # re-frame (2)
- # reagent (1)
- # reitit (1)
- # remote-jobs (7)
- # shadow-cljs (47)
- # specter (1)
- # sql (27)
- # testing (6)
- # tools-deps (4)
- # vim (3)
- # xtdb (8)
Got slingshot working: https://github.com/babashka/babashka/blob/master/doc/projects.md#slingshot Also added its test suite to CI. Only one test is failing due to a difference how to records are implemented in bb, but it seems to be a corner case that is hopefully not used a lot (catching by record names). With some effort that may also be fixable. cc @scgilardi
Hi. I'm trying to find an example on how to print UTC datetime strings in ISO-8601 format. I can't find any reference to Java datetime libraries in babashka book. Can some provide any reference please?
Here is an example: https://github.com/babashka/babashka/blob/master/examples/pst.clj
I'm trying out babashka tasks, and I'm looking to re-use a babashka script that I was arleady using before tasks.
I'd like to create a task that calls this script, what's the preferred method for doing this?
* (shell "bb script.clj")
* (load-file "script.clj")
* other?
I've seen both of those approaches work. At first, I thought I should be require
'ing this script but idk how I would go about that.
@jvtrigueros load-file
is somewhat cheaper than invoking bb another time, but both should work. You could also add your script to the classpath e.g. by moving it to script/script.clj
and then adding "script"
to :paths
in your bb.edn
. Beware of side effects in your scripts in that case
I'll give that a shot! I'm currently using load-file, but using it as a library is what I'd prefer. Thank you!
Worked beautifully!
$ clojure -J-Dorg.eclipse.jetty.LEVEL=INFO
Clojure 1.10.3
user=> (System/getProperty "org.eclipse.jetty.LEVEL")
"INFO"
user=>
$ bb clojure -J-Dorg.eclipse.jetty.LEVEL=INFO
Unrecognized option: -
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Step away from keyboard, come back to answers, thanks @U04V15CAJ ๐
Pushed a fix. https://github.com/borkdude/deps.clj/issues/46 Which OS are you using? I can provide you with a new binary until the new release
@U9E8C7QRJ Released 0.4.5 with the fix now
I'm wrapping up my first real project, and the only thing left is that I'm invoking my main function incorrectly. (Details in ๐งต)
$ pwd
/Users/tomhenderson/lg/logicgate/docker-new/scripts/e2e/dd-junit
$ tree -L 3
.
โโโ bb.edn
โโโ repl
โย ย โโโ individual_failures.clj
โย ย โโโ playground.clj
โโโ src
โโโ dd-junit
โโโ core.clj
โโโ datafy.clj
โโโ statsd_client.clj
$ cat bb.edn
{:paths ["src/dd-junit", "repl"]}
$ cat src/dd-junit/core.clj
(ns dd-junit.core
(:require [dd-junit.statsd-client :as statsd]
[dd-junit.datafy :as datafy]
[ :as io]))
...
(defn -main [& args]
(let [junit-path (first args)
user-tags (rest args)]
(doseq [item (prepare-messages junit-path user-tags)]
(println item)
(statsd/send-msg item))))
$ bb -m dd-junit.core
----- Error --------------------------------------------------------------------
Type: java.lang.Exception
Message: Could not find namespace: dd-junit.core.
Location: 1:10
----- Stack trace --------------------------------------------------------------
- <expr>:1:10