r/ProgrammerHumor • • Oct 26 '21

GitHub Copilot, the technology that will replace programmers. Also GitHub Copilot...

27k Upvotes

713 comments sorted by

View all comments

Show parent comment

1

u/HannasAnarion Oct 26 '21

eventually either halt or repeat a previous configuration

Yeah, so what? Whether a program has repeated a configuration doesn't tell you whether it will halt or not. The derivation of the undecidability of the halting problem does not rely on an infinite state machine.

2

u/arvyy Oct 26 '21

That quote is from wikipedia you can control+f for more context https://en.wikipedia.org/wiki/Halting_problem

the undecidability of the halting problem does not rely on an infinite state machine

the halting problem is expressed through Turing machines (or equivalent), which do have infinite memory

1

u/HannasAnarion Oct 26 '21

And the halting problem in reality is understood within the scope of systems with gigabytes of memory, that can be arranged into new configurations until the heat death of the universe happens billions of times over.

2

u/arvyy Oct 26 '21

in reality is understood

sure, but we started with "theoratically decidable" ¯_(ツ)_/¯ yes, it's all just a thought experiment, no one says it has any practical merit

1

u/HannasAnarion Oct 27 '21

It is still not theoretically debatable, because the proof of the undecidability of the halting problem lies in the paradox established by the supposed existence of a halting detector.

If there were such a thing as a program that could predict the halting behavior of another program, you could use it to write a 2nd order function that starts looping if the detector says that it will halt, and will halt if the detector says that it will start looping. Running this program on itself then creates a paradox: when it will halt, it loops, and when it will loop, it halts. This is a paradox. Thus, a general solution to predicting computing behavior is impossible. No infinities necessary.

2

u/arvyy Oct 27 '21

If there were such a thing as a program that could predict the halting behavior of another program

but we're not predicting a halting behavior of a program (directly) -- we're predicting halting behavior of a runtime environment inside which that program is "running". The runtime is in a sandbox, it cannot use halting detector that lies outside of it. I'm not certain about right phrasing, but the way to go I think would be to show that trying to construct

2nd order function that starts looping if the detector says that it will halt

would involve trying to emulate whole runtime environment -- which would encode your input function (since that's what halt detector operates on) -- inside that same runtime environment itself; which isn't possible when we've defined it to be of finite size. And then since you can't construct that higher order function, you can't construct the paradox