lagoon: jet parity with urbit/vere#1057 — Hoon fixes, C ports, regression suite - #75
Merged
Conversation
+diag built its result over (flop (gulf 0 (dec n))), returning the diagonal REVERSED -- same family as the +el-wise-op flop this desk already removed. Matches urbit/urbit#7388 and the natural-order jets in urbit/vere#1057. Maroon's external files are now all relative symlinks (the style saloon already uses) instead of copies: * desk/lib/{lagoon,twoc,fixed,math,saloon}.hoon were symlinks with wrong relative bases -- broken since December -- now point into lagoon/ and libmath/ and saloon/ correctly * desk/sur/lagoon.hoon was a stale pre-tail-generation copy (fxp/%real era); links to lagoon/desk/sur/lagoon.hoon * vere/noun/jets/{q.h,w.h,tree.c} were stale copies of lagoon's vere overlay; linked (i/lagoon.c already was) Maroon's own tinygrad files still target the old lagoon API and will not build until ported; maroon is in-progress and that is accepted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ports the full urbit/vere#1057 fix set (validation, refcounts, NaN comparisons, kernel results -- see that PR) into the %int2-extended 32-bit copy and the stateless-SoftBLAS 64-bit copy, preserving the int2/twoc code and the _la_rnd plumbing. One deliberate divergence from the reference: %mod here follows THIS desk's C-fmod semantics (quotient truncated %z regardless of door mode; canonical quiet NaN, not a crash, on a zero divisor or non-finite quotient), per the desk's own "Vere follow-on" note. The int2 dot case also gains the meta-sing and consistency checks +bin-op asserts. tests/lib/lagoon-jet-parity encodes 22 regression oracles for everything that broke (transpose/diag/trace/abs order and values, reduction ranks, argmin/argmax NaN behavior, NaN comparisons, exact scalar mod/div, desk-fmod %mod, range accumulation and bloq-4 shape, linspace n=1) -- green interpreted against this desk; running it on a jetted numerics binary is the port's acceptance test. A stock- semantics twin lives upstream in urbit/urbit#7388 tests/lib/lagoon. Also corrects the +la doccords: bare la rounds %z (the bunt of $rounding-mode), not %n. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 8, 2026
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.
Companion to urbit/vere#1057 and urbit/urbit#7388, making this repo the canonical source for the fixed lagoon jets.
+diagunflopped (natural diagonal order, matching lagoon: fix element order in +diag/+abs, result shape in bloq-4 +range urbit#7388; this desk had already unflopped+el-wise-op). Doccords corrected: bare+larounds %z (the bunt of $rounding-mode), not %n — the range-accumulation test oracle proved this empirically._checkrewrite, refcounts, NaN-correct comparisons, kernel results — see that PR) ported into both jet lineages:lagoon/vere(32-bit, %int2/twoc preserved) andlagoon/vere64(stateless-SoftBLAS). One deliberate divergence from upstream: %mod follows this desk's C-fmod semantics (quotient truncated %z regardless of door mode; canonical quiet NaN, not a crash, on a zero divisor or non-finite quotient), per the desk's own "Vere follow-on" note.lagoon/desk/tests/lib/lagoon-jet-parity.hoon, 22 oracles for everything that broke (transpose/diag/trace/abs order and values, reduction ranks, argmin/argmax NaN behavior, NaN comparisons, exact scalar mod/div, desk-fmod %mod, range accumulation + bloq-4 shape, linspace n=1). A stock-semantics twin lives upstream in lagoon: fix element order in +diag/+abs, result shape in bloq-4 +range urbit#7388.Verification: suite green interpreted against the desk; green jetted on a fresh hoon-136 fakezod running a vere-ml64-based build with the ported 64-bit lagoon.c (all 22 arms, and 40×40 %i754 mmul in ~4 s vs ~25 s interpreted, confirming the jets fire). The 32-bit lineage is compile-verified; run the same recipe if a 32-bit binary is cut.
🤖 Generated with Claude Code