Re: The S29 Functions Project

2005-03-15 Thread Rod Adams
Larry Wall wrote: On Tue, Mar 15, 2005 at 02:25:01PM -0600, Rod Adams wrote: : In Perl 6, all builtin functions belong to a named package. Not all : functions are guaranteed to be imported into the global package : C<::*>. In addition, the list of functions imported into C<::*> will be : subject to

Re: The S29 Functions Project

2005-03-15 Thread Larry Wall
On Tue, Mar 15, 2005 at 02:25:01PM -0600, Rod Adams wrote: : In Perl 6, all builtin functions belong to a named package. Not all : functions are guaranteed to be imported into the global package : C<::*>. In addition, the list of functions imported into C<::*> will be : subject to change with each

Re: The S29 Functions Project

2005-03-15 Thread Rod Adams
At 07:59 PM 3/15/2005 +, you wrote: On Mon, Mar 14, 2005 at 08:59:32AM -0800, Larry Wall wrote: > On Mon, Mar 14, 2005 at 08:10:15AM -0600, Patrick R. Michaud wrote: > : I ran into this problem while creating a mini-list of S29 functions > : (which Rod's work supercedes, I suspect, and I'm very

Re: The S29 Functions Project

2005-03-15 Thread Nicholas Clark
On Mon, Mar 14, 2005 at 08:59:32AM -0800, Larry Wall wrote: > On Mon, Mar 14, 2005 at 08:10:15AM -0600, Patrick R. Michaud wrote: > : I ran into this problem while creating a mini-list of S29 functions > : (which Rod's work supercedes, I suspect, and I'm very glad he's taking > : this on). What ar

Re: The S29 Functions Project

2005-03-14 Thread Larry Wall
On Mon, Mar 14, 2005 at 12:16:13PM -0600, Rod Adams wrote: : Therefore, as I go through S29, I'll assign all functions to some : module. I'll be using the P5/CPAN hierarchy as a strong guideline. : : We can then discuss what gets bound into ::*, and when, at some later : point in time. That's a

Re: The S29 Functions Project

2005-03-14 Thread Rod Adams
Larry Wall wrote: On Mon, Mar 14, 2005 at 08:10:15AM -0600, Patrick R. Michaud wrote: : I ran into this problem while creating a mini-list of S29 functions : (which Rod's work supercedes, I suspect, and I'm very glad he's taking : this on). What are some guidelines we could use in deciding : whic

Re: The S29 Functions Project

2005-03-14 Thread Larry Wall
On Mon, Mar 14, 2005 at 06:00:11PM +0100, Thomas Sandlaß wrote: : BTW, I'm unsure how packages, modules and classes roles interact with : the type system and MMD. In particualr what can be put into the type slot : of declarations/definitions: : : my SomeThing $x; : : Can SomeThing be a package? A

Re: The S29 Functions Project

2005-03-14 Thread Thomas Sandlaß
Luke Palmer wrote: &cos($angle) or Degrees::cos($angle), depending on whether you defined it your way or my way. Uh oh, I thought we were going to make single-invocant multis and methods the same everywhere... Sorry for messing up the syntax in my example code. What I wanted to achieve is to get a

Re: The S29 Functions Project

2005-03-14 Thread Larry Wall
On Mon, Mar 14, 2005 at 08:10:15AM -0600, Patrick R. Michaud wrote: : I ran into this problem while creating a mini-list of S29 functions : (which Rod's work supercedes, I suspect, and I'm very glad he's taking : this on). What are some guidelines we could use in deciding : which functions are au

Re: The S29 Functions Project

2005-03-14 Thread Luke Palmer
Thomas Sandlaà writes: > Rod Adams wrote: > >And then internally dispatch on what is defined and undefined. > > Why all that burden if Perl 6 is getting a strong type system, > that can do the sub selection and compile in dynamic dispatch if > needed? > > I imagine: > > multi sub cos( Num +$angl

Re: The S29 Functions Project

2005-03-14 Thread Juerd
Patrick R. Michaud skribis 2005-03-14 8:10 (-0600): > I ran into this problem while creating a mini-list of S29 functions > (which Rod's work supercedes, I suspect, and I'm very glad he's taking > this on). What are some guidelines we could use in deciding > which functions are automatically in

Re: The S29 Functions Project

2005-03-14 Thread Patrick R. Michaud
On Sun, Mar 13, 2005 at 06:03:20PM -0800, Larry Wall wrote: > : One thing I've already done is make a list of Perl 5 functions I cannot > : address until some future Apocalypse/Synopsis is generated on the topic. > : By far the bulk of this list falls on S16. Partly because IPC is a mess, > : an

Re: The S29 Functions Project

2005-03-14 Thread Thomas Sandlaß
Rod Adams wrote: And then internally dispatch on what is defined and undefined. Why all that burden if Perl 6 is getting a strong type system, that can do the sub selection and compile in dynamic dispatch if needed? I imagine: multi sub cos( Num +$angle ) returns Num where { -1.0 <= $_ <= 1.0 } cla

Re: The S29 Functions Project

2005-03-14 Thread Larry Wall
On Mon, Mar 14, 2005 at 01:07:45AM -0600, Rod Adams wrote: : It's been defined that Perl 6.0.0 does not dispatch on named parameters, : for better or for worse. If you don't like it, talk to Larry. That's a little bit of an overstatement. I've only said 6.0.0 doesn't *have* to support MMD on nam

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 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

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

The S29 Functions Project

2005-03-12 Thread Rod Adams
Barring objections, I'm going to attempt to compile a S29. 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 new ones on my own, but I'll