moreutils: an 'errno' utility

Adam Conrad adconrad at ubuntu.com
Thu Aug 12 10:47:42 BST 2010


On 8/11/2010 8:36 PM, Dustin Kirkland wrote:
> 
> it's a ~10 line shell script that takes one or more strings on the 
> command line, and looks for a matching POSIX error codes, error 
> names, or error descriptions.
[...]
> People have suggested rewriting it in Python, which can be done 
> easily.

On a side note, seriously, WHY do people suggest this? It literally is
10 lines of shell[1], it's screaming fast, if I really wanted to, I
could inline it in other scripts to do its thing, and never notice it
was there.

Or, I could spend a few seconds waiting for a massive Python interpreter
to load for... What? Arguments of readability (for 10 lines?), or
perhaps religious wars about the One True Scripting Language?

Stop the madness, folks. If it works, use it. If it's slow, improve
it. If you like it, hack on it and contribute to it. Don't suggest
people rewrite it to make it slower to satisfy your own religion. :P

... Adam

[1] Okay, so it forks sed, and those bits would be faster using a native
Perl or Python regex engine, except for the part where, on my systems,
the startup time of a POSIX shell and sed is still far less than that of
Python (not to mention the memory footprint).  Entertainingly, I think
it might be slightly faster in Perl (still more memory-intensive,
though), but that's not the sort of thing one suggests around here. ;)



More information about the ubuntu-devel mailing list