-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What about fib(-3) ? #2
Comments
Fortunately, the README is not a valid Vigil program, so Vigil makes no claims to oversee it. |
Vigil does not handle functions that go into an infinite loop. Doing so would require solving the halting problem, thereby proving that complete supreme moral vigilance is impossible. |
TBH it would be cool if Vigil just waited like 5 seconds, sent a SIGINT, and used the resulting |
I'm not completely sure I see what the problem is. An infinite loop hasn't finished running yet, so Vigil is simply waiting to see if the oath is fulfilled. It would be improper to prematurely punish a crime; it would be like deleting a function before it ran. Besides, there's no such thing as a truly infinite loop. Eventually our sun will go supernova, at which point the offending code will be removed. |
Yeah, but isn't procrastination evil? |
I don't think it is, but maybe I'm just going soft. Actually, thinking about what you said above, what springs to my mind as evil would be a user interrupting a function before it finished. It speaks to me of a kind of a lack of commitment, or at least some kind of cowardice; are you afraid of what it might return? Maybe there's a way to kill two birds with one stone here, although I'm not completely sure how technically feasible this would be to implement. A user could run a function and Vigil would never prematurely punish it. BUT, the user would need to commit to running the function all the way through, otherwise Vigil would take it as a sign that the function/user were colluding to hide corruption. That way Vigil doesn't prematurely punish code, but will punish code that's slow enough to warrant a user interrupting the process. Again, not sure what Vigil's capabilities are for catching interrupts, but if it's possible for Vigil to catch a user-interrupt, maybe it could punish the wayward function at that point? So you're perfectly free to run code that contains an infinite loop as long as you NEVER interrupt it or kill the process. Do you think that would be enough of a consequence for inefficient code? |
Have you considered punishing the user interrupting the process ?
|
I called fib(-3) and I didn't do anything bad doing that. Now I think the only way out is to remove fib from readme, correct? And what about references to
swear
for which now no examples are provided?May be it's easier if you just wipe this whole repository off...
The text was updated successfully, but these errors were encountered: