xmaxima situation summary



Vadim V. Zhytnikov ÐÉÛÅÔ:
> Valery Pipin ÐÉÛÅÔ:
> 
>> On Thursday 26 February 2004 03:40, Vadim V. Zhytnikov wrote:
>> |snipped|
>> | It is not clear from your post what is the situation with xmaxima
>> | on Unix. I've just tried xmaxima on Linux with gcl, clisp, cmucl
>> | and sbcl. It seems that it works with clisp only.
>> On my system xmaxima works with gcl
>> | BTW maxima server mode don't work on sbcl producing Lisp error.
>> I confirm this. The system is debian-sid and maxima is taken from cvs.
>>
> 
> Never mind sbcl - I forget that xmaxima didn't work
> with sbcl before recent maxima/xmaxima changes.
> 
> But gcl and cmucl still are problem to me.
> I've build Maxima CVS with gcl 2.6.1 CVS, clisp 2.32
> and cmucl 18e.
> 
> xmaxima-local -l clisp - works fine.
> 
> xmaxima-local -l gcl - starts maxima but
> maxima subprocess terminates with the
> message "exiting on eof" after very first
> command.
> 
> xmaxima-local -l cmucl - starts maxima
> but if I try to enter any command - just
> nothing happens - cmucl maxima still
> hangs in the background.
> 
> On the other hand if I grab xmaxima
> and server.lisp from older Maxima release
> and copy these two files into my build
> directory - xmaxima-local works fine
> with all three lisps.
> 
> Looking at the tiny difference between
> new and old xmaxima and server.lisp I
> don't quite understand how this could be.
> 

I've been trying to understand why new xmaxima doesn't work to me
with all lisp on Linux and it seems that I've got a rough idea
about what is going on.
There is only one subtle difference between new
    maxima -s PORT
and old
    maxima -p server.lisp -r ":lisp (user::setup PORT)"
way to start maxima server.  In the new scheme socket
connection is initialized at the very beginning of maxima session
before maxima banner is printed.  While with old scheme
socket is initialized _after_ maxima banner.
It seems that xmaxima read-eval-print loop is too fragile and this 
banner confuses xmaxima.  In particular if I replace
standard maxima banner by some "bla bla bla" then new
xmaxima works with gcl without trouble. Unfortunately this is
not the case with cmucl.  xmaxima -l cmucl hangs even if
I make maxima banner empty. Certainly the issue can be
debugged further and the right resolution is to make xmaxima
read-eval-print loop more robust with the help of
*prompt-prefix*/*prompt-suffix* etc.  But I venture to
suggest a workaround - partial fallback to older scheme
in xmaxima

<     lappend command -s PORT
---
 >     lappend command -r ":lisp (setup-server PORT)"

 From xmaxima point of view we return to old scheme
and it works to me on Linux with all three lisps -
gcl, clisp and cmucl.  Maybe it will help to resolve
xmaxima problem on Win 95 as well.  I strongly believe so
since old xmaxima used to wok well on Win 95 (well Win 98SE
and Win Me I newer tried maxima 5.9.0 on Win 95 but I'll be
surprised to find any difference).


-- 
      Vadim V. Zhytnikov

       <vvzhy@mail.ru>
      <vvzhy@netorn.ru>