However, I'm not sure if Org markup lends itself to structuring that would allow proper diffing—even with just the headings.
Difftastic: A diff that understands syntax
141–150 of 224 posts
Re: Difftastic: A diff that understands syntax
#142Does a `magit` plugin exist for Emacs users? The author of this package is also the author of a couple of popular Emacs packages but I did not see any mention of Emacs.
Re: Difftastic: A diff that understands syntax
#143Personally I long for a syntactic merge-tool. Every time Syncthing hiccups for some reason, I'm up for a merge session with my Org-mode files, in the vein of: ‘These properties look just like those ones, only with a different timestamp... Oh lookie, and the heading is totally changed. Let me merge this new heading all over the old one, and then pop in the old one after it.’ Dammit, it's just a whole new heading added…
e.g. A merge that knows properties files support the same property added in different places but only once is needed. And another strategy if order is significant.
Cool to have an HTML merge that recognises the tree structure and supports merging tags and having the indentation follow some rules.
I believe git supports merge strategies, its been on my todo list forever.
Re: Difftastic: A diff that understands syntax
#144This looks really cool and I can't wait to try it, tho... a bit of a PITA to get running. ;) Took a while to figure out how to build, and had to install 400MB of dependencies first.... Edit: And after installing cargo, watching it fail to build, then determining I must need a newer version of cargo, so I built that from source... it fails. Apparently I need to install `rustc-mozilla` and not `rustc`. "obviously". Thi…
Re: Difftastic: A diff that understands syntax
#145Re: Difftastic: A diff that understands syntax
#146Earlier quoted context omitted.
The problem is when a file also needs to be normalized - e.g. object keys in a different order, YAML syntax expansion. It can be very useful to indicate when a JSON file is identical to another JSON file but some of the properties or array items are out of order and that requires more in-depth knowledge of the data format. Let's not mention that you could UTF-8 encode characters or write out the same character using…
I'm not too familiar with YAML, so can't answer to that. But re JSON: > object keys in a different order They can't be "in a different order" as JSON keys are not ordered. They can be whatever order, and would still be considered the same. > array items are out of order Then it's different, as JSON arrays are ordered. ["a", "b"] is not the same as ["b", "a"] while {a: 1, b: 1} and {b: 1, a: 1} is the same. > you coul…
Re: Difftastic: A diff that understands syntax
#147Earlier quoted context omitted.
The problem is when a file also needs to be normalized - e.g. object keys in a different order, YAML syntax expansion. It can be very useful to indicate when a JSON file is identical to another JSON file but some of the properties or array items are out of order and that requires more in-depth knowledge of the data format. Let's not mention that you could UTF-8 encode characters or write out the same character using…
I'm not too familiar with YAML, so can't answer to that. But re JSON: > object keys in a different order They can't be "in a different order" as JSON keys are not ordered. They can be whatever order, and would still be considered the same. > array items are out of order Then it's different, as JSON arrays are ordered. ["a", "b"] is not the same as ["b", "a"] while {a: 1, b: 1} and {b: 1, a: 1} is the same. > you coul…
This is what GP is saying, I'm pretty sure. Object member order is non-semantic in json, so in order to do a semantic diff (one that understands structure), you need to canonicalize the order of the two sides. Simply diffing the output of jq doesn't do that, because (afaik) jq doesn't alter the order.
Basically, if you want this to come up the same:
{"a":"b","c":"d"}
{"c":"d","a":"b"}
you need more than just `diff $(jq) $(jq)`.Can argue about whether a tool like difftastic should do that, I guess, but I would personally lean towards that it should be smart enough to see this because it's precisely the sort of thing that both humans and line-based diff can be awful at seeing.
Re: Difftastic: A diff that understands syntax
#148Earlier quoted context omitted.
Same here. Looked into repo -> no binary in release or Github actions spinned up a Ubuntu 18.04 instance -> git clone, git checkout 0.24.0 installed rust using curl | sh method build fails: https://termbin.com/29xy removed the instance and gonna check it again 6 months later
In another comment you're asking about vim support. So let me get this straight: You're using vim, yet you're unable to resolve the error message = note: /usr/bin/ld: cannot find Scrt1.o: No such file or directory /usr/bin/ld: cannot find crti.o: No such file or directory Have you tried googling for "ubuntu crti.o: No such file or directory" ?
Re: Difftastic: A diff that understands syntax
#149Earlier quoted context omitted.
This tool is built on tree-sitter ( https://tree-sitter.github.io/tree-sitter/ ), so presumably it doesn't need to maintain parsers at all. I've thought before this is how diffing should be done, and speculated that tree-sitter would make it more feasible. At this point, whenever I think some language-aware tool ought to exist, my first thought is "Does the language server protocol or tree-sitter make this more feasi…
Someone still has to build and maintain the parsers, you are just outsourcing this. And I added a bit to my comment, I tend to believe that parsing is the easy part, but that is admittedly more a gut feeling and not based on any real knowledge of that problem space.
Languages usually change slowly, though, so once a good baseline grammar is in place, maintenance is unlikely to be a huge load.
Furthermore, with tools like tree-sitter and the language server protocol, multiple communities benefit from their continued existence, so there's a bigger pool of contributors to the parser.
Re: Difftastic: A diff that understands syntax
#150Earlier quoted context omitted.
Same here. Looked into repo -> no binary in release or Github actions spinned up a Ubuntu 18.04 instance -> git clone, git checkout 0.24.0 installed rust using curl | sh method build fails: https://termbin.com/29xy removed the instance and gonna check it again 6 months later
In another comment you're asking about vim support. So let me get this straight: You're using vim, yet you're unable to resolve the error message = note: /usr/bin/ld: cannot find Scrt1.o: No such file or directory /usr/bin/ld: cannot find crti.o: No such file or directory Have you tried googling for "ubuntu crti.o: No such file or directory" ?
Depending on the project, there is a certain threshold of trying-to-make-something-work which I'm willing to undertake in order to test an app.
But you are right. I'm sorry if my OG comment may come arrogant to the devs who do stuff for free. (♥ to the devs)
[edit]: ok, I tried again, `sudo apt update && sudo apt install build-essential` before installing rust and `cargo install`ing.
Error again: