(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
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
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
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
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.)
>
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
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 ){...
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 $
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
> 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
>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
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
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
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
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
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
>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.
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
>
>
>
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
> 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
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
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?
"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
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 (
> 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
>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
> 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
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
>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
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.
> > 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
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:
>
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
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.
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
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
"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
Just to note that RFC 76 (Builtin: reduce) also proposes this
mechanism as a means of short-circuiting C.
Damian
> @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
> > 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
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
>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
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;
>
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
I should have an RFC out on this by next week.
Damian
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'.
> Feel free to hijack and/or infiltrate my RFC.
You Will Be Assimilated.
Damian
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
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
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
50 matches
Mail list logo