News for hackers. Stuff that matters.
Re:Jd – JSON Diff and Patch by _flux on Monday September 09, 2024 @06:48AM (#41487179)
I realize it's nice to use short names for applications, but couldn't this also be have been called jdiff? I feel like the two-letter tool name is exercising developer memory more than strictly required. I have 42 two-character binaries in /usr/bin. Of course, that's still only about 5% of the available two-alphabet names..

The developer can always choose to use a shorted local alias for commonly used tools.

That being said, I wonder if this is much better than difftastic that is more general purpose, but tree-aware? I suppose this one wouldn't care about JSON dictionary key ordering, at least.

Re:Jd – JSON Diff and Patch by keybored on Monday September 09, 2024 @06:55AM (#41487228)
The real headscratchers are the tools that have a proper name, a shortened name, and a command name:

- Stacked Git

- Shortened: stgit

- Command: stg

Lots of “stgit: command not found” ensues.

Re:Jd – JSON Diff and Patch by mejutoco on Monday September 09, 2024 @10:17AM (#41488793)
You have a point of course, but I find it funny that the path is not /users/binaries and, instead, it is a similar abbreviation.

In a way, it is a sort of seo race for tool devs.

Re:Jd – JSON Diff and Patch by spencerchubb on Monday September 09, 2024 @10:32AM (#41488911)
usr stands for user system resources
Re:Jd – JSON Diff and Patch by Tsiklon on Monday September 09, 2024 @11:11AM (#41489271)
This is a backronym. /usr is the original user home directory location on classic unix.

https://www.bell-labs.com/usr/dmr/www/notes.html

Re:Jd – JSON Diff and Patch by conkeisterdoor on Monday September 09, 2024 @10:51AM (#41489056)
TIL after so many years that /usr isn't an abbreviation of "user". "UNIX/user system resources" makes a lot more sense in retrospect. Guess I should have RTFM a long time ago!
Re:Jd – JSON Diff and Patch by dunham on Monday September 09, 2024 @11:14AM (#41489295)
It looks like that's a newer interpretation than the original:

> As such, some people may now refer to this directory as meaning 'User System Resources' and not 'user' as was originally intended.

https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/usr.htm...

Re:Jd – JSON Diff and Patch by josephburnett on Monday September 09, 2024 @01:19PM (#41490895)
> couldn't this also be have been called jdiff? I feel like the two-letter tool name is exercising developer memory more than strictly required.

Yeah, in retrospect I should have given this a longer name. I was going for a natural fit with `jq`. ¯\_(ツ)_/¯

> I wonder if this is much better than difftastic that is more general purpose, but tree-aware?

There are quite a few good tree-aware JSON diff tools out there. But I wanted one that could also be used for patching. I've tried to maintain the invariant that all diffs can be applied as patches without losing anything. And I also wanted better set (and multi-set) semantics, since the ordering of JSON arrays so often isn't important.