Re: New variable type: matrix

2000-08-28 Thread Karl Glazebrook
Using semicolons is an interesting idea. But consider: @a[10:20; 30:40]; The ":"s and ";" are awfully hard to visually distinguish. c.f. @a[10:20, 30:40]; What do people feel about the whole replacing ".." by ":" issue? Karl

Re: RFC 148 (v1) Add reshape() for multi-dimensional array reshaping

2000-08-28 Thread Karl Glazebrook
Consider @x[10:20, 20:40:2, 30:50] This ALMOST works in the current Perl. @x gives array context, then the , produces a list. If [] is overloaded on @a then the subroutine sees a list like "10:20", "20:40:2", "30:50" The only reason it does NOT work in the current perl is that "10:20" is a

Re: New variable type: matrix

2000-08-28 Thread Doug Hunt
Christian: You are right, it would not be best to confuse normal perl lists with compact arrays--they both have their purposes and can be combined usefully. What I meant to say (but failed, alas) was that I support the idea for a new perl variable type called compact array: $foo -- scalar @foo

Re: New variable type: matrix

2000-08-28 Thread Nathan Wiger
Doug Hunt wrote: What I meant to say (but failed, alas) was that I support the idea for a new perl variable type called compact array: $foo -- scalar @foo -- array %foo -- hash ^foo -- compact array (or whatever notation) Given this notation, you could have hashes of compact

Re: multidim. containers

2000-08-28 Thread Dan Sugalski
At 10:28 AM 8/28/00 +1000, Jeremy Howard wrote: X-posted to [EMAIL PROTECTED] David L. Nicol wrote: If arrays as we know them implement by using a key space restricted to integers, I think a reasonable way to get matrices would be to open up their key space to lists of integers. I've

On RFC 88: Serendipity while throwing a string.

2000-08-28 Thread Tony Olekshy
I have been working on the Perl 5 reference implementation of RFC 88 functionality (Try.pm, which is currently available at: http://www.avrasoft.com/perl6/try6-ref5.txt ), and I stumbled across the following result. If you are writing some code, and there is a "throw" subroutine in scope, and

Re: Structured exception handling should be a core module.

2000-08-28 Thread Peter Scott
At 10:13 AM 8/25/00 +0200, Bart Lateur wrote: You're citing my objection for merging in $@ with the rest of the error variables. $@ currently is the "eval failed" flag, irrespective of what else failed. We *must* have such a flag. If $@ and $! would be merged, $! will have to be cleared if the

Re: Structured exception handling should be a core module.

2000-08-28 Thread Peter Scott
At 01:42 AM 8/25/00 -0600, Tony Olekshy wrote: Peter Scott wrote: If $@ and $! are merged, then in code like try { system_call_that_fails(); more_stuff_that_succeeds(); } finally { } does the finally block

Re: Are Perl6 threads preemptive or cooperative?

2000-08-28 Thread Dan Sugalski
At 12:11 PM 8/28/00 -0500, David L. Nicol wrote: What if every subroutine tagged itself with a list of the globals it uses, so a calling routine would know to add those to the list of globals it wants locked? If you're looking for automagic locking of variables, you're treading deep into

Re: RFC 161 (v2) OO Integration/Migration Path

2000-08-28 Thread Matt Youell
I've read over 161 again and I'm starting to see areas where I can clarify things greatly. I apologize for the confusion. I'll make mods to the RFC in the near future, after I get more feedback from you all. Here are my goals as they probably should have been stated in the RFC: - Concentrate

Re: RFC 161 (v2) OO Integration/Migration Path

2000-08-28 Thread Bart Lateur
On Sun, 27 Aug 2000 06:14:00 -0700, Matt Youell wrote: So an int gets stored as two bytes and not four or eight. Gee, I thought it was more like 30. The savings in bytes don't look too impressive in this case. 4 byte addition is as fast as 2 byte addition on most pmodern platforms -- and you

RE: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME )

2000-08-28 Thread Damian Conway
What I meant to say was more along the lines of "if this could be done as a macro, does it need to be a pragma, or could it be part of a standard macro package?" And, secondly, "if this *is* part of a standard macro package, wouldn't it be cool to let it shove arbitrary

Re: RFC 164 (v1) Replace =~, !~, m//, and s/// with match() and subst()

2000-08-28 Thread Jonathan Scott Duff
On Mon, Aug 28, 2000 at 08:12:22AM -0700, Nathan Wiger wrote: Jonathan Scott Duff wrote: I think that Csubst is too syntactically close yet semantically far from Csubstr that the evil demons of confusion will rear their ugly heads. I agree too, any suggestions are welcome. The fact

Re: RFC 110 (v3) counting matches

2000-08-28 Thread Tom Christiansen
Have you ever wanted to count the number of matches of a patten? s///g returns the number of matches it finds. m//g just returns 1 for matching. Counts can be made using s//$/g but this is wastefull, or by putting some counting loop round a m//g. But this all seams rather messy. It's

Re: RFC 164 (v1) Replace =~, !~, m//, and s/// with match() and subst()

2000-08-28 Thread Tom Christiansen
Simple solution. If you want to require formats such as m/.../ (which I actually think is a good idea), then make it part of -w, -W, -ww, or -WW, which would be a perl6 enhancement of strictness. That's like having "use strict" enable mandatory perlstyle compliance checks, and rejecting the

Re: RFC 164 (v1) Replace =~, !~, m//, and s/// with match() and subst()

2000-08-28 Thread Nathan Torkington
Michael Maraist writes: Compatibility is going to have to be maintained somehow. And we can either have some sort of perl6 designator (such as the pragma) to designate incompatible (and otherwise ambiguous) code, or we're going to have to continue tacking on syntactic sugar to legacy code.

Re: RFC 135 (v2) Require explicit m on matches, even with ?? and // as delimiters.

2000-08-28 Thread Bart Lateur
On Mon, 28 Aug 2000 14:22:03 +1100 (EST), Damian Conway wrote: I don't get it. What makes it so hard? If you see a "/" when you're expecting an operator, or end of statement, then it's division. If you were expecting an expression, it's a regex. Ain't it? Yes. And that's what makes

Automated no status messages

2000-08-28 Thread skud
I've just run a nasty hairy script over the RFC repository and sent email to those people who I think have language RFCs but haven't put statuses on them yet. My aim in this is to figure out which RFCs are still actively under discussion and which aren't. Some people haven't updated their RFCs

Re: RFC 111 (v2) Here Docs Terminators (Was Whitespace and Here Docs)

2000-08-28 Thread Bart Lateur
On 27 Aug 2000 19:23:51 -, Perl6 RFC Librarian wrote: Further it should ignore any whitespace (and comments) that follow the terminator. All of these should work: print EOL ; EOL # this is the end of the here doc But currently, I like using: print "#EOT#2"; blah

Re: RFC 162 (v1) Filtering Here Docs

2000-08-28 Thread Bart Lateur
On 27 Aug 2000 19:23:51 -, Perl6 RFC Librarian wrote: It only removes whitespace, and it measures whitespace with tabs=8. My editor is set to tabs=4. Perl's interpretation wouldn't agree with the visual appearance in my editor. This doesn't sound like a neat solution. Why not disallow

Re: Let's have a Standard for Module Configuration

2000-08-28 Thread Carl Johan Berglund
That could be very nice. I would really prefer changing parameters through the API, by calling class functions or something, but I don't see why everyone should agree with me. Keeping source-editable parameters in a standard place would then be a win, especially considering your thoughts

Nice to have'it

2000-08-28 Thread raptor
Hi, I have couple of ideas which may or may not worth it, so I didn't wrote the RFC but will list them here in short. Here are the nice to have'it. 1. There will be good to have some sort of "match and/or assign" operator for structures i.e. HASHES. Can't still figure out the syntax but may be

Re: RFC 76 (v1) Builtin: reduce

2000-08-28 Thread Stephen P. Potter
Lightning flashed, thunder crashed and "Ed Mills" [EMAIL PROTECTED] whispe red: | So we establish a var $something=n where n is the array origin. You mean something like $[, which we've had for many, many years. And which for many, many years we've discouraged the use of? $[ The

Re: Nice to have'it

2000-08-28 Thread Ed Mills
Hey Raptor et al: Wow you did some homework! Nice ideas, but the consensus seems to be "roll your own". I've noted that opertors working on arrays are generally discouraged in favor of scalar ops in these discussions, so for example your (min,max) (ceiling, floor) are coded thousands of times

Re: RFC 133 (v1) Alternate Syntax for variable names

2000-08-28 Thread David Corbin
Bron Gondwana wrote: In [EMAIL PROTECTED], you wrote: count = array; # scalar context because of assignment to scalar. alt_array[] = array; # list context and if array is a subroutine? count = array(); count = array; # warning - special meaning in p5.

Re: RFC 162 (v1) Filtering Here Docs

2000-08-28 Thread David Corbin
Bart Lateur wrote: On 27 Aug 2000 19:23:51 -, Perl6 RFC Librarian wrote: It only removes whitespace, and it measures whitespace with tabs=8. My editor is set to tabs=4. Perl's interpretation wouldn't agree with the visual appearance in my editor. This doesn't sound like a neat

Re: RFC 111 (v2) Here Docs Terminators (Was Whitespace and Here Docs)

2000-08-28 Thread Ariel Scolnicov
Bart Lateur [EMAIL PROTECTED] writes: On 27 Aug 2000 19:23:51 -, Perl6 RFC Librarian wrote: Further it should ignore any whitespace (and comments) that follow the terminator. All of these should work: print EOL ; EOL # this is the end of the here doc But

Re: RFC 111 (v2) Here Docs Terminators (Was Whitespace and Here Docs)

2000-08-28 Thread Eric Roode
Richard Proctor proposed: All of these should work: print EOL; EOL print EOL; EOL print EOL ; EOL # this is the end of the here doc People may throw rocks at me for this, but I'd like to suggest that not only is a comment allowed on the terminator line,

RE: RFC 135 (v2) Require explicit m on matches, even with ?? and // as delimiters.

2000-08-28 Thread Fisher Mark
By the way, for all you thesis writers and thesis advisors out there -- I suspect that a separate implementation of the Perl6 lexer and/or Perl6 parser might make a dandy thesis topic... By the way, this message makes more sense if you s/a separate/an independent/... :(

Re: RFC 111 (v2) Here Docs Terminators (Was Whitespace and Here Docs)

2000-08-28 Thread Bart Lateur
On Mon, 28 Aug 2000 10:38:42 -0400 (EDT), Eric Roode wrote: People may throw rocks at me for this, but I'd like to suggest that not only is a comment allowed on the terminator line, but a semicolon also be allowed. Vis: print EOL; EOL; # This should work, too Let me throw the first

Re: RFC 111 (v2) Here Docs Terminators (Was Whitespace and Here Docs)

2000-08-28 Thread Nathan Wiger
Bart Lateur wrote: Next you'll propose that print EOL; blah EOL; print "OK!\n"; should work too, and print "OK!\n" as well. Why not?! This seems like a good thing. ;, #, or \n are all valid end-of-lines for here string delimiters. Sounds easy enough, and

Re: RFC 111 (v2) Here Docs Terminators (Was Whitespace and Here Docs)

2000-08-28 Thread Bart Lateur
On Mon, 28 Aug 2000 08:46:25 -0700, Nathan Wiger wrote: OTOH, what about this... print EOL blah EOL; which makes this a full blown statement (note the missing semicolon in the first line)... No it doesn't! perl -e ' print EOF Hello world! EOF; ' Can't

Re: Nice to have'it

2000-08-28 Thread John Porter
David Corbin wrote: raptor wrote: $hash{/re/} i.e. this is the same like my @res; foreach my $k (keys %hash) { if ($k =~ /re/) {push $hash{$k},@res} }; OR keys %hash{/re/} values %hash{/re/} each %hash{/re/} Way cool. I'd love this. Well, $hash{/re/} would

Re: RFC 111 (v2) Here Docs Terminators (Was Whitespace and Here Docs)

2000-08-28 Thread Richard Proctor
On Mon 28 Aug, Eric Roode wrote: Richard Proctor proposed: All of these should work: print EOL; EOL print EOL; EOL print EOL ; EOL # this is the end of the here doc People may throw rocks at me for this, but I'd like to suggest that not only

Re: RFC 111 (v2) Here Docs Terminators (Was Whitespace and Here Docs)

2000-08-28 Thread Richard Proctor
On Mon 28 Aug, Bart Lateur wrote: On Mon, 28 Aug 2000 10:38:42 -0400 (EDT), Eric Roode wrote: People may throw rocks at me for this, but I'd like to suggest that not only is a comment allowed on the terminator line, but a semicolon also be allowed. Vis: print EOL; EOL; # This

Re: RFC 162 (v1) Filtering Here Docs

2000-08-28 Thread Richard Proctor
On Mon 28 Aug, Bart Lateur wrote: On 27 Aug 2000 19:23:51 -, Perl6 RFC Librarian wrote: It only removes whitespace, and it measures whitespace with tabs=8. My editor is set to tabs=4. Perl's interpretation wouldn't agree with the visual appearance in my editor. This doesn't sound

Re: RFC 111 (v2) Here Docs Terminators (Was Whitespace and Here Docs)

2000-08-28 Thread Tom Christiansen
Next you'll propose that print EOL; blah EOL; print "OK!\n"; should work too, and print "OK!\n" as well. Yes why not, though it might be bad style. Because it gains you nothing, and loses much. --tom

Re: Do we really need eq?

2000-08-28 Thread Steve Simmons
I'd like to see eq and it's brethen retained, as dammit there are times I want to know (-w) if numbers are turning up when there should be words and vice-versa. However, spinning off of something Randal wrote: Yes, but what about: $a = '3.14'; # from reading a file $b =

Multiple for loop variables

2000-08-28 Thread Peter Scott
Graham Barr once allowed as how he thought it would be neat if you could say for my($x, $y, $z) (@list) { ... } i.e., more than one loop variable, assigned successively from the list. He didn't have time to RFC it, but when I looked at it, a problem arose: if the loop variables

Re: HERE construct

2000-08-28 Thread Eric Roode
Steve Simmons wrote: In all the straining at gnats over whitespace, filtering, etc, I have yet to see a single proposal that isn't accomplished by just using variables and manipulating them appropriately. And it avoids all the problems with whitespace on the HERE word. In many cases, I agree

Re: RFC 168 (v1) Built-in functions should be functions

2000-08-28 Thread Peter Scott
At 07:32 PM 8/27/00 +, Perl6 RFC Librarian wrote: =head2 Prototypes Currently, several built-ins do not provide prototype information. prototype("CORE::abs") == ;$ prototype("CORE::shift") == undef This must be fixed. One might even call this a bug, although the current

Re: RFC 126 (v2) Ensuring Perl's object-oriented future

2000-08-28 Thread Tom Christiansen
Object-oriented features were added to Perl with version 5, and in many ways still appear somewhat "tacked on", with perhaps undue respect for the Old Ways of Perl 4. [NB: This is not a serious missive.] Hey, that Perl uses packages for classes, subroutines for methods, and references for

Re: RFC 109 (v2) Less line noise - let's get rid of @%

2000-08-28 Thread Karl Glazebrook
My apologies for being too succinct. "lost" is a bit of an emotive word which is somewhat inaccuracte. I still believe in RFC 109 and I think I made a good case based on my own reasons. However the overwhelming majority of responses were negative, for their own very good albeit different

Re: RFC 126 (v2) Ensuring Perl's object-oriented future

2000-08-28 Thread John Siracusa
On 8/28/00 2:35 PM, Tom Christiansen wrote: Object-oriented features were added to Perl with version 5, and in many ways still appear somewhat "tacked on", with perhaps undue respect for the Old Ways of Perl 4. [NB: This is not a serious missive.] Hey, that Perl uses packages for

Re: Nice to have it

2000-08-28 Thread Eric Roode
Damian Conway wrote: I have a draft RFC that proposes that the LIST argument of a grep be optional in a hash slice, and default to the key list of the sliced hash. So: @hash{grep /^[^_]/} gives you the public values of %hash. And the advantage of that over @hash{ grep /^[^_]/,

Beefier prototypes (was Re: Multiple for loop variables)

2000-08-28 Thread John Porter
Peter Scott wrote: for my($x, $y, $z) (@list) { ... } ... IANAPE (I Am Not A Parsing Expert). So I thought I would see if anyone who was could say whether this construct would really give the parser problems or whether looking ahead for the block will disambiguate. Well, I think

Re: RFC 168 (v1) Built-in functions should be functions

2000-08-28 Thread John Porter
Damian Conway wrote: I think it would be a good thing for user prototypes to be able to handle this case and I wholeheartedly support the RFC; but it opens a can of worms that should be addressed. Perhaps in another RFC. Do any other (Damian) RFCs on (Damian) prototyping

Re: Nice to have'it

2000-08-28 Thread John Porter
Damian Conway wrote: I have a draft RFC that proposes that the LIST argument of a grep be optional in a hash slice, and default to the key list of the sliced hash. So: That's a waste of RFC paper, Damian. But let's generalize it a bit, and say that Perl6 should have a standard intrinsic

Re: Nice to have it

2000-08-28 Thread Bart Lateur
On Mon, 28 Aug 2000 14:43:08 -0400 (EDT), Eric Roode wrote: Damian Conway wrote: @hash{grep /^[^_]/} gives you the public values of %hash. And the advantage of that over @hash{ grep /^[^_]/, keys %hash } would be what? Brevity? What if I want those keys of %hash? Or both

Re: RFC 168 (v1) Built-in functions should be functions

2000-08-28 Thread Tom Christiansen
Well, as I mentioned in another recent parallel thread, if Cfor is to be properly functionalized, Whoa -- why? Syntax keywords (eg if, unless) certainly need not be expressible as functions.This isn't tcl! --tom

Re: New match and subst replacements for =~ and !~ (was Re: RFC 135 (v2) Require explicit m on matches, even with ?? and // as delimiters.)

2000-08-28 Thread Randy J. Ray
Just to extend this idea, at least for the exercise of it, consider: match; # all defaults (pattern is /\w+/?) match /pat/;# match $_ match /pat/, $str; # match $str match /pat/, @strs; # match any of @strs subst; # like s///, pretty

Re: RFC 143 (v1) Case ignoring eq and cmp operators

2000-08-28 Thread Steve Simmons
On Thu, Aug 24, 2000 at 03:40:00PM -, Perl6 RFC Librarian wrote: This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Case ignoring eq and cmp operators IMHO this problem is better solved by using =~ and its brethren, which already allow you to do

Re: New match and subst replacements for =~ and !~ (was Re: RFC 135 (v2) Require explicit m on matches, even with ?? and // as delimiters.)

2000-08-28 Thread Nathan Wiger
"Randy J. Ray" wrote: # These are pretty cool... foreach (@old) { @new = subst /hello/X/gi, @old; s/hello/X/gi; push @new, $_; } This implies that the subst keyword would *both* modify LIST in-place and return a complete copy of the list as a

Re: Multiple for loop variables

2000-08-28 Thread Graham Barr
On Mon, Aug 28, 2000 at 04:10:01PM -0400, Eric Roode wrote: Peter Scott wrote: Graham Barr once allowed as how he thought it would be neat if you could say for my($x, $y, $z) (@list) { ... } ObLanguageMinimalist: Um. Is this so frequently-used that the above syntax is preferable