Ask Your Question

Stefan Witzel's profile - activity

2015-02-28 14:54:47 +0200 received badge  Student (source)
2015-02-28 10:34:49 +0200 asked a question Using from Python (breaking the monolith)

Sage contains a many libraries (or Cython wrappers to libraries) that would be useful in other Python programs (to me anyway). So I would like to use some of them isolated from within Python programs. I understand that this is not easily possible. Is it still possible at all? This is actually not so much about how to use Sage from Python but about carving pieces out of the monolithic structure of Sage. (At the moment it seems like I have to implement all kinds of stuff from scratch which seems silly since much of it is already there.)

Concretely: Among other things I want to compute with matrices that have entries in rings of Laurent series over finite fields.

Now you will say: just write a Sage script rather than a Python script. So here are my reasons to prefer Python with isolated libraries (in increasing order of importance):

  1. Practical: putting the full 1.5 GB (?) of sage in home on my office computer pushes me beyond the quota limit.
  2. Extendability: Not everything I need is available in Sage. But if I want to extend the code I will have do wade through the Sage code making changes here and there and then defend them against updates (and maybe adjust the build process). This seems like a lot of hassle.
  3. Verifiability: At some point my code will (hopefully) produce some solutions to some problem and I will want to say (maybe in a published paper) "these are solutions and they are all solutions to the problem". Then critical minds will not believe me and all I can say is: "Well, you only have to check the correctness of my 200 lines of code (say). -- Plus of course everything in the Sage git repository, plus the libraries it depends on (at least the part that my code uses, which you will have to work out for yourself); and make sure to patch in these changes I made here and there!"