←back to thread

203 points dahlia | 1 comments | | HN request time: 0s | source
Show context
bschwindHN ◴[] No.45156696[source]
Rust with Clap solved this forever ago.

Also - don't write CLI programs in languages that don't compile to native binaries. I don't want to have to drag around your runtime just to execute a command line tool.

replies(9): >>45156782 #>>45156785 #>>45157057 #>>45157203 #>>45158148 #>>45159646 #>>45160365 #>>45161166 #>>45163035 #
MathMonkeyMan ◴[] No.45157057[source]
Almost every command line tool has runtime dependencies that must be installed on your system.

    $ ldd /usr/bin/rg
    linux-vdso.so.1 (0x00007fff45dd7000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000070764e7b1000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000070764e6ca000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000070764de00000)
    /lib64/ld-linux-x86-64.so.2 (0x000070764e7e6000)
The worst is compiling a C program with a compiler that uses a more recent libc than is installed on the installation host.
replies(7): >>45157725 #>>45157872 #>>45157947 #>>45157966 #>>45158276 #>>45161297 #>>45161300 #
bschwindHN ◴[] No.45157872[source]
Yes but I've never had a native tool fail on a missing libc. I've had several Python tools and JS tools fail on missing the right version of their interpreter. Even on the right interpreter version Python tools frequently shit the bed because they're so fragile.
replies(1): >>45158259 #
1. mjevans ◴[] No.45158259{3}[source]
I have. During system upgrades, usually along unsupported paths.

If you're ever living dangerously, bring along busybox-static. It might not be the best, but you'll thank yourself later.