News for hackers. Stuff that matters.
Re:A Conflict-Free Replicated JSON Datatype by amelius on Wednesday August 17, 2016 @05:20AM (#12303346)
> String editing is brushed over in the paper.

LaTeX source code is basically just a string. It would have been more interesting to see this applied to a hierarchical data-structure, such as HTML, where e.g. elements are nested inside markup nodes.

Re:A Conflict-Free Replicated JSON Datatype by Kristine1975 on Wednesday August 17, 2016 @08:02AM (#12304001)
LaTeX is also hierarchical, though. Some is explicit (environments) and some is implicit (\chapter, \section etc).
Re:A Conflict-Free Replicated JSON Datatype by nateps on Wednesday August 17, 2016 @12:38PM (#12305957)
This is true. To preserve document validity and user intent, an algorithm designed for collaborative string editing will not always work correctly when applied to a markup document such as LaTeX, HTML, or Markdown directly.

It is similar to how you need a JSON type to represent the kinds of edits you can do to a JSON document rather than editing JSON text as a string. The kinds of edits done in text better map to editing a markup language like LaTeX or Markdown than JSON, so you are less likely to notice these issues right away. But if the type is designed specifically for the markup language, user intent will be better maintained through concurrent edits and the document will never end up in an invalid format.

Re:A Conflict-Free Replicated JSON Datatype by amelius on Wednesday August 17, 2016 @12:50PM (#12306087)
The same holds for LaTeX stored in git, yet a lot of people use this combination without problems.

It is a hack, in a sense, but one without serious consequences.

Re:A Conflict-Free Replicated JSON Datatype by nateps on Wednesday August 17, 2016 @01:32PM (#12306500)
Agreed. It is likely to work pretty well with a format that is very close to plain text like LaTeX most of the time.

Git's resolution strategy is diff-match-patch of text, so it is a good analogy. However, the thing that Git does that CRDTs and OT string types generally do not is create conflicts requiring user intervention before proceeding.

If you are realtime editing concurrently, this might be acceptable, because the users might be able to see the conflict and resolve it. However, I'd say a clear UI for conflicts is the key reason why Git is able to more intuitively and safely deal with concurrent edits of non-plain text using a plain text algorithm.

Re:A Conflict-Free Replicated JSON Datatype by amelius on Wednesday August 17, 2016 @08:25AM (#12304114)
You already indicate that the LaTeX model is not a "clean" hierarchy. So I highly doubt they modeled it like that in JSON, but it could be possible.
Re:A Conflict-Free Replicated JSON Datatype by wheresmypwd on Wednesday August 17, 2016 @02:32PM (#12307109)
It's a hierarchy like html, where p tags have implicit close tags.
Re:A Conflict-Free Replicated JSON Datatype by tveita on Wednesday August 17, 2016 @11:35AM (#12305458)
Reminds me of the operational transformation used in Wave.

http://www.codecommit.com/blog/java/understanding-and-applyi...

I see they mention it in the paper, saying the difference is that Wave requires a central server to impose a total ordering of operations.