rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

:lisp fails in fresh XMaxima (C1) #2361

Open rtoy opened 3 months ago

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-06 06:16:25 Created by macrakis on 2003-10-01 16:58:33 Original: https://sourceforge.net/p/maxima/bugs/410


In a newly-started Maxima, the :lisp syntax does not work on the first entry line:

(C1) :lisp (+ 2 3) <return> <<<nothing happens>>>

Adding a semicolon doesn't help:

(C1) :lisp (+ 2 3); <return> Incorrect syntax

If I control-G to Lisp, it *then* prints the result, 5. So it seems to be some sort of problem at the character- input level.

If I then :q back to Maxima, it still doesn't work.

However, if I control-G to Lisp and use (macsyma-top- level) to return to Maxima, it does work. But if I put (macsyma-top-level) at the end of my maxima-init file, it dies.

It also works if I control-G to Lisp, do (trace dbm-read), then return using :q.

It also works if I trace dbm-read or break-call in my maxima-init file.

My guess is that this has something to do with the tcl init setup, which apparently uses ":lisp (user::setup" etc. to initialize Maxima? But I can't follow the tcl code, and I certainly have no clue how to debug it!

Maxima 5.9.0 gcl 2.5.0 mingw32 W2k Athlon

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-06 06:16:26 Created by macrakis on 2003-10-01 23:06:45 Original: https://sourceforge.net/p/maxima/bugs/410/#b4bc


Logged In: YES user_id=588346

Aha! It turns out that it successfully evaluates the :lisp statement, but doesn't print its value until after it evaluates the next read:

(C1) :lisp (princ "foo")foo <= execs 1st print :lisp (princ "bar")foobar <= prints 1st value, execs 2nd print q;bar <= prints 2nd value (D1) q <= prints Maxima result

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-06 06:16:29 Created by robert_dodier on 2007-12-26 02:01:39 Original: https://sourceforge.net/p/maxima/bugs/410/#775d


Logged In: YES user_id=501686 Originator: NO

Change title to emphasize it is a XMaxima problem. Similar problem exists in recent Linux XMaxima version: result of :lisp (+ 2 3) is printed when the :lisp is the first input, but no new input label, although XMaxima is indeed awaiting input. A new input label is printed after subsequent :lisp inputs.

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-06 06:16:33 Created by robert_dodier on 2007-12-26 02:01:39 Original: https://sourceforge.net/p/maxima/bugs/410/#d9ef