4 ms·
> 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 hiera
by amelius 10y ago
> 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.
- Kristine1975 10y agoLaTeX is also hierarchical, though. Some is explicit (environments) and some is implicit (\chapter, \section etc).
- amelius 10y agoYou 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.
- wheresmypwd 10y agoIt's a hierarchy like html, where p tags have implicit close tags.
- nateps 10y agoThis 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.
- amelius 10y agoThe 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.
- nateps 10y agoAgreed. 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.
- tveita 10y agoReminds me of the operational transformation used in Wave. http://www.codecommit.com/blog/java/understanding-and-applying-operational-transformation 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.