Re: [sage-devel] Native Windows version

2019-01-26 Thread kcrisman


>
> I wouldn't say I was "deeply insulted" (though I realize I used the 
> word "insulting" and I regret that), but I am very discouraged.  And 
> not for any good reason either.  Just reporting problems as a matter 
> of fact would not be a problem.  It's more the implied notion that a 
> couple of problems would be a reason not to use it at all.  If that 
> were the case you should throw out all implementations of Sage on all 
> platforms. 
>

Correction: All implementations of all software on all platforms :-) except 
maybe the Analytical Engine

Proof is in the eating: my guess is that significant numbers of Windows 
users are actually using Sage on both CoCalc and the Cygwin installer (I 
imagine we might have numbers on some of this from web analytics and 
download stats), and so both are a big win for Sage, despite doubtless many 
remaining hurdles.  Thanks to both of you for huge amounts of work on this.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Native Windows version

2019-01-25 Thread E. Madison Bray
On Wed, Jan 23, 2019 at 5:10 PM William Stein  wrote:
>
> On Wed, Jan 23, 2019 at 3:36 AM E. Madison Bray  wrote:
>
> > > If I had to run Sage on Windows for some reason today, I would use
> > > Docker or VirtualBox.I helped support somebody using the Cygwin
> > > version of Sage on Windows at the Sage booth at the Joint Math
> > > Meetings last week, and it typically took about 1 minute to start up
> > > Sage, which was scary.  She also was 100% convinced that copy/paste in
> > > the Sage terminal (really cygwin) didn't work, which would make using
> > > Sage very painful indeed.   It turned out that copy/paste does work if
> > > you use the context menu.
> >
> > I wish you had asked me about this or brought it up with me before
> > spreading unfounded FUD based on one experience.  I really don't
> > appreciate it--it sets a bad example when the creator of Sage says
> > "don't use the Windows port of Sage", and is pretty insulting frankly.
> >
>
> What I wrote above was that in my one experience last week helping somebody
> with Cygwin Sage.  These two statements are just an observation I had while
> helping somebody.
>
> > So these are engineering challenges, but solvable ones, not reasons to
> > say "don't use X".
>
> I didn't write "don't use X".  I wrote "I would use Docker or
> VirtualBox", and to clarify I literally
> meant that "*I* would use..." (I wish I had put I in bold).   This is
> true, and was


I understood that.  In my frustration I was probably unclear about
this point.  I know it was intended as a statement of personal
preference.  However, you're in a unique position that your words
carry more weight than others and should be considered more carefully.
I've been on Hacker News and I know how things get taken out of
context.  "William Stein says don't use the Windows port of Sage",
etc.  You then went on to justify your supposed personal preference
based on one experience you had with someone else using it.

If there were some actual bugs you could say so, but instead it came
off as "there were some vague problems, so I wouldn't use it".  It's
also very discouraging because prior to this (or the WSL) a VM was the
only way to use Sage on Windows, and your message gave the impression
that all the effort that has been put into making a better Windows
experience was for nothing if it's somehow a worse experience even
than using a VM (it isn't).

> in response to somebody who wrote to our mailing list who was
> frustrated with using Cygwin,
> so it was a fair suggestion.  Also, the original poster was
> contemplating porting Sage
> to windows, so they are probably extremely technically competent.

Maybe they're "frustrated with using Cygin" maybe not.  All they wrote
is "the ugh-worthy Cygwin" which doesn't give any obvious indication
as to their experience with it.  I used to have the same feeling about
it, though I had barely ever used it myself, so it was more of a
knee-jerk opinion.  Now that I've spent more time with it I've found
that it gives a far better and well-considered UNIX-like experience on
Windows than most existing alternatives.  The only reason I would
prefer not to use it are aforementioned technical problems with
emulating certain POSIX interfaces (most notably fork()).

They may or may not be "extremely technically competent" but possibly
not experienced enough with the software at hand to have a good handle
on just how much effort such porting would take.  I made the same
mistake starting out.

I do think it's possible though, of course, but it will take more than
just one or two people making a burst of contribution.  It's going to
require a long, sustained (and sustainable) effort.  But who knows,
maybe I'm wrong.  Maybe I like having work/life balance too much.

> > The stuff about copy/paste is just nonsense. [...]
>
> For me, the best measure for usability is listening to users.

Sure, but the copy/paste question is kind of outside the scope of
Sage, or even Sage on Windows.  Terminal emulator environments on any
platform are difficult to novice users who don't have much experience
with them.  I've been teaching Software Carpentry workshops for years,
and every time I think I've seen every problem novices have, I'm
surprised anew by new workshops.

Regardless, you made the suggestion that this was a unique problem to
Sage on Windows, and a reason not to use it.  Your "solution" was also
inaccurate and uninformed.

> Anyways, if you have the chance, I would encourage you to run a booth
> somewhere and help
> random people use Sage on Windows all day for a few days.  Or to try
> to create some sort

It's almost as if people have been doing that!  Ever since the first
beta, in fact.  I personally haven't gotten out there and done that
because I don't go to a lot of mathematics conferences, as they're not
generally relevant to me personally.  But I'm going to one in a few
weeks in fact.  In the meantime, other people have been doing that,
collecting feedback, and 

Re: [sage-devel] Native Windows version

2019-01-24 Thread kcrisman


>
> Anyways, if you have the chance, I would encourage you to run a booth 
> somewhere and help 
> random people use Sage on Windows all day for a few days. 


Yeah, it's always amazing to me (not just with Windows, though more so 
there) how much stuff that becomes automatic to even a moderately 
experienced Sage user really does need to be explained and motivated with 
brand-new users - who are often new even to computational software if they 
didn't have cause to use it in grad school or wherever.   I wish we had 
time/$ for some real narrated end user studies ("now try to compute 2+2; 
tell me what you are doing as you do it") like one of our CS profs always 
is touting to our students, I think a lot of interesting stuff would appear.
 

>  Or to try 
> to create some sort 
> of support community around sage on windows (e.g., a big link right 
> when it starts up 
> to a discourse forum or something).  I would guess that right now the 
> canonical support 
> forum for sage on windows might be 
> https://groups.google.com/forum/#!forum/sage-windows, 
> but it has only two posts in the last two years?
>

I think that was really a forum for *development* of Sage on Windows, but 
now that the Cygwin + installer solution has been the primary focus, and 
within the "normal" Sage development flow, it has become moribund.  We do 
see a number of Windows questions on ask.sagemath, so I suppose that is a 
potential place to look for common issues.  

How hard would it be to add some sort of alert window at startup on Windows 
to "here is a good place to ask for help if you are a new user"?  I don't 
know anything about the installer so maybe it would be hard; on OS X 
sometimes there is a canonical readme in the dmg and/or a "help" menu but 
this is fairly different from that so it might be hard, or hard to put it 
in an easily accessible place for newbies.
 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Native Windows version

2019-01-24 Thread E. Madison Bray
On Thu, Jan 24, 2019 at 1:19 AM Isuru Fernando  wrote:
>
> If you want to start porting dependencies to native windows, I'd suggest 
> getting all dependencies of sage ported to conda. I maintain a lot of sage 
> dependencies for conda-forge and would love to have more packages ported to 
> windows and then maybe some day build sage.
>
> There are lots of packages needing native windows support. Some packages have 
> windows builds supported, but no conda package. (For eg: ECL). Some packages 
> just need some small patches to build system to build them. Some packages 
> need extra care. (For eg: Julian and I discovered today that NTL assumes 
> sizeof(mp_size_t) is equal to sizeof(long) or sizeof(int) and uses integer 
> literals with long suffix. For MSVC/MinGW this is not true)

I think anyone trying to port Sage's dependencies, in full, to work
"natively", no matter how technically competent, will find themselves
quickly in over their head just in terms of overhead.  Using a
POSIX-style toolchain like the MinGW tools is typically easier; I used
to maintain builds of some Python projects on MSVC, but it was an
enormous extra effort and once I stopped doing it, I don't think
anyone else did.  Plus dealing with upstream is a huge pain so you
have to be prepared to maintain non-trivial patches forever.  The true
can be said with Cygwin as well sometimes, albeit usually less so.
Most Cygwin-related patches tend to be one-or-two liners, though as my
efforts in trying to get CPython fully supported on Cygwin show, just
porting one project (especially when it's one as non-trivial as
CPython) can take up all of one person's time.

So I certainly support such efforts and would like to help out.  It's
just a daunting task.

On the conda end of things one thing I've wanted to do is port Cygwin
to conda (and vice-versa) so that packages built for Cygwin can be
installed with conda.

> On Tue, Jan 22, 2019 at 5:15 PM Dima Pasechnik  wrote:
>>
>> On Tue, Jan 22, 2019 at 10:34 PM deSitter  wrote:
>> >
>> > Hello all,
>> >
>> > I am interested in creating a native Windows port completely independent 
>> > of the ugh-worthy Cygwin. Does such a project exist?
>>
>> there are parts of Sage that are really stumbling blocks for such a project,
>> GAP one of them.
>> You might start with GAP - I'd expect that it might be quite an effort, 
>> though.
>>
>>
>> >
>> > TIA
>> >
>> > -drl
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "sage-devel" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to sage-devel+unsubscr...@googlegroups.com.
>> > To post to this group, send email to sage-devel@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/sage-devel.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "sage-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-devel+unsubscr...@googlegroups.com.
>> To post to this group, send email to sage-devel@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sage-devel.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Native Windows version

2019-01-23 Thread Isuru Fernando
If you want to start porting dependencies to native windows, I'd suggest
getting all dependencies of sage ported to conda. I maintain a lot of sage
dependencies for conda-forge and would love to have more packages ported to
windows and then maybe some day build sage.

There are lots of packages needing native windows support. Some packages
have windows builds supported, but no conda package. (For eg: ECL). Some
packages just need some small patches to build system to build them. Some
packages need extra care. (For eg: Julian and I discovered today that NTL
assumes sizeof(mp_size_t) is equal to sizeof(long) or sizeof(int) and uses
integer literals with long suffix. For MSVC/MinGW this is not true)

Isuru

On Tue, Jan 22, 2019 at 5:15 PM Dima Pasechnik  wrote:

> On Tue, Jan 22, 2019 at 10:34 PM deSitter 
> wrote:
> >
> > Hello all,
> >
> > I am interested in creating a native Windows port completely independent
> of the ugh-worthy Cygwin. Does such a project exist?
>
> there are parts of Sage that are really stumbling blocks for such a
> project,
> GAP one of them.
> You might start with GAP - I'd expect that it might be quite an effort,
> though.
>
>
> >
> > TIA
> >
> > -drl
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "sage-devel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to sage-devel+unsubscr...@googlegroups.com.
> > To post to this group, send email to sage-devel@googlegroups.com.
> > Visit this group at https://groups.google.com/group/sage-devel.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Native Windows version

2019-01-23 Thread William Stein
On Wed, Jan 23, 2019 at 3:36 AM E. Madison Bray  wrote:

> > If I had to run Sage on Windows for some reason today, I would use
> > Docker or VirtualBox.I helped support somebody using the Cygwin
> > version of Sage on Windows at the Sage booth at the Joint Math
> > Meetings last week, and it typically took about 1 minute to start up
> > Sage, which was scary.  She also was 100% convinced that copy/paste in
> > the Sage terminal (really cygwin) didn't work, which would make using
> > Sage very painful indeed.   It turned out that copy/paste does work if
> > you use the context menu.
>
> I wish you had asked me about this or brought it up with me before
> spreading unfounded FUD based on one experience.  I really don't
> appreciate it--it sets a bad example when the creator of Sage says
> "don't use the Windows port of Sage", and is pretty insulting frankly.
>

What I wrote above was that in my one experience last week helping somebody
with Cygwin Sage.  These two statements are just an observation I had while
helping somebody.

> So these are engineering challenges, but solvable ones, not reasons to
> say "don't use X".

I didn't write "don't use X".  I wrote "I would use Docker or
VirtualBox", and to clarify I literally
meant that "*I* would use..." (I wish I had put I in bold).   This is
true, and was
in response to somebody who wrote to our mailing list who was
frustrated with using Cygwin,
so it was a fair suggestion.  Also, the original poster was
contemplating porting Sage
to windows, so they are probably extremely technically competent.

> The stuff about copy/paste is just nonsense. [...]

For me, the best measure for usability is listening to users.

Anyways, if you have the chance, I would encourage you to run a booth
somewhere and help
random people use Sage on Windows all day for a few days.  Or to try
to create some sort
of support community around sage on windows (e.g., a big link right
when it starts up
to a discourse forum or something).  I would guess that right now the
canonical support
forum for sage on windows might be
https://groups.google.com/forum/#!forum/sage-windows,
but it has only two posts in the last two years?   In any case, for me
at least, if I'm not
seeing or answering  support questions regularly from actual users, it
can be hard to know
what is really nonsense.

I'm sorry again to have deeply insulted you and appreciate the
enormous contributions you've
made to Sage, and I'll avoid posting about cygwin publicly after that
without consulting
with you first.


 -- William

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Native Windows version

2019-01-23 Thread William Stein
On Tue, Jan 22, 2019 at 10:32 PM Jeroen Demeyer  wrote:
>
> On 2019-01-23 00:11, William Stein wrote:
> > I helped support somebody using the Cygwin
> > version of Sage on Windows at the Sage booth at the Joint Math
> > Meetings last week, and it typically took about 1 minute to start up
> > Sage, which was scary.
>
> But mathematical computations (which do not involve syscalls) shouldn't
> be slower, right?

When doing support for this user, actually running code seemed fine
after the 1 minute (?) startup time.
Unfortunately, she was mainly asking about how to use init.sage.
(Incidentally, there was numerous
questions from Sage users, where the answer is: ~/.sage/init.sage.
Evidently it is difficult to learn
about ~/.sage/init.sage for some reason.  Maybe it should be documented more.)

I haven't done benchmarks of cygwin+sage in a decade.  My totally
outdated experience, which I am probably
misremembering, was that mathematical computations that do not involve
syscalls could
easily be much slower on Cygwin that under VirtualBox + Linux on exactly the
same hardware (even though both code was compiled using GCC).   This
is no surprise to me,
since memory management is different between the two, and when I last
benchmarked Cygwin was 32-bit only, whereas VirtualBox + Linux was 64-bit, which
could significantly impact performance.How memory is cached and managed can
impact performance of CPU bound code a lot, and the algorithms differ
between Linux, Windows, and OS X. I also remember being similarly
frustrated that
native Sage on OS X was often slower for things I cared about than
VirtualBox + Linux + Sage
on OS X; but maybe security (which involves memory address randomization)
is higher priority than speed for OS X, for good reason.

 -- William

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Native Windows version

2019-01-23 Thread Peter Luschny
> If I had to run Sage on Windows for some reason today, 
> I would use Docker or VirtualBox.

I’ve been using Sage for many years mainly on Windows. 
First with the Virtual box. This had many disadvantages. On 
the one hand the VirtualBox was error-prone and often did not 
work as expected. It also eats up a lot of memory and especially 
that worksheets are not stored directly on the host system 
proved to be a disadvantage. I had no joy with it. 

My experience changed dramatically when the SageMath binaries 
appeared in the Windows installable form. I never had a problem 
again, didn’t have to worry about other software and its quirks. 
And I had my Yupyter notebooks where I can search for them, 
in my Windows explorer. 

Regarding performance: in my applications I have never experienced 
a situation where I assumed to have any advantage if I used 
a Linux system. For my work it fits perfectly into Windows. 
I don’t feel the slightest need to interpose another layer 
again, whatever type it is. 

For someone who doesn’t care if Cygwin is "ugh-worthy" or 
"ohh-worthy" some remarks made in this thread do not reflect
the experience of a normal Windows user. 

I am aware that this is only because of extraordinary skills
and efforts by E. M. Bray and I would like to express my 
appreciation for it. 

Peter

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Native Windows version

2019-01-23 Thread Volker Braun
On Wednesday, January 23, 2019 at 12:12:39 AM UTC+1, William wrote:
>
> If I had to run Sage on Windows for some reason today, I would use 
> Docker or VirtualBox.


I recently tried out the new Windows 10 Subsystem for LInux and its pretty 
sleek. I built Sage for shits & giggles and everything worked fine. I would 
definitely use that nowadays.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Native Windows version

2019-01-23 Thread E. Madison Bray
On Wed, Jan 23, 2019 at 7:32 AM Jeroen Demeyer  wrote:
>
> On 2019-01-23 00:11, William Stein wrote:
> > I helped support somebody using the Cygwin
> > version of Sage on Windows at the Sage booth at the Joint Math
> > Meetings last week, and it typically took about 1 minute to start up
> > Sage, which was scary.
>
> But mathematical computations (which do not involve syscalls) shouldn't
> be slower, right?

Generally not.  If they are multi-process (and hence obviously require
system calls to start processes or threads) there is some additional
overhead.  If the  multiprocessing algorithm is using a process pool
this is of course an O(1) cost.  For straight numerical computations
on the CPU there's no major performance problem.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Native Windows version

2019-01-23 Thread E. Madison Bray
On Wed, Jan 23, 2019 at 12:12 AM William Stein  wrote:
>
> On Tue, Jan 22, 2019 at 2:34 PM deSitter  wrote:
> >
> > Hello all,
> >
> > I am interested in creating a native Windows port completely independent of 
> > the ugh-worthy Cygwin. Does such a project exist?
>
> Not anymore.  I came the closest to writing one, but still didn't
> really get close (this was a long time ago -- back when Microsoft way
> paying REvolution to port R to Windows).  It's very difficult, because
> numerous Sage dependencies have never been properly ported to Windows.
>   If I were to try today, I would start by trying to refactor Sage
> itself into a sage-core, with minimal dependencies, and other
> libraries that depend on sage-core.  Once that is done [1], then I
> would worry about porting only sage-core to Windows, as a standard
> Python library that is Anaconda installable (I would leverage Anaconda
> as much as possible [2]).   With that done, I would turn to whatever
> major modules (e.g., sage-combinat, sage-nt, sage-algebra, etc.) are
> of most interest, and try to port them one-by-one to Windows.  Some
> would not be possible due to dependencies, and others would be easy.
>   In any case, I never succeeded at a proper port, nor did anybody
> else, so don't take my advise regarding Windows too seriously.

The above work on restructuring the Sage lib is still very much on my
docket, but not likely to happen without more funding just due to the
amount of time needed to do it.  I do have a plan that's been underway
for months for restructuring how sage-the-lib is packaged.

> If I had to run Sage on Windows for some reason today, I would use
> Docker or VirtualBox.I helped support somebody using the Cygwin
> version of Sage on Windows at the Sage booth at the Joint Math
> Meetings last week, and it typically took about 1 minute to start up
> Sage, which was scary.  She also was 100% convinced that copy/paste in
> the Sage terminal (really cygwin) didn't work, which would make using
> Sage very painful indeed.   It turned out that copy/paste does work if
> you use the context menu.

I wish you had asked me about this or brought it up with me before
spreading unfounded FUD based on one experience.  I really don't
appreciate it--it sets a bad example when the creator of Sage says
"don't use the Windows port of Sage", and is pretty insulting frankly.

Lots of people are using the Windows version just fine.  It's true
that startup is slow (albeit faster after the first time), but it's
still my biggest priority to improve.  It will take some difficult
hacks because the main problem is just the large number of DLLs loaded
at startup (425 from "$SAGE_LOCAL" alone), and loading DLLs is
typically much slower and more heavy-weight than shared libraries on
Linux.  The main way to improve this would be to make further (large)
improvements to lazy-loading capabilities.  There's absolutely no
reason 425 extension modules need to be loaded just to get a prompt up
and a global namespace (most of the global namespace (as in, the list
of names) can be "pre-compiled" for example, and its components
lazily-loaded upon use).  Work like this would of course benefit all
platforms.  Another more Windows-specific approach, which is common in
the Windows world (e.g. for MS Office, and most browsers) is to have
kind of a little "fork server" that automatically loads Sage to a
usable state in the background at boot, so that when the user actually
launches a terminal it's much faster.  This is something I've been
meaning to try.

So these are engineering challenges, but solvable ones, not reasons to
say "don't use X".

Sage in Docker on Windows works quite nicely provided that:

a) You're comfortable using Docker in the first place, which has a not
insignificant learning curve.
b) You already have a decent terminal emulator for Windows installed,
or you have the more modern cmd.exe that has shipped with some more
recent Windows updates (and that I think you need some developer tools
installed to have; I forget the details).
c) You don't care about certain functionality working well like, I
don't know, being able to view plots.

Sage in a VM in Windows is a terrible experience for anyone who just
wants to use Sage on Windows.

The stuff about copy/paste is just nonsense.  I'm not sure what the
problem there was.  It is *slightly* unintuitive because it's not
CTRL+C/CTRL+V.  Rather, it works more like many *nix terminal
emulators in that merely selecting text copies it.  Paste is done with
a middle-mouse click (if you have a middle button) or with Shift+Ins.
Why Shift+Ins I'm not sure, but that's common in terminal emulators on
Windows, including cmd.exe.  I think CTRL+V might interfere with
something else.  Regardless, the correct shortcut key is listed in the
context menu.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an 

Re: [sage-devel] Native Windows version

2019-01-23 Thread E. Madison Bray
On Tue, Jan 22, 2019 at 11:34 PM deSitter  wrote:
>
> Hello all,
>
> I am interested in creating a native Windows port completely independent of 
> the ugh-worthy Cygwin. Does such a project exist?
>
> TIA
>
> -drl

This is something I had planned to do from the start.  It was never my
preference to use Cygwin, and instead was going to focus on just using
the more minimal MSYS libs.  However, porting all of Sage's
*dependencies* and especially the other CAS's such as GAP and Singular
to work natively is extremely non-trivial (as is porting some other
software like cysignals, though Vincent Klein has made great progress
on that).

I looked early on into some of the dependencies and what it would take
to port them.  I think GAP, for example, would not be *that* hard.
But it's still a non-trivial amount of work.  One of the biggest
hurdles is simply replacing all the uses of fork() throughout Sage and
various dependencies with the appropriate alternative, which may vary
from case to case depending on how it's being used.

If you would like to find funding to pay my salary for the next two to
three years I'd be happy to do it.

P.S. I would not characterize Cygwin as "ugh-worthy".  Cygwin is a
tour-de-force of engineering and is the only reason making Sage work
on Windows was feasible at all, as well as provide a usable UNIX shell
experience along with it.  My only serious motivation for moving away
from Cygwin would be the performance and stability problems
surrounding fork().  It's remarkable that Cygwin is even able to
emulate fork() at all, but it's once of its shakiest areas.  It would
probably help if MSFT open-sourced parts of the WSL, or at least gave
documentation and guidance on how to use the undocumented
RtlCloneUserProcess interface that is known to exist in the NT kernel
but that nobody really knows how to use:
https://www.cygwin.com/ml/cygwin/2018-01/msg00201.html

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Native Windows version

2019-01-22 Thread Jeroen Demeyer

On 2019-01-23 00:11, William Stein wrote:

I helped support somebody using the Cygwin
version of Sage on Windows at the Sage booth at the Joint Math
Meetings last week, and it typically took about 1 minute to start up
Sage, which was scary.


But mathematical computations (which do not involve syscalls) shouldn't 
be slower, right?


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Native Windows version

2019-01-22 Thread Dima Pasechnik
On Tue, Jan 22, 2019 at 10:34 PM deSitter  wrote:
>
> Hello all,
>
> I am interested in creating a native Windows port completely independent of 
> the ugh-worthy Cygwin. Does such a project exist?

there are parts of Sage that are really stumbling blocks for such a project,
GAP one of them.
You might start with GAP - I'd expect that it might be quite an effort, though.


>
> TIA
>
> -drl
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Native Windows version

2019-01-22 Thread William Stein
On Tue, Jan 22, 2019 at 2:34 PM deSitter  wrote:
>
> Hello all,
>
> I am interested in creating a native Windows port completely independent of 
> the ugh-worthy Cygwin. Does such a project exist?

Not anymore.  I came the closest to writing one, but still didn't
really get close (this was a long time ago -- back when Microsoft way
paying REvolution to port R to Windows).  It's very difficult, because
numerous Sage dependencies have never been properly ported to Windows.
  If I were to try today, I would start by trying to refactor Sage
itself into a sage-core, with minimal dependencies, and other
libraries that depend on sage-core.  Once that is done [1], then I
would worry about porting only sage-core to Windows, as a standard
Python library that is Anaconda installable (I would leverage Anaconda
as much as possible [2]).   With that done, I would turn to whatever
major modules (e.g., sage-combinat, sage-nt, sage-algebra, etc.) are
of most interest, and try to port them one-by-one to Windows.  Some
would not be possible due to dependencies, and others would be easy.
  In any case, I never succeeded at a proper port, nor did anybody
else, so don't take my advise regarding Windows too seriously.

If I had to run Sage on Windows for some reason today, I would use
Docker or VirtualBox.I helped support somebody using the Cygwin
version of Sage on Windows at the Sage booth at the Joint Math
Meetings last week, and it typically took about 1 minute to start up
Sage, which was scary.  She also was 100% convinced that copy/paste in
the Sage terminal (really cygwin) didn't work, which would make using
Sage very painful indeed.   It turned out that copy/paste does work if
you use the context menu.

 -- William

[1] I realize that maybe Sage is such a complicated Python library at
this point (million lines of code), with so many outstanding "needs
review" tickets on trac (always over 200!) that such a refactor would
be brutally difficult for any single human being, and very invasive to
Sage development.  It's probably totally unrealistic.

[2] When I was trying hard to do the Windows port of Sage in 2007 (?),
I was very, very frustrated because the Anaconda (or whatever it was
called) was all a closed source product of Enthought, and we couldn't
use it for our Sage port.   I pointed this out during my invited Scipy
talk, and it made the people who invited me pretty angry at me.  In
any case, Anaconda has since been very generously made open source.  I
would make step 0 of porting sage to windows be to fully understand
and appreciate what Anaconda on Windows is currently, and very likely
build on that.  The build system for something complicated like Sage
on windows is really important, and the current Sage build system
doesn't make sense to use natively with Windows.

>
> TIA
>
> -drl
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William (http://wstein.org)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.