3 ms·
I've been doing some tinkering in this area lately, and I was also looking for an explanation of the string editing mechanics in this algorithm. The hardest pa
by nkohari 10y ago
I've been doing some tinkering in this area lately, and I was also looking for an explanation of the string editing mechanics in this algorithm.
The hardest part there is retaining the intent of the simultaneous edits -- the I in the "PCI Consistency model" as described by the WOOT paper. Previous algorithms (LSEQ, WOOT, Doctree, Logoot, etc.) devoted to simultaneous conflict-free editing of text have solved this through relatively complex key generation strategies. I've only done a cursory read of this paper, but this algorithm doesn't seem to implement an alternative solution.
- vidarh 10y agoIt's not trying to do string editing at all. It's operating on JSON de-serialized to maps and lists. String editing isn't a valid operation on the data model they specify. You can replace a string value with another. Section 3.3 outlines the allowed operations, which basically allows you to obtain an iterator, move it, insert, delete and retrieve keys and values. You could certainly model string editing in it, by putting each character into it as a separate value, but then as you point out it'd probably not do very well because it doesn't contain heuristics to model intent of text editing, but to model changes to a JSON object hierarchy while avoiding loss of data. You could use this algorithm combined with one intended for string-editing to improve on it for values where partial edits of the values matters, certainly.
- nicolagreco 10y agowouldn't a string just be a list of chars?