Live data from Hacker News

Difftastic: A diff that understands syntax

github.com

91–100 of 224 posts

Re: Difftastic: A diff that understands syntax

#91
post #66
post #64

good idea, but so dangerous though

Why?

because it's an automated piece of software making decisions about what is an "equal diff" and what is a "difference diff" because a diff no longer means just a change, it now has to be a meaningful enough change.. If you removed something like `if (true)` or whatever, that's still a diff that could have some importance and/or unknown consequences. I appreciate the value, but the fact that it allows refactoring to be a non-diff would worry me in the long run I think.

Re: Difftastic: A diff that understands syntax

#98

I really like the idea of focusing on producing patches for human consumption. I studied the problem of merging AST-level patches during my PhD ( https://github.com/VictorCMiraldo/hdiff ) and can confirm: not simple! :)

Should've named that repo "phdiff".

Re: Difftastic: A diff that understands syntax

#99
post #43

This is written by the same guy who wrote Helpful, an enhancement package for the Emacs Help buffer. I highly recommend checking out Helpful if you haven’t seen it. https://github.com/Wilfred/helpful

EDIT: Wilfred IS the original author [3]; my apologies. Not to discredit Wilfred (it looks like he's taken over the project as the maintainer), but, based on the historical contributions [1], it looks like it was originally developed by Max Brunsfeld, who also created Tree-sitter. [2] [1]: https://github.com/Wilfred/difftastic/graphs/contributors [2]: https://github.com/tree-sitter/tree-sitter [3]: https://github.com…

I think the contributor graph is misleading, and that he's using git-subtree to vendor tree-sitter, which makes it look like others have contributed more to the project.

Re: Difftastic: A diff that understands syntax

#100
post #78

Earlier quoted context omitted.

Using ubuntu 20.04, I first installed cargo: curl https://sh.rustup.rs -sSf | sh Restart shell to get $HOME/.cargo/bin in PATH, then did: cargo install difftastic And ~4 minutes later, difft executable is ready. Agree though that some pre-built binaries would be fantastic!

Ah, well, if you're willing to accept having a frankensystem with a mix of packaged and unpackaged software, sure. ;) I used to do that, back in Slackware days. It's considered really sloppy and unmaintainable to admin a system like that. Things quickly get out of hand. That strategy _does_ work if you isolate it to a chroot or a container, but littering /usr/local with all sorts of locally compiled upstream is just…

The method I posted above doesn't write anything to /usr/local. Root isn't required. Everything is written under ~.
Post reply on HN