News for hackers. Stuff that matters.
Re:'Zeno effect' verified: Atoms won't move while you watch by DyslexicAtheist on Friday October 23, 2015 @07:35AM (#10437932)
could swear I've had some debugging / system testing sessions where the effect of me looking into it changed its state :-)
Re:'Zeno effect' verified: Atoms won't move while you watch by rybosome on Friday October 23, 2015 @07:49AM (#10437973)
We call those "heisenbugs" - one of the most terrifying and maddening things you can encounter prior to a launch. I'm almost positive that I remember reading a sort from a game dev who ran into one of these right before a release, where printing some variable caused it to have the correct value; in this case, it was left in the game.
Re:'Zeno effect' verified: Atoms won't move while you watch by EwanG on Friday October 23, 2015 @08:45AM (#10438213)
Well, I know that I ran into a situation (and may once have posted about it) in a C program where I was doing printf to debug a program, and it ran fine. Whenever I removed them, the program would crash. Finally discovered that the printf debugging was forcing garbage collection which took care of a bad pointer somewhere else in the program. Honestly can't remember if I ever found the pointer or just left the printfs in the code...
Re:'Zeno effect' verified: Atoms won't move while you watch by nitrogen on Friday October 23, 2015 @01:43PM (#10440104)
Thank goodness we have Valgrind these days. Though I don't know how well it would handle a C app with a garbage collector.

Calling printf can (will) change what's beyond the stack of the calling function, so if the pointer in question pointed outside the active stack, printf may have put a safer value there by coincidence.

Re:'Zeno effect' verified: Atoms won't move while you watch by backlava on Friday October 23, 2015 @09:06AM (#10438296)
There's the related example of the segfault termination message that was changed in a hex editor to "thank you for playing!" Wing Commander, maybe.
Re:'Zeno effect' verified: Atoms won't move while you watch by knodi123 on Friday October 23, 2015 @12:49PM (#10439751)
That's a classic!
Re:'Zeno effect' verified: Atoms won't move while you watch by justifier on Friday October 23, 2015 @01:09PM (#10439878)
any language with mutable values will drive an unwarned mind insane

methods of disassociating mutable objects before printing will save you from some heisenbugs

a la javascript

    console.log(JSON.parse(JSON.stringify(obj))
Re:'Zeno effect' verified: Atoms won't move while you watch by knodi123 on Friday October 23, 2015 @12:51PM (#10439772)
This happens all the time. I very recently had an issue where a deadlock was fixed by a print statement, because two lists were being lazily evaluated at the same time, and the print statement forced one of the lists to be evaluated earlier and finished by the time the deadlock was occurring.