guuuuuuuuuuuuuuuten morgen party people
morning
Good Morning!
moorning!
yet another lovely babashka experience this morning. We're running on Google Cloud, which is a constant source of novelty. That novelty is not always conducive to joy or productivity. But Babashka! Wrap the painful terminal magic stuff, return to the REPL. βΊοΈ Just like the Conj Babashka Clojure adoption talk (https://clojurians.slack.com/archives/C8NUSGWG6/p1769016178663559)
(gc "auth list")
;; => ({:account "", :status "ACTIVE"}
;; {:account "", :status "ACTIVE"})
(see π§΅ for gc impl)(require '[babashka.process :as p]
'[cheshire.core])
(defn vconcat [& args]
(into [] cat args))
(defn coerce-tokenize [s-or-seq]
(if (string? s-or-seq)
(p/tokenize s-or-seq)
(vec s-or-seq)))
(defn argparse-format-json
([args] (argparse-format-json {} args))
([opts args]
{:args (vconcat ["gcloud" "--format=json"] (coerce-tokenize args))
:opts (merge {:out :string :err :string} opts)}))
(defn gc "run gcloud, return Clojure map"
([args] (gc {} args))
([opts args]
(let [{:keys [opts args]} (argparse-format-json opts args)]
(-> (apply p/shell opts args)
:out
(cheshire.core/parse-string keyword)))))funny side-effect of Alex Miller announcing in a really concise way is that it's way nicer to refer to it from other places.
> a constant source of novelty lolcry
if we took "does it spark joy?" seriously, I fear it would not survive β¦
morning
mogge
Morning
Good πΏ checking morning
Madainn mhath mo chairdean! π΄σ §σ ’σ ³σ £σ ΄σ Ώ
Moin
Godmorgen
morning