[sage-devel] hash issue in python3 experimental branch

2017-08-25 Thread Frédéric Chapoton
Hello, during my experiments with python3, I am now stopped on a crash involving hash of Complex interval fields. The full log is attached. It ends with TypeError: key = (Complex Interval Field with 53 bits of precision, ('x',), False, None) unhashable type: 'ComplexIntervalField_class_with_c

Re: [sage-devel] Calculation Error

2017-08-25 Thread David Roe
This is not a bug. If you look at the documentation for Integer.__pow__, you'll see "For consistency with Python and MPFR, 0^0 is defined to be 1 in Sage." David On Fri, Aug 25, 2017 at 3:35 PM, wrote: > I followed the link of Sagecell website , > I typed the fol

[sage-devel] Calculation Error

2017-08-25 Thread muhammed . alkassem
I followed the link of Sagecell website , I typed the following statement: print(pow(0,0)) the Sage server returned 1 which is a bug! 0 power to 0 is not defined! -- You received this message because you are subscribed to the Google Groups "sage-devel" group.

[sage-devel] Re: python3 in sage

2017-08-25 Thread Eric Gourgoulhon
Le vendredi 25 août 2017 19:35:27 UTC+2, Nils Bruin a écrit : > > Something along the lines of > > import sage.repl.ipython_kernel.install > sage.repl.ipython_kernel.install.JUPYTER_PATH = > spec = sage.repl.ipython_kernel.install.SageKernelSpec() > spec.update() > > With any luck, you'll see Sag

[sage-devel] Re: python3 in sage

2017-08-25 Thread Nils Bruin
On Friday, August 25, 2017 at 12:55:56 AM UTC-7, Eric Gourgoulhon wrote: > > Hi, > > Le jeudi 24 août 2017 23:17:07 UTC+2, Nils Bruin a écrit : > >> >> If you're using jupyter for non-sage-specific purposes (apparently >> relying on a system python3), why not use system jupyter? Personally, I >>

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

2017-08-25 Thread kcrisman
On Friday, August 25, 2017 at 5:54:00 AM UTC-4, Dima Pasechnik wrote: > > > > On Friday, August 25, 2017 at 6:42:54 AM UTC+1, Jori Mäntysalo wrote: >> >> On Thu, 24 Aug 2017, kcrisman wrote: >> >> > OK. What packages or parts have been updated lately? >> > >> > >> > See perhaps https://

[sage-devel] Re: sage-support moderation?

2017-08-25 Thread kcrisman
Do you volunteer to weed out spam? :) Not by myself, which is why I'm asking about this. For some strange reason I am on the sage-support moderator list but never even come close to seeing them in time to actually moderate ;-) Anyway, it's about potentially lowering barrier, since some que

[sage-devel] Re: Status of @lazy_attribute for cdef classes

2017-08-25 Thread Simon King
Hi Jeroen, On 2017-08-25, Jeroen Demeyer wrote: > On 2017-08-25 13:37, Simon King wrote: >> Not much, actually: > > My point was that a __dict__ makes any attribute access slower, not just > this lazy attribute. It will also seriously slow down cpdef methods. OK, if it concerns *all* cpdef meth

Re: [sage-devel] Re: Status of @lazy_attribute for cdef classes

2017-08-25 Thread Jeroen Demeyer
On 2017-08-25 13:37, Simon King wrote: Not much, actually: My point was that a __dict__ makes any attribute access slower, not just this lazy attribute. It will also seriously slow down cpdef methods. -- You received this message because you are subscribed to the Google Groups "sage-devel"

Re: [sage-devel] Re: python3 in sage

2017-08-25 Thread Erik Bray
On Fri, Aug 25, 2017 at 1:38 PM, Erik Bray wrote: > On Thu, Aug 24, 2017 at 11:49 PM, William Stein 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 w

[sage-devel] Re: Status of @lazy_attribute for cdef classes

2017-08-25 Thread Simon King
Hi Jeroen, On 2017-08-25, Jeroen Demeyer wrote: > One workaround is adding a __dict__: > ... > This does make everything slower though, so I guess it's not what you want. Not much, actually: sage: cython(""" : from sage.structure.element cimport Element : cdef class CyElement(Element): .

Re: [sage-devel] Re: python3 in sage

2017-08-25 Thread Erik Bray
On Thu, Aug 24, 2017 at 11:49 PM, William Stein 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 def

Re: [sage-devel] Re: Status of @lazy_attribute for cdef classes

2017-08-25 Thread Jeroen Demeyer
On 2017-08-25 13:07, Simon King wrote: Hi! I just realise that @property works for Cython, and it is competitive! Indeed. Cython has optimized code to deal with standard decorators like @staticmethod, @classmethod and @property. The reason that lazy_import does not work for Cython classes i

[sage-devel] Re: Status of @lazy_attribute for cdef classes

2017-08-25 Thread Simon King
Hi! I just realise that @property works for Cython, and it is competitive! Namely: sage: cython(""" : from sage.structure.element cimport Element : cdef class CyElement(Element): : cdef object _test : def __init__(self, P): : Element.__init__(self,P) :

[sage-devel] Status of @lazy_attribute for cdef classes

2017-08-25 Thread Simon King
Hi! I know that to @lazy_attribute supports Python classes written in a Cython extension module. Also, I just tested that even a cdef class compiles if @lazy_attribute is used: sage: cython(""" : from sage.misc.lazy_attribute import lazy_attribute : from sage.structure.element

[sage-devel] Re: Can I clean up this copy pasted code? #23703

2017-08-25 Thread Simon Brandhorst
Thank you I was not aware of that. Supporting my expectation: https://trac.sagemath.org/ticket/5525 is the same bug in free_modules which was fixed 8! years ago. So I guess we should really clean up free_quadratic_module.py. Is there a reason for all this copy pasting? On Friday, August 25, 201

Re: [sage-devel] Re: [smc-intern] why does starting sage take twice as long as importing sage?

2017-08-25 Thread François Bissey
How do you measure that effect? sage-on-gentoo (and other sage-on-distro I would believe) don’t do that. Or any other stuff of that kind. François > On 25/08/2017, at 21:59, Erik Bray wrote: > > On Fri, Aug 25, 2017 at 11:47 AM, Erik Bray wrote: >> On Fri, Aug 25, 2017 at 10:31 AM, Harald Schi

Re: [sage-devel] Re: [smc-intern] why does starting sage take twice as long as importing sage?

2017-08-25 Thread Jeroen Demeyer
On 2017-08-25 11:59, Erik Bray wrote: I found this to also be a significant source of slowdown, every time sage-env is sourced See https://trac.sagemath.org/ticket/23711 -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this g

Re: [sage-devel] Re: [smc-intern] why does starting sage take twice as long as importing sage?

2017-08-25 Thread Erik Bray
On Fri, Aug 25, 2017 at 12:02 PM, Jeroen Demeyer wrote: > On 2017-08-25 11:59, Erik Bray wrote: >> >> This can probably be avoided, somehow... > > > Why do we even need the matplotlib version number in the first place? It seems the MPLVERSION variable is set only to determine MPLCONFIGDIR. Why t

Re: [sage-devel] Re: [smc-intern] why does starting sage take twice as long as importing sage?

2017-08-25 Thread Jeroen Demeyer
On 2017-08-25 11:59, Erik Bray wrote: This can probably be avoided, somehow... Why do we even need the matplotlib version number in the first place? -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receivi

Re: [sage-devel] Re: [smc-intern] why does starting sage take twice as long as importing sage?

2017-08-25 Thread Erik Bray
On Fri, Aug 25, 2017 at 11:47 AM, Erik Bray wrote: > On Fri, Aug 25, 2017 at 10:31 AM, Harald Schilly wrote: >> Inside sage -sh: >> >> (sage-sh) ...@compute8-us:build$ time echo "print()" | ipython > /dev/null >> >> real0m1.122s >> user0m0.812s >> sys 0m0.080s >> (sage-sh) ...@comput

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

2017-08-25 Thread Dima Pasechnik
On Friday, August 25, 2017 at 6:42:54 AM UTC+1, Jori Mäntysalo wrote: > > 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

Re: [sage-devel] Re: [smc-intern] why does starting sage take twice as long as importing sage?

2017-08-25 Thread Erik Bray
On Fri, Aug 25, 2017 at 10:31 AM, Harald Schilly wrote: > Inside sage -sh: > > (sage-sh) ...@compute8-us:build$ time echo "print()" | ipython > /dev/null > > real0m1.122s > user0m0.812s > sys 0m0.080s > (sage-sh) ...@compute8-us:build$ time echo "print()" | python > /dev/null > > rea

[sage-devel] Re: Can I clean up this copy pasted code? #23703

2017-08-25 Thread Frédéric Chapoton
Sorry, I was thinking to #23646 Le vendredi 25 août 2017 10:35:59 UTC+2, Frédéric Chapoton a écrit : > > Beware the comparion in the modules folder has been recently cleaned-up > for py3 compatibility in https://trac.sagemath.org/ticket/23251 > > Do not do anything on that until this ticket is me

[sage-devel] Re: Can I clean up this copy pasted code? #23703

2017-08-25 Thread Frédéric Chapoton
Beware the comparion in the modules folder has been recently cleaned-up for py3 compatibility in https://trac.sagemath.org/ticket/23251 Do not do anything on that until this ticket is merged in the next beta release of sage. Frederic Le vendredi 25 août 2017 09:52:32 UTC+2, Simon Brandhorst a

[sage-devel] Re: [smc-intern] why does starting sage take twice as long as importing sage?

2017-08-25 Thread Harald Schilly
Inside sage -sh: (sage-sh) ...@compute8-us:build$ time echo "print()" | ipython > /dev/null real0m1.122s user0m0.812s sys 0m0.080s (sage-sh) ...@compute8-us:build$ time echo "print()" | python > /dev/null real0m0.014s user0m0.008s sys 0m0.004s (sage-sh) ...@compute8-us:

[sage-devel] Re: [smc-intern] why does starting sage take twice as long as importing sage?

2017-08-25 Thread Harald Schilly
Can we try to isolate how long it takes to start the interactive ipython shell? (your lib example is pure python only). Here are two runs, alternating between them to get some statistical sampling. Notice, the entire difference is one little "i"! ~/build$ time sage -python -c "import sage.all; sa

[sage-devel] Re: python3 in sage

2017-08-25 Thread Eric Gourgoulhon
Hi, Le jeudi 24 août 2017 23:17:07 UTC+2, Nils Bruin a écrit : > > 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. > This sounds nice! Co

[sage-devel] Can I clean up this copy pasted code? #23703

2017-08-25 Thread Simon Brandhorst
>From sage.modules.free_module.py there is some code copy pasted to sage.modules.free_quadratic_module.py. One instance is the class FreeQuadraticModule_submodule_with_basis_pid( free_module.FreeModule_submodule_with_basis_pid, FreeQuadraticModule_generic_pid) where the __cmp__ method is c