[kw-pm] Doctor Perl
Eric - fishbot
eric at uc.org
Thu Mar 3 15:56:02 PST 2005
As one might predict, immediately after sending this:
"As far as I can tell, folding the swap into a single statement is pure
masochism. I'm tempted to benchmark, but that's just masochism being
contagious."
...I immediately went and benchmarked the difference.
http://kw.pm.org/wiki/index.cgi?ListShuffle
Enjoy the masochism. If anyone has more insights, please
feel free to post.
fishbot
---- original message : 2005-03-03 10:10pm : lloyd carr ----
> List::Util shuffle -is- Fisher-Yates:
So shuffle is good.
> I don't know much about XLST, I am afraid, though I notice that eXSLT
> implements a rand() somehow. You could look into that.
Already have the rand() I understand, what I don't understand is how to
swap the nodes with the XSLT.
> all XLST solution would be very clean, but I get the impression that you
> are looking to do a proof-of-concept, and thus practicality is irrelevant.
Proof-of-concept is exactly it and of course I have never let practicality
get in the way of fun :-)
I've subscribed to the XSLT and EXSLT lists. I'll lurk for a few days and
then slip my question into the bit stream ;-)
Thanks fishbot
- Lloyd
More information about the kw-pm
mailing list