Re: [sage-devel] Re: SageNB, publishing and error 500

2017-08-24 Thread Jori Mäntysalo

On Thu, 24 Aug 2017, kcrisman wrote:


  OK. What packages or parts have been updated lately?


See perhaps https://trac.sagemath.org/ticket/22431 or 
https://trac.sagemath.org/ticket/23066 though I don't see
immediately which packages were upgraded there. 


#22431 is a new ticket, but #23066 is closed in 8.0 and has title "sagenb 
update to 1.0". It upgrades sagenb from 0.13 to 1.0.1.


Uh, too much code to check.

--
Jori Mäntysalo

Re: [sage-devel] Re: SageNB, publishing and error 500

2017-08-24 Thread Jori Mäntysalo

On Thu, 24 Aug 2017, Dima Pasechnik wrote:


sagenb is installed by pip, which pulls packages from the net; whatever comes up as the 
"stable" version,gets
installed. We used to pin down versions, but don't do this any more.
You can look at the output of 

./sage --pip list

to see what versions you have.


$ ./sage --pip list | egrep -i 'sage|flask'
Flask (0.10.1)
Flask-AutoIndex (0.6)
Flask-Babel (0.9)
Flask-OldSessions (0.10)
Flask-OpenID (1.2.5)
Flask-Silk (0.2)
sage (8.1b1)
sagenb (1.0.1)
sagenb-export (3.2)
sagetex (3.0)

--
Jori Mäntysalo


[sage-devel] why does starting sage take twice as long as importing sage?

2017-08-24 Thread William Stein
  
  

  
Puzzle:Why does it take nearly **twice as long** to just run sage and exit 
as it does to import the sage library and run a command?Timings below are 
on an SSD:
  

  
  
  
  ~$   time   sage   -python   -c   "import   sage.all;   sage.all.factor(2018)"
  

  
 real 0m2.795s
  
 user 0m2.296s
  
 sys   0m0.276s
  

  
  ~$   time   echo   "factor(2018)"   |   sage
  
 ┌┐
  
 │   SageMath   version   8.0,   Release   Date:   2017-07-21   
│
  
 │   Enhanced   for   CoCalc.   
│
  
 └┘
  
 In   [1]:
  
 2   *   1009
  
 In   [2]:   Exiting   Sage   (CPU   time   0m0.02s,   Wall   time   0m0.03s).
  

  
 real 0m4.676s
  
 user 0m3.852s
  
 sys   0m0.392s
  

  
—
  

  
My guesses:
  
   - IPython has got very bloated over the years and takes a long time to start?
  
   - Something dumb involving how the sage-cleaner processes is spawned?
  
   - Our code to print the banner is dumb?
  
  

  
  
— 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] Re: python3 in sage

2017-08-24 Thread John H Palmieri


On Thursday, August 24, 2017 at 2:50:09 PM UTC-7, William wrote:
>
> On Thu, Aug 24, 2017 at 2:17 PM, Nils Bruin > 
> wrote: 
> > On Thursday, August 24, 2017 at 1:30:25 PM UTC-7, William wrote: 
> >> 
> >> I'm not sure what the status is these days, but we may want to stop 
> >> including a python3 binary in Sage by default with "python3" right 
> >> there in the "sage -sh" path... 
> > 
> > 
> > As far as I understand, having python3 included in sage is part of the 
> > deliberate strategy towards porting sage to python3. Since sage comes 
> with 
> > its own python(2), the most straightforward move of sage would be 
> towards 
> > sage working on top of an included python3. 
>
> The problem is simply the "python3" executable which gets picked up 
> and breaks things. 
>

Will any python3 executable break things, or is there something 
specifically wrong with the one that Sage builds?
 

>
> > If you're using jupyter for non-sage-specific purposes (apparently 
> relying 
> > on a system python3), why not use system jupyter? Personally, I just 
> install 
> > the sage-jupyter kernel in the system jupyter. That way, your main 
> jupyter 
> > runs independent of sage (other than the extensions that get registered 
> upon 
> > registering the sage kernel), and doesn't get confused by the system 
> things 
> > sage does. 
>
> Nope.For example, Sage worksheets in Cocalc have a full "jupyter 
> bridge" that lets you simultaneously use several different Jupyter 
> kernels from within a Sage session, e.g., in different cells of a 
> notebook.  Having python3 in the PATH randomly breaks many of these. 
> Removing it, and everything works fine. 
>
> For now I guess we'll keep deleting local/bin/python3 ourselves... 
>
> Frickin' Guido... 
>
> 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] Re: python3 in sage

2017-08-24 Thread William Stein
On Thu, Aug 24, 2017 at 2:17 PM, Nils Bruin  wrote:
> On Thursday, August 24, 2017 at 1:30:25 PM UTC-7, William wrote:
>>
>> I'm not sure what the status is these days, but we may want to stop
>> including a python3 binary in Sage by default with "python3" right
>> there in the "sage -sh" path...
>
>
> As far as I understand, having python3 included in sage is part of the
> deliberate strategy towards porting sage to python3. Since sage comes with
> its own python(2), the most straightforward move of sage would be towards
> sage working on top of an included python3.

The problem is simply the "python3" executable which gets picked up
and breaks things.

> If you're using jupyter for non-sage-specific purposes (apparently relying
> on a system python3), why not use system jupyter? Personally, I just install
> the sage-jupyter kernel in the system jupyter. That way, your main jupyter
> runs independent of sage (other than the extensions that get registered upon
> registering the sage kernel), and doesn't get confused by the system things
> sage does.

Nope.For example, Sage worksheets in Cocalc have a full "jupyter
bridge" that lets you simultaneously use several different Jupyter
kernels from within a Sage session, e.g., in different cells of a
notebook.  Having python3 in the PATH randomly breaks many of these.
Removing it, and everything works fine.

For now I guess we'll keep deleting local/bin/python3 ourselves...

Frickin' Guido...

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.


[sage-devel] Re: python3 in sage

2017-08-24 Thread Nils Bruin
On Thursday, August 24, 2017 at 1:30:25 PM UTC-7, William wrote:
>
> I'm not sure what the status is these days, but we may want to stop 
> including a python3 binary in Sage by default with "python3" right 
> there in the "sage -sh" path... 


As far as I understand, having python3 included in sage is part of the 
deliberate strategy towards porting sage to python3. Since sage comes with 
its own python(2), the most straightforward move of sage would be towards 
sage working on top of an included python3.

If you're using jupyter for non-sage-specific purposes (apparently relying 
on a system python3), why not use system jupyter? Personally, I just 
install the sage-jupyter kernel in the system jupyter. That way, your main 
jupyter runs independent of sage (other than the extensions that get 
registered upon registering the sage kernel), and doesn't get confused by 
the system things sage does.

I think we might consider not packaging jupyter with sage, or at least 
making registering sage as a kernel to a foreign jupyter more 
straightforward. The jupyter-sage boundary is bridged by a communication 
protocol, so is a lot easier to manage than the sage-python boundary (which 
is a binary API one).

-- 
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] python3 in sage

2017-08-24 Thread William Stein
Hi,

I'm not sure what the status is these days, but we may want to stop
including a python3 binary in Sage by default with "python3" right
there in the "sage -sh" path...   It randomly and confusingly breaks a
lot of stuff related to Jupyter kernels getting installed into Sage.
You can observe some of our confusion here...

https://github.com/sagemathinc/cocalc/issues/2311

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.


[sage-devel] sage-support moderation?

2017-08-24 Thread Dima Pasechnik
Do you volunteer to weed out spam? :)

-- 
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-support moderation?

2017-08-24 Thread kcrisman
Has the time come for sage-support to allow posts by non-members?  Some 
questions are not ideal for the Q&A format of ask.sagemath but we don't 
necessarily want to ask people to have to wait for signing up on 
sage-support ... or waiting for approval as members to ask a simple 
question. 
 See 
https://ask.sagemath.org/question/38638/sage-80-startup-screen-broken-links/ 
question (2) for context.  I don't necessarily have an opinion but figured 
this was a good place to ask - I'm not sure how much additional moderation 
having this would entail.

-- 
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] Template (cookiecutter) for easily distributing SageMath code

2017-08-24 Thread Erik Bray
On Thu, Aug 24, 2017 at 4:45 PM, Jeroen Demeyer  wrote:
> On 2017-08-23 23:44, Marc Masdeu wrote:
>>
>> This is essentially what they are supposed to be.
>
>
> But it's not what your package does! You are using "sage" all over the
> place.

I'm probably missing something, but I don't see where it's using
"sage" except in the docbuild (so sage would be a doc dependency).
This isn't a big deal though (and I hope, eventually, the sage
docbuild tools will be split into a separate package).

-- 
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] Help with Expect interface UnicodeEncodeError for Julia interface

2017-08-24 Thread Erik Bray
On Thu, Aug 24, 2017 at 3:43 PM, mforets  wrote:
>
> Hi Erik,
> OK thanks for the link, I will go ahead with PyJulia.
>
> I think the problem is the returned times symbol, which is a fancy "x", and
> that one requires Python 3 to be properly parsed.

To be clear, that doesn't *require* Python 3; it can be parsed just
fine on Python 2, with care.  But getting this just right (especially
in a way that works on Python 2 and 3) is not necessarily so simple
(as Jeroen can attest to ;)

Best,
Erik

> El jueves, 24 de agosto de 2017, 11:59:00 (UTC+2), Erik Bray escribió:
>>
>> On Wed, Aug 23, 2017 at 6:33 PM, mforets  wrote:
>> > Hello,
>> > I'm writing an "expect" interface to use Julia from Sage, copy pasted
>> > from
>> > the Matlab `interfaces/matlab.py`.
>> >
>> > For the moment, the code is here:
>> > https://gist.github.com/mforets/26d42220946fba8f8e1feb8208783231
>> > Of course i'll add a branch in trac etc, if another developer would be
>> > interested in this feature.
>>
>> Hi,
>>
>> With apologies for not usefully answering your question, instead of
>> writing a pexpect interface to Julia (which will always be a little
>> unreliable not matter what), why not instead install PyJulia [1] into
>> your Sage install, and build a Sage interface to Julia on top of that?
>>  PyJulia uses ctypes to interface directly with Julia's C API [2] and
>> should be a more reliable way to interact directly with the Julia
>> interpreter.
>>
>> Best,
>> Erik
>>
>> [1] https://github.com/JuliaPy/pyjulia
>> [2] https://docs.julialang.org/en/release-0.4/manual/embedding/
>
> --
> 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] Template (cookiecutter) for easily distributing SageMath code

2017-08-24 Thread Jeroen Demeyer

On 2017-08-23 23:44, Marc Masdeu wrote:

This is essentially what they are supposed to be.


But it's not what your package does! You are using "sage" all over the 
place.


--
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: SageNB, publishing and error 500

2017-08-24 Thread Dima Pasechnik
sagenb is installed by pip, which pulls packages from the net; whatever 
comes up as the "stable" version,
gets installed. We used to pin down versions, but don't do this any more.
You can look at the output of 

./sage --pip list

to see what versions you have.
Sagenb explicitly needs the following, as you can see from its setup.py:

install_requires = [
'twisted>=11.0.0',
'flask>=0.10.1',
'flask-oldsessions>=0.10',
'flask-openid',
'flask-autoindex',
'flask-babel'
] 

On Thursday, August 24, 2017 at 2:33:59 PM UTC+1, kcrisman wrote:
>
>
>
> On Thursday, August 24, 2017 at 4:54:48 AM UTC-4, Jori Mäntysalo wrote:
>>
>> On Thu, 24 Aug 2017, Dima Pasechnik wrote: 
>>
>> > although it very well might be due to its dependencies, like flask, 
>> > etc., updated to newer versions, e.g. for the purpose of python3 
>> > compatibility. 
>>
>> OK. What packages or parts have been updated lately? 
>>
>
> See perhaps https://trac.sagemath.org/ticket/22431 or 
> https://trac.sagemath.org/ticket/23066 though I don't see immediately 
> which packages were upgraded there. 
>

-- 
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] Help with Expect interface UnicodeEncodeError for Julia interface

2017-08-24 Thread mforets

Hi Erik,
OK thanks for the link, I will go ahead with PyJulia.

I think the problem is the returned times symbol, which is a fancy "x", and 
that one requires Python 3 to be properly parsed. 

El jueves, 24 de agosto de 2017, 11:59:00 (UTC+2), Erik Bray escribió:
>
> On Wed, Aug 23, 2017 at 6:33 PM, mforets > 
> wrote: 
> > Hello, 
> > I'm writing an "expect" interface to use Julia from Sage, copy pasted 
> from 
> > the Matlab `interfaces/matlab.py`. 
> > 
> > For the moment, the code is here: 
> > https://gist.github.com/mforets/26d42220946fba8f8e1feb8208783231 
> > Of course i'll add a branch in trac etc, if another developer would be 
> > interested in this feature. 
>
> Hi, 
>
> With apologies for not usefully answering your question, instead of 
> writing a pexpect interface to Julia (which will always be a little 
> unreliable not matter what), why not instead install PyJulia [1] into 
> your Sage install, and build a Sage interface to Julia on top of that? 
>  PyJulia uses ctypes to interface directly with Julia's C API [2] and 
> should be a more reliable way to interact directly with the Julia 
> interpreter. 
>
> Best, 
> Erik 
>
> [1] https://github.com/JuliaPy/pyjulia 
> [2] https://docs.julialang.org/en/release-0.4/manual/embedding/ 
>

-- 
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: SageNB, publishing and error 500

2017-08-24 Thread kcrisman


On Thursday, August 24, 2017 at 4:54:48 AM UTC-4, Jori Mäntysalo wrote:
>
> On Thu, 24 Aug 2017, Dima Pasechnik wrote: 
>
> > although it very well might be due to its dependencies, like flask, 
> > etc., updated to newer versions, e.g. for the purpose of python3 
> > compatibility. 
>
> OK. What packages or parts have been updated lately? 
>

See perhaps https://trac.sagemath.org/ticket/22431 or 
https://trac.sagemath.org/ticket/23066 though I don't see immediately which 
packages were upgraded there. 

-- 
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] Help with Expect interface UnicodeEncodeError for Julia interface

2017-08-24 Thread Erik Bray
On Wed, Aug 23, 2017 at 6:33 PM, mforets  wrote:
> Hello,
> I'm writing an "expect" interface to use Julia from Sage, copy pasted from
> the Matlab `interfaces/matlab.py`.
>
> For the moment, the code is here:
> https://gist.github.com/mforets/26d42220946fba8f8e1feb8208783231
> Of course i'll add a branch in trac etc, if another developer would be
> interested in this feature.

Hi,

With apologies for not usefully answering your question, instead of
writing a pexpect interface to Julia (which will always be a little
unreliable not matter what), why not instead install PyJulia [1] into
your Sage install, and build a Sage interface to Julia on top of that?
 PyJulia uses ctypes to interface directly with Julia's C API [2] and
should be a more reliable way to interact directly with the Julia
interpreter.

Best,
Erik

[1] https://github.com/JuliaPy/pyjulia
[2] https://docs.julialang.org/en/release-0.4/manual/embedding/

-- 
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: Template (cookiecutter) for easily distributing SageMath code

2017-08-24 Thread Erik Bray
On Wed, Aug 23, 2017 at 5:56 PM, Vincent Delecroix
<20100.delecr...@gmail.com> wrote:
> One thing (IMHO much more important than the "cookie cutter" buisness) is to
> actually have a community supported language for SageMath in travis [1]. My
> aim is to allow the following in the travis script

Oh, this is wonderful!  I must have missed when Travis CI opened up
this possibility.  I think that would be a great idea.

Erik


> {{{
> language: "SageMath"
> version:
>  - "7.6"
>  - "8.0"
> }}}
>
> What need to be done
>
> 1) have 3 "official" person in charge of maintenance (with me being ok, we
> need 2 more)
>
> 2) provide a pull request to travis-build and travis-web
>
> Best
> Vincent
>
>  [1]
> https://docs.travis-ci.com/user/languages/community-supported-languages/
>
>
> On 23/08/2017 10:44, Marc Masdeu wrote:
>>
>> After some work (building upon github.com/sagemath/sage_sample) that some
>> of us did during Sage Days 87 and the Leiden workshop that took place a
>> few
>> weeks ago, I'd like to collect some feedback / pull requests on a first
>> attempt at making it super easy for anyone to get their own working
>> GitHub/TravisCI/GHPages setup. This can be found at
>> github.com/mmasdeu/sage_package_template.
>>
>> I know that there is several people who think that this is not the way
>> that
>> code should be distributed. I am asking feedback from the complementary
>> set
>> of people, really (although constructive comments from anyone are
>> definitely welcome!).
>>
>> Thank you!
>>
>
> --
> 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] Re: SageNB, publishing and error 500

2017-08-24 Thread Jori Mäntysalo

On Thu, 24 Aug 2017, Dima Pasechnik wrote:

although it very well might be due to its dependencies, like flask, 
etc., updated to newer versions, e.g. for the purpose of python3 
compatibility.


OK. What packages or parts have been updated lately?

--
Jori Mäntysalo

Re: [sage-devel] Re: SageNB, publishing and error 500

2017-08-24 Thread Dima Pasechnik
although it very well might be due to its dependencies, like flask, etc., 
updated to newer versions, e.g. for the purpose of python3 compatibility.

-- 
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: SageNB, publishing and error 500

2017-08-24 Thread Dima Pasechnik
check out the upstream sagenb repo and do git blame, indeed.

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