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

UIP-0123 %loop hint crash determinism question #59

Open
belisarius222 opened this issue Apr 22, 2024 · 1 comment
Open

UIP-0123 %loop hint crash determinism question #59

belisarius222 opened this issue Apr 22, 2024 · 1 comment
Assignees

Comments

@belisarius222
Copy link
Contributor

The UIP suggests that the interpreter should produce a deterministic error (bail: exit) when the %loop hint triggers. While this does not violate the Nock spec, @joemfb, @frodwith, and I all had the same gut feeling that it would be more conservative to fail nondeterministically (bail:fail), since that would preserve the existing behavior, i.e. an infinite loop could only ever result in a nondeterministic error in any interpreter that doesn't support the %loop hint.

@eamsden Do you have a specific use case in mind that would benefit from this error being catchable? If not, we are leaning toward making this a bail:fail.

@eamsden
Copy link
Contributor

eamsden commented Apr 22, 2024

Yes the case is precisely where you would otherwise keep a set of some sort in your subject to track if you are recurring on some already seen part of . The goal of the hint isn't just to turn otherwise-infinitely-looping nock into a crash, but to allow the removal of explicit checks in hoon while retaining the ability to crash deterministically instead of infinite-looping.

@joemfb there is state in the Hoon compiler like this, right?

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

2 participants