Ben Mabey writes:
> Should a ticket be created for this then?
Yes, please. And add a link to this discussion.
Bye,
Tassilo
--
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 pos
On 1/26/12 5:07 AM, Cedric Greevey wrote:
On Thu, Jan 26, 2012 at 5:54 AM, Tassilo Horn wrote:
Cedric Greevey writes:
On Thu, Jan 26, 2012 at 2:28 AM, Tassilo Horn wrote:
At least, it seems that (fn ^double [^double x] (+ x 0.5)) compiles to a
class supporting primitive, unboxed calls.
Ye
On Thu, Jan 26, 2012 at 5:54 AM, Tassilo Horn wrote:
> Cedric Greevey writes:
>
>> On Thu, Jan 26, 2012 at 2:28 AM, Tassilo Horn wrote:
>>> At least, it seems that (fn ^double [^double x] (+ x 0.5)) compiles to a
>>> class supporting primitive, unboxed calls.
>>
>> Yes. That was my conclusion al
Cedric Greevey writes:
> On Thu, Jan 26, 2012 at 2:28 AM, Tassilo Horn wrote:
>> At least, it seems that (fn ^double [^double x] (+ x 0.5)) compiles to a
>> class supporting primitive, unboxed calls.
>
> Yes. That was my conclusion also. But apparently the only way to get
> the compiler to emit
On Thu, Jan 26, 2012 at 2:28 AM, Tassilo Horn wrote:
> At least, it seems that (fn ^double [^double x] (+ x 0.5)) compiles to a
> class supporting primitive, unboxed calls.
Yes. That was my conclusion also. But apparently the only way to get
the compiler to emit such a call is by binding the fn t
Cedric Greevey writes:
Hi Cedric,
> Actually, on further testing, I'm not sure that (def ^{Double/TYPE}
> ...) is really working either, rather than boxing and then unboxing on
> each call:
>
> user=> (def ^{:tag Double/TYPE} b (fn [^double x] (+ x 0.5)))
> #'user/b
> user=> (defn c ^double [^do
On Wed, Jan 25, 2012 at 11:58 AM, Ben Mabey wrote:
> On 1/25/12 2:25 AM, Tassilo Horn wrote:
>>
>> Hi again,
>>
>> I think, I got it. I wrote a little helper function to print the
>> metadata of a form:
>>
>> --8<---cut here---start->8---
>> (use 'clojure.walk)
Ben Mabey writes:
> Am I missing something, or does the new primitive support only apply
> to bound functions?
On the one hand, the docs don't mention such a restriction, but on the
other hand, all examples given are always defn-defined. I tried to look
into the compiler to find out, but that's
On 1/25/12 2:25 AM, Tassilo Horn wrote:
Hi again,
I think, I got it. I wrote a little helper function to print the
metadata of a form:
--8<---cut here---start->8---
(use 'clojure.walk)
(defn print-meta
([form level]
(prewalk
(fn [x]
Hi again,
I think, I got it. I wrote a little helper function to print the
metadata of a form:
--8<---cut here---start->8---
(use 'clojure.walk)
(defn print-meta
([form level]
(prewalk
(fn [x]
(when-let [m (meta x)]
(println "Lev
Ben Mabey writes:
Hi Ben,
> Does the new primitive support added in 1.3 extend to anonymous
> functions?
I guess, it should. At least they are not disregarded...
--8<---cut here---start->8---
user> (def with-def (fn ^float [^float x]
Does the new primitive support added in 1.3 extend to anonymous functions?
If so, I am doing something wrong because I can't get them to work:
(definterface IPrimitiveTester
(getType [^int x])
(getType [^long x])
(getType [^float x])
(getType [^double x])
(getType [^Object x]))
(defty
12 matches
Mail list logo