[Cython] RFC: an inline_ function that dumps c/c++ code to the code emitter

Robert Bradshaw robertwb at gmail.com
Sun Aug 21 05:11:43 EDT 2016


On Fri, Aug 19, 2016 at 12:32 PM, Jason Newton <nevion at gmail.com> wrote:
>
>
> On Fri, Aug 19, 2016 at 3:19 PM, William Stein <wstein at gmail.com> wrote:
>>
>> On Fri, Aug 19, 2016 at 8:19 AM, Jason Newton <nevion at gmail.com> wrote:
>> > You must realize that almost any other python driven way to compile
>> > c-code
>> > in the spirit these projects do is deprecated/dead.  Cython has absorbed
>> > all
>> > the reputation and users that didn't go to pure-c/boost.python -
>> > pybind11 is
>> > the new kid on the block there so I'm not including it (I'm of the
>> > opinion
>> > that SWIG users stayed unchanged).  Community belief/QA/designers/google
>> > all
>> > think of Cython first.  Weave has effectively closed up it's doors [...]
>>
>> May I ask why "any other python driven way to compile c-code in the
>> spirit these projects do is deprecated/dead?"    I'm curious since
>> when I started Sage (and Cython based on forking Pyrex), it was
>> because none of the other approaches seemed like they would work for
>> the developer base I envisioned growing for Sage.   That was a long
>> time ago, and I'm always pleasantly surprised that Cython has become
>> very popular.  However, I didn't realize the other approaches were
>> deprecated/dead.
>
>
> PyInline's last news update was in 2004 where the author gives a "Hats of[f]
> to PyRex", prior to that only a few blog entries in 2001/2002, I've not come
> across any project using it but maybe that is not sufficient to call it
> deprecated/dead?  Does it work with Python 3?
> http://pyinline.sourceforge.net/
>
> Pyrex no longer has a userbase.  Last ML post was 2014.
>
> Weave only supports python2, got ripped out of Scipy and also directs to
> check out Cython and strongly implies the project is all but
> dead/maintenance mode: https://github.com/scipy/weave
>
> Did I miss any of the python driven ways?

Pybindgen? And of course there's ctypes/cffi. I could have sworn I saw
another project pop up several years ago that was a lot like what
you're suggesting, e.g. a listing of

    def foo(a, b):
       [c code using a and b]

I don't recall how the types for a and b were declared/converted, and
I don't think it did much non-trivial stuff yet, but I can't find a
trace of it now (but it's hard to search for laking a name).


More information about the cython-devel mailing list