Some questions about Sage goals

72 views
Skip to first unread message

cool-RR

unread,
Nov 19, 2009, 12:20:40 AM11/19/09
to sage-devel
I'm a newbie to Sage. There are a few things I don't understand, I
hope someone can explain. I may be making an idiot of myself here,
please be patient and explain to me.

I understood that the goal is to take from the huge corpus of
available mathematical algorithms and packages, and combine them in
one seamless package (Which is a huge amount of work, of course.) Is
that true?

I think that is a very important goal. But I see Sage, and there are
things I don't understand. (Note: last time I installed Sage was about
a year ago, though in the last week I've been playing with it again on
the web interface.)

I understand that you have to run Sage as a sort of server. I remember
I had to use VMWare. And then you access it from the browser, and it's
an AJAX thing that makes it behave like a notebook.

Why? Why not something like Mathematica, where you just open a normal
program and have a place where you can just type text?

Also, that AJAX thing, while pretty impressive relatively to something
that's being done in the browser, doesn't display expressions nicely,
in "mathematical style", but instead shows them in "programmer style".
Don't you think it's a big disadvantage?

Sorry if I'm missing obvious things. Please enlighten me.

Ram.

Jan Groenewald

unread,
Nov 19, 2009, 12:39:15 AM11/19/09
to sage-...@googlegroups.com
Hi

On Wed, Nov 18, 2009 at 09:20:40PM -0800, cool-RR wrote:
> I understood that the goal is to take from the huge corpus of
> available mathematical algorithms and packages, and combine them in
> one seamless package (Which is a huge amount of work, of course.) Is
> that true?

Yes, but adding a huge amount of native sage code, and as a process
improving non-native code or replacing with native code where necessary.

> I understand that you have to run Sage as a sort of server. I remember
> I had to use VMWare. And then you access it from the browser, and it's
> an AJAX thing that makes it behave like a notebook.
> Why? Why not something like Mathematica, where you just open a normal
> program and have a place where you can just type text?

The sage server has a shell (terminal, command-line) interface.
It is based on the excellent ipython shell which has additional
features over python (tab completion, better help, and loads more).

The notebook is a friendly graphical interface. A web browser/ajax
interface *IS* a "normal program" too. It has additional advantages
for access over the internet!!

Both provide a seamless interface to all the constituen "non-native"
parts instead of opening each part's idea of a "normal program". The
best ideas of those other programs are used in the notebook.

The web interface is also way more platform independent than
any normal program.

As SAGE is unix based, the VMware is necessary to run on a windows
platform. Consider a user friendly Linux distribution like Ubuntu
or whatever is common where you work/study, as you can then run
SAGE natively.

> Also, that AJAX thing, while pretty impressive relatively to something
> that's being done in the browser, doesn't display expressions nicely,
> in "mathematical style", but instead shows them in "programmer style".
> Don't you think it's a big disadvantage?

You can check a "display" option in the top of the notebook to
display all equations as pretty. Both pretty and programming
styles (text, usable by other programs, which is important)
are available. For a sinlge expression use
show(x)
instead of
x
to see the pretty display.

Perhaps the bigger shortcomings are some IDE like functionality
for autocompletion, some of which is already in there, syntax highlighting
and the like. Due to the intensive processing slowing down the notebook
interface some have been removed and are being worked on.

regards,
Jan

--
.~.
/V\ Jan Groenewald
/( )\ www.aims.ac.za
^^-^^

Tom Boothby

unread,
Nov 19, 2009, 12:42:56 AM11/19/09
to sage-...@googlegroups.com
1) There's a Windows port underway. We'd LOVE for Sage to be a native
windows app, despite all of the headache that doing that will cause
for some people around here. This "huge corpus of available
mathematical algorithms and packages" is largely unsupported on
Windows, so the main sticking point for the Windows port is that it's
a windows port of a huge corpus of available mathematical packages,
which are even hard to get running in Solaris (another Unix)!

2) The notebook can make math look awesome; much better than
mathematica IMHO. Now, we don't support the gui editing of formulas
like they do; but you can make the output quite nice. For example,
here's something that I wrote up recently

http://sagenb.org/home/pub/1087/

3) Sage is almost entirely supported by volunteers. Want a sexy gui?
Write one! Want a native Windows app? Get crackin'!
> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel-...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org

Alex Clemesha

unread,
Nov 19, 2009, 1:01:44 AM11/19/09
to sage-...@googlegroups.com
On Wed, Nov 18, 2009 at 9:42 PM, Tom Boothby <tomas....@gmail.com> wrote:
1) There's a Windows port underway.  We'd LOVE for Sage to be a native
windows app, despite all of the headache that doing that will cause
for some people around here.  This "huge corpus of available
mathematical algorithms and packages" is largely unsupported on
Windows, so the main sticking point for the Windows port is that it's
a windows port of a huge corpus of available mathematical packages,
which are even hard to get running in Solaris (another Unix)!

2) The notebook can make math look awesome; much better than
mathematica IMHO.  Now, we don't support the gui editing of formulas
like they do; but you can make the output quite nice.  For example,
here's something that I wrote up recently

http://sagenb.org/home/pub/1087/

Wow, that is quite nice - beautiful really.

I like this choice too:  <style>#jsMath_Warning {display: none}</style>.

-Alex




 



--
Alex Clemesha
clemesha.org

cool-RR

unread,
Nov 19, 2009, 1:05:05 AM11/19/09
to sage-devel
>
> As SAGE is unix based, the VMware is necessary to run on a windows
> platform. Consider a user friendly Linux distribution like Ubuntu
> or whatever is common where you work/study, as you can then run
> SAGE natively.

I don't understand. Imagine a non-computer-savvy scientist who uses
Windows and wants to use Sage. I imagine this is a pretty big
percentage of scientists. Are you telling him, "To use Sage you must
operate a VM, or switch operating system"?

P.S. Can Mac users run Sage natively?

Ram.

Mike Hansen

unread,
Nov 19, 2009, 1:07:27 AM11/19/09
to sage-...@googlegroups.com
On Thu, Nov 19, 2009 at 1:05 PM, cool-RR <ram.r...@gmail.com> wrote:
> I don't understand. Imagine a non-computer-savvy scientist who uses
> Windows and wants to use Sage. I imagine this is a pretty big
> percentage of scientists. Are you telling him, "To use Sage you must
> operate a VM, or switch operating system"?

Yes, for now. Much of the existing software that Sage depends on does
not work in Windows currently.

> P.S. Can Mac users run Sage natively?

Yes, they can. Mac OS X is much more Unix-like than Windows.

--Mike

Jan Groenewald

unread,
Nov 19, 2009, 1:37:59 AM11/19/09
to sage-...@googlegroups.com
Hi
Those options are not so bad! Especially the VM is quick and
non-invasive and easy. I'll retract the second

Operating a VM is more trivial than operating SAGE.
Especially virtualbox :)

1. Click http://download.virtualbox.org/virtualbox/3.0.12/VirtualBox-3.0.12-54655-Win.exe
The step one in the READMEs direct you to the virtualbox page with whatever versions
are the latest, I linked directly above for your convenience.
and install. Ask if you need to know about options. Then open the resulting Virtualbox VM.
2. Import the SAGE VM. Uhm, and now I need to direct some queries to the webmaster.

( Webmaster: can these be consolidated?
http://www.sagemath.org/mirror/win/README.txt
http://www.sagemath.org/mirror/win/README-vmware.txt

Are they VMWARE versus Virtualbox?? Is VMWARE outdated
and virtualbox recommended?

Step 2: Where is the SAGE ovf file? Should one have downloaded
it? I'm reading the README.txt on the web, and don't know how
to find sage.ovf in the same folder. I even tried editing the
url, and sage.ovf wasn't there. I have not followed these
instructions, I'm a Linux-only user. )

> P.S. Can Mac users run Sage natively?

Yes. http://www.sagemath.org/download-mac.html
It is trivial. Click SAGE, or type sage in a terminal,
and to use the GUI (as the first message says),
type notebook().



Lastly, native porting is in progress for windows too!

Martin Albrecht

unread,
Nov 19, 2009, 4:42:17 AM11/19/09
to sage-...@googlegroups.com
> > I understand that you have to run Sage as a sort of server. I remember
> > I had to use VMWare. And then you access it from the browser, and it's
> > an AJAX thing that makes it behave like a notebook.
> > Why? Why not something like Mathematica, where you just open a normal
> > program and have a place where you can just type text?
>
> The sage server has a shell (terminal, command-line) interface.
> It is based on the excellent ipython shell which has additional
> features over python (tab completion, better help, and loads more).

Strictly speaking this isn't true. The command line interface does not use any
client-server methodology, it is "just" iPython + the huge Sage Python
library.

So Sage can be used:
- as a "normal program"
- as a local webserver with an HTML interface
- as a server over the network
- as a library in one's Python scripts

Cheers,
Martin

--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://www.informatik.uni-bremen.de/~malb
_jab: martinr...@jabber.ccc.de

Dr. David Kirkby

unread,
Nov 19, 2009, 5:20:03 AM11/19/09
to sage-...@googlegroups.com
cool-RR wrote:
> I understand that you have to run Sage as a sort of server. I remember
> I had to use VMWare. And then you access it from the browser, and it's
> an AJAX thing that makes it behave like a notebook.
>
> Why? Why not something like Mathematica, where you just open a normal
> program and have a place where you can just type text?


I like Mathematica, but a web based interface does not exist for it.
(webMathematica has some uses, but its hardly too useful). I wrote a web based
interface for Mathematica

http://witm.sourceforge.net/

Here's a screen shot of it on a PDA

http://witm.sourceforge.net/pda.php

but it is primitive by Sage standards. Whilst the Mathematica GUI is fine when
you want to look at results yourself, it is not very practical when you want to
share them with others, who might be in a different country.

I for example was some time ago doing some work in the UK, collaborating with
people in two other European countries. The ability to show others results and
let them make changes over the web would have been a huge advantage over
anything Mathematica could have done.

Then factor in the fact that few companies have Mathematica licenses, and you
can see just how bad Mathematica is when you want to collaborate outside
academia. (I base the fact that few companies use Mathematica on the fact that
I've come across none myself, and a search of job adverts on monstir.com,
PhdJobs etc requiring Mathematica skills brings up very few results.

In contrast, do the same for MATLAB or Labview, and you will find that those
products are used in industry, but I do not believe Mathematica is a lot,
despite the impression Wolfram Research like to give.


Dave

Harald Schilly

unread,
Nov 19, 2009, 10:55:26 AM11/19/09
to sage-devel
On Nov 19, 7:37 am, Jan Groenewald <j...@aims.ac.za> wrote:
> Is VMWARE outdated
> and virtualbox recommended?

There is no vmware image. The vmware instructions are just for
reference and they were used some time ago.

But you do not need them at all. If you download the virtualbox image,
you have a zip file. Extract it and there is the readme once again -
then it makes more sense.

The idea behind a virtual appliance, as it is used there, is to be
"open" and allow the same images to be used across different virtual
environment engines. But, I don't know if this is tested of if there
are any problems with that ... for now, this virtualbox image is our
top download and there are nearly no problem reports with that one.
Therefore, it has the best "quality".

H

Harald Schilly

unread,
Nov 19, 2009, 10:58:28 AM11/19/09
to sage-devel
On Nov 19, 6:20 am, cool-RR <ram.rac...@gmail.com> wrote:
> Why? Why not something like Mathematica, where you just open a normal
> program and have a place where you can just type text?

The simple answer is, that it is much easier to build a webservice
like that, than building a GUI. There are several benefits with that
approach and developer resources are very limited in a project
consisting of volunteers.

H

William Stein

unread,
Nov 19, 2009, 11:13:06 AM11/19/09
to sage-...@googlegroups.com
On Thu, Nov 19, 2009 at 1:42 AM, Martin Albrecht
<ma...@informatik.uni-bremen.de> wrote:
>  > > I understand that you have to run Sage as a sort of server. I remember
>> > I had to use VMWare. And then you access it from the browser, and it's
>> > an AJAX thing that makes it behave like a notebook.
>> > Why? Why not something like Mathematica, where you just open a normal
>> > program and have a place where you can just type text?
>>
>> The sage server has a shell (terminal, command-line) interface.
>> It is based on the excellent ipython shell which has additional
>> features over python (tab completion, better help, and loads more).
>
> Strictly speaking this isn't true. The command line interface does not use any
> client-server methodology, it is "just" iPython + the huge Sage Python
> library.

By "sage server", the original poster meant "Sage virtual machine",
which he described as a server, I guess because (1) it is a Linux box,
and (2) it does serve the web version of Sage. But thanks for the
clarification.

>
> So Sage can be used:
> - as a "normal program"
> - as a local webserver with an HTML interface
> - as a server over the network
> - as a library in one's Python scripts
>
> Cheers,
> Martin
>
> --
> name: Martin Albrecht
> _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
> _www: http://www.informatik.uni-bremen.de/~malb
> _jab: martinr...@jabber.ccc.de
>
> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel-...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org



--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Jason Grout

unread,
Nov 19, 2009, 11:14:55 AM11/19/09
to sage-...@googlegroups.com
Dr. David Kirkby wrote:
> cool-RR wrote:
>> I understand that you have to run Sage as a sort of server. I remember
>> I had to use VMWare. And then you access it from the browser, and it's
>> an AJAX thing that makes it behave like a notebook.
>>
>> Why? Why not something like Mathematica, where you just open a normal
>> program and have a place where you can just type text?
>
>
> I like Mathematica, but a web based interface does not exist for it.
> (webMathematica has some uses, but its hardly too useful). I wrote a web based
> interface for Mathematica
>
> http://witm.sourceforge.net/
>
> Here's a screen shot of it on a PDA
>
> http://witm.sourceforge.net/pda.php
>
> but it is primitive by Sage standards. Whilst the Mathematica GUI is fine when
> you want to look at results yourself, it is not very practical when you want to
> share them with others, who might be in a different country.
>


Not to mention that Wolfram specifically forbids "allowing access to the
Product by any user other than Licensee, including, without limitation,
access to the Product via a web server, which is only allowed pursuant
to a valid webMathematicaTM license agreement;"

See http://www.wolfram.com/products/mathematica/licensingterms.html

I once was going to make a plugin for Dokuwiki to allow someone (or even
just me!) to run Mathematica code by typing it into a wiki. Then I saw
the above phrase in the "Prohibited Uses" section of the licensing terms.


Jason

--
Jason Grout

William Stein

unread,
Nov 19, 2009, 11:16:02 AM11/19/09
to sage-...@googlegroups.com
I have a complaint :-) -- "sage -upgrade" doesn't work to upgrade to
4.2.1. When Cython/GCC is building some plot3d code in the Sage
library, the stupid compiler included in Puppy Linux has an internal
compiler error.

I think today I'm going to try to make a new ubuntu 9.10-based virtual
machine for 4.2.1, and try to make it small using the same techniques
used by Puppy Linux (i.e., squashfs and unionfs).

William

kcrisman

unread,
Nov 19, 2009, 12:21:41 PM11/19/09
to sage-devel
> I think today I'm going to try to make a new ubuntu 9.10-based virtual
> machine for 4.2.1, and try to make it small using the same techniques
> used by Puppy Linux (i.e., squashfs and unionfs).

Technical question on the VM, used as a (real!) server:

We currently have the last VMWare image running as our server -
because it's running on a machine which apparently uses VMWare
software as its OS somehow (please don't ask me for details, I don't
quite get it and I can't ask our sysadmin until next week). Anyway,
it seems like we can't upgrade Sage anymore on that machine, because
the virtual machine (which we use to be secure, I think) for
VirtualBox wouldn't run on this VMWare machine.

Does that even make sense? Anyway, if it does, is there some way we
don't know of to use the same hardware to run a more up-to-date Sage?

- kcrisman

cool-RR

unread,
Nov 21, 2009, 8:51:14 AM11/21/09
to sage-devel
Okay, update:

Now I downloaded Sage for Windows. I see that I have to download the
VirtualBox thing and install it-- Pretty annoying. It would have been
nice if you just gave me one file to run which would run virtualbox by
itself with the sage image loaded. And now where am I supposed to put
the VMDK and OVF files? I know I can just keep them around on a folder
on the desktop, but this is lame.

Windows users are used to getting their software in a certain way, and
that's that you (1) Install it with an automatic installer without
even thinking where it actually is, knowing that you could uninstall
it whenever you want without remembering anything. (2) Can run the
program with one shortcut from the start menu.

I personally find it annoying to keep around a folder with VM files.
People who are less tech-savvy than myself will have a lot of problems
with this.

What do you think?

Ram.

William Stein

unread,
Nov 21, 2009, 9:04:44 AM11/21/09
to sage-...@googlegroups.com
Everybody would love for Sage to be like what you describe above.
However, the *reality* is that perhaps 99% of serious people who
*volunteer* their time to open source math software projects are
Linux/OS X users and developers.

If Sage were a company and we charged for Sage or even got paid for
supporting Sage, then I'm there might be a Windows version like you
describe above. However, Sage is *not* a company. Also, it might be
difficult for you to appreciate how hard it is to create and maintain
a native Windows version of Sage, since you probably don't understand
the 5.5 million lines of code that make up the 100 distinct software
projects out of which Sage is built.

What do *you* want to use Sage for? If you just want to do numerical
work, consider buying EPD, which is a native Python + numerical libs
for windows: http://www.enthought.com/products/epd.php

-- William

cool-RR

unread,
Nov 22, 2009, 5:07:56 AM11/22/09
to sage-...@googlegroups.com
I understand it's a volunteer project, and there's a lot of work involved.

But it seems that we weren't talking exactly about the same thing: I didn't talk about porting the millions of lines of code to Windows; I talked about making the VM process automatic and seamless. Like, having a Windows installer that puts the VM files in c:\Program Files\Sage\Whatever, and to install in the start menu a shortcut to a script that runs VirtualBox under the hood with a less frightening user interface. (VirtualBox is very friendly for such a powerful program, but still a bit frightening for someone non tech-savvy).

Thanks,
Ram.

William Stein

unread,
Nov 22, 2009, 5:14:40 AM11/22/09
to sage-...@googlegroups.com
On Sun, Nov 22, 2009 at 2:07 AM, cool-RR <coo...@cool-rr.com> wrote:
> I understand it's a volunteer project, and there's a lot of work involved.
> But it seems that we weren't talking exactly about the same thing: I didn't
> talk about porting the millions of lines of code to Windows; I talked about
> making the VM process automatic and seamless. Like, having a Windows
> installer that puts the VM files in c:\Program Files\Sage\Whatever, and to
> install in the start menu a shortcut to a script that runs VirtualBox under
> the hood with a less frightening user interface. (VirtualBox is very
> friendly for such a powerful program, but still a bit frightening for
> someone non tech-savvy).
> Thanks,
> Ram.

Go for it! If anybody can figure out how to do what you suggest
above, that would be great.

-- William

Dr. David Kirkby

unread,
Nov 22, 2009, 6:34:37 AM11/22/09
to sage-...@googlegroups.com
cool-RR wrote:

> I understand it's a volunteer project, and there's a lot of work involved.
>
> But it seems that we weren't talking exactly about the same thing: I
> didn't talk about porting the millions of lines of code to Windows; I
> talked about making the VM process automatic and seamless. Like, having
> a Windows installer that puts the VM files in c:\Program
> Files\Sage\Whatever, and to install in the start menu a shortcut to a
> script that runs VirtualBox under the hood with a less frightening user
> interface. (VirtualBox is very friendly for such a powerful program, but
> still a bit frightening for someone non tech-savvy).
>
> Thanks,
> Ram.

There might be some issues with the license of VirtualBox, which prevent us
creating a simple Windows installer, to do everything.

There are two versions of VirtualBox.

http://www.virtualbox.org/wiki/Editions

1) The first is GPL (free for everyone, but with no support for USB)
2) The second is closed source (free of individual use, but not for widespread
use in institutions. This support USB, and has other advantages).

I doubt we would be allowed to host the second version, yet how many individuals
are going to want to install a version which does not support USB, when they can
have one that does? I suspect most would chose the free, but closed source
version. (I know I did.)

Sun give a lot of stuff for free (Solaris 10 and OpenSolaris being two of them),
but I'm not allowed to distribute the propriety Solaris 10 myself, though I can
OpenSolaris. Solaris 10 is free for everyone - including big institutions, but I
still can't distribute it.

I doubt we would be allowed to distribute the closed source version of
VirtualBox. Even if we could, I do not think it would be a good idea.

I just set up VirtualBox myself, and think it is excellent. I'm running it on an
OpenSolaris host, not a Windows host, and so Windows has to be installed as a
guest OS, which is probably not the case with most people. But VirtualBox is
damm impressive.

I did have one hitch though, I'd mis-placed the original CD for XP, and only
could find the version I'd slipstreamed with service pack 2. That would not
install in VirtualBox - it kept crashing.

With nothing to lose, I decided to slipstream the version I had, with Service
pack 3, and it worked fine.

I'm *very* impressed with VirtualBox. I must admit, I've not used the XP guest
OS for anything other than playing chess on the internet, but it works fine for
that. That's about all I ever use XP for anyway.

I've not tried XP with any demanding applications. My graphics card is a high
end one with 1 GB RAM, but XP is not seeing that. But I don't care too much.

I installed Ubuntu Linux on VirtualBox too, but have not used that.

Dave
Reply all
Reply to author
Forward
0 new messages