gall: type and non-+mo/+ap arm cleanup

This commit is contained in:
Jared Tobin 2019-05-05 08:23:22 +08:00 committed by Jared Tobin
parent 09c3fbf52c
commit c221c2c5ae
No known key found for this signature in database
GPG Key ID: 0E4647D58F8A69E4

View File

@ -5,116 +5,286 @@
|= pit=vase |= pit=vase
=, gall =, gall
=> =~ => =~
|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: rest of arvo ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::: :: (rest of arvo)
++ coke :: cook ::
$? %inn :: |%
%out :: ::
%cay :: :: +coke: cook.
== :: ::
++ volt ?(%low %high) :: voltage ++ coke
++ torc $@(?(%iron %gold) [%lead p=ship]) :: security control $? %inn
++ roon :: reverse ames msg %out
$% [%d p=mark q=*] :: diff (diff) %cay
[%x ~] :: ==
== :: ::
++ rook :: forward ames msg :: +volt: voltage.
$% [%m p=mark q=*] :: message ::
[%l p=mark q=path] :: "peel" subscribe ++ volt ?(%low %high)
[%s p=path] :: subscribe ::
[%u ~] :: cancel+unsubscribe :: +torc: security control.
== :: ::
++ whey :: foreign response ++ torc $@(?(%iron %gold) [%lead p=ship])
$? %peer :: ::
%peel :: :: +roon: reverse ames message.
%poke :: ::
%pull :: ++ roon
== :: $%
-- :: :: diff (diff)
|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: local arvo ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::: [%d p=mark q=*]
++ cote :: ++ap note [%x ~]
$% [%meta p=@tas q=vase] :: ==
[%send p=ship q=cush] :: ::
[%hiss p=(unit knot) q=mark r=cage] :: :: +rook: forward ames message.
== :: ::
++ cove (pair bone (wind cote cuft)) :: internal move ++ rook
++ move (pair duct (wind note-arvo gift-arvo)) :: typed move $%
-- :: :: message
|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: %gall state ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::: [%m p=mark q=*]
++ axle-n ?(axle) :: upgrade path :: "peel" subscribe
:::::::::::::::::::::::::::::::::::::::::::::::::::::: state proper ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::: [%l p=mark q=path]
++ axle :: all state :: subscribe
$: %0 :: state version ::
=mast :: apps by ship [%s p=path]
== :: :: cancel+unsubscribe
++ gest :: subscriber data ::
$: sup=bitt :: incoming subscribers [%u ~]
neb=boat :: outgoing subscribers ==
qel=(map bone @ud) :: queue meter ::
== :: :: +whey: foreign response.
++ mast :: ship state ::
$: mak=* :: (deprecated) ++ whey
sys=duct :: system duct $? %peer
sap=(map ship scad) :: foreign contacts %peel
bum=(map dude seat) :: running agents %poke
wub=(map dude sofa) :: waiting queue %pull
== :: ==
++ ffuc :: new cuff ::
$: p=(unit (set ship)) :: disclosing to --
q=ship :: attributed to ::
== :: :: (local arvo)
++ prey (pair volt ffuc) :: privilege ::
++ scad :: foreign connection |%
$: p=@ud :: index ::
q=(map duct @ud) :: by duct :: +cote: +ap note.
r=(map @ud duct) :: by index ::
== :: ++ cote
++ scar :: opaque input $% [%meta p=@tas q=vase]
$: p=@ud :: bone sequence [%send p=ship q=cush]
q=(map duct bone) :: by duct [%hiss p=(unit knot) q=mark r=cage]
r=(map bone duct) :: by bone ==
== :: ::
:: :: :: +cove: internal move.
:: XX a hack, required to break a subscription loop :: ::
:: which arises when an invalid mark crashes a diff. :: ++ cove (pair bone (wind cote cuft))
:: See usage in ap-misvale. :: ::
++ misvale-data (set wire) :: subscrs w/ bad marks :: +move: typed moved.
++ seat :: agent state ::
$: misvale=misvale-data :: bad reqs ++ move (pair duct (wind note-arvo gift-arvo))
vel=worm :: cache --
arms=(map [term path] (unit (pair @ud term))) :: ap-find cache ::
mom=duct :: control duct :: (%gall state)
liv=? :: unstopped ::
toc=torc :: privilege |%
tyc=stic :: statistics ::
ged=gest :: subscribers :: +axle-n: upgrade path.
hav=vase :: running state ::
byk=beak :: update control ++ axle-n ?(axle)
pyl=(map bone mark) :: req'd translations ::
zam=scar :: opaque ducts :: +axle: all state.
== :: ::
++ sofa (qeu (trel duct prey club)) :: blocked kisses ++ axle
++ stic :: statistics $:
$: act=@ud :: change number :: state version
eny=@uvJ :: entropy ::
lat=@da :: time %0
== :: :: apps by ship
-- :: ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::: vane header =mast
:::::::::::::::::::::::::::::::::::::::::::::::::::::: ==
::
:: +gest: subscriber data.
::
++ gest
$:
:: incoming subscribers
::
sup=bitt
:: outgoing subscribers
::
neb=boat
:: queue meter
::
qel=(map bone @ud)
==
::
:: +mast: ship state.
::
++ mast
$:
:: (deprecated)
::
mak=*
:: system duct
::
sys=duct
:: foreign contacts
::
sap=(map ship scad)
:: running agents
::
bum=(map dude seat)
:: waiting queue
::
wub=(map dude sofa)
==
::
:: +ffuc: new cuff.
::
++ ffuc
$:
:: disclosing to
::
p=(unit (set ship))
:: attributed to
::
q=ship
==
::
:: +prey: privilege.
::
++ prey (pair volt ffuc)
::
:: +scad: foreign connections.
::
++ scad
$:
:: index
::
p=@ud
:: by duct
::
q=(map duct @ud)
:: by index
::
r=(map @ud duct)
==
::
:: +scar: opaque input.
::
++ scar
$:
:: bone sequence
::
p=@ud
:: by duct
::
q=(map duct bone)
:: by bone
::
r=(map bone duct)
==
::
:: +misvale-data: subscribers with bad marks.
::
:: XX a hack, required to break a subscription loop
:: which arises when an invalid mark crashes a diff.
:: See usage in ap-misvale.
::
++ misvale-data (set wire)
::
:: +seat: agent state.
::
++ seat
$:
:: bad reqs
::
misvale=misvale-data
:: cache
::
vel=worm
:: ap-find cache
::
arms=(map [term path] (unit (pair @ud term)))
:: control duct
::
mom=duct
:: unstopped
::
liv=?
:: privilege
::
toc=torc
:: statistics
::
tyc=stic
:: subscribers
::
ged=gest
:: running state
::
hav=vase
:: update control
::
byk=beak
:: req'd translations
::
pyl=(map bone mark)
:: opaque ducts
::
zam=scar
==
::
:: +sofa: blocked kisses.
::
++ sofa (qeu (trel duct prey club))
::
:: +stic: statistics.
::
++ stic
$:
:: change number
::
act=@ud
:: entropy
::
eny=@uvJ
:: time
::
lat=@da
==
--
::
:: (vane header)
::
. == . ==
=| all=axle :: all vane state ::
|= $: our=ship :: identity :: (all vane state)
now=@da :: urban time ::
eny=@uvJ :: entropy =| all=axle
ska=sley :: activate |= $:
== :: opaque core :: identity
::
our=ship
:: urban time
::
now=@da
:: entropy
::
eny=@uvJ
:: activate
::
ska=sley
==
::
:: (opaque core)
::
~% %gall-top ..is ~ ~% %gall-top ..is ~
:: ::
:: state machine :: (state machine)
:: ::
|% |%
:: ::
@ -127,12 +297,13 @@
++ mo ++ mo
~% %gall-mo +> ~ ~% %gall-mo +> ~
:: ::
=* mas mast.all
=* bowl-type -:!>(*bowl) =* bowl-type -:!>(*bowl)
:: ::
|_ $: hen=duct |_
moves=(list move) $:
== hen=duct
moves=(list move)
==
:: ::
++ mo-state . ++ mo-state .
:: ::
@ -224,12 +395,12 @@
=/ =cage (result-to-cage:ford build-result) =/ =cage (result-to-cage:ford build-result)
=/ result-vase q.cage =/ result-vase q.cage
:: ::
=/ app-data=(unit seat) (~(get by bum.mas) dude) =/ app-data=(unit seat) (~(get by bum.mast.all) dude)
?^ app-data ?^ app-data
:: update the path :: update the path
:: ::
=/ updated u.app-data(byk beak) =/ updated u.app-data(byk beak)
=. bum.mas (~(put by bum.mas) dude updated) =. bum.mast.all (~(put by bum.mast.all) dude updated)
:: magic update string from the old +mo-boon, "complete old boot" :: magic update string from the old +mo-boon, "complete old boot"
:: ::
=/ =prey [%high [~ our]] =/ =prey [%high [~ our]]
@ -283,7 +454,7 @@
== ==
:: ::
%_ mo-state %_ mo-state
bum.mas (~(put by bum.mas) dude new-seat) bum.mast.all (~(put by bum.mast.all) dude new-seat)
== ==
:: ::
:: +mo-away: handle a foreign request. :: +mo-away: handle a foreign request.
@ -363,7 +534,7 @@
:: ::
=/ =scad =/ =scad
=/ default [1 ~ ~] =/ default [1 ~ ~]
=/ existing (~(get by sap.mas) ship) =/ existing (~(get by sap.mast.all) ship)
(fall existing default) (fall existing default)
:: ::
=/ nom (~(get by q.scad) hen) =/ nom (~(get by q.scad) hen)
@ -382,7 +553,7 @@
:: ::
=/ next =/ next
%_ mo-state %_ mo-state
sap.mas (~(put by sap.mas) ship contacts) sap.mast.all (~(put by sap.mast.all) ship contacts)
== ==
:: ::
[index next] [index next]
@ -393,7 +564,7 @@
|= [=ship index=@ud] |= [=ship index=@ud]
^- duct ^- duct
:: ::
=/ conns (~(got by sap.mas) ship) =/ conns (~(got by sap.mast.all) ship)
=/ duct r:conns =/ duct r:conns
(~(got by duct) index) (~(got by duct) index)
:: ::
@ -607,7 +778,7 @@
?> ?=([%a %woot *] sign-arvo) ?> ?=([%a %woot *] sign-arvo)
?> ?=([@ @ ~] path) ?> ?=([@ @ ~] path)
:: ::
=/ why ;;(whey i.t.path) =/ why (whey i.t.path)
=/ art +>+.sign-arvo =/ art +>+.sign-arvo
:: ::
(mo-awed why art) (mo-awed why art)
@ -682,10 +853,10 @@
|= =dude |= =dude
^+ mo-state ^+ mo-state
:: ::
?. (~(has by bum.mas) dude) ?. (~(has by bum.mast.all) dude)
mo-state mo-state
:: ::
=/ maybe-sofa (~(get by wub.mas) dude) =/ maybe-sofa (~(get by wub.mast.all) dude)
:: ::
?~ maybe-sofa ?~ maybe-sofa
mo-state mo-state
@ -695,7 +866,7 @@
|- ^+ mo-state |- ^+ mo-state
?: =(~ sofa) ?: =(~ sofa)
%_ mo-state %_ mo-state
wub.mas (~(del by wub.mas) dude) wub.mast.all (~(del by wub.mast.all) dude)
== ==
:: ::
=^ cushion sofa [p q]:~(get to sofa) =^ cushion sofa [p q]:~(get to sofa)
@ -711,7 +882,7 @@
++ mo-beak ++ mo-beak
|= =dude |= =dude
^- beak ^- beak
?~ app-data=(~(get by bum.mas) dude) ?~ app-data=(~(get by bum.mast.all) dude)
:: ::
:: XX this fallback is necessary, as .dude could be either the source :: XX this fallback is necessary, as .dude could be either the source
:: or the destination app. ie, it might not exist locally ... :: or the destination app. ie, it might not exist locally ...
@ -769,19 +940,19 @@
=/ =dude p.cush =/ =dude p.cush
=/ =club q.cush =/ =club q.cush
:: ::
=/ is-running (~(has by bum.mas) dude) =/ is-running (~(has by bum.mast.all) dude)
=/ is-waiting (~(has by wub.mas) dude) =/ is-waiting (~(has by wub.mast.all) dude)
:: ::
?: |(!is-running is-waiting) ?: |(!is-running is-waiting)
:: ::
=/ =sofa =/ =sofa
=/ waiting (~(get by wub.mas) dude) =/ waiting (~(get by wub.mast.all) dude)
=/ kisses (fall waiting *sofa) =/ kisses (fall waiting *sofa)
=/ kiss [hen prey club] =/ kiss [hen prey club]
(~(put to kisses) kiss) (~(put to kisses) kiss)
:: ::
%_ mo-state %_ mo-state
wub.mas (~(put by wub.mas) dude sofa) wub.mast.all (~(put by wub.mast.all) dude sofa)
== ==
:: ::
(mo-clip dude prey club) (mo-clip dude prey club)
@ -870,7 +1041,7 @@
^+ ap-state ^+ ap-state
:: ::
=/ =seat =/ =seat
=/ sitting (~(got by bum.mas) dude) =/ sitting (~(got by bum.mast.all) dude)
=/ =stic =/ =stic
=/ stat tyc.sitting =/ stat tyc.sitting
=/ nact +(act.stat) =/ nact +(act.stat)
@ -906,7 +1077,7 @@
:: ::
=> ap-abut => ap-abut
%_ mo-state %_ mo-state
bum.mas (~(put by bum.mas) dap sat) bum.mast.all (~(put by bum.mast.all) dap sat)
moves :(weld (turn zip ap-aver) (turn dub ap-avid) moves) moves :(weld (turn zip ap-aver) (turn dub ap-avid) moves)
== ==
:: ::
@ -2122,7 +2293,8 @@
:: ::
%init %init
:: ::
[~ gall-payload(sys.mast.all duct)] =/ payload gall-payload(sys.mast.all duct)
[~ payload]
:: ::
%sunk %sunk
:: ::
@ -2139,11 +2311,11 @@
=* him p.q.hic =* him p.q.hic
:: ::
?: ?=(%ge i.q.q.hic) ?: ?=(%ge i.q.q.hic)
=/ mes ;;({@ud rook} r.q.hic) =/ mes ;;((pair @ud rook) r.q.hic)
=< mo-abet =< mo-abet
(mo-gawk:initialised him dap mes) (mo-gawk:initialised him dap mes)
:: ::
=/ mes ;;({@ud roon} r.q.hic) =/ mes ;;((pair @ud roon) r.q.hic)
=< mo-abet =< mo-abet
(mo-gawd:initialised him dap mes) (mo-gawd:initialised him dap mes)
:: ::
@ -2171,40 +2343,44 @@
|= old=axle-n |= old=axle-n
^+ gall-payload ^+ gall-payload
?- -.old ?- -.old
%0 gall-payload(all old) %0 gall-payload(all old)
== ==
:: ::
:: +scry: standard scry. :: +scry: standard scry.
:: ::
++ scry ++ scry
~/ %gall-scry ~/ %gall-scry
|= [fur=(unit (set monk)) ren=@tas why=shop syd=desk lot=coin tyl=path] |= [fur=(unit (set monk)) =term =shop =desk =coin =path]
^- (unit (unit cage)) ^- (unit (unit cage))
?. ?=(%.y -.why) ?. ?=(%.y -.shop)
~ ~
:: ::
=* his p.why =/ =ship p.shop
:: ::
?: ?& =(%u ren) ?: ?& =(%u term)
=(~ tyl) =(~ path)
=([%$ %da now] lot) =([%$ %da now] coin)
=(our his) =(our ship)
== ==
``[%noun !>((~(has by bum.mast.all) syd))] =/ =vase !>((~(has by bum.mast.all) desk))
=/ =cage [%noun vase]
(some (some cage))
:: ::
?. =(our his) ?. =(our ship)
~ ~
:: ::
?. =([%$ %da now] lot) ?. =([%$ %da now] coin)
~ ~
:: ::
?. (~(has by bum.mast.all) syd) ?. (~(has by bum.mast.all) desk)
[~ ~] (some ~)
:: ::
?. ?=(^ tyl) ?. ?=(^ path)
~ ~
:: ::
(mo-peek:mo-abed:mo syd high+`his ren tyl) =/ initialised mo-abed:mo
=/ =prey [%high [p=~ q=ship]]
(mo-peek:initialised desk prey term path)
:: ::
:: +stay: save without cache. :: +stay: save without cache.
:: ::
@ -2216,13 +2392,23 @@
:: ::
++ take ++ take
~/ %gall-take ~/ %gall-take
|= [tea=wire hen=duct hin=(hypo sign-arvo)] |= [=wire =duct hin=(hypo sign-arvo)]
^+ [*(list move) ..^$] ^- [(list move) _gall-payload]
~| [%gall-take tea] ::
?> ?=([?($sys $use) *] tea) ~| [%gall-take wire]
=+ mow=(mo-abed:mo hen) ::
?- i.tea ?> ?=([?(%sys %use) *] wire)
%sys mo-abet:(mo-cyst:mow t.tea q.hin) =/ initialised (mo-abed:mo duct)
%use mo-abet:(mo-cook:mow t.tea hin) ?- i.wire
::
%sys
::
=/ syssed (mo-cyst:initialised t.wire q.hin)
mo-abet:syssed
::
%use
::
=/ cooked (mo-cook:initialised t.wire hin)
mo-abet:cooked
== ==
-- --