←back to thread

lsr: ls with io_uring

(rockorager.dev)
335 points mpweiher | 4 comments | | HN request time: 0.25s | source
1. Imustaskforhelp ◴[] No.44604389[source]
Really interesting, the difference is real though I would just hope that some better coloring support could be added because I have "eza --icons=always -1" command set as my ls and it looks really good, whereas when I use lsr -1, yes the fundamental thing is same, the difference is in the coloring.

Yes lsr also colors the output but it doesn't know as many things as eza does

For example .opus will show up as a music icon and with the right color (green-ish in my case?) in eza whereas it would be shown up as any normal file in lsr.

Really no regrets though, its quite easy to patch I think but yes this is rock solid and really fast I must admit.

Can you please create more such things but for cat and other system utilities too please?

Also love that its using tangled.sh which is using atproto, kinda interesting too.

I also like that its written in zig which imo feels way more easier for me to touch as a novice than rust (sry rustaceans)

replies(3): >>44604767 #>>44604964 #>>44608207 #
2. johnisgood ◴[] No.44604767[source]
As for coloring support, I think the best way would be to implement LS_COLORS / dircolors. My GNU ls looks nice.
3. hnlmorg ◴[] No.44608207[source]
“bat” is a pretty good modern “cat”

https://github.com/sharkdp/bat

replies(1): >>44608680 #
4. Imustaskforhelp ◴[] No.44608680[source]
So I just ran strace -c cat <file> and strace -c bat <file>

Bat did 445 syscall Cat did 48 syscall

Sure bat does beautify some things a lot but still I just wanted to tell this, I want something that can use io_uring for cat too I think,

like what's the least number of syscalls that you can use for something like cat?