Re: using aset in clojure-1.3-alpha4

2010-12-31 Thread Stuart Sierra
Yes, integer literals are longs by default in 1.3. As noted, this works: (aset-int (make-array Integer/TYPE 3 4 5) 1 2 3 -1) My intuition says this should work as well, but it doesn't: (aset ^ints (make-array Integer/TYPE 3 4 5) 1 2 3 (int -1)) IllegalArgumentException argument type

Re: using aset in clojure-1.3-alpha4

2010-12-31 Thread Miki
> (aset (make-array Integer/TYPE 3 4 5) 1 2 3 -1) > can anybody tell me as to how to do this right? > > (aset (make-array Long/TYPE 3 4 5) 1 2 3 -1) I *think* that number by default are long, and the array is of ints. HTH, -- Miki http://clojurewise.blogspot.com/ -- You received this messag

Re: using aset in clojure-1.3-alpha4

2010-12-31 Thread Allen Johnson
Sorry I should have written 1.3.0-master-SNAPSHOT or whatever the convention is that represents the latest master build :) On Fri, Dec 31, 2010 at 11:21 AM, Sunil S Nandihalli wrote: > Hi Allen .. >  is 1.3.0 out? and I did not know that aset had so many variants.. glad I > asked .. now I know .

Re: using aset in clojure-1.3-alpha4

2010-12-31 Thread Sunil S Nandihalli
Hi Allen .. is 1.3.0 out? and I did not know that aset had so many variants.. glad I asked .. now I know .. :) thanks Allen. Sunil. On Fri, Dec 31, 2010 at 8:19 PM, Allen Johnson wrote: > This worked for me on 1.3.0: > > (aset-int (make-array Integer/TYPE 3 4 5) 1 2 3 -1) > > Might have somethin

Re: using aset in clojure-1.3-alpha4

2010-12-31 Thread Allen Johnson
This worked for me on 1.3.0: (aset-int (make-array Integer/TYPE 3 4 5) 1 2 3 -1) Might have something to do with the enhanced primitive support which causes array handling to be stricter than it was in 1.2? Just a guess. Allen On Fri, Dec 31, 2010 at 8:53 AM, Sunil S Nandihalli wrote: > Hello

using aset in clojure-1.3-alpha4

2010-12-31 Thread Sunil S Nandihalli
Hello Everybody, why does this give an error in clojure-1.3-alpha4 (aset (make-array Integer/TYPE 3 4 5) 1 2 3 -1) can anybody tell me as to how to do this right? Thanks, Sunil. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,