#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):

 * Better organization of patches: Yes! Keep in mind that separate patches
 have served us well previously, though, when initial fixes were amended
 (e.g., lazy loading).

 * unicode_to_ecl: seems like a reasonable approach to me. ECL can support
 unicode, but that is probably not of much use to us. Should that one go on
 a separate ticket, though? (think bitrot)

 * doctest in http://trac.sagemath.org/sage_trac/ticket/7377#comment:88
 Perhaps the following helps. I tried that test on a pristine patched 4.6.2
 and it passed. Then I ran {{{make ptestlong}}} and now it fails -- also
 when run individually. So that would point to ptestlong changing
 something. Does it rewrite/invalidate some maxima cache somewhere?

 * errors: I realized I was not quite correct. Errors about inconsistent
 assumptions now get reported differently too.

 * effort on error messages: Exceptions get used as a program flow control
 tool (e.g., in the coercion system) so any extra effort on constructing an
 error message has the potential of slowing down the system. So if you want
 extra info in the error message, put it where the string is created. We're
 controlling both sides of the plumbing anyway. See the better-ask-error
 patch. You could change it to something like
 {{{
       (cond ((not print?)               ;;I'm not sure we want to honour
 this flag
              (setq print? t)
              (princ *prompt-prefix*)    ;;and I'm not sure we care about
 pre/suffices either
              (princ *prompt-suffix*))
             ((null msg)
              (princ "nothing")
             ((atom msg)
              (format t "~a~a~a" *prompt-prefix* msg *prompt-suffix*)
            ;;(format t "~a" msg )       ;;if we don't care about pre/suff
              (mterpri))
             ((eq flag t)
              (princ *prompt-prefix*)
              (mapc #'princ (cdr msg))
              (princ *prompt-suffix*)
              (mterpri))
             (t
              (princ *prompt-prefix*)
              (displa msg)
              (princ *prompt-suffix*)
              (mterpri))))))
       (princ " You maybe able to answer this by using assume(...)")) ;;put
 helpful advice here
 }}}

 * the same applies to the python_to_ecl error message: By using a
 "...%s..."%... in constructing the error message, you are slowing down the
 exception propagation. People can easily figure out which type it failed
 on by letting python drop into a debugger (%pdb 1) that allows them to
 analyze the local environment upon exception raising. (OK, you have to go
 "u" one time because pdb isn't terribly helpful with cython functions)

 * ecl+unicode: I doubt this patch solves it, since this implements
 something that was previously properly signalled by an exception, whereas
 the bugreport deals with a timeout. I suspect that bug might come from
 something in the other direction: ECL producing unicode that EclObject
 doesn't know how to deal with. I am sure this failure originates from
 __me__ being non-unicode compliant, since both ecl and python individually
 can handle this properly.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7377#comment:96>
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.

Reply via email to