Re: [Cython] Wacky idea: proper macros

2012-04-30 Thread Wes McKinney
On Mon, Apr 30, 2012 at 5:36 PM, William Stein wrote: > On Mon, Apr 30, 2012 at 2:32 PM, Dag Sverre Seljebotn > wrote: >> >> >> Wes McKinney wrote: >> >>>On Mon, Apr 30, 2012 at 4:55 PM, Nathaniel Smith wrote: On Mon, Apr 30, 2012 at 9:49 PM, Dag Sverre Seljebotn wrote: > JIT is

Re: [Cython] Wacky idea: proper macros

2012-04-30 Thread William Stein
On Mon, Apr 30, 2012 at 2:32 PM, Dag Sverre Seljebotn wrote: > > > Wes McKinney wrote: > >>On Mon, Apr 30, 2012 at 4:55 PM, Nathaniel Smith wrote: >>> On Mon, Apr 30, 2012 at 9:49 PM, Dag Sverre Seljebotn >>> wrote: JIT is really the way to go. It is one thing that a JIT could >>optimize t

Re: [Cython] Wacky idea: proper macros

2012-04-30 Thread Dag Sverre Seljebotn
Wes McKinney wrote: >On Mon, Apr 30, 2012 at 4:55 PM, Nathaniel Smith wrote: >> On Mon, Apr 30, 2012 at 9:49 PM, Dag Sverre Seljebotn >> wrote: >>> JIT is really the way to go. It is one thing that a JIT could >optimize the >>> case where you pass a callback to a function and inline it run-ti

Re: [Cython] Wacky idea: proper macros

2012-04-30 Thread Wes McKinney
On Mon, Apr 30, 2012 at 4:55 PM, Nathaniel Smith wrote: > On Mon, Apr 30, 2012 at 9:49 PM, Dag Sverre Seljebotn > wrote: >> JIT is really the way to go. It is one thing that a JIT could optimize the >> case where you pass a callback to a function and inline it run-time. But >> even if it doesn't

Re: [Cython] Wacky idea: proper macros

2012-04-30 Thread Wes McKinney
On Mon, Apr 30, 2012 at 4:49 PM, Dag Sverre Seljebotn wrote: > On 04/30/2012 06:30 PM, Wes McKinney wrote: >> >> On Mon, Apr 30, 2012 at 11:19 AM, mark florisson >>  wrote: >>> >>> On 30 April 2012 14:49, Wes McKinney  wrote: On Sun, Apr 29, 2012 at 5:56 AM, mark florisson  wrote:

Re: [Cython] Wacky idea: proper macros

2012-04-30 Thread Nathaniel Smith
On Mon, Apr 30, 2012 at 9:49 PM, Dag Sverre Seljebotn wrote: > JIT is really the way to go. It is one thing that a JIT could optimize the > case where you pass a callback to a function and inline it run-time. But > even if it doesn't get that fancy, it'd be great to just be able to write > somethi

Re: [Cython] Wacky idea: proper macros

2012-04-30 Thread Dag Sverre Seljebotn
On 04/30/2012 06:30 PM, Wes McKinney wrote: On Mon, Apr 30, 2012 at 11:19 AM, mark florisson wrote: On 30 April 2012 14:49, Wes McKinney wrote: On Sun, Apr 29, 2012 at 5:56 AM, mark florisson wrote: On 29 April 2012 08:42, Nathaniel Smith wrote: On Sat, Apr 28, 2012 at 10:25 PM, mark fl

Re: [Cython] Wacky idea: proper macros

2012-04-30 Thread Wes McKinney
On Mon, Apr 30, 2012 at 11:19 AM, mark florisson wrote: > On 30 April 2012 14:49, Wes McKinney wrote: >> On Sun, Apr 29, 2012 at 5:56 AM, mark florisson >> wrote: >>> On 29 April 2012 08:42, Nathaniel Smith wrote: On Sat, Apr 28, 2012 at 10:25 PM, mark florisson wrote: > On 28 Ap

Re: [Cython] Wacky idea: proper macros

2012-04-30 Thread mark florisson
On 30 April 2012 14:49, Wes McKinney wrote: > On Sun, Apr 29, 2012 at 5:56 AM, mark florisson > wrote: >> On 29 April 2012 08:42, Nathaniel Smith wrote: >>> On Sat, Apr 28, 2012 at 10:25 PM, mark florisson >>> wrote: On 28 April 2012 22:04, Nathaniel Smith wrote: > Was chatting with W

Re: [Cython] Wacky idea: proper macros

2012-04-30 Thread mark florisson
On 30 April 2012 14:49, Wes McKinney wrote: > On Sun, Apr 29, 2012 at 5:56 AM, mark florisson > wrote: >> On 29 April 2012 08:42, Nathaniel Smith wrote: >>> On Sat, Apr 28, 2012 at 10:25 PM, mark florisson >>> wrote: On 28 April 2012 22:04, Nathaniel Smith wrote: > Was chatting with W

Re: [Cython] [cython-users] Conditional import in pure Python mode

2012-04-30 Thread mark florisson
On 30 April 2012 14:55, Stefan Behnel wrote: > mark florisson, 30.04.2012 15:24: >> So lets assume we want to use the following syntax: stdio = >> cython.cimport_module("libc.stdio"). >> >> In the TransformBuiltinMethods you add another case to the >> visit_SimpleCallNode > > That seems way too la

Re: [Cython] [cython-users] Conditional import in pure Python mode

2012-04-30 Thread Stefan Behnel
mark florisson, 30.04.2012 15:24: > So lets assume we want to use the following syntax: stdio = > cython.cimport_module("libc.stdio"). > > In the TransformBuiltinMethods you add another case to the > visit_SimpleCallNode That seems way too late in the pipeline to me (see Pipeline.py). I think thi

Re: [Cython] Wacky idea: proper macros

2012-04-30 Thread Wes McKinney
On Sun, Apr 29, 2012 at 5:56 AM, mark florisson wrote: > On 29 April 2012 08:42, Nathaniel Smith wrote: >> On Sat, Apr 28, 2012 at 10:25 PM, mark florisson >> wrote: >>> On 28 April 2012 22:04, Nathaniel Smith wrote: Was chatting with Wes today about the usual problem many of us have

Re: [Cython] [cython-users] Conditional import in pure Python mode

2012-04-30 Thread mark florisson
On 30 April 2012 13:14, Ian Bell wrote: > > On Sun, Apr 29, 2012 at 10:58 PM, mark florisson > wrote: >> >> On 29 April 2012 01:33, Ian Bell wrote: >> > Hello Cython users, >> > >> > I haven't the foggiest idea how easy this would be to implement, or how >> > to >> > do it in the first place, bu