This is actually possible with glasses-mode in Emacs: https://codelearn.me/2025/02/24/emacs-glasses-mode.html I think it sees very little usage though.
If I've understood this interesting workflow correctly, there's two major components. streamdown: a markdown renderer for the terminal, intended for consuming LLM output. It has affordances to make it easier to run the…
In `use foo::bar; use bar::foo;`, am I importing an external crate called foo that has a submodule bar::foo, or vice versa? This bit me when trying to write a static analysis tool for Rust that finds missing imports:…
> Rust's users find the module system even more difficult than the borrow checker. I've tried to figure out why, and figure out how to explain it better, for years now. The module system in Rust is conceptually huge,…
> How well do existing VCSs integrate with it? Git supports external diffing tools really well with GIT_EXTERNAL_DIFF, which you can use with difftastic[1]. Other VCSs are less flexible. For example, I haven't found a…
Shameless plug: I've written difftastic[1], a tool that builds ASTs and then does a structural diff of them. You can use it with git too. It's an incredibly hard problem though, both from a computational complexity…
Another enthusiastic Bangle.js user here: I had the original and used it, programmed it until the strap (integrated into the body) broke. Apparently you can actually connect it to phone notifications using…
tree-sitter has first class support for parsing errors as ERROR nodes in the output tree. I treat these as just another atom in the s-expression. In practise I haven't noticed any issues yet. I suspect that difftastic…
Thanks for the feedback. This is really hard to explain. Autochrome has a brilliant worked example https://fazzone.github.io/autochrome.html and it still took me several readings before it clicked. Every graph vertex…
I've looked at several tree diffing papers, including Chawathe et al, but it's not always easy to assess whether their approach would suit difftastic. I know that sdiff by Arun Isaac is based on applying that paper to…
Side-by-side diff displays work really great in a browser. You usually have more screen real estate, and you can offer a responsive UI.
Thanks for the feedback! I'll look to clarify the wording here. The failed example was a real output that difftastic gave in early versions. I agree that the classic red/green colour scheme of diffs isn't great for…
You can use difftastic as your default git diff tool, but you can also use it as an opt-in diffing tool. I recommend using it as an opt-in, but defining a git alias so you can do 'git difft'.…
Yep, that's correct. Difftastic is only a syntactic analysis, although it often makes the semantic intent clearer.
tree-sitter inserts error nodes and gives you an AST for all inputs. It seems to work well in practice.
I imagine it's a misunderstanding with the rustc-hash dependency used in difftastic for faster hashing.
I'd like to add it, but I haven't found any good tree-sitter parsers for Scheme.
This looks like you're using a version of Rust older than the minimum required (1.56).
https://github.com/andreyvit/json-diff works really well for JSON diffing in my experience. It's more simplistic than difftastic though: it considers `1` and `[1]` to have nothing in common.
It's really hard! :) (1) Parsing an arbitrary language is hard. Without tree-sitter, difftastic would probably be a lisp-only tool. You also want a parser that preserves comments. (2) Inputs may not be syntactically…
The underlying parser is just tree-sitter, which is a reusable (and excellent) parsing library. Difftastic then converts the tree-sitter parse tree to a simpler s-expression style format (see…
FWIW I've had reports of people using difftastic on Windows successfully.
There are a few packages available, e.g. https://aur.archlinux.org/packages/difftastic and https://pkgsrc.se/wip/difftastic. I've also had requests from Alpine Linux packagers to allow dynamic linking to parsers. This…
FWIW VCS for Smalltalk basically does this. The challenge for a tool like difftastic is that I can't guarantee that syntax is well-formed. You might be using new syntax that my parser doesn't support, you might have…
Difftastic has support for ~20 languages, and I'm happy to add more if there's a decent tree-sitter parser available :)
This is actually possible with glasses-mode in Emacs: https://codelearn.me/2025/02/24/emacs-glasses-mode.html I think it sees very little usage though.
If I've understood this interesting workflow correctly, there's two major components. streamdown: a markdown renderer for the terminal, intended for consuming LLM output. It has affordances to make it easier to run the…
In `use foo::bar; use bar::foo;`, am I importing an external crate called foo that has a submodule bar::foo, or vice versa? This bit me when trying to write a static analysis tool for Rust that finds missing imports:…
> Rust's users find the module system even more difficult than the borrow checker. I've tried to figure out why, and figure out how to explain it better, for years now. The module system in Rust is conceptually huge,…
> How well do existing VCSs integrate with it? Git supports external diffing tools really well with GIT_EXTERNAL_DIFF, which you can use with difftastic[1]. Other VCSs are less flexible. For example, I haven't found a…
Shameless plug: I've written difftastic[1], a tool that builds ASTs and then does a structural diff of them. You can use it with git too. It's an incredibly hard problem though, both from a computational complexity…
Another enthusiastic Bangle.js user here: I had the original and used it, programmed it until the strap (integrated into the body) broke. Apparently you can actually connect it to phone notifications using…
tree-sitter has first class support for parsing errors as ERROR nodes in the output tree. I treat these as just another atom in the s-expression. In practise I haven't noticed any issues yet. I suspect that difftastic…
Thanks for the feedback. This is really hard to explain. Autochrome has a brilliant worked example https://fazzone.github.io/autochrome.html and it still took me several readings before it clicked. Every graph vertex…
I've looked at several tree diffing papers, including Chawathe et al, but it's not always easy to assess whether their approach would suit difftastic. I know that sdiff by Arun Isaac is based on applying that paper to…
Side-by-side diff displays work really great in a browser. You usually have more screen real estate, and you can offer a responsive UI.
Thanks for the feedback! I'll look to clarify the wording here. The failed example was a real output that difftastic gave in early versions. I agree that the classic red/green colour scheme of diffs isn't great for…
You can use difftastic as your default git diff tool, but you can also use it as an opt-in diffing tool. I recommend using it as an opt-in, but defining a git alias so you can do 'git difft'.…
Yep, that's correct. Difftastic is only a syntactic analysis, although it often makes the semantic intent clearer.
tree-sitter inserts error nodes and gives you an AST for all inputs. It seems to work well in practice.
I imagine it's a misunderstanding with the rustc-hash dependency used in difftastic for faster hashing.
I'd like to add it, but I haven't found any good tree-sitter parsers for Scheme.
This looks like you're using a version of Rust older than the minimum required (1.56).
https://github.com/andreyvit/json-diff works really well for JSON diffing in my experience. It's more simplistic than difftastic though: it considers `1` and `[1]` to have nothing in common.
It's really hard! :) (1) Parsing an arbitrary language is hard. Without tree-sitter, difftastic would probably be a lisp-only tool. You also want a parser that preserves comments. (2) Inputs may not be syntactically…
The underlying parser is just tree-sitter, which is a reusable (and excellent) parsing library. Difftastic then converts the tree-sitter parse tree to a simpler s-expression style format (see…
FWIW I've had reports of people using difftastic on Windows successfully.
There are a few packages available, e.g. https://aur.archlinux.org/packages/difftastic and https://pkgsrc.se/wip/difftastic. I've also had requests from Alpine Linux packagers to allow dynamic linking to parsers. This…
FWIW VCS for Smalltalk basically does this. The challenge for a tool like difftastic is that I can't guarantee that syntax is well-formed. You might be using new syntax that my parser doesn't support, you might have…
Difftastic has support for ~20 languages, and I'm happy to add more if there's a decent tree-sitter parser available :)