Volker,
My perspective changed a lot because I spent so much time during the
last week trying to help many mathematicians to install and use Sage
at a huge conference, the Sage exhibit booth, and the short course.
Here's what I think:
(1) Virtual machines (or possibly co-Linux, maybe) is the only thing
we should put any effort toward for Windows. A native Microsoft C++
port or a Cygwin port are both a waste of time. I thus strongly
applaud your effort to make a VM (and anybody else's).
(2) The virtual machine should be as usable as possible, even if
networking between the VM and guest can't be configured. This means a
GUI, tools (for mouse integration), and at least a web browser are all
installed.
(3) The networking configuration in Linux (inside the VM) needs to be
very robust.
I realize that some of this is philosophically different than what you
think about how a VM should be made for Sage, so I'll do my best to
justify my opinions below.
DETAILS:
(1) I've *used* Sage on Cygwin and worked a lot on the port several
times. The basic problems are that (a) Cygwin is 32-bit only, (b)
forking in windows is massively fubar'd and very slow, (c) DLL
"rebasing" makes Sage-on-cygwin brittle and insane. A massive problem
with a native port is that even if it were done (a big if), it would
be far, far too much work to maintain as new versions of components of
Sage are constantly updated and released, Windows is updated, etc.; we
can't even keep up with OS X releases, where every component is well
supported.
(2) I can't tell you how many times during the last week that I
watched somebody load the Sage VM, see a textbox telling them to
browse to localhost, try to copy it and have their cursor get stuck in
the VM, think their computer crashed, etc., then type it in by hand
somewhere and mess up (e.g., type https instead). Then once they do
all that it often doesn't work anyways. Windows networking on a
laptop is a random beast, often firewalled and fubar'd by mandatory
antivirus software, and half broken. If people have downloaded and
installed Sage, let's at least give them something that immediately
works with 99% probability: have the VM boot up with Firefox
pre-logged into a running local notebook server and mouse integration
so the mouse doesn't get stuck and copy-paste works. It's
definitely possible to do this and not use a lot of disk space by
running from a compressed filesystem (with an overlay so you still
have read/write -- I've done it before). I remember doing this with
only about 600MB of disk space used *after* extracting the zip.
(3) Often when I investigated further I would find that eth0 had
turned into eth1 on bootup, which completely kills everything from the
user's point of view (though the user doesn't even get an error
message!). Nearly anybody using MS Windows is going to be completely
stuck when the solution is: "configure the eth1 interface, run the
notebook command manually from the command line, and memorize a
random-looking 4-digit ip address". I've made VM's for Sage for
years (before I ran out of steam around a year ago), and I remember
spending a lot of time dealing via Python scripts with the possibility
that Linux renames eth0 to eth1, etc. It seems the current VM
doesn't successfully do this.
Anyway, I'm just reporting on what I saw last week. I know that
making VM's is really difficult, can take a huge amount of time, and
testing them is even harder yet. But I'm all for it, since I think a
good VM has the best chance of addressing the "Sage-for-Windows"
problem. However, I think that the solutions offered so far (by me,
you, and others) for a Sage VM on Windows have simply failed to solve
the problem.
I think co-Linux is also worth looking at again. It's cool because it
is *not* a virtual machine (you can even install Windows in
VirtualBox, and install co-Linux into that Windows install). It has
direct access to the windows filesystem, the network, etc., just like
a normal application. But it's Linux. I just checked their website
(http://www.colinux.org/), and they made a release a few months ago,
and also claim to have new corporate sponsorship for a 64-bit port.
-- William
--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org
On Mon, Jan 9, 2012 at 7:32 AM, Volker Braun <vbrau...@gmail.com> wrote:
> Hi Wiliam,
>
> Karl-Dieter told me that you found some problem with the virtual
> machine but he didn't recall any details. What exactly is the issue?Volker,
My perspective changed a lot because I spent so much time during the
last week trying to help many mathematicians to install and use Sage
at a huge conference, the Sage exhibit booth, and the short course.
Here's what I think:(1) Virtual machines (or possibly co-Linux, maybe) is the only thing
we should put any effort toward for Windows. A native Microsoft C++
port or a Cygwin port are both a waste of time. I thus strongly
applaud your effort to make a VM (and anybody else's).
Nothing. I've done it before several times. I was hoping with my
email to encourage you (meaning anybody reading this!) to try it.
What stops me right now is that I don't have Windows installed
anywhere at all.
-- William
I know. I assure you, I've "wasted" even more time on Sage + Windows
than you.
> What about Emil's LiveCD and bootable partition thingie solutions as
> well? Certainly the one-click version is a possible solution as well,
> if it's robust.
I have never "believed" in the viability of live CD's for much beyond
demos, sysadmin work, and hacking into computers when you have
hardware access. I don't think live CD's are in any way a viable
solution for Sage on Windows. It just doesn't make sense at all
for "daily users" -- do you really expect them to drop everything
(stop checking Facebook, their email, stop using their favorite
editors, etc.) to reboot into Linux *just* to run Sage? Sure, that
would be great for a workshop, but for daily use it is completely and
totally ludicrous. So I applaud and appreciate the work to create
LiveCD's, and I see them as potentially very valuable for workshops
and certain other applications, but they are definitely no strategy
for adoption of Sage on Windows.
William
I have the impression that you didn't seriously use coLinux. It's a
port of the Linux kernel to run as a native Windows application. It's
different than virtual machines like VirtualBox or VMware.
There might be compelling advantages:
* direct access to the native Windows filesystem -- no weird stuff
with networking or VM shared folders needed.
* networking is different in some good ways (and some confusing ways).
Being a genuine application has its advantages.
> you can't run X on top of it right now.
This http://www.andlinux.org/ is a specific install of colinux that
some people put together for their company use, and give away free.
It includes X. So maybe the situation is more complicated.
We used to have a Sage distribution based on andLinux, but the guy
working on it died.
> VirtualBox will be slightly slower in the execution,
I found the opposite in practice. I did benchmarks when we had made
available both 32-bit VMware and coLinux versions of Sage on Windows.
In fact, to my surprise, coLinux was significantly slower for raw
computation than VMware. I remember it being about 60-70% the speed
of VMware running Linux with Sage installed. I don't know why.
Because of VTX extensions, VMware and VirtualBox are amazingly fast
for raw CPU-bound computation.
> but its less error prone imho.
This is probably true. VirtualBox is massively more widely used.
When we used to distribute a coLinux version of Sage (in 2006), I
remember watching many Windows laptops crash hard due to their
low-level driver. But that was 5 years ago, and things may have
changed by now.
-- William
That seems feasible. The bigest problem i see is the mouse
integration.
Let's focus our energy on doing this. Let's also plan to fully
support having both a 32 and 64-bit version. Right now I think we
only provide a 32-bit VM. If we are organized, we can do both 32 and
64-bit.
william
>
> Since there seems to be some need in discussing details, making some
> decisions, and (most importantly!) to document the latter, why not use
> the http://wiki.sagemath.org/devel/SEP process (or is there an
> alternative, better place to do "requirements fixation" for such Sage
> develop tasks)?
> Which reminds to check whether I still remember my Sage Wiki login and
> password ...
>
>
> Cheers,
> Georg
>
> --
> 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
You just described what the VM Volker made already does. This is most
certainly not sufficient for many users in real life situations, e.g.,
where networking doesn't work.
By the way, how can http://localhost:8000 ever work? If I'm using
VirtualBox and I go to http://localhost:8000 in Internet Explorer, I'm
definitely *not* going to get something having anything to do with the
virtual machine.
>
> --
> 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
--
Let's focus our energy on doing this.
Let's also plan to fully
support having both a 32 and 64-bit version. Right now I think we
only provide a 32-bit VM. If we are organized, we can do both 32 and
64-bit.
The browser could be _in_ the VM ; that would make it easy to ensure
that both http://localhost:8000 and jsmath work.
Snark on #sagemath
You can configure port forwarding with VirtualBox. If you forward port
8000 of the host system to port 8000 of the guest system, you get that
result.
... and no firewall & AV problems either ;-)
Snark on #sagemath
I immediately see at least 3 compelling reasons for 64-bit:
1) 64 bit is much, much faster in some cases, e.g., MPIR gets huge
performance gains, which impacts everything else I care about.
Moreover, it is also much faster for doing arithmetic with machine
longs, which are 64-bit, which makes certain computations faster.
2) One can use much more RAM with 64-bit. Many computers these days
have 8GB RAM (e.g., even my laptop). Again, at least for many
computations I do, RAM is the critical bottleneck.
3) There is some interesting software that is 64-bit only, e.g., psage
includes an important program called "smalljac" by Drew Sutherland
that is 64-bit only.
> Many people don't know whether they run a 32 or 64bit host.
True, but when discussing "64-bit" we should broaden our horizon to
consider that there are Windows users who are very technically
sophisticated.
> VirtualBox lets you pretty much
> mix&match guest and host (including 64bit guest on 32bit host) but
> especially the latter requires hardware virtualization capabilities in the
> CPU. Its easier to just have everybody run 32bit guests.
I can't argue with you that it is easier.
> We can build a
> 64bit guest, but in any case we should point everybody to the 32bit version.
I think the Ubuntu download page is a good model for 32 versus 64-bit
downloads. Check it out:
http://www.ubuntu.com/download/ubuntu/download
-- William
Thanks for the explanation; that's very cool. I assume this is what
Volker's VM does by default?
I wonder how VirtualBox deals with two hosts that both have the same
port forwarded...
-- William
> You can configure port forwarding with VirtualBox. If you forward port
> 8000 of the host system to port 8000 of the guest system, you get that
> result.Thanks for the explanation; that's very cool. I assume this is what
Volker's VM does by default?
I wonder how VirtualBox deals with two hosts that both have the same
port forwarded...
2) One can use much more RAM with 64-bit. Many computers these days
have 8GB RAM (e.g., even my laptop).
Of course, memory is just one of the advantages. That said, I do most
of my work on my laptop under Linux using VirtualBox, and I set the
limit to "5719MB", which is in the green still (in the VirtualBox
GUI).
> The 64-bit virtual machine should then also come with more ram & cpus
> configured, and require hardware virtualisation. In other words, be only
> suitable for a modern computer.
+1 It's what I would use if I had to use Windows.
You do it even on a mac!
Jason
> coLinux looks promising. What does stop one from putting Sage on it
> presently?
>
> DimaNothing. I've done it before several times. I was hoping with my
email to encourage you (meaning anybody reading this!) to try it.
On Mon, Jan 09, 2012 at 06:42:16PM -0800, Keshav Kini wrote:
> > Which reminds to check whether I still remember my Sage Wiki login and
> > password ...
>
> I'll just jump in to say that a little while ago we connected the Sage Wiki
> logins to the trac user store, so you should log into the Sage Wiki using
> your trac user/pass. Though your email was five hours ago so maybe you have
> figured this out already...
Speaking about the wiki, I already posted here messages asking for help with
the connection on the wiki. Here is the problem:
When I click to connection I'm asked for a login password. I then enter my
trac account infos. I'm now shown a page starting by
* hivert * Settings * Logout
Now any further click, either <Edit> or a hyperlink in the page simply log me
out. As a consequence, I'm not able to edit any page.
The problem arose with firefox, konqueror and opera on different machines with
different accounts. So I really think it is on the server side.
Any help appreciated, especially if I'm not asking at the correct place I'd
like to know it,
Cheers,
Florent
Oh, and by the way: what about the option of running the VM in
headless mode?
On Jan 10, 2012 12:50 AM, "Dima Pasechnik" <dim...@gmail.com> wrote:
>
>
>
> On Tuesday, 10 January 2012 03:06:14 UTC+8, William wrote:
>>
>> > coLinux looks promising. What does stop one from putting Sage on it
>> > presently?
>> >
>> > Dima
>>
>> Nothing. I've done it before several times. I was hoping with my
>> email to encourage you (meaning anybody reading this!) to try it.
>
>
> on a 64-bit Windows 7 I have, I cannot install coLinux:
> it aborts with a message saying it cannot run on a 64-bit system.
> (and this is also according to Q27 in http://colinux.wikia.com/wiki/FAQ)
Thanks, that is very useful to know, as 64-bit is finally becoming common for Windows, I think.
>
>
>>
>> What stops me right now is that I don't have Windows installed
>> anywhere at all.
>>
>> -- William
>
> Again, that is what my current virtual machine does. It works fine as long
> as the host has networking up and running.
So port forwarding in windows does not work if the host system does
not have a network connection? That really complicates things.
On Jan 10, 2012 6:37 AM, "Volker Braun" <vbrau...@gmail.com> wrote:
>
> On Tuesday, January 10, 2012 8:22:51 AM UTC-5, mmarco wrote:
>>
>> Oh, and by the way: what about the option of running the VM in
>> headless mode?
>
>
> Again, that is what my current virtual machine does. It works fine as long as the host has networking up and running.
>
I'm not sure what you guys means by "headless". I would definitely not call Volker's current VM headless, since when you start it up there is a visible Linux console (which I would call a "head"), and if you click in it, then the cursor is trapped.
-- William
I'm not sure what you guys means by "headless". I would definitely not call Volker's current VM headless, since when you start it up there is a visible Linux console (which I would call a "head"), and if you click in it, then the cursor is trapped.
That is a really interesting idea! We would couple this with a
standard Windows GUI App, just like with the Sage app on OS X. If
the Windows GUI App we wrote decides that things aren't working right
(it will run some tests) based on the network, it will offer some
options, maybe including:
* view a console
* ssh into the machine
* bring up a full GUI inside the machine.
* suggest how to debug network/firewall/antivirus issues
Who here has experience with Windows GUI programming? I used to do a
lot of it back in 1993... but haven't since then!
-- William
That's definitely not in any way, shape, or form, what I had in mind.
I meant something that appears to the user very similar as the OS X
Sage App. Since you (Keshav) maybe don't use OS X, you might not know
what that means.
This would be a brand new Windows Application that (1) launches the
headless VBox machine, when the OS X App would launch the command line
Sage notebook server, and (2) pops up a web browser pointed at ones
list of published worksheets.
One other thing that would make this massively better. It would be
cool to modify the notebook somehow so that it could store all the
worksheets on the host Windows filesystem instead of inside the VM.
Right now, when people delete the VM and install a new one, all of
their worksheets simply vanish forever, and they likely shout out
curses at Sage (rightfully so).
William
>
> -Keshav
>
> ----
> Join us in #sagemath on irc.freenode.net
>
> --
> 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
--
Indeed, I don't have a Mac and don't really know what the Sage App
does. I guessed it was something like Sage App is to Sage console as
IPython Qt console is to IPython terminal interface.
> One other thing that would make this massively better. It would be
> cool to modify the notebook somehow so that it could store all the
> worksheets on the host Windows filesystem instead of inside the VM.
> Right now, when people delete the VM and install a new one, all of
> their worksheets simply vanish forever, and they likely shout out
> curses at Sage (rightfully so).
This is easy. Virtualbox allows you to mount external directories
inside a Linux VM - the Virtualbox guest additions provide a
filesystem type called "vboxsf" (virtualbox shared folder) to `mount`,
and device names corresponding to directories on the host's filesystem
(which must be configured in the VM's parameters).
No, absolutely not. That is as wrong a perspective as possible, so if
you still think that then somebody needs to make a screencast.
>
>> One other thing that would make this massively better. It would be
>> cool to modify the notebook somehow so that it could store all the
>> worksheets on the host Windows filesystem instead of inside the VM.
>> Right now, when people delete the VM and install a new one, all of
>> their worksheets simply vanish forever, and they likely shout out
>> curses at Sage (rightfully so).
>
> This is easy. Virtualbox allows you to mount external directories
> inside a Linux VM - the Virtualbox guest additions provide a
> filesystem type called "vboxsf" (virtualbox shared folder) to `mount`,
> and device names corresponding to directories on the host's filesystem
> (which must be configured in the VM's parameters).
I know about that, but I would not call it "easy". There are subtle
issues, e.g., where on the host's filesystem should Sage store its
files. There are also issues with getting it to actually work in
practice robustly. But it's probably the best approach given how the
notebook currently works.
-- William
>
> -Keshav
>
> ----
> Join us in #sagemath on irc.freenode.net
>
Well, since you said it was "definitely not in any way, shape, or
form, what [you] had in mind", I certainly don't *still* think that,
it's just the wrong preconception I had earlier :) I'd like to see a
screencast, if someone makes one. Or I can find someone with a Mac and
ask them to show it to me at some point. Surprisingly, there doesn't
seem to be much info about the Sage App on the Sage website (or maybe
I just can't find it).
> I know about that, but I would not call it "easy". There are subtle
> issues, e.g., where on the host's filesystem should Sage store its
> files. There are also issues with getting it to actually work in
> practice robustly. But it's probably the best approach given how the
> notebook currently works.
I see... that sucks. I've never used it for any particular strenuous
applications so I guess I haven't seen the robustness issues. As for
the location of the files, at least, I think the "correct" place to
store sagenb stuff on Windows is %APPDATA%\.sagenb\ (essentially
equivalent to $HOME/.sagenb/ on *nix).
-Keshav
----
Join us in #sagemath on irc.freenode.net !
I think it works pretty well once it is setup. My main worry is
setting it up automatically in the first place. We'll only know how
well it works if we try.
> As for
> the location of the files, at least, I think the "correct" place to
> store sagenb stuff on Windows is %APPDATA%\.sagenb\ (essentially
> equivalent to $HOME/.sagenb/ on *nix).
Cool.
>
> -Keshav
>
> ----
> Join us in #sagemath on irc.freenode.net !
>
On Jan 10, 2012 12:50 AM, "Dima Pasechnik" <dim...@gmail.com> wrote:
>
>
>
> On Tuesday, 10 January 2012 03:06:14 UTC+8, William wrote:
>>
>> > coLinux looks promising. What does stop one from putting Sage on it
>> > presently?
>> >
>> > Dima
>>
>> Nothing. I've done it before several times. I was hoping with my
>> email to encourage you (meaning anybody reading this!) to try it.
>
>
> on a 64-bit Windows 7 I have, I cannot install coLinux:
> it aborts with a message saying it cannot run on a 64-bit system.
> (and this is also according to Q27 in http://colinux.wikia.com/wiki/FAQ)Thanks, that is very useful to know, as 64-bit is finally becoming common for Windows, I think.
It looks like it works great on Mac OS X. The VM boots, and right away
the browser loads full screen logged into the notebook.
There are some testing worksheets there (says Volker) and the Java
runtime is missing (Volker is aware of this also). I was wondering a
couple of things about the usability of Sage in the VM browser (and
bear in mind that I haven't used the VM appliance at all before).
After a minute or two I couldn't figure out how to save a worksheet or
plots or other data files and access them in the host OS.
--
Benjamin Jones
After a minute or two I couldn't figure out how to save a worksheet or
plots or other data files and access them in the host OS.--
Benjamin Jones
That should be possible, but with VirtualBox you either have to use
port forwarding (as I recently learned in this thread!) or setup an
*additional* "host only" network interface.
With VMware (and Parallels) the default standard network connection
somehow does both NAT and "host only" networking at the same time,
which is much, much less confusing and user friendly. I guess the
VirtualBox developers never figured out how to do this, or (more
likely) have philosophical objections. Anyway, that could be the
source of your confusion.
-- William
To make sure we are on the same page: have you used VMware much?
On Wed, Jan 11, 2012 at 10:22 AM, Dima Pasechnik <di...@gmail.com> wrote:> Somehow, I expected I could run the notebook server in the VM and connect to> it from the host system, but I don't see a way to do it.You should be able to connect from the host to the guest port 2222 t(ssh into the virtual machine) and port 8000 (the notebook browser).
If you can't then there is something wrong with networking either in the virtual machine or with the host firewall.
Maybe you can use a tiling WM, like for example xmonad. It is by
default impossible to minimize any windows, and if I'm not mistaken
it's configurable to not allow de-tiling (i.e. resizing, moving) as
well. This could get hairy if any other windows would ever need to pop
up in the VM, though. At least I can attest to Virtualbox seamless
mode working fine with xmonad.
-Keshav
----
Join us in #sagemath on irc.freenode.net !
On Fri, Jan 13, 2012 at 06:27, mmarco <mma...@unizar.es> wrote:
> On 12 ene, 16:38, Volker Braun <vbrau...@gmail.com> wrote:
>> I've configured the window manager to the bare minimum. Ideally we'd run
>> without a wm but that seems to break VirtualBox seamless mode.
> Do you mean that one cannot run Virtual Box without X11?
> I'd imagine if it were possible one can just run the sagenb server there,
> and
> use the browser on the host system only.
The discussion goes in circles ;-)
Running the Vm without X and accessing it from the host-browser is the
current solution.
About those other parts: Really, the Interface from the windows side
has a lot of potential. All this stuff typical windows users expect
when installing new software like desktop icons, menu entries,
installer, on screen help / documentation Pop-ups... boring stuff like
that. The base could and should be the current VM for now (or
eventually your last beta with X).
Big +1.
I'm curious if anybody else has ever written such a program for
another project? If anybody out there is particularly good at
searching for such things, could you look? It's not inconceivable
there's something out there we can learn from.
-- william
>
> --
> 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
Professor of Mathematics
University of Washington
http://wstein.org
Why not use VBscript or precompile it? Distribution of binaries on
windows should be no problem.
That's what I think too, but it disagrees with the current behavior of
`sage -upgrade`, which tries to merge any committed changes into the
new version you're upgrading to. That doesn't make sense IMO but there
you are.
> Sounds great!
> This could be just a small application in the beginning with the sage
> logo and a start button , but can be expanded later.
> I am not sure if it is necessary to write this in python - that is
> another dependency.
> Why not use VBscript or precompile it? Distribution of binaries on
> windows should be no problem.
Python programs can be made into Windows binaries with py2exe_, a
distutils extension. GUIs can be made relatively easily with PySide_,
or so I've heard - haven't gotten around to trying it myself yet.
.. _py2exe: http://py2exe.org/
.. _PySide: http://pyside.org/
I wonder why you suggest using VBscript. It's not exactly a majority /
serious language among Windows developers as I recall and certainly
nobody on Mac or Linux uses it. I think we should stick to Python if
possible for widest familiarity among our developers. Maybe you just
meant that it is a built-in scripting language in Windows, which is
true, but as you said, there's no problem in shipping binaries for
Windows.
This is 100% avoidable. Here is an example of a standalone Windows
executable which is written in Python using PyQt: http://ankisrs.net/
After installation it is a couple dozen megabytes, and this is a
full-featured application that does a bunch of stuff including
audio/video playback, HTML rendering, network connectivity, sqlite
data storage, etc. etc.
I'm not sure exactly how it is done but I assume it uses some
combination of py2exe and Qt tools. (Taking a look in the source code
should prove enlightening: http://github.com/dae/ankiqt ). After
installation there are some Qt-named DLL files sitting in the
program's directory. You absolutely do not need the Qt SDK, or a copy
of Python, or a copy of PyQt to run such an application. To develop
the application is a different story of course.