From 7b3d7ce560282f0d5ba01053ca5328a186813de8 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Mon, 10 Jun 2024 21:12:07 -0400 Subject: [PATCH] ska: de-unitizes +pull:so --- hoon/codegen/lib/skan.hoon | 27 +++++++++++---------------- hoon/codegen/lib/soak.hoon | 25 +++++++++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/hoon/codegen/lib/skan.hoon b/hoon/codegen/lib/skan.hoon index 4d59a92..7d99cfe 100644 --- a/hoon/codegen/lib/skan.hoon +++ b/hoon/codegen/lib/skan.hoon @@ -221,21 +221,18 @@ [%0 a=@] ?: =(0 @) ~& [%fast-bad-clue clue] gen :: register child core - =/ butt (~(pull so sock.bite) 2) - ?~ butt - ~& %fast-miss-batt gen - =* batt u.butt + =/ batt (~(pull so sock.bite) 2) ?. =(& cape.batt) ~& [%fast-hide-batt pell] gen ?. ?=(^ data.batt) gen - =/ perk (~(pull so sock.bite) a.pare.clue) - ?~ perk ~& %fast-lost-sire gen - =* park u.perk + =/ park (~(pull so sock.bite) a.pare.clue) + :: XX ??? + :: ?. =(& cape.park) ~& %fast-lost-sire gen =/ past=(set path) ?. =(& cape.park) ~ (~(get ju root.cole.gen) data.park) =/ bork (~(pull so park) 2) - =? past ?&(?=(^ bork) =(& cape.u.bork) ?=(^ data.u.bork)) - (~(uni in past) (~(get ju batt.cole.gen) data.u.bork)) + =? past &(?=(%& cape.bork) ?=(^ data.bork)) + (~(uni in past) (~(get ju batt.cole.gen) data.bork)) =/ pale ~(tap in past) |- ^- lore =* pale-loop $ @@ -479,11 +476,10 @@ :: [%0 axe=@] ?: =(0 axe.form) [[[%not 0] [~ | ~]] gen] - =/ salt (~(pull so sock.less) axe.form) - ?~ salt [[[%not axe.form] [~ | ~]] gen] :_ gen - :- [%not axe.form] - [(~(ask qui prot.less) axe.form) u.salt] + :+ [%not axe.form] + (~(ask qui prot.less) axe.form) + (~(pull so sock.less) axe.form) :: [%1 n=*] [[[%one n.form] [~ & n.form]] gen] @@ -647,10 +643,9 @@ %- ~(rep in q) |: [s=*sock b=b] =/ batt (~(pull so s) 2) - ?~ batt b - ?. =(& cape.u.batt) ~& [%cold-miss-batt p] b + ?. =(& cape.batt) ~& [%cold-miss-batt p] b :: split up battery at autocons sites - =* f data.u.batt + =* f data.batt =/ a=@ 1 |- ^- _b ?. ?=([^ *] f) diff --git a/hoon/codegen/lib/soak.hoon b/hoon/codegen/lib/soak.hoon index 590a6e6..22e9e8e 100644 --- a/hoon/codegen/lib/soak.hoon +++ b/hoon/codegen/lib/soak.hoon @@ -219,19 +219,24 @@ == :: axis :: - :: create a sock that is known to be cells down the given axis + :: create a sock that, if known, has cells down the given axis :: and at that axis is one ++ pull |= axe=@ - ^- (unit sock) - ?: =(0 axe) ~ - |- ^- (unit sock) - ?: =(1 axe) `one - ?: ?=(%| cape.one) `[| ~] - ?. ?=(^ data.one) ~ - ?- (cap axe) - %2 $(data.one -.data.one, cape.one ?:(?=(^ cape.one) -.cape.one &), axe (mas axe)) - %3 $(data.one +.data.one, cape.one ?:(?=(^ cape.one) +.cape.one &), axe (mas axe)) + ?< =(0 axe) + |- ^- sock + ?: =(1 axe) one + ?: |(?=(%| cape.one) ?=(@ data.one)) + [| ~] + =+ [now lat]=[(cap axe) (mas axe)] + ?@ cape.one + ?- now + %2 $(axe lat, data.one -.data.one) + %3 $(axe lat, data.one +.data.one) + == + ?- now + %2 $(axe lat, data.one -.data.one, cape.one -.cape.one) + %3 $(axe lat, data.one +.data.one, cape.one +.cape.one) == :: pair ::