On 8/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> no, the problem is most definitely still there, in both your and my
> example, even after installing the patch. it does produce interesting
> errors...
>

I can not reproduce these errors on the sage.math server (Linux) but
careful testing on MAC OSX of *exactly* the same code including the
axiom.py-0.3.patch, I find that it does *randomly* produce the kind of
errors you describe.

There followed a long night of debugging... I have finally determined
that the problem is caused by readline in Clisp. The use of readline
in the pexpect interface seems to cause problems on some systems but
not on others. I noticed that this problem does not occur in Maxima
even though Maxima is built using Clisp because Maxima itself is run
in the maxima.py interface with readline disabled. Unfortunately, so
far as I can tell there is no similar way to dynamically disable
readline in Axiom if it is built using Clisp. How this might be done
depends on the version of Lisp. I can find a method of GCL but not for
Clisp. If anyone knows how to do this (or even how Maxima does this
internally), please let me know.

So as a last resort I modified the Clisp spkg-install script to call

 ./configure --without-readline ...

and re-built Clisp without readline linked in. Then I recompiled
axiom4sage-0.3.1 and now everything is working properly on both Linux
and MAC OSX!

How much objection would there be to building Clisp in Sage without
readline support?

Regards,
Bill Page.

Test results:

Using my original script

---- copy -----
r=[0,3,32,375,5184,84035]
R=axiom(r).guessExpRat(); R
f=axiom('%s.1.function'%R.name()); f
f.type()
f.eval(axiom('n=5'))
f.eval(axiom('n=6'))
---- paste -----

I get the following when pasting it into a Sage console session:

[EMAIL PROTECTED]:~/sage-2.8$ ./sage
----------------------------------------------------------------------
| SAGE Version 2.8, Release Date: 2007-08-12                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
Loading SAGE library. Current Mercurial branch is: test
sage: r=[0,3,32,375,5184,84035]
sage: R=axiom(r).guessExpRat(); R

                       n
  [[function= n (n + 2) ,order= 0]]
sage: f=axiom('%s.1.function'%R.name()); f

           n
  n (n + 2)
sage: f.type()
Expression Integer
sage: f.eval(axiom('n=5'))
  84035
sage: f.eval(axiom('n=6'))
  1572864
sage: exit
Exiting SAGE (CPU time 0m0.05s, Wall time 0m24.78s).
Exiting spawned Axiom process.

And with Paul's script:

----- copy -------
k = var('k')
tmp = [rising_factorial(x,k)/falling_factorial(x,k) for k in range(5)]

pol1 = axiom(tmp[1])
pol1
pol1
pol1
pol4 = axiom(tmp[4])
pol4
pol4
pol4
pol4
pol4
pol4
pol4
pol4
pol1 = axiom(tmp[1])
pol1
pol1
pol1
pol1
pol1
pol1
pol1
pol1
---- paste --------

I get the result:

[EMAIL PROTECTED]:~/sage-2.8$ ./sage
----------------------------------------------------------------------
| SAGE Version 2.8, Release Date: 2007-08-12                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
Loading SAGE library. Current Mercurial branch is: test
sage: k = var('k')
sage: tmp = [rising_factorial(x,k)/falling_factorial(x,k) for k in range(5)]
sage:
sage: pol1 = axiom(tmp[1])
sage: pol1
  1
sage: pol1
  1
sage: pol1
  1
sage: pol4 = axiom(tmp[4])
sage: pol4

   3     2
  x  + 6x  + 11x + 6
  ------------------
   3     2
  x  - 6x  + 11x - 6
sage: pol4

   3     2
  x  + 6x  + 11x + 6
  ------------------
   3     2
  x  - 6x  + 11x - 6
sage: pol4

   3     2
  x  + 6x  + 11x + 6
  ------------------
   3     2
  x  - 6x  + 11x - 6
sage: pol4

   3     2
  x  + 6x  + 11x + 6
  ------------------
   3     2
  x  - 6x  + 11x - 6
sage: pol4

   3     2
  x  + 6x  + 11x + 6
  ------------------
   3     2
  x  - 6x  + 11x - 6
sage: pol4

   3     2
  x  + 6x  + 11x + 6
  ------------------
   3     2
  x  - 6x  + 11x - 6
sage: pol4

   3     2
  x  + 6x  + 11x + 6
  ------------------
   3     2
  x  - 6x  + 11x - 6
sage: pol4

   3     2
  x  + 6x  + 11x + 6
  ------------------
   3     2
  x  - 6x  + 11x - 6
sage: pol1 = axiom(tmp[1])
sage: pol1
  1
sage: pol1
  1
sage: pol1
  1
sage: pol1
  1
sage: pol1
  1
sage: pol1
  1
sage: pol1
  1
sage: pol1
  1
sage: exit
Exiting SAGE (CPU time 0m0.09s, Wall time 0m11.02s).
Exiting spawned Axiom process.
[EMAIL PROTECTED]:~/sage-2.8$

-----------

This now looks ok to me on both sage.math and on the MAC OSX test system.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to