The more I do with the libc, the more I find that it
stinks. And I don't mean the glibc implementation, although
there is quite a lot about it that I find objectionable.
The whole API stinks.
All this backwards compatibility crap, all the fake
namespaces, tons of #defines, and then essential
functionality like functions to convert an integer or double
into a string portably is missing!
And I invite you to have a closer look at stdio. Most
people are not aware of the hidden complexities of stdio.
If any libc function returns a pointer, it is either
pointing to some static buffer (yuck!) or the routine called
malloc behind your back. Since GNU malloc alone weighs in
at 20k, no wonder that there are no really small utilities.
And did you notice that all the shell utilities use getopt?
Another 10k. Using printf will reference complex floating
point conversion routines and long long formatting support,
which almost noone is using. Even worse, recent printf
implementations even include wide character support and user
definable types. All that bloat is sickening me.
I am really amazed how little thought people spend on their
work. A friend recently complained about all the login
processes on his box. Huh? Who would be so stupid to have
login stay in memory for each logged in user? The answer
is: PAM. And PAM is yet another glorious Sun invention.
After my stomach had recovered, I wrote a small login
replacement as part of the fgetty
project. The cool part about my login is that it still
offers pluggable authentication, only with a sane interface
-- DJ Bernstein's checkpassword. Oh, and like most of my
software, it strives to be minimal. login is 2772 bytes and
login2 is 3012 bytes on my x86-linux box (login2 is the part
of login that is executed by checkpassword, it runs as the
user, not as root). Maybe there is a hope after all.
Today I took the time to add a few of my recent projects to
Advogato. Maybe that will inspire some of you to contribute
some code ;-)