[sage-devel] sagenb 0.11.0 ready for review

2014-10-27 Thread kcrisman
Dear sage-devel, http://trac.sagemath.org/ticket/16004 is ready for review. Please test! This update for Sage notebook includes * javascript default graphics! * snapshots working again! Thanks especially to Volker B. and Jonathan G. for a lot of work making the jsmol work inside of Sage, lo

Re: [sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-27 Thread Nils Bruin
On Monday, October 27, 2014 2:33:34 PM UTC-7, Volker Braun wrote: > > The you can just as well get rid of @cached_method, that of course also > solves the problem. > Note quite, thanks to http://trac.sagemath.org/ticket/16316 , which basically implements the scheme Robert proposes and uses that

Re: [sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-27 Thread Volker Braun
On Monday, October 27, 2014 8:13:29 PM UTC, Robert Bradshaw wrote: > > (parent(a), a) rather than just a. I would even consider making > elements by default unhashable by default, and one would have to write > cache[a.key()] or cache[a.isomorphic_key()] to use them as keys. The you can just as

Re: [sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-27 Thread Nils Bruin
On Monday, October 27, 2014 1:13:29 PM UTC-7, Robert Bradshaw wrote: > Currently, the only place preparsing modifies valid code is for > literals, which is surprising enough but at least easy to explain. > There is one more: the "^" -> "**" substitution. Without it I think many mathematicians

Re: [sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-27 Thread Robert Bradshaw
On Mon, Oct 27, 2014 at 10:57 AM, Volker Braun wrote: > On Monday, October 27, 2014 5:32:12 PM UTC, Nils Bruin wrote: >> >> I don't think this would be easy to do with the current preparser. > > As you said, we'll need to look at the AST. That is part of IPython's > preprocessing framework, trivia

[sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-27 Thread Volker Braun
On Monday, October 27, 2014 6:24:44 PM UTC, Nils Bruin wrote: > > Are you sure that implementing Buchberger's algorithm would require > coefficients to occur as *keys*? > You need to put the S-polynomials in a hash table for any kind of reasonable performance. I agree that this could be fixed b

[sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-27 Thread Nils Bruin
On Monday, October 27, 2014 10:57:58 AM UTC-7, Volker Braun wrote: > > On Monday, October 27, 2014 5:32:12 PM UTC, Nils Bruin wrote: >> >> I don't think this would be easy to do with the current preparser. >> > > As you said, we'll need to look at the AST. That is part of IPython's > preprocessin

[sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-27 Thread Volker Braun
On Monday, October 27, 2014 5:32:12 PM UTC, Nils Bruin wrote: > > I don't think this would be easy to do with the current preparser. > As you said, we'll need to look at the AST. That is part of IPython's preprocessing framework, trivial to implement. Furthermore, I think it is a strength of co

Re: [sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-27 Thread Robert Bradshaw
On Sun, Oct 26, 2014 at 2:50 PM, Nils Bruin wrote: > On Sunday, October 26, 2014 2:08:27 PM UTC-7, Volker Braun wrote: >> >> Python 3 only uses __eq__, __lt__, . Python also provides >> functools.partial_ordering to synthesizing the remaining methods just from >> __eq__ and __lt__. We either

Re: [sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-27 Thread Robert Bradshaw
On Mon, Oct 27, 2014 at 10:32 AM, Nils Bruin wrote: > On Monday, October 27, 2014 5:03:00 AM UTC-7, Volker Braun wrote: >> >> On the command line we could bind == to _isomorphic_, but use _identical_ >> in library code. Then we would have intuitive comparison and could still >> work with associat

[sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-27 Thread Nils Bruin
On Monday, October 27, 2014 5:03:00 AM UTC-7, Volker Braun wrote: > > On the command line we could bind == to _isomorphic_, but use _identical_ > in library code. Then we would have intuitive comparison and could still > work with associative containers. > I don't think this would be easy to do

[sage-devel] Re: BooleanLattice(n) with n=0 and n=1

2014-10-27 Thread Nathann Cohen
Hello ! It sounds natural to have BooleanLattice(0) be 1-element lattice, but is > it normal mathematical definition? > Well, I would indeed expect BooleanLattice(0) to have 1 element, but also expect BooleanLattice(1) to have exactly 2 (against 1 at the moment) O_o Nathann -- You received

Re: [sage-devel] Re: Poset/lattice, join and join_matrix

2014-10-27 Thread William Stein
On Mon, Oct 27, 2014 at 5:55 AM, John Cremona wrote: > On 27 October 2014 12:37, Nathann Cohen wrote: >> Yo ! >> >>> This is good argument to support (only) []-style argument for several >>> elements. Be consistent within same program. Or in Sage terms, "Build a car, >>> don't let it look like bi

Re: [sage-devel] Re: Poset/lattice, join and join_matrix

2014-10-27 Thread Jori Mantysalo
On Mon, 27 Oct 2014, Samuel Lelievre wrote: Here is how I would put it: - gcd([]) is zero because   zero is the identity element for gcd   (for any x, gcd(0,x) equals x); Understood. Thanks. -- Jori Mäntysalo -- You received this message because you are subscribed to the Google Groups "s

Re: [sage-devel] Re: Poset/lattice, join and join_matrix

2014-10-27 Thread Samuel Lelievre
Nathann Cohen wrote: > > Yo ! > > > This is good argument to support (only) []-style argument for several > > elements. Be consistent within same program. Or in Sage terms, "Build a > car, > > don't let it look like bicycle combined to tractor." :=) > > > > Btw, why gcd([]) returns zero? At l

Re: [sage-devel] Re: Poset/lattice, join and join_matrix

2014-10-27 Thread John Cremona
On 27 October 2014 12:37, Nathann Cohen wrote: > Yo ! > >> This is good argument to support (only) []-style argument for several >> elements. Be consistent within same program. Or in Sage terms, "Build a car, >> don't let it look like bicycle combined to tractor." :=) >> >> Btw, why gcd([]) return

[sage-devel] Re: The Misfortunes of a Trio of Mathematicians Using Computer Algebra Systems

2014-10-27 Thread Jason Grout
On 10/25/14, 21:38, William Stein wrote: On Sat, Oct 25, 2014 at 6:34 PM, William Stein wrote: On Oct 25, 2014 5:53 PM, "Jason Grout" wrote: On 10/25/14, 15:04, William Stein wrote: On Sat, Oct 25, 2014 at 6:37 AM, Jason Grout wrote: On 10/25/14, 0:07, William Stein wrote: They are

Re: [sage-devel] Re: Poset/lattice, join and join_matrix

2014-10-27 Thread Nathann Cohen
Yo ! > This is good argument to support (only) []-style argument for several > elements. Be consistent within same program. Or in Sage terms, "Build a car, > don't let it look like bicycle combined to tractor." :=) > > Btw, why gcd([]) returns zero? At least there is inconsistency with lcm([]) > r

Re: [sage-devel] Re: Poset/lattice, join and join_matrix

2014-10-27 Thread Jori Mantysalo
On Thu, 23 Oct 2014, Nathann Cohen wrote: sage: gcd([5]) 5 sage: gcd([5,7]) 1 This is good argument to support (only) []-style argument for several elements. Be consistent within same program. Or in Sage terms, "Build a car, don't let it look like bicycle combined to tractor." :=) Btw, why

[sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-27 Thread Volker Braun
Also, this might be a good idea to revisit our abuse of hashing vs. equality. I'm still very unhappy with us breaking python associative containers, which really hurts padics and/or caching. We should at least think about having separate _identical_ vs. _isomorphic_ methods, say, where only the

[sage-devel] Re: Sage on OSX 10.10

2014-10-27 Thread Volker Braun
bump On Friday, October 24, 2014 2:39:45 PM UTC+1, Volker Braun wrote: > > I have a working Sage on OSX 10.10. I suggest to release that shortly, in > case anybody else made the mistake of upgrading soon after the initial > Yosemite release ;-) Please review > > http://trac.sagemath.org/query?s

[sage-devel] BooleanLattice(n) with n=0 and n=1

2014-10-27 Thread Jori Mantysalo
for i in [3,2,1,0]: print Posets.BooleanLattice(i) prints Finite lattice containing 8 elements Finite lattice containing 4 elements Finite lattice containing 1 elements Traceback (click to the left of this block for traceback) It sounds natural to have BooleanLattice(0) be 1-element lattice, bu