-
Notifications
You must be signed in to change notification settings - Fork 354
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: adds new atom ops #6961
base: next/kelvin/410
Are you sure you want to change the base?
hoon: adds new atom ops #6961
Conversation
~/ %rig | ||
|= [=bite b=bloq] | ||
^- step | ||
?@ bite 0 |
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.
Forgot to ask: why are $bite
with step size 1
not converted?
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.
This is a great question -- it's entirely because of +hew
and the pattern I've used to compose calls to it in the directed-messaging packet decoder (see #6932). +hew
takes a $bite
as both a bloq specifier for the reads it will perform and an initial cursor position. It doesn't make sense to default the cursor to anywhere other than 0
, but the makes it a non-standard (and possibly abusive) interpretation of $bite
.
For +rig
in general, it would be simpler to be $-([bite bloq] bite)
and just return the bloq
from its sample when the bite
is an atom, punting on the whole question. But that's less applicable my use-cases in #6963 and packet decoding. I need to play around with it, and possibly split it into two entrypoints.
To be included in hoon %137, as required by #6932.