[Toybox] tsort
Rob Landley
rob at landley.net
Sat Oct 14 04:28:59 PDT 2023
On 10/11/23 15:57, scsijon wrote:
> I knew it from ibm mainframes and FEP's for aix, try this url for a
> simple explanation, it's pretty basic what it does.
>
> https://www.ibm.com/docs/da/aix/7.3?topic=t-tsort-command
I know what it does _now_. I wrote one from scratch that works.
The topic at hand is whether I should redo it based on a different algorithm for
better scalability up in the hundreds of thousands of entries range. (Answer:
probably yes, the numbers seem convincing. I have to hack through a lot of
math-speak from a book first published in 1968 to understand the suggested
algorithm though.)
Lemme look at your link... to the danish version?
IBM's documentation was once again written by someone who assumes you already
know what it does, or that you already know what "topological" means in this
context. "The tsort command reads from File or standard input an unordered list
of ordered pairs, builds a completely ordered list, and writes it to standard
output." It does not explain what KIND of ordering. ("Completely ordered" is
different from "alphabetically ordered"?)
It could instead have said something like:
The tsort dependency resolver reads pairs of strings indicating before/after
relationships, and outputs a list with each string appearing once and every
"before" preceding each corresponding "after", or an error message if circular
dependencies prevent such an ordering.
That would be a description that does NOT assume you already know what it does.
My complaint was that they didn't write documentation that explains what it does
to people who don't already know what it does. (I'm wondering if the whole
upstart->systemd path would have started if "you could use something like tsort
to order more complicated init scripts" had actually occurred to anybody.)
Rob
P.S. People keep thinking I'm getting... I dunno, angry about this? What I am is
disappointed. This can be very easy. It can be simple, straightforward, and
explained without shibboleths. I'm frustrated that it's NOT. When I go "sigh" in
my blog, skip to 2:10 in https://www.youtube.com/watch?v=JnoIclboPFY and
Kryten's line at the end is about the right level of "sigh".
More information about the Toybox
mailing list