(fn [system-atom handlefn](println "sanity check: " system-atom)(go (loop [msg (<! chanl)];; (handlefn system-atom msg)(handlefn nil msg)(recur (<! chanl)))))
Hey Shaun,Thanks for looking into this. Your example does indeed work. I'll have to teardown my own code and see where the invocations are failing. At least I know it's not core.async.CheersOn Thu, Jan 2, 2014 at 4:16 PM, Shaun Gilchrist <shaun...@gmail.com> wrote:
Hey, I am attempting to duplicate the issue you described in the email here: http://cljsfiddle.net/fiddle/shaunxcode.timothy-example and it seems to work for me - granted I am doing this in cljs so maybe it is different for clojure?
(s/defn [one two]...#_(def params (atom '({}) ))(def params '({}))(try (eval `(~afn ~@params)) (catch Exception e (println "Exception: " (.getMessage e)))))
"java.lang.RuntimeException: Can't embed object in code, maybe print-dup not defined: clojure.lang.Atom@1c99db7 (NO_SOURCE_FILE:0)"
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
The crux of the problem is that the size of params can be variable. Only at runtime, does the code match the loaded afn, with the passed in params. So I basically just need to break out the ~@params into individuated input arguments. The only other way I can think to do that, without using eval, would be to curry afn, for each input param.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/j8QWNnFNIVg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
(apply @(resolve afn) params)