#19084: libSingular functions' ring parameter defaults to the last used ring
-------------------------------------+-------------------------------------
Reporter: klee | Owner:
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-6.9
Component: interfaces | Resolution:
Keywords: | Merged in:
Authors: Kwankyu Lee | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/klee/libsingular | f4d7ffc4e5499913919ec6c8efe4140b91502134
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by klee):
Replying to [comment:3 nbruin]:
> Could you just change the initial assignment to `last_ring` to
> {{{
> last_ring=PolynomialRing(QQ,"dummy",1)
> }}}
This seems better. I will do it.
> There are some reasons why using a dedicated dummy ring might be nicer
than reusing arbitrary objects for the purpose:
> - by making global links to arbitrary objects, where the global link
has a rather unpredictable lifetime, you're making garbage collection and
detection of memory leaks harder.
I don't understand this very well, mainly because I don't have a good
sense about the garbage collection and memory leaks problems.
> - you're making a link to a globally unique object. In principle,
you're allowed to do so, but this can have very subtle effects on the
system, because it can change the minimal lifetime of all kinds of related
objects. So for the sake of sanity in debugging elsewhere, it might be
better to not do this.
I don't understand this...
> A pro of your current approach is that you might avoid having to create
a dummy ring, thus saving the slight memory penalty for it.
This is not true since a dummy ring is created initially.
A pro of my approach, I think, is reusing the user's "current" ring, thus
minimizing switching of the internal Singular (current) ring, which seems
a good thing.
As I am not sure about the seriousness of the issues you raised, I will
wait for Martin's opinion about this. If the two experts, Martin and you,
concern about my approach, then I will adopt your suggestion.
--
Ticket URL: <http://trac.sagemath.org/ticket/19084#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.