Re: [sage-devel] Status of the legacy Sage notebook

2018-08-15 Thread Timo Kaufmann
See https://trac.sagemath.org/ticket/25837 for discussion about 
deprecation. I think the documentation ticket is much smaller in scope and 
independent of deprecation.

-- 
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] Status of the legacy Sage notebook

2018-08-15 Thread François Bissey



> On 16/08/2018, at 10:04, John H Palmieri  wrote:
> 
> On ticket 25382, https://trac.sagemath.org/ticket/25382, the following 
> questions have been raised:
> 
> - Is the old Sage notebook deprecated?
> 
> - If not, should it be?
> 
> - In any case, the documentation builds with Python 2. It does not build 
> (because sagenb is not Python 3 compatible) with Python 3. Should we 
> completely remove the sagenb documentation from the reference manual, or 
> should we do it conditionally on whether we're using Python 2 or not?
> 
> I'm happy to hear discussion rather than (or in addition to) just votes.
> 

I have just voiced this opinion on the ticket.
Why does sage contains the documentation for sageNB. If it is a separate
package it should provide its own documentation, not a parent package.

François

-- 
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] Status of the legacy Sage notebook

2018-08-15 Thread John H Palmieri
On ticket 25382, https://trac.sagemath.org/ticket/25382, the following 
questions have been raised:

- Is the old Sage notebook deprecated?

- If not, should it be?

- In any case, the documentation builds with Python 2. It does not build 
(because sagenb is not Python 3 compatible) with Python 3. Should we 
completely remove the sagenb documentation from the reference manual, or 
should we do it conditionally on whether we're using Python 2 or not?

I'm happy to hear discussion rather than (or in addition to) just votes.

-- 
John

-- 
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] PEP idea: unary division

2018-08-15 Thread rjf

Eric says
*I'm all for more operators supported by syntax*

This sounds like a terrible idea to me.  I assume you
do not endorse ALL operators. Just look at the
machine-level operations available in a typical
CPU.  Also look at the kinds of syntax freely invented
by physicists, chemists, and mathematicians.

Alternatively you can make up any subroutine name you like,
and define it as meaning 1/x.

If python does not allow this to be done efficiently
(by method dispatch, macro-expansion, function call or
whatever...) then THAT is a substantial problem
with Python (or Sage).  

The lack of agreement on
what is meant by "~" seems to miss the point.

It could be that there is a big audience for
accessing "flipper" via Sage. But it seems to me
that people studying 
"the action of mapping classes on laminations on punctured surfaces using 
ideal triangulation coordinates. "
are probably not so dense that they
couldn't be taught to use functional/prefix notation
so as to avoid conflict with programming language
syntax.

RJF


 

-- 
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] OS X build failure: "Error installing package gfortran-7.2.0"

2018-08-15 Thread François Bissey
That looks like a symptom of not installing (or re-installing after an upgrade) 
the
xcode command line tools.

François

> On 16/08/2018, at 07:51, Jeremy Martin  wrote:
> 
> I am trying to install sage 8.3 from source, running MacOS 10.13.6 High 
> Sierra.  A snippet of the output is below.  I'm attaching the full logfile.  
> I don't know what this means, so any help would be greatly appreciated!
> 
> Thanks,
> Jeremy Martin
> 
> cut 
> here
> 
> [gfortran-7.2.0] The directory that should contain system headers does not 
> exist:
> [gfortran-7.2.0]   /usr/include
> [gfortran-7.2.0] make[6]: *** [stmp-fixinc] Error 1
> [gfortran-7.2.0] make[5]: *** [all-gcc] Error 2
> [gfortran-7.2.0] make[4]: *** [all] Error 2
> [gfortran-7.2.0] 
> 
> [gfortran-7.2.0] Error building gfortran-7.2.0
> [gfortran-7.2.0] 
> 
> [gfortran-7.2.0]
> [gfortran-7.2.0] real 15m38.488s
> [gfortran-7.2.0] user 11m15.916s
> [gfortran-7.2.0] sys  1m42.868s
> [gfortran-7.2.0] 
> 
> [gfortran-7.2.0] Error installing package gfortran-7.2.0
> [gfortran-7.2.0] 
> 
> [gfortran-7.2.0] Please email sage-devel 
> (http://groups.google.com/group/sage-devel)
> [gfortran-7.2.0] explaining the problem and including the log file
> [gfortran-7.2.0]   
> /Users/jlmartin/Downloads/sage-8.3/logs/pkgs/gfortran-7.2.0.log
> [gfortran-7.2.0] Describe your computer, operating system, etc.
> [gfortran-7.2.0] If you want to try to fix the problem yourself, *don't* just 
> cd to
> [gfortran-7.2.0] 
> /Users/jlmartin/Downloads/sage-8.3/local/var/tmp/sage/build/gfortran-7.2.0 
> and type 'make' or whatever is appropriate.
> [gfortran-7.2.0] Instead, the following commands setup all environment 
> variables
> [gfortran-7.2.0] correctly and load a subshell for you to debug the error:
> [gfortran-7.2.0]   (cd 
> '/Users/jlmartin/Downloads/sage-8.3/local/var/tmp/sage/build/gfortran-7.2.0' 
> && '/Users/jlmartin/Downloads/sage-8.3/sage' --sh)
> [gfortran-7.2.0] When you are done debugging, you can type "exit" to leave 
> the subshell.
> [gfortran-7.2.0] 
> 
> make[3]: *** 
> [/Users/jlmartin/Downloads/sage-8.3/local/var/lib/sage/installed/gfortran-7.2.0]
>  Error 1
> make[2]: *** [all-start] Error 2
> 
> real  71m31.729s
> user  32m26.705s
> sys   7m9.172s
> ***
> Error building Sage.
> 
> The following package(s) may have failed to build (not necessarily
> during this run of 'make all-start'):
> 
> * package: gfortran-7.2.0
>   log file: /Users/jlmartin/Downloads/sage-8.3/logs/pkgs/gfortran-7.2.0.log
>   build directory: 
> /Users/jlmartin/Downloads/sage-8.3/local/var/tmp/sage/build/gfortran-7.2.0
> 
> The build directory may contain configuration files and other potentially
> helpful information. WARNING: if you now run 'make' again, the build
> directory will, by default, be deleted. Set the environment variable
> SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.
> 
> make[1]: *** [all-start] Error 1
> make: *** [all] Error 2
> 
> -- 
> 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.


[sage-devel] Parallelization issue on macOS

2018-08-15 Thread Eric Gourgoulhon
Hi,

Various Sage users have reported on that parallelization of tensor field 
computations does not work on macOS. The latest report, yesterday on 
sagemanifolds.list:
https://sympa.obspm.fr/wws/arc/sagemanifolds.list/2018-08/msg3.html
says that this example notebook
http://nbviewer.jupyter.org/github/sagemanifolds/SageManifolds/blob/master/Worksheets/v1.3/SM_Kerr.ipynb
fails with TypeError: Aborted (cf. the attached log), as soon as nproc is 
set to something different than 1 in cell no. 4:

Parallelism().set(nproc=8)
Parallelization of computations on manifolds is implemented via the 
multiprocessing module (using the @parallel decorator). 
It works well on Linux and provides important speed-up.
On macOS, while it fails in interactive sessions, it seems to work within the 
doctest framework (parallelization is doctested 
in various files in src/sage/manifolds and  src/sage/tensor/modules).

Apart from the manifold framework, does parallelization via the multiprocessing 
module has been already shown to work on macOS? 
Any hint on this issue would be appreciated (we don't have any macOS computer 
in our group...)

Eric.



-- 
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.
TypeError Traceback (most recent call last)
 in ()
> 1 nabla = g.connection() ; print(nabla)

/Applications/SageMath-8.3.app/Contents/Resources/sage/local/lib/python2.7/
site-packages/sage/manifolds/differentiable/metric.pyc in connection(self,
name, latex_name, init_coef)
771 self._connection = LeviCivitaConnection(self, name,
772
latex_name=latex_name,
--> 773
init_coef=init_coef)
774 return self._connection
775

/Applications/SageMath-8.3.app/Contents/Resources/sage/local/lib/python2.7/
site-packages/sage/manifolds/differentiable/levi_civita_connection.pyc in
__init__(self, metric, name, latex_name, init_coef)
229 # the domain (i.e. disregarding the subcharts)
230 for chart in self._domain.top_charts():
--> 231 self.coef(chart._frame)
232
233 def _repr_(self):

/Applications/SageMath-8.3.app/Contents/Resources/sage/local/lib/python2.7/
site-packages/sage/manifolds/differentiable/levi_civita_connection.pyc in
coef(self, frame)
525
526 # Computation and Assignation of values
--> 527 for ii, val in make_Connect(listParalInput):
528 for jj in val:
529 gam[jj[0],jj[1],jj[2],ii[0][1]] =
jj[3]

/Applications/SageMath-8.3.app/Contents/Resources/sage/local/lib/python2.7/
site-packages/sage/parallel/multiprocessing_sage.pyc in
parallel_iter(processes, f, inputs)
 75 result = p.imap_unordered(call_pickled_function,
 76   [(fp, t) for t in inputs])
---> 77 for res in result:
 78 yield res
 79 p.close()

/Applications/SageMath-8.3.app/Contents/Resources/sage/local/lib/python2.7/
multiprocessing/pool.pyc in next(self, timeout)
671 if success:
672 return value
--> 673 raise value
674
675 __next__ = next# XXX

TypeError: Aborted


[sage-devel] Re: Start a Sage session from a session of its own Python interpreter ?

2018-08-15 Thread Pedro Cruz



>>> from sage.all import *

>>> exec(preparse(r"""
... a = 2^3
... print a
... """))8>>> a8>>> exit> py$a8

or also:

>>> load("some.sage")  #I believe all sage power is available in load() but not 
>>> all in exec(preparse()).



segunda-feira, 13 de Agosto de 2018 às 18:07:41 UTC+1, Emmanuel Charpentier 
escreveu:
>
> Motivation : see this ask.sagemath.org question 
> 
> .
> Tl;dr : I want to call sage from the R reticulate 
>  package in order to create mixed 
> text/R/Sage documents. 
>
>- I am aware that Sagetex allows this, at least when using Sage's R in 
>a \LaTeX document.
>- But this solution doesn't extend to noweb Markdown documents, which 
>are more and more in demand (Web pages, ebooks, other interactive gadgets).
>- I have checked that the \LaTeX--> Markdown/whatever conversion 
>currently doable with pandoc or similar tools is cumbersome to the extreme 
>and/or loses a lot of information.
>
> Done so far : when used as the "Python" interpreter, Sage starts a Python 
> session of its own interpreter (i. e. doesn't start the usual IPython 
> session). The various environment variables are correctly defined.
>
> Thanks to Thierry Monteil, I have been able to create this Sage IPython 
> session, with correct initialization (preparsing, imports, etc...). I have 
> checked that this session can access  R objects, and that the R session can 
> access objects created in Sage.
>
> But this is insufficient :
>
>- The Sage session does not (re-)starts automatically : one has to 
>explicitly call IPython.embed(). Not a problem when tran manually ; 
>problematic for the intended use (creating Sage code chunks in a noweb 
>document).
>- To get back to R, you have to exit twice : from the IPython session 
>then from the Python session. Again not a problem in interactive use, 
> again 
>a serious problem for the intended use.
>
> So the question is : how can one *replace* the Python REPL  with Sage's ? 
> A serious look at $SAGE_ROOT/src/sage/repl/ipython_extension.py wasn't 
> specially enlightening...
>
> Any ideas ?
>
> [ Note that this answer is necessary to the "right" function, but not 
> sufficient : the name of the Python object interfacing Python to the 
> **calling** R session is, unfortunately "r". Which is the standard name 
> we have picked for our **called** R interpreter... So some r-handling 
> will be necessary from reticulate's side. Keeping the distinction between 
> those may be necessary (e. g. : reusing old code...).
> But I feel that asking for a patch has better chances if we "do our 
> homework first", by solving *our* side of the problem *before* asking for 
> help... ]
>
>

-- 
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: OS X build: "sorry, unimplemented: 64-bit mode not compiled in"

2018-08-15 Thread Bernie Walp
 

Thanks, Dima!  You nailed my problem.  Yes, I did not have “gfortran”.  
Sage 8.3 built itself without trouble after I installed gfortran (and ran 
"configure" before make)


https://gcc.gnu.org/wiki/GFortranBinaries#MacOS


Thanks again,
Bernie W.

On Tuesday, August 14, 2018 at 1:10:11 AM UTC-6, Bernie Walp wrote:
>
> Attempts to build Sage 8.3 in macOS "High Sierra" ver. 10.13.6 produce the 
> message "Error building openblas-0.2.20.p2" and also this:
>
> lsame.f:0: sorry, unimplemented: 64-bit mode not compiled in
> lsametst.f:0: sorry, unimplemented: 64-bit mode not compiled in
>
> The log is attached.  I'd be grateful for any advice.  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.


Re: [sage-devel] misleading comment on cygwin binaries

2018-08-15 Thread Jeroen Demeyer

On 2018-08-14 23:43, Erik Bray wrote:

Isn't that just the normal message when running `sage -sh`?


IIRC, I added that text because people were generally quite confused 
which kind of commands should be run inside or outside of a Sage shell.


The top-level "make" commands are typically run outside of a Sage shell 
and don't need the Sage environment variables. There certainly was a 
time when running "make" inside a Sage shell would sometimes break 
stuff. I'm not sure whether this is still the case, but it seems safer 
to advise against that.



Jeroen.

--
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] issue with cos(pi/2) and sin(pi)

2018-08-15 Thread David Coudert

> Le 14 août 2018 à 20:37, TB  a écrit :
> 
> Because float(pi/2) is not exactly pi/2:
> 
> sage: n(pi/2 - float(pi/2), 53)
> 0.000
> sage: n(pi/2 - float(pi/2), 54) # also for perc > 54 of course
> 1.11022302462516e-16

and what’s the advantage of numerical_approx(v, digits=10) over round(v, 
digits=10) ?


> This does mean that:
> 
> sage: float(cos(pi/2))
> 0.0
> sage: float(sin(pi))
> 0.0

This is not what I get when I use float(sin(pi)) or float(cos(pi/2)) inside the 
code. 

When I add a `print(sin, cos)`  in some method (and then recompile), I get
, 

I will use round. It’s apparently the easiest solution.

Best,

> 
> Regards,
> TB


David Coudert
Equipe-Projet COATI
Centre de Recherche INRIA Sophia Antipolis - Méditerranée
Université Côte d’Azur, Inria, CNRS, I3S, France
http://www-sop.inria.fr/members/David.Coudert 







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