Re: [sage-devel] Re: RFC: draft PEP for adding @ as a matrix multiplication operator to Python

2014-03-15 Thread Nathaniel Smith
On Fri, Mar 14, 2014 at 8:48 PM, William Stein wrote: > In retrospect, it appears that the OP should have asked the following > question: From the perspective of Sage, if Python were to have > another arithmetic operator (denoted @) with identical precedence > rules to *, would we use it for any

Re: [sage-devel] Re: RFC: draft PEP for adding @ as a matrix multiplication operator to Python

2014-03-14 Thread Nathaniel Smith
On Fri, Mar 14, 2014 at 8:32 PM, Nils Bruin wrote: > On Sunday, March 9, 2014 8:09:58 AM UTC-7, n...@vorpus.org wrote: >> >> Greetings, Sage Ones, >> >> Some of you may have already seen this, but I've started working on a >> draft PEP for adding a dedicated operator for matrix multiplication to >

Re: [sage-devel] Re: RFC: draft PEP for adding @ as a matrix multiplication operator to Python

2014-03-11 Thread Nathaniel Smith
On Mon, Mar 10, 2014 at 10:15 AM, Nicolas M. Thiery wrote: > On Mon, Mar 10, 2014 at 12:51:46AM +0000, Nathaniel Smith wrote: >> > Thus, it would certainly be a reasonable PEP to provide a framework in >> > Python to define custom infix operators (say, operator.compose)

Re: [sage-devel] Re: RFC: draft PEP for adding @ as a matrix multiplication operator to Python

2014-03-11 Thread Nathaniel Smith
On Tue, Mar 11, 2014 at 10:26 PM, rjf wrote: > Maxima, part of Sage, has had an extensible (at run time) parser for > perhaps 35 years. > You could ask about the experience there, maybe read about the pros and > cons. > Or you could be more conventional and ignore others' past experience. :) >

Re: [sage-devel] Re: RFC: draft PEP for adding @ as a matrix multiplication operator to Python

2014-03-11 Thread Nathaniel Smith
On Tue, Mar 11, 2014 at 12:43 PM, Niles Johnson wrote: > Second, I think your last sentence is too much of a stretch. It's fair to > say that Sage shipping an infix hack is (possibly) evidence that people > love infix operators. (Although the fact that it's not used much would > suggest that the

Re: [sage-devel] Re: RFC: draft PEP for adding @ as a matrix multiplication operator to Python

2014-03-09 Thread Nathaniel Smith
.. > Such discussion sure makes sense in a CAS, though.. > > On 2014-03-09, Nathaniel Smith wrote: >> ... >> R alsos use * for elementwise mul. And really, it does work fine and >> is useful in many application areas, I promise! :-) I've sent similar >> heads-u

Re: [sage-devel] RFC: draft PEP for adding @ as a matrix multiplication operator to Python

2014-03-09 Thread Nathaniel Smith
On Sun, Mar 9, 2014 at 8:44 PM, William Stein wrote: > On Sun, Mar 9, 2014 at 12:40 PM, wrote: >> On Sunday, March 9, 2014 7:20:50 PM UTC, Jeroen Demeyer wrote: >>> >>> I think the following piece should be made more clear, I don't >>> understand what you're trying to say here: >>> >>> The probl