Re:Gödel's Incompleteness Theorem in Bash
by geysersam on Friday February 25, 2022 @02:44AM
(#30464636)
Not always. ;)
Specifically, if my_program.sh outputs some 1024 lines then it is still nonzero probability that your behave_differently.sh does not in fact behave differently.
[ Parent
| on HN ]
One could try to guarantee unique outputs with
sleep 1
date
but the intended requirement of behave_differently is that it produces
different output when run on a computer in exactly the same state. Or equivalently, that the program doesn't depend on the computer state, which is true in the more formal setting of universal Turing machines that start from a fixed state.
Re:Gödel's Incompleteness Theorem in Bash
by geysersam on Friday February 25, 2022 @03:29AM
(#30464918)
This does not solve the issue. behave_different.sh has to behave different *all* the time *on every input*. Not just 99.999999% of the time.
Imagine my_program.sh says: echo "2022-02-26 10:30:00" and you run your version of behave_differently.sh at 10:29:59 on the 26/2. Then the output is the same.
If you want something that always behaves differently, why not just concatenating something to whatever the output of the other script would be? I'm familiar with the halting problem, but considering the quick description inside this post I don't see which part of it would forbid this
Re:Gödel's Incompleteness Theorem in Bash
by geysersam on Friday February 25, 2022 @01:05PM
(#30470183)
If my_program.sh runs forever - how will you obtain its output?
I think that's the problem here.
You don't need to wait for it to terminate if you just print something and then invoke my_program.sh
Re:Gödel's Incompleteness Theorem in Bash
by charcircuit on Friday February 25, 2022 @02:48AM
(#30464673)
No, there's a 0% chance my implementation outputs 1 as that is only 1 byte long. If you outputted 1023 0s and then a 1 there would be a 2^-1024 chance. That probability is too small to practically happen. The heat death of the universe will happen first.
> The heat death of the universe will happen first.
No, the heat death might be _more likely_ to happen first, but it's not guaranteed.