Re: How to read a transit string from client side (transit-cljs) on server side (tansit-clj)

2014-10-09 Thread Bin Li
> > https://github.com/cognitect/transit-clj/blob/master/README.md > > > On Thu, Sep 25, 2014 at 6:56 AM, Bin Li > > wrote: > >> Hi Guys, >> >> I was playing around the transit library recently , that is what I did: >> >> On client side , which usi

How to read a transit string from client side (transit-cljs) on server side (tansit-clj)

2014-09-25 Thread Bin Li
Hi Guys, I was playing around the transit library recently , that is what I did: On client side , which using tansit-cljs (*clojrescript*) : (def w (t/writer :json)) (.send xhr url "POST" (transit/write w *{:test :test-value}*) #js {"Content-Type" "application/transit+json"}) And from server

Re: defrecord - CompilerException to referring record defined at other namespace

2014-09-11 Thread Bin Li
> different naming contexts). > > > On Wednesday, September 10, 2014 8:44:18 PM UTC-5, Bin Li wrote: >> >> Yes , it is. >> >> Is it because that / is accessing the 'static' function/field ? so at >> core.clj: >> >> we can only have

Re: defrecord - CompilerException to referring record defined at other namespace

2014-09-10 Thread Bin Li
gt; > Is datatypes.clj at src/defrecord_example1/datatypes.clj ? (note _, not - > in directory name) > > > On Wednesday, September 10, 2014 6:01:25 AM UTC-5, Bin Li wrote: >> >> I have records defined at datatypes.clj: >> ```clojure >> (ns defrecord-exa

defrecord - CompilerException to referring record defined at other namespace

2014-09-10 Thread Bin Li
I have records defined at datatypes.clj: ```clojure (ns defrecord-example1.datatypes) (defrecord Record1 [f1]) (defrecord Record2 [f1 f2 f3]) ;; this is working at repl (def m-inside1 {Record1 (fn [] ({:a "A"})) Record2 (fn [] ({:n "B"}))}) And using at core.clj : ```clojure (ns defreco