Live data from Hacker News

Viewing profile — Wilfred

Wilfred

HN member
Joined
Fri, May 15, 2009, 4:10 PM UTC
HN karma
155
Public activity
75 items

About Wilfred

Technologist and aspiring Unix greybeard.

http://www.wilfred.me.uk

Recent public activity

  1. comment
    Comment #47300548

    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. comment
    Comment #43817517

    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 af…

  3. comment
    Comment #43757049

    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 …

  4. comment
    Comment #43701756

    > 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 …

  5. comment
    Comment #37102694

    > 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 fle…

  6. comment
    Comment #37097171

    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, bo…

  7. comment
    Comment #36516688

    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 …

  8. comment
    Comment #32768030

    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 …

  9. comment
    Comment #32762117

    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 b…

  10. comment
    Comment #32762070

    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 Isa…

  11. comment
    Comment #32753082

    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. comment
    Comment #32753060

    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 colo…

  13. comment
    Comment #32752976

    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 '…

  14. comment
    Comment #32752951

    Yep, that's correct. Difftastic is only a syntactic analysis, although it often makes the semantic intent clearer.

  15. comment
    Comment #30861010

    tree-sitter inserts error nodes and gives you an AST for all inputs. It seems to work well in practice.

  16. comment
    Comment #30860984

    I imagine it's a misunderstanding with the rustc-hash dependency used in difftastic for faster hashing.

  17. comment
    Comment #30847800

    I'd like to add it, but I haven't found any good tree-sitter parsers for Scheme.

  18. comment
    Comment #30847794

    This looks like you're using a version of Rust older than the minimum required (1.56).

  19. comment
    Comment #30847775

    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 …

  20. comment
    Comment #30847725

    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. …

  21. comment
    Comment #30847672

    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 …

  22. comment
    Comment #30847617

    FWIW I've had reports of people using difftastic on Windows successfully.

  23. comment
    Comment #30844954

    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 …

  24. comment
    Comment #30844862

    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 par…

  25. comment
    Comment #30844774

    Difftastic has support for ~20 languages, and I'm happy to add more if there's a decent tree-sitter parser available :)