On Feb 27, 1:30 pm, rjf <fate...@gmail.com> wrote:
> That's great.  I was concerned that stdio was getting lost in the
> shuffle.

Actually, presently we have a
(setf *standard-output* (make-broadcast-stream))
i.e., effectively a global redirect to /dev/null, because maxima has
quite a bit of output that is impossible to turn off. Obviously, for
any debugging, one should turn this back on. It also means that ecllib
is now somewhat less useful for tasks other than serving as a calculus
back-end (which is the only use of ecl in sage at the moment anyway).
This could be improved by making the output redirection part of our
maxima execution wrapper via a
(let ((*standard-output* *dev-null*)) ...)

> There are still cases which need to be caught like Lisp running out of stack
> space or memory, and the user deciding that Lisp has been running too
> long. Lisp provides some help via handler-case.

Yes it does. See, e.g., 
http://hg.sagemath.org/sage-main/file/f24ce048fa66/sage/libs/ecl.pyx#l154
Any serious condition that arises in Lisp gets rethrown as a python
exception.
In addition, to catch most maxima-specific errors, we need to run the
code inside a (catch 'macsyma-quit ...).

Getting Ctrl-C to work as desired was one of the more finicky bits
(and the present solution is still subject to a slight race condition
- but very few programs seem to handle SIGINT properly in absolutely
100% of the cases). See http://trac.sagemath.org/sage_trac/ticket/10818
. However, once ECLs own signal handlers are in place, the
corresponding conditions nicely come out and get rethrown as
exceptions.

-- 
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