Ask Your Question
5

A non-web based GUI for SAGE

asked 2015-06-27 12:03:28 -0500

shivams gravatar image

Is their any GUI for SAGE which is not web-based and close to Mathematica in features?

The current web-based GUI is good and its cross-platform capabilities and being able to serve ovver the network is all good. However, when someone coming from Mathematica background uses this UI, it feels inferior, mainly because it is not so keyboard friendly as Matheamatica. This is one major reason why many Mathematica users are still hesitant on moving to SAGE.

Can someone let me know if there is some other non-web based UI for SAGE or if there is some work in progress in this direction?

edit retag flag offensive close merge delete

Comments

I do not know of any such work.

kcrisman gravatar imagekcrisman ( 2015-06-27 22:33:09 -0500 )edit
2

Have you tried to run Sage in the ipython notebook (now called Jupyter notebook):

sage -n ipython

Regarding keyboard friendship, it has automatic parenthesis completion and colored syntax.

eric_g gravatar imageeric_g ( 2015-06-28 03:33:29 -0500 )edit

5 answers

Sort by » oldest newest most voted
3

answered 2018-01-18 23:54:04 -0500

slelievre gravatar image

You can also use Sage within TeXmacs.

See also the TeXmacs Sage mode page on the Sage wiki.

Finally, see Interfaces to Sage from other software, which I guess could be enriched with the answers that were given here.

edit flag offensive delete link more
3

answered 2018-01-16 13:49:28 -0500

Sébastien gravatar image

updated 2018-01-17 07:38:29 -0500

A nice GUI that will take more and more place in the future is jupyterlab. A recent article (Nov, 2017) speaks about it on medium.com.

Installation (edited, thanks to tmonteil comment):

sage -pip install jupyterlab

Usage:

sage -n jupyterlab
edit flag offensive delete link more

Comments

There is no jupyterlab package (yet), the install command is:

sage --pip install jupyterlab

Note that it is web-based though.

tmonteil gravatar imagetmonteil ( 2018-01-16 14:39:16 -0500 )edit

Is it possible to install this if I'm running the Mac OS X app version (SageMath 8.0)? There is the problem of pip not working with SSL. I tried downloading jupyterlab and installing from the download path -- as per the instructions at https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?answer=38773#post-id-38773 (https://ask.sagemath.org/question/387...) -- but it seems to have dependencies, such as jupyterlab_launcher which it then can't download.

Simon Willerton gravatar imageSimon Willerton ( 2018-01-17 04:53:20 -0500 )edit

I definitely was able to use jupyter_lab with my mac last summer. But my mac died during Fall, so I can't test anything anymore to help. My guess would be that the easiest for your would be to make sage -pip work by fixing the SSL problem maybe by doing sage -f openssl ?

Sébastien gravatar imageSébastien ( 2018-01-17 07:44:52 -0500 )edit

Note that if you install openssl via Sage, you have to recompile python2 and pip, so that they can use it:

sage -f python2
sage -f pip

and probably (from Sage tree):

make build
tmonteil gravatar imagetmonteil ( 2018-01-17 09:13:50 -0500 )edit

Thanks, that worked! I did sage -f on openssl, python2 and pip. I didn't do the make build. (Although I had to temporarily move /opt/local as sage complained about "found MacPorts in /opt/local/bin/port".) Then jupyterlab installed fine.

Simon Willerton gravatar imageSimon Willerton ( 2018-01-17 14:49:21 -0500 )edit
2

answered 2018-01-16 09:28:28 -0500

Emmanuel Charpentier gravatar image

sage_shell_mode is a very nice Sage mode for Emacs. Using it is a bit different from using a notebook (but it has some notebook-emulating features, which I don't use very often...), and is a very nice way to prepare a text+maths document (thanks to SageTeX, among others), which I tend to prefer to notebooks for "serious" (i. e. intended for publication/lecture/meeting/etc...) use. The infinite emacs customizability should be enough even for even the most rabid Mahematica user.

Furthermore, the openness of Sage allows its use in a zillion ways not possible with Mathematica, Which, IMNSHO, is the point...

edit flag offensive delete link more
2

answered 2018-01-17 12:36:03 -0500

dan_fulea gravatar image

updated 2018-01-17 12:36:44 -0500

This may be an answer to a different question, since i never used Mathematica in mathematical research, (and teaching was done with a University licence,) but please allow it.

First of it is not clear from the post what kind of UI (user interface) is meant. If something like

https://mathematica.stackexchange.com/questions/54631/mathematica-user-interface-tutorial

is the UI, then just use notebook, web based.

I also have no idea which keyboard shortcuts make the work friendly in Mathematica. Please add this information, then there will be also more pointed answers. Personally, i have the following modi of research work in sage, and for any of them there is the right key binding solution.

  • Quick code to get a quick answer to a relatively simple question (involving complicated structure, that i have already understood). Then i start a linux terminal, inside of it start sage by typing sage, this gives the iron python interpreter with automatical support for classes and methods. For instance, after typing the TAB (tabulator, twice) we get the list of all methods that can be applied on the object a,

    sage: a = 2018
    sage: a.abs<TAB><TAB>
           a.abs                         a.conjugate                   a.dump                         
           a.additive_order              a.coprime_integers            a.dumps                        
           a.base_extend                 a.crt                         a.euclidean_degree             
           a.base_ring                   a.dat                         a.exact_log                    
           a.binary                      a.degree                      a.exp
    

    And there is a direct access to "kernel" information on the used objects:

    sage: a.__class__
    <type 'sage.rings.integer.Integer'>
    

    Note that a is already a complicated object, not a dummy python integer. To get its divisors, we can type a.di, then the TAB(s), the list of the methods is

    sage: a.di<TAB><TAB>
               a.digits                      a.divides                     
               a.dist                        a.divisors                    
               a.divide_knowing_divisible_by
    

    we type three more letters and then TAB again, finally the (). And here we have them:

      sage: a.divisors()
      [1, 2, 1009, 2018]
    

    Here, it is very useful to see the names of the methods, a potential student learning - say - something about number fields, could type K.<u> = QuadraticField( 2019 ), then K.<TAB> and see all names of methods related / applicable for this kind of instance. This is already a lot of comfort! Note also that typing

    a.divisors?
    

    gives a description of the method, and also examples to get started. Moreover, a.divisors?? gives the code, and many sage users will never switch to Mathematica for this one reason.

    Many features of iron python work, e.g. Control+A to get to the beginning of the line, Control+E for its end, Control+R to reverse search, e.g.

    sage: a.divisors()
    
    
    I-search backward: a.
    

    (here i typed Control+R, then a., the last command i had with a. appears, enter gets it.) Also, %cpaste allows to paste into the interpreter bigger code chunks. (Shift+Insert inserts them. Enter would then further evaluate the lines.)

  • The second case is when i am trying to get some research project work, for instance writing the matrix of some element of the Iwahori-Hecke-algebra acting on some special Kazhdan-Lusztig cell. Then, as in the previous answer of Emmanuel Charpentier, i am starting emacs, use pyhton mode, and get best key bindings i need, e.g. automatic extension of names, after binding dabbrev-expand to some key (e.g. F1), and a customized syntax highlight. The code can then be executed either in an emacs shell, or loaded in a sage terminal.

  • The third use case has no parallel in Mathematica. This is when i have a bug. Then i start eclipse and debug inside the one method that failed. Step by step. I can initialize somewhere in the code some Kazhdan-Lusztig cell and run a unit test against the method that failed. (A new dimension occurs, while finding the error, there may be immediately a need to change / extend the code, yes, one can do it. For herself / himself for the sake of the own project, or sharing the idea with the world. It is the last chance, that made and makes sage so strong. Even a typo corrected in an example is a great job to contribute!)

These three "user interfaces" are all i need in sage: the ipyton interpreter with the sage preprocessing, emacs as an editor for a longer work and own design of classes (in an object oriented language), and eclipse (or pycharm) for debug.

edit flag offensive delete link more
1

answered 2018-01-16 08:36:47 -0500

dg.aragones gravatar image

updated 2018-01-16 08:38:55 -0500

I know about two:

I've posted the following related question: https://ask.sagemath.org/question/406.... If you manage to configure one of them, let us know =).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-06-27 12:03:28 -0500

Seen: 3,249 times

Last updated: Jan 18