Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The Python interactive shell could check the user's input: If it'll take infinitely long to run (e.g., an infinite generator), then it'll halt. If the code will eventually return, then it'll be run, displaying results to the user. Seems simple enough, no?


You'll need some killer heurstics: https://en.wikipedia.org/wiki/Halting_Problem


Er, I sorta knew that I was describing the halting problem, and was wondering if someone would fail to realize my sarcasm...


Yeah, I see that "should be easy enough" at the end. My bad.


That is all programs in general, checking a specific program is totally within bounds.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: