@wilfredh@mastodon.social
@wilfredh@mastodon.social avatar

wilfredh

@wilfredh@mastodon.social

Programming languages, human factors, and a healthy dose of Emacs.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

wilfredh, to random
@wilfredh@mastodon.social avatar

I've release difftastic 0.58:

  • Updated C, C++, CMake, CSS, Elm, Go, Lua and Python parsers
  • Better diffs when files have parse errors
  • Polish: CRLF handling, obscure terminal detection, and a man page!

https://github.com/Wilfred/difftastic/releases/tag/0.58.0

wilfredh, to random
@wilfredh@mastodon.social avatar

It's weird how even pure languages tend to treat the Unix execution model as ambient state.

Are there any PLs that define a main function like this?

fn main(args, stdin, stdout, env) -> exit code

wilfredh, to random
@wilfredh@mastodon.social avatar

I think software maintainers can perceive their projects as way more buggy than they actually are.

You spend more time looking at the bug tracker, which is (hopefully!) not representative of typical usage.

krinkle, to random
@krinkle@fosstodon.org avatar

deleted_by_author

  • Loading...
  • wilfredh,
    @wilfredh@mastodon.social avatar

    @krinkle Huh, that definitely looks like a bug, and a weird one at that. Please file an issue ๐Ÿ™‚

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    tap> is an elegant Clojure debugging feature: it passes the argument to any functions registered with add-tap.

    You might set up a custom printer for your data type, or save values for later examination, and you can easily disable the tap too.

    https://dev.to/hlship/debugging-clojure-at-the-repl-using-tap-2pm5

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    I've released difftastic 0.57! In this release:

    • A bunch of improvements around detection and display of binary files.
    • Fixed some diffing issues with (ironically) text files.
    • Better diff results for Scheme.

    https://github.com/Wilfred/difftastic/releases/tag/0.57.0

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    The Bitter Lesson: how implementing generic search and scaling compute outperforms custom logic in many situations: http://www.incompleteideas.net/IncIdeas/BitterLesson.html

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    I've been reading about the object-capability model as seen in the E programming language.

    It reminds me of dependency injection, but used pervasively. Rather than calling static methods, you pass in object arguments and call methods in them.

    https://en.wikipedia.org/wiki/Object-capability_model

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    I'm flattered that SemanticDiff has a blog post comparing it with difftastic! https://semanticdiff.com/blog/semanticdiff-vs-difftastic/

    It's a pretty even-handed post, and it touches on some of the different design decisions. For example, SemanticDiff considers 0xA and 10 to be the same when diffing.

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    Fun example of a bunch of YAML gotchas all in a single file: https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    I've been using a 'golden tests' library for testing my parser, and it's just delightful. Rather than writing a verbose assertion about the resulting AST, I can just re-run my tests until the output looks good!

    I'm using https://github.com/jfecher/golden-tests currently, which can automatically update the output in the file.

    Example commit: https://github.com/Wilfred/garden/commit/cea75238ff9de0b74caf20c64096c2fa46cdc30a

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    I'm experimenting with a patch-style display format for difftastic.

    What do you think? Do the colours work? What about the last example, where there's only whitespace changes and the syntactic diff has nothing to highlight?

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    Do you think values and types should be in separate namespaces? Why/why not?

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    Difftastic 0.55 is out! In this release:

    • Support for VHDL and Objective-C
    • Improved support for XML
    • The usual smattering of bugfixes :)

    https://github.com/Wilfred/difftastic/releases/tag/0.55.0

    Objective-C screenshot

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    Do any package managers use bittorrent? I associate bittorrent with distributing large files, but it seems like it would really help scaling.

    Most traffic to package managers is from CI systems, which could instead run their own local seeding nodes.

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    Difftastic is written in Rust, so I was surprised to get a user report of a segfault.

    After some investigation, it turns out that it's a segfault in git itself, which has existed since 2014! https://lore.kernel.org/git/CAFXAjY7XcL1APhLRXU8TO96z=f7957f2ieK56dHVsXUay55vpg@mail.gmail.com/T/#u

    (Upstream has already kindly written a patch.)

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    Which programming languages are the easiest/hardest to google?

    Go (a common word) and Rust (also a computer game) can both be tricky. Yet I've not seen 'rubylang' used to help Ruby searches.

    Perhaps a novel word (Kotlin) or a misspelling (Perl) is a better choice for new languages?

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    A really nice explanation of lisp semantics, using userland code!

    For example, you can define let in terms of let* and vice versa.

    https://www.plover.com/~mjd/misc/hbaker-archive/MetaCircular.html

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    I've released difftastic 0.54! In this release:

    • Added support for the Salesforce Apex programming language
    • Improvements to Clojure and Haskell parsing
    • Difftastic will now show if file permissions changes

    https://github.com/Wilfred/difftastic/releases/tag/0.54.0

    screenshot of difftastic and permission changes

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    Difftastic now has its own homepage! I wanted to put together a set of screenshots that showed why you might like it.

    https://difftastic.wilfred.me.uk/

    Feedback welcome :)

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    A really fun (10 minute) talk on developing an LLVM backend for 6502, a chip with only three registers and a teeny tiny stack: https://www.youtube.com/watch?v=2lW3WHPtmKo

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    Which languages do you consider to have the biggest/smallest standard libraries?

    JS and Rust have a reputation for being pretty small. C has fewer data structures, but a bunch of system APIs.

    Python feels more like a kitchen sink.

    Where are other languages on this spectrum?

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    Really thoughtful critique of the Language Server Protocol, what IDEs need to express, and the design decisions made.

    https://matklad.github.io/2023/10/12/lsp-could-have-been-better.html

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    JSON Lines is such a delight to use. It's particular nice as a CLI interop format.

    You can use dumb, fast tools (e.g. grep to quickly filter large outputs) as well as structured tools (e.g. jq).

    wilfredh, to random
    @wilfredh@mastodon.social avatar

    I've released difftastic 0.52! In this release:

    • Support for XML and JSONL
    • Word-level diffing in text nodes (in HTML and XML)
    • Improved syntax highlighting

    https://github.com/Wilfred/difftastic/releases/tag/0.52.0

    difftastic with XML

  • All
  • Subscribed
  • Moderated
  • Favorites
  • โ€ข
  • anitta
  • InstantRegret
  • mdbf
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • osvaldo12
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • tacticalgear
  • ethstaker
  • modclub
  • cisconetworking
  • tester
  • GTA5RPClips
  • cubers
  • everett
  • megavids
  • provamag3
  • normalnudes
  • Leos
  • lostlight
  • All magazines