[Gllug] Name server software?

Nix nix at esperi.org.uk
Tue Jan 11 00:05:53 UTC 2005


On Mon, 10 Jan 2005, Ben Fitzgerald mused:
> On Mon, Jan 10, 2005 at 12:02:32AM +0000, Nix wrote:
>> On Sun, 09 Jan 2005, Rich Walker mused:
>> > Nix <nix at esperi.org.uk> writes:
>> > 
>> >> No, it was the *code* that made me do that. A multiline string on the
>> >> end of a ternary conditional involving poster dereferences, the whole
>> >> inside function arguments? Iccck.
>> > 
>> > Oh right. I gave up trying to read his code a long time ago - about 30
>> > seconds after installing Exim, I think :->
>> 
>> It could be worse.
>> 
>> It could be procmail.
> 
> I will spring to procmail's defense.
> 
> I have to say, I find the procmail regex syntax pretty handy.

Oh, procmail itself is a godsend and I use it all the time.

But the source code, *augggh*. It may as well be closed source: the
source is utterly hideous, apparently written with the intention
of getting as much on one line as possible, with massive use of
comma-separated declarators, and spaces banned. There are lots
of comments, but that just serves to make everything even *more*
cluttered.

And then the author has to go to ridiculous lengths to try to make
randomly selected bits of this pile of unreadable gunge comprehensible.

I mean, look at *this*, from formail.c:

,----
| /*
|  *	sender determination fields in order of importance/reliability
|  *	reply-address determination fields (wrepl specifies the weight
|  *	for header replies and wrrepl specifies the weight for header
|  *	replies where Resent- header are used, while the position in the
|  *	table index specifies the weight for envelope replies and From_
|  *	line creation.
|  *
|  *	I bet this is the first time you've seen a bar graph in
|  *	C-source-code :-)
|  */
| static const struct {const char*head;int len,wrepl,wrrepl;}sest[]=
| { sslbar(replyto	,"*********"	,"********"	),
|   sslbar(Fromm		,"**foo***"	,"**bar**"	),
|   sslbar(sender		,"*******"	,"******"	),
|   sslbar(res_replyto	,"*"		,"***********"	),
|   sslbar(res_from	,"*"		,"**********"	),
|   sslbar(res_sender	,"*"		,"*********"	),
|   sslbar(path		,"**"		,"*"		),
|   sslbar(retreceiptto	,"***"		,"**"		),
|   sslbar(errorsto	,"****"		,"***"		),
|   sslbar(returnpath	,"******"	,"*****"	),
|   sslbar(From_		,"*****"	,"****"		),
| };
`----

Yes, it *is* the first time I've seen a bar graph with functional effect
in source code. I hope it's the last time, too. And the spacing is
so baroque that it took me some seconds to recognise the top line as a
structure definition and not a function prototype for a function with
an invalid name.

I mean, there's self-documenting, and then there's silly.

> The recipe flags are not immediately intuitive, though.

`Not immediately intuitive' is procmail to a T. But it's
killingly useful nonetheless.

-- 
`Blish is clearly in love with language. Unfortunately,
 language dislikes him intensely.' --- Russ Allbery
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list