Opened 13 years ago

Closed 8 years ago

#6288 closed defect (fixed)

%lisp mode on the command line doesn't work. why?

Reported by: was Owned by: was
Priority: major Milestone: sage-6.1
Component: interfaces Keywords:
Cc: Merged in:
Authors: Mike Hansen, Frédéric Chapoton Reviewers: Frédéric Chapoton, Mike Hansen
Report Upstream: N/A Work issues:
Branch: u/chapoton/6288 Commit: 858adf2b9d70cd827cab3d7f221db5e3b883e8d6
Dependencies: Stopgaps:

Status badges


> Another thing that does not work is "sage -
> lisp" which gave the clisp prompt. I found this rather convenient
> since I could just use the clisp within sage. Is there any plan/
> interest to switch the this lisp interface to ecl? Does ecl use
> readline?

For now you can at least start sage then type

sage: !ecl

to start ecl.  It appears to not make any use of ecl.  I don't know if this is just
a compilation problem or an ecl limitation.

The Sage <--> lisp interface already works fine:

sage: lisp.eval('(+ 2 3)')

I'm not sure why %gap works but not %lisp:

sage: %lisp
ERROR: Magic function `lisp` not found.
sage: %gap
  --> Switching to Gap <-- 

Attachments (2)

trac_6288.patch (1.8 KB) - added by mhansen 9 years ago.
trac_6288_addon_pep8.patch (1.8 KB) - added by chapoton 9 years ago.

Download all attachments as: .zip

Change History (11)

Changed 9 years ago by mhansen

comment:1 Changed 9 years ago by mhansen

  • Authors set to Mike Hansen
  • Report Upstream set to N/A
  • Status changed from new to needs_review

comment:2 Changed 9 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:3 Changed 9 years ago by chapoton

ok, here is a review patch.

First I have made some minor formatting changes (pep8)

Next, I have corrected the part handling the bad names

Here is the list of interfaces with bad names:

[('gp', 'pari', PARI/GP interpreter),
 ('lisp', 'Lisp', Lisp Interpreter),
 ('sage0', 'sage', Sage),
 ('mupad', 'MuPAD', Mupad),
 ('lie', 'LiE', LiE Interpreter)]

I would prefer to avoid having the magic command "%sage" !

I also wonder if it is necessary to deprecate the bad names, instead of just using them as an alternative ?

Changed 9 years ago by chapoton

comment:4 Changed 9 years ago by chapoton

ping ?

comment:5 Changed 8 years ago by chapoton

  • Branch set to u/chapoton/6288
  • Commit set to 858adf2b9d70cd827cab3d7f221db5e3b883e8d6

New commits:

858adf2trac #6288 addon and cleanup
0fe6e44#6288: %lisp mode on the command line doesn't work. why?

comment:6 Changed 8 years ago by mhansen

The review patch looks good. I would probably prefer "%sage0" to "%sage". I'd rather deprecate the bad names so that there's just one consistent way to access them. But, I'm not too fussed either way about those two points.

comment:7 Changed 8 years ago by chapoton

Ok, so is there still something to do or not ?

comment:8 Changed 8 years ago by mhansen

  • Authors changed from Mike Hansen to Mike Hansen, Frédéric Chapoton
  • Reviewers set to Frédéric Chapoton, Mike Hansen
  • Status changed from needs_review to positive_review

I would say not. I'm fine with your patch.

comment:9 Changed 8 years ago by vbraun

  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.