From c5d3be7be2a19963425ee3d481393c4189ff4acd Mon Sep 17 00:00:00 2001 From: pkova Date: Fri, 26 Jan 2024 01:31:21 +0200 Subject: [PATCH 1/2] clay: do not return false conversion gate from build-cast --- pkg/arvo/app/herm.hoon | 1 - pkg/arvo/sys/vane/clay.hoon | 32 +++++++------------------------- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/pkg/arvo/app/herm.hoon b/pkg/arvo/app/herm.hoon index f20bf2b2d8..8c2b77f06a 100644 --- a/pkg/arvo/app/herm.hoon +++ b/pkg/arvo/app/herm.hoon @@ -5,7 +5,6 @@ :: keep relevant mark conversions in cache for performance :: /$ blit-to-json %blit %json -/$ json-to-blit %json %blit /$ json-to-task %json %herm-task :: =, jael diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index 65230a0cde..9d8d1a7deb 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -749,24 +749,19 @@ :: try direct +grab :: =^ new=vase nub (build-fit %mar b) + =/ rib (mule |.((slap new !,(*hoon grab)))) + =/ arm=? + ?: ?=(%| -.rib) %.n + =/ lab (mule |.((slob a p.p.rib))) + ?: ?=(%| -.lab) %.n + p.lab =/ rab (mule |.((slap new tsgl/[limb/a limb/%grab]))) - ?: &(?=(%& -.rab) ?=(^ q.p.rab)) + ?: &(arm ?=(%& -.rab) ?=(^ q.p.rab)) %+ gain-leak cast+a^b |= nob=state %- (trace 4 |.("{} -> {}: +{(trip a)}:grab:{(trip b)}")) =. nub nob :_(nub vase+p.rab) - :: try +jump - :: - =/ jum (mule |.((slap old tsgl/[limb/b limb/%jump]))) - ?: ?=(%& -.jum) - =/ via !<(mark p.jum) - %- (trace 4 |.("{} -> {}: via {} per +jump:{(trip a)}")) - (compose-casts a via b) - ?: ?=(%& -.rab) - =/ via !<(mark p.rab) - %- (trace 4 |.("{} -> {}: via {} per +grab:{(trip b)}")) - (compose-casts a via b) ?: ?=(%noun b) %+ gain-leak cast+a^b |= nob=state @@ -774,19 +769,6 @@ =. nub nob :_(nub vase+same.bud) ~|(no-cast-from+[a b] !!) - :: - ++ compose-casts - |= [x=mark y=mark z=mark] - ^- [soak state] - =^ uno=vase nub (build-cast x y) - =^ dos=vase nub (build-cast y z) - %+ gain-leak cast+x^z - |= nob=state - =. nub nob - :_ nub :- %vase - %+ slap - (with-faces uno+uno dos+dos ~) - !,(*hoon |=(_+<.uno (dos (uno +<)))) :: +build-tube: produce a $tube mark conversion gate from .a to .b :: ++ build-tube From 8dc62a6cbe55567042b174800c9363cb39ff1b15 Mon Sep 17 00:00:00 2001 From: pkova Date: Fri, 26 Jan 2024 19:15:25 +0200 Subject: [PATCH 2/2] clay: restore +jump --- pkg/arvo/sys/vane/clay.hoon | 46 ++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index 9d8d1a7deb..d1cc404632 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -729,11 +729,7 @@ :: %- (trace 1 |.("make cast {} -> {}")) =^ old=vase nub (build-fit %mar a) - ?: =/ ram (mule |.((slap old !,(*hoon grow)))) - ?: ?=(%| -.ram) %.n - =/ lab (mule |.((slob b p.p.ram))) - ?: ?=(%| -.lab) %.n - p.lab + ?: (has-arm %grow b old) :: +grow core has .b arm; use that :: %+ gain-leak cast+a^b @@ -749,12 +745,7 @@ :: try direct +grab :: =^ new=vase nub (build-fit %mar b) - =/ rib (mule |.((slap new !,(*hoon grab)))) - =/ arm=? - ?: ?=(%| -.rib) %.n - =/ lab (mule |.((slob a p.p.rib))) - ?: ?=(%| -.lab) %.n - p.lab + =/ arm=? (has-arm %grab a new) =/ rab (mule |.((slap new tsgl/[limb/a limb/%grab]))) ?: &(arm ?=(%& -.rab) ?=(^ q.p.rab)) %+ gain-leak cast+a^b @@ -762,6 +753,17 @@ %- (trace 4 |.("{} -> {}: +{(trip a)}:grab:{(trip b)}")) =. nub nob :_(nub vase+p.rab) + :: try +jump + :: + =/ jum (mule |.((slap old tsgl/[limb/b limb/%jump]))) + ?: &((has-arm %jump a old) ?=(%& -.jum)) + =/ via !<(mark p.jum) + %- (trace 4 |.("{} -> {}: via {} per +jump:{(trip a)}")) + (compose-casts a via b) + ?: &(arm ?=(%& -.rab)) + =/ via !<(mark p.rab) + %- (trace 4 |.("{} -> {}: via {} per +grab:{(trip b)}")) + (compose-casts a via b) ?: ?=(%noun b) %+ gain-leak cast+a^b |= nob=state @@ -769,6 +771,28 @@ =. nub nob :_(nub vase+same.bud) ~|(no-cast-from+[a b] !!) + :: + ++ compose-casts + |= [x=mark y=mark z=mark] + ^- [soak state] + =^ uno=vase nub (build-cast x y) + =^ dos=vase nub (build-cast y z) + %+ gain-leak cast+x^z + |= nob=state + =. nub nob + :_ nub :- %vase + %+ slap + (with-faces uno+uno dos+dos ~) + !,(*hoon |=(_+<.uno (dos (uno +<)))) + :: + ++ has-arm + |= [arm=@tas =mark core=vase] + ^- ? + =/ rib (mule |.((slap core [%wing ~[arm]]))) + ?: ?=(%| -.rib) %.n + =/ lab (mule |.((slob mark p.p.rib))) + ?: ?=(%| -.lab) %.n + p.lab :: +build-tube: produce a $tube mark conversion gate from .a to .b :: ++ build-tube