What does HackerNews think of bu?

B)asic|But-For U)tility Code/Programs (Usually Nim & With Unix/POSIX/Linux Context)

Language: Nim

You better off with using a compiled language.

If you interested in a language that's compiled, fast, but as easy and pleasant as Python - I'd recommend you take a look at Nim: https://nim-lang.org.

Nim has cligen library to generate and parse arguments: https://github.com/c-blake/cligen

And to prove what Nim's capable of - here's a cool repo with 100+ cli apps cligen author wrote in Nim: https://github.com/c-blake/bu

If you find this article interesting and are curious about Nim then you would probably also be curious about https://github.com/c-blake/cligen

That allows adding just 1-line to a module to add a pretty complete CLI and then a string per parameter to properly document options (assuming an existing API using keyword arguments).

It's also not hard to compile & link a static ELF binary with Nim.. I do it with MUSL libc on Linux all the time. I just toss into my ~/.config/nim/nim.cfg:

    @if musl:  # make nim c -d:musl .. foo static-link `foo` with musl
      cc            = gcc               # --opt:size trades more speed
      gcc.exe       = "musl-gcc"        # NOTE: This also works as a ..
      gcc.linkerexe = "musl-gcc"        #..per-module foo.nim.cfg
      passL         = "-static -s"
    @end
Lisp is often cited as one of Nim's inspirations.

EDIT: https://nim-lang.org/ has much more detail and there are over 50 small CLI programs at https://github.com/c-blake/bu as rather extended examples. Using that musl approach I get tiny little 100 kB ELF executables that would work on practically any Linux you can `scp` them to with none of the boilerplate/language limits/hassles or speed-limits of, say, Go and run-time start-up times on the order of 100 microseconds. There are all kinds of great libs in Nim, too like @V1ndaar's https://github.com/SciNim/Measuremancer or all sorts of goodies over at https://nimble.directory/

I don't know about all your other questions, and I realize your post was more about "why Rust?" rather than "why not Nim?", but that said the https://github.com/c-blake/cligen Nim CLI framework seems much lower effort / ceremony than even Rust's `argh` and is just about as old as `clap` (both cligen & clap started 8 years ago in 2015 - Rust argh is much newer).

There are over 50 CLI utilities in Nim at https://github.com/c-blake/bu, many of which do something novel rather than just "re-doing ls/find/cat with a twist". While they are really more "ls/ps construction toolkits" with some default configs to get people going, I think https://github.com/c-blake/lc and https://github.com/c-blake/procs are nicer than Rust alternatives. I mention these since you seem interested in such tools.

> https://github.com/c-blake/bu

That's quite an impressive amount of cmdline tools.