[sage-support] Re: An abbreviation for lambda?

2009-12-15 Thread Harald Schilly
I'm a bit against the preparser idea and adding stuff to it, too. I'm curious if there will be a way to define a custom operator in python some time in the future. I think these sorts of ideas will be solved if there is a clear way how to define one without running into troubles anytime in the futu

Re: [sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Christopher Olah
>> I think that having a way to make anonymous functions is very >> important. While, as someone relatively new to sage, I haven't used in >> sage, I use it all the time in math (For example, my prefered >> definition of the Mandlebrot set is {x|x ∊ ℂ; lim_(n->∞) >> (λz:z^2+x)ⁿ(0)≠∞} )... >> >> I q

[sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Marshall Hampton
On Dec 14, 5:23 pm, Jaap Spies wrote: > Maybe you are also a lisp lover. But please, let Sage be as close to > Python as possible! > > Jaap Lisp lover! Now those are fightin' words! -Marshall -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this gro

[sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Jason Grout
Robert Bradshaw wrote: > On Dec 14, 2009, at 12:15 PM, Dag Sverre Seljebotn wrote: > >> Robert Bradshaw wrote: >>> On Dec 14, 2009, at 11:43 AM, Carlos Córdoba wrote: >>> I have to agree with Marshall, because it could be confusing for new sage users that come from python to see such a d

[sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Jason Grout
Christopher Olah wrote: > I think that having a way to make anonymous functions is very > important. While, as someone relatively new to sage, I haven't used in > sage, I use it all the time in math (For example, my prefered > definition of the Mandlebrot set is {x|x ∊ ℂ; lim_(n->∞) > (λz:z^2+x)ⁿ(0

Re: [sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Jaap Spies
Marshall Hampton wrote: > > Mathematica's syntax can be quite dense, which has the same > disadvantage as Perl code in my opinion - it can be hard to read. But > sometimes it is nice to be able to do so much concisely. I miss it > sometimes. > Maybe you are also a lisp lover. But please, let Sag

Re: [sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Christopher Olah
I think that having a way to make anonymous functions is very important. While, as someone relatively new to sage, I haven't used in sage, I use it all the time in math (For example, my prefered definition of the Mandlebrot set is {x|x ∊ ℂ; lim_(n->∞) (λz:z^2+x)ⁿ(0)≠∞} )... I quite like the idea o

Re: [sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Alex Ghitza
On Mon, Dec 14, 2009 at 10:31:14PM +0100, Jaap Spies wrote: > Martin Rubey wrote: > > Carlos Córdoba writes: > > > >> Anyway, the use of anonymous functions is mostly useful on constructs > >> that operate over lists, like map and reduce. In 10 years of using > >> Mathematica I've ever needed to d

[sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Marshall Hampton
Mathematica's syntax can be quite dense, which has the same disadvantage as Perl code in my opinion - it can be hard to read. But sometimes it is nice to be able to do so much concisely. I miss it sometimes. -Marshall On Dec 14, 3:31 pm, Jaap Spies wrote: > > I truly hope this 'hocus pocus'

[sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Jaap Spies
Martin Rubey wrote: > Carlos Córdoba writes: > >> Anyway, the use of anonymous functions is mostly useful on constructs >> that operate over lists, like map and reduce. In 10 years of using >> Mathematica I've ever needed to derive this kind functions, but >> nevertheless I've checked if it's poss

Re: [sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Martin Rubey
Carlos Córdoba writes: > Anyway, the use of anonymous functions is mostly useful on constructs > that operate over lists, like map and reduce. In 10 years of using > Mathematica I've ever needed to derive this kind functions, but > nevertheless I've checked if it's possible, and indeed it is, for

Re: [sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Carlos Córdoba
2009/12/14 Robert Bradshaw > On Dec 14, 2009, at 12:15 PM, Dag Sverre Seljebotn wrote: > > > Robert Bradshaw wrote: > >> On Dec 14, 2009, at 11:43 AM, Carlos Córdoba wrote: > >> > >>> I have to agree with Marshall, because it could be confusing for new > >>> sage users that come from python to se

Re: [sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Robert Bradshaw
On Dec 14, 2009, at 12:15 PM, Dag Sverre Seljebotn wrote: > Robert Bradshaw wrote: >> On Dec 14, 2009, at 11:43 AM, Carlos Córdoba wrote: >> >>> I have to agree with Marshall, because it could be confusing for new >>> sage users that come from python to see such a different syntax >>> meaning. >>>

Re: [sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Dag Sverre Seljebotn
Robert Bradshaw wrote: > On Dec 14, 2009, at 11:43 AM, Carlos Córdoba wrote: > >> I have to agree with Marshall, because it could be confusing for new >> sage users that come from python to see such a different syntax >> meaning. >> >> But what about the Mathematica syntax? Could it be adopted

Re: [sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Robert Bradshaw
On Dec 14, 2009, at 11:43 AM, Carlos Córdoba wrote: > I have to agree with Marshall, because it could be confusing for new > sage users that come from python to see such a different syntax > meaning. > > But what about the Mathematica syntax? Could it be adopted by sage? The Mathematica synta

[sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread John H Palmieri
On Dec 14, 11:43 am, Carlos Córdoba wrote: > I have to agree with Marshall, because it could be confusing for new sage > users that come from python to see such a different syntax meaning. > > But what about the Mathematica syntax? Could it be adopted by sage? > > The problem is that most CAS are

Re: [sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Robert Bradshaw
On Dec 14, 2009, at 8:01 AM, Dag Sverre Seljebotn wrote: >> I don't know if it's a good idea to make this valid Sage syntax, >> though. >>I'm on the fence, but leaning towards not favoring it just because >> of the added complexity and the departure from true Python, and the >> python versio

Re: [sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Carlos Córdoba
I have to agree with Marshall, because it could be confusing for new sage users that come from python to see such a different syntax meaning. But what about the Mathematica syntax? Could it be adopted by sage? The problem is that most CAS are functional in nature and the first thing one tries to

[sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Marshall Hampton
I felt ambivalent about adding the "->" until this point. If "->" is going to mean something else in python eventually, it seems like a bad idea to overload it in a Sage-specific way. -Marshall On Dec 14, 10:01 am, Dag Sverre Seljebotn wrote: > > Note that -> gets a meaning in Python 3, to ann

Re: [sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Dag Sverre Seljebotn
Jason Grout wrote: > kcrisman wrote: > >> On Dec 14, 9:19 am, Carlos Córdoba wrote: >> >>> I don't think it would be so hard to do but this could break >>> interoperability with Python, the language on which Sage is based. Besides >>> it could make Sage like a dialect of python, something

[sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Jason Grout
kcrisman wrote: > > On Dec 14, 9:19 am, Carlos Córdoba wrote: >> I don't think it would be so hard to do but this could break >> interoperability with Python, the language on which Sage is based. Besides >> it could make Sage like a dialect of python, something that sage devs don't >> want to do.

[sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread kcrisman
Then that sounds like another Python syntax error we could make available. Not sure we'd want to, though. - kcrisman > > for those coming from Maple.  What does Mathematica do for such > > anonymous functions (if anything)? > > #^2+1 &  (note the & is important; it says what comes before is an >

[sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread Jason Grout
kcrisman wrote: > > On Dec 14, 9:19 am, Carlos Córdoba wrote: >> I don't think it would be so hard to do but this could break >> interoperability with Python, the language on which Sage is based. Besides >> it could make Sage like a dialect of python, something that sage devs don't >> want to do.

[sage-support] Re: An abbreviation for lambda?

2009-12-14 Thread kcrisman
On Dec 14, 9:19 am, Carlos Córdoba wrote: > I don't think it would be so hard to do but this could break > interoperability with Python, the language on which Sage is based. Besides > it could make Sage like a dialect of python, something that sage devs don't > want to do. > > Unfortunately pyth