Re: Proposed RFC for matrix indexing and slicing

2000-09-01 Thread David L. Nicol
Buddha Buck wrote: Boy, there are a lot of people on that CC: list... Anyone want off this ride? How would you recommend the RFC breakdown? Use ";" for matrix index separator Use named iterators for matrix indices anything else? Everyone else is way past brainstorming but

RFC 191 (v1) smart container slicing

2000-09-01 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE smart container slicing =head1 VERSION Maintainer: David Nicol [EMAIL PROTECTED] Date: 1 September 2000 Mailing List: [EMAIL PROTECTED] Version: 1 Number: 191 Status: Developing =head1

Re: The distinction between do BLOCK while COND and EXPR while COND should go

2000-09-01 Thread Chaim Frenkel
"TC" == Tom Christiansen [EMAIL PROTECTED] writes: TC Well, that depends. Often you must delay till run-time. When Perl TC simply sees something like: TC sub fn { return @blah } TC it can't know whether you'll use that as: TC $x = fn(); TC or TC @x = fn(); TC or TC fn(); I

Re: RFC 181 (v1) Formats out of core / New format syntax

2000-09-01 Thread Nathan Wiger
Have you also looked at Damian's Text::Autoformat, which has a renewed format implementation that looks *very* good a candidate for replacing perl 4/5's format. Yes, I have. It's actually very powerful. I've actually been meaning to talk to Damian about this, because at one time he had

Re: RFC 171 (v2) my Dog $spot should call a constructor implicitly

2000-09-01 Thread Michael Fowler
On Fri, Sep 01, 2000 at 10:58:36AM -0800, Michael Fowler wrote: my $spot isa(Dog); This should be my $spot : isa(Dog); Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com --

Re: RFC 171 (v2) my Dog $spot should call a constructor implicitly

2000-09-01 Thread David E. Wheeler
Michael Fowler wrote: On Fri, Sep 01, 2000 at 11:41:47AM -0700, David E. Wheeler wrote: Michael Fowler wrote: my Dog $spot; # $spot is now a blessed Dog object $spot-name("Fido");# $spot-{'name'} eq "Fido" print ref $spot;# yes, "Dog"

Re: RFC 171 (v2) my Dog $spot should call a constructor implicitly

2000-09-01 Thread Michael Fowler
On Fri, Sep 01, 2000 at 12:35:24PM -0700, David E. Wheeler wrote: Well then, that makes this example rather wasteful, doesn't it? It wasn't an example of how my Dog $spot should be used. I was explaining to Nate what his code was doing. my Dog $spot; if ($input eq 'Collie') {

Re: RFC 190 (v1) Objects : NEXT pseudoclass for method redispatch

2000-09-01 Thread Michael G Schwern
On Fri, Sep 01, 2000 at 08:59:10PM -, Perl6 RFC Librarian wrote: This RFC proposes a new pseudoclass named CNEXT. This pseudoclass would provide a way of correctly redispatching a method or an autoloaded method. Yay! I have nothing constructive to say. (Yay!) -- Michael G Schwern

Re: RFC 189 (v1) Objects : Hierarchical calls to initializers and destructors

2000-09-01 Thread John Siracusa
On 9/1/00 5:44 PM, Nathan Wiger wrote: sub SETUP { my ($self, @ctor_data) = @_; # initialization of object referred to by $self occurs here } Hmmm. I'm not sure if I like this. I like the *idea* a lot, but I must say that I think I quite like RFC 171's approach better. I haven't

Re: RFC 189 (v1) Objects : Hierarchical calls to initializers anddestructors

2000-09-01 Thread Nathan Wiger
I haven't commented on RFC 171 because I assumed it would be shot down quickly by the Major Contibutors(tm), but let me just say now that I'm firmly in this camp: Funny, I don't see much difference between RFC 171 and this RFC: 171: constructor called on object creation 189:

Re: RFC 189 (v1) Objects : Hierarchical calls to initializers anddestructors

2000-09-01 Thread Damian Conway
What happens on reblessing? An excellent question, and one that has been exercising my mind for some time now. I have come to the conclusion that a reblessing must either: * invoke the old class's DESTROY(s) and then invoke the new class's SETUP(s), or * invoke

Re: RFC 189 (v1) Objects : Hierarchical calls to initializers and destructors

2000-09-01 Thread John Tobey
On Fri, Sep 01, 2000 at 08:59:10PM -, Perl6 RFC Librarian wrote: =head1 ABSTRACT This RFC proposes a new special method called CSETUP that is invoked automagically whenever an object is created. Furthermore, it proposes that both CSETUP and CDESTROY methods should be invoked

Re: RFC 188 (v1) Objects : Private keys and methods

2000-09-01 Thread Kenneth Lee
Once a hash has been Cprivate-ized, the only way to extend its set of entries is via another call to Cprivate: sub new { my ($class, %self) = @_; bless private \%self, $class; private $self{seed} = rand; # okay

Re: perl6-language-regex summary for 20000831

2000-09-01 Thread Peter Heslin
On Thu, Aug 31, 2000 at 12:34:05PM -0400, Mark-Jason Dominus wrote: perl6-language-regex Summary report 2831 RFC 72: The regexp engine should go backward as well as forward. (Peter Heslin) This topic did not attract much discussion until the very end of the week. I sent

Re: RFC 184 (v1) Perl should support an interactive mode.

2000-09-01 Thread Ariel Scolnicov
"Michael Maraist" [EMAIL PROTECTED] writes: [...] First, the current debugger allows multi-lines if you use "\" at the end of the line ( a la C ). Thanks. TomC also pointed this out. I still don't like it, though. (But it will be added to the next revision). Take a look at what sh will do

Re: RFC 175 (v1) Add Clist keyword to force list context (like Cscalar)

2000-09-01 Thread Bart Lateur
On Fri, 1 Sep 2000 13:25:07 +1100 (EST), Damian Conway wrote: More than anything I think the inability to write Csub list DWIMishly argues that we need it built-in. But we also need a *very* careful design of the semantics. Well, except that it isn't clear which DWIM you want. Does DWIM mean,

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Gael Pegliasco
First is the choice of arrays verses hashes as the choice for set storage. Arrays are obviously easier to construct, but hashes are both faster implementations, and easier to determine membership. Well in fact I'm interested by such functions in order to manipulate lists of scalars (1,

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Jeremy Howard
Gael Pegliasco wrote: First is the choice of arrays verses hashes as the choice for set storage. Arrays are obviously easier to construct, but hashes are both faster implementations, and easier to determine membership. Well in fact I'm interested by such functions in order to manipulate

Re: RFC 184 (v1) Perl should support an interactive mode.

2000-09-01 Thread Markus Peter
--On 31.08.2000 23:54 Uhr + Perl6 RFC Librarian wrote: This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Perl should support an interactive mode. Most of what you want is already implemented in the perl shell available at

Re: Proposal: chop() dropped

2000-09-01 Thread Tom Christiansen
I already proposed that. Benchmarks show that reading a file with explicit chomp() is easily 20% slower than reading the same file with implicit chomp(), through the -l command line switch. And what, pray tell, do you do about the small matter of wanting to read some files without implicit

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Eric Roode
Gael Pegliasco wrote: Yes, this is true, but the natural syntax, for me, to manipulate sets, is the one of arrays. It is not natural to write : %my_fruit_set = ( 1 = 'orange', 2 = 'lemon' ); but it is natural to write : @my_fruit_set = ( 'orange', 'lemon' ); I don't want to have to deal

Re: RFC 175 (v1) Add Clist keyword to force list context (like Cscalar)

2000-09-01 Thread John Porter
Bart Lateur wrote: $\ = "\n"; print $a = () = qw(a b c); -- 3 All those who expected that the list would be evaluated in array (not list!) context, raise your hands. this illustrates why the whole subject is, or can be, so confusing. That qw() list was NOT evaluated in

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Buddha Buck
At 03:40 PM 9/1/00 +0200, Gael Pegliasco wrote: Arrays are ordered. Hashes are not. Neither are sets. Arrays can have repetitions. Hashes can not. Neither can sets. etc. --tom Yes, this is true, but the natural syntax, for me, to manipulate sets,

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Tom Christiansen
If it were possible to assign to the keys of a hash, we'd be a lot closer to our ideal: keys(%intersection) = map { exists $set1{$_} ? ( $_ = 1 ) : () } keysSNIP but this is not currently legal perl. keys %HASH = LIST; is really @HASH{ LIST } = (); --tom

Re: RFC 175 (v1) Add Clist keyword to force list context (like Cscalar)

2000-09-01 Thread Bart Lateur
On Fri, 01 Sep 2000 07:30:54 -0600, Tom Christiansen wrote: % man perldata List assignment in a scalar context returns the number of elements produced by the expression on the right side of the assignment: $x = (($foo,$bar) = (3,2,1)); # set $x to 3,

Re: the C JIT

2000-09-01 Thread David L. Nicol
Nathan Wiger wrote: "David L. Nicol" wrote: my dog $spot; to dog spot; If we only allow this where enough info is available to allocate dog-sized pieces of memory directly, Perl can blaze through the code that deals with dogs. I don't see what barewords gain

Re: the C JIT

2000-09-01 Thread David L. Nicol
Sam Tregar wrote: On Thu, 31 Aug 2000, David L. Nicol wrote: We're talking about making a faster Perl. C's syntax requires enough clarity to compile to something quick. it is a very short hop from my dog $spot; to dog spot; What about the second version would

Re: proto-RFC: keys(HASH) as lvalue (was Re: RFC 179 )

2000-09-01 Thread Bart Lateur
On Fri, 1 Sep 2000 10:23:27 -0400, John Porter wrote: keys %HASH = LIST; is really @HASH{ LIST } = (); Sure. Would you have any great objection to adding the alternative syntax? I have some doubts. See perlfunc -f keys, from which I quote: If you say keys %hash =

Re: proto-RFC: keys(HASH) as lvalue (was Re: RFC 179 )

2000-09-01 Thread John Porter
Bart Lateur wrote: If you say keys %hash = 200; then `%hash' will have at least 200 buckets allocated for it--256 of them, in fact, since it rounds up to the next power of two. This should go away, of course. -- John Porter

Re: the C JIT

2000-09-01 Thread Nathan Wiger
"David L. Nicol" wrote: They gain us compliance with the whims of the people who like barewords for variable names. You may or may not find that to be a good thing. It's not just that I don't think dropping $'s is a good idea, but that is the general consensus as well. I can't see dog

Re: RFC 175 (v1) Add Clist keyword to force list context (like Cscalar)

2000-09-01 Thread Steve Fink
for reality here. That should be written more like: 1 while FH; $burp = $.; or even: for ($burp = 0; my $line = FH; $burp++) {} I'd go for my $burp = 0; $burp++ while FH; This proposal should be dropped. I read your message and agree. Not that I liked the

Re: RFC 175 (v1) Add Clist keyword to force list context (like Cscalar)

2000-09-01 Thread Graham Barr
On Fri, Sep 01, 2000 at 11:23:16AM -0700, Steve Fink wrote: I read your message and agree. Not that I liked the idea that much even before considering the ramifications. But do you agree that even seasoned perlers have trouble anticipating how a list/array is going to be converted to a

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Tom Christiansen
Can't you do this with with an environment setting? Shell people seem to think this a normal notion, but it's caused horrible security flaws in the past. And I couldn't imagine it of a C compiler, so I don't know why you would do this one. --tom

Re: RFC 175 (v1) Add Clist keyword to force list context (like Cscalar)

2000-09-01 Thread Nathan Wiger
Tom Christiansen wrote: First off, thanks for taking the time to present such a thorough document. Well-reasoned arguments is exactly what the Perl 6 project needs, IMO. I read this early last night, and have been postulating on it ever since. In the process of trying what feels like 100's of

Re: RFC 56 (v3) Optional 2nd argument to Cpop() and Cshift()

2000-09-01 Thread Michael G Schwern
On Fri, Sep 01, 2000 at 08:38:18PM -, Perl6 RFC Librarian wrote: =head1 IMPLEMENTATION I don't know the gory details other than it should be possible. Thinking in perl5 terms, its going to require a modification to pp_pop and pp_shift. The simplest way to do it would be for them to

Re: RFC 56 (v3) Optional 2nd argument to Cpop() and Cshift()

2000-09-01 Thread Jeremy Howard
Michael G Schwern wrote: If pop @array, -1 == shift @array, 1 and shift @array, -1 == pop @array, 1, and if both Ways To Do It are almost exactly the same, then there's no value to allowing negative numbers. In most cases I'd expect passing a negative number to be a mistake on the

Re: RFC 59 (v2) Proposal to utilize C* as the prefix to magic subroutines

2000-09-01 Thread Nathan Wiger
Let's take an example... sub *DESTROY { # Perl-special } How would you call this manually, as you sometimes want to do? *DESTROY $self; $self-*DESTROY; So you'd have to redo Perl's parsing of *? Would this override typeglobs? How would the precedence work?

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Tom Christiansen
Forcing -w on Makes one-liners annoying. Makes running existing programs annoying. We have PERL5OPT You forgot the con that we've supposed to be "use

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Uri Guttman
"MGS" == Michael G Schwern [EMAIL PROTECTED] writes: MGS Here's a little pros/cons list running through my head right now... MGS pro con MGS Customize @INC We have PERL5LIB MGS Forcing -T on

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Tom Christiansen
i think an environment var might be a good way. if it is set, it is the file(s) to preload before running your code. You've got PERL5OPT. Heck, I bet you could do a cleverness with .perldb, too. :-) --tom

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Michael G Schwern
On Fri, Sep 01, 2000 at 07:16:13PM -0400, Uri Guttman wrote: "MGS" == Michael G Schwern [EMAIL PROTECTED] writes: MGS Forcing -T on Will break most existing programs. MGS Makes one-liners annoying. who runs one liners

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Uri Guttman
"TC" == Tom Christiansen [EMAIL PROTECTED] writes: i think an environment var might be a good way. if it is set, it is the file(s) to preload before running your code. TC You've got PERL5OPT. but that is the user's to set. PERL_PRELOAD allows the admin to globally set (in the system

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Tom Christiansen
but that is the user's to set. PERL_PRELOAD is there for the user to unset. allows the admin to globally set (in the system shell rc file) the rc files that perl will load. And what sorts of things might the admin care to globally set? --tom

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Michael G Schwern
On Fri, Sep 01, 2000 at 07:42:32PM -0400, Uri Guttman wrote: "TC" == Tom Christiansen [EMAIL PROTECTED] writes: i think an environment var might be a good way. if it is set, it is the file(s) to preload before running your code. TC You've got PERL5OPT. but that is the user's to

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Uri Guttman
"MGS" == Michael G Schwern [EMAIL PROTECTED] writes: who runs one liners with -T? MGS That's the point. .perlrc would effect all perl, including MGS one-liners. What's good for big programs is not good for small. what about making the rc files load only if there is code not in a

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Tom Christiansen
On Fri, Sep 01, 2000 at 07:42:32PM -0400, Uri Guttman wrote: "TC" == Tom Christiansen [EMAIL PROTECTED] writes: i think an environment var might be a good way. if it is set, it is the file(s) to preload before running your code. TC You've got PERL5OPT. but that is the user's to

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Tom Christiansen
it can be used for system specific @INC paths without recompiling perl That's what PERL5LIB is for. enforcing strict/-w/-T on all scripts, etc. How are you going to enable -T from this file you're going to eval? How are you going to enable strict in an unrelated lexical scope? Why are you

Re: RFC 56 (v3) Optional 2nd argument to Cpop() and Cshift()

2000-09-01 Thread Michael G Schwern
On Sat, Sep 02, 2000 at 09:42:09AM +1100, Jeremy Howard wrote: I'd like to see negative numbers work. Otherwise the programmer would have to explicitly check whether an index into a string was positive or negative, take the absolute value, and use pop() or shift() as appropriate. This has to

Change ($one, $two)= behavior for optimization? (was Re: RFC 175 (v1) Add Clist keyword to force list context (like Cscalar))

2000-09-01 Thread Nathan Wiger
Tom Christiansen wrote: % man perlfunc ... When assigning to a list, if LIMIT is omitted, Perl supplies a LIMIT one larger than the number of variables in the list, to avoid unnecessary work. As usual I picked a bad example. And I did read the perlfunc manpage, but

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Michael G Schwern
On Fri, Sep 01, 2000 at 05:49:05PM -0600, Tom Christiansen wrote: On Fri, Sep 01, 2000 at 07:42:32PM -0400, Uri Guttman wrote: Like any other environment variable which the admin wants to be everywhere, put it in /etc/profile. A well configured system will handle it from there. Not all

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Michael G Schwern
On Fri, Sep 01, 2000 at 05:50:52PM -0600, Tom Christiansen wrote: Why are you using -w instead of use warnings, and can you just imagine the howling? This would surely kill your system. Okay, okay, okay. You're the nth person that brought that up. Yes, "use warnings" makes more sense than

RE: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Al
I entreat you to explain to me *anything* that you'd want to tweak with this that you already can't do right now. When I need to move Perl files from a default location to a new one. For example messing with @INC (and its like). THis could be used for example on a machine that has both

Re: Change ($one, $two)= behavior for optimization? (was Re: RFC 175 (v1) Add Clist keyword to force list context (like Cscalar))

2000-09-01 Thread Tom Christiansen
Let me shift gears and instead ask whether anyone thinks this: $y = ($first, $second) = grep /$pat/, @data; Returning "5" has any value? If you're going to do this, it seems like you'd want the number that were really returned (since scalar grep will give you the total number found

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Tom Christiansen
I entreat you to explain to me *anything* that you'd want to tweak with this that you already can't do right now. When I need to move Perl files from a default location to a new one. For example messing with @INC (and its like). THis could be used for example on a machine that has both

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Tom Christiansen
What I am thinking of is a file that, if present and sane (i.e. read-only root), would be involked by the interpreter just before the users script was parsed. Looking at your example of things in the config file, well some of those are the things I would like to be able to get at in the new

Quantum computing

2000-09-01 Thread Steve Fink
Can't quite run perl yet. http://www.tomshardware.com/cpu/00q3/000901/index.html

RFC 59 (v2) Proposal to utilize C* as the prefix to magic subroutines

2000-09-01 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Proposal to utilize C* as the prefix to magic subroutines =head1 VERSION Maintainer: Jonathan Scott Duff [EMAIL PROTECTED] Date: 7 Aug 2000 Last-Modified: 1 Sep 2000 Mailing List: [EMAIL PROTECTED]

RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Perl resource configuration =head1 VERSION Maintainer: Jonathan Scott Duff [EMAIL PROTECTED] Date: 16 Aug 2000 Last-Modified: 1 Sep 2000 Mailing List: [EMAIL PROTECTED] Version: 2 Number: 114

RFC 56 (v3) Optional 2nd argument to Cpop() and Cshift()

2000-09-01 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Optional 2nd argument to Cpop() and Cshift() =head1 VERSION Maintainer: Jonathan Scott Duff [EMAIL PROTECTED] Date: 7 Aug 2000 Last-Modified: 1 Sep 2000 Version: 3 Mailing List: [EMAIL PROTECTED]