RE: Perl 6's for() signature

2003-07-31 Thread Hanson, Rob
 Anyone but me feel the need for non-greedy
 slurpy arrays? similar to non-greedy RE matches?

I definately like the idea of having something like that.  It probably
wouldn't be used much, but it is nice to have the option.

One thing though, can't you accomplish the same thing by slurping
everything, then poping the block off of the array?

Rob

-Original Message-
From: Rod Adams [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 12:56 PM
To: Perl 6 Language
Subject: Re: Perl 6's for() signature


At 10:05 AM 7/31/2003 -0600, Luke Palmer wrote:
Well, I don't think it's possible, actually.  There's a flattening
list context at the beginning (implying a sugary drink from 7 eleven),
followed by a code block.  But, as we know, slurpy arrays can only
come at the end of positional parameters.

Anyone but me feel the need for non-greedy slurpy arrays? similar to 
non-greedy RE matches?
Then we could do:

sub for ([EMAIL PROTECTED], block) {...}

Proposed behavior of *?@ : All Arguement to Parameter mapping left of it 
are processed Left to Right. Once seen, the mapping starts over right to 
left. Everything remaining is slurpable.

Yes, it's more expensive to use, just like the RE version, but shouldn't 
impact performance _too_ bad when it's not, since the behavior will be 
detectable at compile time.

Thoughts?


RE: [PASM] problem opening / reading file

2002-08-13 Thread Hanson, Rob

At 02:27 AM 8/13/2002 -0400, Dan Sugalski wrote:
Anyone up to throwing a list of outstanding
 problems with the I/O system together?

From: Clinton A. Pierce [mailto:[EMAIL PROTECTED]]
I'd volunteer, except that I'm used to grunging
 around at the assembler level of I/O (INT 21h!)
 or with C's stdio and I don't think that your goal 
is either one of these targets.

I looked at the io ops a few weeks ago and it looks like only the open and
readline are working.  The write and read ops are using an incompatable file
handle (int instead of FILE).  I played around with them a bit and got them
working for strings, but didn't go much further than that.

If you want, I could take a stab at fixing it, although like Clinton, I'm
not sure what the ultimate goal is.

I also had a question about the read and write ops for NUM and INT... is it
a good idea to be able to read/write in an INT length worth of data when INT
size could vary from machine to machine?  Or am I missing the reason for
those?

Thanks.

Rob