Re: Please help making this tiny macro work with Clojurescript

2015-03-23 Thread myguidingstar
Oh silly me. It's just .val should be replaced with more portable version .-val Problem resolved! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are mode

Re: Please help making this tiny macro work with Clojurescript

2015-03-23 Thread myguidingstar
It turns out that this code works in Clojure: (let [x (clojure.lang.Box. 1)] (set! (.val x) 2) (.val x)) while this one failed to compile in Clojurescript (just .cljs, no macro involved): (let [x (cljs.core/Box. 1)] (set! (.val x) 2) (.val x)) Box is already defined as mutable in Clojuresc

Please help making this tiny macro work with Clojurescript

2015-03-23 Thread myguidingstar
I'm porting this library to Clojurescript. Everything is ok except this `for` macro: https://github.com/LonoCloud/synthread/blob/master/src/lonocloud/synthread.clj#L112 When required and compiled with Clojurescript, the above `for` yelled at me: clojure.lang.ExceptionInfo: set! target must be a