Very nice find! Thank you for that!

I'm thinking maybe it has something to do with lazy or delayed evaluation.
I don't really understand most clojure things but I imagine if the call to
mapv would not be evaluated right when the def is read but instead only
when the mappings-8x8 is first being used (sort of like a `delay` or lazy
init) then it would make some sense why ^:const would fail however this
theory doesn't seem to hold when using something like (def ^:const
mappings-8x8 ((fn [] [[0 0] [1 0]])) because it would have to act like the
call to mapv does, unless there's something extra introduced by mapv but
the returned class seems to be the same that PersistenVector - anyway I'm
just guessing around, doesn't help :)




On Mon, Jan 21, 2013 at 6:17 PM, Jim - FooBar(); <jimpil1...@gmail.com>wrote:

> On 21/01/13 17:07, Jim - FooBar(); wrote:
>
>> On 21/01/13 16:47, AtKaaZ wrote:
>>
>>> Could you retry using this
>>> -XX:-UseCompressedOops
>>>
>>
>>
>> surprisingly this worked! I don't get that error anymore... I used to
>> have it but i thought it was completely unnecessary...I don't understand
>> how this affects the runtime of my program!
>>
> About that, I find these a useful read:
http://javarevisited.blogspot.hu/2011/11/hotspot-jvm-options-java-examples.html
http://javarevisited.blogspot.hu/2012/06/what-is-xxusecompressedoops-in-64-bit.html


>
>> Jim
>>
>
> also I Just tried eval-ing the call to mapv and it compiles and runs just
> fine!!!! I'm totally baffled...
>
> So to sum up:
>
> this fails:
>
>
> (def ^:const mappings-8x8
>   (mapv #(apply vector-of :int %) [[0 0] [1 0] [2 0]]))
>
> this succeeds:
>
> (def ^:const mappings-8x8
>   (eval (mapv #(apply vector-of :int %) [[0 0] [1 0] [2 0]])))
>
>
> this is beyond me!
>
>
> Jim
>
>
>
>
> --
> 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 moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscribe@**googlegroups.com<clojure%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/**group/clojure?hl=en<http://groups.google.com/group/clojure?hl=en>
>



-- 
I may be wrong or incomplete.
Please express any corrections / additions,
they are encouraged and appreciated.
At least one entity is bound to be transformed if you do ;)

-- 
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 moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to