Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Wilfred
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
Wilfred
6mo ago
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.
2.
▲
by
Wilfred
1y ago
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 code snippe
3.
▲
by
Wilfred
1y ago
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: you essentially need to
4.
▲
by
Wilfred
1y ago
> 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, and I feel
5.
▲
by
Wilfred
3y ago
> 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 nice way of ge
6.
▲
by
Wilfred
3y ago
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 point of view,
7.
▲
by
Wilfred
3y ago
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 gadgetbridge[0] but I didn't
8.
▲
by
Wilfred
4y ago
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 doesn't see
9.
▲
by
Wilfred
4y ago
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 repres
10.
▲
by
Wilfred
4y ago
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 Scheme: htt
11.
▲
by
Wilfred
4y ago
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.
12.
▲
by
Wilfred
4y ago
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 colourblin
13.
▲
by
Wilfred
4y ago
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'. https://difftastic.wilfred.
14.
▲
by
Wilfred
4y ago
Yep, that's correct. Difftastic is only a syntactic analysis, although it often makes the semantic intent clearer.
15.
▲
by
Wilfred
4y ago
tree-sitter inserts error nodes and gives you an AST for all inputs. It seems to work well in practice.
16.
▲
by
Wilfred
4y ago
I imagine it's a misunderstanding with the rustc-hash dependency used in difftastic for faster hashing.
17.
▲
by
Wilfred
4y ago
I'd like to add it, but I haven't found any good tree-sitter parsers for Scheme.
18.
▲
by
Wilfred
4y ago
This looks like you're using a version of Rust older than the minimum required (1.56).
19.
▲
by
Wilfred
4y ago
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.
20.
▲
by
Wilfred
4y ago
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 well formed. (3) Ef
21.
▲
by
Wilfred
4y ago
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 https://difftastic.wilfred.me.uk/
22.
▲
by
Wilfred
4y ago
FWIW I've had reports of people using difftastic on Windows successfully.
23.
▲
by
Wilfred
4y ago
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 dynami
24.
▲
by
Wilfred
4y ago
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 merge conflict
25.
▲
by
Wilfred
4y ago
Difftastic has support for ~20 languages, and I'm happy to add more if there's a decent tree-sitter parser available :)
26.
▲
by
Wilfred
4y ago
JSON and CSS are supported today, and I'm interested in adding more structured text formats. If a format has a tree-sitter parser, it can be added to difftastic. The TOML tree-sitter parser looks good, but there isn't a mature mar
27.
▲
by
Wilfred
4y ago
Difftastic is only ignoring whitespace that isn't significant. If you remove `if (true)`, it will get highlighted. With a textual diff today, your only choices are 'highlight all whitespace changes' (e.g the git default) or &
28.
▲
by
Wilfred
4y ago
Yep! It does a conventional textual diff: run Myers' diff algorithm on lines, then word highlighting on changed lines.
29.
▲
by
Wilfred
4y ago
There's a basic single-column 'inline' display available if you do `INLINE=y`, but it's not as mature as the side-by-side display yet.
30.
▲
by
Wilfred
4y ago
The getting started section of the manual should help: https://difftastic.wilfred.me.uk/getting_started.html I've documented the minimum rust version required today, although I'm looking at lowering the minimum ve
More ›