Re:Collaborative Text Editing Without CRDTs or OT
by josephg on Thursday May 22, 2025 @02:51AM
(#44059418)
> This is why CRDTs are not more widespread, because they only fix the problem you think you have, not the problem you actually have, which is to fix conflicts in a way that preserves data, its validity and meaning.
I’ve been saying this for years, but there’s no reason you couldn’t make a crdt which emitted conflict ranges like git does. CRDTs have strictly more information than git when merging branches. It should be pretty easy to make a crdt which has a “merge and emit conflicts” mode for merging branches. It’s just nobody has implemented it yet.
(At this point I’ve been saying this for about 5 years. Maybe I need to finally code this up if only to demonstrate it)
Re:Collaborative Text Editing Without CRDTs or OT
by hansworst on Thursday May 22, 2025 @03:58AM
(#44059778)
Automerge has this: https://automerge.org/automerge/api-docs/js/functions/getCon...
Re:Collaborative Text Editing Without CRDTs or OT
by josephg on Thursday May 22, 2025 @04:30AM
(#44059985)
Reading the docs, it looks like that only works for object keys that have been concurrently set to different values. Not text documents.
Re:Collaborative Text Editing Without CRDTs or OT
by SkiFire13 on Thursday May 22, 2025 @05:58AM
(#44060478)
That might be an improvement over git, but not automatically fixing the conflicts will be a dealbreaker for most people.
Fundamentally people want something that automatically fixes conflicts, and do so the way they expect it to, but this just doesn't exist yet.
Re:Collaborative Text Editing Without CRDTs or OT
by motorest on Friday May 23, 2025 @01:28AM
(#44070106)
> I’ve been saying this for years, but there’s no reason you couldn’t make a crdt which emitted conflict ranges like git does.
I don't get your point. The C in CRDT stands for "conflict-free". Why would a CRDT have conflict ranges?
Re:Collaborative Text Editing Without CRDTs or OT
by josephg on Friday May 23, 2025 @02:26AM
(#44070424)
Because automatic merging isn’t always perfect. Especially when merging long lived changes to code in git, sometimes you need manual intervention to figure out the result. And we need to manually intervene sometimes.
Imagine if every git merge conflict you got was resolved automatically by picking one side. Most of the time it would do the wrong thing, sometimes even leading to code that fails to compile. Imagine then you were not there ready to fix the issue, it would lead to even more chaotic results!
This is why CRDTs are not more widespread, because they only fix the problem you think you have, not the problem you actually have, which is to fix conflicts in a way that preserves data, its validity and meaning.
And arguably they make this issue even worse because they restrict the ways you can solve these conflicts to only those that can be replicated deterministically.