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

hoon: adds new atom ops #6961

Open
wants to merge 5 commits into
base: next/kelvin/410
Choose a base branch
from
Open

hoon: adds new atom ops #6961

wants to merge 5 commits into from

Conversation

joemfb
Copy link
Member

@joemfb joemfb commented Apr 10, 2024

To be included in hoon %137, as required by #6932.

~/ %rig
|= [=bite b=bloq]
^- step
?@ bite 0
Copy link
Contributor

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?

Copy link
Member Author

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.

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

Successfully merging this pull request may close these issues.

None yet

2 participants