News for hackers. Stuff that matters.
Re:A New Era for Mechanical CAD by zokier on Tuesday June 15, 2021 @02:02PM (#27519125)
GumTree does AST level diffing, hypothetically one could build VCS on top of that. That would work for binary files as long as they are parseable to some sort of sensible AST.

https://github.com/GumTreeDiff/gumtree

Re:A New Era for Mechanical CAD by aardvark179 on Tuesday June 15, 2021 @05:02PM (#27521454)
I worked on this type of problem in the context of structured data in a version managed database, and you need more than just an AST.

These types of systems have lots of extra cross dependencies and complexities so to resolve changes you need enough to effectively replay changes from one branch onto another. You’ll find points where this will not work and at that point you need to be able to present the user with self consistent alternatives to choose between, and a way to safely save and recover the other data while they do this. That goes through the entire application stack and UI.

The stuff I worked on all worked, but every application and customer that built on our core needed to develop custom rules for their work flows, and I’m not sure many ever did.

Re:A New Era for Mechanical CAD by zokier on Tuesday June 15, 2021 @05:31PM (#27521773)
> you need to be able to present the user with self consistent alternatives to choose between

That seems very high bar to aim for compared to git (and other traditional VCS), which do not ensure that the end-result of a merge (or rebase) is in any way sensible.

Re:A New Era for Mechanical CAD by aardvark179 on Tuesday June 15, 2021 @06:17PM (#27522271)
It is a high bar, but consider what happens when you get an inconstant merge. With text representing a program you get a compiler or interpreter error and can view and edit the text to fix things up. With something like a CAD drawing you may not be able to open the file, or it might be almost incomprehensible to the user (if you broke coordinate transforms or accidentally combined sub assemblies or something). If you are really unlucky you end up with something that looks okay but subtly breaks the application in a way you will not notice for a long time, and then it’s going to be hard to fix.

Oh, and you need to implement this for every file type.