Auto generated methods (was Re:The S29 Functions Project)

2005-03-13 Thread Rod Adams
Larry Wall wrote: On Sun, Mar 13, 2005 at 01:15:52AM -0600, Rod Adams wrote: : =item multi sub cos (?Num) returns Num : : =item multi method Num::cos () returns Num It would be nice if we could just say the first implies the second. I guess what that effectively means is that even if you take the

Re: The S29 Functions Project

2005-03-13 Thread Rod Adams
Ashley Winters wrote: On Sun, 13 Mar 2005 23:42:41 -0600, Rod Adams <[EMAIL PROTECTED]> wrote: Ashley Winters wrote: For documentary purposes, can we make that $radians? multi sub cos (Num +$degrees) returns Num { return cos :radians($degrees * PI / 180); } my Num $x = cos :degrees(270);

Re: The S29 Functions Project

2005-03-13 Thread Mark A. Biggar
Rod Adams wrote: Ashley Winters wrote: For documentary purposes, can we make that $radians? multi sub cos (Num +$degrees) returns Num { return cos :radians($degrees * PI / 180); } my Num $x = cos :degrees(270); I have changed the trig functions it to have an optional "base" argument. (I'm opti

Re: The S29 Functions Project

2005-03-13 Thread Ashley Winters
On Sun, 13 Mar 2005 23:42:41 -0600, Rod Adams <[EMAIL PROTECTED]> wrote: > Ashley Winters wrote: > >For documentary purposes, can we make that $radians? > > > >multi sub cos (Num +$degrees) returns Num { > >return cos :radians($degrees * PI / 180); > >} > > > >my Num $x = cos :degrees(270); >

Re: "The fate of reduce() in Python 3000"

2005-03-13 Thread Luke Palmer
A. Pagaltzis writes: > Hi all, > > so Guido is talking about his reasoning behind dropping lambda, > reduce(), filter() and map() in the next generation of Python: > > http://www.artima.com/weblogs/viewpost.jsp?thread=98196 > > [Prime quote: "I think having the two choices side-by-side just

Re: The S29 Functions Project

2005-03-13 Thread Rod Adams
Ashley Winters wrote: For documentary purposes, can we make that $radians? multi sub cos (Num +$degrees) returns Num { return cos :radians($degrees * PI / 180); } my Num $x = cos :degrees(270); I have changed the trig functions it to have an optional "base" argument. (I'm option to new names f

S29, pt1 is up

2005-03-13 Thread Rod Adams
I've posted what I have of S29 at http://www.rodadams.net/Perl/S29.pod http://www.rodadams.net/Perl/S29.html I'll leave it there until it reaches some more final state. Currently up is the "Numerical" section, covering the math related functions. I'd also appreciate a review of "Obsolete" to ma

Re: The S29 Functions Project

2005-03-13 Thread Ashley Winters
On Sun, 13 Mar 2005 18:03:20 -0800, Larry Wall <[EMAIL PROTECTED]> wrote: > On Sun, Mar 13, 2005 at 01:15:52AM -0600, Rod Adams wrote: > > : =item multi sub cos (?Num) returns Num > : > : =item multi method Num::cos () returns Num > > It would be nice if we could just say the first implies the se

Re: The S29 Functions Project

2005-03-13 Thread Rod Adams
Larry Wall wrote: On Sun, Mar 13, 2005 at 01:15:52AM -0600, Rod Adams wrote: : Plan of attack: : : I'm using a recent copy of Perl 5's perlfunc as a very rough template. : At some point, I'll drudge through the A's and S's to look for functions : new to Perl 6. I'll try not to make up too many n

Re: The S29 Functions Project

2005-03-13 Thread Uri Guttman
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes: LW> I can tell you that I want both selects to be dead, but again, I'll LW> have to translate Perl 5 to something. But some of these things LW> can probably be translated to things like LW> Perl5DeprecatedEmulationDoNotUseEverEverA

Re: The S29 Functions Project

2005-03-13 Thread Larry Wall
On Sun, Mar 13, 2005 at 01:15:52AM -0600, Rod Adams wrote: : Barring objections, I'm going to attempt to compile a S29. That's great. It's one of the many things I haven't been getting around to doing... : Plan of attack: : : I'm using a recent copy of Perl 5's perlfunc as a very rough template

Re: "The fate of reduce() in Python 3000"

2005-03-13 Thread Uri Guttman
> "AP" == A Pagaltzis <[EMAIL PROTECTED]> writes: AP> [Prime quote: "I think having the two choices side-by-side just AP> requires programmers to think about making a choice that's AP> irrelevant for their program; not having the choice streamlines AP> the thought process."] it just p

Re: A possible solution for s?pintf

2005-03-13 Thread Larry Wall
On Sat, Mar 12, 2005 at 05:12:30PM -0800, Dave Whipp wrote: : Larry Wall wrote: : >I don't see that this buys us anything over just shortening "sprintf" : >to something shorter, like: : > : > print as '%03d %15s', $foo, $bar; : > : >And your argument list falls out naturally from making "as" a li

Re: A possible solution for s?pintf

2005-03-13 Thread Larry Wall
On Sat, Mar 12, 2005 at 10:26:51PM -0600, Rod Adams wrote: : You could easily write the above as : :say (($n1, $n2, $n3)».as('%d')).join; : : What I'm not certain about is if : :say ($n1, $n2, $n3)».as('%d').join; : : does the same thing, but I think it does. Yes, hyper only modifies o

Re: lists in string context

2005-03-13 Thread Juerd
Larry Wall skribis 2005-03-12 16:03 (-0800): > Just for the record, let me say that I expect the limit parameter > to split to be +$limit and not ?$limit. I think a number of seldom-used > options will go this route. Another consideration is whether the > parameter needs to be considered for MMD.

Re: "The fate of reduce() in Python 3000"

2005-03-13 Thread Juerd
A. Pagaltzis skribis 2005-03-13 23:40 (+0100): > [Prime quote: "I think having the two choices side-by-side just > requires programmers to think about making a choice that's > irrelevant for their program; not having the choice streamlines > the thought process."] > But, philosophical point of view

"The fate of reduce() in Python 3000"

2005-03-13 Thread A. Pagaltzis
Hi all, so Guido is talking about his reasoning behind dropping lambda, reduce(), filter() and map() in the next generation of Python: http://www.artima.com/weblogs/viewpost.jsp?thread=98196 [Prime quote: "I think having the two choices side-by-side just requires programmers to think about m