Hi. Cython and unPython are actually fairly similar. Both produce C extension modules.
unPython takes annotated python source as input and produces code for a C extension module. You have to manually add type annotations to functions/classes/methods etc. For functions, you add decorators with type information. Currently the difference is that the unPython annotations are pure Python and all your code runs straight on the Python interpreter too if you want. Cython has some constructs which are not Python thus in general Cython code does not run on the interpreter. ( However I am told in the long term Cython also intends to be 100% compatible.) Also the main objective of unPython is numpy so I will likely concentrate on thorough coverage and compiler optimizations for numpy. Note that in unPython, all ndarray are typed, i.e. you have to specify the element type and I translate all accesses into low level array access code when compiling to C. Indexing, slicing and basic operators like +,-,* etc are somewhat working. In next 1-2 months, I should have support for slices, looping over arrays, creating and using ufuncs and most ndarray methods. Then focus will be on loop optimizations and loop directives. Note also that unPython does not support arbitrary lengh integers and all the numeric variables are converted to low level C counterparts such as int, float, double etc. (long is missing currently). Currently Cython is definitely way ahead of unPython in features as well as stability but I hope to implement most critical features soon.For example, I dont even have support for lists, dict, tuple etc so its very early days for the project but it should be usable in 1-2 months. Note on implementation : unPython is writting in Java. Hopefully that will not turn people away. thanks, rahul On Thu, May 29, 2008 at 5:21 AM, Martin C. Martin <[EMAIL PROTECTED]> wrote: > Hi Rahul, > > Thanks for letting us know. How is it similar or different from Cython? > > Best, > Martin > > rahul garg wrote: > > Hi. > > > > As some of you already know, I have started a new Python-to-C compiler. > > The new project is called unPython (earlier was called Spyke but people > > confused it too much with skype). > > A very prelim .. and very broken :) .. release is now at > > http://www.cs.ualberta.ca/~garg1/unpython/<http://www.cs.ualberta.ca/%7Egarg1/unpython/> > > You are encouraged to download and play with the compiler. Its very > > prelim and I would be very surprised if it compiles anything > successfully. > > If you do not want to play with very broken software, I plan to do a > > saner release around mid June. > > A mailing list has been setup at > > http://groups.google.com/group/unpython-discuss/ > > > > thanks, > > rahul > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Cython-dev mailing list > > [email protected] > > http://codespeak.net/mailman/listinfo/cython-dev > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev >
_______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
