Re: RFC 86 (v1) IPC Mailboxes for Threads and Signals

2000-08-10 Thread Uri Guttman
"CF" == Chaim Frenkel [EMAIL PROTECTED] writes: CF How does this look different from an inter-thread visible array CF treated as a queue? CF Thread A CF push(@workqueue, $val) CF Thread B CF $val = pop(@workqueue) CF Where accessing the global variable

Re: RFC 88 (v1) Structured Exception Handling Mechanism

2000-08-10 Thread Chaim Frenkel
See Graham Barr's previous email on this topic. eval {} else {} continue {} Very few new keywords, and rather than add something a complex mechainism to the catch section, why not use Damian's switch internally. This gives full flexibility to the user with little extra

Re: Summary of I/O related RFCs

2000-08-10 Thread Jonathan Scott Duff
On Wed, Aug 09, 2000 at 06:37:07PM -0700, Jon Ericson wrote: =item 33 (v1): Eliminate bareword filehandles. (language) No discussion. Using "$fh = open()" accomplishes this. I think everyone is in agreement that bareword filehandles must go. =item 39 (v1): print operator No

Re: RFC 14 (v2) Modify open() to support FileObjects and

2000-08-10 Thread Piers Cawley
Nick Ing-Simmons [EMAIL PROTECTED] writes: Graham Barr [EMAIL PROTECTED] writes: On Wed, Aug 09, 2000 at 11:41:42AM -0500, Jonathan Scott Duff wrote: How about this? open '/etc/passwd'; # file OK open '/usr/local/bin/'; # directory (note the trailing

Re: RFC 69 (v2) Standardize input record separator (for

2000-08-10 Thread John Porter
N. Hao Ching [EMAIL PROTECTED]: The default input record separator is not safe for all input files on all platforms. There should also be support for Unicode line separator (U+2028) and paragraph separator (U+2029). I disagree. Perl should provide the greatest ease for the greatest number

Re: RFC 69 (v3) Standardize input record separator (for

2000-08-10 Thread Bryan C . Warnock
On Thu, 10 Aug 2000, Perl6 RFC Librarian wrote: Given this input file: D O S CR LF0044 004F 0053 000D 000A U n i x LF0055 006E 0069 0078 000A M a c CR 004D 0061 0063 000D l i n e LS006C 0069 006E 0065 2028 p a r a PS0070 0061 0072 0061 2029

Re: RFC 14 (v2) Modify open() to support FileObjects and

2000-08-10 Thread Nathan Wiger
How about this? open '/etc/passwd'; # file open '/usr/local/bin/'; # directory (note the trailing '/') open 'ftp://ftp.perl.org/'; # ftp open 'http://www.yahoo.com/'; # http open 'ldap://ldap.bigfoot.com/';# ldap I think

Re: RFC 14 (v2) Modify open() to support FileObjects and

2000-08-10 Thread Nathan Wiger
This is nutso... shall we open-ssh and open-telnet and open-any_protocal_under_the_sun in the core? Well, just because the hooks are there doesn't mean all the member modules have to be in core. The idea would be, as Tom Hughes suggests: That is if the core provides a way for modules to

Re: RFC 69 (v2) Standardize input record separator (for

2000-08-10 Thread Chaim Frenkel
I completely disagree. How do you know that I want 5 lines. Perhaps I want only 3? You are assuming that within my file I will want all possible line endings to be line endings. That is simply not true. You might want to argue for the perl IO subsystem to intuit the line ending (note the

Re: RFC 76 (v1) Builtin: reduce

2000-08-10 Thread Ariel Scolnicov
Perl6 RFC Librarian [EMAIL PROTECTED] (but actually it was Damian Conway) writes: If the original list has no elements, Creduce immediately returns Cundef. I like everything except this part. Reducing an empty list should be an error. Returning undef (or anything else, really) breaks the

Re: RFC 48 (v2) Objects should have builtin stringifying

2000-08-10 Thread Piers Cawley
John Porter [EMAIL PROTECTED] writes: Michael Fowler wrote: I think a stringified reference is worth seeing, moreso than a simple undef, for debugging purposes if nothing else. I personally would like to have the stringification of refs be a symmetric operation, i.e. such a string

Re: AGAINST RFC 48 (v1) Replace localtime() and gmtime() with da

2000-08-10 Thread Bart Lateur
On Wed, 9 Aug 2000 22:57:34 -0500, Jonathan Scott Duff wrote: By "local timezone" do you mean that some sort of inspection happens to determine the local timezone and the date() intrinsically knows about it? What about daylight savings time? I presume the ability to specify an offset from GMT

Re: RFC 73 (v1) All Perl core functions should return ob

2000-08-10 Thread Bart Lateur
On Thu, 10 Aug 2000 13:22:46 +1000 (EST), Damian Conway wrote: The RFC I'm writing specifies that if the subroutine being called has a lazy context specifier on a given argument, that argument is only evaluated when the value of the corresponding element of @_ is fetched, stored, or eval'd. So

Re: Proposal for \v and \V, the small- and large- cut regex opera tors.

2000-08-10 Thread Bart Lateur
On Thu, 10 Aug 2000 04:42:56 -0400, Ilya Zakharevich wrote: Variable interpolation can be handled using Damian's curried expressions. On XRay: Summary for query "curried;Damian": found 0 matches in 0 files. Look up RFC 23 on http://dev.perl.org/rfc/: "Higher order functions". --

Re: Things to remove

2000-08-10 Thread Bart Lateur
On Sat, 5 Aug 2000 09:44:47 -0500, Jonathan Scott Duff wrote: Here in my pre-caffiene morning trance it occurs to me that a few of the "fringe" features of perl should be removed from the langauge. Here's a few things that I would venture to say that none of the "perl5 is my first perl" people

And A Parser In A Pared Tree (was Re: Overloading ||)

2000-08-10 Thread Bryan C . Warnock
On Thu, 10 Aug 2000, David L. Nicol wrote: "Bryan C. Warnock" wrote: This was the ass that I never found the gall to scratch, because I've identified no solutions, and have found only problems. -- Bryan C. Warnock ([EMAIL PROTECTED]) While I appreciate the creative combination of

we might as well give up now: CobolScript(R)

2000-08-10 Thread Jarkko Hietaniemi
We will never conquer the world with Perl 6: CobolScript(R) got there before us. http://www.cobolscript.com/ -- $jhi++; # http://www.iki.fi/jhi/ # There is this special biologist word we use for 'stable'. # It is 'dead'. -- Jack Cohen

Re: RFC 80 (v1) Exception objects and classes for builti

2000-08-10 Thread Bennett Todd
2000-08-10-02:40:41 Perl6 RFC Librarian: RFC 70 proposes that all builtins throw trappable exceptions on error. Not quite. RFC 70 acknowleges that perl's current behavior is preferred by some very focal participants in the language's development, and even if it weren't, that switching all

Portable upper/lower case regexp matches

2000-08-10 Thread Jason Elbaum
As far as I know, there is a basic bit of regexp functionality which Perl should support but doesn't. Perl regexps support the following features, though they're a bit obscure to my tastes... (from perlre:) \l lowercase next char (think vi) \u uppercase next char

Re: RFC 78 (v1) Improved Module Versioning And Searching

2000-08-10 Thread Bennett Todd
2000-08-09-21:00:31 Chaim Frenkel: Making a module local to the using package, might have interesting properties. [...] The only breakage that I see, is having some way of globally setting a variable. For example, turning on debugging for all uses. (FTP::Debug I find quite popular.) Can

Re: RFC 78 (v1) Improved Module Versioning And Searching

2000-08-10 Thread Bennett Todd
2000-08-09-17:33:25 Steve Simmons: If that's the intent, then yes, author name must become part of the package identifier. Rather than change the meaning of "ref $object" unexpectedly, I'd add one or more alternate forms of ref. Off the top of the head, something like ( $version,

Re: Portable upper/lower case regexp matches

2000-08-10 Thread Bart Lateur
On Thu, 10 Aug 2000 17:21:44 +0300, Jason Elbaum wrote: \x match lowercase alpha char \X match uppercase alpha char Thus /\X\x*/ would match all capitalized words, while /\X+/ would match acronyms, and /(\X\x+)+/ would match Java class names. You've got my vote, apart

Re: RFC 78 (v1) Improved Module Versioning And Searching

2000-08-10 Thread Steve Simmons
On Wed, Aug 09, 2000 at 05:53:44PM -0400, Ted Ashton wrote: I'll take that as my cue ;-). Ah, nothing like a man who knows when to pick up his cues. *shudder* This whole business is getting pretty scary . . . [[ discussion of ugly implicatations elided ]] The short answer is that

Re: Portable upper/lower case regexp matches

2000-08-10 Thread Jarkko Hietaniemi
On Thu, Aug 10, 2000 at 05:21:44PM +0300, Jason Elbaum wrote: As far as I know, there is a basic bit of regexp functionality which Perl should support but doesn't. Perl regexps support the following features, though they're a bit obscure to my tastes... (from perlre:) \l

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-10 Thread Peter Scott
At 02:56 AM 8/10/00 -0500, Jonathan Scott Duff wrote: Peter Scott writes: try { # fragile code } catch Exception::IO with { # handle IO exceptions } catch Exception::Socket with { # handle network exceptions } otherwise { # handle

Re: Portable upper/lower case regexp matches

2000-08-10 Thread Johan Vromans
Jason Elbaum [EMAIL PROTECTED] writes: Perl regexps support the following features, though they're a bit obscure to my tastes... (from perlre:) \l lowercase next char (think vi) Actually, this has little to do with regexes, it a string issue. ...but Perl doesn't offer a

Re: RFC 78 (v1) Improved Module Versioning And Searching

2000-08-10 Thread Ted Ashton
Thus it was written in the epistle of Steve Simmons, On Wed, Aug 09, 2000 at 05:53:44PM -0400, Ted Ashton wrote: I'll take that as my cue ;-). Ah, nothing like a man who knows when to pick up his cues. :-) *shudder* This whole business is getting pretty scary . . . [[ discussion

Re: RFC 78 (v1) Improved Module Versioning And Searching

2000-08-10 Thread Steve Simmons
On Thu, Aug 10, 2000 at 11:01:39AM -0400, Bennett Todd wrote: Rather than proliferating the number of keywords eaten with all these *ref varients, this sounds like a useful place for returning an object with a default stringification of the class: . . . Ref RFC 37, RFC 73. I have no

Re: RFC 73 (v1) All Perl core functions should return ob

2000-08-10 Thread Dan Sugalski
At 03:38 PM 8/10/00 +1000, Damian Conway wrote: An object that has many different -ify methods: stringify numify hashify listify objectify (!) Possible, but blech. Why is that more blech? Because it's

Re: RFC 78 (v1) Improved Module Versioning And Searching

2000-08-10 Thread Dan Sugalski
At 10:43 AM 8/10/00 -0400, Bennett Todd wrote: 2000-08-09-21:00:31 Chaim Frenkel: Making a module local to the using package, might have interesting properties. [...] The only breakage that I see, is having some way of globally setting a variable. For example, turning on debugging for all

Re: Portable upper/lower case regexp matches

2000-08-10 Thread Peter Scott
At 10:28 AM 8/10/00 -0500, Jarkko Hietaniemi wrote: On Thu, Aug 10, 2000 at 05:21:44PM +0300, Jason Elbaum wrote: As far as I know, there is a basic bit of regexp functionality which Perl should support but doesn't. Perl regexps support the following features, though they're a bit

Re: Portable upper/lower case regexp matches

2000-08-10 Thread Jarkko Hietaniemi
On Thu, Aug 10, 2000 at 08:55:27AM -0700, Peter Scott wrote: At 10:28 AM 8/10/00 -0500, Jarkko Hietaniemi wrote: On Thu, Aug 10, 2000 at 05:21:44PM +0300, Jason Elbaum wrote: As far as I know, there is a basic bit of regexp functionality which Perl should support but doesn't. Perl

RE: RFC 78 (v1) Improved Module Versioning And Searching

2000-08-10 Thread Brust, Corwin
-Original Message- From: Steve Simmons [mailto:[EMAIL PROTECTED]] For the record, I prefer hashes for that sort of thing too. But perl has traditionally done ordered list returns, and I followed in that vein. Perhaps Damian's want() (RFC 21) can be used to allow allow either

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-10 Thread Graham Barr
On Thu, Aug 10, 2000 at 02:56:59AM -0500, Jonathan Scott Duff wrote: Peter Scott writes: try { # fragile code } catch Exception::IO with { # handle IO exceptions } catch Exception::Socket with { # handle network exceptions } otherwise {

Re: RFC 80 (v1) Exception objects and classes for builti

2000-08-10 Thread Peter Scott
At 09:44 AM 8/10/00 -0400, Bennett Todd wrote: 2000-08-10-02:40:41 Perl6 RFC Librarian: RFC 70 proposes that all builtins throw trappable exceptions on error. Not quite. RFC 70 acknowleges that perl's current behavior is preferred by some very focal participants in the language's

Re: AGAINST RFC 48 (v1) Replace localtime() and gmtime() with da

2000-08-10 Thread Russ Allbery
Jonathan Scott Duff [EMAIL PROTECTED] writes: By "local timezone" do you mean that some sort of inspection happens to determine the local timezone and the date() intrinsically knows about it? What about daylight savings time? This all should be handled by the operating system. If you call

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-10 Thread Graham Barr
On Thu, Aug 10, 2000 at 09:34:43AM -0700, Peter Scott wrote: At 05:11 PM 8/10/00 +0100, Graham Barr wrote: I was more thinking of eval { # fragile code } else { # catch ALL exceptions switch ($@) {

My opposition to RFC20, and an alternative

2000-08-10 Thread Steve Simmons
Overloading an existing operator such that it changes the performance in prior situation is evil, evil, evil. Yes, I know it can have some wins, and I agree they're big ones. But no win is worth having to debug this (admittedly contrived for the example) situation: if ( ( $ares = A() ) (

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-10 Thread John Porter
Graham Barr wrote: The catch syntax is less flexable, if you wanted to catch two different types with the same code you are forced to either * duplicate code * put it in a sub, which is away from the statement. * put a switch statement in the otherwise Could catch lists of types:

Re: RFC 80 (v1) Exception objects and classes for builti

2000-08-10 Thread John Porter
Peter Scott [EMAIL PROTECTED]: try { # fragile code } catch Exception::IO with { # handle IO exceptions } catch Exception::Socket with { # handle network exceptions } otherwise { # handle other exceptions }; I'd like to

Re: RFC 78 (v1) Improved Module Versioning And Searching

2000-08-10 Thread Dan Sugalski
At 05:46 PM 8/10/00 +0100, Graham Barr wrote: On Thu, Aug 10, 2000 at 12:28:05PM -0400, Dan Sugalski wrote: No, it wouldn't, really. We could make "use fatal;" scoped, so that the quit op (or whatever it is) only jumps through all its hoops if the pragma's in effect. If its not, then

Re: RFC 80 (v1) Exception objects and classes for builti

2000-08-10 Thread Bennett Todd
2000-08-10-12:19:49 Peter Scott: Ah, got it. Now we have actually two types of error from builtins: Non-trapped (builtins return 0, undef, 1 :-) , n where n # requests, etc). RFC 70 wants all these to be turned into optional exceptions if Fatal is used. Ultimately, yes, that's my goal ---

Re: RFC 78 (v1) Improved Module Versioning And Searching

2000-08-10 Thread Steve Simmons
Perhaps Damian's want() (RFC 21) can be used to allow allow either return type? Yes indeed. Assuming that's adopted, of course. Sure looks to me like a good idea; I hope it does.

Re: Infinite lists (was Re: RFC 24 (v1) Semi-finite (lazy) lists)

2000-08-10 Thread John Porter
Jeremy Howard wrote: The reason that having (1..) implies having (..-1) is that if you allow (1..), then this is a valid construct: @dot_dot_neg_one = reverse (map {-$_} (1..)); which is identical to (..-1)! No, NOT identical. The same set of numbers, yes, but generated in the

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-10 Thread Bart Lateur
On Thu, 10 Aug 2000 09:34:43 -0700, Peter Scott wrote: Do you propose this solely to conserve keywords, or is there another advantage? I find try { # } catch Exception::Thingy with { # } catch Exception::Whatsit with { # }

Re: RFC 8 (v2) The AUTOLOAD subroutine should be able t

2000-08-10 Thread Larry Wall
[EMAIL PROTECTED] writes: : =head1 IMPLEMENTATION : : This strikes me as being a fairly easy thing to do, but then again : internals ain't my thing, baby. The problem I see here isn't the internals--it's how do you translate Perl 5 to Perl 6? Larry

Re: And A Parser In A Pared Tree (was Re: Overloading ||)

2000-08-10 Thread David L. Nicol
perl parser compiles perl language into perl op-code tree. Larry ("the" Larry) has said that a new parser might parse other languages into perl op-code trees too. If the parts of the language are well organized, a LanguageSwitch (the computer equivalent of a "context switch" in a

Re: AGAINST RFC 48 (v1) Replace localtime() and gmtime() with da

2000-08-10 Thread Jarkko Hietaniemi
On Thu, Aug 10, 2000 at 09:30:05AM -0700, Russ Allbery wrote: Bart Lateur [EMAIL PROTECTED] writes: As for the parameter's format: GMT is easy, you can pass "GMT" (or "+"). For localtime(), you often don't explicitely know the time zone and Daylight savings Time rule, so this looks

Re: Overloading ||

2000-08-10 Thread Damian Conway
We may be able to fake it with source filters and parser abuse, though. I'm intending to write RFCs on revamping source filters, and also on run-time access to the parse tree. Just as soon as I grow those two extra hands so I can run that second keyboard in parallel. Damian

Re: RFC 73 (v1) All Perl core functions should return ob

2000-08-10 Thread Chaim Frenkel
Why push it through a user subroutine. Might as well make it part of the core language. Why add another keyword non_lazy. though it isn't an antonym, eval{} has the right meaning and effect. I can see the utility of having the callee specify the alacrity of the parameter. But this would put

Re: RFC 83 (v1) Make constants look like variables

2000-08-10 Thread Glenn Linderman
Perl6 RFC Librarian wrote: It is proposed that a new syntax for declaring constants be introduced: my constant $PI = 3.1415926; my constant @FIB = (1,1,2,3,5,8,13,21); my constant %ENG_ERRORS = (E_UNDEF='undefined', E_FAILED='failed'); I like this. Implementation wise, it could fit

Re: RFC: Higher resolution time values

2000-08-10 Thread Nick Ing-Simmons
Dan Sugalski [EMAIL PROTECTED] writes: Why - the 1/10 of second is not exact anyway (unless you happen to have an atomic clock in an appropriate physical enviroment attached to your machine). A double's mantissa is better than your typical oscillator. While it may not be correct, at least it's

Re: RFC 80 (v1) Exception objects and classes for builti

2000-08-10 Thread Chaim Frenkel
(I'm not quite in favour. But assuming this flys...) Why not use Damien's switch syntax. Much more powerful and the flow is better controlled. And why add another keyword. Just extend eval{} to accept two blocks. eval { } catch { } finally { }

Re: RFC 83 (v1) Make constants look like variables

2000-08-10 Thread Simply Hao
my %STRUCT : constant = ( Name =str 'Jane', Isn't this ambiguous, considering that the = operator quotes the left side? -Hao

Re: RFC 8 (v2) The AUTOLOAD subroutine should be able t

2000-08-10 Thread Damian Conway
Instead of calling the right thing or actually doing the right thing, AUTOLOAD subroutines should return a coderef which will be run as if it were the method called. If an AUTOLOAD subroutine does not wish to cope with a method call, it should return undef. Perl would then walk

Re: RFC 73 (v1) All Perl core functions should return ob

2000-08-10 Thread Damian Conway
Why push it through a user subroutine. Might as well make it part of the core language. Why exacerbate the core, when I one-line user sub can do it? Why add another keyword non_lazy. though it isn't an antonym, eval{} has the right meaning and effect. No, "non-lazy" was just

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-10 Thread Chaim Frenkel
Nice. The continue clause, I assume would re-raise an uncaught exception. But, a big but. How does the 'else' clause indicate that the exception was handled? A couple of possiblities 1. Undef $@. But that's a bit of extra work in each leg. 2. switch is 'slightly' special in an eval/else

Re: RFC 76 (v1) Builtin: reduce

2000-08-10 Thread Damian Conway
I don't see it. 1 == f((reduce +, undef), 1) == reduce +, undef, 1 undef isn't an empty list, it's a one element list. Consider the other "common" reduction: sub f { $_[0] * $_[1] } Now: f((reduce \f, ()), 1) == 0 # f(undef,1) - f(0,1) - 0 But

Re: RFC 76 (v1) Builtin: reduce

2000-08-10 Thread Ariel Scolnicov
Chaim Frenkel [EMAIL PROTECTED] writes: "AS" == Ariel Scolnicov [EMAIL PROTECTED] writes: If the original list has no elements, Creduce immediately returns Cundef. AS I like everything except this part. Reducing an empty list should be AS an error. AS Returning undef (or anything

Re: RFC 78 (v1) Improved Module Versioning And Searching

2000-08-10 Thread Chaim Frenkel
I'd put it into Perl::Option{__Package__} There was some talk about making Perl:: special. So that might be the one and only truely global space. Hmm, that wouldn't work with multiple versions without cooperation. Alternatively, we could treat a set

Re: RFC 76 (v1) Builtin: reduce

2000-08-10 Thread Damian Conway
By writing @sum = reduce __+__ 0, @numbers you deal elegantly with both cases. NOTE: I find this trick very elegant. I wish it were my trick, instead of Damian's... Damian wishes it were Damian's, but is sure it's at least a few hundred years old :-) Damian

Re: RFC 78 (v1) Improved Module Versioning And Searching

2000-08-10 Thread Graham Barr
On Thu, Aug 10, 2000 at 10:43:02AM -0400, Bennett Todd wrote: If the only real problem that can be found with making module use package-local is in these few option-flag type variables, perhaps they could be handled differently. E.g. suppose normal package variables end up being local to the

Re: RFC 78 (v1) Improved Module Versioning And Searching

2000-08-10 Thread Bennett Todd
2000-08-10-17:36:41 Graham Barr: And the difference is ? $ perl -e 'warn \$main::fred::x," ",\$fred::x' SCALAR(0x80dc254) SCALAR(0x80dc254) at -e line 1. Today there's no difference. If the proposal under discussion were to pass, and packages' namespaces were to become local to the

RFC 84 (v1) Replace = (stringifying comma) with =

2000-08-10 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Replace = (stringifying comma) with = (pair constructor) =head1 VERSION Maintainer: Damian Conway [EMAIL PROTECTED] Date: 10 August 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 84

RFC 85 (v1) All perl generated errors should have a

2000-08-10 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE All perl generated errors should have a unique identifier =head1 VERSION Maintainer: Chaim Frenkel [EMAIL PROTECTED] Date: 9 Aug 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 85 All

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-10 Thread Chaim Frenkel
"GB" == Graham Barr [EMAIL PROTECTED] writes: GB On Thu, Aug 10, 2000 at 04:34:50PM -0400, Chaim Frenkel wrote: Nice. The continue clause, I assume would re-raise an uncaught exception. But, a big but. How does the 'else' clause indicate that the exception was handled? GB By not

Re: RFC 76 (v1) Builtin: reduce

2000-08-10 Thread Damian Conway
Couldn't reduce return a list just through concatenating its elements? For instance: @a = (1,3,2,4,3,6,4,8); @sum = reduce( (^total, ^x+^y ), @a ); # (4,6,9,12) Currying placeholders are scalars, so you want: @sum = @{reduce (@^total, ^x+^y ), [], @a }; More and

Re: RFC 73 (v1) All Perl core functions should return ob

2000-08-10 Thread Chaim Frenkel
"DC" == Damian Conway [EMAIL PROTECTED] writes: $fooA-foo $fooB-foo What is a poor perl parser to do? DC Ignore the prototype unless $fooA and $fooB are typed lexicals. DC I.e. act just like it does now. Hmm, would it be too nasty for perl to recognize that all foo's have the

Re: RFC 84 (v1) Replace = (stringifying comma) with =

2000-08-10 Thread Brad Hughes
Perl6 RFC Librarian wrote: [...] This RFC proposes the introduction of a new data type -- the Ipair [...] I hereby propose that all current Perl 6 Project Plan deadlines be extended 3 months so that Damian has more time to come up with gems like this. I have no idea if it ultimately makes

Re: RFC 76 (v1) Builtin: reduce

2000-08-10 Thread Jeremy Howard
Chaim Frenkel wrote: Okay, then for reduce avg $identity, @list What should $identity be? What's wrong with: $average = reduce (^last+^this, @^list) / scalar @^list; print $average-([1,3,5]); # Prints '3' You don't need to explicitly add a '0' to the front of the summed list.

Re: RFC 83 (v1) Make constants look like variables

2000-08-10 Thread James Mastros
nitpickyA semantic definition of "constant" would be nice./nitpciky I'd like to propose the following definition: A constant value cannot be assigned to, deleted, or used as the argument to a mutating function/operator. Doing any of these would be a catchable error. (However, it can be deleted

Re: AGAINST RFC 48 (v1) Replace localtime() and gmtime() with da

2000-08-10 Thread Bart Lateur
On Thu, 10 Aug 2000 14:39:39 -0500, Jarkko Hietaniemi wrote: people in Newfoundland are going to expect to be able to pass in -0230 and have that work, and that's interestingly hard. What's so hard? Subtracting 2 hours and 30 minutes from the official referential time (GMT)? Or the Daylight

Re: AGAINST RFC 48 (v1) Replace localtime() and gmtime() with da

2000-08-10 Thread Jarkko Hietaniemi
On Fri, Aug 11, 2000 at 02:09:43AM +0200, Bart Lateur wrote: On Thu, 10 Aug 2000 14:39:39 -0500, Jarkko Hietaniemi wrote: Did not. people in Newfoundland are going to expect to be able to pass in -0230 and have that work, and that's interestingly hard. What's so hard? Subtracting 2

Re: RFC 84 (v1) Replace = (stringifying comma) with =

2000-08-10 Thread Jon Ericson
Damian Conway wrote: When a pair reference is assigned (in)to an array, it remains a single scalar (referential) value. So: @array = ( a=1, b=2, 'c', 3 ); assigns four elements (not six) to @array. The proposed Ckey and Cvalue built-ins (or the

Re: RFC 84 (v1) Replace = (stringifying comma) with =

2000-08-10 Thread Chaim Frenkel
Shades of LISP, batman. tongue in cheek I can see it now, the '=' operator will be called cons-ing. And the new keword for accessing a pair will be CAR and CDR. /tongue in cheek Are the two values of a pair restricted in anyway? All your examples were scalar. What about a plural whatzit or a

Re: RFC 84 (v1) Replace = (stringifying comma) with =

2000-08-10 Thread Damian Conway
Are the two values of a pair restricted in anyway? All your examples were scalar. Yes. The two components must be scalars. The key is stringified iff it's a bareword. Otherwise no restrictions. What about a plural whatzit or a reference to a plural whatzit? References are

Re: RFC 83 (v1) Make constants look like variables

2000-08-10 Thread Bryan C . Warnock
On Thu, 10 Aug 2000, Perl6 RFC Librarian wrote: This method of creating constants has three serious drawbacks: They're also quite heavy, although I think that CONSTSUB was to take care of that. What I never understood, although I'm sure there's a very simple reason, is why it wasn't simply

Re: RFC 84 (v1) Replace = (stringifying comma) with =

2000-08-10 Thread Damian Conway
I find nothing in the documentation that suggests that = is anything other than a plain comma operator, yet you call it a "first-argument-stringifying comma operator". In fact, the documentation explicitly claims "=" is a synonym of "," (see perldata). The Perl documentation

Re: AGAINST RFC 48 (v1) Replace localtime() and gmtime() with da

2000-08-10 Thread Peter Scott
At 02:39 PM 8/10/00 -0500, Jarkko Hietaniemi wrote: There are quarter-hour time zones... And then there's Damian, who lives in a non-linear time zone... -- Peter Scott Pacific Systems Design Technologies

Re: RFC 76 (v1) Builtin: reduce

2000-08-10 Thread Glenn Linderman
Damian Conway wrote: Currying placeholders are scalars Is that a general truth? It wasn't obvious from RFC 23... If you rev it, perhaps you could make that clearer. Looking back, the defining example did give a list of (;) in the prototype. I suppose it would be pretty complex to infer

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-10 Thread Peter Scott
At 07:53 PM 8/10/00 +0200, Bart Lateur wrote: p.s. I've always disliked the word "throwing" for errors, just to be a complement to "catch". An error to me is something like a trapdoor, where you unexpectedly fall through. The only difference is the direction of travel :-) In both cases you

Re: RFC 76 (v1) Builtin: reduce

2000-08-10 Thread Damian Conway
Currying placeholders are scalars Is that a general truth? Yes. It proceeds from the fact that $_[0], $_[1], ect are scalars. It wasn't obvious from RFC 23... If you rev it, perhaps you could make that clearer. Will do. Looking back, the defining example did

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-10 Thread Peter Scott
At 10:33 PM 8/10/00 +0100, Graham Barr wrote: On Thu, Aug 10, 2000 at 04:34:50PM -0400, Chaim Frenkel wrote: Nice. The continue clause, I assume would re-raise an uncaught exception. But, a big but. How does the 'else' clause indicate that the exception was handled? By not rethrowing

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-10 Thread Jeremy Howard
Peter Scott wrote: So I'm thinking: eval { ... } catch Exception::Foo { ... } catch Exception::Bar, Exception::Baz { ... } catch { ... # everything else, but if this block is absent, uncaught exceptions # head up the call stack } continue { ... # Executed after

Re: RFC 84 (v1) Replace = (stringifying comma) with =

2000-08-10 Thread Jeremy Howard
Glenn Linderman wrote: Thanks for the clarification in your intentions, but isn't _any_ bareword is converted to a string, unless it is in some particular context where a bareword is meaningful (such as filehandle)? So that seems to be nothing unique to =. You could just as well say

Re: RFC 85 (v1) All perl generated errors should have a

2000-08-10 Thread Tony Olekshy
Chaim Frenkel wrote: [stuff about exception numbering] Hmm, I thought I saw another exception RFC pass by. Yup, RFC 88, Tony Olekshy [EMAIL PROTECTED] Could you two folks get together and hash this out. RFC 88 goes to some trouble to seperate exception handling from exception objects. It

Re: AGAINST RFC 48 (v1) Replace localtime() and gmtime() with da

2000-08-10 Thread Russ Allbery
Bart Lateur [EMAIL PROTECTED] writes: What's so hard? Subtracting 2 hours and 30 minutes from the official referential time (GMT)? Or the Daylight Savings Time rules? It's not a problem of implementation. It's a problem of semantics due to the way Perl parses the language. Suppose you call:

Re: RFC 89 (v1) Controllable Data Typing

2000-08-10 Thread Dan Sugalski
On Thu, 10 Aug 2000, Decklin Foster wrote: Syloke Soong [EMAIL PROTECTED] writes: my $varname type; The syntax my $varname : constant; # pun not intended :) Was brought up earlier (but probably not before this RFC was written). Perhaps something similar could be used for

Data type and attribute syntax (was Re: RFC 89 (v1) Controllable Data Typing)

2000-08-10 Thread Jeremy Howard
Dan Sugalski wrote: The syntax is actually: my type $varname; This is in perl 5.6.0. Modifiers go as attributes after the colon: my Dog $spot : constant = new Dog; Yes. But what about types and attributes within complex types? - Constant refs vs refs to constants? - Types of hash

days behind...

2000-08-10 Thread skud
I'm several days behind on -language due to dodgy home dialups and the noise and insanity I suffer at the office. I'm making a valiant attempt to catch up on 700 posts right now, but would appreciate it if people could email me privately if there's anything they particularly want to bring to my

Re: Proposal for \v and \V, the small- and large- cut regex opera tors.

2000-08-10 Thread Ilya Zakharevich
On Thu, Aug 10, 2000 at 11:12:28AM +0200, Johan Vromans wrote: Of course, we need group names (trivial), and group temporaries. I needed the latter to define a generic pattern to match quoted strings: you need to store the starting quote somewhere to find the ending quote, but I didn't want

Re: Proposal for \v and \V, the small- and large- cut regex opera tors.

2000-08-10 Thread Johan Vromans
On Thu, Aug 10, 2000 at 07:04:50AM -0400, Ilya Zakharevich wrote: $quoted = qr/(['"]).*?\2/; @a = $str =~ /($quoted)/gp; Here //p is the "postponed" flag. Put (?p{$quoted}) instead of $quoted to get this semantic now (or some other char). $quoted = qr/(['"]).*?\1/; @a = $str =~

RFC 82 (v1) Make operators behave consistently in a

2000-08-10 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Make operators behave consistently in a list context =head1 VERSION Maintainer: Jeremy Howard [EMAIL PROTECTED] Date: 10 August 2000 Version: 1.00 Mailing List: [EMAIL PROTECTED] Number: 82

RFC 83 (v1) Make constants look like variables

2000-08-10 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Make constants look like variables =head1 VERSION Maintainer: Jeremy Howard [EMAIL PROTECTED] Date: 10 August 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 83 =head1 ABSTRACT This RFC

RFC 8 (v2) The AUTOLOAD subroutine should be able t

2000-08-10 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE The AUTOLOAD subroutine should be able to decline a request =head1 VERSION Maintainer: Leon Brocard [EMAIL PROTECTED] Date: 10 Aug 2000 Version: 2 Mailing List: [EMAIL PROTECTED] Number: 8

Re: RFC 8 (v2) The AUTOLOAD subroutine should be able t

2000-08-10 Thread Graham Barr
On Thu, Aug 10, 2000 at 04:47:33PM -, Perl6 RFC Librarian wrote: cope with a method call, it should return undef. Perl would then walk the OO hierarchy and find the next AUTOLOAD to call, eventually failing with an error if no AUTOLOAD method is found which will accept the call. Why not

RFC 81 (v1) Lazily evaluated list generation functio

2000-08-10 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Lazily evaluated list generation functions =head1 VERSION Maintainer: Jeremy Howard [EMAIL PROTECTED] Date: 10 August 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 81 =head1 ABSTRACT

Re: RFC 8 (v2) The AUTOLOAD subroutine should be able t

2000-08-10 Thread Uri Guttman
"PRL" == Perl6 RFC Librarian [EMAIL PROTECTED] writes: PRL Instead of calling the right thing or actually doing the right thing, PRL AUTOLOAD subroutines should return a coderef which will be run as if PRL it were the method called. If an AUTOLOAD subroutine does not wish to PRL cope

Re: Proposal for \v and \V, the small- and large- cut regex opera tors.

2000-08-10 Thread Johan Vromans
On Thu, Aug 10, 2000 at 04:42:56AM -0400, Ilya Zakharevich wrote: These are just user-defined ops. You should be able to overwrite the normal ops, as in: sub match_all { use re_ops 'overload_usual_ops'; "(" . group(1, [ 'a' .. 'z' ] * [3,5] ) . ")" } Will this go? I think

Re: Proposal for \v and \V, the small- and large- cut regex opera tors.

2000-08-10 Thread Johan Vromans
On Wed, Aug 09, 2000 at 04:20:32PM -0400, Ilya Zakharevich wrote: It is not clear though how to design concise-but-no-line-noise notation for \w etc. But qr/ \( ( [a-z]{3,5} ) \) / may become "(" (.) group(1, [[ 'a' .. 'z' ]] (*) [3,5] ) (.) ")" here (.) is the ASCII substitution for

  1   2   >