Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^6: Quantum Weirdness and the Increment Operator

by BrowserUk (Pope)
on Jun 25, 2004 at 03:28 UTC ( #369541=note: print w/replies, xml ) Need Help??

in reply to Re^5: Quantum Weirdness and the Increment Operator
in thread Quantum Weirdness and the Increment Operator

Yes and no.

Unless I use srand, print rand() for 1.. 100; will likely give me different output for each run of the program. So no, the output will not be the same. Yes, the output will be 100 random(ish) numbers between 0 and 1.

The return order of keys %hash since 5.8.something is deliberately randomised, so the definition of the order is that they will be random.

This is different to pre-5.8.something in that the order was previously "an order", that was neither random nor easily predictable, but was consistant between runs of the same program on a given build.

The order is both defined, and explainable.

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://369541]
[LanX]: before digging into deep debugging ... I have a strange UTF8 problem, probably it rings a bell:
[LanX]: two utf8 strings from different sources are base64 encoded, but after joining both the umlauts in teh second get deleted
[Corion]: LanX: You can't just join two base64 strings together
[LanX]: (not a high priority bug because I can use some HTML entities in the second string)
[Corion]: base64 is padded to a multiple of 4 chars (or something)
[LanX]: misunderstanding, I joined them before converting to base64
[Corion]: Also, I would be wary of encodings and try to make really sure that both input strings are UTF-8. Maybe join the input strings from one source together to see whether they decode as bad or not
[Corion]: LanX: Then the problem should persist without encoding to base64 too ;)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (13)
As of 2017-01-16 13:53 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (150 votes). Check out past polls.