Merged local story configs and presences into the remote maps. Reader lowdowns no longer distinguish between local and remote stories.

This commit is contained in:
Fang 2017-04-11 17:01:25 +02:00
parent d769b2f325
commit 59aa18e6d2
3 changed files with 30 additions and 61 deletions

View File

@ -145,10 +145,8 @@
?- -.low
$glyph (ra-low-glyph +.low)
$names (ra-low-names +.low)
$tales (ra-low-tales +.low)
$remco (ra-low-remco +.low)
$confs (ra-low-confs +.low)
$precs (ra-low-precs +.low)
$rempe (ra-low-rempe +.low)
$grams (ra-low-grams +.low)
==
::
@ -185,39 +183,19 @@
(some [s u.h])
==
::
++ ra-low-tales
::x apply tale configs.
::
|= {man/knot cof/(unit config)}
++ ra-low-confs
|= cofs/(map station (unit config))
^+ +>
?~ cof +>(tales (~(del by tales) man))
=+ tal=(fall (~(get by tales) man) *tale)
=. +>.$ sh-abet:(~(sh-low-config sh cli man) shape.tal (fall cof *config))
+>.$(tales (~(put by tales) man tal(shape u.cof)))
::
++ ra-low-remco
|= cofs/(map station config)
^+ +>
=. +> sh-abet:(~(sh-low-remco sh cli (main our.hid)) mirrors cofs)
+>(mirrors (~(uni by mirrors) cofs))
::TODO fix sh-low-remco to print properly.
=/ cogs/_mirrors (~(run by cofs) |=(a/(unit config) (fall a *config)))
=. +>.$ sh-abet:(~(sh-low-remco sh cli (main our.hid)) mirrors cogs)
=. mirrors (~(uni by mirrors) cogs)
+>.$
::
++ ra-low-precs
::x apply new presence.
::
|= {man/knot pes/atlas}
^+ +>
=+ tal=(~(get by tales) man)
?~ tal ~&([%low-precs-know-no-tale man] +>.$)
=+ nel=(~(uni by locals.u.tal) pes)
=. +>.$
?: =(locals.u.tal nel) +>.$
sh-abet:(~(sh-low-precs sh cli man) locals.u.tal nel)
+>.$(tales (~(put by tales) man u.tal(locals nel)))
::
++ ra-low-rempe
|= pas/(map partner atlas)
^+ +>
=+ ner=(~(uni by remotes) pas) ::TODO better uni.
=+ ner=(~(uni by remotes) pas) ::TODO per-partner uni.
?: =(remotes ner) +>.$
=. remotes ner
sh-abet:(~(sh-low-rempe sh cli (main our.hid)) remotes ner)
@ -610,6 +588,7 @@
::
|= paz/(set partner)
?~ paz |
::TODO use mailbox sources.shape
?| (~(has in sources.shape:(~(got by tales) man)) `partner`n.paz)
$(paz l.paz)
$(paz r.paz)

View File

@ -172,7 +172,6 @@
?. (~(has by stories) p.cod)
(ra-evil %talk-no-story)
::x $design with ~ for config signals delete
::TODO be sure to send a deletion %tales lowdown!
(ra-unconfig p.cod)
(ra-config p.cod u.q.cod)
::
@ -266,7 +265,6 @@
^+ +>
=+ soy=(~(get by stories) man)
?~ soy +>.$
=. stories (~(del by stories) man)
pa-abet:~(pa-reform-gone pa man ~ u.soy)
::
++ ra-base-hart
@ -499,30 +497,18 @@
++ ra-welcome
::x brings reader new up to date.
::
::TODO just like weld somehow
|= new/bone
=. +> %- ra-emil
%- zing
%+ turn (~(tap by stories))
|= {k/knot s/story}
^- (list move)
:~ ::x story configurations
[new %diff %talk-lowdown %tales k `shape.s]
::x local presences
[new %diff %talk-lowdown %precs k locals.s]
::x telegrams
[new %diff %talk-lowdown %grams k count.s grams.s]
==
%- ra-emil
:~ ::x remote configurations
[new %diff %talk-lowdown %remco mirrors]
[new %diff %talk-lowdown %confs (~(run by mirrors) some)]
::x remote presences
[new %diff %talk-lowdown %rempe remotes]
[new %diff %talk-lowdown %precs remotes]
::x bound glyphs
[new %diff %talk-lowdown %glyph nak]
::x nicknames
[new %diff %talk-lowdown %names (~(run by folks) some)]
==
::TODO all mailbox %grams!
::
++ ra-think :: publish+review
::x consumes each thought.
@ -724,7 +710,7 @@
=+ old=mirrors
=. mirrors (~(put by mirrors) cuz con)
?: =(mirrors old) +>.$
=. +>.$ (pa-inform %remco mirrors)
=. +>.$ (pa-inform %confs (~(run by mirrors) some))
(pa-report-cabal pa-followers)
::
++ pa-diff-talk-report :: subscribed update
@ -746,10 +732,12 @@
::x delete tay from our subscriptions, then send an updated capal report.
::
|= tay/partner
=. +>
%. pa-followers
pa-report-cabal(sources.shape (~(del in sources.shape) tay))
(pa-inform %tales man `shape)
^+ +>
?. (~(has in sources.shape) tay) +>
=. sources.shape (~(del in sources.shape) tay)
=. mirrors (~(put by mirrors) [our.hid man] shape)
=. +> (pa-inform %confs (strap [our.hid man] `shape))
(pa-report-cabal pa-followers)
::
++ pa-sauce :: send backward
::x turns cards into moves, reverse order, prepend to existing moves.
@ -812,7 +800,7 @@
::x partners we gained/lost, and send out an updated cabal report.
::
|= cof/config
=. +>.$ (pa-inform %tales man `cof)
=. +>.$ (pa-inform %confs (strap [our.hid man] `cof))
=+ ^= dif ^- (pair (list partner) (list partner))
=+ old=`(list partner)`(~(tap in sources.shape) ~)
=+ new=`(list partner)`(~(tap in sources.cof) ~)
@ -821,10 +809,13 @@
=. +>.$ (pa-acquire p.dif)
=. +>.$ (pa-abjure q.dif)
=. shape cof
=. mirrors (~(put by mirrors) [our.hid man] cof)
(pa-report-cabal pa-followers)
::
++ pa-reform-gone
=. . (pa-inform %tales man ~)
=. stories (~(del by stories) man)
=. mirrors (~(del by mirrors) [our.hid man])
=. . (pa-inform %confs (strap [our.hid man] ~))
=. . (pa-report-cabal pa-followers)
(pa-abjure (~(tap in sources.shape)))
::
@ -841,7 +832,8 @@
^+ +>
=/ nol (~(put by locals) her saz)
?: =(nol locals) +>.$
=. +>.$ (pa-inform %precs man nol)
=. +>.$ (pa-inform %precs (strap [%& our.hid man] nol))
=/ ner (~(put by remotes) [%& our.hid man] nol)
(pa-report-group(locals nol) pa-followers)
::
++ pa-remind :: remote presence
@ -854,7 +846,7 @@
=/ buk (~(uni by remotes) rem) ::TODO drop?
=. buk (~(put by buk) tay loc)
?: =(buk remotes) +>.$
=. +>.$ (pa-inform %rempe buk)
=. +>.$ (pa-inform %precs buk)
(pa-report-group(remotes buk) pa-followers)
::
++ pa-start :: start stream

View File

@ -73,10 +73,8 @@
:: this will aid with ++sh's printing.
$% {$glyph (jug char (set partner))} :: new bindings
{$names (map ship (unit human))} :: new identities
{$tales (pair knot (unit config))} :: changed config
{$remco (map station config)} :: remote configs
{$precs (pair knot atlas)} :: changed presence
{$rempe (map partner atlas)} :: remote presences
{$confs (map station (unit config))} :: changed configs
{$precs (map partner atlas)} :: changed presences
{$grams (pair knot (pair @ud (list telegram)))} :: new grams
== ::
++ speech :: narrative action