3 ms·
But this is bash, which runs on Unixy systems, which have exec. behave_differently is trivial: echo foo exec “$@“ This little hack will carry over to
by amluto 5y ago
But this is bash, which runs on Unixy systems, which have exec. behave_differently is trivial:
echo foo
exec “$@“
This little hack will carry over to some, but possibly not all [0], models of computation. Fixing this would involve cleaning up some definitions in the proof.
[0] Specifically, it does carry over to any model of a program that outputs a stream of symbols one at a time. A single-tape Turing machine that computes a function doesn’t work like that.
- assbuttbuttass 5y agoWhat if the program you're running outputs "foo" in an infinite loop? Then I think the above behave_differently would actually behave the same
- KerrickStaley 5y agoThat does not work. Your example does not change the behavior of the following program: echo foo exec $0
- dskloet 5y agoYour program is very close to the above commenter's program. You could have picked the identical program which is exactly what the proof does.