mirror of
https://github.com/urbit/shrub.git
synced 2025-01-08 06:00:27 +03:00
11. single-home %gall state-machine
This commit is contained in:
parent
66dbdb49f7
commit
e1b91cbb84
@ -107,17 +107,15 @@
|
|||||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||||
++ mo
|
++ mo
|
||||||
~% %gall-mo +> ~
|
~% %gall-mo +> ~
|
||||||
|_ $: $: our/@p
|
|_ $: $: hen=duct
|
||||||
hen/duct
|
moz=(list move)
|
||||||
moz/(list move)
|
|
||||||
==
|
==
|
||||||
mast
|
mast
|
||||||
==
|
==
|
||||||
++ mo-abed :: initialize
|
++ mo-abed :: initialize
|
||||||
|= {our/@p hen/duct}
|
|= hen=duct
|
||||||
^+ +>
|
^+ +>
|
||||||
%_ +>
|
%_ +>
|
||||||
our our
|
|
||||||
hen hen
|
hen hen
|
||||||
+<+ (~(got by pol.all) our)
|
+<+ (~(got by pol.all) our)
|
||||||
==
|
==
|
||||||
@ -1310,14 +1308,14 @@
|
|||||||
?. (~(has by pol.all) p.p.q.hic)
|
?. (~(has by pol.all) p.p.q.hic)
|
||||||
~& [%gall-not-ours p.p.q.hic]
|
~& [%gall-not-ours p.p.q.hic]
|
||||||
[~ ..^$]
|
[~ ..^$]
|
||||||
mo-abet:(mo-conf:(mo-abed:mo p.p.q.hic hen) q.p.q.hic q.q.hic)
|
mo-abet:(mo-conf:(mo-abed:mo hen) q.p.q.hic q.q.hic)
|
||||||
::
|
::
|
||||||
$deal
|
$deal
|
||||||
=< mo-abet
|
=< mo-abet
|
||||||
?. (~(has by pol.all) q.p.q.hic) :: either to us
|
?. (~(has by pol.all) q.p.q.hic) :: either to us
|
||||||
?> (~(has by pol.all) p.p.q.hic) :: or from us
|
?> (~(has by pol.all) p.p.q.hic) :: or from us
|
||||||
(mo-away:(mo-abed:mo p.p.q.hic hen) q.p.q.hic q.q.hic)
|
(mo-away:(mo-abed:mo hen) q.p.q.hic q.q.hic)
|
||||||
(mo-come:(mo-abed:mo q.p.q.hic hen) p.p.q.hic q.q.hic)
|
(mo-come:(mo-abed:mo hen) p.p.q.hic q.q.hic)
|
||||||
::
|
::
|
||||||
$init
|
$init
|
||||||
:: ~& [%gall-init p.q.hic]
|
:: ~& [%gall-init p.q.hic]
|
||||||
@ -1332,10 +1330,10 @@
|
|||||||
?: ?=($ge i.q.q.hic)
|
?: ?=($ge i.q.q.hic)
|
||||||
=+ mes=((hard {@ud rook}) r.q.hic)
|
=+ mes=((hard {@ud rook}) r.q.hic)
|
||||||
=< mo-abet
|
=< mo-abet
|
||||||
(mo-gawk:(mo-abed:mo our hen) him dap mes)
|
(mo-gawk:(mo-abed:mo hen) him dap mes)
|
||||||
=+ mes=((hard {@ud roon}) r.q.hic)
|
=+ mes=((hard {@ud roon}) r.q.hic)
|
||||||
=< mo-abet
|
=< mo-abet
|
||||||
(mo-gawd:(mo-abed:mo our hen) him dap mes)
|
(mo-gawd:(mo-abed:mo hen) him dap mes)
|
||||||
::
|
::
|
||||||
$wegh
|
$wegh
|
||||||
:_ ..^$ :_ ~
|
:_ ..^$ :_ ~
|
||||||
@ -1381,7 +1379,7 @@
|
|||||||
[~ ~]
|
[~ ~]
|
||||||
?. ?=(^ tyl)
|
?. ?=(^ tyl)
|
||||||
~
|
~
|
||||||
(mo-peek:(mo-abed:mo his *duct) syd high+`his ren tyl)
|
(mo-peek:(mo-abed:mo *duct) syd high+`his ren tyl)
|
||||||
::
|
::
|
||||||
++ stay :: save w+o cache
|
++ stay :: save w+o cache
|
||||||
`axle`all
|
`axle`all
|
||||||
@ -1392,8 +1390,7 @@
|
|||||||
^+ [*(list move) ..^$]
|
^+ [*(list move) ..^$]
|
||||||
~| [%gall-take tea]
|
~| [%gall-take tea]
|
||||||
?> ?=({@ ?($sys $use) *} tea)
|
?> ?=({@ ?($sys $use) *} tea)
|
||||||
=+ our=(need (slaw %p i.tea))
|
=+ mow=(mo-abed:mo hen)
|
||||||
=+ mow=(mo-abed:mo our hen)
|
|
||||||
?- i.t.tea
|
?- i.t.tea
|
||||||
$sys mo-abet:(mo-cyst:mow t.t.tea q.hin)
|
$sys mo-abet:(mo-cyst:mow t.t.tea q.hin)
|
||||||
$use mo-abet:(mo-cook:mow t.t.tea hin)
|
$use mo-abet:(mo-cook:mow t.t.tea hin)
|
||||||
|
Loading…
Reference in New Issue
Block a user