[Pyrex] Pyrex and SAGE

William Stein wstein at gmail.com
Wed Nov 15 05:55:23 UTC 2006


Hi Greg,

Pyrex is *awesome*.  It's existence is one of the main reasons that
I choose Python as the main interpreter language for SAGE
(http://modular.math.washington.edu/sage/).

I have lofty goals for SAGE, and Pyrex plays a key roll
in them.  E.g., we have used Pyrex a *huge* amount already
in SAGE:

sha:~/d/sage/sage was$ cat */*.pyx */*/*.pyx */*.pxd */*/*.pxd |wc -l
     51162

Also, I've written code to inline Pyrex in Python scripts
(like scipy's weave, but for Pyrex), and make it easy to use Pyrex
  from an interactive GUI (put %pyrex at the beginning of a block in the
SAGE notebook).

However, there are numerous specific goals for SAGE that absolutely
require me to modify Pyrex.  For example, it's crucial
for SAGE that it be easy to view the source code of functions from
the interactive prompt, like IPython does with Python code (via
Python's inspect module).  I very recently added support to the SAGE
version of Pyrex so it can embed file and line number information in
docstrings, so now source code of Pyrex functions is easily viewable
 from IPython (this isn't released yet).  Also, Martin Albrecht and I
made numerous changes to properly support cimporting of modules defined
in other directories (this works very nicely now).

All these changes (and others) were easier than I thought they
would be, because you did an excellent job writing Pyrex in the first
place.   A potential problem is that the SAGE project is creating
a variant of Pyrex that is significantly different from yours.  In
particular, our version could (in theory -- hopefully not in practice!)
contain new bugs, misfeatures, and other things you would not be proud to
be attributed to you.   So what would *you* prefer I do?:

     (1) Continue to distribute the SAGE-modified Pyrex as "pyrex", and
         make it very clear that the SAGE version has numerous modifications
         from your version, and that questions should be directed to the
         sage-forum instead of the pyrex forum.

     (2) Distribute the SAGE-modified version, but give it a different
         name, e.g., "SageX" or "sage-pyrex", so nobody will confuse it
         with your Pyrex.  If we do this, it will be made *extremely*
         clear in README's, documentation,
         etc., that "SageX" is a based very heavily on Pyrex by you.
         Hopefully this could be viewed not as a fork, but as an adaptation
         of Pyrex for use in the SAGE project.

     (3) Make a concerted effort to convince you to include in the next
         official release of Pyrex many of the modifications that we've
         made for SAGE.

In all cases, SAGE is a very strongly open source project, and all of the
SAGE modifications to Pyrex will always be made freely available.  So
whatever you prefer it won't stop people interested in using Pyrex from
potentially benefiting from any SAGE work on Pyrex.

Best regards,

    William Stein
    Associate Professor of Mathematics
    University of Washington





More information about the Pyrex mailing list