3 ms·
The halting problem is easy to solve most of the time. For instance, you can easily tell whether the following two programs halt: while True: pass
by geofft 5y ago
The halting problem is easy to solve most of the time. For instance, you can easily tell whether the following two programs halt:
while True:
pass
while False:
pass
What's impossible is solving the halting problem 100% of the time with 100% accuracy. Most people don't need to do that. Solving the halting problem most of the time and then saying "I don't know, that's too hard" the rest of the time is of immense practical value, and many practical systems (the kernel's eBPF verifier, the thing in your browser that detects stuck pages, etc.) do exactly that.
In this particular case, tqdm solves the halting problem in cases where it's easy: https://tqdm.github.io/docs/tqdm/#__init__ https://tqdm.github.io/docs/tqdm/#__init__
> total: int or float, optional
> The number of expected iterations. If unspecified, len(iterable) is used if possible. If float("inf") or as a last resort, only basic progress statistics are displayed (no ETA, no progressbar).
- deleted 5y ago[deleted]