utils-std-announce.xml (4598B)
- <entry>
- <title>Announcing utils-std: A collection of commonly available Unix tools</title>
- <link rel="alternate" type="text/html" href="/articles/utils-std-announce"/>
- <!--<published>2024-06-23T10:18:22Z</published>
- <updated>2024-06-23T10:18:22Z</updated>-->
- <!--<link rel="external replies" type="application/activity+json" href="https://queer.hacktivis.me/objects/7d2cd28e-7550-475c-ba13-28288a705297" />
- <link rel="external replies" type="text/html" href="https://queer.hacktivis.me/objects/7d2cd28e-7550-475c-ba13-28288a705297" />-->
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="h-entry">
- <p>
- Many years ago after being annoyed at both BusyBox and GNU coreutils, I started replacing few utilities like <code>true(1)</code>/<code>false(1)</code>, as well as <code>date(1)</code>.
- This was rather slow paced, merely replacing utilities when I wanted a better version of them.
- </p>
- <p>
- Then I picked up the pace after looking into full-source system bootstrapping.
- As I thought it would be pretty cool to get proper utilities easily, most importantly not require old versions for this kind of ordeal.
- Otherwise we could easily end up locking ourselves to both old operating systems and old CPU architectures/platforms.
- </p>
- <h2>Links</h2>
- <ul>
- <li><a href="https://hacktivis.me/git/utils-std/">Git repository</a></li>
- <li><a href="https://hacktivis.me/git/utils-std.mdoc/">Webview of the manpages</a></li>
- <li><a href="https://hacktivis.me/releases/utils-std/">Tarballs</a> (only snapshots for now)</li>
- </ul>
- <h2>The problems with GNU coreutils</h2>
- <p>
- Frankly I find GNU coreutils to be horrible.
- Yes, it's <code>cat(1)</code> and <code>yes(1)</code> implementations are so long and weird they became meme material but they're at least somewhat acceptable. The true pains are:
- <ul>
- <li><code>true --help >/dev/full</code> and <code>true --version >/dev/full</code> fails, so you can't rely on true as a no-op utility</li>
- <li>The <code>--date</code> option of GNU date is based on natural language processing, don't rely on it, you'll end up with nonsense results that at first sight could look fine instead of errors</li>
- <li><code>cut -c</code> doesn't works with multibytes codepoints (aka character runes). Working with characters rather than bytes (<code>-b</code>) is the whole reason <code>-c</code> exists…</li>
- <li>Awful manpages: <a href="https://manned.org/join.1">join(1)</a> and <a href="https://manned.org/paste.1">paste(1)</a> are barely described at all, <a href="https://manned.org/tsort.1">tsort(1)</a> is essentially a placeholder</li>
- <li><code>rm(1)</code> implementation is a mess, you end up with massive functions shared between utilities dealing with options logic and user-prompt parsing instead of separating functions per-fonctionality and having logic like user-prompts being their own functions</li>
- </ul>
- </p>
- <h2>Is utils-std entirely from scratch?</h2>
- <p>
- Nah. I picked up few utilities from FreeBSD/OpenBSD/NetBSD. I picked sha{1,256,…}sum from sbase, …<br />
- In fact part of why utils-std default license is the MPL-2.0 and not a GPL license is to be able to easily pick up code from other projects without some kind of license incompatibility problem.
- </p>
- <h2>But why not use BusyBox/Toybox/sbase/chimera-utils/… ?</h2>
- <h3>BusyBox/Toybox</h3>
- <ul>
- <li>Buildsystem heavily depends on GNU Make and GNU Bash</li>
- <li>Severely lacking. It's typical to install coreutils on Alpine systems to simply get POSIX fonctionality</li>
- <li>Stuck on reimplementing everything, specially ToyBox due to it's 0BSD licensing</li>
- <li>While there is a busybox manpage, it's equivalent to concatenated <code>--help</code> output, and a single manpage with 100+ utilities isn't easy to browse</li>
- </ul>
- <h3>sbase</h3>
- <ul>
- <li>Pretty good in terms of dependencies</li>
- <li>Also seems severely lacking, including against POSIX fonctionality</li>
- </ul>
- <p>
- I also don't really vibe with suckless.org ethos: Minimalistic to a degree where usability suffers, and code that I find lacking when it comes to error handling.
- </p>
- <h3>chimera-utils</h3>
- <ul>
- <li>Depends on at least meson/ninja, flex, byacc, libxo</li>
- <li>Soft-fork of FreeBSD utilities so even better than the baseline of POSIX fonctionality (although that can mean BSD-isms vs. GNU-isms)</li>
- </ul>
- <p>
- I would use it if the dependencies wouldn't mean breaking bootstrapping from source, and I would recommend it as an alternative, specially against BusyBox/Toybox/sbase.
- </p>
- </div>
- </content>
- </entry>