dill: adds %goad automation

This commit is contained in:
Joe Bryan 2019-11-05 12:58:37 -08:00
parent c930aceec6
commit 5ace479711

View File

@ -8,10 +8,11 @@
-- ::
=> |% :: console protocol
++ axle ::
$: $1 ::
$: $2 ::
hey/(unit duct) :: default duct
dug/(map duct axon) :: conversations
lit/? :: boot in lite mode
dog/_| :: auto-goad
$= hef :: other weights
$: a/(unit mass) ::
b/(unit mass) ::
@ -46,7 +47,10 @@
$>(%wegh task:able:ames) ::
== ::
$: %b ::
$>(%wegh task:able:behn) ::
$> $? %wait ::
%wegh ::
== ::
task:able:behn ::
== ::
$: %c ::
$> $? %merg :: merge desks
@ -76,6 +80,7 @@
$: %g ::
$> $? %conf ::
%deal ::
%goad ::
%wegh ::
== ::
task:able:gall ::
@ -100,7 +105,10 @@
gift:able:ames ::
== == ::
$: %b ::
$% $>(%mass gift:able:behn) ::
$% $> $? %mass ::
%wake ::
== ::
gift:able:behn ::
$>(%writ gift:able:clay) :: XX %slip
== == ::
$: %c ::
@ -149,13 +157,46 @@
^- {(list move) axle}
[(flop moz) all(dug (~(put by dug.all) hen +<+))]
::
++ auto :: stage automation
^+ .
?. dog.all .
=. dog.all |
(pass /auto/one [%b %wait +(now)])
::
++ auto-wake :: resume automation
|= [=wire error=(unit tang)]
?+ wire
?~ error
~|(behn-bad-wake+wire !!)
(crud %wake u.error)
::
[%auto %one ~]
?~ error
~& %behn-goad
(pass / [%g %goad force=| ~])
:: %goad crashed, wait again, then force
::
~& %behn-goad-retry
%. [/auto/two [%b %wait +(now)]]
pass:(crud %goad u.error)
::
[%auto %two ~]
?~ error
~& %behn-goad-again
(pass / [%g %goad force=& ~])
:: %goad crashed again, bail out
::
~& %behn-goad-fail
(crud %goad u.error)
==
::
++ call :: receive input
|= kyz/task:able
^+ +>
?+ -.kyz ~& [%strange-kiss -.kyz] +>
$flow +>
$harm +>
$hail (send %hey ~)
$hail auto:(send %hey ~)
$belt (send `dill-belt`p.kyz)
$text (from %out (tuba p.kyz))
$crud :: (send `dill-belt`[%cru p.kyz q.kyz])
@ -293,7 +334,7 @@
$c '6'
$w '7'
~ '9'
==
==
--
::
++ heft
@ -371,7 +412,7 @@
(deal / [%pump ~])
::
++ take :: receive
|= sih/sign
|= {tea/wire sih/sign}
^+ +>
?- sih
{?($a $b $c $e $f $g $i $j) $mass *}
@ -425,6 +466,9 @@
::
{$d $blit *}
(done +.sih)
::
{$b $wake *}
(auto-wake tea error.sih)
==
:: +wegh: receive a memory report from a vane and maybe emit full report
::
@ -554,8 +598,38 @@
[moz ..^$]
::
++ load :: import old state
|= old/axle
..^$(all old)
=> |%
:: without .dog
::
++ axle-one
$: $1
hey/(unit duct)
dug/(map duct axon)
lit/?
$= hef
$: a/(unit mass)
b/(unit mass)
c/(unit mass)
e/(unit mass)
f/(unit mass)
g/(unit mass)
i/(unit mass)
j/(unit mass)
==
$= veb
$~ (~(put by *(map @tas log-level)) %hole %soft)
(map @tas log-level)
==
::
++ axle-both
$%(axle-one axle)
--
::
|= old=axle-both
?- -.old
%1 $(old [%2 [hey dug lit dog=& hef veb]:old])
%2 ..^$(all old)
==
::
++ scry
|= {fur/(unit (set monk)) ren/@tas why/shop syd/desk lot/coin tyl/path}
@ -576,6 +650,6 @@
::
~& [%dill-take-no-flow hen -.q.hin +<.q.hin]
[~ ..^$]
=^ moz all abet:(take:u.nus q.hin)
=^ moz all abet:(take:u.nus tea q.hin)
[moz ..^$]
--