[ClojureScript] Re: Om - component local state as cursor?

2014-07-22 Thread Dylan Butman
I've done this quite a bit before with a parent form component and many child input components. here's a striped down version of form and input components. there's lots of other fun stuff you can do with validation and whatnot, but this is the meat. The cool part is having an input component

Re: [ClojureScript] core.async - restriction on macros inside go block?

2014-07-22 Thread Tom Locke
Thanks for your reply. That's pretty much what I'd come to understand. I'm a bit puzzled why this restriction exists though. Of course function calls can't be resolved at macro expansion time, so it makes sense that ! ! inside functions can't be found. But I don't understand why the go macro

Re: [ClojureScript] core.async - restriction on macros inside go block?

2014-07-22 Thread Daniel Kersten
There's really two questions in there as I see it. 1. Why doesn't the go macro expand all nested macros. 2. Why can't the go macro find the ! and ! anyway I don't know the answer to either, unfortunately. Because macro expansion happens in reverse order to normal evaluation, nested macros aren't

[ClojureScript] Re: String Interning

2014-07-22 Thread Robin Heggelund Hansen
I think this has more to do with the host platform than with CLJ and CLJS. In Java: some string != (some + string); In JavaScript: some string === (some + string); -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message

Re: [ClojureScript] core.async - restriction on macros inside go block?

2014-07-22 Thread Kevin Marolt
Not sure if I understood the initial question correctly, but isn't the following sort of what you wanted? ;; == (require '[clojure.core.async :as async]) (defmacro dispatch-on [ch cases] (let [argssym (gensym args__) keysym (gensym key__) ressym (gensym res__)

Re: [ClojureScript] core.async - restriction on macros inside go block?

2014-07-22 Thread Kevin Marolt
I tried it in ClojureScript and I did get the same error as your did. I believe this is because the go-macro doesn't handle the case-statement correctly (or, rather, not at all). Switching from (case key ...) to (condp = key ...) however appears to do the trick (along with all the other awkward