#7377: Symbolic Ring to Maxima via EclObject
-----------------------------------------------------------------------+----
Reporter: nbruin |
Owner: nbruin
Type: enhancement |
Status: needs_work
Priority: major |
Milestone: sage-feature
Component: symbolics |
Keywords:
Author: Nils Bruin, Jean-Pierre Flori |
Upstream: N/A
Reviewer: Jean-Pierre Flori, François Bissey, Karl-Dieter Crisman |
Merged:
Work_issues: |
-----------------------------------------------------------------------+----
Comment(by nbruin):
Replying to [comment:98 kcrisman]:
> Is there a way to format the returned message in a similar way to how it
currently happens (so that your ellipses above are filled in)?
Yes, you could do the string processing in lisp, but in that case you may
want to intercept that various ask... routines to preformat the question
that gets sent to retrieve to begin with. Those should have more
structured information on what question is asked, so formatting the
question differently there should be quite cheap. However, there are two
points why I think it's a bad idea anyway:
* The advice currently is wrong! Why would "...>0" be the right thing?
That just propagates a kind of halfbrained trial-and-error mathematics
that I cannot bring myself to endorse. The proper advice is for the user
to read up on the assume(...) facility.
* There are big problems with relying on the print names of symbols
agreeing between maxima and sage. Now that we're moving away from string-
based communication it would be quite easy to let SR("x") correspond to
EclObject("$SAGE-SYMBOLIC-VARIABLE-4711"). The actual question that maxima
asks is not so enlightening anymore in that situation.
In fact, currently, the advice already leads to errors
{{{
sage: my_symbolic_n=SR.var('n')
sage: limit(x^my_symbolic_n,x=oo)
TypeError: Computation failed since Maxima requested additional
constraints (try the command 'assume(n>0)' before integral or limit
evaluation, for example):
Is n positive, negative, or zero?
sage: assume(n>0)
AttributeError: 'bool' object has no attribute 'assume'
sage: n
<function numerical_approx at 0x18e0410>
}}}
so the user actually has a good reason to not shadow the python binding of
n, but of course the print name n for a symbolic variable is very
desirable. You CANNOT assume that the print name corresponds with the
python variable bound to your object and sage SHOULD NOT propagate such
assumptions in its error messages. It's nice to make a program accessible
to starters but not at the expense of allowing them to progress to
experienced users.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7377#comment:99>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.