https://clojurians.slack.com/archives/C8NUSGWG6/p1785945972758149 Wanted to mention my gobb post here. I hope you find it interesting...
I'm trying to add a custom handler to clojure.pprint/pprint, like this:
(defmethod pprint/simple-dispatch ZonedDateTime [zdt]
(print (str "#time/zdt \"" (.toString zdt) "\"")))
this works in Clojure, but in babashka when printing a map with a ZoneDateTime value, things get printed in the wrong order...
{:session/external-id "7dd1f2a0-f9be-4220-896b-5c72c351fe4c",
#time/zdt "2026-09-30T08:30-04:00[America/New_York]":session/title "Early Registration",
:session/time ,
:session/duration "PT60M"}
is this a known issue? is there a workaround?Let's see
yeah sorry, it's a 4 letter change in the pprint wiring :)
will be fixed in next release, thanks for reporting
awesome! thanks a lot! β€οΈ
really no need to say sorry π
a workaround now could be:
(defmethod pprint/simple-dispatch ZonedDateTime [zdt]
(pprint/write-out (tagged-literal 'time/zdt (str zdt))))that's cleaner anyway
thanks!
It would nice to be able to specify a file of EDN for deps/add-deps . It's not hard to slurp & edn/read-string . It just feels needlessly repetitive. Typically, aliases that I want to use outside of a project are in ~/.config/clojure/deps.edn . It would be nice to specify that file either with a wrapper to deps/add-deps or as an alternative argument to deps/add-deps . Seems it would be easy to distinguish between a map & a file specifier (path object or string). If the desire is to keep deps/add-deps lean for the simple usage, that would suggest (to me) the wrapper function.
Does any of this sound useful?
One option that might allow for even less duplication would be using something like BABASHKA_PRELOADS - so, if that particular file comes up a lot, it'd be possible to just def it (or something like (comp edn/read-string slurp) for any old file) to something in the environment. Or put the defs in a file for --init, but that maybe gets annoying unless you make an alias or something to pass init through.