3 ms·
> it shouldn't be hard to avoid typing in the same place [...] if it happens, the person editing will notice within two seconds and just wait a second for the o
by laughinghan 7y ago
> it shouldn't be hard to avoid typing in the same place [...] if it happens, the person editing will notice within two seconds and just wait a second for the other to finish
But if it does happen, it needs to result in a consistent state in both people's editors, right?
> In a more realistic example, it would be changing "its" to "it's" concurrently with changing the word to "that". There is no good solution (the server wouldn't know which person to ignore: the apostrophe inserter or the replacer)
Discarding the apostrophe seems like a good solution to me, what's wrong with it?
As long as, if the replacer hits Undo, "it's" is what is restored. (Not sure if any existing algorithms do so, but I believe it's possible and am intending for the collaborative editor I'm designing to do so. Haven't implemented it yet though, so who knows.)
- lucb1e 7y ago> it needs to result in a consistent state in both people's editors Ah, that makes sense :). Stupid question indeed. I figured the server is just the authority and whatever order it arrives there is the truth. But we only send deltas (we must, because how else will the client still know where to put the cursor after applying a new version) and so we can't use that. Makes sense.
- munificent 7y agoIt's not a stupid question if you learned something from it.