From db21fad4dd0581c7ae6beb8392eafb45d8e394e3 Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Wed, 10 Jun 2020 04:16:25 -0400 Subject: [PATCH] gall: WIP load-lost --- pkg/arvo/app/goad.hoon | 20 +++--- pkg/arvo/sys/vane/gall.hoon | 122 ++++++++++++++++++++++++++++++++---- 2 files changed, 122 insertions(+), 20 deletions(-) diff --git a/pkg/arvo/app/goad.hoon b/pkg/arvo/app/goad.hoon index b90a0f0e27..1f55f7b01c 100644 --- a/pkg/arvo/app/goad.hoon +++ b/pkg/arvo/app/goad.hoon @@ -11,9 +11,7 @@ |_ =bowl:gall +* this . def ~(. (default-agent this %|) bowl) -++ on-init on-init:def -++ on-save on-save:def -++ on-load on-load:def +:: ++ on-poke |= [=mark =vase] ?: ?=([%noun * %go] +<) @@ -22,10 +20,18 @@ [(goad &) this] (on-poke:def mark vase) :: -++ on-watch on-watch:def -++ on-leave on-leave:def -++ on-peek on-peek:def +++ on-arvo + |= [wir=wire sin=sign-arvo] + ?+ wir (on-arvo:def wir sin) + [%clay ~] `this + == +:: ++ on-agent on-agent:def -++ on-arvo on-arvo:def ++ on-fail on-fail:def +++ on-init on-init:def +++ on-leave on-leave:def +++ on-load on-load:def +++ on-peek on-peek:def +++ on-save on-save:def +++ on-watch on-watch:def -- diff --git a/pkg/arvo/sys/vane/gall.hoon b/pkg/arvo/sys/vane/gall.hoon index 0f050ee14d..ba89ea8c7a 100644 --- a/pkg/arvo/sys/vane/gall.hoon +++ b/pkg/arvo/sys/vane/gall.hoon @@ -249,7 +249,7 @@ - %6 running.agents-5 %- ~(run by running.agents-5.state-5) - |=(=yoke-3 `egg`+:yoke-3(agent on-save:agent.yoke-3)) + |=(=yoke-3 `egg`+:yoke-3(agent-3 on-save:agent-3.yoke-3)) == :: ++ state-5 @@ -297,11 +297,63 @@ live=? =stats =watches - =agent + =agent-3 =beak marks=(map duct mark) == :: + ++ agent-3 + =< form + |% + +$ step (quip card form) + +$ card (wind note gift) + +$ note note-2 + +$ task task:agent + +$ sign sign:agent + +$ gift gift:agent + ++ form + $_ ^| + |_ bowl + ++ on-init + *(quip card _^|(..on-init)) + :: + ++ on-save + *vase + :: + ++ on-load + |~ old-state=vase + *(quip card _^|(..on-init)) + :: + ++ on-poke + |~ [mark vase] + *(quip card _^|(..on-init)) + :: + ++ on-watch + |~ path + *(quip card _^|(..on-init)) + :: + ++ on-leave + |~ path + *(quip card _^|(..on-init)) + :: + ++ on-peek + |~ path + *(unit (unit cage)) + :: + ++ on-agent + |~ [wire sign] + *(quip card _^|(..on-init)) + :: + ++ on-arvo + |~ [wire sign-arvo-2] + *(quip card _^|(..on-init)) + :: + ++ on-fail + |~ [term tang] + *(quip card _^|(..on-init)) + -- + -- + :: ++ state-2-to-3 |= =state-2 ^- state-3 @@ -318,14 +370,14 @@ :: ++ agent-2-to-3 |= =agent-2 - ^- agent + ^- agent-3 => |% ++ cards-2-to-3 |= cards=(list card:^agent-2) - ^- (list card:agent) + ^- (list card:agent-3) %+ turn cards |= =card:^agent-2 - ^- card:agent + ^- card:agent-3 ?. ?=([%give ?(%fact %kick) *] card) card %=(card path.p (drop path.p.card)) -- @@ -369,8 +421,8 @@ [(cards-2-to-3 cards) this] :: ++ on-arvo - |= [=wire =sign-arvo] - =^ cards agent-2 (on-arvo:pass wire sign-arvo) + |= [=wire =sign-arvo-2] + =^ cards agent-2 (on-arvo:pass wire sign-arvo-2) [(cards-2-to-3 cards) this] :: ++ on-fail @@ -403,12 +455,56 @@ marks=(map duct mark) == :: + ++ care-2 + |= * + =+ ;;(c=care:clay +<) + ?< ?=(?(%a %b %c %r %s) c) + c + :: + ++ sign-arvo-2 + |= * :: cannot clam + =| s=sign-arvo + ?+ s s + [?(%b %c) %writ *] + ?~ p.s s + s(p.p.u.p ;;(care-2 p.p.u.p.s)) + :: + [?(%b %c) %wris *] + %= s + q + %- ~(run in q.s) + |= [c=care:clay =path] + [;;(care-2 c) path] + == + == + :: + ++ note-arvo-2 + |= * :: cannot clam + =| $= n + $% note-arvo + [%g %conf dock dock] + [%f %build *] + [%f %keep *] + [%f %kill *] + [%f %trim *] + [%f %vega *] + [%f %wegh *] + [%f %wipe *] + == + ?< ?=([%g %conf @tas] n) + n + :: + +$ note-2 + $% [%arvo =note-arvo-2] + [%agent [=ship name=term] =task:agent] + == + :: ++ agent-2 =< form |% +$ step (quip card form) +$ card (wind note gift) - +$ note note:agent + +$ note note-2 +$ task task:agent +$ sign sign:agent +$ gift @@ -451,7 +547,7 @@ *(quip card _^|(..on-init)) :: ++ on-arvo - |~ [wire sign-arvo] + |~ [wire sign-arvo-2] *(quip card _^|(..on-init)) :: ++ on-fail @@ -537,9 +633,9 @@ [cards this] :: ++ on-arvo - |= [=wire =sign-arvo] - ?< ?=([%d %pack *] sign-arvo) - =^ cards agent-0 (on-arvo:pass wire `sign-arvo-0`sign-arvo) + |= [=wire =sign-arvo-2] + ?< ?=([%d %pack *] sign-arvo-2) + =^ cards agent-0 (on-arvo:pass wire `sign-arvo-0`sign-arvo-2) [cards this] :: ++ on-fail @@ -576,7 +672,7 @@ |% +$ step (quip card form) +$ card (wind note gift) - +$ note note:agent + +$ note note-2 +$ task task:agent +$ gift gift:agent-2 +$ sign sign:agent