3 ms·
I don't quite understand what's going on then because I swear I just read in one of those threads last week that even the best text automerger still needs manua
by refulgentis 5y ago
I don't quite understand what's going on then because I swear I just read in one of those threads last week that even the best text automerger still needs manual intervention to avoid creating nonsense...which, to be honest, sounded off because I thought this whole thing was popularized by Google Docs? Wave? and it didn't have that issue
- josephg 5y agoCan you link the other comment? Its hard to know what you're talking about without that context. In any case, you can't use a text "automerger" to collaboratively edit JSON text. (Whats an "automerger"?) To understand why, suppose we had an empty (JSON) list: []. Two users concurrently inserted two items, "a" and "b". If those inserts get translated into string inserts, you end up with a JSON string containing ["a""b"] - which is a syntax error! The trick to making this work correctly is that the CRDT / OT system needs to understand that you're editing a list. Don't collaboratively edit the JSON string. Collaboratively edit a list then JSON.stringify the result.
- lewisjoe 5y agoThere's a possibility he's talking about what I wrote about CRDTs for syntax trees - https://writer.zohopublic.com/writer/published/grcwy5c699d67b9c444219b60cdb90ccbabc7 https://writer.zohopublic.com/writer/published/grcwy5c699d67... Related HN thread: https://news.ycombinator.com/item?id=29433896 https://news.ycombinator.com/item?id=29433896
- mlajtos 5y ago> the best text automerger still needs manual intervention to avoid creating nonsense AFAIK the best production-ready CRDT solution for text is Yjs [0], and in some specific cases, the result of the merge might be something unexpected (one example [1]). However, there is research-quality CRDT called Peritext [2] which is specifically designed to handle styled text in an intuitive way, so the merge is more predictable. [0]: https://github.com/yjs/yjs https://github.com/yjs/yjs [1]: https://github.com/yjs/yjs/issues/382 https://github.com/yjs/yjs/issues/382 [2]: https://www.inkandswitch.com/peritext/ https://www.inkandswitch.com/peritext/