The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Tuesday, January 27, 2004

Hello world! Care to read your email?

Yes, this really is the classic program that prints “Hello, world!” when you run it. Unlike the elementary version often presented in books like K&R, GNU hello processes its argument list to modify its behavior, supports internationalization , and includes a mail reader.

hello - GNU Project - Free Software Foundation

Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.

Law of Software Envelopment

I didn't even realize GNU had a “Hello world” program available for downloading, much less one that succumbed to the Law of Software Envelopment. Granted, GNU then goes on to say:

The primary purpose of this program is to demonstrate how to write other programs that do these things; it serves as a model for all of the GNU coding standards.

It's quite amusing that GNU can turn this:

#include <stdio.h>

main()
{
	printf("hello, world\n");
}

into a 400k compressed download, complete with its own configuration script, m4 macros (who uses m4 anymore?), man pages (and here I thought GNU was big on info pages) along with documentation in TeX, plus the various language files for Russian, Slovanian, Japanese and I even think English is included in there somewhere.

Quite amusing.

Note: technically, the code should be written as:

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
	printf("hello, world\n");
	return(EXIT_SUCCESS);
}

to be fully ANSI compliant, but hey, who am I to argue with the authors of C?

Then again, if you really want to be anal retentive about it, then:

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
	(void)printf("hello, world\n");
	return(EXIT_SUCCESS);
}

But that's just being silly …

Obligatory Picture

[The future's so bright, I gotta wear shades]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: https://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

https://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.