Readit News logoReadit News
triyanox · a year ago
Thanks for all the feedback! Let me clarify a few things about lla. The most amazing part of this project wasn't just building another ls alternative - it was the incredible learning journey. Building a systems tool in Rust while implementing a plugin architecture taught me more in a few weeks than months of reading could have. Yes, it does more than traditional ls, and that's intentional. The plugin system came from scratching my own itch of constantly switching between different terminal tools. Each feature added was a chance to dive deeper into systems programming and Unix internals. The performance still needs work, and the documentation could be better. But that's the beauty of open source - you ship it, learn from the feedback, and keep improving. Building in public is an incredible way to level up your skills. For anyone considering a similar project: pick a common tool you use daily and try reimagining it. You'll be surprised how much you learn along the way.
thebeardisred · a year ago
Thank you for being one of the few projects replacing a POSIX tool which properly sets the expectation that it's for personal use. It causes me no end of consternation that I see many tools introduced which provide only the barest minimum of functionality and skip over extended attributes, ACLs, and fail to keep compatibility with flags, or don't properly separate STDOUT & STDERR.

While these may be sufficient for a naive developer, this oversight then breaks many downstream tools.

Again though, thanks for sharing. Bringing your own spin and ideas into the world can be anxiety inducing and I'm pleased you went about this in a helpful and measured way!

concerndc1tizen · a year ago
Would you mind listing more common mistakes made by CLI developers?
ksenzee · a year ago
Julia Evans had an interesting thread recently on “social rules” of the terminal: https://social.jvns.ca/@b0rk/113540676612640547
sphars · a year ago
This is a good, open-source resource for guidelines on creating CLIs, which goes over some common mistakes.

https://clig.dev/

telgareith · a year ago
These days: not building this such that they can be easily spit out as json and/or xml markup.
two_handfuls · a year ago
Not obeying the --help flag.
fragmede · a year ago
not behaving the same as robust cli tools. -h and --help and -v and --verbose and --version
matheusmoreira · a year ago
If this is causing you any "consternation" at all, it means you expect too much from unpaid free software developers. The repository doesn't even have a sponsor link.

The software is provided as is, in the hope it will be useful, but without any warranty whatsoever.

All free and open source software licenses contain some version of the above statement.

All of this is implicitly for personal use. In the sense that it's not a product, just something people made because they needed a problem solved.

dimator · a year ago
Honestly, what's the point of comments like this? No shit, it's done for a personal hobby, you're not breaking new ground with that idea.

However, this is a website of opinions, and gp's opinion is valid, because this forum is where opinions go. It's not as though gp said to stop doing this project.

This pedantic finger wagging is just so rote.

Dead Comment

imoverclocked · a year ago
Did anyone here use Genera on an original lisp machine? It had a pseudo-graphical interface and a directory listing provided clickable results. It would be really neat if we could use escaping to confer more information to the terminal about what a particular piece of text means.

Feature-request: bring back clickable ls results!

Bonus points for defining a new term type and standard for this.

rphln · a year ago
There's already `ls --hyperlink` for clickable results, but that depends on your terminal supporting the URL escape sequence.
db48x · a year ago
This is nice, but a poor substitute for what Genera was doing.

You see, Genera knows the actual type of everything that is clickable. When a program needs an input, objects of the wrong type _lose their interactivity_ for the duration. So if you list the files in some directory, the names of those files are indeed links that you can click on. Clicking on one would bring up a context menu of relevant actions (view, edit, print, delete, etc). If a program asks for a filename as input then clicking on a file instead supplies the file object to the program. Clicking on objects of other types does nothing.

westurner · a year ago

  $ man ls | grep '\--hyperlink' -A 1
  --hyperlink[=WHEN]
         hyperlink file names WHEN

mbivert · a year ago
Maybe some aspects of the Plan9 UI? (rio/9term, plumber; acme as well).

You should be able to get this to work on Unix with plan9port.

dotancohen · a year ago

  > Feature-request: bring back clickable ls results!
Doesn't your desktop (or distro) have a graphical file manager? On KDE it's Dolphin, which ex-Windows users absolutely love. I don't know what it would be on Gnome or other desktops.

mabster · a year ago
I'm not going to speak for Linux, but on Mac the Finder is annoying enough that I ended up using CLI for file manipulation (ranger).
shakna · a year ago
My ssh client also supports mouse events, though.
yjftsjthsd-h · a year ago
It's not really that, but have you tried ranger?
vunderba · a year ago
Sounds like a fun project. However, from the readme:

Efficient file listing: Optimized for speed, even in large directories

What exactly is it doing differently to optimize for speed? Isn't it just using the regular fs lib?

jeffbee · a year ago
On my system it uses twice as much CPU as plain old ls in a directory with just 13k files. To recursively list a directory with 500k leaf files, lla needs > 10x as much CPU. Apparently it is both slower and with higher complexity.
triyanox · a year ago
On the latest release the it can list a tree of 100 in depth with over 100k files in less than 100ms and if cached 40ms
triyanox · a year ago
Will definitely prioritize optimization in the next releases. Planning to benchmark against ls on various systems and file counts to get this properly sorted.
niek_pas · a year ago
Not trying to “gotcha” you, but I would imagine that 10x the CPU of ls is still very little, or am I wrong?
matheusmoreira · a year ago
What exactly makes ls faster?
inquisitive-me · a year ago
But it’s written in rust so it’s super fast. Did you take that into account when running your benchmarks? /s
porridgeraisin · a year ago
One slept on filesystem cli tool on linux is `gio`. So it comes with glib2. But today glib2 is a dependency of vte, polkit, pipewire, ffmpeg, the entire gtk ecosystem,... you get the point. So you can basically depend on it being there on most linux installs, especially desktop.

Checkout the man page: https://www.mankier.com/1/gio

highlights:

- showing progress in `cp` equivalent

- Easy cli interface to freedesktop trash (!)

- tree command

- filesystem changes monitor (inotify wrapper)

compressedgas · a year ago
All of what is in the gio command used to be the gvfs-* command set.
INTPenis · a year ago
I had no idea gio could do all those things. I've been using it to mount my smartphone from the CLI.
mellosouls · a year ago
I clicked on this (without noting "github") expecting an essay on the joys of building an alternative to ls.

This is basically a Show HN without a summary I think.

fwiw:

https://news.ycombinator.com/showhn.html

ivanjermakov · a year ago
Does UNIX philosophy holds anymore? Most of the modern CLI tools I've seen here try to be all at once: file manager, git client, grep.

I wonder if it was always like this or we're getting further and further from the idea of keeping programs simple and open.

Cthulhu_ · a year ago
I would say it does; those tools rarely reimplement the functions you mention, but are abstractions on top of existing CLIs or libraries that do follow the UNIX philosophy.

This project in particular is not being sold as a drop-in replacement for ls.

Deleted Comment

monroewalker · a year ago
Other than colorization, what are people getting out of ls replacements like this? I've recently started using ranger which might replace my ls usage for the most part since it not only shows everything in the directory but has vim like shortcuts for filtering, sorting, and searching the directory as well as previewing files and entering other directories
dhruvkb · a year ago
Hi, author of `pls`[1] here. `pls` goes above and beyond what is typically possible with `ls` without going so far as to become an entire TUI file explorer like Broot[2].

Among a few things it does that `ls` (and other alternatives like `eza` don't do) are: - icons (SVG icons in terminals that support it, Nerd Fonts otherwise) - advanced filtering using regex - advanced sorting across multiple sort bases - styles and colors using customisable rules

For someone wanting to make the output of `ls` prettier (with a few extra bells and whistles) without having to relearn a new workflow, something like an `ls` replacement makes more sense.

[1]: https://pls.cli.rs [2]: https://dystroy.org/broot/

pmarreck · a year ago
pls looks useful and I will retain it but eza is giving more icons for more things via (this is my alias for `l`, basically)

`eza --long --hyperlink --header --all --icons --git --sort name`

also the hyperlink thing is useful

Symbiote · a year ago
ls does colored output. I'm surprised it's not the default for you.
cb321 · a year ago
If you run `dircolors --print-database|less` you will see that GNU ls only highlights/colors the path/filenames according to a simplistic scheme where a file can only resolve to one type even though on many terminals today "foreground overlays background overlays bold/italic/etc". (https://github.com/c-blake/lc#vector-typemulti-dimensionalit... has a more advanced idea.)

This tool by triyanox -- just from the screen shot if you click through -- will also colorize permission masks and sizes, dates, user & group.

Dead Comment