clojure-europe 2026-01-22

guuuuuuuuuuuuuuuten morgen party people

πŸ•Ί 7
πŸ•ΊπŸΌ 1

morning

Good Morning!

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)

πŸ‘ 1
3

(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

βž• 1

if we took "does it spark joy?" seriously, I fear it would not survive …

πŸ’― 1
πŸ™ˆ 1

Morning

Good 🎿 checking morning

Madainn mhath mo chairdean! 🏴󠁧󠁒󠁳󠁣󠁴󠁿