2019-02-06 02:52:50 +03:00
|
|
|
!: :: %gall, agent execution
|
2016-11-24 07:25:07 +03:00
|
|
|
!? 163
|
2019-02-09 00:16:42 +03:00
|
|
|
!:
|
2016-11-24 07:25:07 +03:00
|
|
|
::::
|
2019-04-11 23:06:05 +03:00
|
|
|
|= pit=vase
|
2016-12-07 06:13:33 +03:00
|
|
|
=, gall
|
2015-05-10 01:55:05 +03:00
|
|
|
=> =~
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
|
|
|
:: (rest of arvo)
|
|
|
|
::
|
|
|
|
|%
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +internal-gift: synonym for +cuft.
|
|
|
|
::
|
|
|
|
++ internal-gift cuft
|
|
|
|
::
|
|
|
|
:: +internal-task: synonym for +cush.
|
|
|
|
::
|
|
|
|
++ internal-task cush
|
|
|
|
::
|
|
|
|
:: +agent-action: synonym for +club.
|
|
|
|
::
|
|
|
|
++ agent-action club
|
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
:: +coke: cook.
|
|
|
|
::
|
|
|
|
++ coke
|
|
|
|
$? %inn
|
|
|
|
%out
|
|
|
|
%cay
|
|
|
|
==
|
|
|
|
::
|
|
|
|
:: +volt: voltage.
|
|
|
|
::
|
|
|
|
++ volt ?(%low %high)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +security-control: security control.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ security-control $@(?(%iron %gold) [%lead p=ship])
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +reverse-ames: reverse ames message.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ reverse-ames
|
2019-05-05 03:23:22 +03:00
|
|
|
$%
|
2019-05-06 05:17:46 +03:00
|
|
|
:: diff
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[action=%d p=mark q=*]
|
|
|
|
:: etc.
|
|
|
|
::
|
|
|
|
[action=%x ~]
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +forward-ames: forward ames message.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ forward-ames
|
2019-05-05 03:23:22 +03:00
|
|
|
$%
|
|
|
|
:: message
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[action=%m mark=mark noun=*]
|
2019-05-05 03:23:22 +03:00
|
|
|
:: "peel" subscribe
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[action=%l mark=mark path=path]
|
2019-05-05 03:23:22 +03:00
|
|
|
:: subscribe
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[action=%s path=path]
|
2019-05-05 03:23:22 +03:00
|
|
|
:: cancel+unsubscribe
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[action=%u ~]
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +foreign-response: foreign response.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ foreign-response
|
2019-05-05 03:23:22 +03:00
|
|
|
$? %peer
|
|
|
|
%peel
|
|
|
|
%poke
|
|
|
|
%pull
|
|
|
|
==
|
|
|
|
--
|
|
|
|
::
|
|
|
|
:: (local arvo)
|
|
|
|
::
|
|
|
|
|%
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +internal-note: +ap note.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ internal-note
|
|
|
|
$% [task=%meta =term =vase]
|
|
|
|
[task=%send =ship =internal-task]
|
|
|
|
[task=%hiss knot=(unit knot) =mark =cage]
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +internal-move: internal move.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ internal-move
|
|
|
|
$:
|
|
|
|
=bone
|
|
|
|
move=(wind internal-note internal-gift)
|
|
|
|
==
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +move: typed move.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
|
|
|
++ move (pair duct (wind note-arvo gift-arvo))
|
|
|
|
--
|
|
|
|
::
|
|
|
|
:: (%gall state)
|
|
|
|
::
|
|
|
|
|%
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +gall-old: upgrade path.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ gall-old ?(gall)
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +gall: all state.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ gall
|
2019-05-05 03:23:22 +03:00
|
|
|
$:
|
|
|
|
:: state version
|
|
|
|
::
|
|
|
|
%0
|
|
|
|
:: apps by ship
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=ship-state
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +subscriber-data: subscriber data.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ subscriber-data
|
2019-05-05 03:23:22 +03:00
|
|
|
$:
|
|
|
|
:: incoming subscribers
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
incoming=bitt
|
2019-05-05 03:23:22 +03:00
|
|
|
:: outgoing subscribers
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
outgoing=boat
|
2019-05-05 03:23:22 +03:00
|
|
|
:: queue meter
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
meter=(map bone @ud)
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +ship-state: ship state.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ ship-state
|
2019-05-05 03:23:22 +03:00
|
|
|
$:
|
|
|
|
:: (deprecated)
|
|
|
|
::
|
|
|
|
mak=*
|
|
|
|
:: system duct
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
system-duct=duct
|
2019-05-05 03:23:22 +03:00
|
|
|
:: foreign contacts
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
contacts=(map ship foreign)
|
2019-05-05 03:23:22 +03:00
|
|
|
:: running agents
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
running=(map dude agent)
|
2019-05-05 03:23:22 +03:00
|
|
|
:: waiting queue
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
waiting=(map dude blocked)
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +routes: new cuff.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ routes
|
2019-05-05 03:23:22 +03:00
|
|
|
$:
|
|
|
|
:: disclosing to
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
disclosing=(unit (set ship))
|
2019-05-05 03:23:22 +03:00
|
|
|
:: attributed to
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
attributing=ship
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +privilege: privilege.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ privilege
|
|
|
|
$:
|
|
|
|
:: voltage
|
|
|
|
::
|
|
|
|
=volt
|
|
|
|
:: routes
|
|
|
|
::
|
|
|
|
=routes
|
|
|
|
==
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +foreign: foreign connections.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ foreign
|
2019-05-05 03:23:22 +03:00
|
|
|
$:
|
|
|
|
:: index
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
index=@ud
|
2019-05-05 03:23:22 +03:00
|
|
|
:: by duct
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
index-map=(map duct @ud)
|
2019-05-05 03:23:22 +03:00
|
|
|
:: by index
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
duct-map=(map @ud duct)
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +opaque-ducts: opaque input.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ opaque-ducts
|
2019-05-05 03:23:22 +03:00
|
|
|
$:
|
|
|
|
:: bone sequence
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
bone=@ud
|
2019-05-05 03:23:22 +03:00
|
|
|
:: by duct
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
bone-map=(map duct bone)
|
2019-05-05 03:23:22 +03:00
|
|
|
:: by bone
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
duct-map=(map bone duct)
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
:: +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)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +agent: agent state.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ agent
|
2019-05-05 03:23:22 +03:00
|
|
|
$:
|
|
|
|
:: bad reqs
|
|
|
|
::
|
|
|
|
misvale=misvale-data
|
|
|
|
:: cache
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
cache=worm
|
2019-05-05 03:23:22 +03:00
|
|
|
:: ap-find cache
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
find-cache=(map [term path] (unit (pair @ud term)))
|
2019-05-05 03:23:22 +03:00
|
|
|
:: control duct
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
control-duct=duct
|
2019-05-05 03:23:22 +03:00
|
|
|
:: unstopped
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
live=?
|
2019-05-05 03:23:22 +03:00
|
|
|
:: privilege
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
privilege=security-control
|
2019-05-05 03:23:22 +03:00
|
|
|
:: statistics
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
stats=stats
|
2019-05-05 03:23:22 +03:00
|
|
|
:: subscribers
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
subscribers=subscriber-data
|
2019-05-05 03:23:22 +03:00
|
|
|
:: running state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
running-state=vase
|
2019-05-05 03:23:22 +03:00
|
|
|
:: update control
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
beak=beak
|
2019-05-05 03:23:22 +03:00
|
|
|
:: req'd translations
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
required-trans=(map bone mark)
|
2019-05-05 03:23:22 +03:00
|
|
|
:: opaque ducts
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
ducts=opaque-ducts
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +blocked: blocked kisses.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ blocked (qeu (trel duct privilege agent-action))
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +stats: statistics.
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ stats
|
2019-05-05 03:23:22 +03:00
|
|
|
$:
|
|
|
|
:: change number
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
change=@ud
|
2019-05-05 03:23:22 +03:00
|
|
|
:: entropy
|
|
|
|
::
|
|
|
|
eny=@uvJ
|
|
|
|
:: time
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
time=@da
|
2019-05-05 03:23:22 +03:00
|
|
|
==
|
|
|
|
--
|
|
|
|
::
|
|
|
|
:: (vane header)
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
. ==
|
2019-05-05 03:23:22 +03:00
|
|
|
::
|
|
|
|
:: (all vane state)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=| =gall
|
2019-05-05 03:23:22 +03:00
|
|
|
|= $:
|
|
|
|
:: identity
|
|
|
|
::
|
|
|
|
our=ship
|
|
|
|
:: urban time
|
|
|
|
::
|
|
|
|
now=@da
|
|
|
|
:: entropy
|
|
|
|
::
|
|
|
|
eny=@uvJ
|
|
|
|
:: activate
|
|
|
|
::
|
|
|
|
ska=sley
|
|
|
|
==
|
|
|
|
::
|
|
|
|
:: (opaque core)
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
~% %gall-top ..is ~
|
2019-04-27 09:08:29 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
:: (state machine)
|
2019-04-27 09:08:29 +03:00
|
|
|
::
|
|
|
|
|%
|
2019-04-28 22:23:55 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
:: +gall-payload: gall payload.
|
|
|
|
::
|
|
|
|
++ gall-payload +
|
|
|
|
::
|
2019-04-28 22:23:55 +03:00
|
|
|
:: +mo: move handling.
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
++ mo
|
2018-12-13 04:34:25 +03:00
|
|
|
~% %gall-mo +> ~
|
2019-04-11 23:09:44 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
|_
|
|
|
|
$:
|
|
|
|
hen=duct
|
|
|
|
moves=(list move)
|
|
|
|
==
|
2019-04-11 23:13:17 +03:00
|
|
|
::
|
|
|
|
++ mo-state .
|
|
|
|
::
|
|
|
|
:: +mo-abed: initialise engine with the provided duct.
|
|
|
|
::
|
|
|
|
++ mo-abed
|
2018-12-13 04:34:25 +03:00
|
|
|
|= =duct
|
2019-04-11 23:16:24 +03:00
|
|
|
^+ mo-state
|
|
|
|
::
|
|
|
|
mo-state(hen duct)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-11 23:16:24 +03:00
|
|
|
:: +mo-abet: resolve moves.
|
|
|
|
::
|
|
|
|
++ mo-abet
|
2019-05-03 01:53:27 +03:00
|
|
|
^- [(list move) _gall-payload]
|
2019-04-11 23:16:24 +03:00
|
|
|
::
|
2019-04-25 20:39:32 +03:00
|
|
|
=/ resolved (flop moves)
|
2019-05-03 01:53:27 +03:00
|
|
|
[resolved gall-payload]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-28 23:42:04 +03:00
|
|
|
:: +mo-boot: pass a %build move to ford.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-28 22:23:55 +03:00
|
|
|
++ mo-boot
|
2019-04-11 23:17:26 +03:00
|
|
|
|= [=dude =ship =desk]
|
|
|
|
^+ mo-state
|
|
|
|
::
|
2019-04-28 22:23:55 +03:00
|
|
|
=/ =case [%da now]
|
|
|
|
::
|
|
|
|
=/ =path
|
|
|
|
=/ ship (scot %p ship)
|
|
|
|
=/ case (scot case)
|
|
|
|
/sys/core/[dude]/[ship]/[desk]/[case]
|
2019-04-11 23:17:26 +03:00
|
|
|
::
|
2019-04-28 22:23:55 +03:00
|
|
|
=/ =note-arvo
|
|
|
|
=/ disc [ship desk]
|
|
|
|
=/ spur /hoon/[dude]/app
|
|
|
|
=/ schematic [%core disc spur]
|
|
|
|
[%f %build live=%.y schematic]
|
|
|
|
::
|
|
|
|
=/ pass [path note-arvo]
|
|
|
|
(mo-pass pass)
|
2019-04-11 23:17:26 +03:00
|
|
|
::
|
2019-04-25 20:39:32 +03:00
|
|
|
:: +mo-pass: prepend a standard %pass move to the move state.
|
2019-04-11 23:17:26 +03:00
|
|
|
::
|
|
|
|
++ mo-pass
|
|
|
|
|= pass=(pair path note-arvo)
|
|
|
|
^+ mo-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =move [hen [%pass pass]]
|
2019-04-11 23:17:26 +03:00
|
|
|
mo-state(moves [move moves])
|
|
|
|
::
|
2019-04-25 20:39:32 +03:00
|
|
|
:: +mo-give: prepend a standard %give move to the move state.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
|
|
|
++ mo-give
|
2019-04-25 20:39:32 +03:00
|
|
|
|= =gift:able
|
2019-04-11 23:17:26 +03:00
|
|
|
^+ mo-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =move [hen [%give gift]]
|
2019-04-11 23:17:26 +03:00
|
|
|
mo-state(moves [move moves])
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-28 22:23:55 +03:00
|
|
|
:: +mo-okay: check that a vase contains a valid bowl.
|
2019-04-11 23:17:26 +03:00
|
|
|
::
|
|
|
|
++ mo-okay
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %mo-okay
|
2019-04-11 23:17:26 +03:00
|
|
|
|= =vase
|
2016-11-24 07:25:07 +03:00
|
|
|
^- ?
|
2019-04-11 23:17:26 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: inferred type of default bowl
|
|
|
|
=/ bowl-type -:!>(*bowl)
|
|
|
|
::
|
|
|
|
=/ maybe-vase (slew 12 vase)
|
|
|
|
?~ maybe-vase
|
2019-04-11 23:17:26 +03:00
|
|
|
%.n
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =type p.u.maybe-vase
|
|
|
|
(~(nest ut type) %.n bowl-type)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-28 22:23:55 +03:00
|
|
|
:: +mo-receive-core: receives an app core built by ford.
|
2019-04-11 23:18:29 +03:00
|
|
|
::
|
2018-08-16 02:48:37 +03:00
|
|
|
++ mo-receive-core
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %mo-receive-core
|
2019-04-24 20:53:35 +03:00
|
|
|
|= [=dude =beak =made-result:ford]
|
2019-04-11 23:18:29 +03:00
|
|
|
^+ mo-state
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
|
|
|
?: ?=([%incomplete *] made-result)
|
2019-04-11 23:18:29 +03:00
|
|
|
(mo-give %onto %.n tang.made-result)
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
|
|
|
=/ build-result build-result.made-result
|
|
|
|
::
|
|
|
|
?: ?=([%error *] build-result)
|
2019-04-11 23:18:29 +03:00
|
|
|
(mo-give %onto %.n message.build-result)
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
2019-04-11 23:18:29 +03:00
|
|
|
=/ =cage (result-to-cage:ford build-result)
|
|
|
|
=/ result-vase q.cage
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ app-data=(unit agent)
|
|
|
|
(~(get by running.ship-state.gall) dude)
|
|
|
|
::
|
2018-06-06 03:11:06 +03:00
|
|
|
?^ app-data
|
|
|
|
:: update the path
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ updated u.app-data(beak beak)
|
|
|
|
::
|
|
|
|
=. running.ship-state.gall
|
|
|
|
(~(put by running.ship-state.gall) dude updated)
|
|
|
|
::
|
2019-04-28 22:23:55 +03:00
|
|
|
:: magic update string from the old +mo-boon, "complete old boot"
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =privilege
|
|
|
|
=/ =routes [disclosing=~ attributing=our]
|
|
|
|
[%high routes]
|
|
|
|
::
|
|
|
|
=/ initialised (ap-abed:ap dude privilege)
|
|
|
|
=/ peeped (ap-peep:initialised result-vase)
|
2019-04-27 07:54:35 +03:00
|
|
|
ap-abet:peeped
|
2018-06-06 03:11:06 +03:00
|
|
|
:: first install of the app
|
|
|
|
::
|
2019-04-11 23:18:29 +03:00
|
|
|
?. (mo-okay result-vase)
|
2019-04-27 07:54:35 +03:00
|
|
|
=/ err [[%leaf "{<dude>}: bogus core"] ~]
|
|
|
|
(mo-give %onto %.n err)
|
2019-04-11 23:18:29 +03:00
|
|
|
::
|
2019-04-13 19:06:25 +03:00
|
|
|
=. mo-state (mo-born dude beak result-vase)
|
2019-04-11 23:18:29 +03:00
|
|
|
::
|
|
|
|
=/ old mo-state
|
2019-04-27 07:54:35 +03:00
|
|
|
::
|
|
|
|
=/ wag
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =routes [disclosing=~ attributing=our]
|
|
|
|
=/ =privilege [%high routes]
|
|
|
|
=/ initialised (ap-abed:ap dude privilege)
|
|
|
|
(ap-prop:initialised ~)
|
|
|
|
::
|
|
|
|
=/ maybe-tang -.wag
|
|
|
|
=/ new +.wag
|
2019-04-11 23:18:29 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-tang
|
2019-04-11 23:18:29 +03:00
|
|
|
=. mo-state old
|
2019-05-06 05:17:46 +03:00
|
|
|
(mo-give %onto %.n u.maybe-tang)
|
2019-04-27 07:54:35 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=. mo-state ap-abet:new
|
2019-04-27 07:54:35 +03:00
|
|
|
::
|
|
|
|
=/ clawed (mo-claw dude)
|
|
|
|
(mo-give:clawed %onto %.y dude %boot now)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +mo-born: create a new agent.
|
2019-04-11 23:18:29 +03:00
|
|
|
::
|
|
|
|
++ mo-born
|
|
|
|
|= [=dude =beak =vase]
|
|
|
|
^+ mo-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =opaque-ducts
|
|
|
|
:+ bone=1
|
|
|
|
bone-map=[[[~ ~] 0] ~ ~]
|
|
|
|
duct-map=[[0 [~ ~]] ~ ~]
|
|
|
|
::
|
|
|
|
=/ agent
|
|
|
|
=/ default-agent *agent
|
|
|
|
%_ default-agent
|
|
|
|
control-duct hen
|
|
|
|
beak beak
|
|
|
|
running-state vase
|
|
|
|
ducts opaque-ducts
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-04-11 23:18:29 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ agents
|
|
|
|
(~(put by running.ship-state.gall) dude agent)
|
|
|
|
::
|
2019-04-11 23:18:29 +03:00
|
|
|
%_ mo-state
|
2019-05-06 05:17:46 +03:00
|
|
|
running.ship-state.gall agents
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-04-11 23:22:58 +03:00
|
|
|
::
|
|
|
|
:: +mo-away: handle a foreign request.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-11 23:22:58 +03:00
|
|
|
++ mo-away
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %mo-away
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=ship =internal-task]
|
2019-04-11 23:22:58 +03:00
|
|
|
^+ mo-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =dude p.internal-task
|
|
|
|
=/ =agent-action q.internal-task
|
2019-04-27 07:54:35 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%pump -.agent-action)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
|
|
|
:: you'd think this would send an ack for the diff
|
|
|
|
:: that caused this pump. it would, but we already
|
|
|
|
:: sent it when we got the diff in ++mo-cyst. then
|
|
|
|
:: we'd have to save the network duct and connect it
|
|
|
|
:: to this returning pump.
|
|
|
|
::
|
2019-04-11 23:22:58 +03:00
|
|
|
mo-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%peer-not -.agent-action)
|
|
|
|
=/ =tang p.agent-action
|
|
|
|
(mo-give %unto %reap (some tang))
|
2019-04-11 23:22:58 +03:00
|
|
|
::
|
2019-04-27 07:54:35 +03:00
|
|
|
=^ bone mo-state (mo-bale ship)
|
2019-04-11 23:22:58 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =forward-ames
|
|
|
|
?- -.agent-action
|
|
|
|
%poke [%m p.p.agent-action q.q.p.agent-action]
|
2019-04-11 23:22:58 +03:00
|
|
|
%pull [%u ~]
|
|
|
|
%puff !!
|
|
|
|
%punk !!
|
2019-05-06 05:17:46 +03:00
|
|
|
%peel [%l agent-action]
|
|
|
|
%peer [%s p.agent-action]
|
2019-04-11 23:22:58 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ sys-path
|
|
|
|
=/ action -.agent-action
|
|
|
|
/sys/way/[action]
|
2019-04-11 23:22:58 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =note-arvo
|
|
|
|
=/ =path [%g %ge dude ~]
|
|
|
|
=/ noun [bone forward-ames]
|
|
|
|
[%a %want ship path noun]
|
|
|
|
::
|
|
|
|
(mo-pass sys-path note-arvo)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-11 23:22:58 +03:00
|
|
|
:: +mo-awed: handle foreign response.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-11 23:22:58 +03:00
|
|
|
++ mo-awed
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=foreign-response art=(unit ares)]
|
2019-04-11 23:22:58 +03:00
|
|
|
^+ mo-state
|
|
|
|
::
|
|
|
|
=/ =ares
|
|
|
|
=/ tanks [%blank ~]
|
|
|
|
=/ tang (some tanks)
|
|
|
|
(fall art tang)
|
|
|
|
::
|
|
|
|
=/ to-tang
|
|
|
|
|= ars=(pair term tang)
|
|
|
|
^- tang
|
|
|
|
=/ tape (trip p.ars)
|
|
|
|
[[%leaf tape] q.ars]
|
|
|
|
::
|
|
|
|
=/ result (bind ares to-tang)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?- foreign-response
|
2019-04-11 23:22:58 +03:00
|
|
|
%peel (mo-give %unto %reap result)
|
|
|
|
%peer (mo-give %unto %reap result)
|
|
|
|
%poke (mo-give %unto %coup result)
|
|
|
|
%pull mo-state
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-04-11 23:24:24 +03:00
|
|
|
:: +mo-bale: assign an out bone.
|
|
|
|
::
|
|
|
|
++ mo-bale
|
|
|
|
|= =ship
|
2019-04-27 07:54:35 +03:00
|
|
|
^- [bone _mo-state]
|
2019-04-11 23:24:24 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =foreign
|
|
|
|
=/ existing (~(get by contacts.ship-state.gall) ship)
|
|
|
|
(fall existing [1 ~ ~])
|
2019-04-11 23:24:24 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ existing (~(get by index-map.foreign) hen)
|
2019-04-11 23:24:24 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ existing
|
|
|
|
[u.existing mo-state]
|
2019-04-11 23:24:24 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ index index.foreign
|
2019-04-11 23:24:24 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ new-foreign
|
|
|
|
%_ foreign
|
|
|
|
index +(index)
|
|
|
|
index-map (~(put by index-map.foreign) hen index)
|
|
|
|
duct-map (~(put by duct-map.foreign) index hen)
|
2015-05-10 01:55:05 +03:00
|
|
|
==
|
2019-04-11 23:24:24 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ contacts (~(put by contacts.ship-state.gall) ship new-foreign)
|
|
|
|
::
|
2019-04-27 07:54:35 +03:00
|
|
|
=/ next
|
2019-04-11 23:24:24 +03:00
|
|
|
%_ mo-state
|
2019-05-06 05:17:46 +03:00
|
|
|
contacts.ship-state.gall contacts
|
2019-04-11 23:24:24 +03:00
|
|
|
==
|
|
|
|
::
|
2019-04-27 07:54:35 +03:00
|
|
|
[index next]
|
2015-05-10 01:55:05 +03:00
|
|
|
::
|
2019-04-11 23:24:24 +03:00
|
|
|
:: +mo-ball: retrieve an out bone by index.
|
|
|
|
::
|
|
|
|
++ mo-ball
|
|
|
|
|= [=ship index=@ud]
|
2015-05-10 01:55:05 +03:00
|
|
|
^- duct
|
2019-04-11 23:24:24 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =foreign (~(got by contacts.ship-state.gall) ship)
|
|
|
|
(~(got by duct-map.foreign) index)
|
2015-05-10 01:55:05 +03:00
|
|
|
::
|
2019-04-11 23:27:53 +03:00
|
|
|
:: +mo-cyst-core: receive a core.
|
|
|
|
::
|
|
|
|
++ mo-cyst-core
|
|
|
|
|= [=path =sign-arvo]
|
|
|
|
^+ mo-state
|
|
|
|
::
|
|
|
|
?> ?=([%f %made *] sign-arvo)
|
|
|
|
?> ?=([@ @ @ @ @ ~] path)
|
|
|
|
::
|
2019-04-24 21:49:51 +03:00
|
|
|
=/ beak-path t.t.path
|
|
|
|
::
|
2019-04-13 19:06:25 +03:00
|
|
|
=/ =beak
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =ship (slav %p i.beak-path)
|
|
|
|
=/ =desk i.t.beak-path
|
|
|
|
=/ =case [%da (slav %da i.t.t.beak-path)]
|
2019-04-13 19:06:25 +03:00
|
|
|
[p=ship q=desk r=case]
|
|
|
|
::
|
2019-04-24 21:49:51 +03:00
|
|
|
(mo-receive-core i.t.path beak result.sign-arvo)
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
|
|
|
:: +mo-cyst-pel: translated peer.
|
|
|
|
::
|
|
|
|
++ mo-cyst-pel
|
|
|
|
|= [=path =sign-arvo]
|
|
|
|
^+ mo-state
|
|
|
|
::
|
|
|
|
?> ?=([%f %made *] sign-arvo)
|
|
|
|
?> ?=([@ @ ~] path)
|
|
|
|
::
|
|
|
|
?: ?=([%incomplete *] result.sign-arvo)
|
|
|
|
=/ err (some tang.result.sign-arvo)
|
|
|
|
(mo-give %unto %coup err)
|
|
|
|
::
|
|
|
|
=/ build-result build-result.result.sign-arvo
|
|
|
|
::
|
|
|
|
?: ?=([%error *] build-result)
|
|
|
|
=/ err (some message.build-result)
|
|
|
|
(mo-give %unto %coup err)
|
|
|
|
::
|
|
|
|
=/ =cage (result-to-cage:ford build-result)
|
|
|
|
(mo-give %unto %diff cage)
|
|
|
|
::
|
|
|
|
:: +mo-cyst-red: diff ack.
|
|
|
|
::
|
|
|
|
++ mo-cyst-red
|
|
|
|
|= [=path =sign-arvo]
|
|
|
|
^+ mo-state
|
|
|
|
::
|
|
|
|
?> ?=([@ @ @ @ ~] path)
|
|
|
|
::
|
|
|
|
?. ?=([%a %woot *] sign-arvo)
|
|
|
|
~& [%red-want path]
|
|
|
|
mo-state
|
|
|
|
::
|
|
|
|
=/ him (slav %p i.t.path)
|
|
|
|
=/ dap i.t.t.path
|
|
|
|
=/ num (slav %ud i.t.t.t.path)
|
|
|
|
::
|
2019-04-27 07:54:35 +03:00
|
|
|
=/ =coop q.+>.sign-arvo
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
|
|
|
=/ sys-path
|
|
|
|
=/ pax [%req t.path]
|
|
|
|
[%sys pax]
|
|
|
|
::
|
2019-04-27 07:54:35 +03:00
|
|
|
?~ coop
|
2019-04-11 23:27:53 +03:00
|
|
|
=/ =note-arvo [%g %deal [him our] dap %pump ~]
|
|
|
|
(mo-pass sys-path note-arvo)
|
|
|
|
::
|
|
|
|
=/ gall-move [%g %deal [him our] dap %pull ~]
|
|
|
|
=/ ames-move [%a %want him [%g %gh dap ~] [num %x ~]]
|
|
|
|
::
|
|
|
|
=. mo-state (mo-pass sys-path gall-move)
|
|
|
|
=. mo-state (mo-pass sys-path ames-move)
|
|
|
|
::
|
2019-04-27 07:54:35 +03:00
|
|
|
?. ?=([~ ~ %mack *] coop)
|
|
|
|
~& [%diff-bad-ack coop]
|
2019-04-11 23:27:53 +03:00
|
|
|
mo-state
|
|
|
|
~& [%diff-bad-ack %mack]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog (flop q.,.+>.coop))
|
|
|
|
(print mo-state)
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
|
|
|
:: +mo-cyst-rep: reverse request.
|
|
|
|
::
|
|
|
|
++ mo-cyst-rep
|
|
|
|
|= [=path =sign-arvo]
|
|
|
|
^+ mo-state
|
|
|
|
::
|
|
|
|
?> ?=([@ @ @ @ ~] path)
|
|
|
|
?> ?=([%f %made *] sign-arvo)
|
|
|
|
::
|
|
|
|
=/ him (slav %p i.t.path)
|
|
|
|
=/ dap i.t.t.path
|
|
|
|
=/ num (slav %ud i.t.t.t.path)
|
|
|
|
::
|
|
|
|
?: ?=([%incomplete *] result.sign-arvo)
|
|
|
|
=/ err (some tang.result.sign-arvo)
|
|
|
|
(mo-give %mack err)
|
|
|
|
::
|
|
|
|
=/ build-result build-result.result.sign-arvo
|
|
|
|
::
|
|
|
|
?: ?=([%error *] build-result)
|
2019-05-06 05:17:46 +03:00
|
|
|
:: XX should crash
|
2019-04-11 23:27:53 +03:00
|
|
|
=/ err (some message.build-result)
|
|
|
|
(mo-give %mack err)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: XX pump should ack
|
2019-04-11 23:27:53 +03:00
|
|
|
=. mo-state (mo-give %mack ~)
|
|
|
|
::
|
|
|
|
=/ duct (mo-ball him num)
|
|
|
|
=/ initialised (mo-abed duct)
|
|
|
|
::
|
|
|
|
=/ =cage (result-to-cage:ford build-result)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ move [%unto [%diff cage]]
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
|
|
|
(mo-give:initialised move)
|
|
|
|
::
|
|
|
|
:: +mo-cyst-req: inbound request.
|
|
|
|
::
|
|
|
|
++ mo-cyst-req
|
|
|
|
|= [=path =sign-arvo]
|
|
|
|
^+ mo-state
|
|
|
|
::
|
|
|
|
?> ?=([@ @ @ @ ~] path)
|
|
|
|
::
|
|
|
|
=/ him (slav %p i.t.path)
|
|
|
|
=/ dap i.t.t.path
|
|
|
|
=/ num (slav %ud i.t.t.t.path)
|
|
|
|
::
|
|
|
|
?: ?=([%f %made *] sign-arvo)
|
|
|
|
?: ?=([%incomplete *] result.sign-arvo)
|
|
|
|
=/ err (some tang.result.sign-arvo)
|
|
|
|
(mo-give %mack err)
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
2019-04-11 23:27:53 +03:00
|
|
|
=/ build-result build-result.result.sign-arvo
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
|
|
|
?: ?=([%error *] build-result)
|
2019-04-11 23:27:53 +03:00
|
|
|
=/ err (some message.build-result)
|
|
|
|
(mo-give %mack err)
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
2019-04-11 23:27:53 +03:00
|
|
|
=/ =cage (result-to-cage:ford build-result)
|
|
|
|
=/ sys-path [%sys path]
|
|
|
|
=/ =note-arvo [%g %deal [him our] i.t.t.path %poke cage]
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
2019-04-11 23:27:53 +03:00
|
|
|
(mo-pass sys-path note-arvo)
|
|
|
|
::
|
|
|
|
?: ?=([%a %woot *] sign-arvo)
|
|
|
|
mo-state
|
|
|
|
::
|
|
|
|
?> ?=([%g %unto *] sign-arvo)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-gift +>.sign-arvo
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?- -.internal-gift
|
2018-08-09 00:47:01 +03:00
|
|
|
::
|
2019-04-11 23:27:53 +03:00
|
|
|
%coup
|
2018-08-09 00:47:01 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
(mo-give %mack p.internal-gift)
|
2018-10-03 21:36:45 +03:00
|
|
|
::
|
2019-04-11 23:27:53 +03:00
|
|
|
%diff
|
|
|
|
::
|
|
|
|
=/ sys-path [%sys %red t.path]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =note-arvo
|
|
|
|
=/ path [%g %gh dap ~]
|
|
|
|
=/ noun [num %d p.p.internal-gift q.q.p.internal-gift]
|
|
|
|
[%a %want him path noun]
|
|
|
|
::
|
|
|
|
(mo-pass sys-path note-arvo)
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
|
|
|
%quit
|
|
|
|
::
|
|
|
|
=/ sys-path [%sys path]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =note-arvo
|
|
|
|
=/ path [%g %gh dap ~]
|
|
|
|
=/ noun [num %x ~]
|
|
|
|
[%a %want him path noun]
|
|
|
|
::
|
|
|
|
(mo-pass sys-path note-arvo)
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
|
|
|
%reap
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
(mo-give %mack p.internal-gift)
|
2019-04-11 23:27:53 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
:: +mo-cyst-val: inbound validate.
|
|
|
|
::
|
|
|
|
++ mo-cyst-val
|
|
|
|
|= [=path =sign-arvo]
|
|
|
|
^+ mo-state
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-11 23:27:53 +03:00
|
|
|
?> ?=([%f %made *] sign-arvo)
|
|
|
|
?> ?=([@ @ @ ~] path)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =ship (slav %p i.t.path)
|
|
|
|
=/ =dude i.t.t.path
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
|
|
|
?: ?=([%incomplete *] result.sign-arvo)
|
|
|
|
=/ err (some tang.result.sign-arvo)
|
|
|
|
(mo-give %unto %coup err)
|
|
|
|
::
|
|
|
|
=/ build-result build-result.result.sign-arvo
|
|
|
|
::
|
|
|
|
?: ?=([%error *] build-result)
|
|
|
|
=/ err (some message.build-result)
|
|
|
|
(mo-give %unto %coup err)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =privilege
|
|
|
|
=/ =routes [disclosing=~ attributing=ship]
|
|
|
|
[%high routes]
|
|
|
|
::
|
2019-04-11 23:27:53 +03:00
|
|
|
=/ =cage (result-to-cage:ford build-result)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =agent-action [%poke cage]
|
|
|
|
(mo-clip dude privilege agent-action)
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
|
|
|
:: +mo-cyst-way: outbound request.
|
|
|
|
::
|
|
|
|
++ mo-cyst-way
|
|
|
|
|= [=path =sign-arvo]
|
|
|
|
^+ mo-state
|
|
|
|
::
|
|
|
|
?> ?=([%a %woot *] sign-arvo)
|
|
|
|
?> ?=([@ @ ~] path)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =foreign-response (foreign-response i.t.path)
|
2019-04-11 23:27:53 +03:00
|
|
|
=/ art +>+.sign-arvo
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
(mo-awed foreign-response art)
|
2019-04-11 23:27:53 +03:00
|
|
|
::
|
|
|
|
:: +mo-cyst: take in /sys.
|
|
|
|
::
|
|
|
|
++ mo-cyst
|
|
|
|
~/ %mo-cyst
|
2019-04-27 07:54:35 +03:00
|
|
|
|= [=path =sign-arvo]
|
2019-04-11 23:27:53 +03:00
|
|
|
^+ mo-state
|
|
|
|
::
|
2019-04-27 07:54:35 +03:00
|
|
|
?+ -.path !!
|
|
|
|
%core (mo-cyst-core path sign-arvo)
|
|
|
|
%pel (mo-cyst-pel path sign-arvo)
|
|
|
|
%red (mo-cyst-red path sign-arvo)
|
|
|
|
%rep (mo-cyst-rep path sign-arvo)
|
|
|
|
%req (mo-cyst-req path sign-arvo)
|
|
|
|
%val (mo-cyst-val path sign-arvo)
|
|
|
|
%way (mo-cyst-way path sign-arvo)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-04-11 23:29:43 +03:00
|
|
|
:: +mo-cook: take in /use.
|
|
|
|
::
|
|
|
|
++ mo-cook
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %mo-cook
|
2019-04-11 23:29:43 +03:00
|
|
|
|= [=path hin=(hypo sign-arvo)]
|
|
|
|
^+ mo-state
|
|
|
|
::
|
|
|
|
?. ?=([@ @ coke *] path)
|
2019-04-28 23:42:04 +03:00
|
|
|
~& [%mo-cook-bad-path path]
|
2016-11-24 07:25:07 +03:00
|
|
|
!!
|
2019-04-11 23:29:43 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ initialised
|
2019-04-11 23:29:43 +03:00
|
|
|
=/ =term i.path
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =privilege
|
|
|
|
=/ =ship (slav %p i.t.path)
|
|
|
|
=/ =routes [disclosing=~ attributing=ship]
|
|
|
|
[%high routes]
|
|
|
|
::
|
|
|
|
(ap-abed:ap term privilege)
|
2019-04-11 23:29:43 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =vase (slot 3 hin)
|
|
|
|
=/ =sign-arvo q.hin
|
2019-04-11 23:29:43 +03:00
|
|
|
::
|
|
|
|
?- i.t.t.path
|
|
|
|
::
|
|
|
|
%inn
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ poured (ap-pour:initialised t.t.t.path vase)
|
2019-04-11 23:29:43 +03:00
|
|
|
ap-abet:poured
|
|
|
|
::
|
|
|
|
%cay
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?=([%e %sigh *] sign-arvo)
|
|
|
|
~& [%mo-cook-weird sign-arvo]
|
2019-04-11 23:29:43 +03:00
|
|
|
~& [%mo-cook-weird-path path]
|
|
|
|
mo-state
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ purred
|
|
|
|
=/ =cage +>.sign-arvo
|
|
|
|
(ap-purr:initialised %sigh t.t.t.path cage)
|
|
|
|
::
|
2019-04-11 23:29:43 +03:00
|
|
|
ap-abet:purred
|
|
|
|
::
|
|
|
|
%out
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?=([%g %unto *] sign-arvo)
|
|
|
|
~& [%mo-cook-weird sign-arvo]
|
2019-04-11 23:29:43 +03:00
|
|
|
~& [%mo-cook-weird-path path]
|
|
|
|
mo-state
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ pouted
|
|
|
|
=/ =internal-gift +>.sign-arvo
|
|
|
|
(ap-pout:initialised t.t.t.path internal-gift)
|
|
|
|
::
|
2019-04-11 23:29:43 +03:00
|
|
|
ap-abet:pouted
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-04-11 23:30:44 +03:00
|
|
|
:: +mo-claw: clear queue.
|
|
|
|
::
|
|
|
|
++ mo-claw
|
|
|
|
|= =dude
|
|
|
|
^+ mo-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. (~(has by running.ship-state.gall) dude)
|
2019-04-11 23:30:44 +03:00
|
|
|
mo-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ maybe-blocked (~(get by waiting.ship-state.gall) dude)
|
2019-04-27 07:54:35 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-blocked
|
2019-04-11 23:30:44 +03:00
|
|
|
mo-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =blocked u.maybe-blocked
|
2019-04-27 07:54:35 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
|- ^+ mo-state
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
?: =(~ blocked)
|
2019-04-11 23:30:44 +03:00
|
|
|
%_ mo-state
|
2019-05-06 05:17:46 +03:00
|
|
|
waiting.ship-state.gall (~(del by waiting.ship-state.gall) dude)
|
2019-04-11 23:30:44 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ kiss blocked [p q]:~(get to blocked)
|
|
|
|
::
|
|
|
|
=/ =duct p.kiss
|
|
|
|
=/ =privilege q.kiss
|
|
|
|
=/ =agent-action r.kiss
|
|
|
|
::
|
|
|
|
=/ move
|
|
|
|
=/ =sock [attributing.routes.privilege our]
|
|
|
|
=/ =internal-task [dude agent-action]
|
|
|
|
=/ card [%slip %g %deal sock internal-task]
|
|
|
|
[duct card]
|
2019-04-11 23:30:44 +03:00
|
|
|
::
|
|
|
|
$(moves [move moves])
|
|
|
|
::
|
|
|
|
:: +mo-beak: build beak.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-11 23:30:44 +03:00
|
|
|
++ mo-beak
|
|
|
|
|= =dude
|
2016-11-24 07:25:07 +03:00
|
|
|
^- beak
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ app-data=(~(get by running.ship-state.gall) dude)
|
2019-07-16 09:10:49 +03:00
|
|
|
::
|
2019-04-11 23:30:44 +03:00
|
|
|
:: XX this fallback is necessary, as .dude could be either the source
|
2019-07-16 09:10:49 +03:00
|
|
|
:: or the destination app. ie, it might not exist locally ...
|
|
|
|
::
|
|
|
|
[our %home %da now]
|
2019-05-06 05:17:46 +03:00
|
|
|
beak.u.app-data
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
|
|
|
++ mo-peek
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %mo-peek
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=dude =privilege =term =path]
|
2016-11-24 07:25:07 +03:00
|
|
|
^- (unit (unit cage))
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ initialised (ap-abed:ap dude privilege)
|
2019-05-03 01:53:27 +03:00
|
|
|
(ap-peek:initialised term path)
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +mo-clip: apply action.
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
|
|
|
++ mo-clip
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=dude =privilege =agent-action]
|
2019-04-11 23:31:55 +03:00
|
|
|
^+ mo-state
|
|
|
|
::
|
|
|
|
=/ =path
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ ship (scot %p attributing.routes.privilege)
|
2019-04-11 23:31:55 +03:00
|
|
|
/sys/val/[ship]/[dude]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ ship-desk
|
|
|
|
=/ =beak (mo-beak dude)
|
2019-04-11 23:31:55 +03:00
|
|
|
[p q]:beak
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%puff -.agent-action)
|
|
|
|
=/ =schematic:ford [%vale ship-desk +.agent-action]
|
2019-04-27 07:54:35 +03:00
|
|
|
=/ =note-arvo [%f %build live=%.n schematic]
|
2019-04-11 23:31:55 +03:00
|
|
|
(mo-pass path note-arvo)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%punk -.agent-action)
|
|
|
|
=/ =schematic:ford [%cast ship-desk p.agent-action [%$ q.agent-action]]
|
2019-04-27 07:54:35 +03:00
|
|
|
=/ =note-arvo [%f %build live=%.n schematic]
|
2019-04-11 23:31:55 +03:00
|
|
|
(mo-pass path note-arvo)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%peer-not -.agent-action)
|
|
|
|
=/ err (some p.agent-action)
|
2019-04-11 23:31:55 +03:00
|
|
|
(mo-give %unto %reap err)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ initialised (ap-abed:ap dude privilege)
|
|
|
|
=/ applied (ap-agent-action:initialised agent-action)
|
2019-05-03 01:53:27 +03:00
|
|
|
ap-abet:applied
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-04-27 07:54:35 +03:00
|
|
|
:: +mo-come: handle locally.
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-04-25 20:39:32 +03:00
|
|
|
++ mo-come
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=ship =internal-task]
|
2019-04-11 23:31:55 +03:00
|
|
|
^+ mo-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =privilege
|
|
|
|
=/ =routes [disclosing=~ attributing=ship]
|
|
|
|
[%high routes]
|
|
|
|
::
|
|
|
|
=/ =dude p.internal-task
|
|
|
|
=/ =agent-action q.internal-task
|
2019-04-25 20:39:32 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ is-running (~(has by running.ship-state.gall) dude)
|
|
|
|
=/ is-waiting (~(has by waiting.ship-state.gall) dude)
|
2019-04-26 08:16:46 +03:00
|
|
|
::
|
|
|
|
?: |(!is-running is-waiting)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =blocked
|
|
|
|
=/ waiting (~(get by waiting.ship-state.gall) dude)
|
|
|
|
=/ kisses (fall waiting *blocked)
|
|
|
|
=/ kiss [hen privilege agent-action]
|
2019-04-26 08:16:46 +03:00
|
|
|
(~(put to kisses) kiss)
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ waiting (~(put by waiting.ship-state.gall) dude blocked)
|
|
|
|
::
|
2019-04-11 23:31:55 +03:00
|
|
|
%_ mo-state
|
2019-05-06 05:17:46 +03:00
|
|
|
waiting.ship-state.gall waiting
|
2018-06-06 03:11:06 +03:00
|
|
|
==
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
(mo-clip dude privilege agent-action)
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
|
|
|
:: +mo-gawk: ames forward.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-11 23:31:55 +03:00
|
|
|
++ mo-gawk
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=ship =dude =bone =forward-ames]
|
2019-04-11 23:31:55 +03:00
|
|
|
^+ mo-state
|
|
|
|
::
|
|
|
|
=. mo-state
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?=(%u action.forward-ames)
|
2019-04-11 23:31:55 +03:00
|
|
|
mo-state
|
|
|
|
(mo-give %mack ~)
|
|
|
|
::
|
|
|
|
=/ =path
|
2019-04-27 07:54:35 +03:00
|
|
|
=/ him (scot %p ship)
|
|
|
|
=/ num (scot %ud bone)
|
|
|
|
/sys/req/[him]/[dude]/[num]
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =sock [ship our]
|
|
|
|
::
|
2019-04-11 23:31:55 +03:00
|
|
|
=/ =note-arvo
|
2019-05-06 05:17:46 +03:00
|
|
|
?- action.forward-ames
|
|
|
|
::
|
|
|
|
%m
|
|
|
|
::
|
|
|
|
=/ =task:able
|
|
|
|
=/ =internal-task [dude %puff [mark noun]:forward-ames]
|
|
|
|
[%deal sock internal-task]
|
|
|
|
[%g task]
|
|
|
|
::
|
|
|
|
%l
|
|
|
|
::
|
|
|
|
=/ =task:able
|
|
|
|
=/ =internal-task [dude %peel [mark path]:forward-ames]
|
|
|
|
[%deal sock internal-task]
|
|
|
|
[%g task]
|
|
|
|
::
|
|
|
|
%s
|
|
|
|
::
|
|
|
|
=/ =task:able
|
|
|
|
=/ =internal-task [dude %peer path.forward-ames]
|
|
|
|
[%deal sock internal-task]
|
|
|
|
[%g task]
|
|
|
|
::
|
|
|
|
%u
|
|
|
|
::
|
|
|
|
=/ =task:able
|
|
|
|
=/ =internal-task [dude %pull ~]
|
|
|
|
[%deal sock internal-task]
|
|
|
|
[%g task]
|
2019-04-11 23:31:55 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
(mo-pass path note-arvo)
|
|
|
|
::
|
|
|
|
:: +mo-gawd: ames backward.
|
|
|
|
::
|
|
|
|
++ mo-gawd
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=ship =dude =bone =reverse-ames]
|
2019-04-11 23:31:55 +03:00
|
|
|
^+ mo-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?- action.reverse-ames
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
|
|
|
%d
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-04-11 23:31:55 +03:00
|
|
|
=/ =path
|
2019-04-27 07:54:35 +03:00
|
|
|
=/ him (scot %p ship)
|
|
|
|
=/ num (scot %ud bone)
|
|
|
|
/sys/rep/[him]/[dude]/[num]
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
|
|
|
=/ =note-arvo
|
|
|
|
=/ beak (mo-beak dude)
|
|
|
|
=/ info [p q]:beak
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =schematic:ford [%vale info p.reverse-ames q.reverse-ames]
|
2019-04-27 07:54:35 +03:00
|
|
|
[%f %build live=%.n schematic]
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
|
|
|
(mo-pass path note-arvo)
|
|
|
|
::
|
|
|
|
%x
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
:: XX should crash
|
|
|
|
=. mo-state (mo-give %mack ~)
|
|
|
|
::
|
|
|
|
=/ initialised
|
|
|
|
=/ out (mo-ball ship bone)
|
|
|
|
(mo-abed out)
|
2019-04-11 23:31:55 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
(mo-give:initialised %unto %quit ~)
|
2015-05-10 01:55:05 +03:00
|
|
|
==
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:05:43 +03:00
|
|
|
:: +ap: agent engine
|
|
|
|
::
|
|
|
|
++ ap
|
2016-11-24 07:25:07 +03:00
|
|
|
~% %gall-ap +> ~
|
2019-04-27 09:08:29 +03:00
|
|
|
::
|
2019-04-28 23:42:04 +03:00
|
|
|
|_ $: dap=dude
|
2019-05-06 05:17:46 +03:00
|
|
|
pry=privilege
|
2019-04-28 23:42:04 +03:00
|
|
|
ost=bone
|
2019-05-06 05:17:46 +03:00
|
|
|
zip=(list internal-move)
|
2019-04-28 23:42:04 +03:00
|
|
|
dub=(list (each suss tang))
|
2019-05-06 05:17:46 +03:00
|
|
|
sat=agent
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-04-27 08:05:43 +03:00
|
|
|
++ ap-state .
|
|
|
|
::
|
2019-04-28 23:42:04 +03:00
|
|
|
:: +ap-abed: initialise the provided app with the supplied privilege.
|
2019-04-27 08:05:43 +03:00
|
|
|
::
|
|
|
|
++ ap-abed
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-abed
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=dude =privilege]
|
2019-04-27 08:05:43 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =agent
|
|
|
|
=/ running (~(got by running.ship-state.gall) dude)
|
|
|
|
=/ =stats
|
|
|
|
=/ change +(change.stats.running)
|
|
|
|
=/ trop (shaz (mix (add dude change) eny))
|
|
|
|
[change=change eny=trop time=now]
|
|
|
|
running(stats stats)
|
2019-04-27 09:08:29 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ maybe-bone (~(get by bone-map.ducts.agent) hen)
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
|
|
|
?^ maybe-bone
|
|
|
|
=/ bone u.maybe-bone
|
2019-05-06 05:17:46 +03:00
|
|
|
ap-state(dap dude, pry privilege, sat agent, ost bone)
|
2019-04-27 09:08:29 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =opaque-ducts
|
|
|
|
=/ bone +(bone.ducts.agent)
|
|
|
|
:+ bone=bone
|
|
|
|
bone-map=(~(put by bone-map.ducts.agent) hen bone)
|
|
|
|
duct-map=(~(put by duct-map.ducts.agent) bone hen)
|
2019-04-27 09:08:29 +03:00
|
|
|
::
|
2019-04-27 08:05:43 +03:00
|
|
|
%= ap-state
|
2019-05-06 05:17:46 +03:00
|
|
|
ost bone.ducts.agent
|
|
|
|
ducts.sat opaque-ducts
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-04-27 08:05:43 +03:00
|
|
|
:: +ap-abet: resolve moves.
|
|
|
|
::
|
|
|
|
++ ap-abet
|
|
|
|
^+ mo-state
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
=> ap-abut
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ running (~(put by running.ship-state.gall) dap sat)
|
|
|
|
::
|
|
|
|
=/ moves
|
|
|
|
=/ from-internal (turn zip ap-aver)
|
|
|
|
=/ from-suss (turn dub ap-avid)
|
|
|
|
:(weld from-internal from-suss moves)
|
|
|
|
::
|
2019-04-27 08:05:43 +03:00
|
|
|
%_ mo-state
|
2019-05-06 05:17:46 +03:00
|
|
|
running.ship-state.gall running
|
|
|
|
moves moves
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-abut: track queue.
|
|
|
|
::
|
|
|
|
++ ap-abut
|
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ internal-moves zip
|
2019-04-28 23:42:04 +03:00
|
|
|
=/ bones *(set bone)
|
|
|
|
::
|
|
|
|
|- ^+ ap-state
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
?^ internal-moves
|
|
|
|
?. ?=([%give %diff *] move.i.internal-moves)
|
|
|
|
$(internal-moves t.internal-moves)
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-move i.internal-moves
|
|
|
|
=^ filled ap-state ap-fill(ost bone.internal-move)
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ new-bones
|
|
|
|
?: filled
|
2019-04-28 23:42:04 +03:00
|
|
|
bones
|
2019-05-06 05:17:46 +03:00
|
|
|
(~(put in bones) bone.internal-move)
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
$(internal-moves t.internal-moves, bones new-bones)
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
|
|
|
=/ boned ~(tap in bones)
|
2019-04-27 09:08:29 +03:00
|
|
|
::
|
2019-04-28 23:42:04 +03:00
|
|
|
|- ^+ ap-state
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-04-28 23:42:04 +03:00
|
|
|
?~ boned
|
|
|
|
ap-state
|
2019-04-27 09:08:29 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=> $(boned t.boned, ost i.boned)
|
|
|
|
::
|
|
|
|
=/ tib (~(get by incoming.subscribers.sat) ost)
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
|
|
|
?~ tib
|
|
|
|
~& [%ap-abut-bad-bone dap ost]
|
2019-05-06 05:17:46 +03:00
|
|
|
ap-state
|
|
|
|
::
|
|
|
|
ap-kill(attributing.routes.pry p.u.tib)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +ap-aver: internal move to move.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
|
|
|
++ ap-aver
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-aver
|
2019-05-06 05:17:46 +03:00
|
|
|
|= =internal-move
|
2019-01-18 08:37:34 +03:00
|
|
|
^- move
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =duct (~(got by duct-map.ducts.sat) bone.internal-move)
|
|
|
|
=/ card
|
|
|
|
?- -.move.internal-move
|
|
|
|
::
|
|
|
|
%slip !!
|
|
|
|
::
|
|
|
|
%sick !!
|
|
|
|
::
|
|
|
|
%give
|
|
|
|
::
|
|
|
|
?< =(0 bone.internal-move)
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-gift p.move.internal-move
|
|
|
|
?. ?=(%diff -.internal-gift)
|
|
|
|
[%give %unto internal-gift]
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =cage p.internal-gift
|
|
|
|
=/ =mark
|
|
|
|
=/ trans (~(get by required-trans.sat) bone.internal-move)
|
|
|
|
(fall trans p.cage)
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: =(mark p.cage)
|
|
|
|
[%give %unto internal-gift]
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =path /sys/pel/[dap]
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[%pass path note-arvo]
|
|
|
|
::
|
|
|
|
%pass
|
|
|
|
::
|
|
|
|
=/ =path p.move.internal-move
|
|
|
|
=/ =internal-note q.move.internal-move
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ use-path [%use dap path]
|
2019-04-28 23:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =note-arvo
|
|
|
|
?- task.internal-note
|
|
|
|
::
|
|
|
|
::
|
|
|
|
%send
|
|
|
|
::
|
|
|
|
=/ =sock [our ship.internal-note]
|
|
|
|
=/ =internal-task internal-task.internal-note
|
|
|
|
[%g %deal sock internal-task]
|
|
|
|
::
|
|
|
|
%meta
|
|
|
|
::
|
|
|
|
=/ =term term.internal-note
|
|
|
|
=/ =vase vase.internal-note
|
|
|
|
[term %meta vase]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
[%pass use-path note-arvo]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
[duct card]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-avid: onto results.
|
|
|
|
::
|
|
|
|
++ ap-avid
|
2019-05-06 05:17:46 +03:00
|
|
|
|= report=(each suss tang)
|
2019-04-27 09:08:29 +03:00
|
|
|
^- move
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[hen %give %onto report]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-call: call into server.
|
|
|
|
::
|
|
|
|
++ ap-call
|
2016-11-24 07:25:07 +03:00
|
|
|
~/ %ap-call
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=term =vase]
|
2019-04-27 08:42:04 +03:00
|
|
|
^- [(unit tang) _ap-state]
|
|
|
|
::
|
|
|
|
=. ap-state ap-bowl
|
2019-05-03 01:53:27 +03:00
|
|
|
=^ arm ap-state (ap-farm term)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.arm)
|
2019-05-03 01:53:27 +03:00
|
|
|
[(some p.arm) ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ arm ap-state (ap-slam term p.arm vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.arm)
|
|
|
|
[(some p.arm) ap-state]
|
|
|
|
(ap-sake p.arm)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-peek: peek.
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
++ ap-peek
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-peek
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=term tyl=path]
|
2016-11-24 07:25:07 +03:00
|
|
|
^- (unit (unit cage))
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ marked
|
|
|
|
?. ?=(%x term)
|
2019-05-03 01:53:27 +03:00
|
|
|
[mark=%$ tyl=tyl]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =path (flop tyl)
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?> ?=(^ path)
|
|
|
|
[mark=i.path tyl=(flop t.path)]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =mark mark.marked
|
|
|
|
=/ tyl tyl.marked
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-arm ap-state (ap-find %peek term tyl)
|
|
|
|
::
|
|
|
|
?~ maybe-arm
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tank [%leaf "peek find fail"]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog tank >tyl< >mark< ~)
|
|
|
|
(print [~ ~])
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ arm ap-state (ap-farm q.u.maybe-arm)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.arm)
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tank [%leaf "peek farm fail"]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog tank p.arm)
|
|
|
|
(print [~ ~])
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
=/ slammed
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ index p.u.maybe-arm
|
|
|
|
=/ term q.u.maybe-arm
|
|
|
|
=/ =vase
|
|
|
|
=/ =path [term tyl]
|
|
|
|
=/ raw (slag index path)
|
|
|
|
!> raw
|
|
|
|
(ap-slam term p.arm vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ possibly-vase ap-state slammed
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tank [%leaf "peek slam fail"]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog tank p.possibly-vase)
|
|
|
|
(print [~ ~])
|
|
|
|
::
|
|
|
|
=/ slammed-vase p.possibly-vase
|
|
|
|
=/ vase-value q.slammed-vase
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
=/ err
|
|
|
|
=/ =tank [%leaf "peek bad result"]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog tank ~)
|
|
|
|
(print [~ ~])
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?+ vase-value err
|
|
|
|
::
|
|
|
|
~
|
|
|
|
::
|
|
|
|
~
|
|
|
|
::
|
|
|
|
[~ ~]
|
|
|
|
::
|
|
|
|
[~ ~]
|
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
[~ ~ ^]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ =vase (sped (slot 7 slammed-vase))
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
?. ?=([p=@ *] q.vase)
|
|
|
|
=/ =tank [%leaf "scry: malformed cage"]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog tank ~)
|
|
|
|
(print [~ ~])
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
?. ((sane %as) p.q.vase)
|
|
|
|
=/ =tank [%leaf "scry: malformed cage"]
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ print (slog tank ~)
|
|
|
|
(print [~ ~])
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
?. =(mark p.q.vase)
|
|
|
|
[~ ~]
|
|
|
|
::
|
|
|
|
=/ =cage [p.q.vase (slot 3 vase)]
|
|
|
|
(some (some cage))
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +ap-agent-action: apply effect.
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ ap-agent-action
|
|
|
|
|= =agent-action
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?- -.agent-action
|
|
|
|
%peel (ap-peel +.agent-action)
|
|
|
|
%poke (ap-poke +.agent-action)
|
|
|
|
%peer (ap-peer +.agent-action)
|
2019-05-03 01:53:27 +03:00
|
|
|
%puff !!
|
|
|
|
%punk !!
|
|
|
|
%peer-not !!
|
|
|
|
%pull ap-pull
|
|
|
|
%pump ap-fall
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-diff: pour a diff.
|
|
|
|
::
|
|
|
|
++ ap-diff
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-diff
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=ship =path =cage]
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ rest +.path
|
|
|
|
=/ diff [%diff p.cage rest]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-arm ap-state (ap-find diff)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-arm
|
|
|
|
=/ target [%.n ship rest]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
=/ =tang
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ why "diff: no {<[p.cage rest]>}"
|
2019-05-03 01:53:27 +03:00
|
|
|
(ap-suck why)
|
|
|
|
::
|
|
|
|
=/ lame (ap-lame %diff tang)
|
|
|
|
(ap-pump:lame target)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =vase
|
|
|
|
=/ target
|
2019-05-06 05:17:46 +03:00
|
|
|
?: =(0 p.arm)
|
|
|
|
=/ =vase (ap-cage cage)
|
|
|
|
[!>(rest) vase]
|
|
|
|
[!>((slag (dec p.arm) rest)) q.cage]
|
2019-05-03 01:53:27 +03:00
|
|
|
(slop target)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ called ap-state (ap-call q.arm vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ called
|
|
|
|
=/ lame (ap-lame q.arm u.called)
|
|
|
|
(ap-pump:lame %.n ship path)
|
|
|
|
(ap-pump %.y ship path)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-cage: cage to tagged vase.
|
|
|
|
::
|
|
|
|
++ ap-cage
|
2019-05-29 01:37:42 +03:00
|
|
|
|= cag/cage
|
|
|
|
^- vase
|
|
|
|
(slop `vase`[[%atom %tas `p.cag] p.cag] q.cag)
|
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-pump: update subscription.
|
|
|
|
::
|
|
|
|
++ ap-pump
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-pump
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [is-ok=? =ship =path]
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ way [(scot %p ship) %out path]
|
|
|
|
::
|
|
|
|
?: is-ok
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-note [%send ship -.path %pump ~]
|
|
|
|
(ap-pass way internal-note)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
=/ give (ap-give %quit ~)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-note [%send ship -.path %pull ~]
|
|
|
|
(ap-pass:give way internal-note)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-fail: drop from queue.
|
|
|
|
::
|
|
|
|
++ ap-fall
|
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. (~(has by incoming.subscribers.sat) ost)
|
2019-05-03 01:53:27 +03:00
|
|
|
ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ level (~(get by meter.subscribers.sat) ost)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: |(?=(~ level) =(0 u.level))
|
2019-05-03 01:53:27 +03:00
|
|
|
ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=. u.level (dec u.level)
|
|
|
|
::
|
|
|
|
?: =(0 u.level)
|
|
|
|
=/ deleted (~(del by meter.subscribers.sat) ost)
|
|
|
|
%_ ap-state
|
|
|
|
meter.subscribers.sat deleted
|
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ dropped (~(put by meter.subscribers.sat) ost u.level)
|
|
|
|
ap-state(meter.subscribers.sat dropped)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-farm: produce arm.
|
|
|
|
::
|
|
|
|
++ ap-farm
|
2016-11-24 07:25:07 +03:00
|
|
|
~/ %ap-farm
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =term
|
2019-04-27 08:42:04 +03:00
|
|
|
^- [(each vase tang) _ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ compiled
|
|
|
|
=/ =type p.running-state.sat
|
|
|
|
=/ =hoon [%limb term]
|
|
|
|
(~(mint wa cache.sat) type hoon)
|
|
|
|
::
|
|
|
|
=/ virtual
|
|
|
|
=/ trap |.(compiled)
|
|
|
|
(mule trap)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.virtual)
|
|
|
|
=/ =tang p.virtual
|
2019-05-03 01:53:27 +03:00
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ possibly-vase=(each vase tang)
|
|
|
|
=/ value q.running-state.sat
|
|
|
|
=/ ton (mock [value q.+<.virtual] ap-sled)
|
2019-05-03 01:53:27 +03:00
|
|
|
?- -.ton
|
2019-05-06 05:17:46 +03:00
|
|
|
%0 [%.y p.+<.virtual p.ton]
|
|
|
|
%1 [%.n (turn p.ton |=(a=* (smyt (path a))))]
|
2019-05-03 01:53:27 +03:00
|
|
|
%2 [%.n p.ton]
|
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ next
|
|
|
|
=/ =worm +>.virtual
|
|
|
|
%_ ap-state
|
|
|
|
cache.sat worm
|
|
|
|
==
|
|
|
|
::
|
|
|
|
[possibly-vase next]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-fill: add to queue.
|
|
|
|
::
|
|
|
|
++ ap-fill
|
|
|
|
^- [? _ap-state]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ meter (~(gut by meter.subscribers.sat) ost 0)
|
2019-06-04 01:23:29 +03:00
|
|
|
=/ subscriber=(unit (pair ship path))
|
2019-05-06 05:17:46 +03:00
|
|
|
(~(get by incoming.subscribers.sat) ost)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ incoming (~(get by incoming.subscribers.sat) ost)
|
|
|
|
=/ duct (~(get by duct-map.ducts.sat) ost)
|
|
|
|
::
|
|
|
|
?: ?& =(20 meter)
|
2019-06-04 01:23:29 +03:00
|
|
|
?| ?=(~ subscriber)
|
|
|
|
!=(our p.u.subscriber)
|
|
|
|
==
|
|
|
|
==
|
2019-05-06 05:17:46 +03:00
|
|
|
~& [%gall-pulling-20 ost incoming duct]
|
|
|
|
[%.n ap-state]
|
|
|
|
::
|
|
|
|
=/ next
|
|
|
|
=/ meter (~(put by meter.subscribers.sat) ost +(meter))
|
|
|
|
%_ ap-state
|
|
|
|
meter.subscribers.sat meter
|
|
|
|
==
|
|
|
|
::
|
|
|
|
[%.y next]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-find: general arm.
|
|
|
|
::
|
|
|
|
++ ap-find
|
2018-11-25 01:20:22 +03:00
|
|
|
~/ %ap-find
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=term =path]
|
|
|
|
^- [(unit (pair @ud @tas)) _ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ maybe-cached (~(get by find-cache.sat) [term path])
|
|
|
|
?^ maybe-cached
|
|
|
|
[u.maybe-cached ap-state]
|
2018-11-25 01:20:22 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ result
|
|
|
|
=/ dep 0
|
|
|
|
|- ^- (unit (pair @ud @tas))
|
|
|
|
=/ spu
|
|
|
|
?~ path
|
|
|
|
~
|
|
|
|
=/ hyped (cat 3 term (cat 3 '-' i.path))
|
|
|
|
$(path t.path, dep +(dep), term hyped)
|
|
|
|
::
|
|
|
|
?^ spu
|
|
|
|
spu
|
|
|
|
::
|
|
|
|
?. (ap-fond term)
|
|
|
|
~
|
|
|
|
(some [dep term])
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=. find-cache.sat (~(put by find-cache.sat) [term path] result)
|
2018-11-25 01:20:22 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
[result ap-state]
|
|
|
|
::
|
|
|
|
:: +ap-fond: check for arm.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
++ ap-fond
|
2018-11-25 01:20:22 +03:00
|
|
|
~/ %ap-fond
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =term
|
2016-11-24 07:25:07 +03:00
|
|
|
^- ?
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =type p.running-state.sat
|
|
|
|
(slob term type)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-give: return result.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
++ ap-give
|
2019-05-06 05:17:46 +03:00
|
|
|
|= =internal-gift
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ internal-moves
|
|
|
|
=/ move [%give internal-gift]
|
|
|
|
=/ =internal-move [ost move]
|
|
|
|
[internal-move zip]
|
|
|
|
::
|
|
|
|
ap-state(zip internal-moves)
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
|
|
|
:: +ap-bowl: set up bowl.
|
|
|
|
::
|
|
|
|
++ ap-bowl
|
2019-05-03 01:53:27 +03:00
|
|
|
^+ ap-state
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
%_ ap-state
|
2019-05-06 05:17:46 +03:00
|
|
|
+12.q.running-state.sat
|
2016-11-24 07:25:07 +03:00
|
|
|
^- bowl
|
|
|
|
:* :* our :: host
|
2019-05-06 05:17:46 +03:00
|
|
|
attributing.routes.pry :: guest
|
2016-11-24 07:25:07 +03:00
|
|
|
dap :: agent
|
|
|
|
== ::
|
|
|
|
:* wex=~ :: outgoing
|
2019-05-06 05:17:46 +03:00
|
|
|
sup=incoming.subscribers.sat :: incoming
|
2016-11-24 07:25:07 +03:00
|
|
|
== ::
|
|
|
|
:* ost=ost :: cause
|
2019-05-06 05:17:46 +03:00
|
|
|
act=change.stats.sat :: tick
|
|
|
|
eny=eny.stats.sat :: nonce
|
|
|
|
now=time.stats.sat :: time
|
|
|
|
byk=beak.sat :: source
|
2016-11-24 07:25:07 +03:00
|
|
|
== == ::
|
|
|
|
==
|
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move: process each move.
|
|
|
|
::
|
|
|
|
++ ap-move
|
2016-11-24 07:25:07 +03:00
|
|
|
~/ %ap-move
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =vase
|
2019-05-06 05:17:46 +03:00
|
|
|
^- [(each internal-move tang) _ap-state]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ noun q.vase
|
|
|
|
::
|
|
|
|
?@ noun
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "move: invalid move (atom)")
|
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ -.noun
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "move: invalid move (bone)")
|
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?@ +.noun
|
|
|
|
=/ =tang (ap-suck "move: invalid move (card)")
|
2019-05-03 01:53:27 +03:00
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =bone -.noun
|
|
|
|
=/ has-duct (~(has by duct-map.ducts.sat) bone)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. &(has-duct !=(0 bone))
|
|
|
|
=/ =tang (ap-suck "move: invalid card (bone {<bone>})")
|
2019-05-03 01:53:27 +03:00
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ vase cache.sat (~(spot wa cache.sat) 3 vase)
|
|
|
|
=^ vase cache.sat (~(slot wa cache.sat) 3 vase)
|
|
|
|
::
|
|
|
|
?+ +<.noun (ap-move-pass bone +<.noun vase)
|
|
|
|
%diff (ap-move-diff bone vase)
|
|
|
|
%hiss (ap-move-hiss bone vase)
|
|
|
|
%peel (ap-move-peel bone vase)
|
|
|
|
%peer (ap-move-peer bone vase)
|
|
|
|
%pull (ap-move-pull bone vase)
|
|
|
|
%poke (ap-move-poke bone vase)
|
|
|
|
%send (ap-move-send bone vase)
|
|
|
|
%quit (ap-move-quit bone vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
%http-response (ap-move-http-response -.q.vax cav)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-quit: give quit move.
|
|
|
|
::
|
|
|
|
++ ap-move-quit
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %quit
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =vase]
|
2019-05-06 05:17:46 +03:00
|
|
|
^- [(each internal-move tang) _ap-state]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ possibly-internal-move=(each internal-move tang)
|
2019-05-03 01:53:27 +03:00
|
|
|
?^ q.vase
|
|
|
|
=/ =tang (ap-suck "quit: improper give")
|
|
|
|
[%.n tang]
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ =internal-move
|
|
|
|
=/ =internal-gift [%quit ~]
|
|
|
|
=/ move [%give internal-gift]
|
|
|
|
[bone move]
|
|
|
|
::
|
|
|
|
[%.y internal-move]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
=/ next
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ incoming (~(del by incoming.subscribers.sat) bone)
|
|
|
|
%_ ap-state
|
|
|
|
incoming.subscribers.sat incoming
|
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[possibly-internal-move next]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-diff: give diff move.
|
|
|
|
::
|
|
|
|
++ ap-move-diff
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %diff
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =vase]
|
2019-05-06 05:17:46 +03:00
|
|
|
^- [(each internal-move tang) _ap-state]
|
|
|
|
::
|
|
|
|
=^ vase cache.sat (~(sped wa cache.sat) vase)
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ value q.vase
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?& ?=(^ value)
|
|
|
|
?=(@ -.value)
|
|
|
|
((sane %tas) -.value)
|
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "diff: improper give")
|
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ vase cache.sat (~(slot wa cache.sat) 3 vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-move
|
|
|
|
=/ =cage [-.value vase]
|
|
|
|
=/ move [%give %diff cage]
|
|
|
|
[bone move]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[[%.y internal-move] ap-state]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: +ap-move-http-response
|
|
|
|
::
|
|
|
|
++ ap-move-http-response
|
|
|
|
|= [sto=bone vax=vase]
|
|
|
|
^- [(each cove tang) _ap-state]
|
2018-10-03 21:36:45 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
:: TODO: Magic vase validation. I have no idea how malformed checking
|
|
|
|
:: works.
|
2019-02-12 01:41:50 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:_ ap-state
|
2019-06-19 21:09:53 +03:00
|
|
|
[%& sto %give %http-response ;;(http-event:http q.vax)]
|
2018-10-03 21:36:45 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
|
|
|
:: +ap-move-mess: extract path, target.
|
|
|
|
::
|
|
|
|
++ ap-move-mess
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %mess
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =vase
|
2019-04-27 08:42:04 +03:00
|
|
|
^- [(each (trel path ship term) tang) _ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ possibly-trel=(each (trel path ship term) tang)
|
2019-05-03 01:53:27 +03:00
|
|
|
?. ?& ?=([p=* [q=@ r=@] s=*] q.vase)
|
|
|
|
(gte 1 (met 7 q.q.vase))
|
|
|
|
==
|
|
|
|
=/ =tang (ap-suck "mess: malformed target")
|
|
|
|
[%.n tang]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ pax ((soft path) p.q.vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?& ?=(^ pax)
|
|
|
|
(levy u.pax (sane %ta))
|
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "mess: malformed path")
|
|
|
|
[%.n tang]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =path [(scot %p q.q.vase) %out r.q.vase u.pax]
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =ship q.q.vase
|
|
|
|
=/ =term r.q.vase
|
|
|
|
[%.y path ship term]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[possibly-trel ap-state]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-pass: pass general move.
|
|
|
|
::
|
|
|
|
++ ap-move-pass
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %pass
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =noun =vase]
|
2019-05-06 05:17:46 +03:00
|
|
|
^- [(each internal-move tang) _ap-state]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?& ?=(@ noun)
|
|
|
|
((sane %tas) noun)
|
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "pass: malformed card")
|
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ pax ((soft path) -.q.vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?& ?=(^ pax)
|
|
|
|
(levy u.pax (sane %ta))
|
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "pass: malformed path")
|
2019-02-06 03:15:13 +03:00
|
|
|
~& [%bad-path pux]
|
2019-05-03 01:53:27 +03:00
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ maybe-vane (ap-vain noun)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-vane
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "move: unknown note {(trip noun)}")
|
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ vane u.maybe-vane
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ at-slot cache.sat (~(slot wa cache.sat) 3 vase)
|
|
|
|
::
|
|
|
|
=/ =internal-move
|
|
|
|
=/ =path [(scot %p attributing.routes.pry) %inn u.pax]
|
|
|
|
=/ vase (ap-term %tas noun)
|
|
|
|
=/ combined (slop vase at-slot)
|
|
|
|
=/ =internal-note [%meta vane combined]
|
|
|
|
=/ card [%pass path internal-note]
|
|
|
|
[bone card]
|
|
|
|
::
|
|
|
|
[[%.y internal-move] ap-state]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-poke: pass %poke.
|
|
|
|
::
|
|
|
|
++ ap-move-poke
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %poke
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=bone =vase]
|
|
|
|
^- [(each internal-move tang) _ap-state]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ possibly-target ap-state (ap-move-mess vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-target)
|
|
|
|
[possibly-target ap-state]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ at-slot cache.sat (~(slot wa cache.sat) 7 vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?& ?=([p=@ q=*] q.at-slot)
|
|
|
|
((sane %tas) p.q.at-slot)
|
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "poke: malformed cage")
|
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ specialised cache.sat (~(stop wa cache.sat) 3 at-slot)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ target p.possibly-target
|
|
|
|
=/ =path p.target
|
|
|
|
=/ =ship q.target
|
|
|
|
=/ =term r.target
|
|
|
|
::
|
|
|
|
=/ =internal-move
|
|
|
|
=/ =internal-task [term %poke p.q.at-slot specialised]
|
|
|
|
=/ =internal-note [%send ship internal-task]
|
|
|
|
=/ card [%pass path internal-note]
|
|
|
|
[bone card]
|
|
|
|
::
|
|
|
|
[[%.y internal-move] ap-state]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-peel: pass %peel.
|
|
|
|
::
|
|
|
|
++ ap-move-peel
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %peel
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =vase]
|
2019-05-06 05:17:46 +03:00
|
|
|
^- [(each internal-move tang) _ap-state]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ possibly-target ap-state (ap-move-mess vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-target)
|
|
|
|
[possibly-target ap-state]
|
|
|
|
::
|
|
|
|
=/ target p.possibly-target
|
|
|
|
=/ =ship q.target
|
|
|
|
=/ =term r.target
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ mark ((soft mark) +>-.q.vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ mark
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "peel: malformed mark")
|
2019-05-06 05:17:46 +03:00
|
|
|
[[%.n tang] ap-state]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ pax ((soft path) +>+.q.vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?& ?=(^ pax)
|
|
|
|
(levy u.pax (sane %ta))
|
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "peel: malformed path")
|
2019-05-06 05:17:46 +03:00
|
|
|
[[%.n tang] ap-state]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ move
|
|
|
|
?: (~(has in misvale.sat) p.target)
|
|
|
|
=/ =internal-task
|
|
|
|
=/ =tang [[%leaf "peel: misvalidation encountered"] ~]
|
|
|
|
=/ =agent-action [%peer-not tang]
|
|
|
|
[term agent-action]
|
|
|
|
::
|
|
|
|
=/ =internal-note [%send ship internal-task]
|
|
|
|
=/ card [%pass p.target internal-note]
|
|
|
|
[bone card]
|
|
|
|
::
|
|
|
|
=/ =agent-action [%peel u.mark u.pax]
|
|
|
|
=/ =internal-task [term agent-action]
|
|
|
|
=/ =internal-note [%send ship internal-task]
|
|
|
|
=/ card [%pass p.target internal-note]
|
|
|
|
[bone card]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[[%.y move] ap-state]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-peer: pass %peer.
|
|
|
|
::
|
|
|
|
++ ap-move-peer
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %peer
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =vase]
|
2019-05-06 05:17:46 +03:00
|
|
|
^- [(each internal-move tang) _ap-state]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ possibly-target ap-state (ap-move-mess vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-target)
|
|
|
|
[possibly-target ap-state]
|
|
|
|
::
|
|
|
|
=/ target p.possibly-target
|
|
|
|
=/ =ship q.target
|
|
|
|
=/ =term r.target
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ pax ((soft path) +>.q.vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?& ?=(^ pax)
|
|
|
|
(levy u.pax (sane %ta))
|
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "peer: malformed path")
|
2019-05-06 05:17:46 +03:00
|
|
|
[[%.n tang] ap-state]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ move
|
|
|
|
?: (~(has in misvale.sat) p.target)
|
|
|
|
=/ err [[%leaf "peer: misvalidation encountered"] ~]
|
|
|
|
=/ =agent-action [%peer-not err]
|
|
|
|
=/ =internal-note [%send ship term agent-action]
|
|
|
|
=/ card [%pass p.target internal-note]
|
|
|
|
[bone card]
|
|
|
|
::
|
|
|
|
=/ =agent-action [%peer u.pax]
|
|
|
|
=/ =internal-note [%send ship term agent-action]
|
|
|
|
=/ card [%pass p.target internal-note]
|
|
|
|
[bone card]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[[%.y move] ap-state]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-pull: pass %pull.
|
|
|
|
::
|
|
|
|
++ ap-move-pull
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %pull
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =vase]
|
2019-05-06 05:17:46 +03:00
|
|
|
^- [(each internal-move tang) _ap-state]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ possibly-target ap-state (ap-move-mess vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-target)
|
|
|
|
[possibly-target ap-state]
|
|
|
|
::
|
|
|
|
=/ target p.possibly-target
|
|
|
|
=/ =ship q.target
|
|
|
|
=/ =term r.target
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
?. =(~ +>.q.vase)
|
|
|
|
=/ =tang (ap-suck "pull: malformed card")
|
2019-05-06 05:17:46 +03:00
|
|
|
[[%.n tang] ap-state]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ move
|
|
|
|
=/ =agent-action [%pull ~]
|
|
|
|
=/ =internal-note [%send ship term agent-action]
|
|
|
|
=/ card [%pass p.target internal-note]
|
|
|
|
[bone card]
|
|
|
|
::
|
|
|
|
[[%.y move] ap-state]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-move-send: pass gall action.
|
|
|
|
::
|
|
|
|
++ ap-move-send
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %send
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=bone =vase]
|
2019-05-06 05:17:46 +03:00
|
|
|
^- [(each internal-move tang) _ap-state]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?. ?& ?=([p=* [q=@ r=@] [s=@ t=*]] q.vase)
|
|
|
|
(gte 1 (met 7 q.q.vase))
|
|
|
|
((sane %tas) r.q.vase)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =tang (ap-suck "send: improper ask.[%send wire gill agent-action]")
|
|
|
|
[[%.n tang] ap-state]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ pax ((soft path) p.q.vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. ?& ?=(^ pax)
|
|
|
|
(levy u.pax (sane %ta))
|
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "send: malformed path")
|
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
|
|
|
?: ?=($poke s.q.vase)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ specialised cache.sat (~(spot wa cache.sat) 7 vase)
|
|
|
|
::
|
|
|
|
?> =(%poke -.q.specialised)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
?. ?& ?=([p=@ q=*] t.q.vase)
|
|
|
|
((sane %tas) p.t.q.vase)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "send: malformed poke")
|
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ specialised cache.sat (~(spot wa cache.sat) 3 specialised)
|
|
|
|
=^ at-slot cache.sat (~(slot wa cache.sat) 3 specialised)
|
|
|
|
::
|
|
|
|
=/ move
|
|
|
|
=/ =agent-action [%poke p.t.q.vase at-slot]
|
|
|
|
=/ =internal-note [%send q.q.vase r.q.vase agent-action]
|
|
|
|
=/ =path [(scot %p q.q.vase) %out r.q.vase u.pax]
|
|
|
|
=/ card [%pass path internal-note]
|
|
|
|
[bone card]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[[%.y move] ap-state]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ maybe-action ((soft agent-action) [s t]:q.vase)
|
|
|
|
?~ maybe-action
|
|
|
|
=/ =tang (ap-suck "send: malformed agent-action")
|
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
|
|
|
=/ move
|
|
|
|
=/ =agent-action u.maybe-action
|
|
|
|
=/ =internal-note [%send q.q.vase r.q.vase agent-action]
|
|
|
|
=/ =path [(scot %p q.q.vase) %out r.q.vase u.pax]
|
|
|
|
=/ card [%pass path internal-note]
|
|
|
|
[bone card]
|
|
|
|
::
|
|
|
|
[[%.y move] ap-state]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-pass: request action.
|
|
|
|
::
|
|
|
|
++ ap-pass
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=path =internal-note]
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-move
|
|
|
|
=/ move [%pass path internal-note]
|
|
|
|
[ost move]
|
|
|
|
::
|
|
|
|
=/ internal-moves [internal-move zip]
|
|
|
|
::
|
|
|
|
ap-state(zip internal-moves)
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
|
|
|
:: +ap-peep: reinstall.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
++ ap-peep
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-peep
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =vase
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ prep
|
|
|
|
=/ installed ap-prep(running-state.sat vase)
|
|
|
|
=/ running (some running-state.sat)
|
|
|
|
(installed running)
|
|
|
|
::
|
|
|
|
=^ maybe-tang ap-state prep
|
|
|
|
::
|
|
|
|
?~ maybe-tang
|
|
|
|
ap-state
|
|
|
|
(ap-lame %prep-failed u.maybe-tang)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-peel: apply %peel.
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
++ ap-peel
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=mark =path]
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=. required-trans.sat (~(put by required-trans.sat) ost mark)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
(ap-peer path)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-peer: apply %peer.
|
|
|
|
::
|
|
|
|
++ ap-peer
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-peer
|
2019-04-27 08:42:04 +03:00
|
|
|
|= pax=path
|
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ incoming [attributing.routes.pry pax]
|
|
|
|
::
|
|
|
|
=. incoming.subscribers.sat
|
|
|
|
(~(put by incoming.subscribers.sat) ost incoming)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-arm ap-state (ap-find %peer pax)
|
|
|
|
::
|
|
|
|
?~ maybe-arm
|
2019-05-03 01:53:27 +03:00
|
|
|
ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
|
|
|
=/ =vase !>((slag p.arm pax))
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ old zip
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
=. zip ~
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-tang ap-state (ap-call q.arm vase)
|
|
|
|
::
|
|
|
|
=/ internal-moves=(list internal-move)
|
|
|
|
=/ move [ost %give %reap maybe-tang]
|
|
|
|
[move old]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=. zip (weld zip internal-moves)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-tang
|
2019-05-03 01:53:27 +03:00
|
|
|
ap-pule
|
|
|
|
ap-state
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
|
|
|
:: +ap-poke: apply %poke.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
++ ap-poke
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-poke
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =cage
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-arm ap-state (ap-find %poke p.cage ~)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-arm
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "no poke arm for {(trip p.cage)}")
|
|
|
|
(ap-give %coup (some tang))
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
|
|
|
::
|
|
|
|
=/ =vase
|
|
|
|
=/ vas (ap-term %tas p.cage)
|
|
|
|
?. =(0 p.arm)
|
|
|
|
q.cage
|
|
|
|
(slop vas q.cage)
|
|
|
|
::
|
|
|
|
=^ tur ap-state (ap-call q.arm vase)
|
2016-11-24 07:25:07 +03:00
|
|
|
(ap-give %coup tur)
|
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-lame: pour error.
|
|
|
|
::
|
|
|
|
++ ap-lame
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=term =tang]
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-arm ap-state (ap-find /lame)
|
|
|
|
::
|
|
|
|
=/ form |=(=tank [%rose [~ "! " ~] tank ~])
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-arm
|
|
|
|
=/ tang [>%ap-lame dap term< (turn tang form)]
|
2019-05-03 01:53:27 +03:00
|
|
|
~> %slog.`rose+[" " "[" "]"]^(flop tang)
|
2019-04-27 08:42:04 +03:00
|
|
|
ap-state
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
|
|
|
=/ =vase !>([term tang])
|
|
|
|
::
|
|
|
|
=^ maybe-tang ap-state (ap-call q.arm vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-tang
|
|
|
|
=/ tang u.maybe-tang
|
|
|
|
=/ etc (flop [>%ap-lame-lame< (turn tang form)])
|
|
|
|
~> %slog.`rose+[" " "[" "]"]^(welp etc [%leaf "." (flop tang)])
|
2019-04-27 08:42:04 +03:00
|
|
|
ap-state
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
ap-state
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-misvale: broken vale.
|
|
|
|
::
|
|
|
|
++ ap-misvale
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =wire
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
~& [%ap-blocking-misvale wire]
|
|
|
|
=/ misvaled (~(put in misvale.sat) wire)
|
|
|
|
ap-state(misvale.sat misvaled)
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
|
|
|
:: +ap-pour: generic take.
|
2016-11-04 04:35:47 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
++ ap-pour
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-pour
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=path =vase]
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?. &(?=([@ *] q.vase) ((sane %tas) -.q.vase))
|
|
|
|
=/ =tang (ap-suck "pour: malformed card")
|
|
|
|
(ap-lame %pour tang)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =term -.q.vase
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-arm ap-state (ap-find [term path])
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-arm
|
|
|
|
=/ =tang (ap-suck "pour: no {(trip -.q.vase)}: {<path>}")
|
|
|
|
(ap-lame term tang)
|
|
|
|
::
|
|
|
|
=/ arm u.maybe-arm
|
|
|
|
::
|
|
|
|
=^ at-slot cache.sat (~(slot wa cache.sat) 3 vase)
|
|
|
|
::
|
|
|
|
=/ vase (slop !>((slag p.arm path)) at-slot)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-tang ap-state (ap-call q.arm vase)
|
|
|
|
::
|
|
|
|
?^ maybe-tang
|
|
|
|
(ap-lame term u.maybe-tang)
|
2019-04-27 08:42:04 +03:00
|
|
|
ap-state
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-purr: unwrap take.
|
|
|
|
::
|
|
|
|
++ ap-purr
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-purr
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=term pax=path =cage]
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-arm ap-state (ap-find [term p.cage pax])
|
|
|
|
::
|
|
|
|
?~ maybe-arm
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "{(trip term)}: no {<`path`[p.cage pax]>}")
|
|
|
|
(ap-lame term tang)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =vase
|
|
|
|
%- slop
|
2019-05-06 05:17:46 +03:00
|
|
|
?: =(0 p.arm)
|
|
|
|
=/ =vase (ap-cage cage)
|
|
|
|
[!>(`path`pax) vase]
|
|
|
|
[!>((slag (dec p.arm) `path`pax)) q.cage]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-tang ap-state (ap-call q.arm vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-tang
|
|
|
|
(ap-lame q.arm u.maybe-tang)
|
2019-04-27 08:42:04 +03:00
|
|
|
ap-state
|
|
|
|
::
|
|
|
|
:: +ap-pout: specific take.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
++ ap-pout
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=path =internal-gift]
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?- -.internal-gift
|
|
|
|
%coup (ap-take %coup +.path (some !>(p.internal-gift)))
|
|
|
|
%diff (ap-diff attributing.routes.pry path p.internal-gift)
|
2019-05-03 01:53:27 +03:00
|
|
|
%quit (ap-take %quit +.path ~)
|
2019-05-06 05:17:46 +03:00
|
|
|
%reap (ap-take %reap +.path (some !>(p.internal-gift)))
|
2019-05-03 01:53:27 +03:00
|
|
|
%http-response !!
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-prep: install.
|
|
|
|
::
|
|
|
|
++ ap-prep
|
2019-05-06 05:17:46 +03:00
|
|
|
|= maybe-vase=(unit vase)
|
2019-04-27 08:42:04 +03:00
|
|
|
^- [(unit tang) _ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-tang ap-state (ap-prop maybe-vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ new-misvale-data
|
|
|
|
~? !=(misvale.sat *misvale-data)
|
|
|
|
[%misvale-drop misvale.sat]
|
|
|
|
:: new app might mean new marks
|
|
|
|
*misvale-data
|
2018-11-25 01:20:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ new-dub
|
|
|
|
=/ =term ?~(maybe-vase %boot %bump)
|
|
|
|
::
|
|
|
|
=/ possibly-suss
|
|
|
|
?~ maybe-tang
|
|
|
|
=/ =suss [dap term now]
|
|
|
|
[%.y suss]
|
|
|
|
[%.n u.maybe-tang]
|
|
|
|
::
|
|
|
|
[possibly-suss dub]
|
2016-11-08 03:41:22 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ next
|
|
|
|
%= ap-state
|
|
|
|
misvale.sat new-misvale-data
|
|
|
|
dub new-dub
|
|
|
|
find-cache.sat ~
|
|
|
|
==
|
|
|
|
::
|
|
|
|
[maybe-tang next]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-prop: install.
|
|
|
|
::
|
|
|
|
++ ap-prop
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-prop
|
2019-05-06 05:17:46 +03:00
|
|
|
|= maybe-vase=(unit vase)
|
2019-04-27 08:42:04 +03:00
|
|
|
^- [(unit tang) _ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ exists-arm (ap-fond %prep)
|
|
|
|
::
|
|
|
|
?. exists-arm
|
|
|
|
?~ maybe-vase
|
|
|
|
[~ ap-state]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ new (slot 13 running-state.sat)
|
|
|
|
=/ new-type p:new
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ old (slot 13 u.maybe-vase)
|
|
|
|
=/ old-type p:old
|
|
|
|
::
|
|
|
|
?. (~(nest ut new-type) %.n old-type)
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tang (ap-suck "prep mismatch")
|
2019-05-06 05:17:46 +03:00
|
|
|
[(some tang) ap-state]
|
|
|
|
::
|
|
|
|
=/ next ap-state(+13.q.running-state.sat +13.q.u.maybe-vase)
|
|
|
|
[~ next]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =vase
|
|
|
|
?~ maybe-vase
|
|
|
|
!>(~)
|
|
|
|
(slop !>(~) (slot 13 u.maybe-vase))
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
(ap-call %prep vase)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-pule: silent delete.
|
|
|
|
::
|
|
|
|
++ ap-pule
|
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ incoming (~(get by incoming.subscribers.sat) ost)
|
|
|
|
?~ incoming
|
2019-05-03 01:53:27 +03:00
|
|
|
ap-state
|
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
%_ ap-state
|
2019-05-06 05:17:46 +03:00
|
|
|
incoming.subscribers.sat (~(del by incoming.subscribers.sat) ost)
|
|
|
|
meter.subscribers.sat (~(del by meter.subscribers.sat) ost)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-pull: load delete.
|
|
|
|
::
|
|
|
|
++ ap-pull
|
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ maybe-incoming (~(get by incoming.subscribers.sat) ost)
|
|
|
|
?~ maybe-incoming
|
2019-05-03 01:53:27 +03:00
|
|
|
ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ incoming u.maybe-incoming
|
|
|
|
::
|
|
|
|
=: incoming.subscribers.sat (~(del by incoming.subscribers.sat) ost)
|
|
|
|
meter.subscribers.sat (~(del by meter.subscribers.sat) ost)
|
2019-05-03 01:53:27 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-arm ap-state (ap-find %pull q.incoming)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-arm
|
2019-05-03 01:53:27 +03:00
|
|
|
ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
|
|
|
=/ =vase !>((slag p.arm q.incoming))
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-tang ap-state (ap-call q.arm vase)
|
|
|
|
::
|
|
|
|
?^ maybe-tang
|
|
|
|
(ap-lame q.arm u.maybe-tang)
|
2019-04-27 08:42:04 +03:00
|
|
|
ap-state
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-kill: queue kill.
|
|
|
|
::
|
|
|
|
++ ap-kill
|
|
|
|
^+ ap-state
|
2016-11-24 07:25:07 +03:00
|
|
|
(ap-give:ap-pull %quit ~)
|
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-take: non-diff gall take.
|
|
|
|
::
|
|
|
|
++ ap-take
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-take
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=term =path maybe-vase=(unit vase)]
|
2019-04-27 08:42:04 +03:00
|
|
|
^+ ap-state
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ maybe-arm ap-state (ap-find term path)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?~ maybe-arm
|
2019-04-27 08:42:04 +03:00
|
|
|
ap-state
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ arm u.maybe-arm
|
|
|
|
=/ =vase
|
|
|
|
=/ vax !>((slag p.arm path))
|
|
|
|
?~ maybe-vase
|
|
|
|
vax
|
|
|
|
(slop vax u.maybe-vase)
|
|
|
|
::
|
|
|
|
=^ maybe-tang ap-state (ap-call q.arm vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?^ maybe-tang
|
|
|
|
(ap-lame q.arm u.maybe-tang)
|
2019-04-27 08:42:04 +03:00
|
|
|
ap-state
|
|
|
|
::
|
|
|
|
:: +ap-safe: process move list.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
++ ap-safe
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-safe
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =vase
|
2019-05-06 05:17:46 +03:00
|
|
|
^- [(each (list internal-move) tang) _ap-state]
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?~ q.vase
|
2019-05-06 05:17:46 +03:00
|
|
|
[[%.y ~] ap-state]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
?@ q.vase
|
|
|
|
=/ =tang (ap-suck "move: malformed list")
|
|
|
|
[[%.n tang] ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ hed cache.sat (~(slot wa cache.sat) 2 vase)
|
|
|
|
=^ possibly-internal-move ap-state (ap-move hed)
|
|
|
|
::
|
|
|
|
?: ?=(%.n -.possibly-internal-move)
|
|
|
|
[possibly-internal-move ap-state]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =internal-move p.possibly-internal-move
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ tel cache.sat (~(slot wa cache.sat) 3 vase)
|
2019-05-03 01:53:27 +03:00
|
|
|
=^ res ap-state $(vase tel)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ possibly-internal-moves
|
2019-05-03 01:53:27 +03:00
|
|
|
?: ?=(%.n -.res)
|
|
|
|
res
|
2019-05-06 05:17:46 +03:00
|
|
|
[%.y [internal-move p.res]]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
[possibly-internal-moves ap-state]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-sake: handle result.
|
|
|
|
::
|
|
|
|
++ ap-sake
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-sake
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =vase
|
2019-04-27 08:42:04 +03:00
|
|
|
^- [(unit tang) _ap-state]
|
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?: ?=(@ q.vase)
|
|
|
|
=/ =tang (ap-suck "sake: invalid product (atom)")
|
|
|
|
[(some tang) ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ hed cache.sat (~(slot wa cache.sat) 2 vase)
|
|
|
|
=^ possibly-internal-moves ap-state (ap-safe hed)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-internal-moves)
|
|
|
|
=/ =tang p.possibly-internal-moves
|
|
|
|
[(some tang) ap-state]
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ internal-moves p.possibly-internal-moves
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ tel cache.sat (~(slot wa cache.sat) 3 vase)
|
|
|
|
=^ possibly-vase ap-state (ap-save tel)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?: ?=(%.n -.possibly-vase)
|
|
|
|
=/ =tang p.possibly-vase
|
|
|
|
[(some tang) ap-state]
|
|
|
|
::
|
|
|
|
=/ next
|
|
|
|
%_ ap-state
|
|
|
|
zip (weld (flop internal-moves) zip)
|
|
|
|
running-state.sat p.possibly-vase
|
|
|
|
==
|
|
|
|
::
|
|
|
|
[~ next]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-save: verify core.
|
|
|
|
::
|
|
|
|
++ ap-save
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %ap-save
|
2019-04-27 08:42:04 +03:00
|
|
|
|= vax=vase
|
|
|
|
^- [(each vase tang) _ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ received-type p.vax
|
|
|
|
=/ running-type p.running-state.sat
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=^ nests cache.sat (~(nest wa cache.sat) running-type received-type)
|
|
|
|
::
|
|
|
|
=/ possibly-vase
|
|
|
|
?. nests
|
|
|
|
=/ =tang (ap-suck "invalid core")
|
|
|
|
[%.n tang]
|
|
|
|
[%.y vax]
|
|
|
|
::
|
|
|
|
[possibly-vase ap-state]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-slam: virtual slam.
|
|
|
|
::
|
|
|
|
++ ap-slam
|
2016-11-24 07:25:07 +03:00
|
|
|
~/ %ap-slam
|
2019-05-06 05:17:46 +03:00
|
|
|
|= [=term gat=vase arg=vase]
|
2019-04-27 08:42:04 +03:00
|
|
|
^- [(each vase tang) _ap-state]
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ compiled
|
|
|
|
=/ =type [%cell p.gat p.arg]
|
|
|
|
=/ =hoon [%cnsg [%$ ~] [%$ 2] [%$ 3] ~]
|
|
|
|
(~(mint wa cache.sat) type hoon)
|
|
|
|
::
|
|
|
|
=/ virtual
|
|
|
|
=/ trap |.(compiled)
|
|
|
|
(mule trap)
|
|
|
|
::
|
|
|
|
?: ?=(%.n -.virtual)
|
|
|
|
=/ =tang (ap-suck "call: {<term>}: type mismatch")
|
|
|
|
=/ sam (~(peek ut p.gat) %free 6)
|
|
|
|
=/ print
|
|
|
|
(slog >%ap-slam-mismatch< ~(duck ut p.arg) ~(duck ut sam) ~)
|
|
|
|
(print [[%.n tang] ap-state])
|
|
|
|
::
|
|
|
|
=/ =worm +>.virtual
|
|
|
|
=/ =vase +<.virtual
|
|
|
|
=/ =type p.vase
|
|
|
|
=/ nock q.vase
|
|
|
|
=/ ton (mock [[q.gat q.arg] nock] ap-sled)
|
|
|
|
::
|
|
|
|
=/ possibly-vase
|
|
|
|
?- -.ton
|
|
|
|
%0 [%.y type p.ton]
|
|
|
|
%1 [%.n (turn p.ton |=(a=* (smyt (path a))))]
|
|
|
|
%2 [%.n p.ton]
|
|
|
|
==
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ next ap-state(cache.sat worm)
|
|
|
|
[possibly-vase next]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-sled: namespace view.
|
|
|
|
::
|
|
|
|
++ ap-sled (sloy ska)
|
|
|
|
::
|
|
|
|
:: +ap-suck: standard tang.
|
|
|
|
::
|
|
|
|
++ ap-suck
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =tape
|
2016-11-24 07:25:07 +03:00
|
|
|
^- tang
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =tank [%leaf (weld "gall: {<dap>}: " tape)]
|
|
|
|
[tank ~]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-term: atomic vase.
|
|
|
|
::
|
|
|
|
++ ap-term
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=term =atom]
|
2016-11-24 07:25:07 +03:00
|
|
|
^- vase
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =type [%atom term (some atom)]
|
|
|
|
[p=type q=atom]
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-04-27 08:42:04 +03:00
|
|
|
:: +ap-vain: card to vane.
|
|
|
|
::
|
|
|
|
++ ap-vain
|
2019-05-03 01:53:27 +03:00
|
|
|
|= =term
|
2016-11-24 07:25:07 +03:00
|
|
|
^- (unit @tas)
|
2019-04-27 08:42:04 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?+ term ~& [%ap-vain term]
|
2019-05-06 05:17:46 +03:00
|
|
|
~
|
|
|
|
%bonk `%a
|
2019-02-02 04:00:15 +03:00
|
|
|
%build `%f
|
|
|
|
%cash `%a
|
|
|
|
%conf `%g
|
|
|
|
%cred `%c
|
|
|
|
%crew `%c
|
|
|
|
%crow `%c
|
|
|
|
%deal `%g
|
|
|
|
%dirk `%c
|
|
|
|
%drop `%c
|
|
|
|
%flog `%d
|
|
|
|
%info `%c
|
|
|
|
%keep `%f
|
|
|
|
%kill `%f
|
|
|
|
%look `%j
|
2019-08-07 01:42:37 +03:00
|
|
|
%listen `%j
|
2019-02-02 04:00:15 +03:00
|
|
|
%merg `%c
|
|
|
|
%mont `%c
|
2019-08-08 03:36:25 +03:00
|
|
|
%moon `%j
|
2019-02-02 04:00:15 +03:00
|
|
|
%nuke `%a
|
|
|
|
%ogre `%c
|
|
|
|
%perm `%c
|
|
|
|
%rest `%b
|
2019-08-08 01:15:25 +03:00
|
|
|
%rekey `%j
|
2019-02-02 04:00:15 +03:00
|
|
|
%wait `%b
|
|
|
|
%want `%a
|
|
|
|
%warp `%c
|
2019-08-11 00:24:31 +03:00
|
|
|
%wash `%g
|
2019-02-02 04:00:15 +03:00
|
|
|
%wipe `%f
|
2019-02-12 01:41:50 +03:00
|
|
|
::
|
2019-07-04 03:08:23 +03:00
|
|
|
%request `%i
|
|
|
|
%cancel-request `%i
|
2019-07-04 02:01:45 +03:00
|
|
|
%serve `%e
|
|
|
|
%connect `%e
|
|
|
|
%disconnect `%e
|
|
|
|
%rule `%e
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
--
|
|
|
|
--
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
:: +call: request.
|
|
|
|
::
|
|
|
|
++ call
|
2016-11-24 07:25:07 +03:00
|
|
|
~% %gall-call +> ~
|
2019-05-03 01:53:27 +03:00
|
|
|
|= [=duct hic=(hypo (hobo task:able))]
|
|
|
|
^- [(list move) _gall-payload]
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ;;(task:able p.q.hic)))
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ initialised (mo-abed:mo duct)
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
?- -.q.hic
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
|
|
|
%conf
|
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ =dock p.q.hic
|
|
|
|
=/ =ship p.dock
|
|
|
|
?. =(our ship)
|
|
|
|
~& [%gall-not-ours ship]
|
|
|
|
[~ gall-payload]
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
=/ booted (mo-boot:initialised q.dock q.q.hic)
|
2019-04-28 22:23:55 +03:00
|
|
|
mo-abet:booted
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
|
|
|
%deal
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
=< mo-abet
|
2019-05-03 01:53:27 +03:00
|
|
|
:: either to us
|
|
|
|
::
|
|
|
|
?. =(our q.p.q.hic)
|
|
|
|
:: or from us
|
|
|
|
::
|
|
|
|
?> =(our p.p.q.hic)
|
|
|
|
(mo-away:initialised q.p.q.hic q.q.hic)
|
|
|
|
(mo-come:initialised p.p.q.hic q.q.hic)
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
|
|
|
%init
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ payload gall-payload(system-duct.ship-state.gall duct)
|
2019-05-05 03:23:22 +03:00
|
|
|
[~ payload]
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
%sunk
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
[~ gall-payload]
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
%vega
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
[~ gall-payload]
|
2019-04-11 23:34:30 +03:00
|
|
|
::
|
|
|
|
%west
|
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
?> ?=([?(%ge %gh) @ ~] q.q.hic)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ dap i.t.q.q.hic
|
|
|
|
=/ him p.q.hic
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
?: ?=(%ge i.q.q.hic)
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ mes ;;((pair @ud forward-ames) r.q.hic)
|
2015-06-23 00:02:27 +03:00
|
|
|
=< mo-abet
|
2019-05-03 01:53:27 +03:00
|
|
|
(mo-gawk:initialised him dap mes)
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ mes ;;((pair @ud reverse-ames) r.q.hic)
|
2016-11-24 07:25:07 +03:00
|
|
|
=< mo-abet
|
2019-05-03 01:53:27 +03:00
|
|
|
(mo-gawd:initialised him dap mes)
|
2019-08-11 00:24:31 +03:00
|
|
|
::
|
|
|
|
%wash
|
2019-05-06 05:17:46 +03:00
|
|
|
=. running.ship-state.gall (~(run by running.ship-state.gall) |=(=agent agent(cache *worm)))
|
|
|
|
[~ gall-payload]
|
|
|
|
::
|
|
|
|
%wegh
|
|
|
|
::
|
|
|
|
=/ waiting
|
|
|
|
=/ queued (~(run by waiting.ship-state.gall) |=(blocked [%.y +<]))
|
|
|
|
(sort ~(tap by queued) aor)
|
|
|
|
::
|
|
|
|
=/ running
|
|
|
|
=/ active (~(run by running.ship-state.gall) |=(agent [%.y +<]))
|
|
|
|
(sort ~(tap by active) aor)
|
|
|
|
::
|
2018-12-13 04:34:25 +03:00
|
|
|
=/ =mass
|
2019-05-03 01:53:27 +03:00
|
|
|
:+ %gall %.n
|
2019-05-06 05:17:46 +03:00
|
|
|
:~ [%foreign %.y contacts.ship-state.gall]
|
|
|
|
[%blocked %.n waiting]
|
|
|
|
[%active %.n running]
|
|
|
|
[%dot %.y gall]
|
2018-12-13 04:34:25 +03:00
|
|
|
==
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=/ moves
|
|
|
|
=/ =move [duct %give %mass mass]
|
|
|
|
[move ~]
|
|
|
|
::
|
|
|
|
[moves gall-payload]
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
:: +load: recreate vane.
|
|
|
|
::
|
|
|
|
++ load
|
2019-05-06 05:17:46 +03:00
|
|
|
|= =gall-old
|
2019-05-03 01:53:27 +03:00
|
|
|
^+ gall-payload
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
?- -.gall-old
|
|
|
|
%0 gall-payload(gall gall-old)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
:: +scry: standard scry.
|
|
|
|
::
|
2016-11-24 07:25:07 +03:00
|
|
|
++ scry
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %gall-scry
|
2019-05-05 03:23:22 +03:00
|
|
|
|= [fur=(unit (set monk)) =term =shop =desk =coin =path]
|
2016-11-24 07:25:07 +03:00
|
|
|
^- (unit (unit cage))
|
2019-05-05 03:23:22 +03:00
|
|
|
?. ?=(%.y -.shop)
|
2019-05-03 01:53:27 +03:00
|
|
|
~
|
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
=/ =ship p.shop
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
?: ?& =(%u term)
|
|
|
|
=(~ path)
|
|
|
|
=([%$ %da now] coin)
|
|
|
|
=(our ship)
|
2016-11-24 07:25:07 +03:00
|
|
|
==
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =vase !>((~(has by running.ship-state.gall) desk))
|
2019-05-05 03:23:22 +03:00
|
|
|
=/ =cage [%noun vase]
|
|
|
|
(some (some cage))
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
?. =(our ship)
|
2016-11-24 07:25:07 +03:00
|
|
|
~
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
?. =([%$ %da now] coin)
|
2016-11-24 07:25:07 +03:00
|
|
|
~
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
?. (~(has by running.ship-state.gall) desk)
|
2019-05-05 03:23:22 +03:00
|
|
|
(some ~)
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
?. ?=(^ path)
|
2016-11-24 07:25:07 +03:00
|
|
|
~
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
=/ initialised mo-abed:mo
|
2019-05-06 05:17:46 +03:00
|
|
|
=/ =privilege [%high [~ ship]]
|
|
|
|
(mo-peek:initialised desk privilege term path)
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
:: +stay: save without cache.
|
|
|
|
::
|
2019-05-06 05:17:46 +03:00
|
|
|
++ stay gall
|
2019-05-03 01:53:27 +03:00
|
|
|
::
|
|
|
|
:: +take: response.
|
2016-11-24 07:25:07 +03:00
|
|
|
::
|
2019-05-03 01:53:27 +03:00
|
|
|
++ take
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %gall-take
|
2019-05-05 03:23:22 +03:00
|
|
|
|= [=wire =duct hin=(hypo sign-arvo)]
|
|
|
|
^- [(list move) _gall-payload]
|
|
|
|
::
|
|
|
|
~| [%gall-take wire]
|
|
|
|
::
|
|
|
|
?> ?=([?(%sys %use) *] wire)
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
=/ initialised (mo-abed:mo duct)
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
=>
|
|
|
|
::
|
2019-05-05 03:23:22 +03:00
|
|
|
?- i.wire
|
2019-05-06 05:17:46 +03:00
|
|
|
%sys (mo-cyst:initialised t.wire q.hin)
|
|
|
|
%use (mo-cook:initialised t.wire hin)
|
2016-11-04 21:19:02 +03:00
|
|
|
==
|
2019-05-06 05:17:46 +03:00
|
|
|
::
|
|
|
|
mo-abet
|
2016-11-24 07:25:07 +03:00
|
|
|
--
|