How do you say another_sub(@_) in perl 6?

2005-08-28 Thread Yuval Kogman
Hi, What is the correct way to do pass through args? In perl 5 we would do: sub whatever { ... nested_call(@_); ... } but slurpy args are undesireable, since they are lossy: data loss - shape of input parameters is

User defined autovivification

2005-08-28 Thread Yuval Kogman
Today I wrote some perl 5 code that looked like this: my %index_by_x; my %index_by_y; my %index_by_z; foreach my $thing (@things){ ( $index_by_x{$thing-x_value} ||= Set::Object-new)-insert($thing); ( $index_by_y{$thing-y_value} ||=

Manuthreading

2005-08-28 Thread Luke Palmer
While nothingmuch and I are gutting junctions and trying to find the right balance of useful/dangerous, I'm going to propose a new way to do autothreading that doesn't use junctions at all. First, let me show you why I think junctions aren't good enough: I can't extract the information that the

Re: Manuthreading

2005-08-28 Thread Yuval Kogman
On Sun, Aug 28, 2005 at 09:45:02 +, Luke Palmer wrote: Where the meta operator is pointing to the parentheses around the call. Then it is easy to do my map above: my ($val1, $val2, $val3) = foo(bar, 1,2,3, baz) I think a some and of the same shape thrown into to the parameters is

Re: How do you say another_sub(@_) in perl 6?

2005-08-28 Thread David Storrs
On Aug 28, 2005, at 5:52 AM, Yuval Kogman wrote: On Sun, Aug 28, 2005 at 05:18:42 -0400, David Storrs wrote: On Aug 28, 2005, at 5:12 AM, Yuval Kogman wrote: On Sun, Aug 28, 2005 at 05:02:25 -0400, David Storrs wrote: nested_call.wrap(), maybe? It's not 100% the same thing... Wrapping is

Re: User defined autovivification

2005-08-28 Thread Yuval Kogman
On Sun, Aug 28, 2005 at 05:56:58 -0400, David Storrs wrote: While I think your P6 code is great, I don't feel you're comparing apples to apples. In all your P6 examples you effectively break the autovivify step out from the other steps. You can do that in P5 too: To me the code below

Re: How do you say another_sub(@_) in perl 6?

2005-08-28 Thread Yuval Kogman
On Sun, Aug 28, 2005 at 05:18:42 -0400, David Storrs wrote: On Aug 28, 2005, at 5:12 AM, Yuval Kogman wrote: On Sun, Aug 28, 2005 at 05:02:25 -0400, David Storrs wrote: nested_call.wrap(), maybe? It's not 100% the same thing... Wrapping is for wrapping only. This applies to super methods,

Re: How do you say another_sub(@_) in perl 6?

2005-08-28 Thread Yuval Kogman
On Sun, Aug 28, 2005 at 05:02:25 -0400, David Storrs wrote: nested_call.wrap(), maybe? It's not 100% the same thing... Wrapping is for wrapping only. This applies to super methods, delegate methods, and so forth. -- () Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker /\ kung foo

Re: How do you say another_sub(@_) in perl 6?

2005-08-28 Thread David Storrs
On Aug 28, 2005, at 5:52 AM, Yuval Kogman wrote: oops... Can I forward our correspondence to the mailing list? Sure. I was wondering why you took it private. : --Dks

Re: Manuthreading

2005-08-28 Thread Damian Conway
Luke wrote: Now I'm going to propose a variant for circumfix: foo(1, @a, 2); Where the meta operator is pointing to the parentheses around the call. Then it is easy to do my map above: my ($val1, $val2, $val3) = foo(bar, 1,2,3, baz) You're going to need to find another syntax.

Re: Manuthreading

2005-08-28 Thread Yuval Kogman
On Sun, Aug 28, 2005 at 22:22:07 +1000, Damian Conway wrote: You're going to need to find another syntax. That one already means something else (namely, shell-like interpolating word list). Luke said he was going to sleep, so I'll point you to some chat logs instead of letting you wait for his

Re: Manuthreading

2005-08-28 Thread Damian Conway
Yuval Kogman wrote: Luke said he was going to sleep, so I'll point you to some chat logs instead of letting you wait for his reply: http://colabti.de/irclogger/irclogger_log/perl6?date=2005-08-28,Sunsel=281#l460 Thanks for that. Bottom line: the aim is to change the meaning. I