Not sure if this is expected or not: (map (fn [v] {:k v}) #{1 2 3}) => ({:k 1} {:k 3} {:k 2}) (map #({:k %}) #{1 2 3}) ArityException Wrong number of args (0) passed to: PersistentArrayMap clojure.lang.AFn.throwArity (AFn.java:429)
*--* *Eduardo Aquiles Radanovitsck* On Wed, Jul 29, 2015 at 11:12 PM, Alex Miller <a...@puredanger.com> wrote: > Thanks, I forwarded this stuff over to Rich. We appreciate people trying > it and reporting stuff! > > > On Wednesday, July 29, 2015 at 8:23:16 PM UTC-5, Mikera wrote: >> >> Hi Alex, >> >> 1.8.0-alpha3 is breaking core.matrix at the moment. >> >> Root cause appears to be related to how protocols are being handled when >> used with Java arrays: >> >> e.g. for the protocol implementation: >> (extend-protocol mp/PImplementation >> (Class/forName "[Ljava.lang.Object;") >> (implementation-key [m] :object-array) >> (meta-info [m] >> {:doc "Clojure.core.matrix implementation for Java Object arrays"}) >> (new-vector [m length] (construct-object-vector (long length))) >> (new-matrix [m rows columns] >> (let [columns (long columns) >> m (object-array rows)] >> (dotimes [i rows] >> (aset m i (construct-object-vector columns))) >> m)) >> (new-matrix-nd [m shape] >> (construct-nd shape)) >> (construct-matrix [m data] >> (construct-object-array data)) >> (supports-dimensionality? [m dims] >> (>= dims 1))) >> >> When called as: >> (clojure.core.matrix.protocols/construct-matrix (object-array 1) [1]) >> >> Gives exception: >> VerifyError (class: clojure/core/matrix$eval10586, method: invokeStatic >> signature: ()Ljava/lang/Object;) Incompatible object argument for function >> call java.lang.Class.getDeclaredConstructors0 (:-2) >> >> On Thursday, 30 July 2015 06:51:18 UTC+8, Alex Miller wrote: >>> >>> Clojure 1.8.0-alpha3 is now available. >>> >>> Try it via >>> - Download: >>> https://repo1.maven.org/maven2/org/clojure/clojure/1.8.0-alpha3 >>> - Leiningen: [org.clojure/clojure "1.8.0-alpha3"] >>> >>> Tuples have been disabled after further analysis of performance impacts. >>> >>> This alpha has initial support for direct linking which you can enable >>> with -Dclojure.compiler.direct-linking=true >>> >>> Direct linking allows functions compiled with direct linking on to make >>> direct static method calls to most other functions, instead of going >>> through the var and the Fn object. This can enable further optimization by >>> the jit, at a cost in dynamism. In particular, directly-linked calls will >>> not see redefinitions. >>> >>> In alpha3, clojure.core is compiled with direct linking by default and >>> therefore other namespaces cannot redefine core fns and have those >>> redefinitions seen by core code. >>> >>> Functions declared as dynamic will never be linked to directly. >>> >>> As with all alphas, this represents ongoing work-in-progress that is >>> subject to change. >>> >> -- > 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 > --- > 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+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 --- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.