Re: we already have barewords as variables if we want them Re: the C JIT

2000-09-06 Thread John Porter
David L. Nicol wrote: > > A bareword inside doublequotes is not interpreted, in Perl or C. No; a "bareword" in quotes (any kind) is not a bareword. -- John Porter

RE: the C JIT

2000-09-06 Thread Myers, Dirk
> > And how about: > > > > int length = 256 ; > > > > and, if that's legal, what does: > > > > print "I wonder what this is : " . length ; > > > > do? > I imagine the first order of business for the C JIT team would be > some conversion operators. Numeric types stringify int

RE: $a in @b

2000-09-06 Thread Damian Conway
> @passed = grep { 2 > $_ and last } (1, 2, 3, 2, 1); > > I believe that unless used with a label, if someone were to use > last within a grep or map block, then further processing for that > element of the list which grep is working on would be skipped, and > it would continue

Re: RFC 199 (v1) Short-circuiting C and C with C

2000-09-06 Thread Damian Conway
Just to note that RFC 76 (Builtin: reduce) also proposes this mechanism as a means of short-circuiting C. Damian

Re: the C JIT

2000-09-06 Thread David L. Nicol
"Myers, Dirk" wrote: > I still find this whole idea confusing, though. Just out of curiosity, > though, would: > > #include a way for users to bail out gracefully > > be a syntax error? It is clear to us that that is a comment and not a preprocessor directive. The #include preprocesso

RFC 199 (v1) Short-circuiting C and C with C

2000-09-06 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Short-circuiting C and C with C =head1 VERSION Maintainer: Garrett Goebel <[EMAIL PROTECTED]> Date: 6 Sep 2000 Mailing List: [EMAIL PROTECTED] Version: 1 Number: 199 Status: Developing =head1 A

RE: $a in @b

2000-09-06 Thread Garrett Goebel
From: Bart Lateur [mailto:[EMAIL PROTECTED]] > > On Wed, 06 Sep 2000 13:04:51 -0500, David L. Nicol wrote: > > > grep { $a > $_ and last } @b) > > So "last" should return true, or what? The last operator doesn't return anything does it? It immediately exits the loop/block in question. @p

we already have barewords as variables if we want them Re: the C JIT

2000-09-06 Thread David L. Nicol
Nathan Wiger wrote: > > "David L. Nicol" wrote: > > > > s/x/5/; # this is still going to replace > > # all the eckses in $_ with fives. > > Why? This is an arbitrary decision if you've declared variables to be > barewords. Misstating my position, when I take one, is and

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread Peter Scott
At 01:52 PM 9/6/00 -0600, Tom Christiansen wrote: > >Has anyone read RFC #11,112,006,825,558,016? > >It's rather difficult to keep up with them all, or read them all >retroactively when you miss a few days. It's also hard to grep >them (HTML is the root of all evil). No HTML here: $ telnet dev.

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread Casey R. Tweten
Today around 1:52pm, Tom Christiansen hammered out this masterpiece: : >Has anyone read RFC #11,112,006,825,558,016? : : It's rather difficult to keep up with them all, or read them all : retroactively when you miss a few days. It's also hard to grep : them (HTML is the root of all evil). Is t

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread Nathan Wiger
Gregory S Hayes wrote: > > but it would look much nicer in the framework of this version of open(), > perhaps something like ... > > ($readme, $writeme) = open doublehandle "/path/program -args"; > print $writeme "here's your input\n"; > $output = $readme; > $writeme->close; > $readme->close; >

Re: $a in @b

2000-09-06 Thread Jonas Liljegren
Damian Conway <[EMAIL PROTECTED]> writes: >> Does any other RFC give the equivalent to an 'in' operator? > > and my forthcoming superpositions RFC will offer: > > if ($a == any(@b) ) { ... } > and: > if ($a eq any(@b) ) { ... } > and: > if ($a != any(@b) ) { ... } > and: >

RE: the C JIT

2000-09-06 Thread Myers, Dirk
> > s/x/5/; # this is still going to replace > > # all the eckses in $_ with fives. > Why? This is an arbitrary decision if you've declared variables to be > barewords. I think it's a sane decision -- IMHO barewords shouldn't be allowed to

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread Tom Christiansen
>Will this incarnation of open() be able to deal >with bi directional process communication? The straightforward way to do that is quite simply: open(FH, "|foocmd thisfoo thatfoo|") or for shell avoidance: open(FH, "|-|", "foocmd", "thisfoo", "thatfoo")) --tom

Re: $a in @b

2000-09-06 Thread Bart Lateur
On Wed, 06 Sep 2000 13:04:51 -0500, David L. Nicol wrote: > grep { $a > $_ and last } @b) So "last" should return true, or what? You do need a true value for grep() to claim success. -- Bart.

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread Tom Christiansen
>Tom Christiansen wrote: >> >> The straightforward way to do that is quite simply: >> >> open(FH, "|foocmd thisfoo thatfoo|") >> >> or for shell avoidance: >> >> open(FH, "|-|", "foocmd", "thisfoo", "thatfoo")) >Does this work now Not quite. Nearly, though. >Or are you just su

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread Nathan Wiger
Tom Christiansen wrote: > > The straightforward way to do that is quite simply: > > open(FH, "|foocmd thisfoo thatfoo|") > > or for shell avoidance: > > open(FH, "|-|", "foocmd", "thisfoo", "thatfoo")) Does this work now Or are you just suggesting this be added to Perl 6? Quoth

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread Gregory S Hayes
> Has anyone read RFC 14? > >$FILE = open "@doc = <$FILE>; > >$WEB = open http "http://www.yahoo.com"; >@html = <$WEB>; > > The next version (hopefully out this week) will clarify this syntax > further. > > -Nate This is a much friendlier looking approach to things. I also app

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread Tom Christiansen
>Has anyone read RFC #11,112,006,825,558,016? It's rather difficult to keep up with them all, or read them all retroactively when you miss a few days. It's also hard to grep them (HTML is the root of all evil). Is there an rsync server that will dole out the pods for us as needed? --tom

Re: RFC 194 (v1) Standardise Function Pre- and Post-Handling

2000-09-06 Thread Damian Conway
> Feel free to hijack and/or infiltrate my RFC. You Will Be Assimilated. Damian

Re: RFC 194 (v1) Standardise Function Pre- and Post-Handling

2000-09-06 Thread Jarkko Hietaniemi
On Thu, Sep 07, 2000 at 06:28:25AM +1100, Damian Conway wrote: > I should have an RFC out on this by next week. Feel free to hijack and/or infiltrate my RFC. > Damian -- $jhi++; # http://www.iki.fi/jhi/ # There is this special biologist word we use for 'stable'. # It is 'dead'.

Re: RFC 194 (v1) Standardise Function Pre- and Post-Handling

2000-09-06 Thread Damian Conway
I should have an RFC out on this by next week. Damian

Re: $a in @b

2000-09-06 Thread Damian Conway
> Does any other RFC give the equivalent to an 'in' operator? RFC 22 offers: switch ($a) { case (@b) { ... } } and my forthcoming superpositions RFC will offer: if ($a == any(@b) ) { ... } and: if ($a eq any(@b) ) { ... } and: if ($a

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread Nathan Wiger
Buddha Buck wrote: > > > my filehandle fh; fh->new(">>/tmp/appendablelog"); > > Ugh... How about... > > my filehandle fh; > fh->open(">>/tmp/appendablelog"); Has anyone read RFC 14? $FILE = open "; $WEB = open http "http://www.yahoo.com"; @html = <$WEB>; The next version (

Re: the C JIT

2000-09-06 Thread Nathan Wiger
"David L. Nicol" wrote: > > s/x/5/; # this is still going to replace > # all the eckses in $_ with fives. Why? This is an arbitrary decision if you've declared variables to be barewords. Anyways, I'm done harping on this issue. I think a single, simple syntax is good. Yo

Re: the C JIT

2000-09-06 Thread David L. Nicol
Nathan Wiger wrote: > Intermingling it freely: > >my Dog $spot; >int x; >my int $y; >#include >char * name; >#do some regexp matching >s/x/5/;/* match the C value of x defined above */ > > Is really confusing, even for us humans. :-) > > -Nate Is it confusing?

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread David L. Nicol
Buddha Buck wrote: > What advantage does this give None whatsoever. I should have selected a less contentious example that file handles to demonstrate my opinion that tagged barewords should be allowed to do anything, not in exclusion of, but in addition to, the syntactically tagged scalar

RFC 195 (v1) Retire chop().

2000-09-06 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Retire chop(). =head1 VERSION Maintainer: Nathan Torkington <[EMAIL PROTECTED]> Date: 5 Sep 2000 Mailing List: [EMAIL PROTECTED] Version: 1 Number: 195 Status: Developing =head1 ABSTRACT Remov

RFC 194 (v1) Standardise Function Pre- and Post-Handling

2000-09-06 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Standardise Function Pre- and Post-Handling =head1 VERSION Maintainer: Jarkko Hietaniemi Date: 05 Sep 2000 Mailing List: [EMAIL PROTECTED] Version: 1 Number: 194 Status: Developing =head1 ABSTR

RFC 173 (v2) Allow multiple loop variables in foreach statements

2000-09-06 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Allow multiple loop variables in foreach statements =head1 VERSION Maintainer: Peter Scott <[EMAIL PROTECTED]> Date: 29 Aug 2000 Last Modified: 6 Sep 2000 Mailing List: [EMAIL PROT

Re: the C JIT

2000-09-06 Thread Nathan Wiger
> I don't know exactly how this message got marked "unread" again, > No, here it is, the server at Sun has decided to send it again, No it didn't. :-) Those are cascading headers (read the "by" field), Sun's internal mail system has 3-4 hops and 2 firewalls to go through. Received: from

Re: $a in @b

2000-09-06 Thread David L. Nicol
Garrett Goebel wrote: > grep { ref($a) eq ref($b) } @b) # Same type? > grep { $a == $_ } @b) > grep { $a eq $_ } @b) > grep { $a > $_ } @b) > > Garrett grep doesn't short-circuit; you can't return or exit or last out of the thing. Maybe we could add support for C to C

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread Buddha Buck
At 12:50 PM 9/6/00 -0500, David L. Nicol wrote: >I see barewords as being whatever the programmer wants them to be, >as long as he makes it clear what he expects the word to be before using >it. > >So, C becomes a legacy constructor and the perl6 version of it would >be something like > > >

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread Tom Christiansen
>I see barewords as being whatever the programmer wants them to be, >as long as he makes it clear what he expects the word to be before using >it. I've been known to use: sub opt(*); # imal quoting! :-) So I could say if opt(a) sans quoting. But that breaks for the pseudofuncs like m or s.

Re: RFC 33 (v2) Eliminate bareword filehandles.

2000-09-06 Thread David L. Nicol
John Porter wrote: > > David L. Nicol wrote: > > > > > > How about ALLOWING bareword everything-else? Start having > > filehandles work the way everyone expects them to at first, > > passing as arguments and so forth, without any special treatment? > > How about barewords are always interpreted

Re: the C JIT

2000-09-06 Thread David L. Nicol
I don't know exactly how this message got marked "unread" again, No, here it is, the server at Sun has decided to send it again, which is all right, since I don't think I responded before going home last friday. Received: from mercury.Sun.COM (mercur

Re: Fwd: RE: $a in @b

2000-09-06 Thread John Porter
Ed Mills wrote: > The fact that something can be accomplished in Perl doesn't necessarily mean > its the best or most desirable way to do it. I respect the programming > abilities, but > >grep { ref($a) eq ref($b) } @b) > > is far less intuitive than the proposal. ...and is an example of

Re: $a in @b

2000-09-06 Thread Jarkko Hietaniemi
On Wed, Sep 06, 2000 at 09:46:13AM -0600, Tom Christiansen wrote: > > grep { $_ == 1 } 1..1_000_000 > > >grep doesn't short-circuit. > > I never did figure out why "last" {w,sh,c}ouldn't be made to do > that very thing. Agreed, that would be very natural. -- $jhi++; # http://www.iki.fi/jh

Re: Fwd: RE: $a in @b

2000-09-06 Thread Piers Cawley
Tom Christiansen <[EMAIL PROTECTED]> writes: > >IMHO Perl should add a plethora of higher-order functions for arrays and > >hashes, and from the chatter here I think a lot of people agree. > > Make some modules, release them, and see how much they're used. Then > one can contemplate sucking

Re: Fwd: RE: $a in @b

2000-09-06 Thread Tom Christiansen
>IMHO Perl should add a plethora of higher-order functions for arrays and >hashes, and from the chatter here I think a lot of people agree. Make some modules, release them, and see how much they're used. Then one can contemplate sucking them into the core based upon the success of those modul

Re: $a in @b

2000-09-06 Thread Tom Christiansen
> grep { $_ == 1 } 1..1_000_000 >grep doesn't short-circuit. I never did figure out why "last" {w,sh,c}ouldn't be made to do that very thing. --tom

Fwd: RE: $a in @b

2000-09-06 Thread Ed Mills
The fact that something can be accomplished in Perl doesn't necessarily mean its the best or most desirable way to do it. I respect the programming abilities, but grep { ref($a) eq ref($b) } @b) is far less intuitive than the proposal. I could perhaps dig into my distant memory and explain

Re: $a in @b

2000-09-06 Thread Jarkko Hietaniemi
On Wed, Sep 06, 2000 at 09:43:03AM -0500, Garrett Goebel wrote: > From: Jonas Liljegren [mailto:[EMAIL PROTECTED]] > > > > Does any other RFC give the equivalent to an 'in' operator? > > > > I have a couple of times noticed that beginners in programming want to > > write if( $a eq ($b or $c or $

RE: $a in @b

2000-09-06 Thread Garrett Goebel
From: Jonas Liljegren [mailto:[EMAIL PROTECTED]] > > Does any other RFC give the equivalent to an 'in' operator? > > I have a couple of times noticed that beginners in programming want to > write if( $a eq ($b or $c or $d)){...} and expects it to mean > if( $a eq $b or $a eq $c or $a eq $d ){...

Re: Net::Ping problem

2000-09-06 Thread Tad McClellan
On Wed, Sep 06, 2000 at 02:51:03PM +0200, Willy wrote: > Does anyone know how can i [snip] > How can i do?? You cannot do this in perl6 because perl6 does not yet exist. Please do not abuse this mailing list with off-topic questions. Thank you. -- Tad McClellan

Re: $a in @b

2000-09-06 Thread Graham Barr
On Wed, Sep 06, 2000 at 10:40:47AM +0200, Jonas Liljegren wrote: > (I sent this to horos in the first RFC format, before the language > list. I haven't got any response, so I send this agian now. I don't > have time to read the list or maintain an RFC. I just wan't to give > this suggestion.) >

Net::Ping problem

2000-09-06 Thread Willy
Does anyone know how can i use Net::Ping in a CGI without having security problems?? It tells me that "icmp ping requires root privileges". But if set the "uid" bit it tells me "insecure $ENV". How can i do?? Willy http://members.xoom.it/willy73

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

2000-09-06 Thread H . Merijn Brand
On 4 Sep 2000 21:32:00 -, Perl6 RFC Librarian <[EMAIL PROTECTED]> wrote: > This and other RFCs are available on the web at > http://dev.perl.org/rfc/ > > =head1TITLE > > Here Docs Terminators (Was Whitespace and Here Docs) [...] > =head1 IMPLENTATION Intentional? It's either 'IMPL

Re: $a in @b

2000-09-06 Thread Jeremy Howard
Jonas Liljegren wrote: > Does any other RFC give the equivalent to an 'in' operator? > > > I have a couple of times noticed that beginners in programming want to > write if( $a eq ($b or $c or $d)){...} and expects it to mean > if( $a eq $b or $a eq $c or $a eq $d ){...}. > > I think it's a natura

$a in @b

2000-09-06 Thread Jonas Liljegren
(I sent this to horos in the first RFC format, before the language list. I haven't got any response, so I send this agian now. I don't have time to read the list or maintain an RFC. I just wan't to give this suggestion.) Does any other RFC give the equivalent to an 'in' operator? I have a c