Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Ariel Scolnicov
Uri Guttman <[EMAIL PROTECTED]> writes: > > "TC" == Tom Christiansen <[EMAIL PROTECTED]> writes: > > >> many systems allow for a global/local startup file for various > >> reasons. i see a potential use of this in perl but i don't see the > >> specific use yet. build it they will use i

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Uri Guttman
> "TC" == Tom Christiansen <[EMAIL PROTECTED]> writes: >> many systems allow for a global/local startup file for various >> reasons. i see a potential use of this in perl but i don't see the >> specific use yet. build it they will use it. TC> But Perl is not an interactive shell! Ca

Quantum computing

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

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 ve

RE: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Al
>That's a fine answer, but a completely different concern. Sorry, you are correct. I looked up the RFC (there are getting to be so many I cannot trust memory any more). 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 bef

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

2000-09-01 Thread Tom Christiansen
>Well, it only does this if it's not something like 'split', then! Yes, it does "do it" with split. split is defined to do what it does, how it does it. *This* is the kind of senseless harping that annoys me, Nathan. > So it's not 100% consistent. Wrong: It's 100% consistent with the docume

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

2000-09-01 Thread Nathan Wiger
> >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 n

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 dev

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

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 an

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 develop

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 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. > > N

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

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, bu

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

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 t

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Tom Christiansen
>many systems allow for a global/local startup file for various >reasons. i see a potential use of this in perl but i don't see the >specific use yet. build it they will use it. But Perl is not an interactive shell! Can you imagine if a C compiler allowed arbitrary amounts of text to be pre-inc

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Uri Guttman
> "TC" == Tom Christiansen <[EMAIL PROTECTED]> writes: TC> How are you going to enable strict in an unrelated lexical scope? TC> Why are you using -w instead of use warnings, and can you just imagine the TC> howling? This would surely kill your system. like i said, i wasn't sure of

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 u

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. >> >>

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 cod

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

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 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 t

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

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 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

RFC 123 (v2) Builtin: lazy

2000-09-01 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Builtin: lazy =head1 VERSION Maintainer: David Nicol <[EMAIL PROTECTED]> Date: 17 Aug 2000 Last Modified: 1 Sep 2000 Mailing List: [EMAIL PROTECTED] Version: 2 Number: 123 Status: Developing

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 "u

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Michael G Schwern
On Fri, Sep 01, 2000 at 08:46:50PM -, Perl6 RFC Librarian wrote: > Many programs have so-called "resource configuration" files (at least > that's what I call them) that are loaded and executed upon program > startup. Some example programs that have this ability include bash, > mutt, and pytho

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 wo

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

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 program

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

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 si

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

2000-09-01 Thread Tom Christiansen
>> If you write >> >> $burp = LISTIFY( grep {EXPR} @data ); >> >> What's in the burp? >By this argument, then why aren't these different? It depends on whether you think the alpha or beta are what you want. It's highly unclear why you aren't just using straight scalar context t

Re: the C JIT

2000-09-01 Thread Nathan Wiger
"David L. Nicol" wrote: > > No, that would be > > dog $spot; No, it wouldn't: $r = new CGI;# CGI->new See? > You can have your general consensus, I'm not in his army. Well, unfortunately I think you're doomed to fail then. You're forcing constraints on yourself that Perl cann

Re: RFC 74 (v3) Proposal to rename C and C

2000-09-01 Thread Nathan Wiger
> Email from Nathan Wiger <[EMAIL PROTECTED]> that went to perl6-language > but I can't find at www.mail-archive.com :-( Here ya' go: http://www.mail-archive.com/perl6-language@perl.org/msg02432.html http://www.mail-archive.com/perl6-language@perl.org/msg02454.html -Nate

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

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 114 (v2) Perl resource configuration

2000-09-01 Thread Jarkko Hietaniemi
On Fri, Sep 01, 2000 at 03:13:04PM -0600, Tom Christiansen wrote: > 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

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

2000-09-01 Thread Damian Conway
> Well, Damian is indeed the soul of good taste. Just look at the Latin > and Klingon modules. Hmm... maybe those weren't such good examples. I SHOULD KILL YOU FOR THAT! ;-) I'll release the latest draft of the parameter lists RFC early next week. I think you'll find the syntax

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

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 74 (v3) Proposal to rename C and C

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 rename C and C =head1 VERSION Maintainer: Jonathan Scott Duff <[EMAIL PROTECTED]> Date: 8 Aug 2000 Last-Modified: 1 Sep 2000 Mailing List: [EMAIL PROTECTED] Version: 3 Number: 74 S

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 PROTECT

RFC 56 (v3) Optional 2nd argument to C and C

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 C and C =head1 VERSION Maintainer: Jonathan Scott Duff <[EMAIL PROTECTED]> Date: 7 Aug 2000 Last-Modified: 1 Sep 2000 Version: 3 Mailing List: [EMAIL PROTECTED] Number:

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

2000-09-01 Thread Tom Christiansen
>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 scalar? A list or array? No, I don't agree. How to predict what

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

2000-09-01 Thread Tom Christiansen
The thing is that so far, Perl has survived on extremely simple variable types: SCALAR: singular generic values ARRAY: ordered lists of SCALARs HASH: unordered association of SCALARs Sure, you have special-purpose accessors like the "%" operator or s/// or pop or exists or even v

Re: the C JIT

2000-09-01 Thread David L. Nicol
Nathan Wiger wrote: > > "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 co

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

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 sca

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

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

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

2000-09-01 Thread John Porter
Eric Roode wrote: > I wonder if it might not be a good idea to implement a function to > compute the intersection of two sets-as-hashes. > > Intersection is the only basic set function that's not trivially > implementable with perl hashes. Sure, it's not hard to do, with > a loop and a small bi

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 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Eric Roode
I wonder if it might not be a good idea to implement a function to compute the intersection of two sets-as-hashes. Intersection is the only basic set function that's not trivially implementable with perl hashes. Sure, it's not hard to do, with a loop and a small bit of programming, but maybe it

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: 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 k

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 versi

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 w

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

2000-09-01 Thread Tom Christiansen
Bart, until you've read my long message, you're wasting my time. Please read it. --tom

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

2000-09-01 Thread Tom Christiansen
>To be consistent, "scalar list" should return the number of elements. Says who? $x = ("foo", "bar") produces "bar", not 2. It's all a big looney tune. "scalar list" makes negative sense. If you want a count function, write one, but don't pretend that "scalar list" is such a thing, nor that "s

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

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

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

2000-09-01 Thread Gael Pegliasco
Tom Christiansen wrote: > Until you start thinking of terms of hashes, you aren't thinking > in Perl. It serves no good to delay this epiphany. Also, remember > that being a "novice" is a temporary and curable condition. Perl > is designed to for long-term ease of use, not short-term learn-fre

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

2000-09-01 Thread Tom Christiansen
>But, Do you really think that all these ingenuities, to not use another >term, are really natural and easy to understand to novice programmers ? Until you start thinking of terms of hashes, you aren't thinking in Perl. It serves no good to delay this epiphany. Also, remember that being a "novi

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

2000-09-01 Thread Gael Pegliasco
John Porter wrote: > > Buddha Buck wrote: > > > > In a hash implementation, your hash keys -are- your set elements! > > > > my %set; > > > > # add elements to %set > > $set{'elem1','elem2'} = 1; > > > > # Compute union > > $union{keys %set1, keys %set2} = 1; > > Oh, yeah, using native hashes for

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

2000-09-01 Thread Tom Christiansen
>> keys %HASH = LIST; >> is really >> @HASH{ LIST } = (); >Sure. Would you have any great objection to adding the alternative syntax? Nope. --tom

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

2000-09-01 Thread John Porter
Tom Christiansen wrote: > >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 ) : () } keys > > >but this is not currently legal perl. > > keys %HASH = LIST; > > is really > > @HAS

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 ) : () } keys >but this is not currently legal perl. keys %HASH = LIST; is really @HASH{ LIST } = (); --tom

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

2000-09-01 Thread John Porter
Buddha Buck wrote: > > In a hash implementation, your hash keys -are- your set elements! > > my %set; > > # add elements to %set > $set{'elem1','elem2'} = 1; > > # Compute union > $union{keys %set1, keys %set2} = 1; Oh, yeah, using native hashes for sets -- what could be simpler? (Hint: @s

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

2000-09-01 Thread Gael Pegliasco
Eric Roode wrote: > Adjust your thinking a bit, not the language. Try: >%my_fruit_set = (orange => 1, lemon => 1); >or >@my_fruit_set{qw/orange lemon/} = (); Yes, probably, this could be easiest... :) But, maybe because I'm a mulish person, I still thinking that if we actually use such

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, fo

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

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

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 ha

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

2000-09-01 Thread Gael Pegliasco
> > 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, is the one of arrays. It is not natural to w

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

2000-09-01 Thread Tom Christiansen
> $\ = "\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. Not many, I would think. What the devil is "array context"? You mean the thing that push expects for its first argument? Just w

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

2000-09-01 Thread Tom Christiansen
Also: have you looked at what's on CPAN for handling sets? Here's a casual search result: Math::Expr::MatchSet Set::Scalar Math::Expr::VarSet Set::Scalar::Base ObjStore::SetSet::Scalar::Null ObjStore::SetEmulation Set::Scalar::Real Set

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 rec

Re: Proposal: chop() dropped

2000-09-01 Thread Bart Lateur
On Fri, 1 Sep 2000 08:33:24 -0400 (EDT), Eric Roode wrote: >For that matter, let's drop chomp(), eh? 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. The

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

2000-09-01 Thread Tom Christiansen
>I don't care about keys when I'm working with sets, and I don't want to >have to deal with them. >Then, if when implementing these new functions in perl6 you choose to >use an invisible hash table, ok, I don't care, but when writing my perl >script I don't want to deal with hash tables for arrays

Re: Proposal: chop() dropped

2000-09-01 Thread Tom Christiansen
>Bart Lateur wrote: >>On Thu, 31 Aug 2000 13:36:10 -0600, Tom Christiansen wrote: >>>No. People should learn intrinsic mechanisms with which they can >>>construct infinitely many beautiful and powerful effects. This empowers >>>them. Making them learn yet-another-function-call merely hamstrings

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

2000-09-01 Thread Gael Pegliasco
> The point is that a hash of booleans (not a list of hashes) is a more direct > way to implement a set. A set is unordered, and does not have duplicates. > This is also true of hash keys. Furthermore, the nature of a hash makes it > faster and easier to check for the existance of a key, which

Re: Proposal: chop() dropped

2000-09-01 Thread Eric Roode
Bart Lateur wrote: >On Thu, 31 Aug 2000 13:36:10 -0600, Tom Christiansen wrote: >>No. People should learn intrinsic mechanisms with which they can >>construct infinitely many beautiful and powerful effects. This empowers >>them. Making them learn yet-another-function-call merely hamstrings >>th

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 http://sourceforge

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

2000-09-01 Thread Tom Christiansen
>Let's fall back to what we have already: > $\ = "\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. Not many, I would think. Read my last letter--the one nobody commented on. What do y

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 manip

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, 'to

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

2000-09-01 Thread Piers Cawley
Tom Christiansen <[EMAIL PROTECTED]> writes: > >Doesn't that tend to lead us in the direction of pack madness where we > >end up with yet another 'sub language' within perl. We've already got > >pack specifiers and regexen and the 'old' prototyping stuff. I'm not > >arguing *against* these things

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

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 C 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, the eff