Small changes, TODOs and miscellaneous cleanup.

This commit is contained in:
Fang 2017-04-04 21:55:05 +02:00
parent 97a32fca79
commit 0e850fc8bd
3 changed files with 21 additions and 27 deletions

View File

@ -138,13 +138,13 @@
|= low/lowdown |= low/lowdown
^+ +> ^+ +>
?- -.low ?- -.low
$glyph (ra-low-glyph +.low) $glyph (ra-low-glyph +.low)
$names (ra-low-names +.low) $names (ra-low-names +.low)
$tales (ra-low-tales +.low) $tales (ra-low-tales +.low)
$remco (ra-low-remco +.low) $remco (ra-low-remco +.low)
$precs (ra-low-precs +.low) $precs (ra-low-precs +.low)
$rempe (ra-low-rempe +.low) $rempe (ra-low-rempe +.low)
$grams (ra-low-grams +.low) $grams (ra-low-grams +.low)
== ==
:: ::
++ ra-low-glyph ++ ra-low-glyph

View File

@ -8,15 +8,14 @@
::TODO remove old/unused code ::TODO remove old/unused code
::TODO improve naming. way->wir, rad->rep, etc. ::TODO improve naming. way->wir, rad->rep, etc.
::TODO tidiness, remove unnecessary ~&, etc. ::TODO tidiness, remove unnecessary ~&, etc.
::TODO better presence notifications. typing, idle...
::
::TODO crash on pokes/peers we do not expect
::TODO send %names report when a reader first connects
::TODO merge follower groups into followers
::TODO rename cores. ra->ta (transaction), pa->to (story).
::TODO maybe ensure every arm has a mini-description at :57 too? ::TODO maybe ensure every arm has a mini-description at :57 too?
::TODO maybe prefix all printfs and other errors with %talk? ::TODO maybe prefix all printfs and other errors with %talk?
:: ::
::TODO sending remotes and mirrors alongside locals and shape no longer makes
:: any sense, does it?
::TODO crash on pokes/peers we do not expect
::TODO rename cores. ra->ta (transaction), pa->to (story).
::
/? 310 :: hoon version /? 310 :: hoon version
/- talk, sole :: structures /- talk, sole :: structures
/+ talk, sole, time-to-id, twitter :: libraries /+ talk, sole, time-to-id, twitter :: libraries
@ -31,6 +30,7 @@
=> |% :: data structures => |% :: data structures
++ house :: ++ house ::
$: stories/(map knot story) :: conversations $: stories/(map knot story) :: conversations
::TODO maybe also store locals/shapes for easier syncing with readers
remotes/(map partner atlas) :: remote presence remotes/(map partner atlas) :: remote presence
mirrors/(map station config) :: remote config mirrors/(map station config) :: remote config
::TODO rename to readers? ::TODO rename to readers?
@ -436,7 +436,6 @@
?. (team our.hid her) ?. (team our.hid her)
~& [%foreign-reader her] ~& [%foreign-reader her]
+> +>
~& [%subscribed-reader ost.hid]
(ra-welcome(general (~(put in general) ost.hid)) ost.hid) (ra-welcome(general (~(put in general) ost.hid)) ost.hid)
::?. ?=({@ *} pax) ::?. ?=({@ *} pax)
:: (ra-evil %talk-bad-path) :: (ra-evil %talk-bad-path)
@ -450,11 +449,11 @@
?. (pa-visible:soy her) ?. (pa-visible:soy her)
(ra-evil %talk-no-story) (ra-evil %talk-no-story)
::TODO? or (pa-sauce ost.hid [%quit ~]~) ? ::TODO? or (pa-sauce ost.hid [%quit ~]~) ?
=^ who +>.$ (ra-human her) ::TODO? can we safely move this down? =^ who +>.$ (ra-human her)
::x send current data to bring her up to date. ::x send current data to bring her up to date.
=. soy (pa-report-group:soy ost.hid ~ ~)
=. soy (pa-report-cabal:soy ost.hid ~ ~) =. soy (pa-report-cabal:soy ost.hid ~ ~)
=. soy (pa-first-grams:soy her t.pax) ::=. soy (pa-report-group:soy ost.hid ~ ~) ::TODO reenable if pa-not=dif
=. soy (pa-first-grams:soy her t.pax) ::x also adds new sub to followers
::x add her status to presence map. ::x add her status to presence map.
=. soy (pa-notify:soy her %hear who) =. soy (pa-notify:soy her %hear who)
::x apply changes to story. ::x apply changes to story.
@ -683,7 +682,7 @@
^+ +> ^+ +>
::x verify we are supposed to receive reports from cuz. ::x verify we are supposed to receive reports from cuz.
?. (~(has in sources.shape) [%& cuz]) ?. (~(has in sources.shape) [%& cuz])
~& [%pa-diff-unexpected cuz rad] ~& [%pa-diff-unexpected cuz -.rad]
+> +>
?- -.rad ?- -.rad
$cabal (pa-cabal cuz +.rad) $cabal (pa-cabal cuz +.rad)
@ -749,7 +748,6 @@
$| !! $| !!
$& :: ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]] $& :: ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]]
:_ ~ :_ ~
~& [%pa-acquire /[man]/(scot %p p.p.tay)/[q.p.tay]]
:* %peer :* %peer
/friend/show/[man]/(scot %p p.p.tay)/[q.p.tay] /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
[p.p.tay %talk-guardian] [p.p.tay %talk-guardian]
@ -788,11 +786,9 @@
::x add her status to our presence map. if this changes it, send report. ::x add her status to our presence map. if this changes it, send report.
:: ::
|= {her/ship saz/status} |= {her/ship saz/status}
~& [%b-pa-notify man her saz]
^+ +> ^+ +>
=/ nol (~(put by locals) her saz) =/ nol (~(put by locals) her saz)
?: =(nol locals) +>.$ ?: =(nol locals) +>.$
~& [%notifying pa-followers nol]
=. +>.$ (pa-inform %precs man nol) =. +>.$ (pa-inform %precs man nol)
(pa-report-group(locals nol) pa-followers) (pa-report-group(locals nol) pa-followers)
:: ::
@ -818,7 +814,7 @@
::TODO use =; lab/{dun/? end/@u zeg/(list telegram)} ::TODO use =; lab/{dun/? end/@u zeg/(list telegram)}
=- :: ~& [%pa-start riv lab] =- :: ~& [%pa-start riv lab]
=. +>.$ =. +>.$
(pa-sauce ost.hid [[%diff %talk-report %grams q.lab r.lab] ~]) (pa-sauce ost.hid [[%diff %talk-report %grams q.lab r.lab] ~])
?: p.lab ::x? dun never gets changed, so always | ? ?: p.lab ::x? dun never gets changed, so always | ?
(pa-sauce ost.hid [[%quit ~] ~]) (pa-sauce ost.hid [[%quit ~] ~])
+>.$(followers (~(put by followers) ost.hid riv)) +>.$(followers (~(put by followers) ost.hid riv))
@ -969,6 +965,7 @@
~& [%b-peer pax src.hid ost.hid] ~& [%b-peer pax src.hid ost.hid]
^+ [*(list move) +>] ^+ [*(list move) +>]
~? !(team src.hid our.hid) [%peer-talk-stranger src.hid] ~? !(team src.hid our.hid) [%peer-talk-stranger src.hid]
?: ?=({$sole *} pax) ~&(%broker-no-sole !!)
ra-abet:(ra-subscribe:ra src.hid pax) ra-abet:(ra-subscribe:ra src.hid pax)
:: ::
++ poke-talk-command :: accept command ++ poke-talk-command :: accept command

View File

@ -57,15 +57,13 @@
{$group register} :: presence {$group register} :: presence
== :: == ::
++ lowdown :: changed shared state ++ lowdown :: changed shared state
::TODO change these so that they're always just the diff. ::TODO change these so that they're always just the diff?
:: re-check existing implementations too!
:: this will aid with ++sh's printing. :: this will aid with ++sh's printing.
$% {$glyph (jug char (set partner))} :: new bindings $% {$glyph (jug char (set partner))} :: new bindings
{$names (map ship (unit human))} :: new identities {$names (map ship (unit human))} :: new identities
::TODO cabal, or merge its contents into tale's config
:: basically we just want to merge the ship sets, right?
{$tales (pair knot (unit config))} :: changed config {$tales (pair knot (unit config))} :: changed config
{$remco (map station config)} :: remote configs {$remco (map station config)} :: remote configs
::TODO merge remote and local presences.
{$precs (pair knot atlas)} :: changed presence {$precs (pair knot atlas)} :: changed presence
{$rempe (map partner atlas)} :: remote presences {$rempe (map partner atlas)} :: remote presences
{$grams (pair knot (pair @ud (list telegram)))} :: new grams {$grams (pair knot (pair @ud (list telegram)))} :: new grams
@ -85,7 +83,6 @@
{$ire p/serial q/speech} :: in-reply-to {$ire p/serial q/speech} :: in-reply-to
{$lin p/? q/@t} :: no/@ text line {$lin p/? q/@t} :: no/@ text line
{$mor p/(list speech)} :: multiplex {$mor p/(list speech)} :: multiplex
::TODO? what are p and q supposed to be?
{$app p/@tas q/@t} :: app message {$app p/@tas q/@t} :: app message
$: $api :: api message $: $api :: api message
service/@tas :: service name service/@tas :: service name