With the obligatory footnote: "Unless you get into multithreading - then all bets are off." ;-)
With the obligatory footnote: "Unless you get into multithreading - then all bets are off." ;-)
However, from the perspective of the programmer it is non-deterministic. It only becomes deterministic when it is coupled with a particular scheduler and dispatcher. Most programmers strive to write cross platform code.
On what planet? Surely not this one, as most programs are very tightly coupled to particular operating systems.
Regardless, a future version of any single platform could include changes to the scheduler and/or dispatcher.
which is the part that gets rid of the "does what you tell it" bit, since now it's doing what it thinks it should, which might not be very consistent or easily determinable because minor variations during a race can produce wildly differing results.
Just because we don't know the laws that govern quantum mechanics doesn't mean they're not there.
As best we can tell, sometimes certain information doesn't exist so you may very well get something truly random that averages out to something that looks like what we think of as deterministic, classical behavior.
Which is why there's no way to be certain that it is or is not deterministic. According to current knowledge, quantum uncertainty is not deterministic -- solving the Schroedinger wavefunction for hydrogen, for example, shows no way to predict the future location of an electron. The best we can do is a probability distribution.
If, however, as the parent mentions, hidden variables do exist behind quantum mechanics, it could turn out that it was deterministic all along.
</pedantry>
How does that even remotely suggest non-determinism?
> If, however, as the parent mentions, hidden variables do exist behind quantum mechanics,
Isn't it obvious that we're not even remotely close to knowing everything?
The uncertainty principles simply suggests that we perhaps can never grasp or understand all the details; it doesn't in any way imply that these unknown details don't exist. It'd be foolish to think that "because we can't predict it therefore it's non-deterministic".
The computer will do exactly what you tell it to, but your brain is not capable of determining exactly what the computer will do (it'll process billions of instructions a second, if you tried to fully map out the operations of a computer in complete detail you wouldn't get even a fraction of a second done in your lifetime). Which is why we have to use abstractions, models, and various techniques to render that complexity manageable by human minds.
I wish there were a better/more formal way to quote things on HN as it can lead to confusion with attribution. Purely italic text doesn't quite cut it, but nor does the "source code" quoting feature.