This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-13
Channels
- # atlanta-clojurians (1)
- # beginners (148)
- # boot (13)
- # capetown (1)
- # cider (38)
- # cljs-dev (92)
- # clojure (61)
- # clojure-brasil (1)
- # clojure-dev (6)
- # clojure-italy (21)
- # clojure-losangeles (1)
- # clojure-nl (7)
- # clojure-norway (20)
- # clojure-spec (70)
- # clojure-uk (64)
- # clojurescript (69)
- # core-async (11)
- # cursive (6)
- # data-science (2)
- # datomic (50)
- # docker (2)
- # duct (12)
- # figwheel (1)
- # fulcro (81)
- # graphql (19)
- # jobs (3)
- # jobs-discuss (44)
- # keechma (1)
- # leiningen (1)
- # mount (2)
- # off-topic (10)
- # onyx (19)
- # parinfer (3)
- # portkey (6)
- # re-frame (4)
- # reagent (145)
- # reitit (1)
- # ring (1)
- # ring-swagger (2)
- # specter (1)
- # sql (4)
- # tools-deps (43)
- # unrepl (29)
- # vim (1)
Morning
https://insights.stackoverflow.com/survey/2018/ Some interesting reading
Are there any Clojure groups or events outside London, as a general rule? I’m moving back to Hampshire in a couple of weeks and wondering if there’ll be anything I can attend closer to home.
Hi @amelia We have an FP meetup in Horsham (West Sussex). Might be a little to far depending on where in Hampshire you're moving to.
Unfortunately it looks like my route there would be via London! Thank you though, still good to know. 🙂
@otfrom @amelia there is/was a FP group in so'ton, but no idea what happened to that one.
@keithmantell do you know of any Clojure/FP meet up in Hants?
Does anyone know why some functions have an asterisk on the end? eg. [clojure|cljs].core/inst-ms*
@peterwestmacott it's a naming convention for when you want to give something the same name as something else. it's often used for functions that are for the internals of a macro with the same name
okay, thanks. I’ve always used name'
for that, but I can see that makes sense with other core fns.
okay, so name'
for slightly different nouns and name*
for slightly different / internal implementation verbs?
i first read about the apostrophe thing in LYAH: https://i.imgur.com/O1Htge0.png
and IIRC, Clojure previously didn't allow apostrophes in symbol names, but it was added because of this convention
aha: https://en.wikipedia.org/wiki/Prime_%28symbol%29#Use_in_mathematics.2C_statistics.2C_and_science
yes, I’ve seen it in other code, and I think familiarity from mathematics has led me to copy that convention
@amelia I hang around with this wonderful lot and listen, I can't make any meetups either. 😞
I can make them! I won’t be too far from London, just trying to figure out how best to allocate my travel budget. 🙂 The more I can make the better, I know…
@jasonbell is there some kind of remote meetup?
Also: does anyone know a consistent way to hash arbitrary nested data structures across Clj / Cljs ?
@peterwestmacott Yeah it's me weeping in a skip with a copy of Clojure for the Brave and True 🙂
@jasonbell if we want to join in do we just weep empathetically in our own skips?
I might skip the skip then.
@peterwestmacott there was some talk on hashing on this channel a few weeks ago from @mccraigmccraig and others IIRC
I think @maleghast was asking
we did a remote a while ago, that was nice, so it would be nice do something proper
i don't recall that @otfrom (which doesn't mean it didn't happen)
ah, i remember a hierarchic uuid discussion
which is a hashing related thing
Hi, no - had a quick look - some Elixir in Southampton.....
I think remote meetups are probably the way forward! I can come up to London but seem to go there rarely on business these days
@mccraigmccraig - Just wanted to say "Thanks!" re throttler - absolute perfection! 🙂
Has Javascript been designed to make sure that the little time you have on a project is wasted on chasing problems not at all related to the actual problem you are trying to solve :thinking_face:
it even affects the people steering the language: https://github.com/tc39/proposal-flatMap/pull/56
Just wanted to also mention that the fact that
(compare x y)
just works with clojure.instance values is one of the reasons that I will forever love this language.What are “clojure.instance values”? (I may be being dumb here.)
Since Clojure 1.8 you can have literals that are treated as java.time dates / datetimes:
#inst "2018-03-14T14:00:00.000000000-00:00"
you can quickly read text-based date-times into java.date objects using the namespace, thus:
(clojure.instant/read-instant-timestamp "2018-03-14T14:00:00:00Z")
If you want to compare two java.date values that you've "got" by using this approach you can just do this:
(compare #inst "2018-03-14T14:00:00" #inst "2018-03-14T13:59:00")
and that should evaluate to 1 meaning that he first date is "greater than" (or in date terms more recent) than the second.So, in my code that I am working on at the moment, I get a string date from the API I am interacting with, I turn it into a java.date with instant/instant-read-timestamp, and then I can compare it with another date value similarly created from string beginnings and it "just works". I don't have to convert to UNIX timestamp and do a mathematical comparison, I just "compare" two dates and Clojure / Java can handle the rest for me.
I just discovered something that actually makes this slightly less useful and / or good... The underlying type of the result of clojure.instant/instant-read-timestamp is actually java.sql.Timestamp, not java.time datetime which makes them less useful in some ways...
However, @U050CTFRT / Juxt's library tick represents a soplid alternative.