News for hackers. Stuff that matters.
Re:Faster CRDTs: An Adventure in Optimization by Majromax on Saturday July 31, 2021 @10:41AM (#28018525)
Ah, I see. I had thought that the consolidation gave a batched update with a single ID, so 'h' + 'ell' + 'o' would have IDs of 1, 2, and 3 respectively. That would have made an editing conflict in the middle of 'ell' impossible.
Re:Faster CRDTs: An Adventure in Optimization by josephg on Saturday July 31, 2021 @11:09AM (#28018761)
Ah that makes sense! Concurrent changes are one thing, but concurrent changes are rare. The big problem if we did it that way is that it would become impossible to insert in the middle of "ell", because we wouldn't be able to name any of those internal positions.

To get around that we assign a sequential ID for every inserted character, regardless of how they're typed or stored. Typing "hello" would assign IDs 1-5 even if you paste "hello" from the clipboard.