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] Upcoming Debian freeze

2019-01-23 Thread Dima Pasechnik
In case it matters, I have just uploaded Sagetex 3.2 to CTAN.
Not sure whether Debian does any synchronisation of Sagetex@CTAN with
Sagtex @ sage - hopefully it does not break anything for you.

On Thu, Jan 10, 2019 at 3:41 PM Jerome BENOIT  wrote:
>
>
>
> On 10/01/2019 10:31, Dima Pasechnik wrote:
> > sagetex 3.1  does not correspond to anything on the upstream repo. I
> > pulled it as it was broken in various ways, don't use it.
> > Please switch to https://github.com/sagemath/sagetex/releases/tag/3.2
>
> SageTeX 3.2 on its way to Sid
>
> Jerome
>
> >
> > Thanks,
> > Dima
> >
> > On Thu, Jan 10, 2019 at 2:07 AM Jerome BENOIT  wrote:
> >>
> >> Hello,
> >>
> >> On 09/01/2019 21:40, Dima Pasechnik wrote:
> >>> Perhaps we can also include in 8.6 the update to sagetex which is
> >>> currently under review on
> >>> https://trac.sagemath.org/ticket/27024 and has Debian patches merged,
> >>> and appears to work on py3 too
> >>> thanks to many other patches...
> >>
> >> SageTeX is managed as a different package.
> >>
> >> Whatever, sagetex 3.1 is already in Debian. I was not aware of version 3.2 
> >> thanks.
> >>
> >> It is not clear to me whether or not it make sense to make Python 3 
> >> version of it
> >> given that SageMath seems to run with Python.
> >>
> >>
> >>
> >> Cheers,
> >> Jerome
> >>
>
> --
> Jerome BENOIT | calculus+at-rezozer^dot*net
> https://qa.debian.org/developer.php?login=calcu...@rezozer.net
> AE28 AE15 710D FF1D 87E5  A762 3F92 19A6 7F36 C68B
>

-- 
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] How is package installation/uninstallation supposed to work?

2019-01-23 Thread John H Palmieri


On Wednesday, January 23, 2019 at 9:58:19 AM UTC-8, E. Madison Bray wrote:
>
> On Wed, Jan 23, 2019 at 6:26 PM John H Palmieri  > wrote: 
> > 
> > 
> > 
> > On Wednesday, January 23, 2019 at 9:11:17 AM UTC-8, John H Palmieri 
> wrote: 
> >> 
> >> 
> >> 
> >> On Wednesday, January 23, 2019 at 9:06:45 AM UTC-8, John H Palmieri 
> wrote: 
> >>> 
> >>> 
> >>> 
> >>> On Wednesday, January 23, 2019 at 8:57:24 AM UTC-8, John H Palmieri 
> wrote: 
>  
>  
>  
>  On Wednesday, January 23, 2019 at 3:59:41 AM UTC-8, E. Madison Bray 
> wrote: 
> > 
> > On Tue, Jan 22, 2019 at 8:30 PM John H Palmieri  
> wrote: 
> > > 
> > > Here is the situation: I've been playing around with new versions 
> of Sphinx. If I've installed a new version and then go back to an old 
> version, the directory local/lib/python2.7/site-libraries/sphinx/ is not 
> removed and then recreated, but instead the changed files are reinstalled, 
> leaving remnants of the previous version there. Is this how things are 
> supposed to work? 
> > 
> > That is definitely not how anything is supposed to work, nor is it 
> how 
> > it does work normally.  You'd have to describe exactly what you did 
> > though. 
>  
>  
>  I checked out #26451 (which updates Sphinx) and ran "make". Played 
> around with it for a while, then checked out "develop" and ran "make". 
> Frequently, but maybe not every time, math.py remains and I get an import 
> error when Sage uses Sphinx to build the documentation. 
> >>> 
> >>> 
> >>> It's also possible that I ran "./sage -f sphinx", too, in case that 
> makes a difference. 
> >>> 
>  
> > 
> > FWIW pip keeps its own manifest of what files it installed, 
> > so when you remove/upgrade a package it will normally remove all 
> those 
> > files first. 
> >> 
> >> 
> >> I just now checked out the git branch for #26451, ran "make build", 
> then checked out develop, and ran "make". When it reached the docbuilding 
> part of things, I got 
> >> 
> >> [dochtml] from math import sqrt 
> >> [dochtml] ImportError: cannot import name sqrt 
> >> 
> >> because math.py remains in 
> local/lib/python2.7/site-libraries/sphinx/util/ 
> >> 
> >> I did it again and the same thing happened (check out 26451, make 
> build, check out develop, make). 
> > 
> > 
> > The installation log for Sphinx says 
> > 
> >> Old-style or corrupt stamp file 
> '/Users/palmieri/Desktop/Sage_stuff/git/sage/local/var/lib/sage/installed/sphinx-1.7.6.p0'
>  
>
> >> No legacy uninstaller found for 'sphinx'; nothing to do 
> > 
> > 
> > (A message like this appears for both the old and new versions of 
> Sphinx.) Could this be related? The json file seems to be corrupted: it 
> looks to me like the file names should be quoted. Of course, all of the 
> stamp files in the "installed" directory have this format, so my guess is 
> that they are all corrupted, as far as json (or Python's json module) is 
> concerned. 
>
> Indeed that is the problem.  It appears that those files are corrupt 
> on OSX.  I can reproduce this as well.  I wonder why no one's 
> mentioned it before now: That could have been a real source of 
> problems (including this one)! 
>
> Apparently it comes down to a GNU sed vs. BSD sed difference.  I think 
> I'll just replace this part of the code with a snippet of Python. 
>
> I sure do hate computers. 
>

Please cc me on any ticket you open.

-- 
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.


[sage-devel] Re: How to implement this Parent/Element?

2019-01-23 Thread Brent W. Baccala
I see, now.  Thank you.

On Wednesday, January 23, 2019 at 2:32:18 PM UTC-5, Travis Scrimshaw wrote:
>
> Change element_class() to element_class.
>
> It is all in the error message (remember that self is always an argument).
>
> Best,
> Travis
>
>

-- 
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.


[sage-devel] Re: How to implement this Parent/Element?

2019-01-23 Thread Travis Scrimshaw
Change element_class() to element_class.

It is all in the error message (remember that self is always an argument).

Best,
Travis

-- 
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] How is package installation/uninstallation supposed to work?

2019-01-23 Thread E. Madison Bray
On Wed, Jan 23, 2019 at 6:26 PM John H Palmieri  wrote:
>
>
>
> On Wednesday, January 23, 2019 at 9:11:17 AM UTC-8, John H Palmieri wrote:
>>
>>
>>
>> On Wednesday, January 23, 2019 at 9:06:45 AM UTC-8, John H Palmieri wrote:
>>>
>>>
>>>
>>> On Wednesday, January 23, 2019 at 8:57:24 AM UTC-8, John H Palmieri wrote:



 On Wednesday, January 23, 2019 at 3:59:41 AM UTC-8, E. Madison Bray wrote:
>
> On Tue, Jan 22, 2019 at 8:30 PM John H Palmieri  
> wrote:
> >
> > Here is the situation: I've been playing around with new versions of 
> > Sphinx. If I've installed a new version and then go back to an old 
> > version, the directory local/lib/python2.7/site-libraries/sphinx/ is 
> > not removed and then recreated, but instead the changed files are 
> > reinstalled, leaving remnants of the previous version there. Is this 
> > how things are supposed to work?
>
> That is definitely not how anything is supposed to work, nor is it how
> it does work normally.  You'd have to describe exactly what you did
> though.


 I checked out #26451 (which updates Sphinx) and ran "make". Played around 
 with it for a while, then checked out "develop" and ran "make". 
 Frequently, but maybe not every time, math.py remains and I get an import 
 error when Sage uses Sphinx to build the documentation.
>>>
>>>
>>> It's also possible that I ran "./sage -f sphinx", too, in case that makes a 
>>> difference.
>>>

>
> FWIW pip keeps its own manifest of what files it installed,
> so when you remove/upgrade a package it will normally remove all those
> files first.
>>
>>
>> I just now checked out the git branch for #26451, ran "make build", then 
>> checked out develop, and ran "make". When it reached the docbuilding part of 
>> things, I got
>>
>> [dochtml] from math import sqrt
>> [dochtml] ImportError: cannot import name sqrt
>>
>> because math.py remains in local/lib/python2.7/site-libraries/sphinx/util/
>>
>> I did it again and the same thing happened (check out 26451, make build, 
>> check out develop, make).
>
>
> The installation log for Sphinx says
>
>> Old-style or corrupt stamp file 
>> '/Users/palmieri/Desktop/Sage_stuff/git/sage/local/var/lib/sage/installed/sphinx-1.7.6.p0'
>> No legacy uninstaller found for 'sphinx'; nothing to do
>
>
> (A message like this appears for both the old and new versions of Sphinx.) 
> Could this be related? The json file seems to be corrupted: it looks to me 
> like the file names should be quoted. Of course, all of the stamp files in 
> the "installed" directory have this format, so my guess is that they are all 
> corrupted, as far as json (or Python's json module) is concerned.

Indeed that is the problem.  It appears that those files are corrupt
on OSX.  I can reproduce this as well.  I wonder why no one's
mentioned it before now: That could have been a real source of
problems (including this one)!

Apparently it comes down to a GNU sed vs. BSD sed difference.  I think
I'll just replace this part of the code with a snippet of Python.

I sure do hate computers.

-- 
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] How is package installation/uninstallation supposed to work?

2019-01-23 Thread John H Palmieri


On Wednesday, January 23, 2019 at 9:11:17 AM UTC-8, John H Palmieri wrote:
>
>
>
> On Wednesday, January 23, 2019 at 9:06:45 AM UTC-8, John H Palmieri wrote:
>>
>>
>>
>> On Wednesday, January 23, 2019 at 8:57:24 AM UTC-8, John H Palmieri wrote:
>>>
>>>
>>>
>>> On Wednesday, January 23, 2019 at 3:59:41 AM UTC-8, E. Madison Bray 
>>> wrote:

 On Tue, Jan 22, 2019 at 8:30 PM John H Palmieri  
 wrote: 
 > 
 > Here is the situation: I've been playing around with new versions of 
 Sphinx. If I've installed a new version and then go back to an old 
 version, 
 the directory local/lib/python2.7/site-libraries/sphinx/ is not removed 
 and 
 then recreated, but instead the changed files are reinstalled, leaving 
 remnants of the previous version there. Is this how things are supposed to 
 work? 

 That is definitely not how anything is supposed to work, nor is it how 
 it does work normally.  You'd have to describe exactly what you did 
 though.  
>>>
>>>
>>> I checked out #26451 (which updates Sphinx) and ran "make". Played 
>>> around with it for a while, then checked out "develop" and ran "make". 
>>> Frequently, but maybe not every time, math.py remains and I get an import 
>>> error when Sage uses Sphinx to build the documentation.
>>>
>>
>> It's also possible that I ran "./sage -f sphinx", too, in case that makes 
>> a difference.
>>
>>  
>>>
 FWIW pip keeps its own manifest of what files it installed, 
 so when you remove/upgrade a package it will normally remove all those 
 files first. 

>>>
> I just now checked out the git branch for #26451, ran "make build", then 
> checked out develop, and ran "make". When it reached the docbuilding part 
> of things, I got
>
> [dochtml] from math import sqrt
> [dochtml] ImportError: cannot import name sqrt
>
> because math.py remains in local/lib/python2.7/site-libraries/sphinx/util/
>
> I did it again and the same thing happened (check out 26451, make build, 
> check out develop, make).
>

The installation log for Sphinx says

Old-style or corrupt stamp file 
> '/Users/palmieri/Desktop/Sage_stuff/git/sage/local/var/lib/sage/installed/sphinx-1.7.6.p0'
> No legacy uninstaller found for 'sphinx'; nothing to do
>

(A message like this appears for both the old and new versions of Sphinx.) 
Could this be related? The json file seems to be corrupted: it looks to me 
like the file names should be quoted. Of course, all of the stamp files in 
the "installed" directory have this format, so my guess is that they are 
all corrupted, as far as json (or Python's json module) is concerned.

-- 
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] How is package installation/uninstallation supposed to work?

2019-01-23 Thread John H Palmieri


On Wednesday, January 23, 2019 at 9:06:45 AM UTC-8, John H Palmieri wrote:
>
>
>
> On Wednesday, January 23, 2019 at 8:57:24 AM UTC-8, John H Palmieri wrote:
>>
>>
>>
>> On Wednesday, January 23, 2019 at 3:59:41 AM UTC-8, E. Madison Bray wrote:
>>>
>>> On Tue, Jan 22, 2019 at 8:30 PM John H Palmieri  
>>> wrote: 
>>> > 
>>> > Here is the situation: I've been playing around with new versions of 
>>> Sphinx. If I've installed a new version and then go back to an old version, 
>>> the directory local/lib/python2.7/site-libraries/sphinx/ is not removed and 
>>> then recreated, but instead the changed files are reinstalled, leaving 
>>> remnants of the previous version there. Is this how things are supposed to 
>>> work? 
>>>
>>> That is definitely not how anything is supposed to work, nor is it how 
>>> it does work normally.  You'd have to describe exactly what you did 
>>> though.  
>>
>>
>> I checked out #26451 (which updates Sphinx) and ran "make". Played around 
>> with it for a while, then checked out "develop" and ran "make". Frequently, 
>> but maybe not every time, math.py remains and I get an import error when 
>> Sage uses Sphinx to build the documentation.
>>
>
> It's also possible that I ran "./sage -f sphinx", too, in case that makes 
> a difference.
>
>  
>>
>>> FWIW pip keeps its own manifest of what files it installed, 
>>> so when you remove/upgrade a package it will normally remove all those 
>>> files first. 
>>>
>>
I just now checked out the git branch for #26451, ran "make build", then 
checked out develop, and ran "make". When it reached the docbuilding part 
of things, I got

[dochtml] from math import sqrt
[dochtml] ImportError: cannot import name sqrt

because math.py remains in local/lib/python2.7/site-libraries/sphinx/util/

I did it again and the same thing happened (check out 26451, make build, 
check out develop, make).

-- 
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] How is package installation/uninstallation supposed to work?

2019-01-23 Thread John H Palmieri


On Wednesday, January 23, 2019 at 8:57:24 AM UTC-8, John H Palmieri wrote:
>
>
>
> On Wednesday, January 23, 2019 at 3:59:41 AM UTC-8, E. Madison Bray wrote:
>>
>> On Tue, Jan 22, 2019 at 8:30 PM John H Palmieri  
>> wrote: 
>> > 
>> > Here is the situation: I've been playing around with new versions of 
>> Sphinx. If I've installed a new version and then go back to an old version, 
>> the directory local/lib/python2.7/site-libraries/sphinx/ is not removed and 
>> then recreated, but instead the changed files are reinstalled, leaving 
>> remnants of the previous version there. Is this how things are supposed to 
>> work? 
>>
>> That is definitely not how anything is supposed to work, nor is it how 
>> it does work normally.  You'd have to describe exactly what you did 
>> though.  
>
>
> I checked out #26451 (which updates Sphinx) and ran "make". Played around 
> with it for a while, then checked out "develop" and ran "make". Frequently, 
> but maybe not every time, math.py remains and I get an import error when 
> Sage uses Sphinx to build the documentation.
>

It's also possible that I ran "./sage -f sphinx", too, in case that makes a 
difference.

 
>
>> FWIW pip keeps its own manifest of what files it installed, 
>> so when you remove/upgrade a package it will normally remove all those 
>> files first. 
>>
>

-- 
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] How is package installation/uninstallation supposed to work?

2019-01-23 Thread John H Palmieri


On Wednesday, January 23, 2019 at 3:59:41 AM UTC-8, E. Madison Bray wrote:
>
> On Tue, Jan 22, 2019 at 8:30 PM John H Palmieri  > wrote: 
> > 
> > Here is the situation: I've been playing around with new versions of 
> Sphinx. If I've installed a new version and then go back to an old version, 
> the directory local/lib/python2.7/site-libraries/sphinx/ is not removed and 
> then recreated, but instead the changed files are reinstalled, leaving 
> remnants of the previous version there. Is this how things are supposed to 
> work? 
>
> That is definitely not how anything is supposed to work, nor is it how 
> it does work normally.  You'd have to describe exactly what you did 
> though.  


I checked out #26451 (which updates Sphinx) and ran "make". Played around 
with it for a while, then checked out "develop" and ran "make". Frequently, 
but maybe not every time, math.py remains and I get an import error when 
Sage uses Sphinx to build the documentation.
 

> FWIW pip keeps its own manifest of what files it installed, 
> so when you remove/upgrade a package it will normally remove all those 
> files first. 
>

-- 
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] Installation problem

2019-01-23 Thread E. Madison Bray
On Wed, Jan 23, 2019 at 1:41 PM nandini nandu
 wrote:
>
> While running ./sage from my terminal, I got this error. Please help me. I am 
> using Ubuntu 18.04. I succesfully installed LaTex, ImageMagick.
>
>
> Error: The path to the Sage directory ($SAGE_ROOT) MUST NOT contain spaces.
> It is currently "/home/sanju/Program 
> files/sage-8.6-Ubuntu_18.04-x86_64/SageMath".
> Please correct this by moving Sage (or renaming one or more directories) 
> first.
> Exiting now...
> Error setting environment variables by sourcing '/home/sanju/Program 
> files/sage-8.6-Ubuntu_18.04-x86_64/SageMath/src/bin/sage-env';

Hello,

As the error message states very loudly:

> Error: The path to the Sage directory ($SAGE_ROOT) MUST NOT contain spaces.

You installed sage in a path containing "Program files" which contains
spaces.  So please don't do that.

For what it's worth, this is not so much a problem with sage itself,
but rather with some of the software that it provides wrappers for,
not all of which is as flexible when it comes to system integration.
So the error is trying to prevent you from doing this so that you'll
have less pain later.

Please don't build programs in a path containing spaces in
general--lots of UNIX-y software tends to not like this (and it's more
pain for you too).

-- 
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.


[sage-devel] Installation problem

2019-01-23 Thread nandini nandu
While running ./sage from my terminal, I got this error. Please help me. I 
am using Ubuntu 18.04. I succesfully installed LaTex, ImageMagick.


Error: The path to the Sage directory ($SAGE_ROOT) MUST NOT contain spaces.
It is currently "/home/sanju/Program 
files/sage-8.6-Ubuntu_18.04-x86_64/SageMath".
Please correct this by moving Sage (or renaming one or more directories) 
first.
Exiting now...
Error setting environment variables by sourcing '/home/sanju/Program 
files/sage-8.6-Ubuntu_18.04-x86_64/SageMath/src/bin/sage-env';

-- 
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] How is package installation/uninstallation supposed to work?

2019-01-23 Thread E. Madison Bray
On Tue, Jan 22, 2019 at 8:30 PM John H Palmieri  wrote:
>
> Here is the situation: I've been playing around with new versions of Sphinx. 
> If I've installed a new version and then go back to an old version, the 
> directory local/lib/python2.7/site-libraries/sphinx/ is not removed and then 
> recreated, but instead the changed files are reinstalled, leaving remnants of 
> the previous version there. Is this how things are supposed to work?

That is definitely not how anything is supposed to work, nor is it how
it does work normally.  You'd have to describe exactly what you did
though.  FWIW pip keeps its own manifest of what files it installed,
so when you remove/upgrade a package it will normally remove all those
files first.

-- 
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.