This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-13
Channels
- # bangalore-clj (1)
- # beginners (29)
- # boot (13)
- # braveandtrue (5)
- # clara (5)
- # cljs-dev (42)
- # cljsrn (7)
- # clojure (55)
- # clojure-france (46)
- # clojure-nl (11)
- # clojure-portugal (1)
- # clojure-russia (268)
- # clojure-spec (26)
- # clojure-uk (32)
- # clojurescript (173)
- # clr (2)
- # core-async (46)
- # cursive (22)
- # datomic (33)
- # devcards (1)
- # emacs (5)
- # events (8)
- # figwheel (2)
- # flambo (4)
- # instaparse (8)
- # jobs (11)
- # klipse (46)
- # lein-figwheel (3)
- # london-clojurians (2)
- # nrepl (1)
- # off-topic (29)
- # om (4)
- # om-next (8)
- # pedestal (3)
- # rdf (4)
- # re-frame (51)
- # reagent (104)
- # remote-jobs (1)
- # rum (4)
- # schema (2)
- # specter (19)
- # untangled (16)
- # vim (52)
Morniong
My train cancelled this morning (some problem north of Newcastle) but slower 5 minute earlier train here so jumped on that. Always amuses me that this train leave earlier but arrive 20 mins later....stops at every cattle station on the way down.
morning
the few times I used core.aync I never had the need to use the various alt(s)(!!)
forms.... so no idea what they actually do
alt(s), is *alt*ernatives. Do one of these things. Often most useful when you want a timeout:
(let [[val port] (async/alts!! [channel-with-real-answers-hopefully
(async/timeout 1000])]
(when-not (= port
channel-with-real-answers-hopefully)
(prn "Real answer didn't come back in time, do something!"))))
That's when I use them most anyhoo šyou probably knew that, just in over helpful monday mood i guess, the sun is finally shining
I know what they do, intellectually, but I always spend ages trying to get go
blocks to correctly return values I need especially when alt(s)
are in their some where. It's not that I don't know what they do .... I just have no intuitive grasp of how to construct various non-blocking channel operations...I have this mental blank on them. I've used core.async a fair amount but it literally takes me hours to get back into understanding it.
I don't think I've found a convenient mental model yet. The conveyor belt mental model just doesn't express the subtle semantics of non-blocking operations and go
blocks returning channels!
I have much less problem when they're blocking puts and takes.
I think I need more practice....or I need to write a blog on it as that usually solidifies concepts for me.
they're definitely something that can get away from you if your not careful, so easy to create a web of chans, loops and blocks that is near impossible to think through. A little goes a long way i guess
i donāt think itās any different from doing IO ops in java-land, except the channels make the async work explicit in a similar way to haskellās IO
@glenjamin I find it very different. Hence the mental block
I meanāt the execution is probably similar, but it forces you to consider which things do IO work - which is the friction
re: discussion the other day about dojos - Iām not going to be doing evening stuff for a while because baby; but one observation I had about dojos is that when I was going to them, we used to repeatedly have some extremely new people attending.
Which could be fun, but ultimately they were almost as well off just doing group 4clojure tasks as trying to actually solve a puzzle.
And it could feel rather unrewarding for more experienced people - the usual pattern was: 1. people put up all sorts of cool problems on a wall 2. people vote for one that looks cool and interesting 3. you start work on it, and find that half the sub-group you are in havenāt even got a dev environment 4. after 2 hours you have a āhello worldā working, and maybe 1/10 of the cool puzzle that was on the wall.
Sorry to be a grump; it just felt that dojos were rewarding for the totally new and the still-learning-basics, and I learned stuff from teaching people as well; but I didnāt feel I was gaining all that much myself.
@korny I feel similar...although I have fun teaching I hardly ever learn anything.
if youāre familiar with the problem then giving yourself arbitrary constraints can be interesting
we've done newbie 4clojure groups before w/someone happy to tutor. No reason there couldn't be a more advanced group
@glenjamin good shout. I like constraints as a way of learning stuff.
@glenjamin I enjoyed implementing fizzbuzz with no conditionals at all...no if
s no cond
or case
etc.
Myself and my colleague will hopefully be attending our first dojo at the end of the month - after over a year we're finally getting around to it, and it has nothing to do with the need for us to find new jobs š
Iāve run a few dojoās/coding events at the Manchester Lambda Lounge ā and clojure dojoās before it - and found the sameā¦ usually too little time to focus a group on stuffā¦ most of the time feels wasted. mostly useful to helping beginners start, which is good - but hard to get much more out of it than that. I tend to discourage those kind of events now - and prefer talks.