Repository navigation
Conversation
acl-cqc
force-pushed
the
acl/toyk2_encode
branch
from
October 25, 2026 10:51
6f3a5a9 to
f88d66c
Compare
acl-cqc
force-pushed
the
acl/toyk2_encode
branch
from
November 4, 2026 13:20
f88d66c to
6d11f90
Compare
hsemenenko
reviewed
Nov 4, 2026
Comment on lines
+812
to
+815
| for i in range(len(state.blocks)): | ||
| if not state.blocks.is_borrowed(i): | ||
| state.blocks.take(i).discard() | ||
| state.blocks.discard_all_taken() |
Collaborator
There was a problem hiding this comment.
I think we should panic here if a block has been borrowed. I don't expect a scenario in which there is a block that has been borrowed, and we are discarding the state.
Collaborator
There was a problem hiding this comment.
I'm wrong here, please ignore me.
Collaborator
There was a problem hiding this comment.
I guess it's the responsibility of whomever took the block to discard it, in case state_discard is called before they put it back? Yeah, I don't think that'll happen, and if it did this seems like the correct behaviour to me.
PabloAndresCQ
force-pushed
the
feat/toyk2_encode
branch
from
November 4, 2026 18:26
520127a to
9387c3e
Compare
PabloAndresCQ
force-pushed
the
acl/toyk2_encode
branch
2 times, most recently
from
November 4, 2026 19:33
9fcaa8b to
61d84cb
Compare
PabloAndresCQ
approved these changes
Nov 4, 2026
PabloAndresCQ
left a comment
Collaborator
There was a problem hiding this comment.
Much cleaner! Thanks Alan
PabloAndresCQ
force-pushed
the
acl/toyk2_encode
branch
from
November 4, 2026 19:50
61d84cb to
0e8280e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Into #407.
Replace the
array[Option[RuntimeBlock],...]witharray[RuntimeBlock]and useputandtake(about once each) and guppy's built-in notion of borrowing from arrays to simplify many functions on state. This saves quite a few lines....