[sage-devel] Re: State of Sage Wiki and Support

2016-09-09 Thread Samuel Lelievre
Thu 2016-09-01 01:45:19 UTC+2, saad khalid wrote on sage-support:

> Hey everyone:

Hey! Thanks for raising these points. I thought this discussion could
get more contributions on sage-devel, so I moved it here.

All please reply only on sage-devel to keep the discussion in one place.

> It's seemed to me lately that the state of the documentation is kinda
> all over the place and dated.

I agree that SageMath's documentation needs tender loving care.
To be fair, many efforts are taken to improve its state. For instance,
- there are a number of trac tickets about documentation [a]
- documentation was one of the themes of Sage days 77 in Cernay [b]
  although more on the technical side: improving Sphinx docbuilding.
To be sure, the discussion you are proposing about how discoverable
Sage's documentation is, and how it can be perceived overall, has merit.
We are time and again reminded of some faults through various channels.

[a] 
https://trac.sagemath.org/query?order=status=1=~documentation=~documentation=documentation
[b] https://wiki.sagemath.org/days77

> I've been having increasing trouble recently
> with finding the documentation for functions online, perhaps my Google
> skills are falling off?

Your Google skills are most likely not the matter here. It's more our
skills at getting Google to properly index our html documentation files
at doc.sagemath.org, after we moved documentation there from its former
location at www.sagemath.org/doc recently. This is discussed at

https://github.com/sagemath/website/issues/86

One thing is that most links from "outside pages" to Sage documentation
still point to urls at www.sagemath.org/doc where the documentation used
to live until recently. That likely does not help doc.sagemath.org
being well indexed by Google's search engine. Hopefully that should
improve with time and some efforts, and doc.sagemath.org links should
make their way back to the top results in Google websearch results.

A test case is the websearch [1] which one would expect to get you straight
to [2] but, as it is, I don't get [2] in the results pages, even if I 
restrict
the search to doc.sagemath.org and use quotes, as in [3].

[1] 
https://www.google.com/search?q=sage+Elements+of+Quotients+of+Univariate+Polynomial+Rings
[2] 
http://doc.sagemath.org/html/en/reference//polynomial_rings/sage/rings/polynomial/polynomial_quotient_ring_element.html
[3] 
https://www.google.com/search?q=sage+"Elements+of+Quotients+of+Univariate+Polynomial+Rings"+site:doc.sagemath.org

> I know that you can always run function()? and
> have it give you the documentation, but I think it should be in a place
> where it's easy to find and read online. Mathematica's website has a great
> reference section for documenting its functions; it's informative and
> well presented. Ours, unfortunately, doesn't seem to be in one place.
> Also, both the function documentation and the main tutorial look quite
> dated. A while back I had sent in some feedback regarding Sage and what
> I thought needed improvement, and in that feedback I mentioned two
> websites whose layout looked very elegant. One of them is here:
> https://www.atlassian.com/git/tutorials/
> The other is this:
> 
http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html
>
> While their documentation might not be as thorough as ours is (at least,
> from what I could tell), I think the design and layout of their
> documentation is very very nice. I don't know how Atlassian does its
> layout (if they designed it on their own or use a premade layout),
> however I believe Jupyter uses something called https://readthedocs.org/,
> which is free. I honestly think that we should move over to what Jupyter
> is using for their documentation, at least for the tutorial. Perhaps
> there is something better for the documentation of functions, maybe
> something similar to what mathematic has set up. 

It's true that it wouldn't hurt to have a bunch of polished up-to-date
easily discoverable tutorials that you can try immediately without any
setup effort, either online (tmpnb, SageCell, SageMathCloud) or on one's
own Sage if already installed.

On the one side, documentation and tutorials like those you point to,
on the other hand, some equivalent of Try Jupyter [4] in terms of ease.

[4] https://try.jupyter.org

In a sense, between SageCell and SageMathCloud, we already have the
"other hand", but not quite intertwined enough with the first hand.

Some recent and ongoing work that should help towards that is the work
around packaging Thebe and using it to get us live documentation in
Jupyter notebook worksheets like we have in Sage notebook worksheets.

Two steps are already done (#21309, #20690), and follow-up improvements
are being worked on at #20893.

- #21309 Package Thebe
  https://trac.sagemath.org/ticket/21309
- #20690 Live documentation in Jupyter using Thebe
  https://trac.sagemath.org/ticket/20690
- #20893 Improve live documentation in the Jupyter 

[sage-devel] Fwd: State of Sage Wiki and Support

2016-09-09 Thread slelievre


Le jeudi 1 septembre 2016 01:45:19 UTC+2, saad khalid a écrit :
>
> Hey everyone:
>
> It's seemed to me lately that the state of the documentation is kinda all 
> over the place and dated. I've been having increasing trouble recently with 
> finding the documentation for functions online, perhaps my Google skills 
> are falling off? I know that you can always run function()? and have it 
> give you the documentation, but I think it should be in a place were it's 
> easy to find and read online. Mathematica's website has a great reference 
> section for documenting its functions; it's informative and well presented. 
> Ours, unfortunately, doesn't seem to be in one place. Also, both the 
> function documentation and the main tutorial look quite dated. A while back 
> I had sent in some feedback regarding Sage and what I thought needed 
> improvement, and in that feedback I mentioned two websites whose layout 
> looked very elegant. One of them is here:
> https://www.atlassian.com/git/tutorials/
> The other is this:
>
> http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html
>
> While their documentation might not be as thorough as ours is(at least, 
> from what I could tell), I think the design and layout of their 
> documentation is very very nice. I don't know how Atlassian does its layout 
> (if they designed it on their own or use a premade layout), however I 
> believe Jupyter uses something called https://readthedocs.org/, which is 
> free. I honestly think that we should move over to what Jupyter is using 
> for their documentation, at least for the tutorial. Perhaps there is 
> something better for the documentation of functions, maybe something 
> similar to what mathematic has set up. 
>
> I also think its important that all of the documentation be hosted at the 
> same place. 
>
> What do you guys think? Do you like the layouts in the links above? Do you 
> have any other ideas? I'm happy to help with this transition, if we do 
> decide to do it. I could go on about this but, basically, I like the format 
> mahematica uses for documenting its functions, and I like the format 
> Jupyter(and Atlassian) uses for their tutorial. I don't know if any 
> progress was being made on these things but, if not, I wanted to bring some 
> attention to it and start a discussion about it. Thanks for taking the time 
> to read 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] Jupyter notebook by default?

2016-09-09 Thread Jason Grout
Nice! That's even better that it works out-of-the-box!

Jason


On Fri, Sep 9, 2016 at 6:06 PM Volker Braun  wrote:

>
> 
>
>
> On Friday, September 9, 2016 at 2:53:29 PM UTC+2, kcrisman wrote:
>>
>> Sorry for the necropost, but I couldn't find any other canonical place to
>> mention this:
>>
>> https://ask.sagemath.org/question/34782/how-to-render-html-or-latex-tables-in-jupyter-notebook/
>> Likely this is a fairly easy hook thing or the pretty_print issue but
>> thought it should be here for completeness.
>>
> --
> 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] sage -br rebuilds things that were not changed

2016-09-09 Thread Paul Masson
+1 That would save on time and confusion.

On Friday, September 9, 2016 at 3:20:54 PM UTC-7, William wrote:
>
> On Fri, Sep 9, 2016 at 3:08 PM, Volker Braun  > wrote: 
> > Whenever you switch to a branch with a different working set you change 
> > timestamps of modified files. Git does not track timestamps. Updated 
> > timestamps cause recompilation. 
>
> So... instead of using timestamps, maybe Cython should use file hashes 
> to determine whether or not to recompile code?My distant memory of 
> when we first wrote the cython dep code for Sage long long ago was 
> that I used timestamps, then Craig Citro or Robert Bradshaw wrote 
> something better using hashes, but I'm not sure.  I'm cc'ing them in 
> case they have any thoughts. 
>
>
> -- 
> 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.


[sage-devel] Re: 404 in Sage Installation Guide

2016-09-09 Thread leif
Paul Masson wrote:
> There does not appear to be a "README.txt" file for Windows installation
> in either the main SageMath repository or the website repository. If
> such a file ever existed, it's long gone. I even checked at archive.org
> for a backup copy, but since the robots.txt file has been blocking the
> /mirror/ directory since 2009 they don't have one either.

Well, there is http://files.sagemath.org/win/README.txt , which
(meanwhile I guess) just contains

"For more informaion on how to setup and run the Sage Virtual Machine,
please read

http://wiki.sagemath.org/SageAppliance;

besides http://files.sagemath.org/win/README-virtualbox.txt , which is
the same file (or an identical copy of the former).


> The simplest solution is to delete the link from the documentation,
> unless someone wants to create the file.

As is, we could short-cut to the wiki page, which isn't directly linked
to from the Installation Guide, at least not in that section.


-leif


> On Thursday, September 8, 2016 at 3:16:36 PM UTC-7, leif wrote:
> 
> The link to README.txt ("Be sure to read the file ..." [!])
> 
>   http://www.sagemath.org/mirror/win/README.txt
> 
> 
> referenced in
> 
>  
> http://doc.sagemath.org/html/en/installation/binary.html#microsoft-windows
> 
> 
> 
> 
> gives a 404, for whatever reason.
> 
> 
> Besides that, the Sage wiki page [1] linked to from
> http://www.sagemath.org/download-windows.html
>  states:
> 
> "This page is copied over from the instructions pages for Sage 5.x
> and 6.x.
> 
> For SageMath 7.0 and higher, most steps should work but the final steps
> should be adapted to take into account the new default which is to use
> the Jupyter notebook.
> 
> Somemeone please adapt the final steps."
> 
> 
> -leif
> 
> 
> [1] https://wiki.sagemath.org/SageAppliance/SageMath-7
> 


-- 
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] sage -br rebuilds things that were not changed

2016-09-09 Thread William Stein
On Fri, Sep 9, 2016 at 3:08 PM, Volker Braun  wrote:
> Whenever you switch to a branch with a different working set you change
> timestamps of modified files. Git does not track timestamps. Updated
> timestamps cause recompilation.

So... instead of using timestamps, maybe Cython should use file hashes
to determine whether or not to recompile code?My distant memory of
when we first wrote the cython dep code for Sage long long ago was
that I used timestamps, then Craig Citro or Robert Bradshaw wrote
something better using hashes, but I'm not sure.  I'm cc'ing them in
case they have any thoughts.


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



Re: [sage-devel] sage -br rebuilds things that were not changed

2016-09-09 Thread Volker Braun
Whenever you switch to a branch with a different working set you change 
timestamps of modified files. Git does not track timestamps. Updated 
timestamps cause recompilation.



On Saturday, September 10, 2016 at 12:03:36 AM UTC+2, Paul Masson wrote:
>
> A little over a week ago I made a new branch from 7.4.beta2 for Trac 
> 21370. I initially ran make on this branch.
>
> For the last week, I have made changes to one file, graphs/graph_plot.py, 
> for that ticket.
>
> For the last week, every time I run sage -b after modifying that one file, 
> the process completes quickly.
>
> Yesterday I made a new branch from 7.4.beta4 for Trac 21458. Since it was 
> one letter in a .rst file, I didn't run build or make on that branch.
>
> Today I switched back to the branch for 21370, made a change to that same 
> one file, and sage -b began recythonizing.
>
> Why would recythonizing be necessary when only changing the same file on 
> the same branch?
>
> Thanks.
>
> On Friday, September 9, 2016 at 2:48:09 PM UTC-7, Jeroen Demeyer wrote:
>>
>> On 2016-09-09 23:34, Paul Masson wrote: 
>> > I'm a bit confused by your answer, because I've been seeing the same 
>> > sort of behavior. For the last week I've been rebuilding a branch based 
>> > on 7.4.beta2. With minor changes to one file, sage -b has been running 
>> > very quickly. Today I made one minor change and the recythonizing 
>> kicked in. 
>> > 
>> > In between this build and the last, I did create a new branch based on 
>> > 7.4.beta4 to correct a single typo, but I didn't build that branch. 
>> > 
>> > Are you saying that even rebuilding the same branch while making the 
>> > same sort of changes can lead to recythonizing? Or is it because I made 
>> > a new branch in the meantime? 
>>
>> Sorry, I don't get what you mean. Can you specify *exactly* the steps 
>> that you do and where you think that too much is being recythonized? 
>>
>

-- 
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] sage -br rebuilds things that were not changed

2016-09-09 Thread Jeroen Demeyer

On 2016-09-10 00:03, Paul Masson wrote:

Why would recythonizing be necessary when only changing the same file on
the same branch?


You are not changing just one file. When you checkout a new branch, a 
lot of files get changed. When you checkout the old branch again, a lot 
of files get changed again. The fact that they are changed to have the 
same content that they originally had, is irrelevant. As far as the 
filesystem is concerned, those files are changed.


--
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] Jupyter notebook by default?

2016-09-09 Thread Volker Braun





On Friday, September 9, 2016 at 2:53:29 PM UTC+2, kcrisman wrote:
>
> Sorry for the necropost, but I couldn't find any other canonical place to 
> mention this:
>
> https://ask.sagemath.org/question/34782/how-to-render-html-or-latex-tables-in-jupyter-notebook/
> Likely this is a fairly easy hook thing or the pretty_print issue but 
> thought it should be here for completeness.
>

-- 
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] sage -br rebuilds things that were not changed

2016-09-09 Thread Paul Masson
A little over a week ago I made a new branch from 7.4.beta2 for Trac 21370. 
I initially ran make on this branch.

For the last week, I have made changes to one file, graphs/graph_plot.py, 
for that ticket.

For the last week, every time I run sage -b after modifying that one file, 
the process completes quickly.

Yesterday I made a new branch from 7.4.beta4 for Trac 21458. Since it was 
one letter in a .rst file, I didn't run build or make on that branch.

Today I switched back to the branch for 21370, made a change to that same 
one file, and sage -b began recythonizing.

Why would recythonizing be necessary when only changing the same file on 
the same branch?

Thanks.

On Friday, September 9, 2016 at 2:48:09 PM UTC-7, Jeroen Demeyer wrote:
>
> On 2016-09-09 23:34, Paul Masson wrote: 
> > I'm a bit confused by your answer, because I've been seeing the same 
> > sort of behavior. For the last week I've been rebuilding a branch based 
> > on 7.4.beta2. With minor changes to one file, sage -b has been running 
> > very quickly. Today I made one minor change and the recythonizing kicked 
> in. 
> > 
> > In between this build and the last, I did create a new branch based on 
> > 7.4.beta4 to correct a single typo, but I didn't build that branch. 
> > 
> > Are you saying that even rebuilding the same branch while making the 
> > same sort of changes can lead to recythonizing? Or is it because I made 
> > a new branch in the meantime? 
>
> Sorry, I don't get what you mean. Can you specify *exactly* the steps 
> that you do and where you think that too much is being recythonized? 
>

-- 
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] sage -br rebuilds things that were not changed

2016-09-09 Thread Jeroen Demeyer

On 2016-09-09 23:34, Paul Masson wrote:

I'm a bit confused by your answer, because I've been seeing the same
sort of behavior. For the last week I've been rebuilding a branch based
on 7.4.beta2. With minor changes to one file, sage -b has been running
very quickly. Today I made one minor change and the recythonizing kicked in.

In between this build and the last, I did create a new branch based on
7.4.beta4 to correct a single typo, but I didn't build that branch.

Are you saying that even rebuilding the same branch while making the
same sort of changes can lead to recythonizing? Or is it because I made
a new branch in the meantime?


Sorry, I don't get what you mean. Can you specify *exactly* the steps 
that you do and where you think that too much is being recythonized?


--
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] sage -br rebuilds things that were not changed

2016-09-09 Thread Paul Masson
I'm a bit confused by your answer, because I've been seeing the same sort 
of behavior. For the last week I've been rebuilding a branch based on 
7.4.beta2. With minor changes to one file, sage -b has been running very 
quickly. Today I made one minor change and the recythonizing kicked in.

In between this build and the last, I did create a new branch based on 
7.4.beta4 to correct a single typo, but I didn't build that branch.

Are you saying that even rebuilding the same branch while making the same 
sort of changes can lead to recythonizing? Or is it because I made a new 
branch in the meantime?

Thanks.

On Friday, September 9, 2016 at 12:12:40 AM UTC-7, Jeroen Demeyer wrote:
>
> On 2016-09-09 08:43, Marco Cognetta wrote: 
> > However, if I change to a 
> > new branch that has no changes which would necessitate recythonizing 
> > code, it will go through the cythonizing step again. 
>
> What makes you think that there are no changes which would necessitate 
> recythonizing? 
>
> Cython does dependency checking, so if it rebuilds something, there must 
> be a reason. In fact, the reason is explicitly stated when cythonizing 
> (with messages like building foo because it depends on bar). 
>

-- 
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: 404 in Sage Installation Guide

2016-09-09 Thread Paul Masson
There does not appear to be a "README.txt" file for Windows installation in 
either the main SageMath repository or the website repository. If such a 
file ever existed, it's long gone. I even checked at archive.org for a 
backup copy, but since the robots.txt file has been blocking the /mirror/ 
directory since 2009 they don't have one either.

The simplest solution is to delete the link from the documentation, unless 
someone wants to create the file.

On Thursday, September 8, 2016 at 3:16:36 PM UTC-7, leif wrote:
>
> The link to README.txt ("Be sure to read the file ..." [!]) 
>
>   http://www.sagemath.org/mirror/win/README.txt 
>
> referenced in 
>
>   
> http://doc.sagemath.org/html/en/installation/binary.html#microsoft-windows 
>
> gives a 404, for whatever reason. 
>
>
> Besides that, the Sage wiki page [1] linked to from 
> http://www.sagemath.org/download-windows.html states: 
>
> "This page is copied over from the instructions pages for Sage 5.x and 
> 6.x. 
>
> For SageMath 7.0 and higher, most steps should work but the final steps 
> should be adapted to take into account the new default which is to use 
> the Jupyter notebook. 
>
> Somemeone please adapt the final steps." 
>
>
> -leif 
>
>
> [1] https://wiki.sagemath.org/SageAppliance/SageMath-7 
>
>

-- 
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: 404 in Sage Installation Guide

2016-09-09 Thread Samuel Lelievre

Fri 2016-09-09 00:16:36 UTC+2, leif:
>
> The link to README.txt ("Be sure to read the file ..." [!]) 
>
>   http://www.sagemath.org/mirror/win/README.txt 
>
> referenced in 
>
>   
> http://doc.sagemath.org/html/en/installation/binary.html#microsoft-windows 
>
> gives a 404, for whatever reason. 
>
> Besides that, the Sage wiki page [1] linked to from 
> http://www.sagemath.org/download-windows.html states: 
>
> "This page is copied over from the instructions pages for Sage 5.x and 
> 6.x. 
>
> For SageMath 7.0 and higher, most steps should work but the final steps 
> should be adapted to take into account the new default which is to use 
> the Jupyter notebook. 
>
> Somemeone please adapt the final steps." 
>
> -leif
>
> [1] https://wiki.sagemath.org/SageAppliance/SageMath-7 
>

Since Sage 7.0, the SageAppliance launches the Jupyter
notebook, instead of the Sage notebook in previous versions.

When that version came out, the instructions Sage wiki page
had not been updated. Users were somewhat puzzled.

Questions on sage-support and Ask Sage included [2].

[2] 
https://ask.sagemath.org/question/32344/vm-virtualbox-sage-70ova-how-to-start/

Seeing that, I decided to split the SageAppliance instructions,
formerly at [3], into three subpages to at least make it clear
which version the instructions were written for.

[3] https://wiki.sagemath.org/SageAppliance/

I wrote the part "someone please adapt the final steps".

The adaptation that is needed in the final steps is to describe
that the SageApplicance now launches the Jupyter notebook
and no longer the Sage notebook. Plus some screenshots.

A page about the various file formats related to Sage,
how to use them, and their relationships, would also be nice.
I created a draft for such a page at [4], feel free to expand
the items there.

[4] https://wiki.sagemath.org/File_formats

-- 
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] Re: PYTHONUSERBASE?

2016-09-09 Thread Jeroen Demeyer

On 2016-09-09 18:29, leif wrote:

See also https://trac.sagemath.org/ticket/21430 for a very recent,
related discussion.


No, it's not related at all.

--
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] Installing sage as a kernel in the system-wide jupyter

2016-09-09 Thread Nils Bruin
I've found the following quite convenient and I wonder what the best place 
is to document this better and/or make it more robust:

sage.repl.ipython_kernel.install.JUPYTER_PATH=os.environ["HOME"]+"/.ipython"
sage.repl.ipython_kernel.install.SageKernelSpec.update()

It installs the sage kernel into (what is for me) my normal jupyter server 
directory. It means I can just run "jupyter notebook" to access sage ipynb 
files.

-- 
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] sage -br rebuilds things that were not changed

2016-09-09 Thread Marco Cognetta
It seems there are some differences that were not showing up when I was 
checking status.

On Saturday, September 10, 2016 at 1:17:31 AM UTC+9, Marco Cognetta wrote:
>
> One public branch is the trac ticket #21423. I just tested the turning on 
> and off again and it happened and then failed. It may be something weird 
> with that branch, but it said it was up to date with the sage repo and I 
> didn't change anything outside of the graph/generators/families.py file.
>
> https://trac.sagemath.org/ticket/21423
>
> [  2/299] Cythonizing sage/libs/ppl.pyx
> 
> Traceback (most recent call last):
>   File "setup.py", line 597, in 
> run_cythonize()
>   File "setup.py", line 589, in run_cythonize
> 'profile': profile,
>   File 
> "/home/boss/github/sage/local/lib/python2.7/site-packages/Cython-0.24.1-py2.7-linux-x86_64.egg/Cython/Build/Dependencies.py",
>  
> line 906, in cythonize
> result.get(9)  # seconds
>   File "/home/boss/github/sage/local/lib/python/multiprocessing/pool.py", 
> line 567, in get
> raise self._value
> CompileError: sage/libs/pari/gen.pyx
> 
> Error building the Sage library
> 
> Makefile:6: recipe for target 'sage' failed
>
>
>
>
> On Friday, September 9, 2016 at 8:20:16 PM UTC+9, Jeroen Demeyer wrote:
>>
>> On 2016-09-09 12:56, Marco Cognetta wrote: 
>> > It has happened to me where I build sage, turn off my computer, turn it 
>> > back on, and build it again. There were no changes made in the meantime 
>> > and it still does the cythonizing step. 
>>
>> Are you really sure that you remember this correctly? Turning off and on 
>> your computer should have no effect (unless there is a problem with your 
>> OS or hardware). 
>>
>> > Also, I have had branches that 
>> > are identical (except for a new file that does not have any 
>> dependencies 
>> > to be rebuilt) which will also go through this cythonizing step (first 
>> > when I switch to the branch, and then again when I switch back to 
>> master 
>> > and try to build it again). 
>>
>> Are these branches somewhere public? Then I could have a look. But right 
>> now, I have too little information to know whether there is a real bug 
>> or just something that you are doing wrongly. 
>>
>

-- 
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: PYTHONUSERBASE?

2016-09-09 Thread leif
William Stein wrote:
> Hi,
> 
> I personally disagree with trying to make Sage's python and the
> general environment be as isolated as possibly from each other. We
> should try to interoperate with the greater Python world as much as
> possible, not change things to discourage that. If you want total
> isolation, use Docker, don't mess with environment variables like
> this...
> 
> I realize that this might just get closed due to philosophical
> differences. How about just document PYTHONUSERBASE in our FAQ or
> something (like it is in python) and trust users to have a clue?
> 
> I've made https://trac.sagemath.org/ticket/21456 about this.  However,
> the authors of the new code in Sage that sets PYTHONUSERBASE if it
> isn't set, might have a very different opinion, and for a good reason.
> Thoughts?

See also https://trac.sagemath.org/ticket/21430 for a very recent,
related discussion.

TL;DR:  I'm against nannying people (i.e., forcing [Sage-]specific
settings), but at the same time we should IMHO prevent users from any
breakages caused by *unintentional* settings (probably even made by
others, not knowing Sage).

And as always, there are three important things:  Documentation,
documentation, and documentation.


-leif


-- 
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] sage -br rebuilds things that were not changed

2016-09-09 Thread Marco Cognetta
One public branch is the trac ticket #21423. I just tested the turning on 
and off again and it happened and then failed. It may be something weird 
with that branch, but it said it was up to date with the sage repo and I 
didn't change anything outside of the graph/generators/families.py file.

https://trac.sagemath.org/ticket/21423

[  2/299] Cythonizing sage/libs/ppl.pyx

Traceback (most recent call last):
  File "setup.py", line 597, in 
run_cythonize()
  File "setup.py", line 589, in run_cythonize
'profile': profile,
  File 
"/home/boss/github/sage/local/lib/python2.7/site-packages/Cython-0.24.1-py2.7-linux-x86_64.egg/Cython/Build/Dependencies.py",
 
line 906, in cythonize
result.get(9)  # seconds
  File "/home/boss/github/sage/local/lib/python/multiprocessing/pool.py", 
line 567, in get
raise self._value
CompileError: sage/libs/pari/gen.pyx

Error building the Sage library

Makefile:6: recipe for target 'sage' failed




On Friday, September 9, 2016 at 8:20:16 PM UTC+9, Jeroen Demeyer wrote:
>
> On 2016-09-09 12:56, Marco Cognetta wrote: 
> > It has happened to me where I build sage, turn off my computer, turn it 
> > back on, and build it again. There were no changes made in the meantime 
> > and it still does the cythonizing step. 
>
> Are you really sure that you remember this correctly? Turning off and on 
> your computer should have no effect (unless there is a problem with your 
> OS or hardware). 
>
> > Also, I have had branches that 
> > are identical (except for a new file that does not have any dependencies 
> > to be rebuilt) which will also go through this cythonizing step (first 
> > when I switch to the branch, and then again when I switch back to master 
> > and try to build it again). 
>
> Are these branches somewhere public? Then I could have a look. But right 
> now, I have too little information to know whether there is a real bug 
> or just something that you are doing wrongly. 
>

-- 
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: sage -br rebuilds things that were not changed

2016-09-09 Thread leif
Jeroen Demeyer wrote:
> On 2016-09-09 12:56, Marco Cognetta wrote:
>> It has happened to me where I build sage, turn off my computer, turn it
>> back on, and build it again. There were no changes made in the meantime
>> and it still does the cythonizing step.
> 
> Are you really sure that you remember this correctly? Turning off and on
> your computer should have no effect (unless there is a problem with your
> OS or hardware).

And "turn off" hopefully means properly shutting down the system (maybe
by pushing the soft-off button / closing the laptop, depending on your
OS and settings).


>> Also, I have had branches that
>> are identical (except for a new file that does not have any dependencies
>> to be rebuilt) which will also go through this cythonizing step (first
>> when I switch to the branch, and then again when I switch back to master
>> and try to build it again).
> 
> Are these branches somewhere public? Then I could have a look. But right
> now, I have too little information to know whether there is a real bug
> or just something that you are doing wrongly.

And are you sure these "identical" branches are based on the same commit?

It for example makes a difference whether you fetch a branch, pull it
into some betaX, or pull it into some betaY / other branch than (the
same version of) develop, say.  You may compare what 'git log' shows for
both, i.e., the last commit that's not from you, such as "Updated
SageMath version to 7.4.beta3".


As mentioned, you can compare branches directly, or just specific files
of your both branches in question.  If you don't want to see the actual
changes (but rather an overview of which files differ and by how much),
you can use

git diff --stat old_branch new_branch -- src/sage/...

For the two branches which allegedly only differ by a newly created
file, the above should give just a single line for exactly that file
(plus a one-line summary on the last line).


-leif


-- 
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] PYTHONUSERBASE?

2016-09-09 Thread William Stein
Hi,

I personally disagree with trying to make Sage's python and the
general environment be as isolated as possibly from each other. We
should try to interoperate with the greater Python world as much as
possible, not change things to discourage that. If you want total
isolation, use Docker, don't mess with environment variables like
this...

I realize that this might just get closed due to philosophical
differences. How about just document PYTHONUSERBASE in our FAQ or
something (like it is in python) and trust users to have a clue?

I've made https://trac.sagemath.org/ticket/21456 about this.  However,
the authors of the new code in Sage that sets PYTHONUSERBASE if it
isn't set, might have a very different opinion, and for a good reason.
Thoughts?

 -- William


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


Re: [sage-devel] Jupyter notebook by default?

2016-09-09 Thread kcrisman


> A bit more robust in escaping:
>
>>
>>>
Thanks.  I don't know enough about the Jupyter nb to know whether there is 
an easy way to get it to render HTML output - perhaps %%html , which would 
seem to me to be what is asked for but I don't use it myself.

-- 
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: Project: LatticeWithIsometry

2016-09-09 Thread Simon Brandhorst
Dear Dima,
sorry for taking such a long time to answer your question. 
I'd say it could do a lot of stuff involving over and sublattices. But then 
it seems like Alex is counting orbits. You'd have to build on top of my 
code to achieve that. 
For my purposes it sufficed to consider a single isometry at a time.

Best
--Simon

On Tuesday, September 6, 2016 at 3:08:56 PM UTC+2, Dima Pasechnik wrote:
>
>
>
> On Tuesday, September 6, 2016 at 9:20:55 AM UTC, Simon Brandhorst wrote:
>>
>> Dear all,
>>
>> I have written some code (toy implementation) in sage. It could be useful 
>> for other people as well.
>> So now I am wondering whether I should make an effort to implement it 
>> meeting the sage-devel standards.
>> How good are the chances for such a project to be included in the sage 
>> source code?
>>
>>
>> So here is the project: LatticeWithIsometry
>> where a lattice L is a free abelian group equipped with a non-degenerate 
>> symmetric bilinear form (ZZ or QQ valued). An isometry f is a ZZ-Module 
>> automorphism preserving the bilinear form. 
>> So we want to model (L,f)
>>
>> Functionality:
>> - constructor for ideal lattices - that is lattices (+isometries) cooked 
>> up from irreducible reciprocal polynomials (think of the cyclotomic 
>> polynomials) and their trace forms
>> - gluing of lattices. That is taking a direct sum
>> (L,f) + (N,g) and getting integral overlattices compatible with (f,g).
>> - describing the action of the isometry on sub/super lattices such as the 
>> dual lattice L' or quotients such as the discriminant group L'/L
>> - a method to decide whether a given isometry of a hyperbolic lattice 
>> preserves a chamber of the positive cone cut out by the root hyperplanes 
>> (this relates to Weyl groups)
>>
>> A possible reference for this is:
>> http://www.math.harvard.edu/~ctm/papers/home/text/papers/pos/pos.pdf
>>
>> My personal aim in this is to model integral hodge isometries of K3 
>> surfaces or IHSMs.
>>
>
> Sounds like a lot of fun; my latest personal foray into this was doing 
> some computations in 
> http://arxiv.org/abs/1604.05836
> (with Lemma 2.11 attributed to me :-))
> and I'm still trying to understand whether I can publish anything 
> meaningful out of it.
>
> It would be interesting to what extent your package can do computations in 
> that paper.
>
> Just in case,
> Dima
>   
>
>>
>>
>> I also wonder how this would fit into the sage world. Should this inherit 
>> from quadratic forms ? (feels wrong) or is there some lattice class out 
>> there?
>> Since I am new in sage, writing a whole lattice class seems to be too 
>> much work for me (and well above my level of experience). 
>>
>> There seem to have been previous discussions about lattices e.g.
>>
>> Discussion in Sage devel:
>>
>>
>> https://groups.google.com/forum/#!searchin/sage-devel/lattice|sort:relevance/sage-devel/OO0ADcuraqE/mUG5_UrYFD4J
>> and
>>
>> https://groups.google.com/forum/#!searchin/sage-devel/lattice$20-poset|sort:relevance/sage-devel/KTmqIcav9e4/wWdiQ71PWVYJ
>>
>> There also seem to have been previous attempts for implementing lattices
>> such as 
>> https://trac.sagemath.org/ticket/11940
>> https://trac.sagemath.org/ticket/15976
>>
>>
>> What has happened to them?
>>
>> Or the rather incomplete FreeQuadraticModule
>>
>> http://doc.sagemath.org/html/en/reference/modules/sage/modules/free_quadratic_module.html
>> which claims to have non trivial functionality over ZZ - I couldn't find 
>> any. 
>>
>>
>>
>> Simon
>>
>

-- 
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] Jupyter notebook by default?

2016-09-09 Thread Jason Grout
A bit more robust in escaping:

try:
from html import escape  # python 3.x
except ImportError:
from cgi import escape  # python 2.x
from IPython.display import HTML

def table(data):
rows = [["%s"%escape(str(i)) for i in data[0]]]
rows.extend([["%s"%escape(str(i)) for i in row] for row in
data[1:]])
s = '\n'.join(['%s'%(''.join(row)) for row in rows])
return HTML('%s'%s)

table([('Header 1', 'Header 2'), (1,'<'), (3,4)])

On Fri, Sep 9, 2016 at 9:28 AM Jason Grout  wrote:

> I don't think we have a good table-printing function built into IPython. A
> simple one is probably pretty straightforward:
>
> try:
> from html import escape  # python 3.x
> except ImportError:
> from cgi import escape  # python 2.x
> from IPython.display import HTML
>
> def table(data):
> rows = [["%s"%escape(i) for i in data[0]]]
> rows.extend([["%s"%i for i in row] for row in data[1:]])
> s = '\n'.join(['%s'%(''.join(row)) for row in rows])
> return HTML('%s'%s)
>
> table([('Header 1', 'Header 2'), (1,2), (3,4)])
>
>
> On Fri, Sep 9, 2016 at 8:53 AM kcrisman  wrote:
>
>> Sorry for the necropost, but I couldn't find any other canonical place to
>> mention this:
>>
>> https://ask.sagemath.org/question/34782/how-to-render-html-or-latex-tables-in-jupyter-notebook/
>> Likely this is a fairly easy hook thing or the pretty_print issue but
>> thought it should be here for completeness.
>>
>> --
>> 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] Jupyter notebook by default?

2016-09-09 Thread Jason Grout
I don't think we have a good table-printing function built into IPython. A
simple one is probably pretty straightforward:

try:
from html import escape  # python 3.x
except ImportError:
from cgi import escape  # python 2.x
from IPython.display import HTML

def table(data):
rows = [["%s"%escape(i) for i in data[0]]]
rows.extend([["%s"%i for i in row] for row in data[1:]])
s = '\n'.join(['%s'%(''.join(row)) for row in rows])
return HTML('%s'%s)

table([('Header 1', 'Header 2'), (1,2), (3,4)])


On Fri, Sep 9, 2016 at 8:53 AM kcrisman  wrote:

> Sorry for the necropost, but I couldn't find any other canonical place to
> mention this:
>
> https://ask.sagemath.org/question/34782/how-to-render-html-or-latex-tables-in-jupyter-notebook/
> Likely this is a fairly easy hook thing or the pretty_print issue but
> thought it should be here for completeness.
>
> --
> 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] Jupyter notebook by default?

2016-09-09 Thread kcrisman
Sorry for the necropost, but I couldn't find any other canonical place to 
mention this:
https://ask.sagemath.org/question/34782/how-to-render-html-or-latex-tables-in-jupyter-notebook/
Likely this is a fairly easy hook thing or the pretty_print issue but 
thought it should be here for completeness.

-- 
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: Weekend workshop BIRS: SageMath development related to K3 surfaces (March 2016)

2016-09-09 Thread Simon Brandhorst
Thank you Frédéric. I wasn't aware of that package. It seems quite 
interesting.

On Thursday, September 8, 2016 at 5:08:32 PM UTC+2, Frédéric Chapoton wrote:
>
> Maybe the authors/users of the Chow package for sage would be interested ? 
> Probably not Sorger, who is busy being currently head of mathematics in 
> CNRS.
>
> http://www.math.sciences.univ-nantes.fr/~sorger/chow_en.html
>
> Frederic
>
> Le jeudi 8 septembre 2016 16:00:37 UTC+2, Simon Brandhorst a écrit :
>>
>> Ursula Whitcher and I are planning to apply to hold a weekend workshop
>> at BIRS next March.
>> The idea is to do SageMath development related to K3 surfaces and 
>> irreducible holomorphic symplectic manifolds (IHSMs/Hyperkähler).
>> Their geometry is accessible through their second integral cohomology group 
>> which is an indefinite lattice. 
>>
>> Our (possible) goals are to implement SageMath functionality for
>> - indefinite lattices,
>> - isometries,
>> - modeling Hodge structures/Hodge isometries,
>> - elliptic fibrations on K3 surfaces,
>> - point counting.
>>
>> Ideally the date is March 11-12.
>>
>> If you are interested in attending, please let us know.
>>
>> Best
>> --Simon
>>
>>

-- 
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] sage -br rebuilds things that were not changed

2016-09-09 Thread Jeroen Demeyer

On 2016-09-09 12:56, Marco Cognetta wrote:

It has happened to me where I build sage, turn off my computer, turn it
back on, and build it again. There were no changes made in the meantime
and it still does the cythonizing step.


Are you really sure that you remember this correctly? Turning off and on 
your computer should have no effect (unless there is a problem with your 
OS or hardware).



Also, I have had branches that
are identical (except for a new file that does not have any dependencies
to be rebuilt) which will also go through this cythonizing step (first
when I switch to the branch, and then again when I switch back to master
and try to build it again).


Are these branches somewhere public? Then I could have a look. But right 
now, I have too little information to know whether there is a real bug 
or just something that you are doing wrongly.


--
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: What is "do_system"?

2016-09-09 Thread Simon King
Hi Jeroen, hi Leif,

On 2016-09-09, Jeroen Demeyer  wrote:
>>> Obviously yes:
>>>
>>> #include 
>>> remove(const char *pathname);
>>
>> For files, unlink().
>
> Depends on what kind of systems you want to support. remove() is C89 
> while unlink() is POSIX.

Doing this and removing some other useless occurrances of "system()"
apparently had a good effect: Before the change, %crun used 6398
samples. After the change, %crun used 4480 samples, which (I suppose)
means that the computation took less time; and do_system doesn't appear
at all.

Thank you very much for your hints!
Simon

-- 
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] sage -br rebuilds things that were not changed

2016-09-09 Thread Marco Cognetta
It has happened to me where I build sage, turn off my computer, turn it 
back on, and build it again. There were no changes made in the meantime and 
it still does the cythonizing step. Also, I have had branches that are 
identical (except for a new file that does not have any dependencies to be 
rebuilt) which will also go through this cythonizing step (first when I 
switch to the branch, and then again when I switch back to master and try 
to build it again).

On Friday, September 9, 2016 at 4:12:40 PM UTC+9, Jeroen Demeyer wrote:
>
> On 2016-09-09 08:43, Marco Cognetta wrote: 
> > However, if I change to a 
> > new branch that has no changes which would necessitate recythonizing 
> > code, it will go through the cythonizing step again. 
>
> What makes you think that there are no changes which would necessitate 
> recythonizing? 
>
> Cython does dependency checking, so if it rebuilds something, there must 
> be a reason. In fact, the reason is explicitly stated when cythonizing 
> (with messages like building foo because it depends on bar). 
>

-- 
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: What is "do_system"?

2016-09-09 Thread Simon King
Hi Jeroen,

On 2016-09-09, Jeroen Demeyer  wrote:
> Depends on what kind of systems you want to support. remove() is C89 
> while unlink() is POSIX.

Does one of the commands work on all platforms supported by SageMath?
If not: What to do to make it work on all platforms?

Best regards,
Simon

-- 
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: What is "do_system"?

2016-09-09 Thread Simon King
Hi Jeroen,

On 2016-09-09, Jeroen Demeyer  wrote:
> On 2016-09-09 08:23, Simon King wrote:
>> Is there a cleaner/less costly way to remove a file?
>
> Obviously yes:
>
> #include 
> remove(const char *pathname);

Nice, thank you!

Cheers,
Simon

-- 
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: Poisson algebra module

2016-09-09 Thread Dima Pasechnik


On Thursday, September 8, 2016 at 5:58:37 PM UTC, Peter Banks wrote:
>
>
>
> On Monday, September 5, 2016 at 3:30:53 PM UTC+1, Travis Scrimshaw wrote:
>
>>
>>>- The class KontsevichGraph is a subclass of DiGraph; however, it 
>>>would only ever be used in calculating the Star product of a Poisson 
>>>bracket. Should it live in the new poisson module or in the graphs 
>>> module?
>>>
>>> Depends on how long the code is and what you plan to use it for. One 
>> safe way is to have its own file/module in src/sage/graphs.
>>
>
> The code is currently about 2000 lines including comments. I will leave it 
> in src/sage/graphs for now and move it later if needed.
>

a more proper location is  src/sage/graphs/generators/
this is where various explicit "small" graphs live, along with procedures 
to generate (infinite, or not) families.


>>>- The list of graphs generated by KontsevichGraphList has no 
>>>particularly natural ordering defined on it. It also uses a list of 
>>> regular 
>>>graphs (which currently is loaded from an external file). Should both of 
>>>these generators be added to the digraph_generators module?
>>>
>>> I'm split. There is no way to parameterize these graphs, correct? This 
>> would be the first instance in which we have an iterator/list as output 
>> from digraphs.*. However, if they are interesting graphs, then we should 
>> expose them.
>>
>> Also, you should look into making it be an iterator instead of a list, 
>> unless you only need the full list
>>
>
> The graphs themselves are quite complex and I don't know of any way of 
> parameterising them. As I say, they are interesting but only for a very 
> small area.
>
> As for making them an iterator: I agree that this would be a nice way of 
> doing things. I have spent some time today thinking about it but I have yet 
> to come up with an effective way of doing this. At the moment we only 
> generate one graph per isomorphism class. These are generated by applying a 
> series of operations (such as moving an edge) to "simpler" graphs (either 
> 2-regular digraphs of Kontsevich graphs of lower degree). However, these 
> operations don't guarantee uniqueness up to isomorphism, so we then remove 
> any graphs which are isomorphic to ones that have already been generated. 
> This procedure doesn't seem to lend itself to producing an iterator as the 
> full list of graphs is needed to check isomorphism at the end.
>
> I would also recommend creating a trac ticket, pushing your code to the 
>>> trac server, and linking the branch on the ticket so we can take a look at 
>>> the code.
>>>
>>
> I will do this soon - there are a few problems with the code I want to get 
> fixed first, and then I will go about adding relevant tickets.
>
> Best,
> 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] patchbot sage4 fails with permission denied

2016-09-09 Thread Jeroen Demeyer

On 2016-09-09 10:20, Daniel Krenn wrote:

On #21204 (with 7.4.beta3) as well as on #21205 (with 7.4.beta4) patchbot
   Gentoo Base System/2.2/x86_64/3.2.1-gentoo-r2/sage4
fails building with
   [widgetsnbextension-1.2.6] OSError: [Errno 13] Permission denied:
   '/home/worker/.jupyter'


This is https://trac.sagemath.org/ticket/21430 (needs review)

--
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] patchbot sage4 fails with permission denied

2016-09-09 Thread Daniel Krenn
On #21204 (with 7.4.beta3) as well as on #21205 (with 7.4.beta4) patchbot
  Gentoo Base System/2.2/x86_64/3.2.1-gentoo-r2/sage4
fails building with
  [widgetsnbextension-1.2.6] OSError: [Errno 13] Permission denied:
  '/home/worker/.jupyter'

-- 
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: sage -br rebuilds things that were not changed

2016-09-09 Thread leif
Jeroen Demeyer wrote:
> On 2016-09-09 08:43, Marco Cognetta wrote:
>> However, if I change to a
>> new branch that has no changes which would necessitate recythonizing
>> code, it will go through the cythonizing step again.
> 
> What makes you think that there are no changes which would necessitate
> recythonizing?
> 
> Cython does dependency checking, so if it rebuilds something, there must
> be a reason. In fact, the reason is explicitly stated when cythonizing
> (with messages like building foo because it depends on bar).

And in case you don't trust cython, you can compare files (or whole
subtrees) yourself:

git diff old_branch new_branch -- src/sage/...


-leif


-- 
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] Re: What is "do_system"?

2016-09-09 Thread Jeroen Demeyer

On 2016-09-09 09:47, leif wrote:

Jeroen Demeyer wrote:

On 2016-09-09 08:23, Simon King wrote:

Is there a cleaner/less costly way to remove a file?


Obviously yes:

#include 
remove(const char *pathname);


For files, unlink().


Depends on what kind of systems you want to support. remove() is C89 
while unlink() is POSIX.


--
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: What is "do_system"?

2016-09-09 Thread leif
Jeroen Demeyer wrote:
> On 2016-09-09 08:23, Simon King wrote:
>> Is there a cleaner/less costly way to remove a file?
> 
> Obviously yes:
> 
> #include 
> remove(const char *pathname);

For files, unlink().


-leif


-- 
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] Re: What is "do_system"?

2016-09-09 Thread Jeroen Demeyer

On 2016-09-09 08:23, Simon King wrote:

Is there a cleaner/less costly way to remove a file?


Obviously yes:

#include 
remove(const char *pathname);

--
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] sage -br rebuilds things that were not changed

2016-09-09 Thread Jeroen Demeyer

On 2016-09-09 08:43, Marco Cognetta wrote:

However, if I change to a
new branch that has no changes which would necessitate recythonizing
code, it will go through the cythonizing step again.


What makes you think that there are no changes which would necessitate 
recythonizing?


Cython does dependency checking, so if it rebuilds something, there must 
be a reason. In fact, the reason is explicitly stated when cythonizing 
(with messages like building foo because it depends on bar).


--
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] sage -br rebuilds things that were not changed

2016-09-09 Thread Marco Cognetta
Hello,

I have been writing some code for sage and have encountered the following 
problem. When running ./sage -br, it goes through a long cythonizing step 
every time, even on files that have not been changed. I have played around 
with it a little and if I run ./sage -br, wait for it to finish (about 
1-1.5 hours), and run ./sage -br again it will build almost instantly 
without the cythonizing step. However, if I change to a new branch that has 
no changes which would necessitate recythonizing code, it will go through 
the cythonizing step again. Upon switching back to the previous branch it 
goes through the step again.

It also seems to be choosing different areas of the code to cythonize (it 
has a counter for the number of files that will be cythonized which 
sometimes changes values between calls of ./sage -br).

Is there a nice fix for this or do I need to make dist-clean && make to 
just start over?

Thank you,

Marco

-- 
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: What is "do_system"?

2016-09-09 Thread Simon King
Hi Leif,

On 2016-09-09, leif  wrote:
> No, it's presumably really (in) the C library function system() [1], in
> Python os.system().  (I doubt you abuse it to write to or read from files.)

*I* don't. But it seems that the third party code I'm using does. There,
I see the lines

sprintf(buffer, "rm %s", storedProductFile(ngs, d));
system(buffer);

But that's the only occurrence of the system() command I am aware of.

Actually "third party" may be wrong: Meanwhile I became upstream for it.
Is there a cleaner/less costly way to remove a file?

> Or maybe not.  But are you (intentionally) using R?

No.

> Or it is a function of some optional package you have installed.

See above.

Best regards,
Simon

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