2017-03-30 15:17:37 +03:00
|
|
|
:: :: ::
|
2017-03-23 03:34:56 +03:00
|
|
|
:::: /hoon/talk/app :: ::
|
2017-03-30 15:17:37 +03:00
|
|
|
:: :: ::
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
::TODO rename to hall
|
2017-03-23 03:34:56 +03:00
|
|
|
::TODO master changes
|
2017-04-24 21:17:56 +03:00
|
|
|
::TODO char57 comments as line comments when regarding code.
|
2017-03-23 03:34:56 +03:00
|
|
|
::TODO avoid lark where possible
|
2017-04-25 22:09:20 +03:00
|
|
|
::TODO document what user-facing messages actually mean!
|
2017-05-13 01:05:49 +03:00
|
|
|
::TODO maybe have brokers accept reactions as well, redirect them to readers.
|
|
|
|
:: that way we can have foreign brokers react to our requests!
|
2017-04-21 00:59:36 +03:00
|
|
|
::TODO ::> to :> etc.
|
2017-04-18 22:33:02 +03:00
|
|
|
::
|
|
|
|
::TODO we can't do away with the default mailbox because we need it for things
|
|
|
|
:: like invite notifications etc. can we do better than request that apps
|
|
|
|
:: don't use it frivolously?
|
2017-04-28 20:40:12 +03:00
|
|
|
::
|
2017-03-30 15:17:37 +03:00
|
|
|
::TODO crash on pokes/peers we do not expect
|
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
::TODO federation should not be present at all in delta-application cores. the
|
|
|
|
:: way changes are to be applied should be figured out by the delta-
|
|
|
|
:: geenration cores entirely.
|
|
|
|
::
|
|
|
|
::TODO for using moons as tmp identities for friends: stories may want to keep
|
|
|
|
:: lists of moons (or just ships in general?) that we define as "standalone"
|
|
|
|
:: so that the "convert to true identity" doesn't happen for them.
|
|
|
|
::
|
|
|
|
::TODO we need to have something for upward changes on burdens as well. we
|
|
|
|
:: could use entirely new query for this. to do so, we'd need to add
|
|
|
|
:: a new code path in front of changes that checks if it's not a config
|
|
|
|
:: change, and then redirects it to existing arms.
|
|
|
|
::
|
2017-04-28 20:40:12 +03:00
|
|
|
/? 151 ::< hoon version
|
2017-04-21 00:59:36 +03:00
|
|
|
/- talk ::< structures
|
2017-04-21 17:14:11 +03:00
|
|
|
/+ talk, time-to-id ::< libraries
|
2017-03-23 03:34:56 +03:00
|
|
|
/= seed /~ !>(.)
|
2017-03-30 15:17:37 +03:00
|
|
|
!:
|
2017-03-23 03:34:56 +03:00
|
|
|
::::
|
|
|
|
::
|
2017-07-01 03:24:32 +03:00
|
|
|
[. talk] ::TODO =,
|
2017-04-21 00:59:36 +03:00
|
|
|
=> ::> ||
|
|
|
|
::> || %arch
|
|
|
|
::> ||
|
|
|
|
::> data structures
|
|
|
|
::
|
|
|
|
|%
|
2017-04-27 13:15:41 +03:00
|
|
|
++ state ::> broker state
|
2017-05-13 01:05:49 +03:00
|
|
|
$: stories/(map knot story) ::< conversations
|
2017-07-01 03:24:32 +03:00
|
|
|
::TODO outbox not needed
|
2017-04-21 00:59:36 +03:00
|
|
|
outbox/(pair @ud (map @ud thought)) ::< urbit outbox
|
|
|
|
log/(map knot @ud) ::< logged to clay
|
2017-05-13 01:05:49 +03:00
|
|
|
nicks/(map ship knot) ::< nicknames
|
2017-04-24 21:17:56 +03:00
|
|
|
nak/(jug char (set partner)) ::< circle glyph lookup
|
2017-03-23 03:34:56 +03:00
|
|
|
== ::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ story ::> wire content
|
|
|
|
$: count/@ud ::< (lent grams)
|
|
|
|
grams/(list telegram) ::< all messages
|
2017-04-27 00:33:25 +03:00
|
|
|
locals/group ::< local presence
|
|
|
|
remotes/(map partner group) ::< remote presence
|
2017-04-21 00:59:36 +03:00
|
|
|
shape/config ::< configuration
|
2017-04-24 21:17:56 +03:00
|
|
|
mirrors/(map circle config) ::< remote config
|
2017-07-01 03:24:32 +03:00
|
|
|
::TODO? never gets updated. still needed? ::
|
2017-04-21 00:59:36 +03:00
|
|
|
sequence/(map partner @ud) ::< partners heard
|
|
|
|
known/(map serial @ud) ::< messages heard
|
2017-06-13 01:19:45 +03:00
|
|
|
burden/? ::< from parent?
|
2017-03-23 03:34:56 +03:00
|
|
|
== ::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ move (pair bone card) ::< all actions
|
|
|
|
++ lime ::> diff fruit
|
2017-05-13 01:05:49 +03:00
|
|
|
$% {$talk-prize prize} ::
|
|
|
|
{$talk-rumor rumor} ::
|
2017-04-10 23:24:25 +03:00
|
|
|
{$talk-reaction reaction} ::
|
2017-03-23 03:34:56 +03:00
|
|
|
== ::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ pear ::> poke fruit
|
2017-03-23 03:34:56 +03:00
|
|
|
$% {$talk-command command} ::
|
|
|
|
{$write-comment spur ship cord} ::
|
|
|
|
{$write-fora-post spur ship cord cord} ::
|
|
|
|
== ::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ card ::> general card
|
2017-03-23 03:34:56 +03:00
|
|
|
$% {$diff lime} ::
|
2017-05-01 20:34:05 +03:00
|
|
|
{$info wire ship term nori} ::
|
2017-03-23 03:34:56 +03:00
|
|
|
{$peer wire dock path} ::
|
|
|
|
{$poke wire dock pear} ::
|
|
|
|
{$pull wire dock $~} ::
|
|
|
|
{$quit $~} ::
|
|
|
|
== ::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ weir ::> parsed wire
|
2017-06-23 01:34:03 +03:00
|
|
|
$% {$repeat num/@ud cir/circle} ::< messaging wire
|
|
|
|
{$circle nom/knot cir/circle} ::< subscription wire
|
2017-03-23 03:34:56 +03:00
|
|
|
== ::
|
|
|
|
--
|
2017-03-30 15:17:37 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> ||
|
|
|
|
::> || %work
|
|
|
|
::> ||
|
|
|
|
::> functional cores and arms.
|
|
|
|
::
|
2017-04-27 13:15:41 +03:00
|
|
|
|_ {bol/bowl state}
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
++ prep ::< prepare state
|
2017-04-21 17:14:11 +03:00
|
|
|
::> adapts state.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-04-27 13:15:41 +03:00
|
|
|
|= old/(unit state)
|
2017-04-21 00:59:36 +03:00
|
|
|
^- (quip move ..prep)
|
|
|
|
?~ old
|
2017-06-13 01:19:45 +03:00
|
|
|
%- pre-bake
|
2017-04-21 00:59:36 +03:00
|
|
|
ta-done:ta-init:ta
|
|
|
|
[~ ..prep(+<+ u.old)]
|
|
|
|
::
|
|
|
|
::> ||
|
|
|
|
::> || %engines
|
|
|
|
::> ||
|
|
|
|
::> main cores.
|
|
|
|
::+|
|
|
|
|
::
|
|
|
|
++ ta ::< per transaction
|
2017-05-13 01:05:49 +03:00
|
|
|
::> thinker core, used for processing pokes into
|
|
|
|
::> deltas.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
::TODO maybe rewrite all arms to produce (list delta)
|
|
|
|
:: instead of state? or nah?
|
2017-07-01 03:24:32 +03:00
|
|
|
|_ ::> deltas: deltas created by core operations.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
deltas/(list delta)
|
2017-03-30 15:17:37 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ ta-done ::< resolve core
|
|
|
|
::> produces the moves stored in ++ta's moves.
|
|
|
|
::> they are produced in reverse order because
|
|
|
|
::> ++ta-emil and ++ta-emit add them to the head of
|
|
|
|
::> the {moves}.
|
2017-05-13 01:05:49 +03:00
|
|
|
::> we don't produce any new state, because ++ta
|
|
|
|
::> doesn't make any changes to it itself.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
^- (list delta)
|
|
|
|
(flop deltas)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
::> ||
|
|
|
|
::> || %emitters
|
|
|
|
::> ||
|
|
|
|
::> arms that create outward changes.
|
|
|
|
::+|
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ ta-delta ::< emit a delta
|
|
|
|
::> adds a delta to the head of {deltas}.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
|= dif/delta
|
|
|
|
%_(+> deltas [dif deltas])
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ ta-deltas ::< emit delta list
|
2017-06-22 03:16:22 +03:00
|
|
|
::> adds multiple deltas to the head of {deltas}.
|
2017-05-13 01:05:49 +03:00
|
|
|
::> flops to stay consistent with ++ta-delta.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
|= dis/(list delta)
|
|
|
|
%_(+> deltas (welp (flop dis) deltas))
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-04-25 14:33:02 +03:00
|
|
|
++ ta-note ::< tell user
|
|
|
|
::> sends {msg} as an %app message to the user's
|
|
|
|
::> inbox.
|
|
|
|
::
|
|
|
|
|= msg/cord
|
2017-04-25 22:09:20 +03:00
|
|
|
%^ ta-action 0 %phrase
|
2017-04-25 14:33:02 +03:00
|
|
|
:- [[%& our.bol (main our.bol)] ~ ~]
|
|
|
|
[%app %talk-guardian msg]~
|
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ ta-evil ::< emit error
|
|
|
|
::> tracing printf and crash.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
|= msg/cord
|
2017-04-21 00:59:36 +03:00
|
|
|
~| [%talk-ta-evil msg]
|
2017-03-23 03:34:56 +03:00
|
|
|
!!
|
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> ||
|
|
|
|
::> || %data
|
|
|
|
::> ||
|
|
|
|
::> utility functions for data retrieval.
|
|
|
|
::+|
|
|
|
|
::
|
|
|
|
++ ta-know ::< story monad
|
|
|
|
::> produces a gill that takes a gate.
|
|
|
|
::> if the story {nom} exists, calls the gate with
|
|
|
|
::> a story core. if it doesn't, does nothing.
|
|
|
|
::
|
|
|
|
|= nom/knot
|
2017-04-24 21:17:56 +03:00
|
|
|
|= fun/$-(_so _ta)
|
2017-04-21 00:59:36 +03:00
|
|
|
^+ +>+>
|
|
|
|
=+ pur=(~(get by stories) nom)
|
|
|
|
?~ pur
|
2017-04-25 14:33:02 +03:00
|
|
|
::TODO crash instead?
|
|
|
|
%- ta-note
|
|
|
|
(crip "unknown story '{(trip nom)}'")
|
2017-04-21 00:59:36 +03:00
|
|
|
(fun ~(. so nom ~ u.pur))
|
|
|
|
::
|
|
|
|
::> ||
|
|
|
|
::> || %interaction-events
|
|
|
|
::> ||
|
|
|
|
::> arms that apply events we received.
|
|
|
|
::+|
|
|
|
|
::
|
|
|
|
++ ta-init ::< initialize app
|
|
|
|
::> populate state on first boot.
|
|
|
|
::> creates our default mailbox and journal.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-06-22 03:15:13 +03:00
|
|
|
:: create default circles.
|
|
|
|
=> %+ roll
|
|
|
|
^- (list {security knot cord})
|
|
|
|
:~ [%brown (main our.bol) 'default home']
|
|
|
|
[%green ~.public 'visible activity']
|
2017-06-14 04:46:02 +03:00
|
|
|
==
|
2017-06-22 03:15:13 +03:00
|
|
|
|= {{typ/security nom/knot des/cord} _ta}
|
|
|
|
%+ ta-action ost.bol
|
|
|
|
[%create nom des typ]
|
|
|
|
%- ta-deltas
|
|
|
|
:: change inbox filter to allow everything.
|
|
|
|
:- :+ %story (main our.bol)
|
|
|
|
:+ %config [our.bol (main our.bol)]
|
|
|
|
[%filter [& &]]
|
|
|
|
:: if needed, subscribe to our parent's /burden.
|
|
|
|
=+ sen=(above our.bol)
|
|
|
|
?: ?| !=(%czar (clan sen))
|
|
|
|
=(sen our.bol)
|
|
|
|
=(%pawn (clan our.bol))
|
|
|
|
==
|
|
|
|
~
|
|
|
|
[%init ~]~
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ ta-apply ::< apply command
|
|
|
|
::> applies the command sent by {src}.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {src/ship cod/command}
|
2017-03-23 03:34:56 +03:00
|
|
|
^+ +>
|
2017-04-21 00:59:36 +03:00
|
|
|
?- -.cod
|
2017-06-13 01:19:45 +03:00
|
|
|
::> %publish commands prompt us (as a circle host)
|
2017-04-21 00:59:36 +03:00
|
|
|
::> to verify and distribute messages.
|
2017-06-13 01:19:45 +03:00
|
|
|
$publish (ta-think | src +.cod)
|
2017-06-28 02:45:56 +03:00
|
|
|
::> %present commands are used to ask us to set
|
|
|
|
::> someone's status in the indicated stories.
|
|
|
|
$present (ta-present src +.cod)
|
2017-06-22 03:16:22 +03:00
|
|
|
::> %bearing commands are used by our children to
|
|
|
|
::> let us know they're bearing our /burden. we
|
|
|
|
::> need to watch them to allow changes to go up.
|
2017-06-13 01:19:45 +03:00
|
|
|
$bearing (ta-observe src)
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
|
|
|
::
|
2017-06-28 02:45:56 +03:00
|
|
|
++ ta-present ::< update a status
|
|
|
|
::>
|
|
|
|
::
|
|
|
|
|= {who/ship nos/(set knot) dif/diff-status}
|
|
|
|
^+ +>
|
|
|
|
%- ta-deltas
|
|
|
|
%- ~(rep in nos)
|
|
|
|
|= {n/knot l/(list delta)}
|
|
|
|
:_ l
|
|
|
|
[%story n %status [%& our.bol n] who dif]
|
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ ta-action ::< apply reader action
|
|
|
|
::> performs action sent by a reader.
|
2017-04-10 23:24:25 +03:00
|
|
|
::
|
|
|
|
|= {red/bone act/action}
|
|
|
|
^+ +>
|
2017-04-21 00:59:36 +03:00
|
|
|
=< work
|
|
|
|
::> ||
|
|
|
|
::> || %actions
|
|
|
|
::> ||
|
|
|
|
::> action processing core
|
|
|
|
::>
|
|
|
|
::> ++work calls the appropriate action processing
|
|
|
|
::> arm. most use ++affect to retrieve the affected
|
|
|
|
::> story, reacting if it doesn't exist.
|
|
|
|
|%
|
|
|
|
:: || %utility
|
|
|
|
::+|
|
|
|
|
++ work ::< perform action
|
|
|
|
^+ ..ta-action
|
2017-05-13 01:05:49 +03:00
|
|
|
::TODO require deltas as product?
|
2017-04-21 00:59:36 +03:00
|
|
|
?- -.act
|
2017-04-24 21:17:56 +03:00
|
|
|
:: circle configuration
|
2017-04-21 00:59:36 +03:00
|
|
|
$create (action-create +.act)
|
|
|
|
$source (action-source +.act)
|
|
|
|
$depict (action-depict +.act)
|
2017-05-09 22:43:42 +03:00
|
|
|
$filter (action-filter +.act)
|
2017-04-21 00:59:36 +03:00
|
|
|
$permit (action-permit +.act)
|
|
|
|
$delete (action-delete +.act)
|
|
|
|
:: messaging
|
|
|
|
$convey (action-convey +.act)
|
|
|
|
$phrase (action-phrase +.act)
|
|
|
|
:: personal metadata
|
2017-06-28 02:45:56 +03:00
|
|
|
$notify (action-notify +.act)
|
|
|
|
$naming (action-naming +.act)
|
2017-04-21 00:59:36 +03:00
|
|
|
:: changing shared ui
|
|
|
|
$glyph (action-glyph +.act)
|
2017-05-13 01:05:49 +03:00
|
|
|
$nick (action-nick +.act)
|
2017-04-21 00:59:36 +03:00
|
|
|
==
|
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ react ::< new reaction
|
2017-06-21 23:48:47 +03:00
|
|
|
::> send reaction to this action.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-21 03:52:44 +03:00
|
|
|
|= {res/?($info $fail) wat/cord}
|
2017-06-23 04:04:22 +03:00
|
|
|
(ta-delta %react [res wat `act])
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
++ affect ::< delta to story
|
2017-06-21 23:48:47 +03:00
|
|
|
::> store a delta about a story. if the story
|
|
|
|
::> does not exist, react.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
|= {nom/knot dif/diff-story}
|
|
|
|
?: (~(has by stories) nom)
|
|
|
|
(impact nom dif)
|
2017-06-21 03:52:44 +03:00
|
|
|
(react %fail (crip "no story {(trip nom)}"))
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ impact ::< delta for story
|
2017-06-21 23:48:47 +03:00
|
|
|
::> Store a delta about a story.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
|= {nom/knot dif/diff-story}
|
|
|
|
(ta-delta %story nom dif)
|
|
|
|
::
|
2017-06-28 02:45:56 +03:00
|
|
|
++ present ::< send status update
|
|
|
|
::>
|
|
|
|
::
|
|
|
|
|= {cis/(set circle) dif/diff-status}
|
|
|
|
^+ ..ta-action
|
|
|
|
=/ cic
|
|
|
|
^- (jug ship knot)
|
|
|
|
%- ~(rep in cis)
|
|
|
|
|= {c/circle m/(jug ship knot)}
|
|
|
|
(~(put ju m) hos.c nom.c)
|
|
|
|
=. ..ta-action ::TODO =?
|
|
|
|
?. (~(has by cic) our.bol) ..ta-action
|
|
|
|
%- ~(rep in (~(get ju cic) our.bol))
|
|
|
|
|= {n/knot _ta}
|
|
|
|
(affect n %status [%& our.bol n] our.bol dif)
|
|
|
|
=. cic (~(del by cic) our.bol)
|
|
|
|
%- ta-deltas
|
|
|
|
%- ~(rep by cic)
|
|
|
|
|= {{h/ship s/(set knot)} l/(list delta)}
|
|
|
|
:_ l
|
|
|
|
[%present h s dif]
|
|
|
|
::
|
2017-04-24 21:17:56 +03:00
|
|
|
::> || %circle-configuration
|
2017-04-21 00:59:36 +03:00
|
|
|
::+|
|
|
|
|
++ action-create ::< create story
|
|
|
|
::> creates a story with the specified parameters.
|
2017-04-11 14:00:13 +03:00
|
|
|
::
|
2017-04-27 00:33:25 +03:00
|
|
|
|= {nom/knot des/cord typ/security}
|
2017-04-21 00:59:36 +03:00
|
|
|
^+ ..ta-action
|
|
|
|
?. (~(has in stories) nom)
|
2017-05-13 01:05:49 +03:00
|
|
|
%^ impact nom %new
|
2017-04-28 20:40:12 +03:00
|
|
|
:* [[%& our.bol nom] ~ ~]
|
|
|
|
des
|
2017-05-09 22:43:42 +03:00
|
|
|
[| |]
|
2017-06-14 03:28:16 +03:00
|
|
|
:- typ
|
|
|
|
?. ?=(?($white $green) typ) ~
|
|
|
|
[our.bol ~ ~]
|
2017-04-28 20:40:12 +03:00
|
|
|
==
|
2017-06-21 03:52:44 +03:00
|
|
|
(react %fail (crip "{(trip nom)}: already exists"))
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-05-03 19:38:41 +03:00
|
|
|
++ action-delete ::< delete + announce
|
|
|
|
::> delete story {nom}, optionally announcing the
|
|
|
|
::> event with message {mes}.
|
2017-04-14 00:40:53 +03:00
|
|
|
::
|
2017-05-03 19:38:41 +03:00
|
|
|
|= {nom/knot mes/(unit cord)}
|
2017-04-21 00:59:36 +03:00
|
|
|
^+ ..ta-action
|
2017-05-03 19:38:41 +03:00
|
|
|
=. ..ta-action ::TODO =?
|
|
|
|
?~ mes ..ta-action
|
|
|
|
%+ action-phrase
|
|
|
|
[[%& our.bol nom] ~ ~]
|
|
|
|
[%lin | u.mes]~
|
2017-05-13 01:05:49 +03:00
|
|
|
(affect nom %remove ~)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
++ action-depict ::< change description
|
|
|
|
::> change description of story {nom} to {des}.
|
2017-04-14 17:16:36 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
|= {nom/knot cap/cord}
|
|
|
|
(affect nom %config [our.bol nom] %caption cap)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-05-09 22:43:42 +03:00
|
|
|
++ action-filter ::< change message rules
|
|
|
|
::> replaces the story's current filter with the
|
|
|
|
::> specified one.
|
|
|
|
::
|
|
|
|
|= {nom/knot fit/filter}
|
2017-05-13 01:05:49 +03:00
|
|
|
(affect nom %config [our.bol nom] %filter fit)
|
2017-05-09 22:43:42 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ action-permit ::< invite/banish
|
|
|
|
::> invite to/banish from story {nom} all {sis}.
|
2017-04-14 17:16:36 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {nom/knot inv/? sis/(set ship)}
|
2017-05-13 01:05:49 +03:00
|
|
|
=+ soy=(~(get by stories) nom)
|
|
|
|
?~ soy
|
2017-06-21 03:52:44 +03:00
|
|
|
(react %fail (crip "no story {(trip nom)}"))
|
2017-06-14 06:09:48 +03:00
|
|
|
so-done:(~(so-permit so nom ~ u.soy) inv sis)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-05-03 19:38:41 +03:00
|
|
|
++ action-source ::< un/sub p to/from r
|
|
|
|
::> add/remove {pas} as sources for story {nom}.
|
2017-04-14 00:40:53 +03:00
|
|
|
::
|
2017-06-27 02:56:03 +03:00
|
|
|
|= {nom/knot sub/? pos/(map partner range)}
|
|
|
|
=+ soy=(~(get by stories) nom)
|
|
|
|
?~ soy
|
|
|
|
(react %fail (crip "no story {(trip nom)}"))
|
|
|
|
so-done:(~(so-sources so nom ~ u.soy) sub pos)
|
2017-04-28 20:40:12 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> || %messaging
|
|
|
|
::+|
|
|
|
|
++ action-convey ::< post exact
|
|
|
|
::> sends the messages provided in the action.
|
2017-04-14 00:40:53 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= tos/(list thought)
|
|
|
|
(ta-think & our.bol tos)
|
|
|
|
::
|
|
|
|
++ action-phrase ::< post easy
|
|
|
|
::> sends the message contents provided in the
|
|
|
|
::> action, constructing the audience, generating a
|
|
|
|
::> serial and setting a timestamp.
|
2017-04-14 00:40:53 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {pas/(set partner) ses/(list speech)}
|
|
|
|
^+ ..ta-action
|
|
|
|
=- (ta-think & our.bol tos)
|
2017-04-14 00:40:53 +03:00
|
|
|
|- ^- tos/(list thought)
|
2017-04-21 00:59:36 +03:00
|
|
|
?~ ses ~
|
|
|
|
=^ sir eny.bol (uniq eny.bol)
|
|
|
|
:_ $(ses t.ses)
|
2017-04-14 00:40:53 +03:00
|
|
|
:+ sir
|
|
|
|
%- ~(gas by *audience)
|
2017-04-21 00:59:36 +03:00
|
|
|
%+ turn (~(tap in pas))
|
2017-04-14 00:40:53 +03:00
|
|
|
|=(p/partner [p *envelope %pending])
|
2017-07-01 03:37:28 +03:00
|
|
|
[now.bol i.ses]
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
::> || %personal-metadata
|
|
|
|
::+|
|
2017-06-28 02:45:56 +03:00
|
|
|
::
|
|
|
|
++ action-notify ::< our presence update
|
|
|
|
::>
|
2017-04-11 14:00:13 +03:00
|
|
|
::
|
2017-06-28 02:45:56 +03:00
|
|
|
|= {cis/(set circle) pes/presence}
|
2017-04-21 00:59:36 +03:00
|
|
|
^+ ..ta-action
|
2017-06-28 02:45:56 +03:00
|
|
|
(present cis %presence pes)
|
|
|
|
::
|
|
|
|
++ action-naming ::< our name update
|
|
|
|
::>
|
|
|
|
::
|
|
|
|
|= {cis/(set circle) man/human}
|
|
|
|
^+ ..ta-action
|
|
|
|
(present cis %human %full man)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
::> || %changing-shared-ui
|
|
|
|
::+|
|
2017-05-13 01:05:49 +03:00
|
|
|
++ action-nick ::< new identity
|
2017-04-21 00:59:36 +03:00
|
|
|
::> assigns a new local identity ("nickname") to the
|
|
|
|
::> target ship.
|
2017-04-11 14:00:13 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
|= {who/ship nic/cord}
|
2017-04-21 00:59:36 +03:00
|
|
|
^+ ..ta-action
|
2017-05-13 01:05:49 +03:00
|
|
|
?. =((~(get by nicks) who) `nic) ..ta-action ::< no change
|
|
|
|
(ta-delta %nick who nic)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
++ action-glyph ::< bind a glyph
|
|
|
|
::> un/bind glyph {lif} to partners {pas}.
|
2017-04-11 14:00:13 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {lif/char pas/(set partner) bin/?}
|
2017-05-13 01:05:49 +03:00
|
|
|
(ta-delta %glyph bin lif pas)
|
2017-04-21 00:59:36 +03:00
|
|
|
--
|
|
|
|
::
|
|
|
|
::> ||
|
|
|
|
::> || %subscription-events
|
|
|
|
::> ||
|
|
|
|
::> arms that react to subscription events.
|
|
|
|
::+|
|
2017-03-24 23:10:27 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
++ ta-observe ::< watch burden bearer
|
2017-06-21 23:48:47 +03:00
|
|
|
::> subscribe to a child who is bearing our burden.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
|= who/ship
|
|
|
|
^+ +>
|
2017-06-14 03:51:10 +03:00
|
|
|
?. =(our.bol (above who))
|
2017-06-13 01:19:45 +03:00
|
|
|
~&([%not-our-bearer who] +>)
|
|
|
|
(ta-delta %observe who)
|
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ ta-subscribe ::< listen to
|
2017-05-13 01:05:49 +03:00
|
|
|
::> add her to a presence list if applicable.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-06-23 04:03:37 +03:00
|
|
|
|= {her/ship qer/query}
|
2017-03-23 03:34:56 +03:00
|
|
|
^+ +>
|
2017-06-23 04:03:37 +03:00
|
|
|
?+ -.qer
|
2017-06-13 01:19:45 +03:00
|
|
|
+>
|
|
|
|
::
|
|
|
|
$burden
|
|
|
|
(ta-observe her)
|
|
|
|
::
|
|
|
|
$circle
|
2017-06-23 04:03:37 +03:00
|
|
|
%- (ta-know nom.qer) |= sor/_so =< so-done
|
2017-06-13 01:19:45 +03:00
|
|
|
(so-attend:sor her %hear [~ ~])
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ ta-cancel ::< forget
|
|
|
|
::> drops {src}'s subscription. deduce the right way
|
|
|
|
::> to do this from the subscription path {pax}.
|
|
|
|
::
|
2017-06-23 04:03:37 +03:00
|
|
|
|= {src/ship nom/knot}
|
2017-06-13 01:19:45 +03:00
|
|
|
^+ +>
|
|
|
|
:: set ship status to %gone.
|
2017-06-23 04:03:37 +03:00
|
|
|
%- (ta-know nom) |= sor/_so =< so-done
|
2017-06-13 01:19:45 +03:00
|
|
|
(so-absent:sor src)
|
|
|
|
::
|
|
|
|
++ ta-greet ::< subscription success
|
2017-06-21 23:48:47 +03:00
|
|
|
::> store a started subscription as source.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
|= {nom/knot cir/circle}
|
|
|
|
%- (ta-know nom) |= sor/_so =< so-done
|
|
|
|
(so-greet:sor %& cir)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ ta-leave ::< subscription failed
|
2017-04-25 22:18:14 +03:00
|
|
|
::> removes {cir} from story {nom}'s followers.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-04-25 22:18:14 +03:00
|
|
|
|= {nom/knot cir/circle}
|
2017-04-21 00:59:36 +03:00
|
|
|
%- (ta-know nom) |= sor/_so =< so-done
|
2017-05-13 01:05:49 +03:00
|
|
|
(so-leave:sor %& cir)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
++ ta-take ::< apply prize
|
2017-06-21 23:48:47 +03:00
|
|
|
::> for a %burden prize, bear the burden in a new
|
|
|
|
::> or existing story.
|
|
|
|
::> for a %circle prize, use ++so to accept it.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
|= {wir/wire piz/prize}
|
2017-04-04 17:15:12 +03:00
|
|
|
^+ +>
|
2017-06-13 01:19:45 +03:00
|
|
|
?+ -.piz
|
|
|
|
~&([%ignoring-prize -.piz] +>)
|
|
|
|
::
|
|
|
|
$burden
|
|
|
|
%+ roll (~(tap by sos.piz))
|
2017-06-14 03:28:16 +03:00
|
|
|
|= {{n/knot b/burden} _..ta-take}
|
|
|
|
=< so-done
|
|
|
|
(~(so-bear so n ~ (fall (~(get by stories) n) *story)) b)
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
$circle
|
2017-06-23 01:34:03 +03:00
|
|
|
=+ wer=(etch wir)
|
|
|
|
?> ?=($circle -.wer)
|
|
|
|
%- (ta-know nom.wer) |= sor/_so =< so-done
|
|
|
|
(so-take:sor cir.wer +.piz)
|
2017-06-13 01:19:45 +03:00
|
|
|
==
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ ta-hear ::< apply rumor
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply changes from a rumor to our state.
|
|
|
|
::> for %burden, authoratively apply the story
|
|
|
|
::> diff. if it's a new one, bear it.
|
|
|
|
::> for %circle, apply the story diff normally.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
|= {wir/wire dif/rumor}
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
|
|
|
?+ -.dif
|
|
|
|
~&([%ignoring-rumor -.dif] +>)
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
$burden
|
|
|
|
?+ -.dif.dif
|
|
|
|
%- (ta-know nom.dif) |= sor/_so =< so-done
|
|
|
|
(so-hear:sor & [our.bol nom.dif] dif.dif)
|
|
|
|
::
|
|
|
|
$new
|
2017-06-14 03:28:16 +03:00
|
|
|
=< so-done
|
2017-06-28 03:36:01 +03:00
|
|
|
%- ~(so-bear so nom.dif ~ (fall (~(get by stories) nom.dif) *story))
|
|
|
|
[~ [cof.dif.dif ~] [~ ~]]
|
2017-06-13 01:19:45 +03:00
|
|
|
==
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
$circle
|
2017-06-23 01:34:03 +03:00
|
|
|
=+ wer=(etch wir)
|
|
|
|
?> ?=($circle -.wer)
|
|
|
|
%- (ta-know nom.wer) |= sor/_so =< so-done
|
|
|
|
(so-hear:sor | cir.wer dif.dif)
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
|
|
|
::
|
2017-06-13 21:14:13 +03:00
|
|
|
++ ta-repeat ::< message delivered
|
2017-06-21 23:48:47 +03:00
|
|
|
::> message got delivered. if an error was returned
|
|
|
|
::> mark the message as rejected. if not, received.
|
2017-06-13 21:14:13 +03:00
|
|
|
::
|
|
|
|
|= {num/@ud who/partner fal/(unit tang)}
|
|
|
|
^+ +>
|
|
|
|
=+ oot=(~(get by q.outbox) num)
|
2017-06-23 04:08:14 +03:00
|
|
|
?~ oot ~&([%ta-repeat-none num] +>.$) ::TODO? crash?
|
2017-06-13 21:14:13 +03:00
|
|
|
=. aud.u.oot
|
|
|
|
=+ olg=(~(got by aud.u.oot) who)
|
|
|
|
%+ ~(put by aud.u.oot) who
|
|
|
|
:- -.olg
|
|
|
|
?~(fal %received ~>(%slog.[0 u.fal] %rejected))
|
|
|
|
=. +>.$
|
|
|
|
(ta-think | our.bol u.oot ~)
|
|
|
|
(ta-delta %done num)
|
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> ||
|
|
|
|
::> || %messaging
|
|
|
|
::> ||
|
|
|
|
::> arms for sending and processing messages.
|
|
|
|
::+|
|
2017-03-29 01:11:12 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ ta-think ::< publish or review
|
|
|
|
::> consumes each thought.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {pub/? aut/ship tos/(list thought)}
|
2017-03-23 03:34:56 +03:00
|
|
|
^+ +>
|
2017-04-21 00:59:36 +03:00
|
|
|
?~ tos +>
|
|
|
|
$(tos t.tos, +> (ta-consume pub aut i.tos))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 17:14:11 +03:00
|
|
|
++ ta-consume ::< to each audience
|
2017-04-21 00:59:36 +03:00
|
|
|
::> conducts thought {tot} to each partner in its audience.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {pub/? aut/ship tot/thought}
|
2017-04-24 21:17:56 +03:00
|
|
|
=+ aud=(~(tap by aud.tot))
|
2017-03-23 03:34:56 +03:00
|
|
|
|- ^+ +>.^$
|
|
|
|
?~ aud +>.^$
|
2017-04-21 00:59:36 +03:00
|
|
|
$(aud t.aud, +>.^$ (ta-conduct pub aut p.i.aud tot))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 17:14:11 +03:00
|
|
|
++ ta-conduct ::< thought to partner
|
2017-04-21 00:59:36 +03:00
|
|
|
::> either publishes or records a thought.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {pub/? aut/ship pan/partner tot/thought}
|
2017-03-23 03:34:56 +03:00
|
|
|
^+ +>
|
2017-04-21 00:59:36 +03:00
|
|
|
?- -.pan
|
2017-04-24 21:17:56 +03:00
|
|
|
$& ::< circle partner
|
2017-04-21 00:59:36 +03:00
|
|
|
?: pub
|
|
|
|
?. (team our.bol aut)
|
2017-04-25 14:33:02 +03:00
|
|
|
%- ta-note
|
|
|
|
(crip "strange author {(scow %p aut)}")
|
2017-04-21 00:59:36 +03:00
|
|
|
=. aut our.bol
|
2017-04-24 21:17:56 +03:00
|
|
|
?: =(aut hos.p.pan)
|
|
|
|
(ta-record nom.p.pan hos.p.pan tot)
|
2017-04-21 00:59:36 +03:00
|
|
|
(ta-transmit p.pan tot)
|
2017-04-24 21:17:56 +03:00
|
|
|
?. =(our.bol hos.p.pan) +>
|
|
|
|
(ta-record nom.p.pan aut tot)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
$| !! ::< passport partner
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ ta-record ::< add to story
|
|
|
|
::> add or update telegram {gam} in story {nom}.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {nom/knot gam/telegram}
|
|
|
|
%- (ta-know nom) |= sor/_so =< so-done
|
|
|
|
(so-learn:sor gam)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ ta-transmit ::< send message
|
2017-04-25 22:18:14 +03:00
|
|
|
::> sends thought {tot} to {cir}.
|
2017-04-21 00:59:36 +03:00
|
|
|
::> stores it to the outbox to await confirmation.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-25 22:18:14 +03:00
|
|
|
|= {cir/circle tot/thought}
|
2017-03-23 03:34:56 +03:00
|
|
|
^+ +>
|
2017-05-13 01:05:49 +03:00
|
|
|
(ta-delta %out cir tot ~)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
::> ||
|
|
|
|
::> || %stories
|
|
|
|
::> ||
|
|
|
|
::> arms for modifying stories.
|
|
|
|
::+|
|
|
|
|
::
|
|
|
|
++ so ::< story core
|
|
|
|
::> story core, used for doing work on a story.
|
|
|
|
::
|
|
|
|
|_ ::> nom: story name in {stories}.
|
|
|
|
::> acs: talk actions issued due to changes.
|
|
|
|
::> story is faceless to ease data access.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
$: nom/knot
|
2017-04-14 01:46:15 +03:00
|
|
|
acs/(list action)
|
2017-03-23 03:34:56 +03:00
|
|
|
story
|
|
|
|
==
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
++ so-done ::< apply changes
|
|
|
|
::> put changed story back into the map and apply
|
|
|
|
::> actions.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
^+ +>
|
2017-04-14 01:46:15 +03:00
|
|
|
=. acs (flop acs)
|
2017-04-10 23:35:25 +03:00
|
|
|
|- ^+ +>+
|
2017-04-14 01:46:15 +03:00
|
|
|
?~ acs +>+
|
2017-04-21 00:59:36 +03:00
|
|
|
=. +>+ (ta-action ost.bol i.acs)
|
2017-04-14 01:46:15 +03:00
|
|
|
$(acs t.acs)
|
2017-04-10 23:35:25 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> ||
|
|
|
|
::> || %emitters
|
|
|
|
::> ||
|
|
|
|
::> arms that create outward changes.
|
|
|
|
::+|
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ so-act ::< send action
|
|
|
|
::> stores a talk action.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= act/action
|
2017-03-23 03:34:56 +03:00
|
|
|
^+ +>
|
2017-04-21 00:59:36 +03:00
|
|
|
+>(acs [act acs])
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-25 14:33:02 +03:00
|
|
|
++ so-note ::< tell user
|
|
|
|
::> sends {msg} as an %app message to the user's
|
|
|
|
::> inbox.
|
|
|
|
::
|
|
|
|
|= msg/cord
|
|
|
|
^+ +>
|
|
|
|
%+ so-act %phrase
|
|
|
|
:- [[%& our.bol (main our.bol)] ~ ~]
|
|
|
|
[%app %talk-guardian msg]~
|
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ so-delta ::< send delta
|
2017-06-21 23:48:47 +03:00
|
|
|
::> store delta in ++ta core.
|
2017-04-03 17:50:35 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
|= dif/delta
|
|
|
|
^+ +>
|
|
|
|
+>(deltas [dif deltas])
|
2017-04-03 17:50:35 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
++ so-deltas ::< send delta list
|
2017-06-21 23:48:47 +03:00
|
|
|
::> store multiple deltas in ++ta core.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
|= dis/(list delta)
|
|
|
|
%_(+> deltas (welp (flop dis) deltas))
|
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ so-delta-our ::< send delta of us
|
|
|
|
::> adds a delta about this story.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
|= dif/diff-story
|
|
|
|
^+ +>
|
|
|
|
(so-delta %story nom dif)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
::> ||
|
|
|
|
::> || %data
|
|
|
|
::> ||
|
|
|
|
::> utility functions for data retrieval.
|
|
|
|
::+|
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ so-pan [%& our.bol nom] ::< us as partner
|
|
|
|
++ so-cir [our.bol nom] ::< us as circle
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> ||
|
|
|
|
::> || %interaction-events
|
|
|
|
::> ||
|
|
|
|
::> arms that apply events we received.
|
|
|
|
::+|
|
|
|
|
::
|
2017-06-14 04:06:38 +03:00
|
|
|
++ so-take ::< accept circle prize
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply the prize as if it were rumors.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
|= {src/circle gaz/(list telegram) cos/lobby pes/crowd}
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-06-13 01:19:45 +03:00
|
|
|
=. +>.$
|
|
|
|
(so-hear | src %config src %full loc.cos)
|
|
|
|
=. +>.$
|
|
|
|
%- ~(rep in loc.pes)
|
|
|
|
|= {{w/ship s/status} _+>.$}
|
|
|
|
(so-hear | src %status [%& src] w %full s)
|
|
|
|
(so-lesson gaz)
|
|
|
|
::
|
2017-06-14 04:06:38 +03:00
|
|
|
++ so-hear ::< accept circle rumor
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply changes from a rumor to this story.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
|= {bur/? src/circle dif/diff-story}
|
|
|
|
^+ +>
|
2017-06-23 04:08:14 +03:00
|
|
|
::TODO? are these checks still important?
|
2017-06-13 01:19:45 +03:00
|
|
|
:: when things are slow we may get diffs from
|
|
|
|
:: things we already unsubscribed from, right?
|
2017-06-16 04:53:47 +03:00
|
|
|
~? ?! ?| (~(has in src.shape) [%& src])
|
2017-06-13 01:19:45 +03:00
|
|
|
=(src so-cir)
|
|
|
|
==
|
|
|
|
[%unexpected-rumor-source nom -.dif src]
|
2017-05-13 01:05:49 +03:00
|
|
|
?- -.dif
|
2017-06-14 03:28:16 +03:00
|
|
|
$new ?: =(src so-cir)
|
|
|
|
(so-config-full ~ cof.dif)
|
|
|
|
$(dif [%config src %full cof.dif])
|
|
|
|
$bear ~&(%so-bear (so-bear bur.dif))
|
|
|
|
$burden ~&(%burden-not-rumor +>)
|
2017-05-13 01:05:49 +03:00
|
|
|
$grams (so-lesson gaz.dif)
|
2017-06-14 03:28:16 +03:00
|
|
|
$config :: full changes to us need to get split up.
|
|
|
|
?: &(=(cir.dif so-cir) ?=($full -.dif.dif))
|
|
|
|
(so-config-full `shape cof.dif.dif)
|
|
|
|
:: remotes are fine.
|
|
|
|
?: =(src cir.dif)
|
|
|
|
(so-delta-our dif)
|
|
|
|
:: remotes of remotes are not.
|
2017-06-23 04:08:14 +03:00
|
|
|
~& %ignoring-remote-config
|
2017-06-14 03:28:16 +03:00
|
|
|
~? =(src so-cir) %but-src-is-us
|
|
|
|
+>
|
2017-05-13 01:05:49 +03:00
|
|
|
$status :: ignore foreign remotes.
|
2017-06-13 01:19:45 +03:00
|
|
|
?. |(=([%& src] pan.dif) =(src so-cir))
|
2017-06-23 04:08:14 +03:00
|
|
|
~& %ignoring-remote-status
|
2017-06-13 01:19:45 +03:00
|
|
|
+>
|
2017-05-13 01:05:49 +03:00
|
|
|
(so-delta-our dif)
|
2017-07-01 03:24:32 +03:00
|
|
|
$follow ~&(%follow-not-rumor +>) ::REVIEW
|
2017-05-13 01:05:49 +03:00
|
|
|
$remove (so-delta-our %config src %remove ~)
|
|
|
|
==
|
|
|
|
::
|
2017-06-14 03:28:16 +03:00
|
|
|
++ so-bear ::< accept burden
|
2017-06-21 23:48:47 +03:00
|
|
|
::> add what was pushed down from above to our
|
|
|
|
::> state. in case of conflict, existing data is
|
|
|
|
::> overwritten.
|
2017-06-14 03:28:16 +03:00
|
|
|
::
|
|
|
|
|= {gaz/(list telegram) cos/lobby pes/crowd}
|
|
|
|
^+ +>
|
|
|
|
:: local config
|
|
|
|
=. ..so-bear
|
|
|
|
(so-config-full `shape loc.cos)
|
|
|
|
:: remote config
|
|
|
|
=. ..so-bear
|
|
|
|
%+ roll (~(tap by rem.cos))
|
|
|
|
|= {{r/circle c/config} _..so-bear}
|
|
|
|
(so-delta-our %config r %full c)
|
|
|
|
:: local presence
|
|
|
|
=. ..so-bear
|
|
|
|
%+ roll (~(tap by loc.pes))
|
|
|
|
|= {{w/ship s/status} _..so-bear}
|
|
|
|
(so-delta-our %status so-pan w %full s)
|
|
|
|
:: remote presence
|
|
|
|
=. ..so-bear
|
|
|
|
%+ roll (~(tap by rem.pes))
|
|
|
|
|= {{p/partner g/group} _..so-bear}
|
|
|
|
%+ roll (~(tap by g))
|
|
|
|
|= {{w/ship s/status} _..so-bear}
|
|
|
|
(so-delta-our %status p w %full s)
|
|
|
|
:: telegrams
|
|
|
|
=. ..so-bear
|
|
|
|
%+ so-delta-our %grams
|
|
|
|
%+ turn gaz
|
|
|
|
|= t/telegram
|
|
|
|
=- t(aud.tot -)
|
|
|
|
=/ oud
|
2017-06-23 04:08:14 +03:00
|
|
|
(~(got by aud.tot.t) [%& (above our.bol) nom])
|
|
|
|
=+ (~(del by aud.tot.t) [%& (above our.bol) nom])
|
2017-06-28 03:42:58 +03:00
|
|
|
(~(put by -) so-pan oud)
|
2017-06-14 03:28:16 +03:00
|
|
|
:: burden flag
|
|
|
|
(so-delta-our %burden &)
|
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> ||
|
|
|
|
::> || %changes
|
|
|
|
::> ||
|
|
|
|
::> arms that make miscelaneous changes to this story.
|
|
|
|
::+|
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-06-22 03:16:22 +03:00
|
|
|
++ so-config-full ::< split full config
|
|
|
|
::> split a %full config delta up into multiple
|
|
|
|
::> smaller ones, for easier application.
|
|
|
|
::
|
|
|
|
|= {old/(unit config) cof/config}
|
|
|
|
^+ +>
|
|
|
|
%- so-deltas
|
|
|
|
%+ turn
|
|
|
|
%+ weld
|
|
|
|
^- (list diff-story)
|
|
|
|
?~ old ~
|
|
|
|
::TODO? what to do about src?
|
|
|
|
:~ ::[%follow | src.u.old]
|
|
|
|
[%config so-cir %permit | ses.con.u.old]
|
|
|
|
==
|
|
|
|
^- (list diff-story)
|
|
|
|
:~ ::[%follow & src.cof]
|
|
|
|
[%config so-cir %caption cap.cof]
|
|
|
|
[%config so-cir %filter fit.cof]
|
|
|
|
[%config so-cir %secure sec.con.cof]
|
|
|
|
[%config so-cir %permit & ses.con.cof]
|
|
|
|
==
|
|
|
|
|= d/diff-story
|
|
|
|
[%story nom d]
|
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ so-sources ::< change source
|
|
|
|
::> adds or removes {pas} from our sources.
|
|
|
|
::
|
2017-06-27 02:56:03 +03:00
|
|
|
::TODO should ++action-source make use of this,
|
|
|
|
:: because of the {sus} logic?
|
|
|
|
|= {add/? pos/(map partner range)}
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-06-27 02:56:03 +03:00
|
|
|
::TODO for new sources, follow.
|
|
|
|
:: for existing sources, unfollow and refollow
|
|
|
|
:: with new range?
|
|
|
|
::=/ sus/(set partner)
|
|
|
|
:: %. src.shape
|
|
|
|
:: ?:(add ~(dif in pas) ~(int in pas))
|
|
|
|
::?~ sus +>.$
|
|
|
|
(so-delta-our %follow & pos)
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
++ so-depict ::< change description
|
|
|
|
::> modifies our caption.
|
|
|
|
::
|
|
|
|
|= cap/cord
|
|
|
|
^+ +>
|
|
|
|
?: =(cap cap.shape) +>
|
|
|
|
(so-delta-our %config so-cir %caption cap)
|
|
|
|
::
|
|
|
|
++ so-filter ::< change message rules
|
|
|
|
::> modifies our filter.
|
|
|
|
::
|
|
|
|
|= fit/filter
|
|
|
|
^+ +>
|
|
|
|
?: =(fit fit.shape) +>
|
|
|
|
(so-delta-our %config so-cir %filter fit)
|
|
|
|
::
|
|
|
|
++ so-delete ::< delete story
|
2017-04-21 00:59:36 +03:00
|
|
|
::> deletes this story. removes it from {stories}
|
2017-04-24 21:17:56 +03:00
|
|
|
::> and unsubscribes from all src.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
(so-delta-our %remove ~)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ so-attend ::< add local presence
|
2017-04-21 00:59:36 +03:00
|
|
|
::> add {her} status to this story's presence map.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-24 21:17:56 +03:00
|
|
|
|= {her/ship sat/status}
|
2017-03-23 03:34:56 +03:00
|
|
|
^+ +>
|
2017-05-13 01:05:49 +03:00
|
|
|
?: =(`sat (~(get by locals) her)) +>.$
|
|
|
|
(so-delta-our %status so-pan her %full sat)
|
|
|
|
::
|
|
|
|
++ so-absent ::< del local presence
|
2017-06-21 23:48:47 +03:00
|
|
|
::> remove {her} from our presence map.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
|= her/ship
|
|
|
|
^+ +>
|
|
|
|
?. (~(has by locals) her) +>
|
|
|
|
(so-delta-our %status so-pan her %remove ~)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
::> ||
|
|
|
|
::> || %subscriptions
|
|
|
|
::> ||
|
|
|
|
::> arms for starting and ending subscriptions
|
|
|
|
::+|
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
++ so-greet ::< subscription started
|
2017-06-21 23:48:47 +03:00
|
|
|
::> store a started subscription as source.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
|= pan/partner
|
|
|
|
^+ +>
|
2017-06-16 04:53:47 +03:00
|
|
|
?: (~(has in src.shape) pan) +>
|
2017-06-28 21:12:12 +03:00
|
|
|
(so-delta-our %config so-cir %source & pan)
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
++ so-leave ::< subscription ended
|
2017-05-13 01:05:49 +03:00
|
|
|
::> delete {pan} from our sources.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
|= pan/partner
|
|
|
|
^+ +>
|
2017-06-16 04:53:47 +03:00
|
|
|
?. (~(has in src.shape) pan) +>
|
2017-06-28 21:12:12 +03:00
|
|
|
(so-delta-our %config so-cir %source | pan)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
++ so-first-grams ::< beginning of stream
|
2017-06-27 02:56:03 +03:00
|
|
|
::> find all grams that fall within the range.
|
|
|
|
::
|
|
|
|
::TODO strip unused vars.
|
|
|
|
|= ran/range
|
|
|
|
^- (list telegram)
|
|
|
|
=+ [num=0 gaz=grams zeg=*(list telegram)]
|
|
|
|
:: fill in empty ranges to select all grams.
|
|
|
|
=. ran
|
|
|
|
?~ ran `[[%ud 0] `[%ud count]]
|
|
|
|
?~ tal.u.ran `[hed.u.ran `[%ud count]]
|
|
|
|
ran
|
|
|
|
:: never fails, but compiler needs it.
|
|
|
|
?> &(?=(^ ran) ?=(^ tal.u.ran))
|
|
|
|
%- flop
|
|
|
|
|- ^- (list telegram)
|
|
|
|
?~ gaz zeg
|
|
|
|
?: ?- -.u.tal.u.ran :: after the end
|
|
|
|
$ud (lth +.u.tal.u.ran num)
|
|
|
|
$da (lth +.u.tal.u.ran wen.sam.tot.i.gaz)
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
2017-06-27 02:56:03 +03:00
|
|
|
:: if past the river, we're done searching.
|
|
|
|
zeg
|
|
|
|
?: ?- -.hed.u.ran :: before the start
|
|
|
|
$ud (lth num +.hed.u.ran)
|
|
|
|
$da (lth wen.sam.tot.i.gaz +.hed.u.ran)
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
2017-06-27 02:56:03 +03:00
|
|
|
:: if before the river, continue onward.
|
|
|
|
$(num +(num), gaz t.gaz)
|
2017-04-21 17:14:11 +03:00
|
|
|
:: if in the river, add this gram and continue.
|
2017-06-27 02:56:03 +03:00
|
|
|
$(num +(num), gaz t.gaz, zeg [i.gaz zeg])
|
|
|
|
::
|
|
|
|
++ so-in-range ::< place in range?
|
|
|
|
::> produces two booleans: whether we're
|
|
|
|
::> currently in the range, and whether the range
|
|
|
|
::> has passed.
|
|
|
|
::
|
|
|
|
|= ran/range
|
|
|
|
^- {in/? done/?}
|
|
|
|
?~ ran [& |]
|
|
|
|
=/ min
|
|
|
|
?- -.hed.u.ran
|
|
|
|
$ud (gth count +.hed.u.ran)
|
|
|
|
$da (gth now.bol +.hed.u.ran)
|
|
|
|
==
|
|
|
|
?~ tal.u.ran
|
|
|
|
[min |]
|
|
|
|
=- [&(min -) !-]
|
|
|
|
?- -.u.tal.u.ran
|
|
|
|
$ud (gte +(+.u.tal.u.ran) count)
|
|
|
|
$da (gte +.u.tal.u.ran now.bol)
|
|
|
|
==
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> ||
|
|
|
|
::> || %messaging
|
|
|
|
::> ||
|
|
|
|
::> arms for adding to this story's messages.
|
|
|
|
::+|
|
|
|
|
::
|
2017-05-09 22:43:42 +03:00
|
|
|
++ so-sane ::< sanitize
|
|
|
|
::> sanitize %lin speech according to our settings.
|
|
|
|
::
|
|
|
|
|= tot/thought
|
|
|
|
^- thought
|
|
|
|
?. ?=({$lin *} sep.sam.tot) tot
|
|
|
|
%_ tot
|
|
|
|
msg.sep.sam
|
|
|
|
%- crip
|
|
|
|
%- tufa
|
|
|
|
%+ turn (tuba (trip msg.sep.sam.tot))
|
|
|
|
|= a/@c
|
|
|
|
:: always replace control characters.
|
|
|
|
?: |((lth a 32) =(a `@c`127))
|
|
|
|
`@`'?'
|
|
|
|
:: if desired, remove uppercasing.
|
2017-06-16 06:29:35 +03:00
|
|
|
?: ?& !cas.fit.shape
|
2017-05-09 22:43:42 +03:00
|
|
|
(gte a 'A')
|
|
|
|
(lte a 'Z')
|
|
|
|
==
|
|
|
|
(add a 32)
|
|
|
|
:: if desired, replace non-ascii characters.
|
|
|
|
?: ?& !utf.fit.shape
|
|
|
|
(gth a 127)
|
|
|
|
==
|
|
|
|
`@`'?'
|
|
|
|
a
|
|
|
|
==
|
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ so-lesson ::< learn messages
|
|
|
|
::> learn all telegrams in a list.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
|= gaz/(list telegram)
|
|
|
|
^+ +>
|
|
|
|
?~ gaz +>
|
2017-04-21 00:59:36 +03:00
|
|
|
$(gaz t.gaz, +> (so-learn i.gaz))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ so-learn ::< save/update message
|
|
|
|
::> store an incoming telegram, updating if it
|
|
|
|
::> already exists.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
|= gam/telegram
|
|
|
|
^+ +>
|
2017-05-09 22:43:42 +03:00
|
|
|
:: check for write permissions.
|
2017-06-13 01:19:45 +03:00
|
|
|
?. (so-admire aut.gam) +>
|
2017-05-09 22:43:42 +03:00
|
|
|
:: clean up the message to conform to our rules.
|
|
|
|
=. tot.gam (so-sane tot.gam)
|
2017-04-24 21:17:56 +03:00
|
|
|
=. aud.tot.gam
|
2017-04-21 00:59:36 +03:00
|
|
|
::> if we are in the audience, mark as received.
|
2017-06-13 01:19:45 +03:00
|
|
|
=+ ole=(~(get by aud.tot.gam) so-pan)
|
2017-04-24 21:17:56 +03:00
|
|
|
?~ ole aud.tot.gam
|
2017-06-23 04:08:14 +03:00
|
|
|
(~(put by aud.tot.gam) so-pan p.u.ole %received)
|
2017-05-13 01:05:49 +03:00
|
|
|
(so-delta-our %grams [gam ~])
|
2017-04-10 23:35:25 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> ||
|
|
|
|
::> || %permissions
|
|
|
|
::> ||
|
|
|
|
::> arms relating to story permissions.
|
|
|
|
::+|
|
2017-04-14 17:41:49 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ so-permit ::< invite/banish
|
|
|
|
::> update config to dis/allow ships permission.
|
2017-04-10 23:35:25 +03:00
|
|
|
::
|
|
|
|
|= {inv/? sis/(set ship)}
|
|
|
|
^+ +>
|
2017-04-21 00:59:36 +03:00
|
|
|
::> wyt: whitelist?
|
|
|
|
::> add: add to list?
|
2017-04-24 21:17:56 +03:00
|
|
|
=/ wyt/? ?=(?($white $green) sec.con.shape)
|
2017-04-21 00:59:36 +03:00
|
|
|
=/ add/? =(inv wyt)
|
2017-06-14 06:09:48 +03:00
|
|
|
=/ sus/(set ship)
|
|
|
|
%. ses.con.shape
|
|
|
|
?:(add ~(dif in sis) ~(int in sis))
|
2017-04-10 23:35:25 +03:00
|
|
|
=. +>.$
|
2017-04-21 00:59:36 +03:00
|
|
|
%- so-act
|
2017-04-14 01:46:15 +03:00
|
|
|
:- %phrase
|
2017-06-14 06:09:48 +03:00
|
|
|
%- ~(rep in sus)
|
2017-04-14 01:46:15 +03:00
|
|
|
|= {s/ship a/(set partner) t/(list speech)}
|
|
|
|
:- (~(put in a) [%& s (main s)])
|
2017-05-13 01:05:49 +03:00
|
|
|
[[%inv inv so-cir] t]
|
2017-06-14 06:09:48 +03:00
|
|
|
(so-delta-our %config so-cir %permit [add sus])
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
++ so-admire ::< accept from
|
|
|
|
::> checks {her} write permissions.
|
|
|
|
::
|
|
|
|
|= her/ship
|
|
|
|
^- ?
|
2017-04-24 21:17:56 +03:00
|
|
|
?- sec.con.shape
|
2017-06-22 03:16:22 +03:00
|
|
|
$black !(~(has in ses.con.shape) her) ::< channel, blacklist
|
|
|
|
$white (~(has in ses.con.shape) her) ::< village, whitelist
|
|
|
|
$green (~(has in ses.con.shape) her) ::< journal, whitelist
|
|
|
|
$brown !(~(has in ses.con.shape) her) ::< mailbox, blacklist
|
2017-04-21 00:59:36 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ so-visible ::< display to
|
|
|
|
::> checks {her} read permissions.
|
|
|
|
::
|
|
|
|
|= her/ship
|
|
|
|
^- ?
|
2017-04-24 21:17:56 +03:00
|
|
|
?- sec.con.shape
|
2017-06-13 01:19:45 +03:00
|
|
|
$black !(~(has in ses.con.shape) her) ::< channel, blacklist
|
|
|
|
$white (~(has in ses.con.shape) her) ::< village, whitelist
|
2017-04-21 00:59:36 +03:00
|
|
|
$green & ::< journal, all
|
|
|
|
$brown (team our.bol her) ::< mailbox, our team
|
|
|
|
==
|
2017-03-23 03:34:56 +03:00
|
|
|
--
|
|
|
|
--
|
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ da ::< delta application
|
|
|
|
::> core for doing things, mostly applying deltas to
|
|
|
|
::> application state, but also dealing with events
|
|
|
|
::> that aren't pokes.
|
|
|
|
::> where appropriate, creates moves. those get
|
|
|
|
::> produced when finalizing with ++da-done.
|
|
|
|
::
|
|
|
|
|_ ::> moves: moves created by core operations.
|
|
|
|
::
|
|
|
|
moves/(list move)
|
|
|
|
::
|
|
|
|
++ da-done ::< resolve core
|
|
|
|
::> produces the moves stored in ++da's moves.
|
|
|
|
::> they are produced in reverse order because
|
|
|
|
::> ++da-emil and ++da-emit add them to the head of
|
|
|
|
::> the {moves}.
|
|
|
|
::
|
|
|
|
^- (quip move +>)
|
|
|
|
[(flop moves) +>]
|
|
|
|
::
|
|
|
|
::> ||
|
|
|
|
::> || %emitters
|
|
|
|
::> ||
|
|
|
|
::> arms that create outward changes.
|
|
|
|
::+|
|
|
|
|
::
|
|
|
|
++ da-emil ::< emit move list
|
|
|
|
::> adds multiple moves to the head of {moves}.
|
|
|
|
::> flops to stay consistent with ++ta-emit.
|
|
|
|
::
|
|
|
|
|= mol/(list move)
|
|
|
|
%_(+> moves (welp (flop mol) moves))
|
|
|
|
::
|
|
|
|
++ da-emit ::< emit a move
|
|
|
|
::> adds a move to the head of {moves}.
|
|
|
|
::
|
|
|
|
|= mov/move
|
|
|
|
%_(+> moves [mov moves])
|
|
|
|
::
|
|
|
|
++ da-react ::< send reaction
|
|
|
|
::> sends a talk-reaction diff to a reader.
|
|
|
|
::
|
2017-06-23 04:04:22 +03:00
|
|
|
|= rac/reaction
|
2017-05-13 01:05:49 +03:00
|
|
|
%- da-emit
|
2017-06-23 04:04:22 +03:00
|
|
|
[ost.bol %diff %talk-reaction rac]
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-28 02:45:56 +03:00
|
|
|
++ da-present ::< send %present cmd
|
|
|
|
::>
|
|
|
|
::
|
|
|
|
|= {hos/ship nos/(set knot) dif/diff-status}
|
|
|
|
^+ +>
|
|
|
|
%- da-emit
|
|
|
|
:* ost.bol
|
|
|
|
%poke
|
|
|
|
/present
|
|
|
|
[hos %talk-guardian]
|
|
|
|
[%talk-command %present nos dif]
|
|
|
|
==
|
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
::> ||
|
|
|
|
::> || %change-application
|
|
|
|
::> ||
|
|
|
|
::> arms that change the application state.
|
|
|
|
::+|
|
|
|
|
::
|
|
|
|
++ da-change ::< apply delta
|
|
|
|
::> modifies application state according to the
|
|
|
|
::> change specified in {dif}.
|
|
|
|
::
|
|
|
|
|= dif/delta
|
|
|
|
^+ +>
|
|
|
|
?- -.dif
|
2017-06-28 02:45:56 +03:00
|
|
|
$out (da-change-out +.dif)
|
|
|
|
$done (da-change-done +.dif)
|
|
|
|
$glyph (da-change-glyph +.dif)
|
|
|
|
$nick (da-change-nick +.dif)
|
|
|
|
$story (da-change-story +.dif)
|
|
|
|
$init da-init
|
2017-06-13 01:19:45 +03:00
|
|
|
$observe (da-observe +.dif)
|
2017-06-28 02:45:56 +03:00
|
|
|
$react (da-react +.dif)
|
|
|
|
$present (da-present +.dif)
|
|
|
|
$quit (da-emit [ost.dif %quit ~])
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
++ da-init ::< startup side-effects
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply %init delta, querying the /burden of the
|
|
|
|
::> ship above us.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
%- da-emit
|
|
|
|
:* 0
|
|
|
|
%peer
|
|
|
|
/burden
|
2017-06-14 04:46:02 +03:00
|
|
|
[(above our.bol) %talk-guardian]
|
2017-06-13 04:09:00 +03:00
|
|
|
/burden/(scot %p our.bol)
|
2017-06-13 01:19:45 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ da-observe ::< watch burden bearer
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply %observe delta, querying the /report of
|
|
|
|
::> {who} below us.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
|= who/ship
|
|
|
|
~& [%peering-report who]
|
|
|
|
%- da-emit
|
|
|
|
:* 0
|
|
|
|
%peer
|
2017-06-14 04:06:38 +03:00
|
|
|
/report/(scot %p who)
|
2017-06-13 01:19:45 +03:00
|
|
|
[who %talk-guardian]
|
|
|
|
/report
|
|
|
|
==
|
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ da-change-out ::< outgoing messages
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply an %out delta, sending a message and
|
|
|
|
::> adding it to our outbox.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
|= {cir/circle out/(list thought)}
|
|
|
|
^+ +>
|
|
|
|
=. +>
|
|
|
|
%+ da-emit ost.bol
|
|
|
|
:* %poke
|
|
|
|
/repeat/(scot %ud p.outbox)/(scot %p hos.cir)/[nom.cir]
|
|
|
|
[hos.cir %talk-guardian]
|
2017-06-27 22:40:58 +03:00
|
|
|
[%talk-command %publish out]
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
2017-06-27 22:40:58 +03:00
|
|
|
|- ^+ +>.^$
|
|
|
|
?~ out +>.^$
|
2017-06-13 01:19:45 +03:00
|
|
|
%= $
|
|
|
|
p.outbox +(p.outbox)
|
|
|
|
q.outbox (~(put by q.outbox) p.outbox i.out)
|
|
|
|
out t.out
|
|
|
|
==
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-13 21:14:13 +03:00
|
|
|
++ da-change-done ::< delivered messages
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply a %done delta, removing a delivered
|
|
|
|
::> message from our outbox.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-13 21:14:13 +03:00
|
|
|
|= num/@ud
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-06-13 21:14:13 +03:00
|
|
|
+>(q.outbox (~(del by q.outbox) num))
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
++ da-change-glyph ::< un/bound glyph
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply a %glyph delta, un/binding a glyph to/from
|
|
|
|
::> a set of partners.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
|= {bin/? gyf/char pas/(set partner)}
|
|
|
|
^+ +>
|
|
|
|
?: bin
|
|
|
|
%_ +>
|
|
|
|
nak (~(put ju nak) gyf pas)
|
|
|
|
==
|
|
|
|
=/ ole/(list (set partner))
|
|
|
|
?. =(pas ~) [pas ~]
|
|
|
|
(~(tap in (~(get ju nak) gyf)))
|
|
|
|
|- ^+ +>.^$
|
|
|
|
?~ ole +>.^$
|
|
|
|
%_ $
|
|
|
|
nak (~(del ju nak) gyf i.ole)
|
|
|
|
ole t.ole
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ da-change-nick ::< changed nickname
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply a %nick delta, setting a nickname for a
|
|
|
|
::> ship.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
|= {who/ship nic/cord}
|
|
|
|
^+ +>
|
2017-06-22 03:16:22 +03:00
|
|
|
+>(nicks (change-nicks nicks who nic))
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
::> ||
|
|
|
|
::> || %stories
|
|
|
|
::> ||
|
|
|
|
::> arms for modifying stories.
|
|
|
|
::+|
|
|
|
|
::
|
|
|
|
++ da-change-story ::< apply circle delta
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply a %story delta, redirecting the delta
|
|
|
|
::> itself to ++sa-change.
|
|
|
|
::> in case of a new or deleted story, specialized
|
|
|
|
::> arms are called.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
|= {nom/knot dif/diff-story}
|
|
|
|
^+ +>
|
|
|
|
?+ -.dif
|
2017-06-14 04:49:45 +03:00
|
|
|
=< sa-done
|
|
|
|
%. dif
|
|
|
|
%~ sa-change sa nom
|
|
|
|
%+ fall
|
|
|
|
(~(get by stories) nom)
|
|
|
|
%*(. *story burden |)
|
|
|
|
==
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
$new (da-create nom +.dif)
|
2017-06-14 03:28:16 +03:00
|
|
|
$bear ~&(%unexpected-unsplit-bear +>)
|
2017-05-13 01:05:49 +03:00
|
|
|
$remove (da-delete nom)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ da-create ::< configure story
|
|
|
|
::> creates story {nom} with config {con}.
|
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
|= {nom/knot cof/config}
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
|
|
|
=< sa-done
|
2017-06-13 01:19:45 +03:00
|
|
|
:: default for ? is &, so we manually set to | now.
|
|
|
|
%- ~(sa-change sa nom %*(. *story burden |))
|
|
|
|
[%config [our.bol nom] %full cof]
|
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ da-delete ::< delete story
|
|
|
|
::> calls the story core to delete story {nom}.
|
|
|
|
::
|
|
|
|
|= nom/knot
|
|
|
|
^+ +>
|
|
|
|
=. +>
|
|
|
|
%- da-emil
|
|
|
|
~(sa-delete sa nom (~(got by stories) nom))
|
|
|
|
+>(stories (~(del by stories) nom))
|
|
|
|
::
|
|
|
|
++ sa ::< story delta core
|
|
|
|
::> story core, used for doing work on a story.
|
|
|
|
::
|
|
|
|
|_ ::> nom: story name in {stories}.
|
|
|
|
::> story is faceless to ease data access.
|
|
|
|
::
|
|
|
|
$: nom/knot
|
|
|
|
story
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ sa-done ::< apply changes
|
|
|
|
::> put changed story back into the map.
|
|
|
|
::
|
|
|
|
+>(stories (~(put by stories) nom +<+))
|
|
|
|
::
|
|
|
|
::> ||
|
|
|
|
::> || %emitters
|
|
|
|
::> ||
|
|
|
|
::> arms that create outward changes.
|
|
|
|
::+|
|
|
|
|
::
|
|
|
|
++ sa-emil ::< emit move list
|
|
|
|
::> adds multiple moves to the head of {moves}.
|
|
|
|
::> flops to stay consistent with ++ta-emit.
|
|
|
|
::
|
|
|
|
|= mol/(list move)
|
|
|
|
%_(+> moves (welp (flop mol) moves))
|
|
|
|
::
|
|
|
|
++ sa-emit ::< emit a move
|
|
|
|
::> adds a move to the head of {moves}.
|
|
|
|
::
|
|
|
|
|= mov/move
|
|
|
|
%_(+> moves [mov moves])
|
|
|
|
::
|
|
|
|
++ sa-sauce ::< play cards
|
|
|
|
::> cards to moves.
|
|
|
|
::
|
|
|
|
|= {ost/bone cub/(list card)}
|
|
|
|
^- (list move)
|
|
|
|
(flop (turn cub |=(a/card [ost a])))
|
|
|
|
::
|
|
|
|
::> ||
|
2017-06-22 03:16:22 +03:00
|
|
|
::> || %data
|
2017-06-13 01:19:45 +03:00
|
|
|
::> ||
|
2017-06-22 03:16:22 +03:00
|
|
|
::> utility functions for data retrieval.
|
2017-06-13 01:19:45 +03:00
|
|
|
::+|
|
|
|
|
::
|
|
|
|
++ sa-cir [our.bol nom]
|
|
|
|
++ sa-pan [%& our.bol nom]
|
|
|
|
::
|
|
|
|
::> ||
|
2017-05-13 01:05:49 +03:00
|
|
|
::> || %delta-application
|
|
|
|
::> ||
|
|
|
|
::> arms for applying deltas.
|
|
|
|
::+|
|
|
|
|
::
|
|
|
|
++ sa-delete ::< deletion of story
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply a %remove story delta, unsubscribing
|
|
|
|
::> this story from all its active sources.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-16 04:53:47 +03:00
|
|
|
(sa-abjure (~(tap in src.shape)))
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ sa-change ::< apply circle delta
|
2017-06-21 23:48:47 +03:00
|
|
|
::> figure out whether to apply a %story delta to
|
|
|
|
::> local or remote data.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
|= dif/diff-story
|
|
|
|
^+ +>
|
|
|
|
%. dif
|
|
|
|
?+ -.dif
|
|
|
|
sa-change-local
|
|
|
|
::
|
|
|
|
$config
|
2017-06-13 01:19:45 +03:00
|
|
|
?: =(cir.dif sa-cir)
|
2017-05-13 01:05:49 +03:00
|
|
|
sa-change-local
|
|
|
|
sa-change-remote
|
|
|
|
::
|
|
|
|
$status
|
2017-06-28 03:42:58 +03:00
|
|
|
?: =(pan.dif sa-pan)
|
2017-05-13 01:05:49 +03:00
|
|
|
sa-change-local
|
|
|
|
sa-change-remote
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ sa-change-local ::< apply our delta
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply a %story delta to local data.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-22 03:16:22 +03:00
|
|
|
::TODO split?
|
2017-05-13 01:05:49 +03:00
|
|
|
|= dif/diff-story
|
|
|
|
^+ +>
|
|
|
|
?+ -.dif
|
|
|
|
~&([%unexpected-delta-local -.dif] !!)
|
2017-06-14 03:28:16 +03:00
|
|
|
::
|
|
|
|
$burden
|
|
|
|
+>(burden bur.dif)
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
$grams
|
|
|
|
|- ^+ +>.^$
|
|
|
|
?~ gaz.dif +>.^$
|
2017-06-13 01:19:45 +03:00
|
|
|
=. +>.^$ (sa-change-gram i.gaz.dif)
|
2017-05-13 01:05:49 +03:00
|
|
|
$(gaz.dif t.gaz.dif)
|
|
|
|
::
|
|
|
|
$config
|
|
|
|
=. +>
|
|
|
|
%- sa-emil
|
|
|
|
(sa-config-effects shape dif.dif)
|
|
|
|
+>(shape (change-config shape dif.dif))
|
|
|
|
::
|
|
|
|
$status
|
|
|
|
%_ +>
|
|
|
|
locals
|
|
|
|
%+ ~(put by locals) who.dif
|
|
|
|
%+ change-status
|
|
|
|
(fall (~(get by locals) who.dif) *status)
|
|
|
|
dif.dif
|
|
|
|
==
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
$follow
|
2017-06-22 03:16:22 +03:00
|
|
|
(sa-emil (sa-follow-effects sub.dif pas.dif))
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
|
|
|
::
|
2017-06-21 23:48:47 +03:00
|
|
|
++ sa-change-gram ::< save/update message
|
|
|
|
::> apply a %grams delta, either appending or
|
|
|
|
::> updating a message.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
|= gam/telegram
|
|
|
|
^+ +>
|
|
|
|
=+ old=(~(get by known) uid.tot.gam)
|
|
|
|
?~ old
|
|
|
|
:: new message
|
|
|
|
%_ +>.$
|
2017-06-14 03:18:04 +03:00
|
|
|
grams (welp grams [gam ~])
|
2017-05-13 01:05:49 +03:00
|
|
|
count +(count)
|
|
|
|
known (~(put by known) uid.tot.gam count)
|
|
|
|
==
|
|
|
|
:: changed message
|
2017-06-22 03:16:22 +03:00
|
|
|
::TODO shouldn't overwrite audience maybe? at least keep delivery?
|
2017-05-13 01:05:49 +03:00
|
|
|
=+ dex=(sub count u.old)
|
|
|
|
%_ +>.$
|
|
|
|
grams %+ welp
|
|
|
|
(scag (dec dex) grams)
|
|
|
|
[gam (slag dex grams)]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ sa-change-remote ::< apply remote's delta
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply a story diff to remote data.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-22 03:16:22 +03:00
|
|
|
::TODO split?
|
2017-05-13 01:05:49 +03:00
|
|
|
|= dif/diff-story
|
|
|
|
^+ +>
|
|
|
|
?+ -.dif
|
|
|
|
~&([%unexpected-delta-remote -.dif] !!)
|
|
|
|
::
|
|
|
|
$config
|
|
|
|
?: ?=($remove -.dif.dif)
|
|
|
|
+>(mirrors (~(del by mirrors) cir.dif))
|
|
|
|
=/ new/config
|
|
|
|
%+ change-config
|
|
|
|
(fall (~(get by mirrors) cir.dif) *config)
|
|
|
|
dif.dif
|
|
|
|
+>.$(mirrors (~(put by mirrors) cir.dif new))
|
|
|
|
::
|
|
|
|
$status
|
|
|
|
%_ +>.$
|
|
|
|
remotes
|
|
|
|
%+ ~(put by remotes) pan.dif
|
|
|
|
=+ ole=(fall (~(get by remotes) pan.dif) *group)
|
|
|
|
?: ?=($remove -.dif.dif) (~(del by ole) who.dif)
|
|
|
|
=+ old=(fall (~(get by ole) who.dif) *status)
|
|
|
|
(~(put by ole) who.dif (change-status old dif.dif))
|
|
|
|
==
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ sa-config-effects ::< config side-effects
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply side-effects for a %config delta.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
|= {old/config dif/diff-config}
|
|
|
|
^- (list move)
|
|
|
|
?+ -.dif ~
|
|
|
|
$permit (sa-permit-effects sec.con.old ses.con.old +.dif)
|
2017-07-01 03:24:32 +03:00
|
|
|
::NOTE when doing a lone %secure, calculate the
|
|
|
|
:: necessary %permit deltas alongside it.
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
++ sa-follow-effects ::< un/subscribe
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply side-effects for a %follow delta,
|
|
|
|
::> un/subscribing this story to/from {pas}.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-27 02:56:03 +03:00
|
|
|
|= {sub/? pos/(map partner range)}
|
2017-05-13 01:05:49 +03:00
|
|
|
^- (list move)
|
2017-06-27 02:56:03 +03:00
|
|
|
?: sub
|
|
|
|
(sa-acquire (~(tap by pos)))
|
|
|
|
(sa-abjure (~(tap in (key-by pos))))
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
++ sa-permit-effects ::< notify permitted
|
2017-06-21 23:48:47 +03:00
|
|
|
::> apply side-effects for a %permit delta,
|
|
|
|
::> kicking the subscriptions of {sis} if they
|
|
|
|
::> are being banished.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
|= {sec/security old/(set ship) add/? sis/(set ship)}
|
|
|
|
^- (list move)
|
|
|
|
=/ wyt ?=(?($white $green) sec)
|
|
|
|
=/ inv =(wyt add)
|
2017-06-14 06:09:48 +03:00
|
|
|
?: inv ~
|
2017-06-22 03:16:22 +03:00
|
|
|
=/ sus/(set ship)
|
|
|
|
%. ses.con.shape
|
|
|
|
?:(add ~(dif in sis) ~(int in sis))
|
2017-06-13 01:19:45 +03:00
|
|
|
(sa-eject sus)
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
::> ||
|
|
|
|
::> || %subscriptions
|
|
|
|
::> ||
|
|
|
|
::> arms for starting and ending subscriptions
|
|
|
|
::+|
|
|
|
|
::
|
|
|
|
++ sa-acquire ::< subscribe us
|
|
|
|
::> subscribes this story to each partner.
|
|
|
|
::
|
2017-06-27 02:56:03 +03:00
|
|
|
|= pas/(list (pair partner range))
|
2017-05-13 01:05:49 +03:00
|
|
|
%+ sa-sauce 0 :: subscription is caused by this app
|
|
|
|
%- zing
|
|
|
|
%+ turn pas
|
2017-06-27 02:56:03 +03:00
|
|
|
|= {pan/partner ran/range}
|
2017-05-13 01:05:49 +03:00
|
|
|
^- (list card)
|
2017-06-28 03:42:58 +03:00
|
|
|
?: =(pan sa-pan) ~ :: ignore self-subs
|
2017-06-27 02:56:03 +03:00
|
|
|
:: unless otherwise specified, subscribe starting
|
|
|
|
:: at the last message we heard.
|
|
|
|
=. ran ::TODO =?
|
|
|
|
?^ ran ran
|
|
|
|
=+ num=(~(get by sequence) pan)
|
|
|
|
?~ num `[[%ud 0] ~]
|
|
|
|
`[[%ud u.num] ~]
|
2017-05-13 01:05:49 +03:00
|
|
|
?- -.pan
|
|
|
|
$| !! ::< passport partner
|
|
|
|
::
|
|
|
|
$& ::< circle partner
|
|
|
|
:_ ~
|
2017-06-27 02:56:03 +03:00
|
|
|
(circle-peer nom p.pan ran)
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ sa-abjure ::< unsubscribe us
|
|
|
|
::> unsubscribes this story from each partner.
|
|
|
|
::
|
|
|
|
|= pas/(list partner)
|
|
|
|
%+ sa-sauce 0 :: subscription is caused by this app
|
|
|
|
%- zing
|
|
|
|
%+ turn pas
|
|
|
|
|= pan/partner
|
|
|
|
^- (list card)
|
|
|
|
?- -.pan
|
|
|
|
$| !! ::< passport partner
|
|
|
|
::
|
|
|
|
$& ::< circle partner
|
|
|
|
:_ ~
|
|
|
|
:* %pull
|
2017-06-14 06:13:47 +03:00
|
|
|
/circle/[nom]/(scot %p hos.p.pan)/[nom.p.pan]
|
2017-05-13 01:05:49 +03:00
|
|
|
[hos.p.pan %talk-guardian]
|
|
|
|
~
|
|
|
|
==
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ sa-eject ::< unsubscribe ships
|
|
|
|
::> removes ships {sis} from {followers}.
|
|
|
|
::
|
|
|
|
|= sis/(set ship)
|
|
|
|
^- (list move)
|
|
|
|
%+ turn (~(tap in (sa-unearth sis)))
|
|
|
|
|= {b/bone}
|
|
|
|
[b %quit ~]
|
|
|
|
::
|
|
|
|
++ sa-unearth ::< ships' bones
|
2017-06-13 01:19:45 +03:00
|
|
|
::> find the bones in {sup.bol} that belong to
|
2017-05-13 01:05:49 +03:00
|
|
|
::> a ship in {sis}.
|
|
|
|
::
|
|
|
|
|= sis/(set ship)
|
|
|
|
^- (set bone)
|
|
|
|
%- ~(rep in sup.bol)
|
|
|
|
|= {{b/bone s/ship p/path} c/(set bone)}
|
|
|
|
?. ?& (~(has in sis) s)
|
|
|
|
?=({@tas *} p)
|
|
|
|
=(i.p nom)
|
|
|
|
==
|
|
|
|
c
|
|
|
|
(~(put in c) b)
|
|
|
|
--
|
|
|
|
--
|
|
|
|
::
|
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> ||
|
|
|
|
::> || %wire-parsing
|
|
|
|
::> ||
|
|
|
|
::+|
|
|
|
|
::
|
|
|
|
++ etch ::< parse wire
|
2017-06-23 01:34:03 +03:00
|
|
|
::> parses {wir}} to obtain either %circle with story
|
|
|
|
::> and circle or %repeat with message number, source
|
|
|
|
::> ship and story.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= wir/wire
|
|
|
|
^- weir
|
|
|
|
?+ -.wir !!
|
2017-06-23 01:34:03 +03:00
|
|
|
$circle
|
|
|
|
?> ?=({@ @ @ *} t.wir)
|
|
|
|
:^ %circle
|
|
|
|
i.t.wir
|
|
|
|
(slav %p i.t.t.wir)
|
|
|
|
i.t.t.t.wir
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
$repeat
|
|
|
|
?> ?=({@ @ @ $~} t.wir)
|
|
|
|
:^ %repeat
|
|
|
|
(slav %ud i.t.wir)
|
|
|
|
(slav %p i.t.t.wir)
|
|
|
|
i.t.t.t.wir
|
|
|
|
==
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-06-23 01:34:03 +03:00
|
|
|
++ etch-circle ::< parse /circle wire
|
|
|
|
::> parses a /circle wire, call a gate with the
|
|
|
|
::> result.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= $: wir/wire
|
|
|
|
$= fun
|
2017-04-25 22:18:14 +03:00
|
|
|
$- {nom/knot cir/circle}
|
2017-04-21 00:59:36 +03:00
|
|
|
{(list move) _.}
|
|
|
|
==
|
|
|
|
=+ wer=(etch wir)
|
2017-06-23 01:34:03 +03:00
|
|
|
?>(?=($circle -.wer) (fun nom.wer cir.wer))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ etch-repeat ::< parse /repeat wire
|
|
|
|
::> parses a /repeat wire, call gate with the result.
|
2017-04-10 23:24:25 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= $: wir/wire
|
|
|
|
$= fun
|
2017-06-23 01:34:03 +03:00
|
|
|
$- {num/@ud cir/circle}
|
2017-04-21 00:59:36 +03:00
|
|
|
{(list move) _.}
|
|
|
|
==
|
|
|
|
=+ wer=(etch wir)
|
2017-06-23 01:34:03 +03:00
|
|
|
?>(?=($repeat -.wer) (fun num.wer cir.wer))
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-06-24 02:29:45 +03:00
|
|
|
++ circle-peer ::< /circle peer card
|
|
|
|
::> constructs a %peer move to subscribe {nom} to
|
|
|
|
::> {cir}.
|
|
|
|
::
|
|
|
|
|= {nom/cord cir/circle wen/range}
|
|
|
|
^- card
|
2017-06-27 02:56:03 +03:00
|
|
|
=/ ran
|
|
|
|
?~ wen ~
|
|
|
|
%+ welp
|
|
|
|
/(scot -.hed.u.wen +.hed.u.wen)
|
|
|
|
?~ tal.u.wen ~
|
|
|
|
/(scot -.u.tal.u.wen +.u.tal.u.wen)
|
2017-06-24 02:29:45 +03:00
|
|
|
:* %peer
|
2017-06-27 02:56:03 +03:00
|
|
|
(welp /circle/[nom]/(scot %p hos.cir)/[nom.cir] ran)
|
2017-06-24 02:29:45 +03:00
|
|
|
[hos.cir %talk-guardian]
|
2017-06-27 02:56:03 +03:00
|
|
|
(welp /circle/[nom.cir] ran)
|
2017-06-24 02:29:45 +03:00
|
|
|
==
|
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> ||
|
2017-05-13 01:05:49 +03:00
|
|
|
::> || %new-events
|
|
|
|
::> ||
|
|
|
|
::+|
|
2017-06-23 00:13:29 +03:00
|
|
|
++ bake ::< apply state delta
|
2017-05-13 01:05:49 +03:00
|
|
|
::> applies a change to the application state,
|
|
|
|
::> producing side-effects.
|
|
|
|
::
|
|
|
|
|= dif/delta
|
|
|
|
^- (quip move +>)
|
|
|
|
=^ mos +>.$
|
|
|
|
da-done:(da-change:da dif)
|
|
|
|
:_ +>.$
|
2017-06-23 00:13:29 +03:00
|
|
|
::TODO move affection to pre-bake, but then station creation doesn't happen?
|
|
|
|
(welp mos (affection dif))
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
++ pre-bake ::< apply more deltas
|
2017-06-21 23:48:47 +03:00
|
|
|
::> bake a list of deltas.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
|= dis/(list delta)
|
|
|
|
^- (quip move +>)
|
|
|
|
%+ roll dis
|
2017-07-01 03:24:32 +03:00
|
|
|
|= {d/delta m/(list move) _+>.$} ::REVIEW ^$ find-fails, how is this correct?
|
2017-06-23 00:13:29 +03:00
|
|
|
=^ mos +>.^$ (bake d)
|
2017-06-13 01:19:45 +03:00
|
|
|
[(welp m mos) +>.^$]
|
|
|
|
::
|
2017-06-22 22:33:12 +03:00
|
|
|
++ peek ::< query on state
|
2017-06-21 23:48:47 +03:00
|
|
|
::> find the result (if any) for a given query.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-23 04:03:37 +03:00
|
|
|
|= qer/query
|
2017-06-22 22:33:12 +03:00
|
|
|
^- (unit (unit prize))
|
2017-06-13 01:19:45 +03:00
|
|
|
?- -.qer
|
|
|
|
$reader
|
2017-06-22 22:33:12 +03:00
|
|
|
``[%reader nak nicks]
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
$friend
|
2017-06-22 22:33:12 +03:00
|
|
|
:+ ~ ~
|
2017-05-13 01:05:49 +03:00
|
|
|
:- %friend
|
|
|
|
%- ~(gas in *(set circle))
|
|
|
|
%+ murn
|
2017-06-16 04:53:47 +03:00
|
|
|
=- (~(tap in src.shape.-))
|
2017-05-13 01:05:49 +03:00
|
|
|
(~(got by stories) (main our.bol))
|
|
|
|
|= p/partner
|
|
|
|
^- (unit circle)
|
|
|
|
?. ?=($& -.p) ~
|
|
|
|
[~ p.p]
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
$burden
|
2017-06-22 22:33:12 +03:00
|
|
|
:+ ~ ~
|
2017-06-13 01:19:45 +03:00
|
|
|
:- %burden
|
|
|
|
%- ~(gas in *(map knot burden))
|
|
|
|
%+ murn (~(tap by stories))
|
|
|
|
|= {n/knot s/story}
|
|
|
|
^- (unit (pair knot burden))
|
2017-07-01 03:24:32 +03:00
|
|
|
:: only auto-federate channels for now. ::REVIEW
|
2017-06-13 01:19:45 +03:00
|
|
|
?. ?=($black sec.con.shape.s) ~
|
|
|
|
:+ ~ n
|
|
|
|
:+ grams.s
|
|
|
|
[shape.s mirrors.s]
|
|
|
|
[locals.s remotes.s]
|
|
|
|
::
|
|
|
|
$report
|
2017-07-01 03:24:32 +03:00
|
|
|
::REVIEW we just don't have a prize... but do have rumors.
|
|
|
|
:: or do we need [%report ~] ?
|
|
|
|
~
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2017-06-27 02:56:03 +03:00
|
|
|
$circle ::REVIEW should we send precs & config to out of range subs?
|
2017-06-22 22:33:12 +03:00
|
|
|
=+ soy=(~(get by stories) nom.qer)
|
|
|
|
?~ soy ~
|
|
|
|
:+ ~ ~
|
2017-05-13 01:05:49 +03:00
|
|
|
:- %circle
|
2017-06-27 02:56:03 +03:00
|
|
|
:+ (~(so-first-grams so:ta nom.qer ~ u.soy) ran.qer)
|
2017-06-22 22:33:12 +03:00
|
|
|
[shape.u.soy mirrors.u.soy]
|
|
|
|
[locals.u.soy remotes.u.soy]
|
2017-06-13 01:19:45 +03:00
|
|
|
==
|
|
|
|
::
|
2017-06-23 00:13:29 +03:00
|
|
|
++ dedicate ::< diff-story to theirs
|
2017-06-21 23:48:47 +03:00
|
|
|
::> modify a %story delta to make it about their ship
|
|
|
|
::> instead of ours.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
|= {who/ship dif/diff-story}
|
|
|
|
^- diff-story
|
|
|
|
?+ -.dif
|
|
|
|
dif
|
2017-07-01 03:23:41 +03:00
|
|
|
::
|
|
|
|
$grams
|
|
|
|
%= dif
|
|
|
|
gaz
|
|
|
|
%+ turn gaz.dif
|
|
|
|
|= gam/telegram
|
|
|
|
=. aud.tot.gam
|
|
|
|
%- ~(run in aud.tot.gam)
|
|
|
|
|= {p/partner s/(pair envelope delivery)}
|
|
|
|
::TODO it probably isn't safe to do this for
|
|
|
|
:: all audience members hosted by us, even
|
|
|
|
:: if this is only called for burdens.
|
|
|
|
:_ s
|
|
|
|
?. &(?=($& -.p) =(hos.p.p our.bol)) p
|
|
|
|
[%& who nom.p.p]
|
|
|
|
gam
|
|
|
|
==
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
$config
|
|
|
|
?. =(hos.cir.dif our.bol) dif
|
|
|
|
dif(cir [who nom.cir.dif])
|
|
|
|
::
|
|
|
|
$status
|
|
|
|
?. &(?=($& -.pan.dif) =(hos.p.pan.dif our.bol)) dif
|
|
|
|
dif(pan [%& who nom.p.pan.dif])
|
|
|
|
==
|
|
|
|
::
|
2017-06-23 00:13:29 +03:00
|
|
|
++ feel ::< delta to rumor
|
2017-06-21 23:48:47 +03:00
|
|
|
::> if the given delta changes the result of the given
|
|
|
|
::> query, produce the relevant rumor.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-23 04:03:37 +03:00
|
|
|
|= {qer/query dif/delta}
|
2017-05-13 01:05:49 +03:00
|
|
|
^- (unit rumor)
|
2017-06-13 01:19:45 +03:00
|
|
|
?- -.qer
|
|
|
|
$reader
|
2017-05-13 01:05:49 +03:00
|
|
|
:: changes to shared ui state apply.
|
|
|
|
?+ -.dif ~
|
|
|
|
$glyph `[%reader dif]
|
|
|
|
$nick `[%reader dif]
|
|
|
|
==
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
$friend
|
2017-05-13 01:05:49 +03:00
|
|
|
:: new or removed local stories apply.
|
|
|
|
::TODO include mailbox sources. check privacy flags.
|
|
|
|
?. ?=($story -.dif) ~
|
|
|
|
=/ add/(unit ?)
|
|
|
|
?+ -.dif.dif ~
|
|
|
|
$new `&
|
|
|
|
$remove `|
|
|
|
|
==
|
|
|
|
?~ add ~
|
|
|
|
`[%friend u.add [our.bol nom.dif]]
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
$burden
|
2017-06-14 05:40:59 +03:00
|
|
|
::?: &(=(who.qer src.bol) did-they-send-a-burden) ~
|
2017-06-13 01:19:45 +03:00
|
|
|
?. ?=($story -.dif) ~
|
2017-06-28 03:37:46 +03:00
|
|
|
?: ?=(?($follow $burden) -.dif.dif) ~
|
2017-06-13 01:19:45 +03:00
|
|
|
:: only burden channels for now.
|
|
|
|
?. =(%black sec.con.shape:(~(got by stories) nom.dif)) ~
|
2017-06-23 00:13:29 +03:00
|
|
|
`[%burden nom.dif (dedicate who.qer dif.dif)]
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
$report
|
|
|
|
:: only send changes we didn't get from above.
|
2017-06-14 03:51:10 +03:00
|
|
|
?: =(src.bol (above our.bol)) ~
|
2017-06-13 01:19:45 +03:00
|
|
|
:: only send story reports about grams and status.
|
2017-05-13 01:05:49 +03:00
|
|
|
?. ?=($story -.dif) ~
|
2017-06-13 01:19:45 +03:00
|
|
|
?. ?=(?($grams $status) -.dif.dif) ~
|
|
|
|
=+ soy=(~(got by stories) nom.dif)
|
|
|
|
:: and only if the story is inherited.
|
|
|
|
?. burden.soy ~
|
|
|
|
:: only burden channels for now.
|
|
|
|
?. =(%black sec.con.shape.soy) ~
|
2017-06-23 00:13:29 +03:00
|
|
|
`[%burden nom.dif (dedicate (above our.bol) dif.dif)]
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
$circle
|
|
|
|
?. ?=($story -.dif) ~
|
|
|
|
?. =(nom.qer nom.dif) ~
|
2017-06-28 03:37:46 +03:00
|
|
|
?: ?=(?($follow $burden) -.dif.dif) ~ :: internal-only delta
|
2017-06-27 02:56:03 +03:00
|
|
|
=+ ren=(~(so-in-range so:ta nom.qer ~ (~(got by stories) nom.qer)) ran.qer)
|
|
|
|
::TODO if done.ren, %quit bone
|
|
|
|
?. in.ren ~
|
2017-05-13 01:05:49 +03:00
|
|
|
`[%circle dif.dif]
|
2017-06-13 01:19:45 +03:00
|
|
|
==
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
++ affection ::< rumors to interested
|
2017-06-21 23:48:47 +03:00
|
|
|
::> for a given delta, send rumors to all queries it
|
|
|
|
::> affects.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-28 22:09:35 +03:00
|
|
|
::TODO? %quit bones that are done with their subscription.
|
|
|
|
:: ...but that would also require a ta-cancel call to remove
|
|
|
|
:: them from the presence list! how do?
|
|
|
|
:: should there be an ++away arm for gall to call?
|
2017-05-13 01:05:49 +03:00
|
|
|
|= dif/delta
|
|
|
|
^- (list move)
|
2017-06-28 22:09:35 +03:00
|
|
|
:: cache results for paths.
|
|
|
|
=| res/(map path (unit rumor))
|
2017-05-13 01:05:49 +03:00
|
|
|
%+ murn (~(tap by sup.bol))
|
|
|
|
|= {b/bone s/ship p/path}
|
|
|
|
^- (unit move)
|
2017-06-28 22:09:35 +03:00
|
|
|
=+ mur=(~(get by res) p)
|
|
|
|
?^ mur
|
|
|
|
?~ u.mur ~
|
|
|
|
`[b %diff %talk-rumor u.u.mur]
|
2017-06-23 04:03:37 +03:00
|
|
|
=+ rum=(feel (path-to-query p) dif)
|
2017-06-28 22:09:35 +03:00
|
|
|
=. res (~(put by res) p rum)
|
2017-05-13 01:05:49 +03:00
|
|
|
?~ rum ~
|
|
|
|
`[b %diff %talk-rumor u.rum]
|
|
|
|
::
|
2017-06-21 23:48:47 +03:00
|
|
|
++ path-to-query ::< path, coins, query
|
|
|
|
::> parse a path into a (list coin), then parse that
|
|
|
|
::> into a query structure.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
|= pax/path
|
|
|
|
(coins-to-query (path-to-coins pax))
|
|
|
|
::
|
2017-06-21 23:48:47 +03:00
|
|
|
++ path-to-coins ::< path to coin list
|
|
|
|
::> parse a path into a list of coins.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
|= pax/path
|
|
|
|
^- (list coin)
|
2017-06-13 01:19:45 +03:00
|
|
|
%+ turn `path`pax
|
|
|
|
|= a/@ta
|
|
|
|
(need (slay a))
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-21 23:48:47 +03:00
|
|
|
++ coins-to-query ::< coin list to query
|
|
|
|
::> parse a list of coins into a query structure.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
^- $-((list coin) query)
|
|
|
|
=> depa
|
|
|
|
|^ %- af :~
|
|
|
|
[%reader ul]
|
|
|
|
[%friend ul]
|
2017-06-13 04:09:00 +03:00
|
|
|
[%burden (at /[%p])]
|
2017-06-13 01:19:45 +03:00
|
|
|
[%report ul]
|
|
|
|
[%circle (al knot rang)]
|
|
|
|
==
|
|
|
|
++ knot (do %tas)
|
|
|
|
++ rang (mu (al plac (mu (un plac))))
|
|
|
|
++ plac (or %da %ud)
|
|
|
|
--
|
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ leak ::< visible to
|
2017-06-21 23:48:47 +03:00
|
|
|
::> determine if the given query is visible to the
|
|
|
|
::> ship.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-06-23 04:03:37 +03:00
|
|
|
|= {who/ship qer/query}
|
2017-05-13 01:05:49 +03:00
|
|
|
^- ?
|
2017-06-13 01:19:45 +03:00
|
|
|
?- -.qer
|
|
|
|
$reader (team our.bol who)
|
|
|
|
$friend &
|
2017-06-14 03:51:10 +03:00
|
|
|
$burden ?& =(who who.qer)
|
|
|
|
=(our.bol (above who))
|
|
|
|
==
|
|
|
|
$report =(who (above our.bol))
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
$circle
|
|
|
|
?. (~(has by stories) nom.qer) |
|
|
|
|
%. who
|
|
|
|
~(so-visible so:ta nom.qer ~ (~(got by stories) nom.qer))
|
|
|
|
==
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
::> ||
|
2017-04-21 00:59:36 +03:00
|
|
|
::> || %poke-events
|
|
|
|
::> ||
|
|
|
|
::+|
|
2017-04-10 23:24:25 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ poke-talk-command ::< accept command
|
|
|
|
::> incoming talk command. process it and update logs.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= cod/command
|
2017-03-23 03:34:56 +03:00
|
|
|
^- (quip move +>)
|
|
|
|
=^ mos +>.$
|
2017-06-13 01:19:45 +03:00
|
|
|
%- pre-bake
|
2017-04-21 00:59:36 +03:00
|
|
|
ta-done:(ta-apply:ta src.bol cod)
|
|
|
|
=^ mow +>.$
|
|
|
|
log-all-to-file
|
2017-03-23 03:34:56 +03:00
|
|
|
[(welp mos mow) +>.$]
|
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ poke-talk-action ::< accept action
|
|
|
|
::> incoming talk action. process it.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= act/action
|
|
|
|
^- (quip move +>)
|
|
|
|
?. (team src.bol our.bol)
|
2017-06-13 01:19:45 +03:00
|
|
|
%- pre-bake
|
2017-04-25 14:33:02 +03:00
|
|
|
=< ta-done
|
|
|
|
%- ta-note:ta %- crip
|
|
|
|
"talk-action stranger {(scow %p src.bol)}"
|
2017-06-13 01:19:45 +03:00
|
|
|
%- pre-bake
|
2017-04-21 00:59:36 +03:00
|
|
|
ta-done:(ta-action:ta ost.bol act)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> ||
|
|
|
|
::> || %subscription-events
|
|
|
|
::> ||
|
|
|
|
::+|
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
++ diff-talk-prize ::< accept prize
|
2017-06-21 23:48:47 +03:00
|
|
|
::> accept a query result.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
|= {wir/wire piz/prize}
|
|
|
|
^- (quip move +>)
|
|
|
|
=^ mos +>.$
|
|
|
|
%- pre-bake
|
|
|
|
ta-done:(ta-take:ta wir piz)
|
|
|
|
=^ mow +>.$
|
|
|
|
log-all-to-file
|
|
|
|
[(welp mos mow) +>.$]
|
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
++ diff-talk-rumor ::< accept rumor
|
2017-06-21 23:48:47 +03:00
|
|
|
::> accept a query result change.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
|= {wir/wire dif/rumor}
|
2017-03-23 03:34:56 +03:00
|
|
|
^- (quip move +>)
|
2017-04-21 00:59:36 +03:00
|
|
|
=^ mos +>.$
|
2017-06-13 01:19:45 +03:00
|
|
|
%- pre-bake
|
|
|
|
ta-done:(ta-hear:ta wir dif)
|
2017-04-21 00:59:36 +03:00
|
|
|
=^ mow +>.$
|
|
|
|
log-all-to-file
|
|
|
|
[(welp mos mow) +>.$]
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ peer ::< accept subscription
|
|
|
|
::> incoming subscription on {pax}.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= pax/path
|
|
|
|
^- (quip move +>)
|
|
|
|
?: ?=({$sole *} pax) ~&(%talk-broker-no-sole !!)
|
2017-06-23 04:03:37 +03:00
|
|
|
=+ qer=(path-to-query pax)
|
2017-05-13 01:05:49 +03:00
|
|
|
?. (leak src.bol qer) ~&(%peer-invisible !!)
|
|
|
|
=^ mos +>.$
|
2017-06-13 01:19:45 +03:00
|
|
|
%- pre-bake
|
2017-06-23 04:03:37 +03:00
|
|
|
ta-done:(ta-subscribe:ta src.bol qer)
|
2017-05-13 01:05:49 +03:00
|
|
|
:_ +>.$
|
2017-06-22 22:33:12 +03:00
|
|
|
=+ piz=(peek qer)
|
|
|
|
?~ piz ~&([%query-unavailable pax] mos)
|
|
|
|
?~ u.piz ~&([%query-invalid pax] mos)
|
2017-05-13 01:05:49 +03:00
|
|
|
:_ mos
|
2017-06-22 22:33:12 +03:00
|
|
|
[ost.bol %diff %talk-prize u.u.piz]
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ pull ::< unsubscribe
|
|
|
|
::> unsubscribes.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
|= pax/path
|
2017-04-21 00:59:36 +03:00
|
|
|
^- (quip move +>)
|
2017-06-23 04:03:37 +03:00
|
|
|
=+ qer=(path-to-query pax)
|
|
|
|
?. ?=($circle -.qer) [~ +>.$]
|
2017-06-13 01:19:45 +03:00
|
|
|
%- pre-bake
|
2017-06-23 04:03:37 +03:00
|
|
|
ta-done:(ta-cancel:ta src.bol nom.qer)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-06-13 04:10:55 +03:00
|
|
|
++ reap ::< catch-all reap
|
2017-06-21 23:48:47 +03:00
|
|
|
::> handle all remote errors.
|
2017-06-13 04:10:55 +03:00
|
|
|
::
|
|
|
|
|= {wir/wire fal/(unit tang)}
|
|
|
|
^- (quip move +>)
|
|
|
|
?~ fal [~ +>]
|
|
|
|
~| reap-fail+wir
|
|
|
|
(mean u.fal)
|
|
|
|
::
|
2017-06-23 01:34:03 +03:00
|
|
|
++ reap-circle ::< subscription n/ack
|
2017-04-21 00:59:36 +03:00
|
|
|
::> if subscribing failed, update state to reflect
|
|
|
|
::> that.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-06-14 04:06:38 +03:00
|
|
|
::TODO update to handle all subscription kinds.
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {wir/wire fal/(unit tang)}
|
|
|
|
^- (quip move +>)
|
2017-06-23 01:34:03 +03:00
|
|
|
%+ etch-circle [%circle wir]
|
2017-04-25 22:18:14 +03:00
|
|
|
|= {nom/knot cir/circle}
|
2017-06-13 01:19:45 +03:00
|
|
|
?~ fal
|
|
|
|
%- pre-bake
|
|
|
|
ta-done:(ta-greet:ta nom cir)
|
2017-04-25 22:18:14 +03:00
|
|
|
=. u.fal [>%reap-friend-fail nom cir< u.fal]
|
2017-04-21 00:59:36 +03:00
|
|
|
%- (slog (flop u.fal))
|
2017-06-13 01:19:45 +03:00
|
|
|
%- pre-bake
|
2017-05-13 01:05:49 +03:00
|
|
|
ta-done:(ta-leave:ta nom cir)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-06-23 01:34:03 +03:00
|
|
|
++ quit-circle ::< dropped subscription
|
2017-04-21 00:59:36 +03:00
|
|
|
::> gall dropped our subscription. resubscribe.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-06-14 04:06:38 +03:00
|
|
|
::TODO update for all subscription kinds.
|
2017-07-01 03:24:32 +03:00
|
|
|
::TODO? does new gall still drop subscriptions?
|
2017-04-21 00:59:36 +03:00
|
|
|
|= wir/wire
|
|
|
|
^- (quip move +>)
|
2017-06-23 01:34:03 +03:00
|
|
|
%+ etch-circle [%circle wir]
|
2017-04-25 22:18:14 +03:00
|
|
|
|= {nom/knot cir/circle}
|
2017-05-13 01:05:49 +03:00
|
|
|
:_ +>.^$ :_ ~
|
2017-06-24 02:29:45 +03:00
|
|
|
[0 (circle-peer nom cir `[[%da (sub now.bol ~m5)] ~])]
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ coup-repeat ::< message n/ack
|
|
|
|
::> ack from ++ta-transmit. mark the message as
|
|
|
|
::> received or rejected.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {wir/wire fal/(unit tang)}
|
|
|
|
^- (quip move +>)
|
|
|
|
%+ etch-repeat [%repeat wir]
|
2017-06-23 01:34:03 +03:00
|
|
|
|= {num/@ud cir/circle}
|
2017-06-13 21:14:13 +03:00
|
|
|
%- pre-bake
|
2017-06-23 01:34:03 +03:00
|
|
|
ta-done:(ta-repeat:ta num [%& cir] fal)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::> ||
|
|
|
|
::> || %logging
|
|
|
|
::> ||
|
|
|
|
::+|
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ poke-talk-save ::< save as log
|
|
|
|
::> stores the telegrams of story {nom} in a log file,
|
|
|
|
::> to be re-loaded by ++poke-talk-load.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= nom/knot
|
2017-03-23 03:34:56 +03:00
|
|
|
^- (quip move +>)
|
2017-04-21 00:59:36 +03:00
|
|
|
=/ paf/path
|
|
|
|
/(scot %p our.bol)/home/(scot %da now.bol)/talk/[nom]/talk-telegrams
|
|
|
|
=+ grams:(~(got by stories) nom)
|
|
|
|
:_ +>.$
|
|
|
|
:_ ~
|
|
|
|
:* ost.bol
|
|
|
|
%info
|
|
|
|
/jamfile
|
|
|
|
our.bol
|
|
|
|
(foal paf [%talk-telegrams !>(-)])
|
|
|
|
==
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ poke-talk-load ::< load from log
|
|
|
|
::> loads the telegrams of story {nom} into our state,
|
|
|
|
::> as saved in ++poke-talk-save.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= nom/knot
|
|
|
|
^- (quip move +>)
|
|
|
|
=/ grams
|
|
|
|
.^ (list telegram)
|
|
|
|
%cx
|
|
|
|
/(scot %p our.bol)/home/(scot %da now.bol)/talk/[nom]/talk-telegrams
|
|
|
|
==
|
|
|
|
=+ soy=(~(got by stories) nom)
|
|
|
|
:- ~
|
|
|
|
%= +>.$
|
|
|
|
stories
|
|
|
|
%+ ~(put by stories) nom
|
|
|
|
soy(grams grams, count (lent grams))
|
|
|
|
==
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ poke-talk-log ::< start logging
|
|
|
|
::> starts logging story {nom}'s messages.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= nom/knot
|
|
|
|
~& %talk-poke-log
|
2017-03-23 03:34:56 +03:00
|
|
|
^- (quip move +>)
|
2017-04-21 00:59:36 +03:00
|
|
|
:- [(log-to-file nom) ~]
|
|
|
|
%= +>.$
|
|
|
|
log
|
|
|
|
%+ ~(put by log) nom
|
|
|
|
count:(~(got by stories) nom)
|
|
|
|
==
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ poke-talk-unlog ::< stop logging
|
|
|
|
::> stops logging story {nom}'s messages.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
|= nom/knot
|
2017-03-23 03:34:56 +03:00
|
|
|
^- (quip move +>)
|
|
|
|
:- ~
|
2017-04-21 00:59:36 +03:00
|
|
|
+>.$(log (~(del by log) nom))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
++ log-all-to-file ::< update stories logs
|
|
|
|
::> for every story we're logging, (over)writes all
|
|
|
|
::> their grams to log files if new ones have arrived.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-21 00:59:36 +03:00
|
|
|
::TODO re-enable and test.
|
|
|
|
^- (quip move .)
|
|
|
|
?: & [~ .] :: XXX!!!!
|
|
|
|
:_ %_ .
|
|
|
|
log
|
|
|
|
%- ~(urn by log)
|
|
|
|
|= {nom/knot len/@ud}
|
|
|
|
count:(~(got by stories) nom)
|
|
|
|
==
|
|
|
|
%+ murn (~(tap by log))
|
|
|
|
|= {nom/knot len/@ud}
|
|
|
|
^- (unit move)
|
|
|
|
?: (gte len count:(~(got by stories) nom))
|
|
|
|
~
|
|
|
|
`(log-to-file nom)
|
|
|
|
::
|
|
|
|
++ log-to-file ::< update story log
|
|
|
|
::> logs all grams of story {nom} to a file.
|
|
|
|
::
|
|
|
|
|= nom/knot
|
|
|
|
^- move
|
|
|
|
=+ ^- paf/path
|
|
|
|
=+ day=(year %*(. (yore now.bol) +.t +:*tarp))
|
|
|
|
%+ tope [our.bol %home da+now.bol]
|
|
|
|
/talk-telegrams/(scot %da day)/[nom]/talk
|
|
|
|
=+ grams:(~(got by stories) nom)
|
|
|
|
[ost.bol %info /jamfile our.bol (foal paf [%talk-telegrams !>(-)])]
|
2017-03-23 03:34:56 +03:00
|
|
|
--
|