From a2645c2f12dfad65a512eaf43b167321aafff5e3 Mon Sep 17 00:00:00 2001 From: midden-fabler Date: Fri, 2 Feb 2024 11:36:14 -0500 Subject: [PATCH] ames, hoon: add run:to, speed up ames migration --- pkg/arvo/sys/hoon.hoon | 6 ++++++ pkg/arvo/sys/vane/ames.hoon | 31 +++++++++++++++---------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/pkg/arvo/sys/hoon.hoon b/pkg/arvo/sys/hoon.hoon index 94115d9622..05c723fcd2 100644 --- a/pkg/arvo/sys/hoon.hoon +++ b/pkg/arvo/sys/hoon.hoon @@ -1795,6 +1795,12 @@ [b ~ ~] bal(l.a $(a l.a)) :: + ++ run :: apply gate to values + |* b=gate + |- + ?~ a a + [n=(b n.a) l=$(a l.a) r=$(a r.a)] + :: ++ tap :: adds list to end =+ b=`(list _?>(?=(^ a) n.a))`~ |- ^+ b diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index 6f5db03596..a7c977eb94 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -5654,27 +5654,26 @@ keens [keens.s ~] :: snd.+ - %- malt - %+ turn - ~(tap by snd.+.s) + %- ~(urn by snd.+.s) |= [=bone m=message-pump-state-17] - :- bone + =/ hed + ?: =(1 (end 0 bone)) + ?: =(0 (end 0 (rsh 0 bone))) + %boon + %naxplanation + %plea %= m unsent-messages - %- ~(gas to *(qeu message)) - %+ turn - ~(tap to unsent-messages.m) + =* um unsent-messages.m + => [..message hed=hed um=um ..cue] + ~+ %- ~(run to um) |= b=message-blob ^- message - =/ hed - ?: =(1 (end 0 bone)) - ?: =(0 (end 0 (rsh 0 bone))) - %boon - %naxplanation - %plea - =/ msg =>([cue=cue arg=b] ~+((cue arg))) - ;;(message [hed msg]) - == == == + => [..message hed=hed ..cue arg=b] + ~+ ;;(message [hed (cue arg)]) + == + == + == -- :: +scry: dereference namespace ::