Removed ++timed from talk-guardian, no longer in use.
== ::
++ strap |*({k/* v/*} (~(put by *(map _k _v)) k v))
--
-|%
-:: old protocol workaround door
-++ timed
- ::x? seems hacky. if old, should be removed in "new talk", right?
- ::x? seems like it's used for adding/dealing with "fake"/workaround ships
- ::x? with datetimes in their status. but why?
- ::x looking at ++pa-remind, this can safely be deleted when breaching state.
- ::
- ::x a: stations with ships and their status.
- |_ a/(map partner atlas) :: XX (map partner (pair @da atlas))
- ++ strip
- ::x removes workaround ships from all partner's status lists.
- ::
- (~(run by a) |=(b/atlas (~(del by b) `@p`%timed-sub)))
- ::
- ++ put :: XX put:by
- ::x adds workaround ship to d with pretty-printed date c in its status,
- ::x then adds it to a with key/partner b.
- ::
- |= {b/partner c/@da d/atlas}
- =/ sta/status [%gone [~ (some (scot %da c))]]
- (~(put by a) b (~(put by d) `@p`%timed-sub sta))
- ::
- ++ decode-status
- ::x attempts to retrieve datetime from status (as inserted by put:timed).
- ::
- |= a/status ^- (unit @da)
- ?. ?=({$gone $~ $~ tym/@t} a) ~
- => .(a `{$gone $~ $~ tym/@t}`a)
- (slaw %da tym.a)
- ::
- ++ uni
- ::x union of two station-shipstatus maps.
- ::
- |= b/_a ^+ a
- :: XX efficiency
- %- ~(uni by a)
- %- ~(urn by b)
- |= nb/{p/partner q/atlas}
- ?. (~(has by a) p.nb) q.nb
- =/ qna (~(got by a) p.nb)
- :: XX p.qna p.q.nb
- =/ pqna (biff (~(get by qna) `@p`%timed-sub) decode-status)
- ?~ pqna q.nb
- =/ pqnb (biff (~(get by q.nb) `@p`%timed-sub) decode-status)
- ?~ pqnb qna
- ?: (gth u.pqna u.pqnb) qna
- ?: (gth u.pqnb u.pqna) q.nb
- :: unfortunately, multiple reports on the same channel can
- :: be sent on the same event, necessitating last-wins
- :: ~| uni-timed+[n.a n.b]
- :: ?> =(n.a n.b)
- q.nb
- --
---
::
|_ {hid/bowl house}
::
