Hacker News new | past | comments | ask | show | jobs | submit login

I think CRDTs are super cool, and likely future of offline-first experiences. My main issue with Taskpaper documents in iCloud drive has been the awful conflict resolution experience, and would love an industry standard way of doing the merges automatically, in a syntax-aware way.

Funny you should post this article now, as I'm just getting ready to start on this work myself, would love recommendations about how to do this automatic conflict resolution on semi-structured text files if anyone has some!




Yes, this is an interesting topic. In Motif, we are using MDX for the page content, which has an associated AST and a nice set of tools (Unified.js [1]) to manipulate it. We plan to use this to track semantic changes in the content, and act in an appropriate way. For instance, if the same block of JS code is changed, instead of merging, we can prompt the user with a diff and allow them to edit the final version manually (effectively transitioning from a synchronous to an asynchronous workflow). In simpler scenarios, such as text markup, we can use heuristics like the ones presented in Peritext [2].

[1] https://unifiedjs.com/ [2] https://www.inkandswitch.com/peritext/


Definitely seems like an asynchronous workflow, kind of like with git, is the way. I wonder whether something like this for markdown could be doable, with a GUI being able to render not just the markdown in either of the conflicting versions, but with an editing suggestion, like the ones in Google Docs. Not sure whether this would benefit from an extension of the MDX syntax, or could be handled by the runtime diff of the ASTs.


Hey, Motif looks really interesting, but i'm a bit confused.

Could you please explain how Motif touches the concepts of 'SSG', 'CMS', 'IDE'?


Sure! Motif is an MDX editor running in the browser, with a full-fledged JS build system inside (based on esbuild). It allows you to publish your content instantly (in fact, as a Next.js app, deployed on Vercel, benefitting from things like ISR to make your pages fast, SEO-ready, etc.). For instance, the entire Motif website is built on Motif, including the blog, as well as our docs: https://motif.land/docs.


Cool, thanks!


> would love an industry standard way of doing the merges automatically

We've been working on a standard for merging conflicts over in the https://braid.org group! This will let different tools (like filesystems and web apps) interoperate with p2p synchronized state.

We've made great progress already— JosephG's Diamond-Types algorithm can synchronize perfectly with Yjs, Automerge, and Sync9, just by swapping out a single function in the source code. Standardized sync is possible!

Come join us if you're interested! We have open video meetings every two weeks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: