hi,
here is one simple script (Requires Parse::RecDescent) that count operators
in scripts.(and my fisrt grammar ;") )
OK. I started this against my current perl installation.
(it is not pure RH6.2 install, but many things are added)
i.e.
find /perl_dir -name *.pm | ./count.pl | tee allops.txt
Damian Conway [EMAIL PROTECTED] writes:
Modulo some superpositional silliness,
Hey! I resemble that remark!
And we love you for it.
--
Piers
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Transaction-enabled variables for Perl6
=head1 VERSION
Maintainer: Szabó, Balázs [EMAIL PROTECTED]
Date: 17 Aug 2000
Last Modified: 02 Sep 2000
Mailing List: [EMAIL PROTECTED]
Version: 5
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Implementation of hash iterators
=head1 VERSION
Maintainer: Tom Hughes [EMAIL PROTECTED]
Date: 20 Aug 2000
Last Modified: 4 Sep 2000
Mailing List: [EMAIL PROTECTED]
Version: 2
Number: 136
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Objects : Core support for method delegation
=head1 VERSION
Maintainer: Damian Conway [EMAIL PROTECTED]
Date: 4 September 2000
Mailing List: [EMAIL PROTECTED]
Version: 1
Number: 193
Status:
Karl Glazebrook wrote:
Can we not keep calling them matrices? They are just a special
case.
Normally I call them tensors, but this is only meaningful to a mathematics
audience.
I was using 'matrix' because both laypersons and mathematicians would know
what the RFCs are referring to.
Buddha Buck wrote:
Tensor or Matrix
Multidimensional list
what should we call it?
I'd vote for matrix myself. It's short and sweet
Fine ;) Just have a section in the elusive overview RFC that defines
what we mean by matrix, e.g. not only 2D objects of linear algebra.
With all these
Christian Soeller wrote:
Buddha Buck wrote:
Tensor or Matrix
Multidimensional list
what should we call it?
I'd vote for matrix myself. It's short and sweet
Fine ;) Just have a section in the elusive overview RFC that defines
what we mean by matrix, e.g. not only 2D objects of
Moved to perl6-language-data from PDL Porters
[EMAIL PROTECTED] wrote:
Jeremy Howard wrote:
quote
C; is particularly useful for creating slices of multidimensional
arrays:
my int @array = ([1,2,3],
[4,5,6],
[7,8,9]);
@col2 =
Moved to perl6-language-data from PDL Porters
Robin Williams wrote:
"Jeremy Howard" writes:-
The first version of this
RFC had a
@start..$end:gen
but it just seems too dangerous, so I removed it. I'm still willing to
be
convinced though...
as well as @start..gen:$num_steps ?
"Jeremy Howard" writes:-
Yes, I like it too, but the problem is that $end may not be reached:
@weird = (0..5: ^0 mod 2);
is an infinite loop under this proposal. That's not necessarily a dead-end,
but it seems pretty dangerous.
Like for (;;) ? Or 1:11:-1 !
The $num_steps proposal
"DC" == Damian Conway [EMAIL PROTECTED] writes:
PRL use Class::Delegation
shouldn't that be use delegation? i think you have a cut and paste
error.
DC You're correct. Many thanks.
DC (That's what I get for pre-testing all the code in my RFCs! ;-)
heh, you should hire me to
"TC" == Tom Christiansen [EMAIL PROTECTED] writes:
TC Oh. You want lists to act like arrays. That's a very big change.
Do you have any objection? The intended avoidance of flattening to as
late as possible might have that effect.
You are letting the scalar context of the caller to bleed
Then please explain why scalar(return (1,2,3)) doesn't do what at first
glance it seems it should.
Because X(Y) != Y(X). You should have written "return scalar" if you
wanted to return a scalar.
And for the life of me I can't see how
$x=(1,2, (3,4,fn,6) )
fn ends up in scalar
"TC" == Tom Christiansen [EMAIL PROTECTED] writes:
TC You will be miserable until you learn the difference between
TC scalar and list context, because certain operators know which
TC context they are in, and return a list in contexts wanting a
TC list, but a scalar value in
"NT" == Nathan Torkington [EMAIL PROTECTED] writes:
NT Casey R. Tweten writes:
Wow. Now that, that, is lame. You're saying that keys() expects
it's first argument to begin with a %? Why should it care what it's
argumen begins with?
NT The keys function changes its arguments' data
Peter Scott [EMAIL PROTECTED] writes:
Have you seen http://search.cpan.org/doc/GREGOR/psh-0.008/doc/psh.pod and
the other tools it references? I haven't used it/them myself - what you
propose has never itched enough for me to scratch it with anything more
than a one-liner - but it
At 11:48 AM 9/3/00 +1100, Damian Conway wrote:
Ever consider then having
($a, $b, $c) = FH;
or
@a[4,1,5] = FH;
only read three lines?
I think this is a superb idea, and look forward to someone's RFC'ing it.
I like it too. Anyone working on the RFC?
I
Peter Scott writes:
($a, $b, $c) = FH;
or
@a[4,1,5] = FH;
only read three lines?
I think this is a superb idea, and look forward to someone's RFC'ing it.
Should be part of the want() context. Permit operations to discover
(as does split) how many elements
At 10:52 AM 9/4/00 -0600, Nathan Torkington wrote:
Peter Scott writes:
($a, $b, $c) = FH;
or
@a[4,1,5] = FH;
only read three lines?
I think this is a superb idea, and look forward to someone's RFC'ing it.
Should be part of the want() context.
It is. I
Well, unless there are any wildly different points someone hasn't mentioned
until now, I'm going to freeze this RFC as it is (with a few minor tweaks).
Various alternate syntaxes have been suggested, but I still rather like
mine. Let Larry do with it what he will. Hopefully he can take
Graham Barr wrote:
Given that is happens when bless is called and that all other builtin
methods are anmed after what is being called, not what it is being used
for, then I would say that it should be called BLESS for consistancy reason.
this may seem confusing because you are thinking of
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
List context return from filesystem functions
=head1 VERSION
Maintainer: Peter Scott [EMAIL PROTECTED]
Date: 6 Aug 2000
Last Modified: 3 Sep 2000
Mailing List: [EMAIL PROTECTED]
package main;
sub fn { return (3, 5, 7) }
tie $x, 'MaiTai';
$x = fn;
$ /tmp/foo
STORE: 7
Why don't I see three STOREs?
Because Perl is too clever to bother. :-)
--tom
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Lightweight Threads
=head1 VERSION
Maintainer: Steven McDougall [EMAIL PROTECTED]
Date: 30 Aug 2000
Last Modified: 02 Sep 2000
Version: 2
Mailing List: [EMAIL PROTECTED]
Number: 178
Status:
Chaim Frenkel wrote:
Strange thought just crossed my mind.
Would having a time object that is understood by perl be sufficient?
It would smell and taste like an integer but would otherwise be
magical.
This is something that should be easily doable if RFC 73, "All Perl core
functions
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Undef values ne value
=head1 VERSION
Maintainer: Richard Proctor [EMAIL PROTECTED]
Date: 4 Sep 2000
Mailing List: [EMAIL PROTECTED]
Version: 1
Number: 192
Status: Developing
=head1 ABSTRACT
Nathan Wiger wrote:
Tom Christiansen wrote:
Ever consider then having
($a, $b, $c) = FH;
or
@a[4,1,5] = FH;
only read three lines? I mean, how many if any builtins would it
make sense to make aware of this, and do something "different"?
Personally, I think this would
I think it should be made explicit what happens if the here doc
terminator itself contains comment characters or semicolons. This is
my suggestion:
The here doc terminator must match as a string (that is,
Cm/^\s*\Q$term\E\s*(?:\#|;\s*$)/ should match the line, where $term is
the desired
Would the rc support module loading? In other words, a sysadmin might want
to give access to certain Perl modules to his/her users, and not to other
users. That's the only use I can think of for dynamic Perl config. BTW,
it's not something I'm against, I'm just trying to find a way I could use
Should be part of the want() context.
It is. I interpreted Damian's remark to mean that it would be good if
readline() took advantage of it, and that should be RFC'ed.
That's indeed precisely what I meant. In fact, all list-returning built-ins
ought to be optimized this way.
Steve Fink uddered:
Can't quite run perl yet.
Not for lack of trying.
ftp://cpan.valueclick.com/CPAN/authors/id/D/DC/DCONWAY/Quantum-Superpositions-1.03.tar.gz
--
Michael G Schwern http://www.pobox.com/~schwern/ [EMAIL PROTECTED]
Just Another Stupid Consultant
On Mon, Sep 04, 2000 at 09:32:00PM -, Perl6 RFC Librarian wrote:
Perl6 should ignore any whitespace before the terminator of a heredoc on any
line.
Good. I don't see anything wrong with this.
***BRAIN STORM!***
RFC 162 (http://dev.perl.org/rfc/162.html) wanted to allow indented
By RFC 21, it looks like the call would be
if ( want 'LIST' ) {
$num_to_return = want;
# do stuff
}
or, more efficiently:
if ( ($num_to_return) = want 'LIST' ) {
# do stuff
}
However, at one time the discussion had
This still leaves the problem of having to count whitespace and having
to change your regex if you reindent your code. In effect, it causes
whitespace to become significant. Bleh.
It's much better to use the Cookbook method: it stands out better.
Please observe.
--tom
Michael G Schwern wrote:
print END_OF_DOC =~ s/^\s{0,5}//g;
This still leaves the problem of having to count whitespace and having
to change your regex if you reindent your code. In effect, it causes
whitespace to become significant. Bleh.
How is this different from having to count
If I said that, I was mistaken. It will always return false because
the first return value from Cwant is an expectation count, so:
Ok, here's your email cut-and-pasted, because I can't find it in the
frikkin' archives and I think it's worth re-visiting:
Damian Conway wrote:
Nathan
Damian Conway wrote:
The LIST/SCALAR/VOID distinction is always the second value returned
(see the examples in the RFC). So your dispatcher is:
my $func = lc (want)[1] . "_func";
return $func(@_);
I think I'd much rather it be the first. This seems to jive much more
On Mon, Sep 04, 2000 at 05:36:32PM -0700, Nathan Wiger wrote:
Actually, the two started merged. :-) They were split up after there
were too many people for RFC 111 but against RFC 162. Personally, I'd
rather see the recipe method of:
print END_OF_DOC =~ s/^\s{0,5}//g;
This still leaves
The LIST/SCALAR/VOID distinction is always the second value returned
(see the examples in the RFC). So your dispatcher is:
my $func = lc (want)[1] . "_func";
return $func(@_);
I think I'd much rather it be the first. This seems to jive much more
*finally* getting around to answering these... ;-)
Jon Ericson wrote:
This is not strictly true. is shorthand for ARGV. ARGV is the
special filehandle that opens each file in @ARGV. If @ARGV is empty,
$ARGV[0] is set to '-'.
Thanks for the clarification.
@ARGV = ('filename');
#
John Porter writes:
i think we should have some sort of end user announcement list. a lot of
people are being asked to be kept up to date on Perl 6, but they aren't
the types to want to wade through development discussions or
announcements.
Isn't there a perl-announce? Or only
Ask Bjoern Hansen wrote:
the perl-qa people have some code they need to manage in a repository of
some kind. For now I have directed them to SourceForge, but I have a 100
users license for perforce I got for perl, so if we can get a quick
consensus that we might want to make a perl6 code
Totday I got a message that my ISP's mail server had bounced a few
mails. It looks to me as my mailbox with the ISP was a bit full. But,
that's not the point of my mail here. It's this excerpt:
Here are the message numbers:
5315
5320
5318
On Mon, 4 Sep 2000, Bart Lateur wrote:
My suggestion, plain and simpl: add a custom header with the
assigned message ID.
it's in the envelope sender which all decent delivery agents will
put in some header for you. (commonly the Return-Path header).
- ask
--
ask bjoern hansen -
http://dev.perl.org/summary/
Each established list/working group has a spot on this page.
Weekly/Bi-weekly summaries will be posted as they arrive.
Currently, only the two summaries from last week (Aug 31) are
online. Earlier summaries will be posted as I find them in the archives
On Mon, Sep 04, 2000 at 11:09:18AM +0100, Piers Cawley wrote:
Damian Conway [EMAIL PROTECTED] writes:
But I've gotta nitpick the name. I wonder if BLESS wouldn't be better?
print calls PRINT, printf calls PRINTF, even if the subs don't do any
printing. Sure makes it easier to
Michael Fowler [EMAIL PROTECTED] writes:
On Fri, Sep 01, 2000 at 10:22:49AM +0100, Piers Cawley wrote:
And then there's:
- Makes factory methods impossible.
my Dog $spot;
my $pub = $spot-procreate;
Sure looks like a factory method to me. Just because you don't get to
Michael Fowler [EMAIL PROTECTED] writes:
On Sun, Sep 03, 2000 at 12:42:52PM +0200, Bart Lateur wrote:
But now you're throwing away the kid with the bathwater.
my Dog $spot;
initially was syntax invented so that $spot was marked as only been ably
to reference a Dog, with as a
"PRL" == Perl6 RFC Librarian [EMAIL PROTECTED] writes:
PRL One powerful application of delegation is as a replacement for
PRL inheritance where the internals of a prospective base class are
PRL inaccessible or inconvenient, or the base class was not designed
PRL to be inherited and yet
Nathan Wiger [EMAIL PROTECTED] writes:
Piers Cawley wrote:
First off, I think everyone is reading this RFC with the wrong mindset,
forgetting the concept of embedded objects in Perl 6.
Ah, that dumb idea again.
Well, if you disagree with this idea, you probably won't agree with
private $hash{key};
private $hash{$key};
private $hashref-{key};
or to a hash slice:
private @hash{qw(_name _rank _snum)};
or to a complete hash (either directly, or via a reference):
private %hash;
private { _name = "demo", _rank =
On Mon, Sep 04, 2000 at 09:53:39PM -, Perl6 RFC Librarian wrote:
Objects : Core support for method delegation
I like it! One gripe (of course)...
The proposed delegation mechanism would work via a pragma:
use delegation
attr1 = [qw( method1 method2 method3 )],
Will "private" be a true scoping keyword? Or under strict would you have
to do this:
private my %hash;
It's not a replacement for Cmy, though Cuse strict
*might* choose to overlook it. :-)
Damian
On 1 Sep 2000, Perl6 RFC Librarian wrote:
Private entries of hashes could be Iindirectly accessed in packages
that inherit from the entry's package, by qualifying (i.e. prefixing) the
key with the entry's package name. For example:
package Base;
sub new {
Damian Conway [EMAIL PROTECTED] writes:
But I agree that anything beyond that is simply horrible.
You'll only drive more people *away* from OO, because it
generates so horribly inefficient code. If you want a
constructor called, than FGS *call* a constructor. Maybe you
Michael Fowler [EMAIL PROTECTED] writes:
On Fri, Sep 01, 2000 at 05:23:27PM +0200, Slaven Rezic wrote:
Often, there is the case that "my" is used before actually assigning a
value to it. For example:
my Foo $foo;
if ($cond1) {
$foo = new Foo 1, 2, 3;
} else {
"David E. Wheeler" [EMAIL PROTECTED] writes:
On 1 Sep 2000, Perl6 RFC Librarian wrote:
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Objects : Private keys and methods
Here, here amen, Damian! This one gets my instant vote!
And
John Siracusa [EMAIL PROTECTED] writes:
On 9/1/00 4:59 PM, Perl6 RFC Librarian wrote:
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;
Damian Conway [EMAIL PROTECTED] writes:
But I've gotta nitpick the name. I wonder if BLESS wouldn't be better?
print calls PRINT, printf calls PRINTF, even if the subs don't do any
printing. Sure makes it easier to see what's going on, to me at least.
But BLESS doesn't do
Damian Conway [EMAIL PROTECTED] writes:
=head1 TITLE
Cmy Dog $spot should simply assert that
C(!defined($spot) || $spot-Egtisa('Dog'))
And let them duke it out.
You'd have my support for that...I was intending to release an RFC
in the next day or two that is
"PRL" == Perl6 RFC Librarian [EMAIL PROTECTED] writes:
PRL All threads see the same compiled subroutines
Why? Why not allow two different threads to have a different view of
the universe?
PRL All threads share the same global variables
_All_ or only as requested by the user (ala :shared)?
SWM Question: Can the interpreter determine when a variable becomes
SWM shared?
SWM Answer: No. Then neglecting to put a :shared attribute on a shared
SWM variable will crash the interpreter. This doesn't seem very Perlish.
Err, no. It won't crash the interpreter. It'll make the script
"SWM" == Steven W McDougall [EMAIL PROTECTED] writes:
PRL All threads see the same compiled subroutines
Why? Why not allow two different threads to have a different view of
the universe?
SWM 1. That's how it works in compiled languages. You have one .exe, and
SWM all threads run it.
Perl
"SWM" == Steven W McDougall [EMAIL PROTECTED] writes:
SWM All I want the language to guarantee is internal thread-safety.
SWM Everything else is the user's problem.
Somehow I would have thought that goes without saying.
But I don't agree that all the rest is a user issue, is too
"PRL" == Perl6 RFC Librarian [EMAIL PROTECTED] writes:
PRL =head2 Freezing state for keys and values efficiently
PRL I believe this problem can be solved by using the vtable for the
PRL hash to wrap any mutating functions with a completion routine that
PRL will advance the iterator to
66 matches
Mail list logo