1. 17

  2. 14

    But why? Ain’t broken, do not fix it. Better cd? Seriously? Better cat? Seriously??? I wish I had the time to rewrite such trivial things in Rust for no good reason. Literally zero value is added by this.

    1. 27

      Literally zero value is added by this.

      This is literally false. I use bat for its syntax highlighting, and it is a significant value add for me over cat.

      1. 6

        But that is not what cat is for. cat is for concatenation, nothing else.

        1. 6

          I used to use cat to quickly view short files in the terminal. bat replaced cat for me:


          I am sure that this matches significant fraction of usages when people type cat. I’d even say that viewing files + “priming the pipe” (for which <in.txt prog is the “proper” tool) represent majority of cat usages in the wild.

          So, I don’t find “cat is for concatenation, nothing else” statement useful, as it doesn’t describe the reality.

          1. 3

            it does for me. I never use cat to view files, I either use less (sometimes more, if I am on a very restricted system) or vim. I think you could remove cat from my system an I would not even notice, that is how often I use it. Most cli heavy people I know tend to be similar.

            1. 1

              Then you were misused it as you should have been using less for viewing files. That is the purpose of pager.

              1. 9

                less is less convenient to me. I do not want to have to type q to close it, and I do want the file to be visible while I type further commands.

                On a meta level, I just don’t get these prescriptivist comments. I would understand “less is more convenient than cat” framing, but what is the value of “cat should be used only for concatenation” statement eludes me.

            2. 5

              cat(1) is also, depending on your platform, for line numbering, non-blank-line numbering, the removal of runs of multiple blank lines, the explicit display of end-of-lines, the explicit display of tabs and form feeds, converting all non-printables to a human-readable escaped form, and for line ending conversion.

              1983 called and wants its boring whinge back.

              1. 1

                Right, and now we have a program for bonbatenation. It replaces cat and less. I don’t see the problem here.

                1. 1

                  To be clear, bat’s pager capabilities start and end at running an external pager if stdout is a tty. It supplements less, it doesn’t replace it.

                  I wonder how much stuff would break if you taught cat to do the same thing. Nothing springs to mind.

            3. 14

              If humanity had followed the “if it ain’t broke, don’t fix it” maxim to the tee without exception, we would all still be living in the stone age.

              1. 8

                And we might actually be better off that way. At least, a lot less likely to drive half the planet to extinction, and probably not significantly less happy (hedonic treadmill, etc).

              2. 11
                • Bat is awesome. It’s not really a cat replacement, but a “terminal file viewer with syntax highlighting”. I would never use bat in, say, a script to concatenate files. Two tools for two different jobs.
                • I haven’t tried loc or tokei, but cloc is a giant ball of slightly buggy perl. Run cloc on a big enough project and you’re bound to encounter issues.
                • Cut can only split based on single-byte delimiters. Lots of tools try to do some form of alignment by using multiple space characters, or they use a syntax like key: value, so cut usually doesn’t cut it. Having to reach for awk just to get the third column of a thing is unfortunate, so a better cut seems like a good idea.
                • Sudo is security critical. Every now and then, there are new memory issues found in sudo which couldn’t have existed if sudo was written in a safer language.
                • People like writing system monitors. Htop, bashtop, bpytop, gotop, the list goes on. I’ve even written a few myself. It only makes sense that someone would eventually write system monitors in Rust.
                • Hyperfine isn’t really a replacement for time. Rather, hyperfine is a fairly complete benchmarking solution which does multiple timed runs, warmup runs, detects outliers, and can compare multiple commands against each other. It’s become my ad-hoc benchmarking tool of choice.
                • Zoxide is certainly not just a cd replacement. It’s a completely different way to navigate the filesystem, learning which paths you usually go to so that you can write part of a path and have zoxide take you to a frequently used directory which matches your pattern. If you’re gonna complain about zoxide, complain that it’s a reimplementaiton of something like autojump (Python) or z.lua (lua).

                I don’t have any experience with the rest of these projects, but I would bet that the same pattern holds for most of them. It seems like, actually, a lot of value is added by many of these projects.

                1. 5

                  tokei replaced my use of sloccount, which is also a giant ball of Perl and assorted support programs.

                  It’s slightly faster than either. On FreeBSD /usr/src:

                  • cloc: 3 minutes 40 seconds
                  • sloccount: 3 minutes 16 seconds
                  • tokei: 2.1 seconds
                2. 9

                  How sure are you that the existing pieces of software are in fact not broken (in the sense of having some memory-safety-related security vulnerability that might get discovered and exploited tomorrow and become the next Heartbleed)?

                  1. 2

                    I have been using broot instead of tree and it is quite a joy.

                  2. 8

                    This list is missing ripgrep, despite it being the first entry in the results/results.yaml file.

                    1. 6

                      It seems like a strange thing to leave off. Then you look at the history and see that it was removed in the last couple of days, and it seems even stranger.

                      Edit to add… this appears to be why it’s removed and it looks like it is slated to return now that the curator of the list feels that they have @burntsushi’s permission

                      1. 5

                        FWIW, I didn’t mean to ask the creator to remove ripgrep from the list. I just thought the name was inaccurate in general, and used ripgrep specifically as an example (because I could obviously speak to that with certainty).

                    2. 3

                      r/rust submission has more programs.

                      1. 2

                        I read the title as being the exact opposite. As being a list of software that aren’t written in Rust, in case you were tired of having all those Rust binaries lying around.

                        1. 2

                          How does one get tired of having binaries on ones hard drive which happens to have been compiled by the rust compiler..?

                          1. 1

                            Yeah I don’t know. It felt like an incredibly pointless post until I realised the title should be read the other way (it has changed now btw). Half way expected to see some rant against Rust. :)

                            1. 1

                              To be fair, I get where they’re coming from.

                              I’m constantly tired of having programs written in Go on my PC.

                              1. 1

                                For me java and ruby usually results in a hard pass. Although I feel that well written software is acceptable no matter the language (e.g. ghidra).

                                I once had to decompile a go binary in a ctf so I have some idea what you mean (rust will probably output something similarly incomprehensible) but if I was to set the bar that high wrt what I run then I’d be even more luddite than I already am, maybe you have some more criteria that I’m missing.

                                The only way I could realistically work with this level of scrutiny would be by getting a precursor and programming the trusted chip with a ground-up forth. I’d like to do that .. but not soon.

                          2. 1

                            I wound up trying exa and going back to ls basically immediately. It has way too many colors in the -l mode, and without those the only real differentiator I could care about was git status. Which is nice, but not worth the extra mental overhead.