Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed prompt repeating due to GCL's own readline enabled by default #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

binghe
Copy link

@binghe binghe commented Jun 30, 2022

Hi,

Currently all Axiom commands are repeated after hitting enter, e.g. below is some usage of August 2014 binary release:

This function is obsolete -- use SET-STARTING-HOLE-DIVISOR instead
                        AXIOM Computer Algebra System 
                        Version: Axiom (August 2014)
                Timestamp: Monday July 28, 2014 at 04:12:34 
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave AXIOM and return to shell.
   Visit http://axiom-developer.org for more information
-----------------------------------------------------------------------------
 
   Re-reading interp.daase
   Re-reading operation.daase
   Re-reading category.daase
   Re-reading browse.daase
(1) -> 
(1) -> 0
(1) -> 
   (1)  0
                                                     Type: NonNegativeInteger
(2) -> 1
1
(2) -> 
   (2)  1
                                                        Type: PositiveInteger
(3) -> integrate(x^2,x)
integrate(x^2,x)
(3) -> 
        1  3
   (3)  - x
        3
                                          Type: Polynomial(Fraction(Integer))
(4) -> )quit
)quit
   Please enter y or yes if you really want to leave the interactive 
      environment and return to the operating system:
y
y

I found that this issue has a simple root cause: when building GNU Common Lisp, it has linked with libreadline by default and GNU's own command line editing is disturbing Axiom's own clef facility, causing the whole issue.

The simple solution is to disable readline when building GCL. (This also makes the Linux binary release run on more distribution, because different Linux has different versions of libreadline.) Below is a new sample usage (on Mac OS X) after applying my patch:

                        AXIOM Computer Algebra System
                          Version: Axiom (May 2017)
               Timestamp: Thursday June 30, 2022 at 10:59:57 
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave AXIOM and return to shell.
   Visit http://axiom-developer.org for more information
-----------------------------------------------------------------------------
 
   Re-reading interp.daase
   Re-reading operation.daase
   Re-reading category.daase
   Re-reading browse.daase
(1) -> 
(1) -> 0                  

   (1)  0
                                                     Type: NonNegativeInteger
(2) -> integrate(x^2,x)

        1  3
   (2)  - x
        3
                                          Type: Polynomial(Fraction(Integer))
(3) -> 

Regards,

Chun Tian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant