Add logic for rebuilding state that refers to messages by numbers.

Because count used to be incorrect, messages are being referred to by incorrect indices. This rebuilds all count-dependent data.
This commit is contained in:
Fang 2017-12-11 00:53:39 +01:00
parent 0a24fd09fb
commit 0e04242148
2 changed files with 18 additions and 3 deletions

View File

@ -123,9 +123,18 @@
%- pre-bake
ta-done:ta-init:ta
=. stories.u.old
%- ~(run by stories.u.old)
|= s/story
s(count (lent grams.s))
%- ~(urn by stories.u.old)
|= {nom/naem soy/story}
=+ %+ 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)
[~ ..prep(+<+ u.old)]
::
::> ||

View File

@ -118,6 +118,12 @@
^- (quip move _..prep)
?~ old
ta-done:ta-init:ta
=* o u.old
=. count.o (lent grams.o)
=+ %+ reel grams.o
|= {t/telegram c/@ud k/(map serial @ud)}
[+(c) (~(put by k) uid.t c)]
=. known.o k
[~ ..prep(+<+ u.old)]
::
::> ||