This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-02
Channels
- # announcements (1)
- # beginners (119)
- # calva (2)
- # cider (40)
- # cljsrn (14)
- # clojure (145)
- # clojure-dev (122)
- # clojure-europe (4)
- # clojure-italy (9)
- # clojure-nl (5)
- # clojure-spec (2)
- # clojure-uk (32)
- # clojuredesign-podcast (1)
- # clojurescript (10)
- # cursive (44)
- # data-science (1)
- # datomic (53)
- # defnpodcast (6)
- # emacs (6)
- # fulcro (13)
- # garden (25)
- # graalvm (3)
- # graphql (7)
- # jobs (3)
- # liberator (4)
- # nrepl (1)
- # off-topic (21)
- # quil (27)
- # reagent (4)
- # reitit (2)
- # remote-jobs (1)
- # ring-swagger (3)
- # shadow-cljs (3)
- # spacemacs (24)
- # sql (29)
- # tools-deps (68)
- # xtdb (2)
the funny thing is that the DNSes are resolving, so logging in to their dashboard to switch them off would solve it.. but their website was down as well :man-shrugging:
AWS console down here...
There is a easier way to turn inst into string? (edn/read-string {:readers {'inst str}} (pr-str (new Date)))
you could use the Java APIs to format Dates (or convert to Instant and use the java.time APIs)
it's not easier, but I'd say it's better
to be clear, you are not turning an inst in to a string, inst is a data literal tag that tags some serialized data
you have some kind of object, a java.util.Date object (which clojure pr's as a string tagged with inst, but many other date/time kind of objects do as well), which you want to turn into a string formatted in some way
I think these days I might convert the Date to some kind of java.time type and then do whatever with that, I think the formater is saner there
at clojure.tools.reader.default-data-readers
there is a lot of ^:private methods to format inst into this string.
supposing that they are really necessary, I dont want to replicate it in my code. It's not a performatic stuff, but I need the same string from #inst "..."
We would not have written all that instant stuff today - we would have used java.time
And that private stuff could be replaced in the future