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
hoon: minor improvement to +mod and +dvr #6355
Conversation
With this change, the |
Is this a semantic change? Is it possible that the old code would give a different result than the new code? If so, it must be released in a hoon kelvin update so the jet never fires with the wrong nock |
@philipcmonk The only difference should be the one Joe pointed out: the new code gives a different result in the case of "divide by zero" error. Old code = bail: exit What's the protocol for explicitly marking this PR as requiring a hoon kelvin update? Should I dump the kelvin version in this PR, and then all other such changes nicely merge together since they also dump the kelvin version? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it's technically true that this code must be released at the same time as the paired jet changes to avoid a mismatch, it's an utterly trivial mismatch (the error string in the trace when dividing by zero). The livenet version of this code already contains such a mismatch -- the +dvr
jet includes the error string, while the hoon does not. And stack traces are already subject to such mismatches anytime the set of actual jets changes relative to execution history (ie, on replay) -- a problem for another day. I don't think we have to worry about kelvins for this PR specifically.
this will do
@belisarius222 @jalehman Ready for merge |
Companion PR for [#6355](urbit/urbit#6355) in `urbit/urbit` - **they must be released together**. Required changes to `mod` jet to match bail condition of new `mod` logic in Arvo. Tested changes successfully against latest code from `develop` (both `urbit/urbit` and `urbit/vere`).
Unify logic for
div
andmod
indvr
, instead of splitting the logic and repeating the same calculation twice on advr
call.Also add default sample to
dvr
, mirroringdiv
andmod
.Tested changes successfully against latest code from
develop
(bothurbit/urbit
andurbit/vere
).