Live data from Hacker News

Exa, a modern replacement for ls

the.exa.website

281–290 of 420 posts

Re: Exa, a modern replacement for ls

#281
post #268

Earlier quoted context omitted.

Mine in similar, I implement an authoritative domain name server. I've done it in something like 20-25 languages now. The only language I've learned in the last decade I didn't write one in is ARM Assembly. I am not that "dedicated" (more like masochistic) enough to try to do one in assembly.

I tend to reimplement the Linux kernel from scratch a few times in every language and go from there onto the X server, desktop environment, networking stack, etc.

Github link? ;)

Re: Exa, a modern replacement for ls

#282

> For example, exa prints human-readable file sizes by default (when would you not want that?) When I've got two similar but non-identical files, and I think that the difference between their sizes might be important. That's a silly nitpick, though. It's not like I lose ls by installing exa. Plus, it's a nice excuse to see if I can get cargo working around the corporate firewall.

My problem is that I like having full and exact file sizes, and I like that they really make order-of-magnitude differences stand out in a listing (by taking up an extra column); but if I look at a number longer than five or so digits it's difficult to quickly see how many digits it is, and hence my quick glance can be off by an order of magnitude.

In a program that natively makes strong use of colour, though, here's an option: print exact file sizes, but in two related colours (say, bright yellow and dark yellow/brown), as follows: the first colour for the first 1, 2, or 3 digits, and the other for the remaining $n$ digits where $n$ is divisible by 3. That way the first colour will represent a whole number of KB, MB, GB, etc—and which of these it is will be very clear as it's easier to get that rough-count size—and the fainter/darker colour would give the full exact number of bytes. Best of both worlds!

Re: Exa, a modern replacement for ls

#283

Earlier quoted context omitted.

You would never say that you are 0.0018 kilometers tall. Using sane unit sizes is important. If two files are orders of magnitude different in size, it's easy to tell that just by the units. As opposing to counting the number of digits, which is tedious and error prone. If they are similar, then it's easy enough to tell that also. E.g. 1 GB vs 995 MB.

If two files are orders of magnitude different in size, it's easy to tell that just by the units. As opposing to counting the number of digits, which is tedious and error prone. I disagree; what's easier, spotting the biggest and smallest of these at a glance: 6,677,967 5,916,109 7,164,551 3,745,059,597 3,175 4,194,304 3,550,137 or these: 6.37M 5.64M 6.83M 3.49G 3.10k 4.00M 3.39M If they differ by orders of magnitude…

For this reason when I list in -h mode I pretty much also need to sort by size (ls -lSrh).

Re: Exa, a modern replacement for ls

#284

Wow, the comments in this thread are quite harsh. Even though I might not use it, this looks like an awesome project - kudos to the author for finding (& implementing) ways to improve something as mundane as ls. I've long been stuck on finding a suitable (perfect?) project idea to play with Rust but exa is making me think through again! Thanks for sharing this and also for your screencasts. I'd definitely spend a laz…

Wow, the comments in this thread are quite harsh. I wonder if a lot of that has to do with how it's being "marketed" --- it might just be me, but whenever I see "modern" being used to describe something, it evokes the negative connotations of being trendy, fashionable, boring, vapid, fleeting, style-over-substance that's all too common with software today (Windows' "modern UI/Metro" being one of the first examples to…

I'd suggest describing it as a "colourful alternative" rather than a "modern replacement", because no-one will be removing /bin/ls with exa installed. "Replacement" strongly implies removal of the thing being replaced, as with "replacement hip", "replacement CEO" etc.

As for why anyone might feel aggrieved about replacement of core Unix services, my mind immediately drew a (possibly unfair, but emotionally comparable) parallel with systemd.

Re: Exa, a modern replacement for ls

#285

Earlier quoted context omitted.

I think what's really in discussion here is what the default should be. ls was originally conceived and implemented in a period when all the files you would be dealing with could be measured in bytes easily, and would almost never be over four digits. Many common files today (any MP3, most word processing documents, almost every image except for thumbnails, etc) are nine or more digits, and at that level it's very ea…

Many common files today (any MP3, most word processing documents, almost every image except for thumbnails, etc) are nine or more digits I think your perception of filesizes is slightly skewed; "nine or more digits" means roughly >=100MB. Disk images, software, and videos would be in that range, but probably not the average MP3 (100MB of 320k MP3 is over 40 minutes), and I don't think I've ever handled a "word proces…

You're right. I was off by an order of magnitude or two. Not that I planned it, but I just illustrated my point with sizes of seven digits or more with myself as the subject.

Seven digits isn't quite as bad, but without thousands separators it's bad enough.

Re: Exa, a modern replacement for ls

#286
i'm not going to be rude or hate exa, it looks really cool actually. I, for one, love the color coding. But trying to replace something as old and known as 'ls' probably isn't a realistic goal. I think talents would much better geared towards something missing, instead. Either way, keep up the good work.

Re: Exa, a modern replacement for ls

#287
post #263

Earlier quoted context omitted.

Wow, the comments in this thread are quite harsh. I wonder if a lot of that has to do with how it's being "marketed" --- it might just be me, but whenever I see "modern" being used to describe something, it evokes the negative connotations of being trendy, fashionable, boring, vapid, fleeting, style-over-substance that's all too common with software today (Windows' "modern UI/Metro" being one of the first examples to…

I did some nodejs work the other month, pinch-hitting in a product crunch, we're using grunt. `grunt test`.. ooh, so pretty and creative! `grunt test > test.out`, wtf, why is my file full of control character bullshit?

To be fair, they could avoid that by checking if stdout is a TTY or not.

Re: Exa, a modern replacement for ls

#288
post #27
post #5

Earlier quoted context omitted.

From the FAQ: >Is this a drop-in replacement for ls? No — exa has, in my opinion, much saner defaults than ls, so while the available command-line options are similar, they are not exactly the same. Most of the common options will work consistently, though. For example, exa prints human-readable file sizes by default (when would you not want that?) so ls -h no longer applies.

But a length in bytes is even better than human-readable: it's a graph (technically a histogram), so it can be scanned, which is even faster than reading. It's far faster to identify the smallest or largest file in a directory with standard ls. There are some times when I do want human readable, but then I typically want to specify the units, so I see everything in megabytes.

What you are looking for is `ls -S` and `ls -Sr`

Re: Exa, a modern replacement for ls

#289
post #37

Earlier quoted context omitted.

I almost never use the human-readable file sizes. For this to get any traction it is going to need to accept every argument ls does and play nicely. Most people who work with nix systems work on many systems and some of them don't control the software loaded on them. If I have to remember that on this* system I have to use these arguments because I have exa, vs this system I have normal ls that is going to be a deal…

> I almost never use the human-readable file sizes. Same here. I love the idea, and i keep trying to use human-readable sizes in every command which supports them. But it turns out they're much less scannable than numbers in a common unit. How long does it take you to see which of these files is biggest: 13k potatoes.txt 7M tomatoes.txt 128 recipe_ideas.txt 1G hot_sauce_formula.txt How about now: 13093 potatoes.txt 7…

Or...

    alias bff='ls -S | head -1' # biggest fscking file

Re: Exa, a modern replacement for ls

#290
post #202
post #178

Earlier quoted context omitted.

Writing `ls` is the first thing I do when learning a new language.

Thanks for the kind words, everybody. exa was my first Rust project and it just grew and grew.

Don't be worried about the hate.

ls is a gold standard but that doesn't mean alternatives aren't interesting. Especially as a FOSS project in rust I find it fascinating.

Post reply on HN