2022-08-19 02:46:04 +03:00
|
|
|
/+ default-agent, verb, dbug
|
|
|
|
::
|
|
|
|
=| state=~
|
|
|
|
%- agent:dbug
|
|
|
|
%+ verb &
|
|
|
|
^- agent:gall
|
|
|
|
|_ =bowl:gall
|
|
|
|
+* this .
|
|
|
|
def ~(. (default-agent this %|) bowl)
|
|
|
|
::
|
|
|
|
++ on-poke
|
|
|
|
|= [=mark =vase]
|
2022-08-19 14:36:23 +03:00
|
|
|
=+ !<(=ship vase)
|
2022-08-19 02:46:04 +03:00
|
|
|
?+ mark !!
|
2022-08-19 14:36:23 +03:00
|
|
|
%leave [[%pass /sub %agent [ship %pub] %leave ~]~ this]
|
|
|
|
%watch [[%pass /sub %agent [ship %pub] %watch /foo]~ this]
|
2022-08-19 02:46:04 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ on-watch
|
|
|
|
|= =path
|
|
|
|
(on-watch:def +<)
|
|
|
|
::
|
|
|
|
++ on-agent
|
|
|
|
|= [=wire =sign:agent:gall]
|
2022-08-19 17:11:21 +03:00
|
|
|
?. =(/sub wire)
|
2022-08-19 02:46:04 +03:00
|
|
|
~| wire+wire !!
|
|
|
|
~& sub+-.sign
|
|
|
|
?+ -.sign !!
|
|
|
|
%kick [[%pass /sub %agent [our.bowl %pub] %watch /foo]~ this]
|
|
|
|
%fact `this
|
|
|
|
%watch-ack `this
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ on-fail
|
|
|
|
|= [=term =tang]
|
|
|
|
(mean ':sub +on-fail' term tang)
|
|
|
|
::
|
|
|
|
++ on-leave
|
|
|
|
|= =path
|
|
|
|
`this
|
|
|
|
::
|
2022-08-19 14:36:23 +03:00
|
|
|
++ on-init `this
|
2022-08-19 02:46:04 +03:00
|
|
|
++ on-save !>(state)
|
|
|
|
++ on-load |=(old=vase `this(state !<(_state old)))
|
|
|
|
++ on-arvo on-arvo:def
|
|
|
|
++ on-peek on-peek:def
|
|
|
|
--
|