Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Larry Wall
On Wed, Apr 20, 2005 at 04:50:38PM -0400, Matt Creenan wrote: : To expand on this... : : How will you be able to access shared libraries with native code, such as : DLLs on windows? Is there a way to do this proposed for Perl6 yet? Already implemented in Parrot under the name NCI. : If so, is

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Matt Creenan
On Wed, 20 Apr 2005 13:00:01 -0400, Matt <[EMAIL PROTECTED]> wrote: 2. Is anyone working on making a Win32 module for Perl6 yet, or porting over the p5 one? If not, I may be willing to make one, along with some help from friends. If I do, does anyone have any pointers or suggestions for me wh

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Larry Wall
On Wed, Apr 20, 2005 at 09:45:08PM +0200, Juerd wrote: : Larry Wall skribis 2005-04-20 11:54 (-0700): : > goto(join "", "L", { rand 10 } XX rand 10); : : By the way -- Does this mean the XX operator is official now? No. I just threw that in to see if anyone was awake. : And what about X? It

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Juerd
Larry Wall skribis 2005-04-20 11:54 (-0700): > goto(join "", "L", { rand 10 } XX rand 10); By the way -- Does this mean the XX operator is official now? And what about X? It'd let you write the same thing without the join: goto("L" ~ { rand 10 } X rand 10) Juerd -- http://convolut

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Larry Wall
On Wed, Apr 20, 2005 at 03:35:13PM -0400, Aaron Sherman wrote: : On Wed, 2005-04-20 at 15:15, Patrick R. Michaud wrote: : > On Wed, Apr 20, 2005 at 12:00:22PM -0700, Larry Wall wrote: : : > > Perl 6 culture might feebly try to discourage the redefinition of truth. : > : > Hmm, and here I was thin

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Aaron Sherman
On Wed, 2005-04-20 at 15:15, Patrick R. Michaud wrote: > On Wed, Apr 20, 2005 at 12:00:22PM -0700, Larry Wall wrote: > > Perl 6 culture might feebly try to discourage the redefinition of truth. > > Hmm, and here I was thinking that the culture was rapidly evolving > towards "There Is More Than On

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Larry Wall
On Wed, Apr 20, 2005 at 02:15:20PM -0500, Patrick R. Michaud wrote: : On Wed, Apr 20, 2005 at 12:00:22PM -0700, Larry Wall wrote: : > : Although admittedly, I only encountered this when playing with a : > : non-readonly undef ;) (This is something I can recommend to anyone: : > : redefining true, f

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Patrick R. Michaud
On Wed, Apr 20, 2005 at 12:00:22PM -0700, Larry Wall wrote: > : Although admittedly, I only encountered this when playing with a > : non-readonly undef ;) (This is something I can recommend to anyone: > : redefining true, false and undef leads to very spectacular code, where > : anything's possible

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Larry Wall
On Wed, Apr 20, 2005 at 08:39:43PM +0200, Juerd wrote: : The same thing goes for all those places where a variable is expected : that begins with $, like foreach. You can't easily use an lvalue sub. : The workaround is like your goto workaround: : : for ${\thatsub()} (1..10) { ... } Yes, and

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Larry Wall
On Wed, Apr 20, 2005 at 07:17:14PM +0200, Juerd wrote: : Must LABEL be quoted/a normal string? Forgot to answer the more general question. Presuming we still have next LABEL; last LABEL; redo LABEL; goto LABEL; how do we parse something like this goto join "", "L", { rand 1

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Juerd
Larry Wall skribis 2005-04-20 11:25 (-0700): > : It shouldn't treat a sub call differently, so that a called sub can in a > : useful manner return a closure, which is then executed several times. > : The same annoying special syntax can be found in perl 5's goto, that > : can't go to a returned sub

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Larry Wall
On Wed, Apr 20, 2005 at 07:17:14PM +0200, Juerd wrote: : Juerd skribis 2005-04-20 19:09 (+0200): : > I'm not sure the XX thing will happen, but if it does, it'd be most : > useful if it wouldn't treat a sub call differently. : : I forgot rationale. : : It shouldn't treat a sub call differently, s

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Juerd
Juerd skribis 2005-04-20 19:09 (+0200): > I'm not sure the XX thing will happen, but if it does, it'd be most > useful if it wouldn't treat a sub call differently. I forgot rationale. It shouldn't treat a sub call differently, so that a called sub can in a useful manner return a closure, which is

Re: Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Juerd
Matt skribis 2005-04-20 13:00 (-0400): > 1. I know there is the xx operator for repeating strings. I also know you > can use XX for repeating either closures, blocks, or subs; though I'm not > sure which. Assuming you could use XX on a sub, how would you gather the > results into an array?

Closure/block/sub multiplier /// Win32 module for Perl6

2005-04-20 Thread Matt
Ok, I have 2 questions. 1. I know there is the xx operator for repeating strings. I also know you can use XX for repeating either closures, blocks, or subs; though I'm not sure which. Assuming you could use XX on a sub, how would you gather the results into an array? @names = &get_next(...