@ShadowTheKidWizard Well, the halting problem proves that it is impossible to ever program a program that will tell us if another program (without actually compiling it) will run forever or end.
So say we wrote some code and are tired of testing to see if it will loop forever. There will never be a program that can just look at our code and figure it out for us.
@Annthetutor As long as we're talking about "infinite loops", it's 100% possible to detect those (eg: while true, etc). For other ways to make something run infinitely, say because a specific condition hasn't been met yet, etc that is much harder and depend on much more than just language specific, but also context.
@Annthetutor oh, I don't know if I remember this one. Interesting
@ShadowTheKidWizard I see. Can't it support checking against the last amount of star per starred message when a star is added?
I think what most people do to detect infinite loop though, instead of using keyword/parsing the syntax/language, they just check if it finished in X time instead
that's what the bot on the javascript room is doing at least
@ShadowTheKidWizard good idea
the other problem about knowing when it runs infinitely is knowing when it's supposed to do that or not. eg: detecting when it's doing "nothing" and doing what's it's supposed to do
the hard part is that it's dependent on context, as in, Human definition of it based on the present
at that point, things can become highly philosophical, which may or may not increase the difficulty of this problem
sorry for my rambling...happens sometimes, so I try to restrain myself (but that doesn't always work)
so what I said earlier about it being 100% possible is only true if we only look at the language/syntax only. Looking at the context/what it's supposed to do part, then it's much harder and would make that not-really-possible 100%
that doesn't make it impossible, just not really possible. I'm just playing with meanings here I think
I feel like the only true way to know that it's impossible is to generate every possible program that can run without error, and checks their running time. That's very unlikely to do in the first place given the computation necessary to do that, which isn't there yet. The other problem is checking the running time. If some of them run for 1 year, you cannot know that, unless it finish running.
unless you know a way to know the estimate time based on how a program is structured, but that's probably out of scope here anyway...
@Annthetutor I saw it, I was just mostly rambling/giving my thought on the matter :)