gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Maxima] RE: [Gcl-devel] Using do-symbols in gcl (workaround)


From: Stavros Macrakis
Subject: RE: [Maxima] RE: [Gcl-devel] Using do-symbols in gcl (workaround)
Date: Sat, 11 Oct 2003 20:19:42 -0400

>> | (do-symbols (xx) (print xx)) prints out 484 symbols

> I'm not sure I understand how you did this as I don't 
> understand what GFACTORSUM has to do with do-symbols.  Could 
> you please show me what you typed at the Maxima prompt?

Sorry, I should have mentioned that this was at a Lisp prompt (gotten
with control-G). This is supposed to print all the Lisp symbols (in the
current package), one per line.  Instead, it prints out many symbols
(one per line), then Lisp crashes.  The actual number of lines it prints
(and hence the last symbol) varies a little bit.

I considered the possibility that the output from Maxima is somehow
causing a problem in the Maxima-to-tcl interface (magic string?  too
many short lines?  output coming too fast?  whatever), but it turns out
you don't need to print out the symbols, or do anything else with them.
At a Lisp prompt, (do-symbols (xx) nil)<cr><cr> causes the crash.

But, inspired by your question, I tried running this at the Maxima
level, using :lisp, as follows:

  (C1) 1;               <<<<< This is a workaround for bug 815984
  (D1)                                 1
  (C2) :lisp (setq ll nil)
  NIL
  (C2) :lisp (do-symbols (xx) (push xx ll))
  NIL
  (C2) :lisp (length ll)
  9976

So this is a workaround that works!  Inspired by this success, I tried a
break-level using (break), which also works fine!:

  (C2) :lisp (break)
  Break.
  Broken at SYSTEM::BREAK-LEVEL.  Type :H for Help.
  MAXIMA>>(setq ll nil)
  NIL
  MAXIMA>>(do-symbols (xx) (push xx ll))
  NIL
  MAXIMA>>(length ll)
  9976
  MAXIMA>>ll
  (INTERN PATHNAMEP COERCE STEP LAMBDA-BLOCK-CLOSURE WARN
          WITH-OUTPUT-TO-STRING STRING-NOT-LESSP BOOLE-ORC1 BOOLE-ORC2
          MAKE-STRING-INPUT-STREAM MAKE-STRING-OUTPUT-STREAM
       ......

My hypothesis now is that there is some interaction between the symbol
table mechanism (oblist or whatever) and the control-G break level in
Maxima.  

As for the to_lisp problem:

> (C5) to_lisp();
> To_lisp() seems to crash the interpreter directly.  Under 
> XMaxima I get a pop-up requestor with a message similar to 
> yours by running to_lisp():

Yes, this was reported by "starseeker" as bug #739547.  Though it would
be nice to have to_lisp() work, control-G or :lisp (break) are good
enough workarounds for now -- and now I have a workaround for the
do-symbols problem, too.  The popup you mention happens whenever the
Lisp process dies, thus terminating one end of the socket connection
between Lisp/Maxima and tcl.

        -s





reply via email to

[Prev in Thread] Current Thread [Next in Thread]