Smylers == Smylers [EMAIL PROTECTED] writes:
Smylers No: no aliases. Perl does not have a tradition of these,
except for/foreach. :)
But I agree with the rest of your position.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
merlyn@stonehenge.com URL:http
, and it *does* help the overall readability.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
merlyn@stonehenge.com URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite
Please, let us agree to use the traditional name of environment variables in
the docs, and not re-introduce its bastardized cousin, which hurts my ears.
Thanks.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
merlyn@stonehenge.com URL:http://www.stonehenge.com
comparison will be simpler
and cheaper than specifying the sort key.
So, we need both, but if we get only one, the Perl5 way is superior.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
merlyn@stonehenge.com URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security
interface.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
merlyn@stonehenge.com URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
.
This is similar to the OS-9's gestalt tables, which got smarter as
the operating system had more features, but was a consistent way to
ask do we have a color monitor here?.
Is something like this already planned?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
never
want to go back to reduce. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
merlyn@stonehenge.com URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open
Larry == Larry Wall [EMAIL PROTECTED] writes:
Larry The shifts are all X rather than X to avoid confusion with Texas
Quotes.
I've been staring too much at POD lately. I saw both of those as very
broken pod-start marks. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503
is just an
approximation.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
won't fix this. As long as we have
dual-natured characters like /, and user-defined prototypes, Perl
cannot be lexed without also parsing, and therefore without also
running BEGIN blocks.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http
tokeniser.
No, not possible at all. The entire rest of the program may be valid
either way. You *must* know by the time you're done with /, or
/-and-more. The rest of the code cannot be a hint. Again, see my
article.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
to be in Perl 6.
Boy, when Larry says I get the colon, he really had plans for it.
:-)
Perl8 will look like:
:: : : :: :: ::: :;
(note the semicolon line terminator, to be replaced by a colon in Perl9).
--
Randal L. Schwartz - Stonehenge Consulting Services
.
This undermines the rest of your request.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open
became incredibly unreadable quickly, so
no-nesting for Perl was a deliberate choice, not an implementation
detail.
Unless Larry has come up with an overwhelming reason to permit them
after years of not having them, I doubt we'd see that (IMHO mistake)
in Perl6.
--
Randal L. Schwartz - Stonehenge
Randal == Randal L Schwartz [EMAIL PROTECTED] writes:
Randal I actually consider that an annoying statement. I have to back up
Randal three times to figure out what it means.
And before someone whips out the Schwartzian Transform to undermine
my statement... please note that in Perl6, you'll
a major contributor to YAS. I don't see why we
should start changing plans in midstream.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See
pass by reference easier, before prototypes if I recall:
myfunc \($a, @b, %c);
which means the same as if we had said:
sub myfunc (\$ \@ \%);
myfunc($a, @b, %c);
Except that the prototyped version mandates the specific types.
--
Randal L. Schwartz - Stonehenge Consulting
should have a similar capability, using REs.
Well, here's a cheap way:
my @list = glob ('foo{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}');
:-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix
Simon == Simon Cozens [EMAIL PROTECTED] writes:
Simon What were the good reasons for not allowing localized lexicals in Perl 5?
Nobody could explain it in 50 words or less.
What the hell is 'local my $foo = 35'?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
of concept after all...
This is already a thread on perlmonks.org... see user ovid.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See
David == David Whipp [EMAIL PROTECTED] writes:
David If every object has a Cclass method (Cref?), then you could
David always call class-methods as class.m2().
Wouldn't that be .class.m2(), or did I miss something in the flurry?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc
could use the Smalltalk way by defining method myself in UNIVERSAL,
which simply returns self. So .myself would always be yourself,
which you could store if needed.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn
. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Damian == Damian [EMAIL PROTECTED] writes:
Damian @result = {block}^.(@data);
But hyperdot sort hyperdot doesn't roll off the tongue as easy as
map sort map!
:-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http
Larry == Larry Wall [EMAIL PROTECTED] writes:
Larry @result = for @a; @b - $a, $b { $a op $b }
Larry (presuming we make Cfor actually act like Cmap).
Why not just make map do that?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http
of a similar subroutine in a
superclass that you're completely overriding should even apply?
So, does it make any sense at all to talk about inheriting PRE/POST
as a separate act, other than the natural block start/end from calling
super at the right time?
--
Randal L. Schwartz - Stonehenge Consulting
that, and declined. Not sure of the reasons.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite
instVarAt: and instVarAt:put:.
Anybody can send them!
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite
John == John Siracusa [EMAIL PROTECTED] writes:
John (Can I pre-order the Perl 6 Camel or what? ;)
Of course. You'll almost certainly visit the nodes before the subnodes
in the documentation.
:-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL
collapsed. :)
No two NaNs are alike!
Read it as one of many non-numbers, chosen at random.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See
}
with:
my $this = c$1r;
my $next = c$2r;
return sub { { .$this().$next() } };
Damian }
Damian }
Right? Plus or minus a set of parens or something, eh?
--
Randal L. Schwartz
}}}
Damian is much cleaner.
Or even
for my $x (1..98) {
for my $y (1..(99-$x)) {
for my $z (1..(100-$x-$y)) {
print $x, $y, $z\n if $x ** 2 = $y ** 2 + $z ** 2;
}
}
}
Damian But it certainly does demonstrate TMTOWTDI. ;-)
TMT2WTDI :-)
--
Randal L. Schwartz - Stonehenge
this:
@foo[0] = STDIN;
and then wonder where all the *rest* of your input went?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
S
on a roster some day:
Schwartz,Ian
:-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
e me, if I recall).
Although it is fun when we get to the "Schwartizian Transform Illustrated"
page in my slideset... I get to say "don't wait for the swimsuit issue...
it's not a very pretty sight".
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0
ses swallow up
Peter the following list.
*some* functions. localtime doesn't. my is a unary function, prototyped
vaguely as (\$) or (\@) or (\%).
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security c
"match anything, but keep the
Deven match as short as possible".
No, that's an incorrect description. No wonder you are confused.
Deven Am I really the only one who views it this way? Must I stand
Deven alone?
Yes. Go stand in the corner. :)
Deven If we lived in that ideal
the semantics that were chosen doesn't
Deven mean I don't understand them.
You don't understand the motivation, apparently. That's what I'm
referencing.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/
ontrary for a moment... if this *is* a conspiracy
desgined to lock you out, what point would complaining about it do?
{grin}
To be a contribution to the community, you must have some higher
degree of trust than you are demonstrating. If you can't manage that
on your own, seek assistance elsewhere.
--
Randal L. S
takes you as far as \9 ;-)
Wrong. If you have more than 10 parens visible so far, \10 works just fine.
Jonathan If $1 could be made to work properly on the LHS of s///, I'd vote for
Jonathan that being The Way.
It can't ever. It means $1 from the previous match.
--
Randal L. Schwartz -
ta::Dumper and then wonder why my program is core dumping.
Doh!
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com
the length of "this is a string". Not 2. Not the length of "2". :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
S
esn't take into account
what happens when I give 3 elements to a 7-element-at-a-time reduction
formula.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc
therefore
unoverridable). Do you have a proposal for how to handle that?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Ston
e as
length scalar X
but rather, specialcased VERY SPECIFICALLY for
length @FOO
This is what I don't like about this proposal. It raises more
eyebrows than it fixes. I like the suggestion that it be a warning,
and leave it at that.
--
Randal L. Schwartz - Stonehenge Cons
on.
(Which coderef gets the yield state attached to it, and would this properly
be recognized as a reason to clone the coderef?)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting,
of those. But I'll need further time to process
your proposal to see the counterarguments now.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. et
aybe we do need a new keyword. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrol
s one
"no" and abort after this one
What would you have "last" do? And how would you distinguish "the
other one"?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/
"Perl6" == Perl6 RFC Librarian [EMAIL PROTECTED] writes:
Perl6 This RFC proposes that the second argument to Cbless be made
Perl6 mandatory, and that its semantics be enhanced slightly to cover a
Perl6 common, ugly, and frequently buggy usage.
Yes!
--
Randal L. Schwartz -
"Perl6" == Perl6 RFC Librarian [EMAIL PROTECTED] writes:
Perl6 This RFC proposes a new pseudoclass named CNEXT.
Perl6 This pseudoclass would provide a way of correctly redispatching a method
Perl6 or an autoloaded method.
Yes!
--
Randal L. Schwartz - Stonehenge Consulting Services,
converting a scalar to a list
(there's only twenty or so specific rules :), there's no consistent
way to take this coerced "list in a scalar context" and wrangle it
back to a scalar!
"list" keyword. Just say no.
--
Randal L. Schwartz - Stonehenge Consulting Services,
y function in the middle of a pattern match,
Joe and to back out the call if the match failed.
Already done in 5.6. :) "perldoc perlre".
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security c
"Larry" == Larry Wall [EMAIL PROTECTED] writes:
Larry Randal L. Schwartz writes:
Larry : if ($a == $b) { ... } # should this be string or number comparison?
Larry Actually, it's a syntax error, because of the ... there. :-)
Larry But that reminds me of something I wanted a
but would prevent the code I'm giving right here from running.
So is that something we've agreed, that lvalue subs are *always*
scalars? That'd mean we can move on to the various implementation
details. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL
what Larry intended
here:
array interpolation should work exactly like scalar interpolation
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, e
$ISA_SEARCH or something like that, to keep it in the same package.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com
uot; keyword in Perl. There's a convention that
the C++ people use when coming into Perl to call the simplest
constructor "new", but any name can be used for a constructor in Perl.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://w
you could
read? :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
much stuff this would break, but I
know I always backwhack my {'s regardless of where they are located in
the regex, not counting on the DWIM to do it right.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
red.
If I understand you correctly, I want to disagree with you.
What if the "reduce" was to count the number of undefs?
$count = reduce { $a + not defined $b } 0, @some_list;
Do not discard undef from the source list.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1
"skud" == skud [EMAIL PROTECTED] writes:
skud My $DEITY, someone sedate this man before he drowns us all in
skud Perl RFCs! K.
From the subject line, I thought it was another mailing list for me to
send in a subscription request!
--
Randal L. Schwartz - Stonehenge Consulting Ser
quot; :) a sub
can return only an rvalue. An "array" as an rvalue is always a list.
Unless we disagree on the meaning of array and list. In that case,
let's get back to terminology. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:ht
es sense. It also makes glob-ish
things similar, although I understand this is a separate issue up for
grabs.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting,
t the two subs above correctly as returning a list and an array
Graham then a user may get surprised.
Yes, but the first part is getting the naming right. You don't
"return an array". :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] UR
"Steve" == Steve Fink [EMAIL PROTECTED] writes:
Steve We could add a 'then' keyword.
We have one. It's called "comma in a scalar context". :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.c
ng special.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
e arguments for each of them. :)
I think making that *not* a looping block makes more sense, so we
don't get into this nonsense. The "last" cleanly breaks out of the
innermost loopblock, which by definition doesn't have a return value,
so there's no chance we'll freak out an assignment.
--
R
68 matches
Mail list logo