Live data from Hacker News

Eza: A modern, maintained replacement for ls

github.com

231–240 of 250 posts

Re: Eza: A modern, maintained replacement for ls

#232
post #230

Earlier quoted context omitted.

I looked, just now, at all the Make alternatives mentioned: Task, Mage and Just. Those first two are nowhere near as easy to read as Makefiles. The last one, Just, looks good, though. At least Cmake files are easy to read, but many of these alternatives are just poor UI, compared to Makefiles. I mean, using YAML of all things and thinking it's some sort of improvement over Make syntax? 1. Mage is just insane. In what…

> due to a poor format (YAML). That's just your opinion. I'll take YAML whitespaces over Makefile whitespaces any day. > Compare with Makefile that does exactly the same thing Good example in favor of Task, I prefer the explicitness :) Especially when the file starts to get big. You forgot the .PHONY by the way, I hope for you there's no build/ or assets/ folder where your Makefile is. For a more useful comparison, w…

> For a more useful comparison, with actual source dependencies and build target:

Makefile:

     GO_FILES = $(shell find . -type f -name '*.go')

     ./myapp: $(GO_FILES)
         go build -trimpath -o $@

     .PHONY: build
     build: ./myapp

 Taskfile:

     tasks:
       build:
         cmds:
           - go build -trimpath -o ./myapp
         sources:
           - '\*/*.go'
         generates:
           - ./myapp

Even in this example, what is PHONY needed for?

    GO_FILES = $(shell find . -type f -name '*.go')

    ./myapp: $(GO_FILES)
        go build -trimpath -o $@

Honestly, it's still simpler to read.

> Makefiles are incredibly terse, but that's not an advantage.

Brevity is not why I prefer Makefile syntax over YAML, readability is. The minute you start trying to do anything large in a YAML definition you're going to need special editor help to keep track of indentation, and even with that, a large tree is still going to be lost off-screen because the context of any node in the tree depends on seeing the lines immediately above.

With Makefiles, any node in the tree has immediate context on the same line (the dependencies) which makes it very readable to me. I really prefer:

    target: dep1 dep2 dep3 dep4
compared to:

    tasks:
      dep3:
        cmds:
          - ...
        sources:
          - ...
        generates:
          - ...
      dep2:
        cmds:
          - ...
        sources:
          - ...
        generates:
          - ...
      dep1:
        cmds:
          - ...
        sources:
          - ...
        generates:
          - ...
      target:
        cmds:
          - ...
        sources:
          - ...
        generates:
          - ...

Re: Eza: A modern, maintained replacement for ls

#233
post #68

Earlier quoted context omitted.

The only time you have to care about GNU tools vs your own preference of tool is when writing scripts to run on computers running some Linux distributions, and per [1] you shouldn’t be using ls for that. [1]: https://www.shellcheck.net/wiki/SC2045

Yes but if you work professionally as a software engineer, chances are that you don't only use your PC. Being that a server that you connect remotely to develop on, or a production system where you connect to investigate a bug, or the PC of a coworker you are helping, or getting inside a container, etc. Getting to know and use a standard setup makes you efficient in that situations, that is also the reason why I lear…

My setup does not deviate from that. As the sibling comment points out, `ls` responds everywhere (even powershell on Windows), it's just nicer on my local machine.

Coworker machines are whole different issue though - most of them have American keyboards (I do not), most of them do not use editors with vim bindings etc.

Re: Eza: A modern, maintained replacement for ls

#234
post #218

Earlier quoted context omitted.

Depends on the application and your personal preference. It's way "faster" for me to see a HN comment was posted "1 hour ago" than it is for me to see the absolute time string and do the math myself. Further, I don't care about the exact time a HN comment was made. I care about roughly how long ago it was posted so I know if the conversation is still going.

But if exact dates/time is shown you have the possibility to mentally subtract one hour from what the time is, and look for that. With 1 hour/week/month/year you cannot go the other way, it is too vague. But web pages and apps should provide a quick and easy way of changing between the too formats.

yes, that's exactly what I said here:

https://news.ycombinator.com/item?id=41039675

Re: Eza: A modern, maintained replacement for ls

#235
Why `ls` replacement needs kerberos and ssh?

  ldd /usr/bin/eza
        linux-vdso.so.1 (0x00007f5238f5e000)
        libgit2.so.1.7 => /lib/x86_64-linux-gnu/libgit2.so.1.7 (0x00007f5238cfd000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5238cd0000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5238bee000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5238a09000)
        libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f52389b5000)
        libmbedtls.so.14 => /lib/x86_64-linux-gnu/libmbedtls.so.14 (0x00007f523897f000)
        libmbedx509.so.1 => /lib/x86_64-linux-gnu/libmbedx509.so.1 (0x00007f523895e000)
        libmbedcrypto.so.7 => /lib/x86_64-linux-gnu/libmbedcrypto.so.7 (0x00007f52388d3000)
        libhttp_parser.so.2.9 => /lib/x86_64-linux-gnu/libhttp_parser.so.2.9 (0x00007f52388c8000)
        libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f523882d000)
        libssh2.so.1 => /lib/x86_64-linux-gnu/libssh2.so.1 (0x00007f52387e6000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f52387c5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f5238f60000)
        libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f52386ef000)
        libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f52386c2000)
        libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f52386bc000)
        libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f52386af000)
        libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f5238000000)
        libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f52386a6000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f5238695000)
        libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f52385cd000)

Re: Eza: A modern, maintained replacement for ls

#237

Earlier quoted context omitted.

the point is that you should not need to hover over the dates to get the exact ones. it hinders fast viewing of the data, when it is more than a small amount.

> the point is that you should not need to hover over the dates to get the exact ones. For you. For some, you should not need to hover over exact dates to get humanized relative deltas.

so those of us who think differently from you are inhuman?

/jk

humans from long back, could, and still very much can, easily parse / grok those exact dates and do the trivial date arithmetic needed (just mentally, without even pen and paper, forget a calculator), in seconds, to figure out the deltas nearly perfectly, or at least close enough for their needs.

just because you cannot do it, don't think that plenty of others cannot (analogous to what you said to me above). I have interacted with different types and categories of people, of various educational levels and socio-economic backgrounds, from so-called "low" to so-called quite "high", for many years now, and I can tell you that even uneducated farmers, fishermen, bike and car mechanics, and other kinds of manual labourers that I have met and interacted with a good amount, can easily do these kind of calculations in just a few seconds, mentally. not necessarily all, but many of them can.

Re: Eza: A modern, maintained replacement for ls

#238

There is also 'lsd' but I still prefer eza. For everyone interested there is a lot of modern command line tools I nowadays prefer over the old stuff: bat - cat with highlight difftastic - better diff gdu - ncdu for ssds (disk space analyser) zoxide - modern cd fd - find alternative rg - ripgrep (grep) fzf - fuzzy finder jless - json viewer with mouse folding dra - download and install release assets lazygit - git TUI…

  >   fd - find alternative
  >   rg - ripgrep (grep)
NOTE OF WARNING:

BY DEFAULT these ignores anything included in your `.gitignore` folder. So if you think it is a straight find replacement, you'll likely be surprised. fd discussion here[0]

Just make sure that when recommending people these tools that this is clear because if they don't read the docs (lol who does) they'll miss this part.

This is a pet peeve of mine. I wish the people that make these replacement coreutils (and others) would leave the defaults as very similar to the original tool. I do really like the new functionalities but if you market it as "an alternative" ("It is a simple, fast and user-friendly alternative to find") then they should respect the defaults of the original because it reduces new user surprise. I mean aliases exist... So it is better to have in your ~/.${SHELL##*/}rc file to have `alias fd='fd --ignore'` than `alias fd='fd --no-ignore'`.

Side note/pro tip: use `\command` if you want to use an unaliased version. An example of this is that I have `alias grep='grep --color=always --no-messages --binary-files=without-match` but this can sometimes be problematic because the color option can change the character representation so if you pipe this into `curl` you will get errors. This is not the case in all piping, but it is a shocking and confusing experience when you first encounter it. You can validate this by `echo "Hello world" | \grep --color=always "Hello" | hexdump` and then `!!:s^always^never`

[0] https://github.com/sharkdp/fd/issues/612

Re: Eza: A modern, maintained replacement for ls

#239

Earlier quoted context omitted.

Look at the title above. It only says Eza and ls. It says eza is maintained, which tells me the other,ls, is not maintained. Doesn’t mention exa. Yes it’s missing nuance if you don’t click through, but that’s a complete statement, and I wouldn’t expect people to click through to get more context

Side note: the English language is a dumpster fire, and it’s easy for these issues to happen.

Correction: the English language is a dumpster.

Re: Eza: A modern, maintained replacement for ls

#240

Earlier quoted context omitted.

the point is that you should not need to hover over the dates to get the exact ones. it hinders fast viewing of the data, when it is more than a small amount.

> the point is that you should not need to hover over the dates to get the exact ones. For you. For some, you should not need to hover over exact dates to get humanized relative deltas.

I’ve never looked at a datetime and thought to myself “if only I knew how long ago that was.” Are there really people like that?

And actually, if I saw the date of “2023-12-07,” knowing it was last December actually gives me more information than “eight months ago” — because I know that means around Christmas time last year, and I know what other things happened last December, such as what features we were launching, who the product manager was at the time, etc. If you just shouted a random number of months ago, I would then have to stop and think about the answers to those questions. Lots of my memories could be placed in an approximate month or at least a season, and those never change after the fact. Relative dates are constantly changing and my memory does not increment all its records every month (e.g. “I’ve now worked here 9 months. I’ve now worked here 10 months.” But I can tell you the month and the year I started working here.)

Relative dates are definitely a case of “just because we can do this doesn’t mean we should force everyone to use it”

Post reply on HN