Re: [Cython] jenkins problems

2011-05-03 Thread Vitja Makarov
2011/5/4 Vitja Makarov : > 2011/5/4 Vitja Makarov : >> Hi! >> >> Jenkins doesn't work for me. It seems that it can't do pull and is >> running tests again obsolete sources. >> May be because of forced push. >> >> There are only 6 errors here: >> https://sage.math.washington.edu:8091/hudson/view/cyt

Re: [Cython] jenkins problems

2011-05-03 Thread Vitja Makarov
2011/5/4 Vitja Makarov : > Hi! > > Jenkins doesn't work for me. It seems that it can't do pull and is > running tests again obsolete sources. > May be because of forced push. > > There are only 6 errors here: > https://sage.math.washington.edu:8091/hudson/view/cython-vitek/job/cython-vitek-tests-py

[Cython] jenkins problems

2011-05-03 Thread Vitja Makarov
Hi! Jenkins doesn't work for me. It seems that it can't do pull and is running tests again obsolete sources. May be because of forced push. There are only 6 errors here: https://sage.math.washington.edu:8091/hudson/view/cython-vitek/job/cython-vitek-tests-py27-c/ -- vitja. _

Re: [Cython] Fused Types

2011-05-03 Thread Robert Bradshaw
On Tue, May 3, 2011 at 4:40 PM, Greg Ewing wrote: > Dag Sverre Seljebotn wrote: > >> ctypedef fused_type(float, double) speed_t >> ctypedef fused_type(float, double) acceleration_t >> >> then you get 4 specializations. >> >> ctypedef speed_t acceleration_t >> >> I guess only 2 specializations. >>

Re: [Cython] Fused Types

2011-05-03 Thread Robert Bradshaw
On Tue, May 3, 2011 at 12:59 PM, Dag Sverre Seljebotn wrote: > On 05/03/2011 08:19 PM, Robert Bradshaw wrote: > >>> Btw we shouldn't count on pruning for the design of this, I think this >>> will >>> for a large part be used with def functions. And if you use a cdef >>> function >>> from another m

Re: [Cython] Fused Types

2011-05-03 Thread Greg Ewing
Dag Sverre Seljebotn wrote: ctypedef fused_type(float, double) speed_t ctypedef fused_type(float, double) acceleration_t then you get 4 specializations. ctypedef speed_t acceleration_t I guess only 2 specializations. Treating the typedefs in this way is slightly fishy of course. Indeed. Th

Re: [Cython] Fused Types

2011-05-03 Thread Greg Ewing
mark florisson wrote: cdef func(floating x, floating y): ... you get a "float, float" version, and a "double, double" version, but not "float, double" or "double, float". It's hard to draw conclusions from this example because it's degenerate. You don't really need multiple versions of a

Re: [Cython] Fused Types

2011-05-03 Thread Dag Sverre Seljebotn
On 05/03/2011 08:19 PM, Robert Bradshaw wrote: Btw we shouldn't count on pruning for the design of this, I think this will for a large part be used with def functions. And if you use a cdef function from another module through a pxd, you also need all versions. Well, we'll want to avoid compil

Re: [Cython] Fused Types

2011-05-03 Thread Robert Bradshaw
On Tue, May 3, 2011 at 10:06 AM, mark florisson wrote: > On 3 May 2011 18:00, Robert Bradshaw wrote: >> floating is implicitly available, we could require making it explicit. > > How would we make it explicit. Require the parameterization, i.e. floating_p[floating] would be the as-yet-unsp

Re: [Cython] Fused Types

2011-05-03 Thread Dag Sverre Seljebotn
I was wrong. We need cdef f(floating x, floating_p y) ...to get 2 specializations, not 4. And the rest follows from there. So I'm with Robert's real stance :-) I don't think we want flexibility, we want simplicity over all. You can always use a templating language. Btw we shouldn't count on p

Re: [Cython] Fused Types

2011-05-03 Thread mark florisson
On 3 May 2011 18:00, Robert Bradshaw wrote: > On Tue, May 3, 2011 at 12:59 AM, mark florisson > wrote: >> On 3 May 2011 00:21, Robert Bradshaw wrote: >>> On Mon, May 2, 2011 at 1:56 PM, mark florisson >>> wrote: On 2 May 2011 18:24, Robert Bradshaw wrote: > On Sun, May 1, 2011 at 2:38

Re: [Cython] Fused Types

2011-05-03 Thread mark florisson
On 3 May 2011 16:36, Sturla Molden wrote: > Den 03.05.2011 16:06, skrev Dag Sverre Seljebotn: >> >> Well, if you do something like >> >> ctypedef fused_type(float, double) speed_t >> ctypedef fused_type(float, double) acceleration_t >> >> cdef func(speed_t x, acceleration_t y) >> >> then you get 4

Re: [Cython] Fused Types

2011-05-03 Thread Robert Bradshaw
On Tue, May 3, 2011 at 7:06 AM, Dag Sverre Seljebotn wrote: > On 05/03/2011 03:51 PM, Stefan Behnel wrote: >> >> mark florisson, 03.05.2011 15:17: >>> >>> if you have >>> >>> cdef func(floating x, floating y): >>> ... >>> >>> you get a "float, float" version, and a "double, double" version, but >>

Re: [Cython] Fused Types

2011-05-03 Thread Robert Bradshaw
On Tue, May 3, 2011 at 12:59 AM, mark florisson wrote: > On 3 May 2011 00:21, Robert Bradshaw wrote: >> On Mon, May 2, 2011 at 1:56 PM, mark florisson >> wrote: >>> On 2 May 2011 18:24, Robert Bradshaw wrote: On Sun, May 1, 2011 at 2:38 AM, mark florisson wrote: > A remaining iss

Re: [Cython] Fused Types

2011-05-03 Thread Sturla Molden
Den 03.05.2011 16:06, skrev Dag Sverre Seljebotn: Well, if you do something like ctypedef fused_type(float, double) speed_t ctypedef fused_type(float, double) acceleration_t cdef func(speed_t x, acceleration_t y) then you get 4 specializations. Each new typedef gives a new polymorphic type.

Re: [Cython] Fused Types

2011-05-03 Thread Dag Sverre Seljebotn
On 05/03/2011 03:51 PM, Stefan Behnel wrote: mark florisson, 03.05.2011 15:17: if you have cdef func(floating x, floating y): ... you get a "float, float" version, and a "double, double" version, but not "float, double" or "double, float". So, what would you have to do in order to get a "flo

Re: [Cython] Fused Types

2011-05-03 Thread Stefan Behnel
mark florisson, 03.05.2011 15:17: if you have cdef func(floating x, floating y): ... you get a "float, float" version, and a "double, double" version, but not "float, double" or "double, float". So, what would you have to do in order to get a "float, double" and "double, float" version

Re: [Cython] Fused Types

2011-05-03 Thread mark florisson
On 3 May 2011 15:17, mark florisson wrote: > On 3 May 2011 07:47, Greg Ewing wrote: >> I'm a bit confused about how fused types combine to >> create further fused types. If you have something >> like >> >>  ctypedef struct Vector: >>    floating x >>    floating y >>    floating z >> >> then is i

Re: [Cython] Fused Types

2011-05-03 Thread mark florisson
On 3 May 2011 07:47, Greg Ewing wrote: > I'm a bit confused about how fused types combine to > create further fused types. If you have something > like > >  ctypedef struct Vector: >    floating x >    floating y >    floating z > > then is it going to generate code for all possible > combinations

Re: [Cython] Fused Types

2011-05-03 Thread Greg Ewing
I'm a bit confused about how fused types combine to create further fused types. If you have something like ctypedef struct Vector: floating x floating y floating z then is it going to generate code for all possible combinations of types for x, y and z? That's probably not what the

Re: [Cython] Fused Types

2011-05-03 Thread mark florisson
On 3 May 2011 10:57, Dag Sverre Seljebotn wrote: > On 05/03/2011 10:49 AM, mark florisson wrote: >> >> On 3 May 2011 10:44, Dag Sverre Seljebotn >>  wrote: >>> >>> On 05/03/2011 10:42 AM, mark florisson wrote: On 3 May 2011 10:07, Dag Sverre Seljebotn  wrote: > > On 05/03/20

Re: [Cython] Fused Types

2011-05-03 Thread Dag Sverre Seljebotn
On 05/03/2011 10:49 AM, mark florisson wrote: On 3 May 2011 10:44, Dag Sverre Seljebotn wrote: On 05/03/2011 10:42 AM, mark florisson wrote: On 3 May 2011 10:07, Dag Sverre Seljebotn wrote: On 05/03/2011 09:59 AM, mark florisson wrote: On 3 May 2011 00:21, Robert Bradshaw wrote: On

Re: [Cython] Fused Types

2011-05-03 Thread mark florisson
On 3 May 2011 10:44, Dag Sverre Seljebotn wrote: > On 05/03/2011 10:42 AM, mark florisson wrote: >> >> On 3 May 2011 10:07, Dag Sverre Seljebotn >>  wrote: >>> >>> On 05/03/2011 09:59 AM, mark florisson wrote: On 3 May 2011 00:21, Robert Bradshaw  wrote: > > On Mon, May 2, 2

Re: [Cython] Fused Types

2011-05-03 Thread Dag Sverre Seljebotn
On 05/03/2011 10:42 AM, mark florisson wrote: On 3 May 2011 10:07, Dag Sverre Seljebotn wrote: On 05/03/2011 09:59 AM, mark florisson wrote: On 3 May 2011 00:21, Robert Bradshawwrote: On Mon, May 2, 2011 at 1:56 PM, mark florisson wrote: On 2 May 2011 18:24, Robert Bradshaw wrot

Re: [Cython] Fused Types

2011-05-03 Thread mark florisson
On 3 May 2011 10:07, Dag Sverre Seljebotn wrote: > On 05/03/2011 09:59 AM, mark florisson wrote: >> >> On 3 May 2011 00:21, Robert Bradshaw  wrote: >>> >>> On Mon, May 2, 2011 at 1:56 PM, mark florisson >>>  wrote: On 2 May 2011 18:24, Robert Bradshaw  wrote: > > On Sun, Ma

Re: [Cython] Fused Types

2011-05-03 Thread Dag Sverre Seljebotn
On 05/03/2011 09:59 AM, mark florisson wrote: On 3 May 2011 00:21, Robert Bradshaw wrote: On Mon, May 2, 2011 at 1:56 PM, mark florisson wrote: On 2 May 2011 18:24, Robert Bradshaw wrote: On Sun, May 1, 2011 at 2:38 AM, mark florisson wrote: A remaining issue which I'm not quite certain

Re: [Cython] Fused Types

2011-05-03 Thread mark florisson
On 3 May 2011 00:21, Robert Bradshaw wrote: > On Mon, May 2, 2011 at 1:56 PM, mark florisson > wrote: >> On 2 May 2011 18:24, Robert Bradshaw wrote: >>> On Sun, May 1, 2011 at 2:38 AM, mark florisson >>> wrote: A remaining issue which I'm not quite certain about is the specialization

[Cython] Dead code removal

2011-05-03 Thread Vitja Makarov
Hi! I can move unreachable code removal into its own branch and then make a pull request. But it seems to me that dead code removal should be done in control flow analysis so there are few options: 1. remove unreachable code in control flow transformation 2. set is_terminator flag in control flo