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 indet

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 t

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

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 belo

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 sup

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

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 hi

Updates to Devel::TypeCheck

2005-08-28 Thread Gary Jackson
I've made some significant updates to Devel::TypeCheck today in the source code repository (svn.perl.org/modules/Devel-TypeCheck). The most significant thing is the addition of typing for aggregate data types. I've added another structural level to distinguish between strings/numbers an

Re: Updates to Devel::TypeCheck

2005-08-28 Thread Andy Lester
On Aug 29, 2005, at 12:35 AM, Gary Jackson wrote: Also, a lot of little bugs have been found and squashed, and Andy Lester has started to put some proper testing in to place. What I'd really like is a standard typecheck.t like we have standard pod.t. It'd look something like this: use

tcl in leo-ctx5

2005-08-28 Thread Will Coleda
In anticipation of the upcoming merge of leo-ctx5 to trunk, i was trying to get tcl working there. Given the tcl: set b(c) 2 puts [array exists b] I get the error: wrong # args: should be "array exists arrayName" From languages/tcl/lib/commands/array.pir, the Tcl::&array sub seems fine, a

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,Sun&sel=281#l460 Thanks for that. Bottom line: the aim is to change the meaning. I