This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-18
Channels
- # admin-announcements (59)
- # beginners (5)
- # boot (99)
- # cider (9)
- # clojure (207)
- # clojure-czech (1)
- # clojure-dev (28)
- # clojure-france (3)
- # clojure-italy (1)
- # clojure-japan (22)
- # clojurescript (234)
- # core-async (12)
- # datascript (1)
- # datomic (60)
- # funcool (137)
- # hoplon (18)
- # instaparse (2)
- # jobs (2)
- # ldnclj (42)
- # ldnproclodo (3)
- # liberator (13)
- # off-topic (21)
- # onyx (2)
- # re-frame (5)
- # reagent (12)
- # ring-swagger (5)
- # testing (17)
does core.async and binding play well in clojurescript? it looks like using binding inside go block, doesn't restore previous bindings for me: https://github.com/darwin/plastic/blob/23be567d74030b45ccd98aee6846a848eb81c05a/cljs/src/worker/plastic/worker/frame.cljs#L51-L53
had to move binding outside go-loop: https://github.com/darwin/plastic/commit/64feb7c2f719c82ba99a503134358dce0afc21ad
@darwin: the issue there is go
- just keep in mind that go
is a macro that does crazy stuff in order to work. Because of that, you only want code inside a go/go-loop block that absolutely has to be there. I'm not surprised that something like binding doesn't work properly inside a go block.
I'm not claiming to understand exactly what go does, I just know that it rewrites your code dramatically and keeping go block as simple as possible avoids a lot of pain.
@meow: I’m also not surprised, what worries me is that all re-frame handlers are running inside go loop, which is pretty large code surface, I will have to think twice when using binding from now on
wait, I will do another test, with binding inside function call, not immediately in go body
the go macro has no depth - it isn't going to rewrite the content of some called function