4 ms·
As I said above, I imagine keeping commits. Think of them like checkpoints in a race. Any typed character will be between two commits - so git log and git blame
by josephg 3y ago
As I said above, I imagine keeping commits. Think of them like checkpoints in a race. Any typed character will be between two commits - so git log and git blame can still work just fine. They just operate on a different data structure internally.
Merging is also fine. How do you think CRDTs work? You know merging is the entire point, right?
I agree that the system needs to handle both synchronous edits (peer programming) and asynchronous edits (the kind of editing we do now with git). CRDTs can handle separate concurrent branches just fine. It’s just none of the existing crdt libraries support branches.
You’re right that rebase is weird in CRDTs, but I think we can still build it if we need to. Rebase is mostly used in git to work around one of git’s design flaws: Git is never sure if commits should represent the actual history of changes, or the semantic history of merged tickets. But a better system could just separate those ideas anyway.
Yes, it is a PhD level problem right now. But so was diff-match-patch a few years ago. I’m an expect in this field. And I believe we now know how to solve all the sub problems here - all but one: how do we actively generate conflicts from asynchronous edits in a crdt? That needs to be figured out first.
- tsegratis 3y agoNice idea What if I'm trying to fix a bug, and so testing a file, while someone else's edits are being applied to it. That would be painful CRDT would be great in many ways, but I think for programming I would most often want to reduce the variables, and not see other people's edits until commit/merge Would CRDT still be useful in that context?
- josephg 3y agoYeah. In the tool I’m imagining, you can just each edit in a separate branch and merge when you want to, just like you do now. The data on disk can be a crdt - but that doesn’t mean other users’ changes need to be merged as soon as they’re made.