Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Fang-
Copy link
Collaborator

@Fang- Fang- commented Oct 31, 2025

summary

Removes doccords types and their parsers from hoon.hoon, and write the corresponding state migrations. Overall compilation speeds up by ~25% and types print more compactly again.

changes

Introduces +h137 into hoon.hoon and +a236 into arvo.hoon for declarations of the types corresponding to those kelvin versions. These come paired with the necessary migration helpers. They refer to the current types through a similar "kelvin arm" so that we don't have to update any references inside the old types in the future.

For the vanes and affected agents we have no such niceties, I simply stuck to the existing pattern. Open to updating those to a similar pattern, but seems out of scope for this PR.

testing & release ops

I have tested this by running the migration and verifying that subsequent kernel reloads function normally. Fresh boot yet untested. Booting from pill works too.

Depends on a corresponding vere PR to signal compatibility with the hoon and arvo kelvins herein and provide an appropriate jet dashboard. See also vere's next/kelvin/408 branch.

measured improvements

Once I have a vere with updated jet dashboard, I can run additional measurements and give conclusive numbers on the performance impact here. Across three samples from a debug-symbols vere build, both before and after, this takes the kernel compilation steps triggered by changing hoon.hoon on my machine (M1) down from ~s275 to ~s200 (per their bout hints), so about a 25% overall improvement. Better than expected!

Additionally, this greatly improves type printing, making it detect list and tree structures much earlier. An example nest-fail goes from 234 down to 90 lines of output.

Fang- added 10 commits October 14, 2025 21:55
This makes parsing ~3.5x faster. We leave the types untouched, inserting
bunts where necessary, to minimize the diff of this commit. Further work
to follow, but not strictly required to reap the perf benefits here.
Since we no longer parse for them, we can rip them out entirely. This
gives us approximately 15% perf improvement on compilation.

The most invasive part of this change is taking the $what off of $tomes,
which affects a lot of code, but mostly in very trivial ways.

Note that we retain a nesting sample type on +loot, because that's
jetted. This way we don't have to coordinate a jet update. We eat a
+run:by to make this work, but those maps shouldn't ever be huge in
practice.
Bumps the hoon kelvin version to 136 and restores the original 137 types
inside of a `+h137` core. There we also include `+next-*` arms for
converting 137 types to their 136 equivalents.

We sprinkle `~+` on a handful of the upgrade arms to make running them
on real-world values feasible.
To accommodate the hoon 136 changes, we need to migrate all the types we
stored in state. We add an `+a236` core that contains the old types
(using hoon's `+h137`) and helpers for migrating. This includes one for
`$cage`: it's not used inside arvo proper, but will be helpful to vanes.
Upgrade from hoon 137 to 136.
Upgrade from hoon 137 to 136.

Because of how the `+load` is written, we end up touching a bunch of the
old types and their migration functions. Restructuring this to prevent
this in the future is out of scope (for now).
Upgrade from hoon 137 to 136.

Because of how the `+load` is written, we end up touching a bunch of the
old types and their migration functions. Restructuring this to prevent
this in the future is out of scope (for now).
Hoon 136 no longer includes the doccord types. This affects the xray and
pprint libraries, and removes the dprint library's raison d'être.
Removes doccords-related types and logic, and migrates the types of
bound variables.
Migrate the vases in `.starting` to the new type.
Fang- added 5 commits November 3, 2025 21:06
For 3650ef3, where these were forgotten.
These should've been included in a33c47e but slipped through somehow.
Prior to removing doccords, presumably due to doccords parser behavior,
we allowed comments at the direct end of file, without a trailing
newline. 60af617 broke this behavior.

It's probably sane to allow comments without a trailing newline in
general, so here we update the comment parser +vul to either parse a
newline or, failing that, check for end of the string.
That library was removed in a33c47e.
Fang- added a commit to urbit/vere that referenced this pull request Nov 6, 2025
Entirely cargo-culted from adf3c65. No actual jet changes yet, but we
could imagine updating the +loot jet to drop the always-empty doccords
(see urbit/urbit#7252).
@Fang- Fang- changed the base branch from develop to next/kelvin/408 November 6, 2025 14:07
Fang- added a commit to urbit/vere that referenced this pull request Nov 6, 2025
Almost entirely cargo-culted from adf3c65, with the addition of the
kelvin changes in mars.c.

No actual jet changes yet, but we could imagine updating the +loot
jet to drop the always-empty doccords (see urbit/urbit#7252).
Telescoping kelvins and all that.
::
++ a234 .
++ a235
=, h136
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mb should also include a234

Suggested change
=, h136
=, h136
=, a234

@drbeefsupreme
Copy link
Collaborator

F

And remove the old cases from the $heir. Right now they don't travel
across version boundaries anyway, so we can just drop them and their
conversion functions.

Also adds a =, to the top of +a235 so we won't need to touch it again
in the future.
We had left in a ~ preceding the tomes to remain compatible with the old
jets. But since we're moving to a new jet dashboard for the new hoon
version anyway, and we do hit this code a bunch, better to remove the
unnecessary cell.
If you =, the old hoon before the current arvo, then the context of the
current arvo shadows the old types that we want to use. Slightly
annoying, but hopefully still beats manually pointing into the old hoon
core.
Fang- added a commit to urbit/vere that referenced this pull request Nov 13, 2025
As part of urbit/urbit#7252 the signature of +loot changes to drop the
doccords on cores entirely. Here, we take out a u3t call to match that,
making sure to keep a copy of the old jet around for pre-135 jets.
pkova added a commit to urbit/vere that referenced this pull request Nov 17, 2025
As part of urbit/urbit#7252 the signature of +loot changes to drop the
doccords on cores entirely. Here, we take out a u3t call to match that,
making sure to keep a copy of the old jet around for pre-135 jets.

I put the old version of the jet in the `jets/136` folder, and make all
old `tree.c` files refer to that version of the jet instead. Open to
discussion on the pattern/approach here. On the upside, old jet code
contained within the respective `jets/[version]`. On the downside,
annoying to have to change the older jet definitions to point at
`myjet_123` instead.
Copy link
Collaborator

@joemfb joemfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will do

@pkova pkova merged commit c846134 into next/kelvin/408 Nov 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants