Hi all,
In a thread over at [sage-support] William wrote:
> I've suggested numerous times that we should massively refactor the
> sage library to be a bunch of smaller Python libraries, develop them
> say on github (?), use Pypi and pip. If people would realize how
> important it is that we revamp how Sage development is done in a much
> less monolithic way, and better using existing tools, then I would be
> happy and enjoy watching as people do the revamp (e.g., like happened
> with switching from Mercurial to Git, which I didn't do much on, but
> definitely supported).
I don’t mean to restart a general strategy/development discussion here,
but perhaps turning Sage into a bunch of smaller Python libraries is
something which can be accomplished step-by-step.
In particular, I am *very* interested in turning Sage’s interrupt
handling into something that can be easily installed from PyPI. For
those who don’t know what Sage’s interrupt handling does: it allows that
you can press Ctrl-C to interrupt long running C code and that crashes
in a library do not necessarily crash your Python shell. It is a
difference between night and day to interface with external C/C++ code
From Python without and with it.
Having this code available outside of Sage enables, for example, to turn
some of our C/C++ library interfaces into stand-alone libraries[^1], like
I’ve done with our fplll interface at
https://github.com/malb/fpylll
Sage’s interrupt handling lives at
https://github.com/sagemath/sage/tree/master/src/sage/ext/interrupt
I think the technical challenges are manageable. I’m using a copy of it
separately in
https://github.com/malb/fpylll/tree/master/src/fpylll/interrupt
without issues. Making this code independent would mean one big patch
to the library, though, where we replace all
include 'sage/ext/interrupt.pxi'
with an appropriate new line depending on where we’d install the file.
My question is: am I overlooking some technical challenge or another
reason why making this code independent could be a problem?
I’m happy to put some work into this, in case you’re wondering.
Cheers,
Martin
[^1]: Okay, there’s also the small issue of how to do type conversion
Sage ←→ library in a nice modular yet fast way, but one step at a time.
--
_pgp:
https://keybase.io/martinralbrecht
_www:
https://martinralbrecht.wordpress.com
_jab:
martinr...@jabber.ccc.de
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF