Aaron Sherman wrote:
On Wed, 2005-03-16 at 03:18, Rod Adams wrote:And it can almost definitely be redefined as a curried form of C<substr> if you really feel the need for it. I'll let you know after I write up C<substr>.
I just posted a fresh copy of S29 to:
Chop removes the last character from a string. Is that no longer useful, or has chomp simply replaced its most common usage?
substr($x,-1) = '';
Hrm... well, I guess it's not SO bad....
=item dumpOne of the nifty things I'm getting into my head is that writing code which talks directly to Parrot should be rather easy. Certainly far more portable than XS ever was. And it's fully open to any module writer.
Yes, but it won't be the same, and it should probably come from a
module. I'm sure that's going to be required by several folks from
several different areas (e.g. for checkpointing and all of the uses that
come from that like process migration). It will also be 99% Parrot's
So while if Perl 5 wanted some capability to be standard in a distribution, it pretty much had to make it a built in function. However, esoteric things like C<dump>, which will most likely be a wrapper for some Parrot utility, but serve no actual purpose to Perl as a language, don't need to be built in at all.
Ah, no. C<rand(:seed($x))> will invoke rand, will it not? That's not
what srand does. srand puts you in a known state, and leaves you there.
Without srand, even if you're using the same PRNG, you can't plug in
someone else's seed, and then call the function that will use it, unless
you can rewind/unshift the PRNG.
Okay, I'll add it back soon.
I'll listen to proposals about how to support better randoms. For now I think C<rand> is a standard PRNG.
-- Rod Adams