Hi William,

On 22 Nov., 20:44, William Stein <wst...@gmail.com> wrote:
> > 2. IMHO, making libsingular "the perfect Singular interface" would
> > include to re-write any Sage code that currently relies on the pexpect
> > interface. And this would certainly be a lot of stuff to re-write.
>
> That's not clear to me.  Maybe the full singular command prompt could
> be used via a library interface?  After all, it is just a C++ program.

What I meant was: There is a difference between "being able to do
sth." and "doing sth."

I am rather sure that there is much code in Sage and probably third
party code as well that uses Singular via pexpect interface. It  is
one thing to say to the authors of that code: "Meanwhile you can do
all this via libsingular" (as much as I understood, it *is* now
possible). But it is a completely different thing to make the authors
change all their code so that it *does* use libsingular.

Hence, if a small change in the singular pexpect interface reduces the
overhead by 2/3 then a lot of code would benefit - thus, such small
change is worth-while.

>     The C interface to GAP that I wrote just involves rewriting the
> GAP read-eval-print loop (the command line interface) and turning it
> into C library calls.  I literally just stick some data in where the
> read would put it, then tell GAP that it just read something in, so go
> evaluate it, etc.

I didn't know that there was so much progress - I remember someone
mentioning that certain internal aspects of GAP would make the
creation of "libgap" difficult.

Here is my personal list of pros and contras.

Improving the text interfaces by replacing pexpect:
- Such radical change (as suggested by Alex) would probably involve
much new library code to be written.
+ AFAIK, text interfaces *will* remain important in Sage
+ Lots of existing code would benefit.

Improving pexpect by reducing the latency time of pseudo terminals:
- I doubt that Sage can change it, as this sounds like the job of a
system administrator.
+ Users might be happy if they can find an explanation in the manual
how they (or their sys admin) can improve the performance of all
existing interface-intensive Sage programs.

Reducing the particular overhead of the Singular interface:
+ The changes I am suggesting are small (doc tests pass, so, I guess I
can post a patch tomorrow)
+ Lots of existing code would benefit.

Make libsingular applicable in a broader range of functionality:
+ (a BIG plus) If something can be done via C API then it is certainly
better than a text interface.
- Existing code would not benefit.

Everything has pros. So, simply one has to decide about one's
priority. Mine is to reduce the latency time on my machine and to
reduce the singular interface overhead, since that seems to involve
both the most impact on my work in cohomology and the least effort.

Cheers,
Simon

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to