Skip to content
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

Open
6502 opened this issue Jan 3, 2013 · 7 comments
Open

What about fib(-3) ? #2

6502 opened this issue Jan 3, 2013 · 7 comments

Comments

@6502
Copy link

6502 commented Jan 3, 2013

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...

@munificent
Copy link
Owner

Fortunately, the README is not a valid Vigil program, so Vigil makes no claims to oversee it.

@Reconcyl
Copy link

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.

@refi64
Copy link

refi64 commented May 30, 2017

TBH it would be cool if Vigil just waited like 5 seconds, sent a SIGINT, and used the resulting KeyboardInterrupt traceback to delete the lowest function.

@danShumway
Copy link

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.

@refi64
Copy link

refi64 commented May 30, 2017

Yeah, but isn't procrastination evil?

@danShumway
Copy link

danShumway commented May 30, 2017

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?

@o0Ignition0o
Copy link

Have you considered punishing the user interrupting the process ?

And thou shall trust the seeer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants