2017-03-30 15:17:37 +03:00
|
|
|
:: :: ::
|
2017-11-08 00:05:52 +03:00
|
|
|
:::: /app/hall/hoon :: ::
|
2017-03-30 15:17:37 +03:00
|
|
|
:: :: ::
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-11-10 00:35:24 +03:00
|
|
|
::TODO document gate samples fully.
|
2017-03-30 15:17:37 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
::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.
|
|
|
|
::
|
2018-06-06 03:11:06 +03:00
|
|
|
/- hall-sur=hall :: structures
|
|
|
|
/+ hall-lib=hall, hall-legacy :: libraries
|
2017-03-23 03:34:56 +03:00
|
|
|
/= seed /~ !>(.)
|
2017-12-12 15:58:02 +03:00
|
|
|
/= filter-gram
|
2018-09-06 02:42:59 +03:00
|
|
|
/^ $-({telegram:hall-sur bowl:gall} telegram:hall-sur)
|
2017-12-12 15:58:02 +03:00
|
|
|
/| /: /%/filter /!noun/
|
2018-09-06 02:42:59 +03:00
|
|
|
/~ |=({t/telegram:hall-sur bowl:gall} t)
|
2017-12-12 15:58:02 +03:00
|
|
|
==
|
2018-09-05 02:23:24 +03:00
|
|
|
/= custom-rules
|
|
|
|
/^ (map knot $-({ship ?($r %w) bowl:gall} ?))
|
|
|
|
/: /%/rules /_ /!noun/
|
2017-11-10 02:04:07 +03:00
|
|
|
::
|
2017-03-23 03:34:56 +03:00
|
|
|
::::
|
2018-06-06 03:11:06 +03:00
|
|
|
=, hall-sur
|
|
|
|
=, hall-lib
|
2018-05-25 01:39:56 +03:00
|
|
|
=> :: #
|
|
|
|
:: # %arch
|
|
|
|
:: #
|
|
|
|
:: data structures
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
|
|
|
|%
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %state
|
|
|
|
:: state data structures
|
|
|
|
++ state :: application state
|
|
|
|
$: stories/(map name story) :: conversations
|
|
|
|
outbox/(map serial tracking) :: sent messages
|
|
|
|
log/(map name @ud) :: logged to clay
|
|
|
|
nicks/(map ship nick) :: local nicknames
|
|
|
|
binds/(jug char audience) :: circle glyph lookup
|
|
|
|
public/(set circle) :: publicly member of
|
|
|
|
rir/wire :: current rumor wire
|
2017-03-23 03:34:56 +03:00
|
|
|
== ::
|
2018-05-25 01:39:56 +03:00
|
|
|
++ story :: wire content
|
|
|
|
$: count/@ud :: (lent grams)
|
|
|
|
grams/(list telegram) :: all messages
|
|
|
|
known/(map serial @ud) :: messages heard
|
|
|
|
sourced/(map circle (list @ud)) :: heard from
|
|
|
|
sequence/(map circle @ud) :: last-heard p circle
|
|
|
|
locals/group :: local status
|
|
|
|
remotes/(map circle group) :: remote status
|
|
|
|
shape/config :: configuration
|
|
|
|
mirrors/(map circle config) :: remote config
|
|
|
|
peers/(jar ship query) :: subscribers
|
|
|
|
inherited/_| :: from parent?
|
2017-03-23 03:34:56 +03:00
|
|
|
== ::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %deltas
|
|
|
|
:: changes to state
|
2017-10-10 17:30:27 +03:00
|
|
|
++ delta ::
|
2017-11-03 23:36:42 +03:00
|
|
|
$% :: public state ::
|
2018-05-25 01:39:56 +03:00
|
|
|
{$public add/? cir/circle} :: show/hide membership
|
2017-11-03 23:36:42 +03:00
|
|
|
:: messaging state ::
|
2018-05-25 01:39:56 +03:00
|
|
|
{$out cir/circle out/(list thought)} :: send msgs to circle
|
|
|
|
$: $done :: set delivery state
|
2017-10-10 17:30:27 +03:00
|
|
|
cir/circle ::
|
|
|
|
ses/(list serial) ::
|
|
|
|
res/delivery ::
|
|
|
|
== ::
|
|
|
|
:: shared ui state ::
|
2018-05-25 01:39:56 +03:00
|
|
|
{$glyph diff-glyph} :: un/bound glyph
|
|
|
|
{$nick diff-nick} :: changed nickname
|
2017-10-10 17:30:27 +03:00
|
|
|
:: story state ::
|
2018-05-25 01:39:56 +03:00
|
|
|
{$story nom/name det/delta-story} :: change to story
|
2017-10-10 17:30:27 +03:00
|
|
|
:: side-effects ::
|
2018-05-25 01:39:56 +03:00
|
|
|
{$init ~} :: initialize
|
|
|
|
{$observe who/ship} :: watch burden bearer
|
|
|
|
$: $present :: send %present cmd
|
2017-10-10 17:30:27 +03:00
|
|
|
hos/ship ::
|
2017-12-18 16:20:45 +03:00
|
|
|
nos/(set name) ::
|
2017-10-10 17:30:27 +03:00
|
|
|
dif/diff-status ::
|
|
|
|
== ::
|
|
|
|
== ::
|
2018-05-25 01:39:56 +03:00
|
|
|
++ delta-story :: story delta
|
|
|
|
$% {$inherited ihr/?} :: inherited flag
|
|
|
|
{$follow sub/? srs/(set source)} :: un/subscribe
|
|
|
|
{$sequent cir/circle num/@ud} :: update last-heard
|
|
|
|
{$gram src/circle gam/telegram} :: new/changed msgs
|
|
|
|
{$sourced src/circle num/@ud} :: new heard-from
|
|
|
|
diff-story :: both in & outward
|
2018-03-18 04:06:15 +03:00
|
|
|
== ::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %out
|
|
|
|
:: outgoing data
|
|
|
|
++ move (pair bone card) :: all actions
|
|
|
|
++ lime :: diff fruit
|
2017-11-08 00:05:52 +03:00
|
|
|
$% {$hall-prize prize} ::
|
|
|
|
{$hall-rumor rumor} ::
|
2017-03-23 03:34:56 +03:00
|
|
|
== ::
|
2018-05-25 01:39:56 +03:00
|
|
|
++ pear :: poke fruit
|
2017-11-08 00:05:52 +03:00
|
|
|
$% {$hall-command command} ::
|
2017-11-24 02:43:16 +03:00
|
|
|
{$hall-action action} ::TODO see ++gentle-quit
|
2017-03-23 03:34:56 +03:00
|
|
|
== ::
|
2018-05-25 01:39:56 +03:00
|
|
|
++ card :: general card
|
2017-03-23 03:34:56 +03:00
|
|
|
$% {$diff lime} ::
|
2017-10-06 20:35:25 +03:00
|
|
|
{$info wire ship term nori:clay} ::
|
2017-03-23 03:34:56 +03:00
|
|
|
{$peer wire dock path} ::
|
|
|
|
{$poke wire dock pear} ::
|
2018-03-19 07:18:20 +03:00
|
|
|
{$pull wire dock ~} ::
|
|
|
|
{$quit ~} ::
|
2017-03-23 03:34:56 +03:00
|
|
|
== ::
|
2018-05-25 01:39:56 +03:00
|
|
|
++ weir :: parsed wire
|
|
|
|
$% {$repeat cir/circle ses/(list serial)} :: messaging wire
|
|
|
|
{$circle nom/name src/source} :: subscription wire
|
2017-03-23 03:34:56 +03:00
|
|
|
== ::
|
|
|
|
--
|
2017-03-30 15:17:37 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %work
|
|
|
|
:: #
|
|
|
|
:: functional cores and arms.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-12-11 22:38:44 +03:00
|
|
|
~% %hall-door ..^is ~
|
2018-04-12 17:47:44 +03:00
|
|
|
|_ {bol/bowl:gall $1 state}
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %transition
|
|
|
|
:: prep transition
|
2018-11-02 06:26:15 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ prep
|
2018-05-25 01:39:56 +03:00
|
|
|
:: adapts state.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-02-19 18:23:58 +03:00
|
|
|
=> |%
|
|
|
|
++ states
|
2018-04-12 17:47:44 +03:00
|
|
|
$%({$1 s/state} {$0 s/state-0})
|
|
|
|
::
|
|
|
|
++ state-0
|
|
|
|
(cork state |=(a/state a(stories (~(run by stories.a) story-0))))
|
|
|
|
++ story-0
|
|
|
|
%+ cork story
|
|
|
|
|= a/story
|
|
|
|
%= a
|
|
|
|
shape *config-0
|
|
|
|
mirrors (~(run by mirrors.a) config-0)
|
|
|
|
peers (~(run by peers.a) |=(a/(list query) (turn a query-0)))
|
|
|
|
==
|
|
|
|
++ query-0
|
2018-05-04 03:59:10 +03:00
|
|
|
$% $: $circle
|
2018-04-12 17:47:44 +03:00
|
|
|
nom/name
|
|
|
|
wer/(unit circle)
|
|
|
|
wat/(set circle-data)
|
|
|
|
ran/range-0
|
|
|
|
==
|
|
|
|
query
|
|
|
|
==
|
|
|
|
++ config-0
|
|
|
|
{src/(set source-0) cap/cord tag/tags fit/filter con/control}
|
|
|
|
++ source-0
|
|
|
|
{cir/circle ran/range-0}
|
|
|
|
++ range-0
|
|
|
|
%- unit
|
|
|
|
$: hed/place-0
|
|
|
|
tal/(unit place-0)
|
|
|
|
==
|
|
|
|
++ place-0
|
|
|
|
$% {$da @da}
|
|
|
|
{$ud @ud}
|
|
|
|
{$sd @sd}
|
|
|
|
==
|
2018-02-19 18:23:58 +03:00
|
|
|
--
|
|
|
|
=| mos/(list move)
|
|
|
|
|= old/(unit states)
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _..prep)
|
2017-10-09 12:57:36 +03:00
|
|
|
?~ old
|
2017-06-13 01:19:45 +03:00
|
|
|
%- pre-bake
|
2017-04-21 00:59:36 +03:00
|
|
|
ta-done:ta-init:ta
|
2018-02-19 18:23:58 +03:00
|
|
|
?- -.u.old
|
2018-04-12 17:47:44 +03:00
|
|
|
$1
|
2018-02-19 18:23:58 +03:00
|
|
|
[mos ..prep(+<+ u.old)]
|
2018-04-12 17:47:44 +03:00
|
|
|
::
|
|
|
|
$0
|
|
|
|
=- $(old `[%1 s.u.old(stories -)])
|
|
|
|
|^ %- ~(run by stories.s.u.old)
|
|
|
|
|= soy/story-0
|
|
|
|
^- story
|
|
|
|
%= soy
|
|
|
|
shape (prep-config shape.soy)
|
|
|
|
mirrors (~(run by mirrors.soy) prep-config)
|
|
|
|
peers %- ~(run by peers.soy)
|
|
|
|
|= a/(list query-0)
|
|
|
|
^- (list query)
|
|
|
|
(murn a prep-query)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ prep-config
|
|
|
|
|= cof/config-0
|
|
|
|
^- config
|
2018-08-17 03:22:34 +03:00
|
|
|
=. src.cof
|
2018-04-12 17:47:44 +03:00
|
|
|
%- ~(gas in *(set source))
|
|
|
|
(murn ~(tap in src.cof) prep-source)
|
2018-08-17 03:22:34 +03:00
|
|
|
:* src.cof
|
|
|
|
cap.cof
|
|
|
|
tag.cof
|
|
|
|
fit.cof
|
|
|
|
con.cof
|
|
|
|
0
|
2018-04-12 17:47:44 +03:00
|
|
|
==
|
2018-08-17 03:22:34 +03:00
|
|
|
|
2018-04-12 17:47:44 +03:00
|
|
|
::
|
|
|
|
++ prep-source
|
|
|
|
|= src/source-0
|
|
|
|
^- (unit source)
|
|
|
|
=+ nan=(prep-range ran.src)
|
|
|
|
?~ nan
|
|
|
|
~& [%forgetting-source src]
|
|
|
|
~
|
|
|
|
`src(ran u.nan)
|
|
|
|
::
|
|
|
|
++ prep-query
|
|
|
|
|= que/query-0
|
|
|
|
^- (unit query)
|
|
|
|
?. ?=($circle -.que) `que
|
|
|
|
=+ nan=(prep-range ran.que)
|
|
|
|
?~ nan
|
|
|
|
~& [%forgetting-query que]
|
|
|
|
~
|
|
|
|
`que(ran u.nan)
|
|
|
|
::
|
|
|
|
++ prep-range
|
|
|
|
|= ran/range-0
|
|
|
|
^- (unit range)
|
|
|
|
?~ ran `ran
|
|
|
|
:: ranges with a relative end aren't stored because they end
|
|
|
|
:: immediately, so if we find one we can safely discard it.
|
|
|
|
?: ?=({$~ {$sd @sd}} tal.u.ran) ~
|
|
|
|
:: we replace relative range starts with the current date.
|
|
|
|
:: this is practically correct.
|
|
|
|
?: ?=({$sd @sd} hed.u.ran)
|
|
|
|
`ran(hed.u [%da now.bol])
|
|
|
|
`ran
|
|
|
|
--
|
2018-02-19 18:23:58 +03:00
|
|
|
==
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %engines
|
|
|
|
:: main cores.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta
|
2018-05-25 01:39:56 +03:00
|
|
|
:: thinker core, used for processing pokes into deltas.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta
|
2018-05-25 01:39:56 +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)
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %resolve
|
2017-12-11 06:56:58 +03:00
|
|
|
::
|
|
|
|
++ ta-done
|
2018-05-25 01:39:56 +03:00
|
|
|
:: 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}.
|
|
|
|
::
|
|
|
|
:: 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
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %emitters
|
|
|
|
:: #
|
|
|
|
:: arms that create outward changes.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-delta
|
2018-05-25 01:39:56 +03:00
|
|
|
:: adds a delta to the head of {deltas}.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-delta
|
2017-07-22 01:53:24 +03:00
|
|
|
|= det/delta
|
|
|
|
%_(+> deltas [det deltas])
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-deltas
|
2018-05-25 01:39:56 +03:00
|
|
|
:: adds multiple deltas to the head of {deltas}.
|
|
|
|
::
|
|
|
|
:: flops to stay consistent with ++ta-delta.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-deltas
|
2017-07-22 01:53:24 +03:00
|
|
|
|= des/(list delta)
|
|
|
|
%_(+> deltas (welp (flop des) deltas))
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-14 02:07:35 +03:00
|
|
|
++ ta-speak
|
2018-05-25 01:39:56 +03:00
|
|
|
:: sends {sep} as an %app message to the user's inbox.
|
2017-04-25 14:33:02 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-speak
|
2017-12-14 02:07:35 +03:00
|
|
|
|= sep/speech
|
2017-11-24 02:46:00 +03:00
|
|
|
%+ ta-action %phrase
|
2017-11-01 20:35:06 +03:00
|
|
|
:- [[our.bol %inbox] ~ ~]
|
2017-12-14 02:07:35 +03:00
|
|
|
[%app dap.bol sep]~
|
|
|
|
::
|
|
|
|
++ ta-grieve
|
2018-05-25 01:39:56 +03:00
|
|
|
:: sends a stack trace to the user's inbox.
|
2017-12-14 02:07:35 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-grieve
|
2017-12-14 02:07:35 +03:00
|
|
|
|= {msg/tape fal/tang}
|
|
|
|
%^ ta-speak %fat
|
|
|
|
[%name 'stack trace' %tank fal]
|
|
|
|
[%lin | (crip msg)]
|
|
|
|
::
|
|
|
|
++ ta-note
|
2018-05-25 01:39:56 +03:00
|
|
|
:: sends {msg} to the user's inbox.
|
2017-12-14 02:07:35 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-note
|
2017-12-14 02:07:35 +03:00
|
|
|
|= msg/tape
|
|
|
|
(ta-speak %lin | (crip msg))
|
2017-04-25 14:33:02 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-evil
|
2018-05-25 01:39:56 +03:00
|
|
|
:: tracing printf and crash.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-evil
|
2017-03-23 03:34:56 +03:00
|
|
|
|= msg/cord
|
2017-11-08 00:05:52 +03:00
|
|
|
~| [%hall-ta-evil msg]
|
2017-03-23 03:34:56 +03:00
|
|
|
!!
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %data
|
|
|
|
:: #
|
|
|
|
:: utility functions for data retrieval.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-know
|
2018-05-25 01:39:56 +03:00
|
|
|
:: 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.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-know
|
2017-12-18 16:20:45 +03:00
|
|
|
|= nom/name
|
2018-02-25 06:37:00 +03:00
|
|
|
|: fun=^|(|:(so ta))
|
2017-04-21 00:59:36 +03:00
|
|
|
^+ +>+>
|
|
|
|
=+ pur=(~(get by stories) nom)
|
|
|
|
?~ pur
|
2017-07-08 03:01:56 +03:00
|
|
|
%- ta-evil
|
|
|
|
(crip "no story '{(trip nom)}'")
|
2017-04-21 00:59:36 +03:00
|
|
|
(fun ~(. so nom ~ u.pur))
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %interaction-events
|
|
|
|
:: #
|
|
|
|
:: arms that apply events we received.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-init
|
2018-05-25 01:39:56 +03:00
|
|
|
:: 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
|
2017-12-18 16:20:45 +03:00
|
|
|
^- (list {security name cord})
|
2017-11-01 20:35:06 +03:00
|
|
|
:~ [%mailbox %inbox 'default home']
|
2017-10-31 21:56:56 +03:00
|
|
|
[%journal %public 'visible activity']
|
2018-09-20 02:55:42 +03:00
|
|
|
[%mailbox %i 'dm invites']
|
2017-06-14 04:46:02 +03:00
|
|
|
==
|
2018-02-26 07:34:31 +03:00
|
|
|
|: [[typ=*security nom=*name des=*cord] ta]
|
2017-11-24 02:46:00 +03:00
|
|
|
(ta-action [%create nom des typ])
|
2017-06-22 03:15:13 +03:00
|
|
|
%- ta-deltas
|
|
|
|
:: if needed, subscribe to our parent's /burden.
|
2018-10-15 09:23:34 +03:00
|
|
|
=+ sen=(above [our now our]:bol)
|
2017-10-06 20:35:25 +03:00
|
|
|
?: ?| !=(%czar (clan:title sen))
|
2017-06-22 03:15:13 +03:00
|
|
|
=(sen our.bol)
|
2017-10-06 20:35:25 +03:00
|
|
|
=(%pawn (clan:title our.bol))
|
2017-06-22 03:15:13 +03:00
|
|
|
==
|
|
|
|
~
|
|
|
|
[%init ~]~
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-apply
|
2018-05-25 01:39:56 +03:00
|
|
|
:: applies the command sent by {src}.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-apply
|
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-12-19 02:53:59 +03:00
|
|
|
:: %publish commands prompt us (as a circle host)
|
|
|
|
:: to verify and distribute messages.
|
2017-06-13 01:19:45 +03:00
|
|
|
$publish (ta-think | src +.cod)
|
2017-12-19 02:53:59 +03:00
|
|
|
:: %present commands are used to ask us to set
|
|
|
|
:: someone's status in the indicated stories.
|
2017-06-28 02:45:56 +03:00
|
|
|
$present (ta-present src +.cod)
|
2017-12-19 02:53:59 +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-11-01 22:24:11 +03:00
|
|
|
$bearing (ta-observe src) ::TODO isn't this redundant with ta-subscribe?
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-present
|
2018-05-25 01:39:56 +03:00
|
|
|
:: update a status
|
|
|
|
::
|
|
|
|
:: sets status for the indicated stories,
|
|
|
|
:: but only if they have write permission there.
|
2017-06-28 02:45:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-present
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {who/ship nos/(set name) dif/diff-status}
|
2017-06-28 02:45:56 +03:00
|
|
|
^+ +>
|
2017-12-09 19:19:23 +03:00
|
|
|
=+ nol=~(tap in nos)
|
|
|
|
|-
|
|
|
|
?~ nol +>.^$
|
|
|
|
=. +>.^$
|
|
|
|
?. (~(has by stories) i.nol) +>.^$
|
|
|
|
=+ soy=(~(got by stories) i.nol)
|
|
|
|
so-done:(~(so-present so i.nol ~ soy) who dif)
|
|
|
|
$(nol t.nol)
|
2017-06-28 02:45:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-action
|
2018-05-25 01:39:56 +03:00
|
|
|
:: performs action sent by a client.
|
2017-04-10 23:24:25 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-action
|
2017-11-24 02:46:00 +03:00
|
|
|
|= act/action
|
2017-04-10 23:24:25 +03:00
|
|
|
^+ +>
|
2017-04-21 00:59:36 +03:00
|
|
|
=< work
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %actions
|
|
|
|
:: #
|
|
|
|
:: action processing core
|
|
|
|
::
|
|
|
|
:: ++work calls the appropriate action processing
|
|
|
|
:: arm. most use ++affect to retrieve the affected
|
|
|
|
:: story, crashing if it doesn't exist.
|
2018-11-02 06:26:15 +03:00
|
|
|
~% %hall-ta-action-inner + ~
|
2017-04-21 00:59:36 +03:00
|
|
|
|%
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %utility
|
|
|
|
++ work :: perform action
|
2017-04-21 00:59:36 +03:00
|
|
|
^+ ..ta-action
|
|
|
|
?- -.act
|
2017-04-24 21:17:56 +03:00
|
|
|
:: circle configuration
|
2017-04-21 00:59:36 +03:00
|
|
|
$create (action-create +.act)
|
2018-02-14 18:54:51 +03:00
|
|
|
$design (action-design +.act)
|
2017-04-21 00:59:36 +03:00
|
|
|
$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)
|
2018-02-14 18:54:51 +03:00
|
|
|
$usage (action-usage +.act)
|
2018-06-19 02:23:36 +03:00
|
|
|
$read (action-read +.act)
|
2018-08-17 03:22:34 +03:00
|
|
|
$newdm (action-newdm +.act)
|
2017-04-21 00:59:36 +03:00
|
|
|
:: 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-11-03 23:36:42 +03:00
|
|
|
:: misc changes
|
|
|
|
$public (action-public +.act)
|
2017-04-21 00:59:36 +03:00
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ affect
|
2018-05-25 01:39:56 +03:00
|
|
|
:: delta to story
|
|
|
|
::
|
|
|
|
:: store a delta about a story. if the story
|
|
|
|
:: does not exist, crash.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-affect
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name det/delta-story}
|
2017-05-13 01:05:49 +03:00
|
|
|
?: (~(has by stories) nom)
|
2017-07-22 01:53:24 +03:00
|
|
|
(impact nom det)
|
2017-07-08 03:01:56 +03:00
|
|
|
(ta-evil (crip "no story {(trip nom)}"))
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ impact
|
2018-05-25 01:39:56 +03:00
|
|
|
:: delta for story
|
|
|
|
::
|
|
|
|
:: Store a delta about a story.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-impact
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name det/delta-story}
|
2017-07-22 01:53:24 +03:00
|
|
|
(ta-delta %story nom det)
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ present
|
2018-05-25 01:39:56 +03:00
|
|
|
:: send status update
|
2017-06-28 02:45:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-present
|
2017-10-19 03:05:53 +03:00
|
|
|
|= {aud/audience dif/diff-status}
|
2017-06-28 02:45:56 +03:00
|
|
|
^+ ..ta-action
|
|
|
|
=/ cic
|
2017-12-18 16:20:45 +03:00
|
|
|
^- (jug ship name)
|
2017-10-19 03:05:53 +03:00
|
|
|
%- ~(rep in aud)
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {c/circle m/(jug ship name)}
|
2017-06-28 02:45:56 +03:00
|
|
|
(~(put ju m) hos.c nom.c)
|
2017-10-10 17:44:37 +03:00
|
|
|
=? ..ta-action (~(has by cic) our.bol)
|
2017-12-13 04:08:52 +03:00
|
|
|
=+ nos=~(tap in (~(get ju cic) our.bol))
|
2017-12-19 16:43:49 +03:00
|
|
|
(ta-present our.bol (~(get ju cic) our.bol) dif)
|
2017-06-28 02:45:56 +03:00
|
|
|
=. cic (~(del by cic) our.bol)
|
|
|
|
%- ta-deltas
|
|
|
|
%- ~(rep by cic)
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {{h/ship s/(set name)} l/(list delta)}
|
2017-06-28 02:45:56 +03:00
|
|
|
:_ l
|
|
|
|
[%present h s dif]
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %circle-configuration
|
2017-12-11 06:56:58 +03:00
|
|
|
++ action-create
|
2018-05-25 01:39:56 +03:00
|
|
|
:: creates a story with the specified parameters.
|
2017-04-11 14:00:13 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-create
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name 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-10-09 23:50:17 +03:00
|
|
|
:* [[[our.bol nom] ~] ~ ~]
|
2017-04-28 20:40:12 +03:00
|
|
|
des
|
2018-02-14 18:54:51 +03:00
|
|
|
~
|
2017-07-19 03:08:08 +03:00
|
|
|
*filter
|
2017-06-14 03:28:16 +03:00
|
|
|
:- typ
|
2017-10-31 21:56:56 +03:00
|
|
|
?. ?=(?($village $journal) typ) ~
|
2017-06-14 03:28:16 +03:00
|
|
|
[our.bol ~ ~]
|
2018-06-19 02:23:36 +03:00
|
|
|
0
|
2017-04-28 20:40:12 +03:00
|
|
|
==
|
2017-07-08 03:01:56 +03:00
|
|
|
(ta-evil (crip "{(trip nom)}: already exists"))
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-02-14 18:54:51 +03:00
|
|
|
++ action-design
|
2018-05-25 01:39:56 +03:00
|
|
|
:: creates a story with the specified config.
|
2018-02-14 18:54:51 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-design
|
2018-02-14 18:54:51 +03:00
|
|
|
|= {nom/name cof/config}
|
|
|
|
?. (~(has in stories) nom)
|
|
|
|
(impact nom %new cof)
|
|
|
|
(ta-evil (crip "{(trip nom)}: already exists"))
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ action-delete
|
2018-05-25 01:39:56 +03:00
|
|
|
:: delete + announce
|
|
|
|
::
|
|
|
|
:: delete story {nom}, optionally announcing the
|
|
|
|
:: event with message {mes}.
|
2017-04-14 00:40:53 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-delete
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name mes/(unit cord)}
|
2017-04-21 00:59:36 +03:00
|
|
|
^+ ..ta-action
|
2017-10-10 17:44:37 +03:00
|
|
|
=? ..ta-action ?=(^ mes)
|
2017-05-03 19:38:41 +03:00
|
|
|
%+ action-phrase
|
2017-07-11 02:41:47 +03:00
|
|
|
[[our.bol nom] ~ ~]
|
2017-05-03 19:38:41 +03:00
|
|
|
[%lin | u.mes]~
|
2017-05-13 01:05:49 +03:00
|
|
|
(affect nom %remove ~)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ action-depict
|
2018-05-25 01:39:56 +03:00
|
|
|
:: change description of story {nom} to {des}.
|
2017-04-14 17:16:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-depict
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name cap/cord}
|
2017-05-13 01:05:49 +03:00
|
|
|
(affect nom %config [our.bol nom] %caption cap)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ action-filter
|
2018-05-25 01:39:56 +03:00
|
|
|
:: change message rules
|
|
|
|
::
|
|
|
|
:: replaces the story's current filter with the
|
|
|
|
:: specified one.
|
2017-05-09 22:43:42 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-filter
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name 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-12-11 06:56:58 +03:00
|
|
|
++ action-permit
|
2018-05-25 01:39:56 +03:00
|
|
|
:: invite to/banish from story {nom} all {sis}.
|
2017-04-14 17:16:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-permit
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name inv/? sis/(set ship)}
|
2017-05-13 01:05:49 +03:00
|
|
|
=+ soy=(~(get by stories) nom)
|
|
|
|
?~ soy
|
2017-07-08 03:01:56 +03:00
|
|
|
(ta-evil (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-12-11 06:56:58 +03:00
|
|
|
++ action-source
|
2018-05-25 01:39:56 +03:00
|
|
|
:: add/remove {pos} as sources for story {nom}.
|
2017-04-14 00:40:53 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-source
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name sub/? srs/(set source)}
|
2017-06-27 02:56:03 +03:00
|
|
|
=+ soy=(~(get by stories) nom)
|
|
|
|
?~ soy
|
2017-07-08 03:01:56 +03:00
|
|
|
(ta-evil (crip "no story {(trip nom)}"))
|
2017-10-09 23:50:17 +03:00
|
|
|
so-done:(~(so-sources so nom ~ u.soy) sub srs)
|
2017-04-28 20:40:12 +03:00
|
|
|
::
|
2018-02-14 18:54:51 +03:00
|
|
|
++ action-usage
|
2018-05-25 01:39:56 +03:00
|
|
|
:: add or remove usage tags.
|
2018-02-14 18:54:51 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-usage
|
2018-02-14 18:54:51 +03:00
|
|
|
|= {nom/name add/? tas/tags}
|
|
|
|
=+ soy=(~(get by stories) nom)
|
|
|
|
?~ soy
|
|
|
|
(ta-evil (crip "no story {(trip nom)}"))
|
|
|
|
so-done:(~(so-usage so nom ~ u.soy) add tas)
|
|
|
|
::
|
2018-06-19 02:23:36 +03:00
|
|
|
++ action-read
|
2018-08-20 23:14:13 +03:00
|
|
|
:: set the read message number
|
2018-06-19 02:23:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-read
|
2018-06-19 02:23:36 +03:00
|
|
|
|= {nom/name red/@ud}
|
|
|
|
=+ soy=(~(get by stories) nom)
|
|
|
|
?~ soy
|
|
|
|
(ta-evil (crip "no story {(trip nom)}"))
|
|
|
|
so-done:(~(so-read so nom ~ u.soy) red)
|
|
|
|
::
|
2018-08-17 03:22:34 +03:00
|
|
|
++ action-newdm
|
2018-08-20 23:14:13 +03:00
|
|
|
:: copy all behavior of create, permit, and source in that order
|
2018-08-17 03:22:34 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-newdm
|
2018-09-20 02:55:42 +03:00
|
|
|
|= sis/(set ship)
|
|
|
|
:: generate circle name from sis as a dot seperated list of ship names
|
|
|
|
:: in alphabetical order
|
|
|
|
::
|
2018-08-17 03:22:34 +03:00
|
|
|
=/ nom/name
|
|
|
|
%^ rsh 3 1
|
|
|
|
%+ roll
|
2018-09-20 02:55:42 +03:00
|
|
|
%+ sort %+ turn ~(tap in (~(put in sis) our.bol))
|
2018-08-22 02:15:53 +03:00
|
|
|
|= p/ship
|
|
|
|
^- cord
|
|
|
|
(scot %p p)
|
|
|
|
aor
|
|
|
|
|= {p/cord nam/name}
|
2018-08-17 03:22:34 +03:00
|
|
|
^- @tas
|
2018-08-22 02:15:53 +03:00
|
|
|
(crip "{(trip `@t`nam)}.{(slag 1 (trip p))}")
|
2018-09-20 02:55:42 +03:00
|
|
|
:: if we've already created this circle, no-op
|
|
|
|
::
|
|
|
|
?: (~(has in ~(key by stories)) nom)
|
|
|
|
(ta-deltas ~)
|
|
|
|
:: check if we already have an invite to this dm group
|
|
|
|
:: or if we are creating it
|
|
|
|
::
|
|
|
|
=/ inv=(list telegram)
|
|
|
|
%+ skim grams:(~(got by stories) %i)
|
|
|
|
|= g=telegram
|
|
|
|
^- ?
|
|
|
|
?. ?=({$inv *} sep.g) %.n
|
|
|
|
?. =(nom nom.cir.sep.g) %.n
|
|
|
|
?. (~(has in sis) aut.g) %.n
|
|
|
|
%.y
|
|
|
|
::
|
|
|
|
=. inv %+ sort inv
|
|
|
|
|= {a/telegram b/telegram}
|
|
|
|
(lte wen.a wen.b)
|
|
|
|
:: create our side of the dm and source it to our inbox
|
|
|
|
::
|
2018-08-17 03:22:34 +03:00
|
|
|
=/ dels/(list delta)
|
2018-09-20 02:55:42 +03:00
|
|
|
:~ :* %story
|
|
|
|
%inbox
|
|
|
|
%follow
|
|
|
|
&
|
|
|
|
[[[our.bol nom] ~] ~ ~]
|
|
|
|
==
|
|
|
|
:* %story
|
|
|
|
nom
|
|
|
|
%new
|
|
|
|
[[[our.bol nom] ~] ~ ~]
|
|
|
|
'dm'
|
|
|
|
~
|
|
|
|
*filter
|
|
|
|
[%village (~(put in sis) our.bol)]
|
|
|
|
0
|
|
|
|
==
|
2018-08-17 03:22:34 +03:00
|
|
|
==
|
2018-09-20 02:55:42 +03:00
|
|
|
:: if we did initiate the dm, send out invites
|
|
|
|
::
|
|
|
|
?: ?=(~ inv)
|
|
|
|
=. ..ta-action (ta-deltas dels)
|
|
|
|
%- action-convey
|
|
|
|
^- (list thought)
|
|
|
|
%+ turn ~(tap in (~(del in sis) our.bol))
|
|
|
|
|= a=ship
|
|
|
|
^- thought
|
|
|
|
:* uid=(shaf a eny.bol)
|
|
|
|
aud=(sy [a %i] ~)
|
|
|
|
wen=now.bol
|
|
|
|
sep=[%inv & [our.bol nom]]
|
|
|
|
==
|
|
|
|
:: if we did not initiate the dm, source to the initiators copy
|
|
|
|
::
|
|
|
|
=. dels
|
|
|
|
:_ dels
|
|
|
|
:* %story
|
2018-08-17 03:22:34 +03:00
|
|
|
nom
|
2018-09-20 02:55:42 +03:00
|
|
|
%follow
|
|
|
|
&
|
|
|
|
[[[aut.i.inv nom] ~] ~ ~]
|
2018-08-17 03:22:34 +03:00
|
|
|
==
|
|
|
|
(ta-deltas dels)
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %messaging
|
2017-12-11 06:56:58 +03:00
|
|
|
++ action-convey
|
2018-05-25 01:39:56 +03:00
|
|
|
:: post exact
|
|
|
|
::
|
|
|
|
:: sends the messages provided in the action.
|
2017-04-14 00:40:53 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-convey
|
2017-04-21 00:59:36 +03:00
|
|
|
|= tos/(list thought)
|
|
|
|
(ta-think & our.bol tos)
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ action-phrase
|
2018-05-25 01:39:56 +03:00
|
|
|
:: post easy
|
|
|
|
::
|
|
|
|
:: sends the message contents provided in the
|
|
|
|
:: action generating a serial and setting a
|
|
|
|
:: timestamp.
|
2017-04-14 00:40:53 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-phrase
|
2017-10-19 03:05:53 +03:00
|
|
|
|= {aud/audience ses/(list speech)}
|
2017-04-21 00:59:36 +03:00
|
|
|
^+ ..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 ~
|
2018-06-06 03:11:06 +03:00
|
|
|
=^ sir eny.bol ~(uniq hall-lib bol)
|
2017-04-21 00:59:36 +03:00
|
|
|
:_ $(ses t.ses)
|
2017-10-19 03:05:53 +03:00
|
|
|
[sir aud [now.bol i.ses]]
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %personal-metadata
|
2017-06-28 02:45:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ action-notify
|
2018-05-25 01:39:56 +03:00
|
|
|
:: our presence update
|
|
|
|
::
|
|
|
|
:: notify the audience of our new presence state,
|
|
|
|
:: or tell them to remove us if {pes} is ~.
|
2017-04-11 14:00:13 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-notify
|
2017-11-02 02:44:13 +03:00
|
|
|
|= {aud/audience pes/(unit presence)}
|
2017-04-21 00:59:36 +03:00
|
|
|
^+ ..ta-action
|
2017-11-02 02:44:13 +03:00
|
|
|
?~ pes (present aud %remove ~)
|
|
|
|
(present aud %presence u.pes)
|
2017-06-28 02:45:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ action-naming
|
2018-05-25 01:39:56 +03:00
|
|
|
:: our name update
|
2017-06-28 02:45:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-naming
|
2017-10-19 03:05:53 +03:00
|
|
|
|= {aud/audience man/human}
|
2017-06-28 02:45:56 +03:00
|
|
|
^+ ..ta-action
|
2017-10-19 03:05:53 +03:00
|
|
|
(present aud %human %full man)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %changing-shared-ui
|
2017-12-11 06:56:58 +03:00
|
|
|
++ action-nick
|
2018-05-25 01:39:56 +03:00
|
|
|
:: new identity
|
|
|
|
::
|
|
|
|
:: assigns a new local identity ("nickname") to the
|
|
|
|
:: target ship.
|
2017-04-11 14:00:13 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-nick
|
2017-07-12 01:12:29 +03:00
|
|
|
|= {who/ship nic/nick}
|
2017-04-21 00:59:36 +03:00
|
|
|
^+ ..ta-action
|
2017-12-11 06:56:58 +03:00
|
|
|
?. =((~(get by nicks) who) `nic) ..ta-action :: no change
|
2017-05-13 01:05:49 +03:00
|
|
|
(ta-delta %nick who nic)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ action-glyph
|
2018-05-25 01:39:56 +03:00
|
|
|
:: un/bind glyph {lif} to audience {aud}.
|
2017-04-11 14:00:13 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-glyph
|
2017-10-19 03:05:53 +03:00
|
|
|
|= {lif/char aud/audience bin/?}
|
|
|
|
(ta-delta %glyph bin lif aud)
|
2017-11-03 23:36:42 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ action-public
|
2018-05-25 01:39:56 +03:00
|
|
|
:: show/hide membership
|
|
|
|
::
|
|
|
|
:: add or remove a circle from the public membership list.
|
2017-11-03 23:36:42 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-action-public
|
2017-11-03 23:36:42 +03:00
|
|
|
|= {add/? cir/circle}
|
|
|
|
(ta-delta %public add cir)
|
2017-04-21 00:59:36 +03:00
|
|
|
--
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %subscription-events
|
|
|
|
:: #
|
|
|
|
:: arms that react to subscription events.
|
2017-03-24 23:10:27 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-observe
|
2018-05-25 01:39:56 +03:00
|
|
|
:: watch burden bearer
|
|
|
|
::
|
|
|
|
:: subscribe to a child who is bearing our burden.
|
2017-11-01 22:24:11 +03:00
|
|
|
::TODO everyone should be able to bear if they so desire.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-observe
|
2017-06-13 01:19:45 +03:00
|
|
|
|= who/ship
|
|
|
|
^+ +>
|
2018-10-15 09:23:34 +03:00
|
|
|
?. =(our.bol (above our.bol now.bol who))
|
2017-06-13 01:19:45 +03:00
|
|
|
~&([%not-our-bearer who] +>)
|
|
|
|
(ta-delta %observe who)
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-subscribe
|
2018-05-25 01:39:56 +03:00
|
|
|
:: listen to
|
|
|
|
::
|
|
|
|
:: reaction to incoming subscriptions.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-subscribe
|
2017-06-23 04:03:37 +03:00
|
|
|
|= {her/ship qer/query}
|
2017-03-23 03:34:56 +03:00
|
|
|
^+ +>
|
2017-11-02 02:44:13 +03:00
|
|
|
?+ -.qer +>
|
2017-11-17 22:09:40 +03:00
|
|
|
$burden (ta-observe her)
|
|
|
|
$circle %+ ta-delta %story
|
|
|
|
[nom.qer %peer & her qer]
|
2017-06-13 01:19:45 +03:00
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-greet
|
2018-05-25 01:39:56 +03:00
|
|
|
:: subscription success
|
|
|
|
::
|
|
|
|
:: store a started subscription as source.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-greet
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name src/source}
|
2017-06-13 01:19:45 +03:00
|
|
|
%- (ta-know nom) |= sor/_so =< so-done
|
2017-10-09 23:50:17 +03:00
|
|
|
(so-greet:sor src)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-leave
|
2018-05-25 01:39:56 +03:00
|
|
|
:: subscription failed
|
|
|
|
::
|
|
|
|
:: removes {src} from story {nom}'s sources.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-leave
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name src/source}
|
2017-04-21 00:59:36 +03:00
|
|
|
%- (ta-know nom) |= sor/_so =< so-done
|
2017-10-09 23:50:17 +03:00
|
|
|
(so-leave:sor src)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-take
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply prize
|
|
|
|
::
|
|
|
|
:: for a %burden prize, bear the burden in a new
|
|
|
|
:: or existing story.
|
|
|
|
:: for a %circle prize, use ++so to accept it.
|
|
|
|
:: for a %report prize, silently ignore.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-take
|
2017-06-13 01:19:45 +03:00
|
|
|
|= {wir/wire piz/prize}
|
2017-04-04 17:15:12 +03:00
|
|
|
^+ +>
|
2017-11-16 23:32:09 +03:00
|
|
|
?+ -.piz ~&([%ignoring-prize -.piz] +>)
|
|
|
|
$report
|
|
|
|
+>
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
$burden
|
2017-11-08 19:11:59 +03:00
|
|
|
=+ sos=~(tap by sos.piz)
|
|
|
|
|- ^+ ..ta-take
|
|
|
|
?~ sos ..ta-take
|
|
|
|
=. ..ta-take
|
|
|
|
=+ (fall (~(get by stories) p.i.sos) *story)
|
|
|
|
=> (~(so-bear so p.i.sos ~ -) q.i.sos)
|
|
|
|
=. acs (flop acs)
|
|
|
|
|- ^+ ..ta-take
|
|
|
|
?~ acs ..ta-take
|
2017-11-24 02:46:00 +03:00
|
|
|
=. ..ta-take (ta-action i.acs)
|
2017-11-08 19:11:59 +03:00
|
|
|
$(acs t.acs)
|
|
|
|
$(sos t.sos)
|
|
|
|
::TODO runtime error
|
|
|
|
::%+ roll ~(tap by sos.piz)
|
2017-12-18 16:20:45 +03:00
|
|
|
::|= {{n/name b/burden} _..ta-take}
|
2017-11-08 19:11:59 +03:00
|
|
|
::=+ (fall (~(get by stories) n) *story)
|
|
|
|
::so-done:(~(so-bear so n ~ -) b)
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
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
|
2017-10-09 23:50:17 +03:00
|
|
|
(so-take:sor cir.src.wer +.piz)
|
2017-06-13 01:19:45 +03:00
|
|
|
==
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-hear
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply rumor
|
|
|
|
::
|
|
|
|
:: 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
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-hear
|
2017-07-22 01:53:24 +03:00
|
|
|
|= {wir/wire rum/rumor}
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-07-22 01:53:24 +03:00
|
|
|
?+ -.rum
|
|
|
|
~&([%ignoring-rumor -.rum] +>)
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
$burden
|
2017-07-22 01:53:24 +03:00
|
|
|
?+ -.rum.rum
|
|
|
|
%- (ta-know nom.rum) |= sor/_so =< so-done
|
|
|
|
(so-hear:sor & [our.bol nom.rum] rum.rum)
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
$new
|
2017-11-09 20:25:26 +03:00
|
|
|
=? +> !(~(has by stories) nom.rum)
|
|
|
|
(ta-delta %story +.rum)
|
2017-11-08 19:11:59 +03:00
|
|
|
=> =+ (fall (~(get by stories) nom.rum) *story)
|
|
|
|
%- ~(so-bear so nom.rum ~ -)
|
|
|
|
[~ [cof.rum.rum ~] [~ ~]]
|
|
|
|
=. acs (flop acs)
|
|
|
|
|- ^+ +>+
|
|
|
|
?~ acs +>+
|
2017-11-24 02:46:00 +03:00
|
|
|
=. +>+ (ta-action i.acs)
|
2017-11-08 19:11:59 +03:00
|
|
|
$(acs t.acs)
|
|
|
|
::TODO runtime error
|
|
|
|
::=< so-done
|
|
|
|
::%- ~(so-bear so nom.rum ~ (fall (~(get by stories) nom.rum) *story))
|
|
|
|
::[~ [cof.rum.rum ~] [~ ~]]
|
2017-06-13 01:19:45 +03:00
|
|
|
==
|
2017-11-16 03:21:25 +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
|
2017-10-09 23:50:17 +03:00
|
|
|
(so-hear:sor | cir.src.wer rum.rum)
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-repeat
|
2018-05-25 01:39:56 +03:00
|
|
|
:: message delivered
|
|
|
|
::
|
|
|
|
:: message got delivered. if an error was returned
|
|
|
|
:: mark the message as rejected. if not, received.
|
2017-06-13 21:14:13 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-repeat
|
2017-08-03 07:43:56 +03:00
|
|
|
|= {who/circle ses/(list serial) fal/(unit tang)}
|
2017-06-13 21:14:13 +03:00
|
|
|
^+ +>
|
2017-12-14 02:07:35 +03:00
|
|
|
?~ fal
|
|
|
|
(ta-delta %done who ses %accepted)
|
|
|
|
=. +> (ta-delta %done who ses %rejected)
|
|
|
|
=- (ta-grieve - u.fal)
|
|
|
|
%+ weld "{(scow %ud (lent ses))} message(s) "
|
|
|
|
"rejected by {(scow %p hos.who)}/{(trip nom.who)}"
|
2017-06-13 21:14:13 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-resub
|
2018-05-25 01:39:56 +03:00
|
|
|
:: subscription dropped
|
|
|
|
::
|
|
|
|
:: when a subscription gets dropped by gall, we
|
|
|
|
:: resubscribe.
|
2017-10-09 23:50:17 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-resub
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name src/source}
|
2017-10-09 23:50:17 +03:00
|
|
|
^+ +>
|
|
|
|
%- (ta-know nom) |= sor/_so =< so-done
|
|
|
|
(so-resub:sor src)
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %messaging
|
|
|
|
:: #
|
|
|
|
:: arms for sending and processing messages.
|
2017-03-29 01:11:12 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-think
|
2018-05-25 01:39:56 +03:00
|
|
|
:: publish or review
|
|
|
|
::
|
|
|
|
:: consumes each thought.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-think
|
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-12-11 06:56:58 +03:00
|
|
|
++ ta-consume
|
2018-05-25 01:39:56 +03:00
|
|
|
:: to each audience
|
|
|
|
::
|
|
|
|
:: conducts thought {tot} to each circle in its audience.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-consume
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {pub/? aut/ship tot/thought}
|
2017-10-06 20:35:25 +03:00
|
|
|
=+ aud=~(tap in aud.tot)
|
2017-03-23 03:34:56 +03:00
|
|
|
|- ^+ +>.^$
|
|
|
|
?~ aud +>.^$
|
2017-07-07 04:16:17 +03:00
|
|
|
$(aud t.aud, +>.^$ (ta-conduct pub aut i.aud tot))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-conduct
|
2018-05-25 01:39:56 +03:00
|
|
|
:: thought to circle
|
|
|
|
::
|
|
|
|
:: either publishes or records a thought.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-conduct
|
2017-07-11 02:41:47 +03:00
|
|
|
|= {pub/? aut/ship cir/circle tot/thought}
|
2017-03-23 03:34:56 +03:00
|
|
|
^+ +>
|
2017-07-11 02:41:47 +03:00
|
|
|
?: pub
|
2017-10-06 20:35:25 +03:00
|
|
|
?. (team:title our.bol aut)
|
2017-11-03 22:31:16 +03:00
|
|
|
(ta-note "strange author {(scow %p aut)}")
|
2017-07-11 02:41:47 +03:00
|
|
|
=. aut our.bol
|
|
|
|
?: =(aut hos.cir)
|
2017-10-31 19:09:24 +03:00
|
|
|
?: (~(has by stories) nom.cir)
|
2017-10-31 21:56:56 +03:00
|
|
|
(ta-record nom.cir hos.cir tot)
|
2017-11-03 22:31:16 +03:00
|
|
|
::TODO avenue for abuse?
|
|
|
|
(ta-note "have no story {(scow %tas nom.cir)}")
|
2017-07-11 02:41:47 +03:00
|
|
|
(ta-transmit cir tot)
|
|
|
|
?. =(our.bol hos.cir) +>
|
|
|
|
(ta-record nom.cir aut tot)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-record
|
2018-05-25 01:39:56 +03:00
|
|
|
:: add to story
|
|
|
|
::
|
|
|
|
:: add or update telegram {gam} in story {nom}.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-record
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name gam/telegram}
|
2017-04-21 00:59:36 +03:00
|
|
|
%- (ta-know nom) |= sor/_so =< so-done
|
2017-11-20 22:48:54 +03:00
|
|
|
(so-learn:sor [our.bol nom] gam)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ ta-transmit
|
2018-05-25 01:39:56 +03:00
|
|
|
:: sends thought {tot} to {cir}.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-ta-transmit
|
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
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %stories
|
|
|
|
:: #
|
|
|
|
:: arms for modifying stories.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so
|
2018-05-25 01:39:56 +03:00
|
|
|
:: story core, used for doing work on a story.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so
|
2018-05-25 01:39:56 +03:00
|
|
|
|_ :: nom: story name in {stories}.
|
|
|
|
:: acs: hall actions issued due to changes.
|
2017-12-11 06:56:58 +03:00
|
|
|
:: story is faceless to ease data access.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-18 16:20:45 +03:00
|
|
|
$: nom/name
|
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
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %resolve
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-done
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply actions generated by story operations.
|
2017-07-06 23:38:36 +03:00
|
|
|
::TODO maybe produce list of actions, apply in ++ta
|
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-11-24 02:46:00 +03:00
|
|
|
=. +>+ (ta-action i.acs)
|
2017-04-14 01:46:15 +03:00
|
|
|
$(acs t.acs)
|
2017-04-10 23:35:25 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %emitters
|
|
|
|
:: #
|
|
|
|
:: arms that create outward changes.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-act
|
2018-05-25 01:39:56 +03:00
|
|
|
:: stores a hall action.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-act
|
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-12-11 06:56:58 +03:00
|
|
|
++ so-note
|
2018-05-25 01:39:56 +03:00
|
|
|
:: sends {msg} as an %app message to the user's inbox.
|
2017-04-25 14:33:02 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-note
|
2017-04-25 14:33:02 +03:00
|
|
|
|= msg/cord
|
|
|
|
^+ +>
|
|
|
|
%+ so-act %phrase
|
2017-11-01 20:35:06 +03:00
|
|
|
:- [[our.bol %inbox] ~ ~]
|
2017-11-06 19:21:50 +03:00
|
|
|
[%app dap.bol %lin | msg]~
|
2017-04-25 14:33:02 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-delta
|
2018-05-25 01:39:56 +03:00
|
|
|
:: store delta in ++ta core.
|
2017-04-03 17:50:35 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-delta
|
2017-07-22 01:53:24 +03:00
|
|
|
|= det/delta
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-07-22 01:53:24 +03:00
|
|
|
+>(deltas [det deltas])
|
2017-04-03 17:50:35 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-deltas
|
2018-05-25 01:39:56 +03:00
|
|
|
:: store multiple deltas in ++ta core.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-deltas
|
2017-07-22 01:53:24 +03:00
|
|
|
|= des/(list delta)
|
|
|
|
%_(+> deltas (welp (flop des) deltas))
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-delta-our
|
2018-05-25 01:39:56 +03:00
|
|
|
:: adds a delta about this story.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-delta-our
|
2017-07-22 01:53:24 +03:00
|
|
|
|= det/delta-story
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-07-22 01:53:24 +03:00
|
|
|
(so-delta %story nom det)
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-deltas-our
|
2018-05-25 01:39:56 +03:00
|
|
|
:: adds multiple deltas about this story.
|
2017-07-21 02:57:53 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-deltas-our
|
2017-07-22 01:53:24 +03:00
|
|
|
|= des/(list delta-story)
|
2017-07-21 02:57:53 +03:00
|
|
|
^+ +>
|
|
|
|
%- so-deltas
|
2017-07-22 01:53:24 +03:00
|
|
|
%+ turn des
|
2017-07-21 02:57:53 +03:00
|
|
|
|= d/delta-story
|
|
|
|
[%story nom d]
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %data
|
|
|
|
:: #
|
|
|
|
:: utility functions for data retrieval.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
++ so-cir [our.bol nom] :: us as circle
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %interaction-events
|
|
|
|
:: #
|
|
|
|
:: arms that apply events we received.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-take
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply the prize as if it were rumors.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-take
|
2017-07-21 02:57:53 +03:00
|
|
|
|= {src/circle nes/(list envelope) 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)
|
|
|
|
=. +>.$
|
2017-10-08 16:20:02 +03:00
|
|
|
=+ los=~(tap by loc.pes)
|
|
|
|
|-
|
|
|
|
?~ los +>.^$
|
|
|
|
=. +>.^$
|
|
|
|
(so-hear | src %status src p.i.los %full q.i.los)
|
|
|
|
$(los t.los)
|
|
|
|
::TODO ideally you'd just do this, but that runtime errors...
|
|
|
|
::%- ~(rep in loc.pes)
|
|
|
|
::|= {{w/ship s/status} _+>.$}
|
|
|
|
::(so-hear | src %status src w %full s)
|
2017-07-21 02:57:53 +03:00
|
|
|
(so-unpack src nes)
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-hear
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply changes from a rumor to this story.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-hear
|
2017-07-22 01:53:24 +03:00
|
|
|
|= {bur/? src/circle rum/rumor-story}
|
2017-10-06 14:29:15 +03:00
|
|
|
::TODO tall-form gate comments like this for everything?
|
2018-05-25 01:39:56 +03:00
|
|
|
::|= $: :: bur: whether the story is inherited
|
|
|
|
:: :: src: story to change
|
|
|
|
:: :: rum: change to this story
|
2017-10-06 14:29:15 +03:00
|
|
|
:: ::
|
|
|
|
:: bur/?
|
|
|
|
:: src/circle
|
|
|
|
:: rum/rumor-story
|
|
|
|
:: ==
|
2017-06-13 01:19:45 +03:00
|
|
|
^+ +>
|
2017-07-22 01:53:24 +03:00
|
|
|
?- -.rum
|
2017-10-09 12:57:36 +03:00
|
|
|
$bear (so-bear bur.rum)
|
2017-11-17 22:09:40 +03:00
|
|
|
$peer (so-delta-our rum)
|
2017-07-22 01:53:24 +03:00
|
|
|
$gram (so-open src nev.rum)
|
2018-02-19 22:55:00 +03:00
|
|
|
$remove ::TODO should also remove from {remotes}?
|
|
|
|
(so-delta-our %config src %remove ~)
|
2017-12-09 19:45:43 +03:00
|
|
|
::
|
|
|
|
$new
|
|
|
|
?: =(src so-cir)
|
|
|
|
(so-config-full ~ cof.rum)
|
|
|
|
$(rum [%config src %full cof.rum])
|
|
|
|
::
|
|
|
|
$config
|
|
|
|
:: we only subscribe to remotes' configs.
|
|
|
|
?. =(src cir.rum)
|
|
|
|
~! %unexpected-remote-config-from-remote
|
|
|
|
!!
|
|
|
|
=/ old/(unit config)
|
|
|
|
?: =(cir.rum so-cir) `shape
|
|
|
|
(~(get by mirrors) cir.rum)
|
|
|
|
:: ignore if it won't result in change.
|
|
|
|
?. ?| &(?=($remove -.dif.rum) ?=(^ old))
|
2018-03-19 07:18:20 +03:00
|
|
|
?=(~ old)
|
2017-12-09 19:45:43 +03:00
|
|
|
!=(u.old (change-config u.old dif.rum))
|
|
|
|
==
|
|
|
|
+>.$
|
|
|
|
:: full changes to us need to get split up.
|
|
|
|
?: &(=(cir.rum so-cir) ?=($full -.dif.rum))
|
|
|
|
(so-config-full `shape cof.dif.rum)
|
|
|
|
(so-delta-our rum)
|
|
|
|
::
|
|
|
|
$status
|
|
|
|
:: we only subscribe to remotes' locals.
|
|
|
|
?. |(=(src cir.rum) =(src so-cir))
|
|
|
|
~! %unexpected-remote-status-from-remote
|
|
|
|
!!
|
|
|
|
=/ old/(unit status)
|
|
|
|
?: =(cir.rum so-cir) (~(get by locals) who.rum)
|
|
|
|
=- (~(get by -) who.rum)
|
|
|
|
(fall (~(get by remotes) cir.rum) *group)
|
|
|
|
:: ignore if it won't result in change.
|
|
|
|
?. ?| &(?=($remove -.dif.rum) ?=(^ old))
|
2018-03-19 07:18:20 +03:00
|
|
|
?=(~ old)
|
2017-12-09 19:45:43 +03:00
|
|
|
!=(u.old (change-status u.old dif.rum))
|
|
|
|
==
|
|
|
|
+>.$
|
|
|
|
(so-delta-our rum)
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-bear
|
2018-05-25 01:39:56 +03:00
|
|
|
:: accept burden
|
|
|
|
::
|
|
|
|
:: 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
|
|
|
::
|
2018-04-25 16:50:04 +03:00
|
|
|
::NOTE we don't use ++roll here because of urbit/arvo#447.
|
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-bear
|
2017-06-14 03:28:16 +03:00
|
|
|
|= {gaz/(list telegram) cos/lobby pes/crowd}
|
|
|
|
^+ +>
|
2017-07-07 00:45:38 +03:00
|
|
|
=* self +>
|
2018-04-25 16:50:04 +03:00
|
|
|
::
|
2017-06-14 03:28:16 +03:00
|
|
|
:: local config
|
2017-07-07 00:45:38 +03:00
|
|
|
=. self
|
2017-06-14 03:28:16 +03:00
|
|
|
(so-config-full `shape loc.cos)
|
2018-04-25 16:50:04 +03:00
|
|
|
::
|
2017-06-14 03:28:16 +03:00
|
|
|
:: remote config
|
2017-07-07 00:45:38 +03:00
|
|
|
=. self
|
2017-11-09 20:25:26 +03:00
|
|
|
=+ rem=~(tap by rem.cos)
|
|
|
|
|- ^+ self
|
|
|
|
?~ rem self
|
2018-04-25 16:50:04 +03:00
|
|
|
=* wer p.i.rem
|
|
|
|
=* cof q.i.rem
|
|
|
|
:: only make a delta if it actually changed.
|
|
|
|
=? self !=(`cof (~(get by mirrors) wer))
|
|
|
|
(so-delta-our %config wer %full cof)
|
2017-11-09 20:25:26 +03:00
|
|
|
$(rem t.rem)
|
2018-04-25 16:50:04 +03:00
|
|
|
::
|
2017-07-18 00:41:57 +03:00
|
|
|
:: local status
|
2017-07-07 00:45:38 +03:00
|
|
|
=. self
|
2017-11-08 19:11:59 +03:00
|
|
|
=+ sas=~(tap by loc.pes)
|
|
|
|
|- ^+ self
|
|
|
|
?~ sas self
|
2018-04-25 16:50:04 +03:00
|
|
|
=* who p.i.sas
|
|
|
|
=* sat q.i.sas
|
|
|
|
:: only make a delta if it actually changed.
|
|
|
|
=? deltas !=(`sat (~(get by locals) who))
|
2017-11-08 19:11:59 +03:00
|
|
|
:_ deltas
|
|
|
|
:^ %story nom %status
|
2018-04-25 16:50:04 +03:00
|
|
|
[[our.bol nom] who %full sat]
|
2017-11-08 19:11:59 +03:00
|
|
|
$(sas t.sas)
|
2018-04-25 16:50:04 +03:00
|
|
|
::
|
2017-07-18 00:41:57 +03:00
|
|
|
:: remote status
|
2017-07-07 00:45:38 +03:00
|
|
|
=. self
|
2017-11-09 20:25:26 +03:00
|
|
|
=+ rem=~(tap by rem.pes)
|
|
|
|
|- ^+ self
|
|
|
|
?~ rem self
|
2018-04-25 16:50:04 +03:00
|
|
|
=* wer p.i.rem
|
|
|
|
=* gou q.i.rem
|
|
|
|
:: only make deltas if it actually changed.
|
|
|
|
=? deltas !=(`gou (~(get by remotes) wer))
|
2017-11-09 20:25:26 +03:00
|
|
|
%+ welp deltas
|
2018-04-25 16:50:04 +03:00
|
|
|
=+ gop=~(tap by gou)
|
|
|
|
=+ hav=(fall (~(get by remotes) wer) *group)
|
2017-11-09 20:25:26 +03:00
|
|
|
=| l/(list delta)
|
|
|
|
|- ^+ l
|
|
|
|
?~ gop l
|
2018-04-25 16:50:04 +03:00
|
|
|
=* who p.i.gop
|
|
|
|
=* sat q.i.gop
|
|
|
|
:: only make a delta if it actually changed.
|
|
|
|
=? l !=(`sat (~(get by hav) who))
|
|
|
|
[[%story nom %status wer who %full sat] l]
|
2017-11-09 20:25:26 +03:00
|
|
|
$(gop t.gop)
|
|
|
|
$(rem t.rem)
|
2018-04-25 16:50:04 +03:00
|
|
|
::
|
2017-06-14 03:28:16 +03:00
|
|
|
:: telegrams
|
2017-07-07 00:45:38 +03:00
|
|
|
=. self
|
2017-11-08 19:11:59 +03:00
|
|
|
%_ self
|
|
|
|
deltas
|
|
|
|
%+ welp deltas
|
|
|
|
%- flop
|
2018-04-25 16:50:04 +03:00
|
|
|
^- (list delta)
|
|
|
|
%+ murn gaz
|
2017-11-08 19:11:59 +03:00
|
|
|
|= t/telegram
|
2018-04-25 16:50:04 +03:00
|
|
|
^- (unit delta)
|
|
|
|
:: in audience, replace above with us.
|
|
|
|
::TODO this really should be done by the sender.
|
|
|
|
=. aud.t
|
2018-10-15 09:23:34 +03:00
|
|
|
=+ dem=[(above [our now our]:bol) nom]
|
2018-04-25 16:50:04 +03:00
|
|
|
?. (~(has in aud.t) dem) aud.t
|
|
|
|
=+ (~(del in aud.t) dem)
|
|
|
|
(~(put in -) so-cir)
|
|
|
|
=+ num=(~(get by known) uid.t)
|
|
|
|
?: &(?=(^ num) =(t (snag u.num grams))) ~
|
2017-11-20 22:48:54 +03:00
|
|
|
::TODO this really should have sent us the message
|
|
|
|
:: src as well but that's not an easy fix.
|
2018-10-15 09:23:34 +03:00
|
|
|
`[%story nom %gram [(above [our now our]:bol) nom] t]
|
2017-11-08 19:11:59 +03:00
|
|
|
==
|
2017-07-11 04:41:50 +03:00
|
|
|
:: inherited flag
|
2017-11-08 19:11:59 +03:00
|
|
|
%_(self deltas [[%story nom %inherited &] deltas])
|
|
|
|
::TODO runtime error
|
|
|
|
::(so-delta-our %inherited &)
|
2017-06-14 03:28:16 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %changes
|
|
|
|
:: #
|
|
|
|
:: arms that make miscellaneous changes to this story.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-present
|
2018-05-25 01:39:56 +03:00
|
|
|
:: accept status diff
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-present
|
2017-12-09 19:19:23 +03:00
|
|
|
|= {who/ship dif/diff-status}
|
|
|
|
^+ +>
|
|
|
|
:: only have presence if you have write permission.
|
|
|
|
?. |((so-admire who) ?=($remove -.dif)) +>
|
2017-12-19 16:43:49 +03:00
|
|
|
:: ignore if it won't result in change,
|
|
|
|
:: or if it sets an impersonating handle.
|
2017-12-09 19:19:23 +03:00
|
|
|
?. ?: ?=($remove -.dif) (~(has by locals) who)
|
|
|
|
?| !(~(has by locals) who)
|
|
|
|
::
|
2017-12-19 16:43:49 +03:00
|
|
|
=+ old=(~(got by locals) who)
|
|
|
|
=+ new=(change-status - dif)
|
|
|
|
?& !=(old new)
|
|
|
|
::
|
2018-03-19 07:18:20 +03:00
|
|
|
?= ~
|
2017-12-19 16:43:49 +03:00
|
|
|
(rush (fall han.man.new '') ;~(pfix sig fed:ag))
|
2018-01-03 23:10:47 +03:00
|
|
|
::TODO calling with %+ gives syntax error
|
2017-12-19 16:43:49 +03:00
|
|
|
==
|
2017-12-09 19:19:23 +03:00
|
|
|
==
|
|
|
|
+>
|
|
|
|
(so-delta-our %status so-cir who dif)
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-config-full
|
2018-05-25 01:39:56 +03:00
|
|
|
:: split full config
|
|
|
|
::
|
|
|
|
:: split a %full config delta up into multiple
|
|
|
|
:: smaller ones, for easier application.
|
2017-06-22 03:16:22 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-config-full
|
2017-06-22 03:16:22 +03:00
|
|
|
|= {old/(unit config) cof/config}
|
|
|
|
^+ +>
|
2017-11-01 22:24:11 +03:00
|
|
|
~? &(?=(^ old) !=(src.u.old src.cof))
|
|
|
|
%maybe-missing-src-changes
|
2017-06-22 03:16:22 +03:00
|
|
|
%- so-deltas
|
2018-04-25 16:50:04 +03:00
|
|
|
=- %+ turn -
|
|
|
|
|= d/diff-config
|
|
|
|
[%story nom [%config so-cir d]]
|
|
|
|
^- (list diff-config)
|
|
|
|
::TODO figure out how to deal with src changes here.
|
|
|
|
:: %follow will probably behave a bit iffy in some cases.
|
|
|
|
?~ old
|
|
|
|
:: if we have no previous config, all diffs apply.
|
|
|
|
:~ [%caption cap.cof]
|
|
|
|
[%usage & tag.cof]
|
|
|
|
[%filter fit.cof]
|
|
|
|
[%secure sec.con.cof]
|
|
|
|
[%permit & sis.con.cof]
|
2018-06-19 02:23:36 +03:00
|
|
|
[%read red.cof]
|
2017-06-22 03:16:22 +03:00
|
|
|
==
|
2018-04-25 16:50:04 +03:00
|
|
|
=- (murn - same)
|
|
|
|
^- (list (unit diff-config))
|
|
|
|
=* col u.old
|
|
|
|
:: if we have previous config, figure out the changes.
|
|
|
|
:~ ?: =(cap.col cap.cof) ~
|
|
|
|
`[%caption cap.cof]
|
|
|
|
::
|
|
|
|
=+ gon=(~(dif in tag.col) tag.cof)
|
|
|
|
?~ gon ~
|
|
|
|
`[%usage | gon]
|
|
|
|
::
|
|
|
|
=+ new=(~(dif in tag.cof) tag.col)
|
|
|
|
?~ new ~
|
|
|
|
`[%usage & new]
|
|
|
|
::
|
|
|
|
?: =(fit.col fit.cof) ~
|
|
|
|
`[%filter fit.cof]
|
|
|
|
::
|
|
|
|
?: =(sec.con.col sec.con.cof) ~
|
|
|
|
`[%secure sec.con.cof]
|
|
|
|
::
|
|
|
|
=+ gon=(~(dif in sis.con.col) sis.con.cof)
|
|
|
|
?~ gon ~
|
|
|
|
`[%permit | gon]
|
|
|
|
::
|
|
|
|
=+ new=(~(dif in sis.con.cof) sis.con.col)
|
|
|
|
?~ new ~
|
|
|
|
`[%permit & new]
|
|
|
|
==
|
2017-06-22 03:16:22 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-sources
|
2018-05-25 01:39:56 +03:00
|
|
|
:: change source
|
|
|
|
::
|
|
|
|
:: adds or removes {srs} from our sources,
|
|
|
|
:: skipping over ones we already (don't) have.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-sources
|
2017-10-09 23:50:17 +03:00
|
|
|
|= {add/? srs/(set source)}
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-10-09 23:50:17 +03:00
|
|
|
=/ sus/(set source)
|
|
|
|
%. src.shape
|
|
|
|
?:(add ~(dif in srs) ~(int in srs))
|
2017-10-10 16:59:15 +03:00
|
|
|
:: we only make a delta for removals here,
|
|
|
|
:: because we don't need to wait for ++reap when
|
|
|
|
:: pulling subscriptions.
|
|
|
|
=? +>.$ !add
|
|
|
|
=+ sos=~(tap in sus)
|
|
|
|
|- ^+ +>.^$
|
|
|
|
?~ sos +>.^$
|
|
|
|
=. +>.^$ (so-delta-our %config so-cir %source | i.sos)
|
|
|
|
$(sos t.sos)
|
|
|
|
::TODO ideally below, but unexplained runtime error at `so-delta-our`
|
|
|
|
::%+ roll ~(tap in sus)
|
|
|
|
::|= {src/source _+>.$}
|
|
|
|
::^+ +>.^$
|
|
|
|
::(so-delta-our %config so-cir %source | src)
|
2017-10-09 23:50:17 +03:00
|
|
|
?~ sus +>.$
|
2017-10-10 16:59:15 +03:00
|
|
|
(so-delta-our %follow add sus)
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-depict
|
2018-05-25 01:39:56 +03:00
|
|
|
:: change description
|
|
|
|
::
|
|
|
|
:: modifies our caption.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-depict
|
2017-05-13 01:05:49 +03:00
|
|
|
|= cap/cord
|
|
|
|
^+ +>
|
|
|
|
?: =(cap cap.shape) +>
|
|
|
|
(so-delta-our %config so-cir %caption cap)
|
|
|
|
::
|
2018-02-14 18:54:51 +03:00
|
|
|
++ so-usage
|
2018-05-25 01:39:56 +03:00
|
|
|
:: add or remove usage tags.
|
2018-02-14 18:54:51 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-usage
|
2018-02-14 18:54:51 +03:00
|
|
|
|= {add/? tas/tags}
|
|
|
|
^+ +>
|
|
|
|
=/ sas/tags
|
|
|
|
%. tag.shape
|
|
|
|
?:(add ~(dif in tas) ~(int in tas))
|
|
|
|
?~ sas +>.$
|
|
|
|
(so-delta-our %config so-cir %usage add sas)
|
|
|
|
::
|
2018-06-19 02:23:36 +03:00
|
|
|
++ so-read
|
2018-08-20 23:14:13 +03:00
|
|
|
:: set the read message number in circle config
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-read
|
2018-06-19 02:23:36 +03:00
|
|
|
|= {red/@ud}
|
|
|
|
^+ +>
|
|
|
|
?: =(red red.shape) +>
|
|
|
|
(so-delta-our %config so-cir %read red)
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-filter
|
2018-05-25 01:39:56 +03:00
|
|
|
:: change message rules
|
|
|
|
::
|
|
|
|
:: modifies our filter.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-filter
|
2017-05-13 01:05:49 +03:00
|
|
|
|= fit/filter
|
|
|
|
^+ +>
|
|
|
|
?: =(fit fit.shape) +>
|
|
|
|
(so-delta-our %config so-cir %filter fit)
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-delete
|
2018-05-25 01:39:56 +03:00
|
|
|
:: delete story
|
|
|
|
::
|
|
|
|
:: deletes this story. removes it from {stories}
|
|
|
|
:: 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
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %subscriptions
|
|
|
|
:: #
|
|
|
|
:: arms for starting and ending subscriptions
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-greet
|
2018-05-25 01:39:56 +03:00
|
|
|
:: subscription started
|
|
|
|
::
|
|
|
|
:: store a started subscription as source.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-greet
|
2017-10-09 23:50:17 +03:00
|
|
|
|= src/source
|
2017-06-13 01:19:45 +03:00
|
|
|
^+ +>
|
2017-10-09 23:50:17 +03:00
|
|
|
?: (~(has in src.shape) src) +>
|
|
|
|
(so-delta-our %config so-cir %source & src)
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-leave
|
2018-05-25 01:39:56 +03:00
|
|
|
:: subscription ended
|
|
|
|
::
|
|
|
|
:: delete {src} from our sources.
|
2017-10-09 23:50:17 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-leave
|
2017-10-09 23:50:17 +03:00
|
|
|
|= src/source
|
|
|
|
^+ +>
|
|
|
|
?. (~(has in src.shape) src) +>
|
|
|
|
(so-delta-our %config so-cir %source | src)
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-resub
|
2018-05-25 01:39:56 +03:00
|
|
|
:: subscription revived
|
|
|
|
::
|
|
|
|
:: re-subscribe to a dropped subscription.
|
|
|
|
:: if it was already active, we continue where
|
|
|
|
:: we left off.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-resub
|
2017-10-09 23:50:17 +03:00
|
|
|
|= src/source
|
2017-04-21 00:59:36 +03:00
|
|
|
^+ +>
|
2017-11-17 20:41:08 +03:00
|
|
|
=+ seq=(~(get by sequence) cir.src)
|
2017-12-14 02:11:46 +03:00
|
|
|
=/ ner/range
|
|
|
|
?~ seq ran.src
|
|
|
|
=- `[[%ud u.seq] -]
|
|
|
|
?~ ran.src ~
|
|
|
|
tal.u.ran.src
|
|
|
|
:: if our subscription changes or ends, remove
|
|
|
|
:: the original source.
|
|
|
|
=? +>.$ !=(ner ran.src)
|
|
|
|
(so-delta-our %config so-cir %source | src)
|
2017-11-17 20:41:08 +03:00
|
|
|
:: if we're past the range, don't resubscribe.
|
|
|
|
?: ?& ?=(^ ran.src)
|
|
|
|
?=(^ tal.u.ran.src)
|
|
|
|
::
|
|
|
|
?- -.u.tal.u.ran.src
|
2018-03-07 03:13:20 +03:00
|
|
|
$sd &
|
2017-11-17 20:41:08 +03:00
|
|
|
$da (gte now.bol +.u.tal.u.ran.src)
|
|
|
|
$ud ?& ?=(^ seq)
|
|
|
|
(gte u.seq +.u.tal.u.ran.src)
|
|
|
|
==
|
|
|
|
==
|
|
|
|
==
|
2017-12-14 02:11:46 +03:00
|
|
|
+>.$
|
|
|
|
(so-delta-our %follow & [[cir.src -] ~ ~])
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-first-grams
|
2018-05-25 01:39:56 +03:00
|
|
|
:: beginning of stream
|
|
|
|
::
|
|
|
|
:: find all grams that fall within the range.
|
2017-06-27 02:56:03 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-first-grams
|
2017-06-27 02:56:03 +03:00
|
|
|
|= ran/range
|
|
|
|
^- (list telegram)
|
|
|
|
=+ [num=0 gaz=grams zeg=*(list telegram)]
|
2018-03-07 03:20:55 +03:00
|
|
|
:: fill in empty ranges to select all grams,
|
|
|
|
:: and calculate absolutes for relative places.
|
2017-06-27 02:56:03 +03:00
|
|
|
=. ran
|
|
|
|
?~ ran `[[%ud 0] `[%ud count]]
|
2018-03-07 03:13:20 +03:00
|
|
|
=* hed hed.u.ran
|
2018-03-07 03:13:20 +03:00
|
|
|
=? hed ?=($sd -.hed)
|
|
|
|
[%ud (sub count (min count (abs:si +.hed)))]
|
2018-03-07 03:13:20 +03:00
|
|
|
?~ tal.u.ran `[hed `[%ud count]]
|
|
|
|
=* tal u.tal.u.ran
|
2018-03-07 03:13:20 +03:00
|
|
|
=? tal ?=($sd -.tal)
|
|
|
|
[%ud (sub count (min count (abs:si +.tal)))]
|
2017-06-27 02:56:03 +03:00
|
|
|
ran
|
|
|
|
:: never fails, but compiler needs it.
|
|
|
|
?> &(?=(^ ran) ?=(^ tal.u.ran))
|
2018-03-07 03:20:55 +03:00
|
|
|
=* hed hed.u.ran
|
|
|
|
=* tal u.tal.u.ran
|
2017-06-27 02:56:03 +03:00
|
|
|
%- flop
|
|
|
|
|- ^- (list telegram)
|
|
|
|
?~ gaz zeg
|
2018-03-07 03:13:20 +03:00
|
|
|
?: ?- -.u.tal.u.ran :: after the end
|
|
|
|
$ud (lth +.u.tal.u.ran num)
|
|
|
|
$da (lth +.u.tal.u.ran wen.i.gaz)
|
2018-03-07 03:20:55 +03:00
|
|
|
$sd !! :: caught above
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
2018-03-07 03:20:55 +03:00
|
|
|
:: if past the range, we're done searching.
|
2017-06-27 02:56:03 +03:00
|
|
|
zeg
|
2018-03-07 03:13:20 +03:00
|
|
|
?: ?- -.hed.u.ran :: before the start
|
|
|
|
$ud (lth num +.hed.u.ran)
|
|
|
|
$da (lth wen.i.gaz +.hed.u.ran)
|
2018-03-07 03:20:55 +03:00
|
|
|
$sd !! :: caught above
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
2018-03-07 03:20:55 +03:00
|
|
|
:: if before the range, continue onward.
|
2017-06-27 02:56:03 +03:00
|
|
|
$(num +(num), gaz t.gaz)
|
2018-03-07 03:20:55 +03:00
|
|
|
:: if in the range, add this gram and continue.
|
2017-06-27 02:56:03 +03:00
|
|
|
$(num +(num), gaz t.gaz, zeg [i.gaz zeg])
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-in-range
|
2018-05-25 01:39:56 +03:00
|
|
|
:: place in range?
|
|
|
|
::
|
|
|
|
:: produces two booleans: whether we're
|
|
|
|
:: currently in the range, and whether the range
|
|
|
|
:: has passed.
|
2017-07-19 03:22:45 +03:00
|
|
|
::TODO to deal with changed messages, we'll want
|
|
|
|
:: to be able to pass in a num.
|
2017-06-27 02:56:03 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-in-range
|
2017-06-27 02:56:03 +03:00
|
|
|
|= ran/range
|
|
|
|
^- {in/? done/?}
|
|
|
|
?~ ran [& |]
|
|
|
|
=/ min
|
2018-03-07 03:13:20 +03:00
|
|
|
?- -.hed.u.ran
|
2018-03-07 03:20:55 +03:00
|
|
|
$sd & :: relative is always in.
|
2018-03-07 03:13:20 +03:00
|
|
|
$ud (gth count +.hed.u.ran)
|
|
|
|
$da (gth now.bol +.hed.u.ran)
|
2017-06-27 02:56:03 +03:00
|
|
|
==
|
|
|
|
?~ tal.u.ran
|
|
|
|
[min |]
|
|
|
|
=- [&(min -) !-]
|
2018-03-07 03:13:20 +03:00
|
|
|
?- -.u.tal.u.ran
|
2018-03-07 03:20:55 +03:00
|
|
|
$sd | :: relative is always done.
|
2018-03-07 03:13:20 +03:00
|
|
|
$ud (gte +(+.u.tal.u.ran) count)
|
|
|
|
$da (gte +.u.tal.u.ran now.bol)
|
2017-06-27 02:56:03 +03:00
|
|
|
==
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %messaging
|
|
|
|
:: #
|
|
|
|
:: arms for adding to this story's messages.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-sane
|
2018-05-25 01:39:56 +03:00
|
|
|
:: sanitize %lin speech according to our settings.
|
2017-05-09 22:43:42 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-sane
|
2017-07-11 03:23:12 +03:00
|
|
|
|= sep/speech
|
|
|
|
^- speech
|
2017-12-11 21:41:48 +03:00
|
|
|
?+ -.sep sep
|
|
|
|
?($ire $fat $app)
|
|
|
|
sep(sep $(sep sep.sep))
|
|
|
|
::
|
|
|
|
$lin
|
|
|
|
=- sep(msg -)
|
2017-05-09 22:43:42 +03:00
|
|
|
%- crip
|
|
|
|
%- tufa
|
2017-07-11 03:23:12 +03:00
|
|
|
%+ turn (tuba (trip msg.sep))
|
2017-05-09 22:43:42 +03:00
|
|
|
|= 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-12-11 06:56:58 +03:00
|
|
|
++ so-unpack
|
2018-05-25 01:39:56 +03:00
|
|
|
:: process envelopes
|
|
|
|
::
|
|
|
|
:: learn telegrams from list of envelopes and
|
|
|
|
:: update the sequence of the source if needed.
|
2017-07-21 02:57:53 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-unpack
|
2017-07-21 02:57:53 +03:00
|
|
|
|= {src/circle nes/(list envelope)}
|
|
|
|
^+ +>
|
2017-11-20 22:48:54 +03:00
|
|
|
=. +> (so-lesson src (turn nes tail))
|
2017-07-21 02:57:53 +03:00
|
|
|
=/ num
|
|
|
|
%+ roll nes
|
|
|
|
|= {nev/envelope max/@ud}
|
|
|
|
?:((gth num.nev max) num.nev max)
|
|
|
|
?. (gth num (fall (~(get by sequence) src) 0))
|
|
|
|
+>.$
|
|
|
|
(so-delta-our %sequent src num)
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-open
|
2018-05-25 01:39:56 +03:00
|
|
|
:: process envelope
|
|
|
|
::
|
|
|
|
:: learn telegram from envelope and update the
|
|
|
|
:: sequence of the source if needed.
|
2017-07-20 01:32:07 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-open
|
2017-07-20 01:32:07 +03:00
|
|
|
|= {src/circle nev/envelope}
|
|
|
|
^+ +>
|
2017-11-20 22:48:54 +03:00
|
|
|
=. +> (so-learn src gam.nev)
|
2017-07-21 02:57:53 +03:00
|
|
|
?. (gth num.nev (fall (~(get by sequence) src) 0))
|
|
|
|
+>
|
|
|
|
(so-delta-our %sequent src num.nev)
|
2017-07-20 01:32:07 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-lesson
|
2018-05-25 01:39:56 +03:00
|
|
|
:: learn all telegrams in a list.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-lesson
|
2017-11-20 22:48:54 +03:00
|
|
|
|= {src/circle gaz/(list telegram)}
|
2017-03-23 03:34:56 +03:00
|
|
|
^+ +>
|
|
|
|
?~ gaz +>
|
2017-11-20 22:48:54 +03:00
|
|
|
$(gaz t.gaz, +> (so-learn src i.gaz))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-learn
|
2018-05-25 01:39:56 +03:00
|
|
|
:: save/update message
|
|
|
|
::
|
|
|
|
:: store an incoming telegram, updating if it
|
|
|
|
:: already exists.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-learn
|
2017-11-20 22:48:54 +03:00
|
|
|
|= {src/circle gam/telegram}
|
2017-03-23 03:34:56 +03:00
|
|
|
^+ +>
|
2017-05-09 22:43:42 +03:00
|
|
|
:: check for write permissions.
|
2017-12-14 02:07:35 +03:00
|
|
|
::TODO we want to !! instead of silently failing,
|
|
|
|
:: so that ++coup-repeat of the caller gets
|
|
|
|
:: an error. but the caller may not be the
|
|
|
|
:: author. if we check for that to be true,
|
|
|
|
:: can we guarantee it's not an older message
|
|
|
|
:: getting resent? does that matter? think.
|
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.
|
2017-07-11 03:23:12 +03:00
|
|
|
=. sep.gam (so-sane sep.gam)
|
2018-06-06 03:11:06 +03:00
|
|
|
::
|
2018-09-06 02:42:59 +03:00
|
|
|
=. gam (filter-gram gam bol)
|
2017-12-11 20:28:40 +03:00
|
|
|
:: if we already have it, ignore.
|
|
|
|
=+ old=(~(get by known) uid.gam)
|
|
|
|
?. &(?=(^ old) =(gam (snag u.old grams)))
|
|
|
|
(so-delta-our %gram src gam)
|
|
|
|
=+ sed=(~(get by sourced) src)
|
2018-03-19 07:18:20 +03:00
|
|
|
?: |(?=(~ sed) ?=(~ (find [u.old]~ u.sed)))
|
2017-12-11 20:28:40 +03:00
|
|
|
(so-delta-our %sourced src u.old)
|
|
|
|
+>.$
|
2017-04-10 23:35:25 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %permissions
|
|
|
|
:: #
|
|
|
|
:: arms relating to story permissions.
|
2017-04-14 17:41:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-permit
|
2018-05-25 01:39:56 +03:00
|
|
|
:: invite/banish
|
|
|
|
::
|
|
|
|
:: update config to dis/allow ships permission.
|
2017-04-10 23:35:25 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-permit
|
2017-04-10 23:35:25 +03:00
|
|
|
|= {inv/? sis/(set ship)}
|
|
|
|
^+ +>
|
2018-05-25 01:39:56 +03:00
|
|
|
:: wyt: whitelist?
|
|
|
|
:: add: add to list?
|
2017-10-31 21:56:56 +03:00
|
|
|
=/ wyt/? ?=(?($village $journal) 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)
|
2017-10-31 21:56:56 +03:00
|
|
|
%. sis.con.shape
|
2017-06-14 06:09:48 +03:00
|
|
|
?:(add ~(dif in sis) ~(int in sis))
|
2017-11-22 22:56:04 +03:00
|
|
|
?~ sus +>.$
|
2017-11-23 01:23:16 +03:00
|
|
|
:: if banished, remove their presences.
|
|
|
|
=? +>.$ !inv
|
|
|
|
%- so-deltas-our
|
|
|
|
%+ turn ~(tap in `(set ship)`sus)
|
|
|
|
|= s/ship
|
|
|
|
:+ %status so-cir
|
|
|
|
[s %remove ~]
|
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
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-admire
|
2018-05-25 01:39:56 +03:00
|
|
|
:: accept from
|
|
|
|
::
|
|
|
|
:: checks {her} write permissions.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-admire
|
2017-04-21 00:59:36 +03:00
|
|
|
|= her/ship
|
|
|
|
^- ?
|
2017-04-24 21:17:56 +03:00
|
|
|
?- sec.con.shape
|
2018-05-25 01:39:56 +03:00
|
|
|
$channel !(~(has in sis.con.shape) her) :: blacklist
|
|
|
|
$village (~(has in sis.con.shape) her) :: whitelist
|
|
|
|
$journal (~(has in sis.con.shape) her) :: author whitelist
|
|
|
|
$mailbox !(~(has in sis.con.shape) her) :: author blacklist
|
2018-09-06 02:33:34 +03:00
|
|
|
$custom :: custom rule
|
|
|
|
=/ rul/$-({ship ?($r $w) bowl:gall} ?)
|
2018-09-05 02:23:24 +03:00
|
|
|
(fall (~(get by custom-rules) nom) |=(* |))
|
|
|
|
(rul her %w bol)
|
2017-04-21 00:59:36 +03:00
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ so-visible
|
2018-05-25 01:39:56 +03:00
|
|
|
:: checks {her} read permissions.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-so-visible
|
2017-04-21 00:59:36 +03:00
|
|
|
|= her/ship
|
|
|
|
^- ?
|
2017-04-24 21:17:56 +03:00
|
|
|
?- sec.con.shape
|
2018-05-25 01:39:56 +03:00
|
|
|
$channel !(~(has in sis.con.shape) her) :: blacklist
|
|
|
|
$village (~(has in sis.con.shape) her) :: whitelist
|
|
|
|
$journal & :: all
|
|
|
|
$mailbox (team:title our.bol her) :: our team
|
2018-09-06 02:33:34 +03:00
|
|
|
$custom :: custom rule
|
|
|
|
=/ rul/$-({ship ?($r $w) bowl:gall} ?)
|
2018-09-05 02:23:24 +03:00
|
|
|
(fall (~(get by custom-rules) nom) |=(* |))
|
|
|
|
(rul her %r bol)
|
2017-04-21 00:59:36 +03:00
|
|
|
==
|
2017-03-23 03:34:56 +03:00
|
|
|
--
|
|
|
|
--
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da
|
2018-05-25 01:39:56 +03:00
|
|
|
:: delta application
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: 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.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da
|
2018-05-25 01:39:56 +03:00
|
|
|
|_ :: moves: moves created by core operations.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
moves/(list move)
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %resolve
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-done
|
2018-05-25 01:39:56 +03:00
|
|
|
:: 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}.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-05-13 01:05:49 +03:00
|
|
|
[(flop moves) +>]
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %emitters
|
|
|
|
:: #
|
|
|
|
:: arms that create outward changes.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-emil
|
2018-05-25 01:39:56 +03:00
|
|
|
:: emit move list
|
|
|
|
::
|
|
|
|
:: adds multiple moves to the head of {moves}.
|
|
|
|
:: flops to stay consistent with ++ta-emit.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-emil
|
2017-05-13 01:05:49 +03:00
|
|
|
|= mol/(list move)
|
|
|
|
%_(+> moves (welp (flop mol) moves))
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-emit
|
2018-05-25 01:39:56 +03:00
|
|
|
:: emit a move
|
|
|
|
::
|
|
|
|
:: adds a move to the head of {moves}.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-emit
|
2017-05-13 01:05:49 +03:00
|
|
|
|= mov/move
|
|
|
|
%_(+> moves [mov moves])
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-present
|
2018-05-25 01:39:56 +03:00
|
|
|
:: send %present cmd
|
2017-06-28 02:45:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-present
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {hos/ship nos/(set name) dif/diff-status}
|
2017-06-28 02:45:56 +03:00
|
|
|
^+ +>
|
|
|
|
%- da-emit
|
|
|
|
:* ost.bol
|
|
|
|
%poke
|
|
|
|
/present
|
2017-10-05 20:18:22 +03:00
|
|
|
[hos dap.bol]
|
2017-11-08 00:05:52 +03:00
|
|
|
[%hall-command %present nos dif]
|
2017-06-28 02:45:56 +03:00
|
|
|
==
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %change-application
|
|
|
|
:: #
|
|
|
|
:: arms that change the application state.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-change
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply delta
|
|
|
|
::
|
|
|
|
:: modifies application state according to the
|
|
|
|
:: change specified in {dif}.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-change
|
2017-07-22 01:53:24 +03:00
|
|
|
|= det/delta
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-07-22 01:53:24 +03:00
|
|
|
?- -.det
|
2017-11-03 23:36:42 +03:00
|
|
|
$public (da-change-public +.det)
|
2017-07-22 01:53:24 +03:00
|
|
|
$out (da-change-out +.det)
|
2017-08-03 07:43:56 +03:00
|
|
|
$done (da-change-done +.det)
|
2017-07-22 01:53:24 +03:00
|
|
|
$glyph (da-change-glyph +.det)
|
|
|
|
$nick (da-change-nick +.det)
|
|
|
|
$story (da-change-story +.det)
|
2017-06-28 02:45:56 +03:00
|
|
|
$init da-init
|
2017-07-22 01:53:24 +03:00
|
|
|
$observe (da-observe +.det)
|
|
|
|
$present (da-present +.det)
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-init
|
2018-05-25 01:39:56 +03:00
|
|
|
:: startup side-effects
|
|
|
|
::
|
|
|
|
:: apply %init delta, querying the /burden of the
|
|
|
|
:: ship above us.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2017-11-17 20:41:08 +03:00
|
|
|
(da-emit (wire-to-peer /burden))
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-observe
|
2018-05-25 01:39:56 +03:00
|
|
|
:: watch burden bearer
|
|
|
|
::
|
|
|
|
:: apply %observe delta, querying the /report of
|
|
|
|
:: {who} below us.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-observe
|
2017-06-13 01:19:45 +03:00
|
|
|
|= who/ship
|
2017-11-17 20:41:08 +03:00
|
|
|
(da-emit (wire-to-peer /report/(scot %p who)))
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-change-public
|
2018-05-25 01:39:56 +03:00
|
|
|
:: show/hide membership
|
|
|
|
::
|
|
|
|
:: add/remove a circle to/from the public
|
|
|
|
:: membership list.
|
2017-11-03 23:36:42 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-change-public
|
2017-11-03 23:36:42 +03:00
|
|
|
|= {add/? cir/circle}
|
|
|
|
^+ +>
|
|
|
|
=- +>.$(public -)
|
|
|
|
?: add (~(put in public) cir)
|
|
|
|
(~(del in public) cir)
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-change-out
|
2018-05-25 01:39:56 +03:00
|
|
|
:: outgoing messages
|
|
|
|
::
|
|
|
|
:: apply an %out delta, sending a message.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-change-out
|
2017-05-13 01:05:49 +03:00
|
|
|
|= {cir/circle out/(list thought)}
|
|
|
|
^+ +>
|
2017-08-03 07:43:56 +03:00
|
|
|
=+ ses=(turn out head)
|
|
|
|
=. outbox
|
|
|
|
:: for every serial, add %pending state.
|
|
|
|
%+ roll ses
|
|
|
|
|= {s/serial o/_outbox}
|
2018-03-19 07:18:20 +03:00
|
|
|
=? o ?=(~ o) outbox
|
2017-08-03 07:43:56 +03:00
|
|
|
=+ t=(fall (~(get by o) s) *tracking)
|
|
|
|
%+ ~(put by o) s
|
|
|
|
(~(put by t) cir %pending)
|
2017-07-07 06:01:08 +03:00
|
|
|
%+ da-emit ost.bol
|
|
|
|
:* %poke
|
2017-08-03 07:43:56 +03:00
|
|
|
/repeat/(scot %p hos.cir)/[nom.cir]/(scot %ud (jam ses))
|
2017-10-05 20:18:22 +03:00
|
|
|
[hos.cir dap.bol]
|
2017-11-08 00:05:52 +03:00
|
|
|
[%hall-command %publish out]
|
2017-06-13 01:19:45 +03:00
|
|
|
==
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-change-done
|
2018-05-25 01:39:56 +03:00
|
|
|
:: delivered messages
|
|
|
|
::
|
|
|
|
:: apply a %done delta, setting new delivery state
|
|
|
|
:: for messages.
|
2017-08-03 07:43:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-change-done
|
2017-08-03 07:43:56 +03:00
|
|
|
|= {cir/circle ses/(list serial) res/delivery}
|
|
|
|
^+ +>
|
|
|
|
%_ +>
|
|
|
|
outbox
|
|
|
|
:: for every serial, set new delivery state.
|
|
|
|
%- ~(gas by outbox)
|
|
|
|
%+ turn ses
|
|
|
|
|= s/serial
|
|
|
|
:- s
|
|
|
|
%+ ~(put by (~(got by outbox) s))
|
|
|
|
cir res
|
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-change-glyph
|
2018-05-25 01:39:56 +03:00
|
|
|
:: un/bound glyph
|
|
|
|
::
|
|
|
|
:: apply a %glyph delta, un/binding a glyph to/from
|
|
|
|
:: an audience.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-change-glyph
|
2017-10-19 03:05:53 +03:00
|
|
|
|= {bin/? gyf/char aud/audience}
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
|
|
|
?: bin
|
|
|
|
%_ +>
|
2017-10-19 03:05:53 +03:00
|
|
|
binds (~(put ju binds) gyf aud)
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
2017-10-19 03:05:53 +03:00
|
|
|
=/ ole/(list audience)
|
|
|
|
?. =(aud ~) [aud ~]
|
2017-10-06 20:35:25 +03:00
|
|
|
~(tap in (~(get ju binds) gyf))
|
2017-05-13 01:05:49 +03:00
|
|
|
|- ^+ +>.^$
|
|
|
|
?~ ole +>.^$
|
|
|
|
%_ $
|
2017-07-11 23:11:17 +03:00
|
|
|
binds (~(del ju binds) gyf i.ole)
|
2017-05-13 01:05:49 +03:00
|
|
|
ole t.ole
|
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-change-nick
|
2018-05-25 01:39:56 +03:00
|
|
|
:: changed nickname
|
|
|
|
::
|
|
|
|
:: apply a %nick delta, setting a nickname for a
|
|
|
|
:: ship.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-change-nick
|
2017-07-12 01:12:29 +03:00
|
|
|
|= {who/ship nic/nick}
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-06-22 03:16:22 +03:00
|
|
|
+>(nicks (change-nicks nicks who nic))
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %stories
|
|
|
|
:: #
|
|
|
|
:: arms for modifying stories.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-change-story
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply circle delta
|
|
|
|
::
|
|
|
|
:: 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
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-change-story
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name det/delta-story}
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-07-22 01:53:24 +03:00
|
|
|
?+ -.det
|
2017-06-14 04:49:45 +03:00
|
|
|
=< sa-done
|
2017-07-22 01:53:24 +03:00
|
|
|
%. det
|
2017-07-11 04:41:50 +03:00
|
|
|
=+ (fall (~(get by stories) nom) *story)
|
|
|
|
~(sa-change sa nom -)
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-07-22 01:53:24 +03:00
|
|
|
$new (da-create nom +.det)
|
2017-06-14 03:28:16 +03:00
|
|
|
$bear ~&(%unexpected-unsplit-bear +>)
|
2017-05-13 01:05:49 +03:00
|
|
|
$remove (da-delete nom)
|
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-create
|
2018-05-25 01:39:56 +03:00
|
|
|
:: configure story
|
|
|
|
::
|
|
|
|
:: creates story {nom} with config {con}.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-create
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name cof/config}
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
|
|
|
=< sa-done
|
2017-07-11 04:41:50 +03:00
|
|
|
%- ~(sa-change sa nom *story)
|
2017-06-13 01:19:45 +03:00
|
|
|
[%config [our.bol nom] %full cof]
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ da-delete
|
2018-05-25 01:39:56 +03:00
|
|
|
:: delete story
|
|
|
|
::
|
|
|
|
:: calls the story core to delete story {nom}.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-da-delete
|
2017-12-18 16:20:45 +03:00
|
|
|
|= nom/name
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
|
|
|
=. +>
|
|
|
|
%- da-emil
|
|
|
|
~(sa-delete sa nom (~(got by stories) nom))
|
|
|
|
+>(stories (~(del by stories) nom))
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa
|
2018-05-25 01:39:56 +03:00
|
|
|
:: story delta core
|
|
|
|
::
|
|
|
|
:: story core, used for doing work on a story.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa
|
2018-05-25 01:39:56 +03:00
|
|
|
|_ :: nom: story name in {stories}.
|
2017-12-11 06:56:58 +03:00
|
|
|
:: story is faceless to ease data access.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-18 16:20:45 +03:00
|
|
|
$: nom/name
|
2017-05-13 01:05:49 +03:00
|
|
|
story
|
|
|
|
==
|
2018-05-25 01:39:56 +03:00
|
|
|
:: # %resolve
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-done
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply changes
|
|
|
|
::
|
|
|
|
:: put changed story back into the map.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
|
|
|
+>(stories (~(put by stories) nom +<+))
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %emitters
|
|
|
|
:: #
|
|
|
|
:: arms that create outward changes.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-emil
|
2018-05-25 01:39:56 +03:00
|
|
|
:: emit move list
|
|
|
|
::
|
|
|
|
:: adds multiple moves to the head of {moves}.
|
|
|
|
:: flops to stay consistent with ++ta-emit.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-emil
|
2017-05-13 01:05:49 +03:00
|
|
|
|= mol/(list move)
|
|
|
|
%_(+> moves (welp (flop mol) moves))
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-emit
|
2018-05-25 01:39:56 +03:00
|
|
|
:: emit a move
|
|
|
|
::
|
|
|
|
:: adds a move to the head of {moves}.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-emit
|
2017-05-13 01:05:49 +03:00
|
|
|
|= mov/move
|
|
|
|
%_(+> moves [mov moves])
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-sauce
|
2018-05-25 01:39:56 +03:00
|
|
|
:: cards to moves.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-sauce
|
2017-05-13 01:05:49 +03:00
|
|
|
|= {ost/bone cub/(list card)}
|
|
|
|
^- (list move)
|
|
|
|
(flop (turn cub |=(a/card [ost a])))
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %data
|
|
|
|
:: #
|
|
|
|
:: utility functions for data retrieval.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
|
|
|
++ sa-cir [our.bol nom]
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %delta-application
|
|
|
|
:: #
|
|
|
|
:: arms for applying deltas.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-delete
|
2018-05-25 01:39:56 +03:00
|
|
|
:: deletion of story
|
|
|
|
::
|
|
|
|
:: apply a %remove story delta, unsubscribing
|
|
|
|
:: this story from all its active sources.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-11-24 02:43:16 +03:00
|
|
|
%+ weld
|
|
|
|
(sa-abjure src.shape)
|
|
|
|
(sa-eject ~(key by peers))
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-change
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply circle delta
|
|
|
|
::
|
|
|
|
:: figure out whether to apply a %story delta to
|
|
|
|
:: local or remote data.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-change
|
2017-07-22 01:53:24 +03:00
|
|
|
|= det/delta-story
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-07-22 01:53:24 +03:00
|
|
|
%. det
|
|
|
|
?: ?& ?=(?($config $status) -.det)
|
|
|
|
!=(cir.det sa-cir)
|
2017-07-11 02:41:47 +03:00
|
|
|
==
|
2017-05-13 01:05:49 +03:00
|
|
|
sa-change-remote
|
2017-07-11 02:41:47 +03:00
|
|
|
sa-change-local
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-change-local
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply our delta
|
|
|
|
::
|
|
|
|
:: apply a %story delta to local data.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-change-local
|
2017-07-22 01:53:24 +03:00
|
|
|
|= det/delta-story
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-07-22 01:53:24 +03:00
|
|
|
?+ -.det
|
|
|
|
~&([%unexpected-delta-local -.det] !!)
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-07-11 04:41:50 +03:00
|
|
|
$inherited
|
2017-07-22 01:53:24 +03:00
|
|
|
+>(inherited ihr.det)
|
2017-11-17 22:09:40 +03:00
|
|
|
::
|
|
|
|
$peer
|
|
|
|
?: add.det
|
|
|
|
+>(peers (~(add ja peers) who.det qer.det))
|
|
|
|
=+ qes=(~(get ja peers) who.det)
|
|
|
|
=. qes
|
|
|
|
=+ res=(find ~[qer.det] qes)
|
|
|
|
?~ res qes
|
|
|
|
(oust [u.res 1] qes)
|
|
|
|
?~ qes +>.$(peers (~(del by peers) who.det))
|
|
|
|
+>.$(peers (~(put in peers) who.det qes))
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-07-20 01:32:07 +03:00
|
|
|
$follow
|
2017-10-09 23:50:17 +03:00
|
|
|
(sa-emil (sa-follow-effects sub.det srs.det))
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-07-20 01:32:07 +03:00
|
|
|
$sequent
|
2017-07-22 01:53:24 +03:00
|
|
|
+>(sequence (~(put by sequence) cir.det num.det))
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-07-21 02:57:53 +03:00
|
|
|
$gram
|
2017-11-20 22:48:54 +03:00
|
|
|
(sa-change-gram +.det)
|
2017-12-11 20:28:40 +03:00
|
|
|
::
|
|
|
|
$sourced
|
|
|
|
(sa-add-gram-source +.det)
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
$config
|
|
|
|
=. +>
|
|
|
|
%- sa-emil
|
2017-07-22 01:53:24 +03:00
|
|
|
(sa-config-effects shape dif.det)
|
|
|
|
+>(shape (change-config shape dif.det))
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
$status
|
|
|
|
%_ +>
|
|
|
|
locals
|
2017-12-09 19:17:57 +03:00
|
|
|
?: ?=($remove -.dif.det)
|
|
|
|
(~(del by locals) who.det)
|
2017-07-22 01:53:24 +03:00
|
|
|
%+ ~(put by locals) who.det
|
2017-05-13 01:05:49 +03:00
|
|
|
%+ change-status
|
2017-07-22 01:53:24 +03:00
|
|
|
(fall (~(get by locals) who.det) *status)
|
|
|
|
dif.det
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
|
|
|
==
|
|
|
|
::
|
2017-12-11 20:28:40 +03:00
|
|
|
++ sa-add-gram-source
|
2018-05-25 01:39:56 +03:00
|
|
|
:: remember message source
|
|
|
|
::
|
|
|
|
:: if it's not already known, make note of the
|
|
|
|
:: fact that message {num} was heard from {src}.
|
2017-12-11 20:28:40 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-add-gram-source
|
2017-12-11 20:28:40 +03:00
|
|
|
|= {src/circle num/@ud}
|
|
|
|
^+ +>
|
|
|
|
=- +>.$(sourced -)
|
|
|
|
=+ sed=(fall (~(get by sourced) src) ~)
|
|
|
|
?^ (find ~[num] sed) sourced
|
|
|
|
(~(put by sourced) src [num sed])
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-change-gram
|
2018-05-25 01:39:56 +03:00
|
|
|
:: save/update message
|
|
|
|
::
|
|
|
|
:: apply a %gram delta, either appending or
|
|
|
|
:: updating a message.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-change-gram
|
2017-11-20 22:48:54 +03:00
|
|
|
|= {src/circle gam/telegram}
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-07-19 03:22:45 +03:00
|
|
|
::TODO move "known" logic up into ++so? that way,
|
|
|
|
:: we can attach message numbers to changes.
|
2017-07-11 03:23:12 +03:00
|
|
|
=+ old=(~(get by known) uid.gam)
|
2017-05-13 01:05:49 +03:00
|
|
|
?~ old
|
|
|
|
:: new message
|
2017-12-11 20:28:40 +03:00
|
|
|
%. [src count]
|
|
|
|
%_ sa-add-gram-source
|
2017-06-14 03:18:04 +03:00
|
|
|
grams (welp grams [gam ~])
|
2017-05-13 01:05:49 +03:00
|
|
|
count +(count)
|
2017-07-11 03:23:12 +03:00
|
|
|
known (~(put by known) uid.gam count)
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
|
|
|
:: changed message
|
2017-12-11 20:28:40 +03:00
|
|
|
%. [src u.old]
|
|
|
|
%_ sa-add-gram-source
|
2017-05-13 01:05:49 +03:00
|
|
|
grams %+ welp
|
2017-12-11 02:50:23 +03:00
|
|
|
(scag u.old grams)
|
|
|
|
[gam (slag +(u.old) grams)]
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-change-remote
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply remote's delta
|
|
|
|
::
|
|
|
|
:: apply a story diff to remote data.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-change-remote
|
2017-07-22 01:53:24 +03:00
|
|
|
|= det/delta-story
|
2017-05-13 01:05:49 +03:00
|
|
|
^+ +>
|
2017-07-22 01:53:24 +03:00
|
|
|
?+ -.det
|
|
|
|
~&([%unexpected-delta-remote -.det] !!)
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
$config
|
2017-07-22 01:53:24 +03:00
|
|
|
?: ?=($remove -.dif.det)
|
|
|
|
+>(mirrors (~(del by mirrors) cir.det))
|
2017-05-13 01:05:49 +03:00
|
|
|
=/ new/config
|
|
|
|
%+ change-config
|
2017-07-22 01:53:24 +03:00
|
|
|
(fall (~(get by mirrors) cir.det) *config)
|
|
|
|
dif.det
|
|
|
|
+>.$(mirrors (~(put by mirrors) cir.det new))
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-05-13 01:05:49 +03:00
|
|
|
$status
|
|
|
|
%_ +>.$
|
|
|
|
remotes
|
2017-07-22 01:53:24 +03:00
|
|
|
%+ ~(put by remotes) cir.det
|
|
|
|
=+ ole=(fall (~(get by remotes) cir.det) *group)
|
|
|
|
?: ?=($remove -.dif.det) (~(del by ole) who.det)
|
|
|
|
=+ old=(fall (~(get by ole) who.det) *status)
|
|
|
|
(~(put by ole) who.det (change-status old dif.det))
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-config-effects
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply side-effects for a %config delta.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-change-effects
|
2017-05-13 01:05:49 +03:00
|
|
|
|= {old/config dif/diff-config}
|
|
|
|
^- (list move)
|
|
|
|
?+ -.dif ~
|
2017-10-31 21:56:56 +03:00
|
|
|
$permit (sa-permit-effects sec.con.old sis.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-12-11 06:56:58 +03:00
|
|
|
++ sa-follow-effects
|
2018-05-25 01:39:56 +03:00
|
|
|
:: un/subscribe
|
|
|
|
::
|
|
|
|
:: apply side-effects for a %follow delta,
|
|
|
|
:: un/subscribing this story to/from {cos}.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-follow-effects
|
2017-10-09 23:50:17 +03:00
|
|
|
|= {sub/? srs/(set source)}
|
2017-05-13 01:05:49 +03:00
|
|
|
^- (list move)
|
2017-10-09 23:50:17 +03:00
|
|
|
%. srs
|
|
|
|
?:(sub sa-acquire sa-abjure)
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-permit-effects
|
2018-05-25 01:39:56 +03:00
|
|
|
:: notify permitted
|
|
|
|
::
|
|
|
|
:: 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
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-permit-effects
|
2017-05-13 01:05:49 +03:00
|
|
|
|= {sec/security old/(set ship) add/? sis/(set ship)}
|
|
|
|
^- (list move)
|
2017-10-31 21:56:56 +03:00
|
|
|
=/ wyt ?=(?($village $journal) sec)
|
2017-05-13 01:05:49 +03:00
|
|
|
=/ inv =(wyt add)
|
2017-06-14 06:09:48 +03:00
|
|
|
?: inv ~
|
2017-06-22 03:16:22 +03:00
|
|
|
=/ sus/(set ship)
|
2017-10-31 21:56:56 +03:00
|
|
|
%. sis.con.shape
|
2017-06-22 03:16:22 +03:00
|
|
|
?:(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
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %subscriptions
|
|
|
|
:: #
|
|
|
|
:: arms for starting and ending subscriptions
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-acquire
|
2018-05-25 01:39:56 +03:00
|
|
|
:: subscribes this story to each circle.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-aquire
|
2017-10-09 23:50:17 +03:00
|
|
|
|= srs/(set source)
|
2017-11-01 22:24:11 +03:00
|
|
|
=- (murn - same)
|
2017-10-09 23:50:17 +03:00
|
|
|
%+ turn ~(tap in srs)
|
2017-07-11 02:41:47 +03:00
|
|
|
|= {cir/circle ran/range}
|
2017-11-17 20:41:08 +03:00
|
|
|
^- (unit move)
|
2017-11-03 17:54:25 +03:00
|
|
|
?: =(cir sa-cir) ~ :: ignore self-subs
|
2017-11-17 20:41:08 +03:00
|
|
|
=+ wat=~[%grams %config-l %group-l]
|
2017-11-24 02:43:16 +03:00
|
|
|
`(wire-to-peer (circle-wire nom wat cir ran))
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-abjure
|
2018-05-25 01:39:56 +03:00
|
|
|
:: unsubscribes this story from each circle.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-abjure
|
2017-10-09 23:50:17 +03:00
|
|
|
|= srs/(set source)
|
2017-11-24 02:43:16 +03:00
|
|
|
^- (list move)
|
2017-10-09 23:50:17 +03:00
|
|
|
%+ turn ~(tap in srs)
|
|
|
|
|= {cir/circle ran/range}
|
2017-11-17 20:41:08 +03:00
|
|
|
^- move
|
|
|
|
=/ wir
|
2017-11-24 02:43:16 +03:00
|
|
|
%^ circle-wire nom
|
2017-11-17 20:41:08 +03:00
|
|
|
~[%grams %config-l %group-l]
|
|
|
|
[cir ran]
|
2018-01-25 21:03:22 +03:00
|
|
|
[ost.bol %pull wir [hos.cir dap.bol] ~]
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-eject
|
2018-05-25 01:39:56 +03:00
|
|
|
:: removes ships {sis} from {followers}.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-eject
|
2017-05-13 01:05:49 +03:00
|
|
|
|= sis/(set ship)
|
|
|
|
^- (list move)
|
2017-11-24 02:43:16 +03:00
|
|
|
%- zing
|
|
|
|
%+ turn ~(tap in sup.bol)
|
|
|
|
|= {b/bone s/ship p/path}
|
|
|
|
^- (list move)
|
|
|
|
?. ?& (~(has in sis) s)
|
|
|
|
?=({$circle @tas *} p)
|
|
|
|
=(i.t.p nom)
|
|
|
|
==
|
|
|
|
~
|
|
|
|
(gentle-quit b s (path-to-query p))
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ sa-unearth
|
2018-05-25 01:39:56 +03:00
|
|
|
:: ships' bones
|
|
|
|
::
|
|
|
|
:: find the bones in {sup.bol} that belong to
|
|
|
|
:: a ship in {sis}.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-sa-unearth
|
2017-05-13 01:05:49 +03:00
|
|
|
|= sis/(set ship)
|
|
|
|
^- (set bone)
|
|
|
|
%- ~(rep in sup.bol)
|
|
|
|
|= {{b/bone s/ship p/path} c/(set bone)}
|
|
|
|
?. ?& (~(has in sis) s)
|
2017-11-22 20:51:12 +03:00
|
|
|
?=({$circle @tas *} p)
|
|
|
|
=(i.t.p nom)
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
|
|
|
c
|
|
|
|
(~(put in c) b)
|
|
|
|
--
|
|
|
|
--
|
|
|
|
::
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %wire-utility
|
|
|
|
:: #
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ circle-wire
|
2018-05-25 01:39:56 +03:00
|
|
|
:: /circle peer wire
|
|
|
|
::
|
|
|
|
:: constructs a /circle %peer path for subscribing
|
|
|
|
:: {nom} to a source.
|
2017-11-24 02:43:16 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-circle-wire
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name wat/(list circle-data) source}
|
2017-11-24 02:43:16 +03:00
|
|
|
^- wire
|
|
|
|
;: weld
|
|
|
|
/circle/[nom]/(scot %p hos.cir)/[nom.cir]
|
|
|
|
(sort wat gth) :: consistence
|
|
|
|
(range-to-path ran)
|
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ wire-to-peer
|
2018-05-25 01:39:56 +03:00
|
|
|
:: peer move from wire
|
|
|
|
::
|
|
|
|
:: builds the peer move associated with the wire.
|
2017-11-17 20:41:08 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-wire-to-peer
|
2017-11-17 20:41:08 +03:00
|
|
|
|= wir/wire
|
|
|
|
^- move
|
|
|
|
=+ tar=(wire-to-target wir)
|
2018-01-25 21:03:22 +03:00
|
|
|
[ost.bol %peer wir [p.tar dap.bol] q.tar]
|
2017-11-17 20:41:08 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ wire-to-target
|
2018-05-25 01:39:56 +03:00
|
|
|
:: ship+path from wire
|
|
|
|
::
|
|
|
|
:: parses {wir} to obtain the target ship and the
|
|
|
|
:: query path.
|
2017-11-03 17:54:25 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-wire-to-target
|
2017-11-03 17:54:25 +03:00
|
|
|
|= wir/wire
|
|
|
|
^- (pair ship path)
|
2017-11-17 20:41:08 +03:00
|
|
|
?+ wir ~&(wir !!)
|
|
|
|
{$circle @ @ *}
|
|
|
|
:- (slav %p i.t.t.wir)
|
|
|
|
(welp /circle t.t.t.wir)
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-11-03 17:54:25 +03:00
|
|
|
{$burden *}
|
2018-10-15 09:23:34 +03:00
|
|
|
:- (above [our now our]:bol)
|
2017-11-17 20:41:08 +03:00
|
|
|
/burden/(scot %p our.bol)
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-11-17 20:41:08 +03:00
|
|
|
{$report @ *}
|
|
|
|
:- (slav %p i.t.wir)
|
|
|
|
/report
|
2017-11-03 17:54:25 +03:00
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ etch
|
2018-05-25 01:39:56 +03:00
|
|
|
:: parse wire
|
|
|
|
::
|
|
|
|
:: parses {wir} to obtain either %circle with story
|
|
|
|
:: and circle or %repeat with message number, source
|
|
|
|
:: ship, story and serials.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-etch
|
2017-04-21 00:59:36 +03:00
|
|
|
|= wir/wire
|
|
|
|
^- weir
|
2017-11-03 17:54:25 +03:00
|
|
|
?+ wir !!
|
2017-11-17 20:41:08 +03:00
|
|
|
{$circle @ @ @ *}
|
|
|
|
:: $circle, us, host, target
|
2017-06-23 01:34:03 +03:00
|
|
|
:^ %circle
|
2017-11-17 20:41:08 +03:00
|
|
|
i.t.wir
|
|
|
|
[(slav %p i.t.t.wir) i.t.t.t.wir]
|
2017-10-09 23:50:17 +03:00
|
|
|
(path-to-range t.t.t.t.wir)
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2018-03-19 07:18:20 +03:00
|
|
|
{$repeat @ @ @ ~}
|
2017-07-07 06:01:08 +03:00
|
|
|
:+ %repeat
|
2017-08-03 07:43:56 +03:00
|
|
|
[(slav %p i.t.wir) i.t.t.wir]
|
|
|
|
((list serial) (cue (slav %ud i.t.t.t.wir)))
|
2017-04-21 00:59:36 +03:00
|
|
|
==
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ etch-circle
|
2018-05-25 01:39:56 +03:00
|
|
|
:: parse /circle wire
|
|
|
|
::
|
|
|
|
:: parses a /circle wire, call a gate with the
|
|
|
|
:: result.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-etch-circle
|
2017-04-21 00:59:36 +03:00
|
|
|
|= $: wir/wire
|
|
|
|
$= fun
|
2017-12-18 16:20:45 +03:00
|
|
|
$- {nom/name src/source}
|
2017-04-21 00:59:36 +03:00
|
|
|
{(list move) _.}
|
|
|
|
==
|
|
|
|
=+ wer=(etch wir)
|
2017-10-09 23:50:17 +03:00
|
|
|
?>(?=($circle -.wer) (fun nom.wer src.wer))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ etch-repeat
|
2018-05-25 01:39:56 +03:00
|
|
|
:: parses a /repeat wire, call gate with the result.
|
2017-04-10 23:24:25 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-etch-repeat
|
2017-04-21 00:59:36 +03:00
|
|
|
|= $: wir/wire
|
|
|
|
$= fun
|
2017-08-03 07:43:56 +03:00
|
|
|
$- {cir/circle ses/(list serial)}
|
2017-04-21 00:59:36 +03:00
|
|
|
{(list move) _.}
|
|
|
|
==
|
|
|
|
=+ wer=(etch wir)
|
2017-08-03 07:43:56 +03:00
|
|
|
?>(?=($repeat -.wer) (fun cir.wer ses.wer))
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ gentle-quit
|
2018-05-25 01:39:56 +03:00
|
|
|
:: quit other, pull us
|
|
|
|
::
|
|
|
|
:: we want to gently pull our own subscriptions,
|
|
|
|
:: rather than quitting them, so that we may
|
|
|
|
:: differentiate between a gall/ames quit and a
|
|
|
|
:: foreign quit. but since wex.bol isn't filled,
|
|
|
|
:: we'll have to just guess at what the correct wire
|
|
|
|
:: wire is. this is truly terrible, but will have to
|
|
|
|
:: do for now.
|
2017-11-24 02:43:16 +03:00
|
|
|
::TODO get rid of this once gall improves.
|
|
|
|
:: it needs to tell us the difference between
|
|
|
|
:: an app-caused quit and a queue-caused one.
|
|
|
|
:: (aka connected/disconnected/rejected state)
|
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-gentle-quit
|
2017-11-24 02:43:16 +03:00
|
|
|
|= {bon/bone who/ship qer/query}
|
|
|
|
^- (list move)
|
|
|
|
?. ?=($circle -.qer) ~
|
|
|
|
?. =(who our.bol) [bon %quit ~]~
|
|
|
|
%- zing
|
|
|
|
%+ turn ~(tap in ~(key by stories))
|
2017-12-18 16:20:45 +03:00
|
|
|
|= n/name
|
2017-11-24 02:43:16 +03:00
|
|
|
^- (list move)
|
2018-01-25 21:03:22 +03:00
|
|
|
:~ :^ ost.bol %poke /
|
2017-11-24 02:43:16 +03:00
|
|
|
:+ [our.bol dap.bol] %hall-action
|
|
|
|
:^ %source n |
|
|
|
|
[[[our.bol nom.qer] ran.qer] ~ ~]
|
|
|
|
::
|
2018-01-25 21:03:22 +03:00
|
|
|
:^ ost.bol %pull
|
2017-11-24 02:43:16 +03:00
|
|
|
%^ circle-wire n ~(tap in wat.qer)
|
|
|
|
[[our.bol nom.qer] ran.qer]
|
|
|
|
[[our.bol dap.bol] ~]
|
|
|
|
==
|
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %new-events
|
|
|
|
:: #
|
2017-12-11 06:56:58 +03:00
|
|
|
++ bake
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply state delta
|
|
|
|
::
|
|
|
|
:: applies a change to the application state,
|
|
|
|
:: producing side-effects.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-bake
|
2017-07-22 01:53:24 +03:00
|
|
|
|= det/delta
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-11-01 22:24:11 +03:00
|
|
|
da-done:(da-change:da det)
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ pre-bake
|
2018-05-25 01:39:56 +03:00
|
|
|
:: apply more deltas
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-pre-bake
|
2017-07-22 01:53:24 +03:00
|
|
|
|= des/(list delta)
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-10-08 16:20:02 +03:00
|
|
|
=| moz/(list move)
|
|
|
|
|- ^- (quip move _+>.^$)
|
|
|
|
?~ des [moz +>.^$]
|
|
|
|
=^ mos +>.^$ (bake i.des)
|
2017-11-01 22:24:11 +03:00
|
|
|
$(moz :(welp moz mos (affection i.des)), des t.des)
|
2017-10-08 16:20:02 +03:00
|
|
|
::TODO ideally you'd just do this, but that runtime errors on "bake"...
|
|
|
|
::%+ roll des
|
|
|
|
::|= {d/delta m/(list move) _+>.$}
|
|
|
|
::=^ mos +>.^$ (bake d)
|
2017-11-02 22:22:15 +03:00
|
|
|
::[:(welp m mos (affection d)) +>.^$]
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ peek
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-peek
|
2018-01-03 20:30:49 +03:00
|
|
|
|= pax/path
|
|
|
|
?> ?=({$x *} pax) :: others unsupported.
|
|
|
|
^- (unit (unit (pair mark prize)))
|
|
|
|
=+ piz=(look (path-to-query t.pax))
|
|
|
|
?~ piz ~
|
|
|
|
?~ u.piz [~ ~]
|
|
|
|
``[%hall-prize u.u.piz]
|
|
|
|
::
|
|
|
|
++ look
|
2018-05-25 01:39:56 +03:00
|
|
|
:: query on state
|
|
|
|
::
|
|
|
|
:: find the result (if any) for a given query.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-look
|
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
|
2017-11-16 02:56:33 +03:00
|
|
|
$client
|
|
|
|
``[%client binds nicks]
|
2017-11-24 22:34:46 +03:00
|
|
|
::
|
|
|
|
$circles
|
|
|
|
=- ``[%circles -]
|
2017-12-18 16:20:45 +03:00
|
|
|
%- ~(gas in *(set name))
|
2017-11-24 22:34:46 +03:00
|
|
|
%+ murn ~(tap by stories)
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {n/name s/story}
|
|
|
|
^- (unit name)
|
2017-11-24 22:34:46 +03:00
|
|
|
?:((~(so-visible so:ta n ~ s) who.qer) `n ~)
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-11-03 23:36:42 +03:00
|
|
|
$public
|
|
|
|
``[%public public]
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
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
|
2017-12-18 16:20:45 +03:00
|
|
|
%- ~(gas in *(map name burden))
|
2017-10-06 20:35:25 +03:00
|
|
|
%+ murn ~(tap by stories)
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {n/name s/story}
|
|
|
|
^- (unit (pair name burden))
|
2017-07-19 03:22:45 +03:00
|
|
|
:: only auto-federate channels for now.
|
2017-10-31 21:56:56 +03:00
|
|
|
?. ?=($channel sec.con.shape.s) ~
|
2017-06-13 01:19:45 +03:00
|
|
|
:+ ~ n
|
2018-02-22 15:01:05 +03:00
|
|
|
:: share no more than the last 100, for performance reasons.
|
|
|
|
:+ ?: (lte count.s 100) grams.s
|
|
|
|
(slag (sub count.s 100) grams.s)
|
2017-06-13 01:19:45 +03:00
|
|
|
[shape.s mirrors.s]
|
|
|
|
[locals.s remotes.s]
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
$report
|
2017-07-06 23:38:36 +03:00
|
|
|
::TODO gall note: need to be able to subscirbe to just changes... or just
|
|
|
|
:: data etc.
|
2017-11-09 20:26:26 +03:00
|
|
|
``[%report ~]
|
2017-11-17 22:09:40 +03:00
|
|
|
::
|
|
|
|
$peers
|
|
|
|
=+ soy=(~(get by stories) nom.qer)
|
|
|
|
?~ soy ~
|
|
|
|
``[%peers peers.u.soy]
|
2017-11-16 03:21:25 +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-12-09 16:59:29 +03:00
|
|
|
:+ ?. (~(has in wat.qer) %grams) ~
|
|
|
|
%+ turn
|
2017-11-20 22:48:54 +03:00
|
|
|
=- (~(so-first-grams so:ta nom.qer ~ -) ran.qer)
|
|
|
|
::TODO this can be done more efficiently.
|
|
|
|
?~ wer.qer u.soy
|
2018-04-17 21:08:00 +03:00
|
|
|
=- u.soy(grams -, count (lent -))
|
|
|
|
?. (~(has by sourced.u.soy) u.wer.qer) ~
|
|
|
|
%+ turn
|
|
|
|
%- flop
|
|
|
|
(~(got by sourced.u.soy) u.wer.qer)
|
|
|
|
|= n/@ud
|
|
|
|
(snag n grams.u.soy)
|
2017-07-21 02:57:53 +03:00
|
|
|
(cury gram-to-envelope nom.qer)
|
2017-11-03 17:54:25 +03:00
|
|
|
:- shape.u.soy
|
|
|
|
?. (~(has in wat.qer) %config-r) ~
|
|
|
|
mirrors.u.soy
|
|
|
|
:- locals.u.soy
|
|
|
|
?. (~(has in wat.qer) %group-r) ~
|
|
|
|
remotes.u.soy
|
2017-06-13 01:19:45 +03:00
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ dedicate
|
2018-05-25 01:39:56 +03:00
|
|
|
:: rumor-story to theirs
|
|
|
|
::
|
|
|
|
:: modify a %story diff to make it about their ship
|
|
|
|
:: instead of ours.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-dedicate
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {who/ship nom/name det/delta-story}
|
2017-07-20 01:32:07 +03:00
|
|
|
^- rumor-story
|
2017-07-22 01:53:24 +03:00
|
|
|
?+ -.det det
|
2017-07-20 01:32:07 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
:: internal-only changes.
|
2017-07-20 01:32:07 +03:00
|
|
|
$follow !!
|
|
|
|
$inherited !!
|
|
|
|
$sequent !!
|
2017-12-11 20:28:40 +03:00
|
|
|
$sourced !!
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-07-21 02:57:53 +03:00
|
|
|
$gram
|
2017-11-20 22:48:54 +03:00
|
|
|
:+ %gram
|
|
|
|
?. =(src.det [our.bol nom])
|
|
|
|
src.det
|
|
|
|
[who nom]
|
2017-07-21 02:57:53 +03:00
|
|
|
%+ gram-to-envelope nom
|
2017-07-22 01:53:24 +03:00
|
|
|
%_ gam.det
|
2017-07-21 02:57:53 +03:00
|
|
|
aud
|
2017-07-22 01:53:24 +03:00
|
|
|
%- ~(run in aud.gam.det)
|
2017-07-20 01:32:07 +03:00
|
|
|
|= c/circle
|
2017-11-20 18:45:28 +03:00
|
|
|
?. =(c [our.bol nom]) c
|
2017-11-01 22:20:25 +03:00
|
|
|
[who nom]
|
2017-07-21 02:57:53 +03:00
|
|
|
==
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
$config
|
2017-11-20 18:45:28 +03:00
|
|
|
?. =(cir.det [our.bol nom])
|
2017-11-01 22:20:25 +03:00
|
|
|
det
|
|
|
|
det(cir [who nom])
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
$status
|
2017-11-20 18:45:28 +03:00
|
|
|
?. =(cir.det [our.bol nom])
|
2017-11-01 22:20:25 +03:00
|
|
|
det
|
|
|
|
det(cir [who nom])
|
2017-06-13 01:19:45 +03:00
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ gram-to-envelope
|
2018-05-25 01:39:56 +03:00
|
|
|
:: wrap gram with nr
|
|
|
|
::
|
|
|
|
:: deduce the initial msg number from a telegram
|
|
|
|
:: for a given story. assumes both story and
|
|
|
|
:: telegram are known.
|
2017-07-20 01:32:07 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-gram-to-envelope
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name gam/telegram}
|
2017-07-20 01:32:07 +03:00
|
|
|
^- envelope
|
2017-07-21 02:57:53 +03:00
|
|
|
:_ gam
|
|
|
|
%. uid.gam
|
2017-07-20 01:32:07 +03:00
|
|
|
~(got by known:(~(got by stories) nom))
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ circle-feel-story
|
2017-11-03 17:54:25 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-circle-feel-story
|
2017-11-20 22:48:54 +03:00
|
|
|
|= $: wer/(unit circle)
|
|
|
|
wat/(set circle-data)
|
2017-12-18 16:20:45 +03:00
|
|
|
nom/name
|
2017-11-20 22:48:54 +03:00
|
|
|
det/delta-story
|
|
|
|
==
|
2017-11-03 17:54:25 +03:00
|
|
|
^- ?
|
2017-11-20 22:48:54 +03:00
|
|
|
?&
|
|
|
|
?~ wer &
|
|
|
|
?+ -.det &
|
|
|
|
$gram =(src.det u.wer)
|
|
|
|
$config =(cir.det u.wer)
|
|
|
|
$status =(cir.det u.wer)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
?: =(wat ~) &
|
|
|
|
%- ~(has in wat)
|
|
|
|
?+ -.det %hasnot
|
|
|
|
$gram %grams
|
|
|
|
$new %config-l
|
2018-02-19 22:55:00 +03:00
|
|
|
$remove %config-l
|
2017-11-20 22:48:54 +03:00
|
|
|
$config ?: =(cir.det [our.bol nom])
|
|
|
|
%config-l %config-r
|
|
|
|
$status ?: =(cir.det [our.bol nom])
|
|
|
|
%group-l %group-r
|
|
|
|
==
|
2017-11-03 17:54:25 +03:00
|
|
|
==
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ feel
|
2018-05-25 01:39:56 +03:00
|
|
|
:: delta to rumor
|
|
|
|
::
|
|
|
|
:: if the given delta changes the result of the given
|
|
|
|
:: query, produce the relevant rumor.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-feel
|
2017-07-22 01:53:24 +03:00
|
|
|
|= {qer/query det/delta}
|
2017-05-13 01:05:49 +03:00
|
|
|
^- (unit rumor)
|
2017-06-13 01:19:45 +03:00
|
|
|
?- -.qer
|
2017-11-16 02:56:33 +03:00
|
|
|
$client
|
2017-05-13 01:05:49 +03:00
|
|
|
:: changes to shared ui state apply.
|
2017-07-22 01:53:24 +03:00
|
|
|
?+ -.det ~
|
2017-11-16 02:56:33 +03:00
|
|
|
$glyph `[%client det]
|
|
|
|
$nick `[%client det]
|
2017-05-13 01:05:49 +03:00
|
|
|
==
|
2017-11-24 22:34:46 +03:00
|
|
|
::
|
|
|
|
$circles
|
|
|
|
::NOTE this is another case where having access to
|
|
|
|
:: the pre-delta state would be nice to have.
|
|
|
|
?. ?=($story -.det) ~
|
|
|
|
=; add/(unit ?)
|
|
|
|
?~ add ~
|
|
|
|
`[%circles u.add nom.det]
|
|
|
|
::REVIEW this could be considered leaky, since it
|
|
|
|
:: doesn't check if {who} ever knew of {nom},
|
|
|
|
:: but does that matter? can't really check..
|
2018-01-17 02:20:34 +03:00
|
|
|
:: if the story got deleted, remove it from the circles listing.
|
2017-11-24 22:34:46 +03:00
|
|
|
?: ?=($remove -.det.det) `|
|
2018-01-17 02:20:34 +03:00
|
|
|
=+ soy=(~(got by stories) nom.det)
|
|
|
|
:: if the story got created, or something about the read permissions set
|
|
|
|
:: for the subscriber changed, update the circles listing.
|
|
|
|
=; dif/?
|
|
|
|
?. dif ~
|
|
|
|
:: if the story just got created, don't send a remove rumor, because it
|
|
|
|
:: never showed up in the first place.
|
2018-01-17 16:30:50 +03:00
|
|
|
=- ?:(&(?=($new -.det.det) !-) ~ `-)
|
|
|
|
?| (team:title our.bol who.qer)
|
|
|
|
(~(so-visible so:ta nom.det ~ soy) who.qer)
|
|
|
|
==
|
2018-01-17 02:20:34 +03:00
|
|
|
?| ?=($new -.det.det)
|
|
|
|
::
|
|
|
|
?& ?=($config -.det.det)
|
|
|
|
?=($permit -.dif.det.det)
|
|
|
|
?=(?($channel $village) sec.con.shape.soy)
|
|
|
|
(~(has in sis.dif.det.det) who.qer)
|
2017-11-24 22:34:46 +03:00
|
|
|
==
|
2018-01-17 02:20:34 +03:00
|
|
|
==
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-11-03 23:36:42 +03:00
|
|
|
$public
|
|
|
|
?. ?=($public -.det) ~
|
|
|
|
`det
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
$burden
|
2017-07-22 01:53:24 +03:00
|
|
|
?. ?=($story -.det) ~
|
2017-12-06 14:30:19 +03:00
|
|
|
?: &(=(who.qer src.bol) =(rir /report/(scot %p src.bol))) ~
|
2017-12-11 20:28:40 +03:00
|
|
|
?: ?=(?($follow $inherited $sequent $sourced) -.det.det) ~
|
2017-06-13 01:19:45 +03:00
|
|
|
:: only burden channels for now.
|
2017-11-24 02:43:16 +03:00
|
|
|
?. (~(has by stories) nom.det) ~
|
2017-10-31 21:56:56 +03:00
|
|
|
?. =(%channel sec.con.shape:(~(got by stories) nom.det)) ~
|
2017-07-22 01:53:24 +03:00
|
|
|
`[%burden nom.det (dedicate who.qer nom.det det.det)]
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
$report
|
|
|
|
:: only send changes we didn't get from above.
|
2018-10-15 09:23:34 +03:00
|
|
|
?: =(src.bol (above [our now our]:bol)) ~
|
2018-04-25 22:02:34 +03:00
|
|
|
:: only send story reports about grams and status.
|
2017-07-22 01:53:24 +03:00
|
|
|
?. ?=($story -.det) ~
|
2018-04-25 22:02:34 +03:00
|
|
|
?. ?=(?($gram $status) -.det.det) ~
|
2017-07-22 01:53:24 +03:00
|
|
|
=+ soy=(~(got by stories) nom.det)
|
2017-06-13 01:19:45 +03:00
|
|
|
:: and only if the story is inherited.
|
2017-07-11 04:41:50 +03:00
|
|
|
?. inherited.soy ~
|
2017-06-13 01:19:45 +03:00
|
|
|
:: only burden channels for now.
|
2017-10-31 21:56:56 +03:00
|
|
|
?. =(%channel sec.con.shape.soy) ~
|
2018-10-15 09:23:34 +03:00
|
|
|
`[%burden nom.det (dedicate (above [our now our]:bol) nom.det det.det)]
|
2017-11-17 22:09:40 +03:00
|
|
|
::
|
|
|
|
$peers
|
|
|
|
?. ?=($story -.det) ~
|
|
|
|
?. =(nom.qer nom.det) ~
|
|
|
|
?. ?=($peer -.det.det) ~
|
|
|
|
`[%peers +.det.det]
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-06-13 01:19:45 +03:00
|
|
|
$circle
|
2017-11-03 17:54:25 +03:00
|
|
|
?. ?=($story -.det) ~
|
|
|
|
?. =(nom.qer nom.det) ~
|
2017-11-20 22:48:54 +03:00
|
|
|
?. %- circle-feel-story
|
|
|
|
[wer.qer wat.qer nom.det det.det] ~
|
2018-02-19 22:55:00 +03:00
|
|
|
?. ?| ?=($remove -.det.det)
|
|
|
|
::
|
|
|
|
=< in %. ran.qer
|
|
|
|
=+ soy=(~(got by stories) nom.qer)
|
|
|
|
~(so-in-range so:ta nom.qer ~ soy)
|
|
|
|
==
|
|
|
|
~
|
2018-05-04 03:59:10 +03:00
|
|
|
?. ?=(?($gram $new $config $status $remove) -.det.det) ~
|
2017-11-03 17:54:25 +03:00
|
|
|
:+ ~ %circle
|
|
|
|
?+ det.det det.det
|
|
|
|
{$gram *}
|
2017-11-20 22:48:54 +03:00
|
|
|
:+ %gram src.det.det
|
|
|
|
(gram-to-envelope nom.det gam.det.det)
|
2017-11-03 17:54:25 +03:00
|
|
|
==
|
2017-06-13 01:19:45 +03:00
|
|
|
==
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ affection
|
2018-05-25 01:39:56 +03:00
|
|
|
:: rumors to interested
|
|
|
|
::
|
|
|
|
:: for a given delta, send rumors to all queries it
|
|
|
|
:: affects.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-affection
|
2017-07-22 01:53:24 +03:00
|
|
|
|= det/delta
|
2017-05-13 01:05:49 +03:00
|
|
|
^- (list move)
|
2017-06-28 22:09:35 +03:00
|
|
|
:: cache results for paths.
|
2017-11-01 21:32:21 +03:00
|
|
|
=| res/(map path (list move))
|
|
|
|
%- zing
|
|
|
|
%+ turn ~(tap by sup.bol)
|
2017-05-13 01:05:49 +03:00
|
|
|
|= {b/bone s/ship p/path}
|
2017-11-01 21:32:21 +03:00
|
|
|
^- (list move)
|
2017-06-28 22:09:35 +03:00
|
|
|
=+ mur=(~(get by res) p)
|
2017-11-01 21:32:21 +03:00
|
|
|
?^ mur u.mur
|
|
|
|
=- =. res (~(put by res) p -)
|
|
|
|
-
|
|
|
|
=+ qer=(path-to-query p)
|
|
|
|
%+ welp
|
|
|
|
=+ rum=(feel qer det)
|
|
|
|
?~ rum ~
|
2017-11-08 00:05:52 +03:00
|
|
|
[b %diff %hall-rumor u.rum]~
|
2017-11-01 21:32:21 +03:00
|
|
|
?. ?=($circle -.qer) ~
|
2017-11-14 02:55:18 +03:00
|
|
|
:: kill the subscription if we forgot the story.
|
2017-11-24 02:43:16 +03:00
|
|
|
?. (~(has by stories) nom.qer) (gentle-quit b s qer)
|
2017-11-01 21:32:21 +03:00
|
|
|
:: kill the subscription if it's past its range.
|
2017-11-24 02:43:16 +03:00
|
|
|
=- ?:(done:- (gentle-quit b s qer) ~)
|
2017-11-01 21:32:21 +03:00
|
|
|
%. ran.qer
|
|
|
|
=- ~(so-in-range so:ta nom.qer ~ -)
|
|
|
|
(~(got by stories) nom.qer)
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ path-to-query
|
2018-05-25 01:39:56 +03:00
|
|
|
:: 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
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-path-to-query
|
2017-06-13 01:19:45 +03:00
|
|
|
|= pax/path
|
2017-11-03 17:54:25 +03:00
|
|
|
?. ?=({$circle @tas *} pax)
|
|
|
|
(coins-to-query (path-to-coins pax))
|
2017-11-20 22:48:54 +03:00
|
|
|
=/ qer/query [%circle i.t.pax ~ ~ ~]
|
2017-11-03 17:54:25 +03:00
|
|
|
?> ?=($circle -.qer) :: for type system.
|
|
|
|
=+ pax=t.t.pax
|
2017-11-20 22:48:54 +03:00
|
|
|
=+ ^- {qer/query pax/path}
|
|
|
|
?. ?=({@ @ *} pax) [qer pax]
|
|
|
|
=+ hos=(slaw %p i.pax)
|
|
|
|
?~ hos [qer pax]
|
|
|
|
:_ t.t.pax
|
|
|
|
qer(wer `[u.hos i.t.pax])
|
|
|
|
?> ?=($circle -.qer)
|
2017-11-03 17:54:25 +03:00
|
|
|
|- ^+ qer
|
|
|
|
?~ pax qer
|
|
|
|
::TODO can probably do this a bit better...
|
|
|
|
?+ i.pax
|
|
|
|
qer(ran (path-to-range pax))
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
2017-11-03 17:54:25 +03:00
|
|
|
circle-data %_ $ pax t.pax
|
|
|
|
wat.qer (~(put in wat.qer) i.pax)
|
|
|
|
==
|
|
|
|
$group %_ $ pax t.pax
|
|
|
|
wat.qer %- ~(uni in wat.qer)
|
|
|
|
^+ wat.qer
|
2018-06-06 03:11:06 +03:00
|
|
|
=/ dat=(list circle-data) [%group-l %group-r ~]
|
|
|
|
(sy dat)
|
2017-11-03 17:54:25 +03:00
|
|
|
==
|
|
|
|
$config %_ $ pax t.pax
|
|
|
|
wat.qer %- ~(uni in wat.qer)
|
|
|
|
^+ wat.qer
|
2018-06-06 03:11:06 +03:00
|
|
|
=/ dat=(list circle-data) [%config-l %config-r ~]
|
|
|
|
(sy dat)
|
2017-11-03 17:54:25 +03:00
|
|
|
==
|
|
|
|
==
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ path-to-coins
|
2018-05-25 01:39:56 +03:00
|
|
|
:: path to coin list
|
|
|
|
::
|
|
|
|
:: parse a path into a list of coins.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-path-to-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-12-11 06:56:58 +03:00
|
|
|
++ coins-to-query
|
2018-05-25 01:39:56 +03:00
|
|
|
:: 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 :~
|
2017-11-16 02:56:33 +03:00
|
|
|
[%client ul]
|
2017-11-24 22:34:46 +03:00
|
|
|
[%circles (at /[%p])]
|
2017-11-03 23:36:42 +03:00
|
|
|
[%public ul]
|
2017-06-13 04:09:00 +03:00
|
|
|
[%burden (at /[%p])]
|
2017-06-13 01:19:45 +03:00
|
|
|
[%report ul]
|
|
|
|
==
|
2017-07-12 01:30:00 +03:00
|
|
|
++ term (do %tas)
|
2017-06-13 01:19:45 +03:00
|
|
|
++ rang (mu (al plac (mu (un plac))))
|
|
|
|
++ plac (or %da %ud)
|
|
|
|
--
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ leak
|
2018-05-25 01:39:56 +03:00
|
|
|
:: visible to
|
|
|
|
::
|
|
|
|
:: determine if the given query is visible to the
|
|
|
|
:: ship.
|
2017-05-13 01:05:49 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-leak
|
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
|
2017-11-16 02:56:33 +03:00
|
|
|
$client (team:title our.bol who)
|
2017-11-24 22:34:46 +03:00
|
|
|
$circles =(who who.qer)
|
2017-11-03 23:36:42 +03:00
|
|
|
$public &
|
2017-06-14 03:51:10 +03:00
|
|
|
$burden ?& =(who who.qer)
|
2018-10-15 09:23:34 +03:00
|
|
|
=(our.bol (above our.bol now.bol who))
|
2017-06-14 03:51:10 +03:00
|
|
|
==
|
2017-11-17 22:09:40 +03:00
|
|
|
$peers =(who our.bol) ::TODO or so-visible?
|
2018-10-15 09:23:34 +03:00
|
|
|
$report =(who (above [our now our]:bol))
|
2017-11-16 03:21:25 +03:00
|
|
|
::
|
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
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %poke-events
|
|
|
|
:: #
|
2017-04-10 23:24:25 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ poke-hall-command
|
2018-05-25 01:39:56 +03:00
|
|
|
:: accept command
|
|
|
|
::
|
|
|
|
:: incoming hall command. process it and update logs.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-poke-hall-command
|
2017-04-21 00:59:36 +03:00
|
|
|
|= cod/command
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-03-23 03:34:56 +03:00
|
|
|
=^ 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-12-11 06:56:58 +03:00
|
|
|
++ poke-hall-action
|
2018-05-25 01:39:56 +03:00
|
|
|
:: accept action
|
|
|
|
::
|
|
|
|
:: incoming hall action. process it.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-poke-hall-action
|
2017-04-21 00:59:36 +03:00
|
|
|
|= act/action
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-12-06 18:54:08 +03:00
|
|
|
?. (team:title our.bol src.bol)
|
2017-06-13 01:19:45 +03:00
|
|
|
%- pre-bake
|
2017-04-25 14:33:02 +03:00
|
|
|
=< ta-done
|
2017-11-03 22:31:16 +03:00
|
|
|
%- ta-note:ta
|
2017-11-08 00:05:52 +03:00
|
|
|
"hall-action stranger {(scow %p src.bol)}"
|
2017-11-07 22:00:42 +03:00
|
|
|
=^ mos +>.$
|
|
|
|
%- pre-bake
|
2017-11-24 02:46:00 +03:00
|
|
|
ta-done:(ta-action:ta act)
|
2017-11-07 22:00:42 +03:00
|
|
|
=^ mow +>.$
|
|
|
|
log-all-to-file
|
|
|
|
[(welp mos mow) +>.$]
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %subscription-events
|
|
|
|
:: #
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ diff-hall-prize
|
2018-05-25 01:39:56 +03:00
|
|
|
:: accept prize
|
|
|
|
::
|
|
|
|
:: accept a query result.
|
2017-06-13 01:19:45 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-diff-hall-prize
|
2017-06-13 01:19:45 +03:00
|
|
|
|= {wir/wire piz/prize}
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-06-13 01:19:45 +03:00
|
|
|
=^ mos +>.$
|
|
|
|
%- pre-bake
|
2017-11-08 19:11:59 +03:00
|
|
|
=> (ta-take:ta wir piz)
|
|
|
|
(flop deltas)
|
|
|
|
::TODO ideally this, but runtime error for %burden prize
|
|
|
|
::%- pre-bake
|
|
|
|
::ta-done:(ta-take:ta wir piz)
|
2017-06-13 01:19:45 +03:00
|
|
|
=^ mow +>.$
|
|
|
|
log-all-to-file
|
|
|
|
[(welp mos mow) +>.$]
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ diff-hall-rumor
|
2018-05-25 01:39:56 +03:00
|
|
|
:: accept rumor
|
|
|
|
::
|
|
|
|
:: accept a query result change.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-diff-hall-rumor
|
2017-07-22 01:53:24 +03:00
|
|
|
|= {wir/wire rum/rumor}
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-11-14 02:55:03 +03:00
|
|
|
::NOTE to keep us from echoing changes back to their
|
|
|
|
:: sender, we want to know (in ++feel) if a delta
|
|
|
|
:: was caused by a rumor from a /report.
|
|
|
|
:: if gall worked as advertised, we'd use ost.bol
|
|
|
|
:: and wex.bol to find out, but wex is never set,
|
|
|
|
:: so we just keep track of the "current rumor
|
|
|
|
:: wire" instead.
|
|
|
|
=. rir wir
|
2017-04-21 00:59:36 +03:00
|
|
|
=^ mos +>.$
|
2017-06-13 01:19:45 +03:00
|
|
|
%- pre-bake
|
2017-11-08 19:11:59 +03:00
|
|
|
=> (ta-hear:ta wir rum)
|
|
|
|
(flop deltas)
|
|
|
|
::TODO runtime error for %burden rumors.
|
|
|
|
::ta-done:(ta-hear:ta wir rum)
|
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-12-11 06:56:58 +03:00
|
|
|
++ peer
|
2018-05-25 01:39:56 +03:00
|
|
|
:: accept subscription
|
|
|
|
::
|
|
|
|
:: incoming subscription on {pax}.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-peer
|
2017-04-21 00:59:36 +03:00
|
|
|
|= pax/path
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2018-08-20 21:40:48 +03:00
|
|
|
?: ?=([%sole *] pax) ~&(%hall-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
|
|
|
:_ +>.$
|
2018-01-03 20:30:49 +03:00
|
|
|
=+ piz=(look qer)
|
2017-06-22 22:33:12 +03:00
|
|
|
?~ piz ~&([%query-unavailable pax] mos)
|
|
|
|
?~ u.piz ~&([%query-invalid pax] mos)
|
2017-05-13 01:05:49 +03:00
|
|
|
:_ mos
|
2017-11-08 00:05:52 +03:00
|
|
|
[ost.bol %diff %hall-prize u.u.piz]
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ pull
|
2018-05-25 01:39:56 +03:00
|
|
|
:: unsubscribes.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-pull
|
2017-03-23 03:34:56 +03:00
|
|
|
|= pax/path
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-11-02 02:44:13 +03:00
|
|
|
[~ +>]
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ pull-circle
|
2018-05-25 01:39:56 +03:00
|
|
|
:: someone ends a /circle subscription.
|
2017-11-17 22:09:40 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-pull-circle
|
2017-11-17 22:09:40 +03:00
|
|
|
|= pax/path
|
|
|
|
^- (quip move _+>)
|
|
|
|
%- pre-bake
|
|
|
|
=+ qer=(path-to-query %circle pax)
|
|
|
|
?> ?=($circle -.qer)
|
2018-02-19 17:31:13 +03:00
|
|
|
?. (~(has by stories) nom.qer) ~
|
|
|
|
[%story nom.qer %peer | src.bol qer]~
|
2017-11-17 22:09:40 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ reap
|
2018-05-25 01:39:56 +03:00
|
|
|
:: subscription n/ack
|
|
|
|
::
|
|
|
|
:: update state to reflect subscription success
|
2017-11-24 02:46:41 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-reap
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {wir/wire fal/(unit tang)}
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-06-13 01:19:45 +03:00
|
|
|
%- pre-bake
|
2017-12-14 02:40:33 +03:00
|
|
|
%+ welp
|
|
|
|
?. ?=({$circle *} wir) ~
|
|
|
|
=+ wer=(etch wir)
|
|
|
|
?> ?=($circle -.wer)
|
|
|
|
=< ta-done
|
|
|
|
%. [nom.wer src.wer]
|
|
|
|
?~ fal ta-greet:ta
|
|
|
|
ta-leave:ta
|
|
|
|
?~ fal ~
|
2017-12-14 02:07:35 +03:00
|
|
|
=< ta-done
|
2017-12-14 02:40:33 +03:00
|
|
|
=- (ta-grieve:ta - u.fal)
|
2017-12-14 02:07:35 +03:00
|
|
|
=+ (wire-to-target wir)
|
|
|
|
%+ weld "failed (re)subscribe to {(scow %p p)} on "
|
|
|
|
%+ roll q
|
|
|
|
|= {a/@ta b/tape}
|
|
|
|
:(weld b "/" (trip a))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ quit
|
2018-05-25 01:39:56 +03:00
|
|
|
:: dropped subscription
|
|
|
|
::
|
|
|
|
:: gall dropped out subscription. resubscribe.
|
2017-11-03 17:54:25 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-quit
|
2017-11-03 17:54:25 +03:00
|
|
|
|= wir/wire
|
|
|
|
^- (quip move _+>)
|
2017-12-14 02:05:39 +03:00
|
|
|
[[(wire-to-peer wir) ~] +>]
|
2017-11-03 17:54:25 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ quit-circle
|
2018-05-25 01:39:56 +03:00
|
|
|
:: dropped circle sub
|
|
|
|
::
|
|
|
|
:: gall dropped our subscription. resubscribe.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-quit-circle
|
2017-04-21 00:59:36 +03:00
|
|
|
|= wir/wire
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-06-23 01:34:03 +03:00
|
|
|
%+ etch-circle [%circle wir]
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name src/source}
|
2017-10-09 23:50:17 +03:00
|
|
|
%- pre-bake
|
|
|
|
ta-done:(ta-resub:ta nom src)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ coup-repeat
|
2018-05-25 01:39:56 +03:00
|
|
|
:: message n/ack
|
|
|
|
::
|
|
|
|
:: ack from ++ta-transmit. mark the message as
|
|
|
|
:: received or rejected.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-coup-repeat
|
2017-04-21 00:59:36 +03:00
|
|
|
|= {wir/wire fal/(unit tang)}
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-04-21 00:59:36 +03:00
|
|
|
%+ etch-repeat [%repeat wir]
|
2017-08-03 07:43:56 +03:00
|
|
|
|= {cir/circle ses/(list serial)}
|
2017-06-13 21:14:13 +03:00
|
|
|
%- pre-bake
|
2017-08-03 07:43:56 +03:00
|
|
|
ta-done:(ta-repeat:ta cir ses fal)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-05-25 01:39:56 +03:00
|
|
|
:: #
|
|
|
|
:: # %logging
|
|
|
|
:: #
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ poke-hall-save
|
2018-05-25 01:39:56 +03:00
|
|
|
:: save as log
|
|
|
|
::
|
|
|
|
:: stores the telegrams of story {nom} in a log file,
|
|
|
|
:: to be re-loaded by ++poke-hall-load.
|
2017-11-20 22:48:54 +03:00
|
|
|
::TODO maybe update to also store sourced list.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-poke-hall-save
|
2017-12-18 16:20:45 +03:00
|
|
|
|= nom/name
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-04-21 00:59:36 +03:00
|
|
|
=/ paf/path
|
2017-11-08 00:05:52 +03:00
|
|
|
/(scot %p our.bol)/home/(scot %da now.bol)/hall/[nom]/hall-telegrams
|
2017-04-21 00:59:36 +03:00
|
|
|
=+ grams:(~(got by stories) nom)
|
|
|
|
:_ +>.$
|
|
|
|
:_ ~
|
|
|
|
:* ost.bol
|
|
|
|
%info
|
|
|
|
/jamfile
|
|
|
|
our.bol
|
2017-11-08 00:05:52 +03:00
|
|
|
(foal:space:userlib paf [%hall-telegrams !>(-)])
|
2017-04-21 00:59:36 +03:00
|
|
|
==
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ poke-load-legacy
|
2018-05-25 01:39:56 +03:00
|
|
|
:: loads legacy messages into the story {nom}.
|
2017-11-07 19:11:32 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-poke-hall-legacy
|
2017-12-18 16:20:45 +03:00
|
|
|
|= nom/name
|
2017-11-07 19:11:32 +03:00
|
|
|
^- (quip move _+>)
|
|
|
|
=/ jams/json
|
|
|
|
.^ json
|
|
|
|
%cx
|
|
|
|
/(scot %p our.bol)/home/(scot %da now.bol)/hall/legacy-telegrams/json
|
|
|
|
==
|
2017-11-08 00:05:52 +03:00
|
|
|
=+ grams=(from-json:hall-legacy jams)
|
2017-11-07 19:11:32 +03:00
|
|
|
~& [%loaded (lent grams)]
|
|
|
|
%- pre-bake
|
|
|
|
%+ turn (flop grams)
|
|
|
|
|= t/telegram
|
2017-11-20 22:48:54 +03:00
|
|
|
[%story nom %gram [our.bol nom] t]
|
2017-11-07 19:11:32 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ poke-hall-load
|
2018-05-25 01:39:56 +03:00
|
|
|
:: load from log
|
|
|
|
::
|
|
|
|
:: loads the telegrams of story {nom} into our state,
|
|
|
|
:: as saved in ++poke-hall-save.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-poke-hall-load
|
2017-12-18 16:20:45 +03:00
|
|
|
|= nom/name
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-04-21 00:59:36 +03:00
|
|
|
=/ grams
|
|
|
|
.^ (list telegram)
|
|
|
|
%cx
|
2017-11-08 00:05:52 +03:00
|
|
|
/(scot %p our.bol)/home/(scot %da now.bol)/hall/[nom]/hall-telegrams
|
2017-04-21 00:59:36 +03:00
|
|
|
==
|
2017-11-07 22:00:42 +03:00
|
|
|
%- pre-bake
|
|
|
|
%+ turn grams
|
|
|
|
|= t/telegram
|
2017-11-20 22:48:54 +03:00
|
|
|
[%story nom %gram [our.bol nom] t]
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ poke-hall-log
|
2018-05-25 01:39:56 +03:00
|
|
|
:: starts logging story {nom}'s messages.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-poke-hall-log
|
2017-12-18 16:20:45 +03:00
|
|
|
|= nom/name
|
2017-10-06 20:35:25 +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-12-11 06:56:58 +03:00
|
|
|
++ poke-hall-unlog
|
2018-05-25 01:39:56 +03:00
|
|
|
:: stops logging story {nom}'s messages.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-poke-hall-unlog
|
2017-12-18 16:20:45 +03:00
|
|
|
|= nom/name
|
2017-10-06 20:35:25 +03:00
|
|
|
^- (quip move _+>)
|
2017-03-23 03:34:56 +03:00
|
|
|
:- ~
|
2017-04-21 00:59:36 +03:00
|
|
|
+>.$(log (~(del by log) nom))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ log-all-to-file
|
2018-05-25 01:39:56 +03:00
|
|
|
:: 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-10-06 20:35:25 +03:00
|
|
|
^- (quip move _.)
|
2017-04-21 00:59:36 +03:00
|
|
|
:_ %_ .
|
|
|
|
log
|
|
|
|
%- ~(urn by log)
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name len/@ud}
|
2017-04-21 00:59:36 +03:00
|
|
|
count:(~(got by stories) nom)
|
|
|
|
==
|
2017-10-06 20:35:25 +03:00
|
|
|
%+ murn ~(tap by log)
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name len/@ud}
|
2017-04-21 00:59:36 +03:00
|
|
|
^- (unit move)
|
|
|
|
?: (gte len count:(~(got by stories) nom))
|
|
|
|
~
|
|
|
|
`(log-to-file nom)
|
|
|
|
::
|
2017-12-11 06:56:58 +03:00
|
|
|
++ log-to-file
|
2018-05-25 01:39:56 +03:00
|
|
|
:: logs all grams of story {nom} to a file.
|
2017-04-21 00:59:36 +03:00
|
|
|
::
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-log-all-to-file
|
2017-12-18 16:20:45 +03:00
|
|
|
|= nom/name
|
2017-04-21 00:59:36 +03:00
|
|
|
^- move
|
|
|
|
=+ ^- paf/path
|
|
|
|
=+ day=(year %*(. (yore now.bol) +.t +:*tarp))
|
2017-10-06 20:35:25 +03:00
|
|
|
%+ en-beam:format [our.bol %home da+now.bol]
|
2017-11-08 00:05:52 +03:00
|
|
|
/hall-telegrams/(scot %da day)/[nom]/hall
|
2017-04-21 00:59:36 +03:00
|
|
|
=+ grams:(~(got by stories) nom)
|
2017-10-06 20:35:25 +03:00
|
|
|
:* ost.bol
|
|
|
|
%info
|
|
|
|
/jamfile
|
|
|
|
our.bol
|
2017-11-08 00:05:52 +03:00
|
|
|
(foal:space:userlib paf [%hall-telegrams !>(-)])
|
2017-10-06 20:35:25 +03:00
|
|
|
==
|
2017-12-11 02:55:13 +03:00
|
|
|
::
|
|
|
|
::TODO for debug purposes. remove eventually.
|
2017-12-14 03:55:33 +03:00
|
|
|
:: users beware, here be dragons.
|
2017-12-11 02:55:13 +03:00
|
|
|
++ poke-noun
|
2018-11-02 06:26:15 +03:00
|
|
|
~/ %hall-poke-noun
|
2018-09-27 01:59:11 +03:00
|
|
|
|= a/*
|
2017-12-11 02:55:13 +03:00
|
|
|
^- (quip move _+>)
|
2018-09-27 01:59:11 +03:00
|
|
|
?: ?=([%kill ship] a)
|
|
|
|
:_ +>
|
|
|
|
%- ~(rep by sup.bol)
|
|
|
|
|= [[b=bone c=(pair ship path)] out=(list move)]
|
|
|
|
?: =(+.a p.c)
|
|
|
|
[[b %quit ~] out]
|
|
|
|
out
|
|
|
|
?> ?=(@t a)
|
2017-12-14 03:55:33 +03:00
|
|
|
?: =(a 'check')
|
|
|
|
~& 'verifying message reference integrity...'
|
2017-12-11 02:55:13 +03:00
|
|
|
=- ~&(- [~ +>.$])
|
|
|
|
%- ~(urn by stories)
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {n/name s/story}
|
2017-12-11 02:55:13 +03:00
|
|
|
=+ %- ~(rep by known.s)
|
|
|
|
|= {{u/serial a/@ud} k/@ud m/@ud}
|
|
|
|
:- ?:((gth a k) a k)
|
|
|
|
?: =(u uid:(snag a grams.s)) m
|
|
|
|
~? (lth m 3)
|
|
|
|
:* [%fake a u]
|
|
|
|
[%prev uid:(snag (dec a) grams.s)]
|
|
|
|
[%real uid:(snag a grams.s)]
|
|
|
|
[%next uid:(snag +(a) grams.s)]
|
|
|
|
==
|
|
|
|
+(m)
|
|
|
|
:^ count=count.s
|
|
|
|
lent=(lent grams.s)
|
|
|
|
known=k
|
|
|
|
mismatch=m
|
2018-01-27 00:47:49 +03:00
|
|
|
?: =(a 'check subs')
|
|
|
|
~& 'here are all incoming non-circle subs'
|
|
|
|
~& ^- (list (pair ship path))
|
|
|
|
%+ murn ~(tap by sup.bol)
|
|
|
|
|= {b/bone s/ship p/path}
|
|
|
|
^- (unit (pair ship path))
|
|
|
|
?: ?=({$circle *} p) ~
|
|
|
|
`[s p]
|
|
|
|
[~ +>]
|
2017-12-11 02:55:13 +03:00
|
|
|
?: =(a 'rebuild')
|
2017-12-14 03:55:33 +03:00
|
|
|
~& 'rebuilding message references...'
|
2017-12-11 02:55:13 +03:00
|
|
|
=- [~ +>.$(stories -)]
|
|
|
|
%- ~(urn by stories)
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {nom/name soy/story}
|
2017-12-11 02:55:13 +03:00
|
|
|
=+ %+ roll grams.soy
|
|
|
|
|= {t/telegram c/@ud k/(map serial @ud) s/(map circle (list @ud))}
|
|
|
|
:+ +(c) (~(put by k) uid.t c)
|
|
|
|
=/ src/circle
|
|
|
|
?: (~(has by aud.t) [our.bol nom]) [our.bol nom]
|
|
|
|
?~ aud.t ~&(%strange-aud [our.bol %inbox])
|
|
|
|
n.aud.t
|
|
|
|
%+ ~(put by s) src
|
|
|
|
[c (fall (~(get by s) src) ~)]
|
|
|
|
soy(count c, known k, sourced s)
|
2017-12-14 03:55:33 +03:00
|
|
|
?: =(a 'refederate')
|
|
|
|
~& 'refederating. may take a while...'
|
|
|
|
:_ +>
|
2018-10-15 09:23:34 +03:00
|
|
|
=+ bov=(above [our now our]:bol)
|
2017-12-14 03:55:33 +03:00
|
|
|
?: =(bov our.bol) ~
|
2018-01-25 21:03:22 +03:00
|
|
|
:~ [ost.bol %pull /burden [bov dap.bol] ~]
|
2017-12-14 03:55:33 +03:00
|
|
|
(wire-to-peer /burden)
|
|
|
|
==
|
|
|
|
?: =(a 'incoming')
|
|
|
|
~& 'incoming subscriptions (ignoring circle subs):'
|
|
|
|
~& %+ skip ~(tap by sup.bol)
|
|
|
|
|= {bone (pair ship path)}
|
|
|
|
&(?=({$circle *} q) !?=({$circle $inbox *} q))
|
|
|
|
[~ +>]
|
|
|
|
?: =(a 'sources')
|
|
|
|
~& 'sources per story:'
|
|
|
|
~& %- ~(urn by stories)
|
2017-12-18 16:20:45 +03:00
|
|
|
|= {n/name s/story}
|
2017-12-14 03:55:33 +03:00
|
|
|
[n src.shape.s]
|
|
|
|
[~ +>]
|
2018-01-27 00:47:49 +03:00
|
|
|
?: =(`0 (find "re-listen " (trip a)))
|
|
|
|
~& 're-listening'
|
|
|
|
:_ +>
|
|
|
|
:_ ~
|
|
|
|
(wire-to-peer /report/(crip (slag 10 (trip a))))
|
2018-09-27 01:59:11 +03:00
|
|
|
::
|
|
|
|
::
|
|
|
|
?: =(a 'kill-all-subs')
|
|
|
|
:_ +>
|
|
|
|
%- ~(rep by sup.bol)
|
|
|
|
|= [[b=bone (pair ship path)] out=(list move)]
|
|
|
|
[[b %quit ~] out]
|
|
|
|
::
|
|
|
|
?: =(a 'kill-our-subs')
|
|
|
|
:_ +>
|
|
|
|
%- ~(rep by sup.bol)
|
|
|
|
|= [[b=bone c=(pair ship path)] out=(list move)]
|
|
|
|
?: =(our.bol p.c)
|
|
|
|
[[b %quit ~] out]
|
|
|
|
out
|
|
|
|
::
|
|
|
|
::
|
2017-12-11 02:55:13 +03:00
|
|
|
[~ +>]
|
2017-03-23 03:34:56 +03:00
|
|
|
--
|