[Numpy-discussion] New project : Spyke python-to-C compiler

Gael Varoquaux gael.varoquaux at normalesup.org
Mon Apr 7 04:03:47 EDT 2008


Hi Rahul,

Nice project. I think you are taking the right direction with type 
annotations. I you get this working and reliable, you will be much loved
by the community.

On Sun, Apr 06, 2008 at 11:19:58PM -0500, Travis E. Oliphant wrote:
> > c) Strings as type declarations : Do you think I should use decorators
> > instead at least for function type declarations?

> I think you should use decorators.   That way you can work towards 
> having the compiler "embedded" in the decorator and happen seamlessly 
> without invoking a separte "program" (it just happens when the module is 
> loaded -- a.l.a weave).

+1. This is a very promising route. You can then choose exactly what you
want to compile and what you want to keep pure Python (something similar
to Cython, without the intermediate file).

I would even stick with some decoration after Python3K, say
"@compiled()", so that you keep this compilation on the fly that Travis
is mentionning.

Cheers,

Gaël



More information about the NumPy-Discussion mailing list