Son of Devil's Advocate, June 2000

Click here to make UNIX performance tuning easier!
advertisement

Previous SODA Index of SODA Columns Next SODA

Son of Devil's Advocate

Stan Kelly-Bootle


Picture of Stan Kelly-Bootle

NULL Rules OK

As you know (an elitist preamble meaning that I know but you are completely unaware), an empty set, let's call it NULL, has no members. Not a one. Formally, whatever that means, if you tell me that {x [small greek epsilon ref 1] NULL}, I must question your assertion. If we agree on the basic, apparently self-evident ideas of "set" and "membership," I'm forced to reply "Show me a real x exemplar that can possibly validate your statement without an obvious contradiction." The set NULL, by definition, admits of no such x.

Further, the most "naive" [ref 2] set formalisms indicate that there's only one NULL set. Briefly: two sets are identical if and only if they have the same members. Any sets NULL1 and NULL2, each with no members, seem to meet this identity test, whether you allow "duplicates" or not! (Only an empty Zen container would allow several distinct non-existent members?)

Your next understandable reaction might be that no real set matches this definition of NULL. We haven't established existence, so far, apart from hinting at uniqueness should one of the buggers turn up. Some care is needed in defining a set that can't possibly have a member. The jokes (metalogicians are not lacking in humor, take me and Raymond Smullyan -- QED) include "The set of faithful spice," [ref 3] "The set of bug-free Windows Apps," "The set of incorruptible polticians," "The set of altruistic Venture Capitalists," and similar appeals to well- known facts. The classical "Set of white crows" is nearer the empty mark, provided you accept the contingent, ornithological observaton that "All crows are black."

This part of our schoolboy syllogistic catechism is drenched with epistemological and cladistic mysteries. As Quine with his Quiddities (and others with theirs) has pondered, it's remarkable that each encounter with a non-black non-crow seems to confirm, short-of-proof, that "All crows are black."

But even the less agenda-tainted "The set of square circles" or "The set of even primes greater than 2" don't quite catch the required foundational precision. Just as a bug-free Windows App may one day conceivably emerge (typically by renaming bugs as features), or a dying, tax-challenged VC may bequeath his or her billions to a Pets Cimitry, or "Stone me, there's this huge pink crow flying round the pub," even so can the semantics of "square," "circle," and "prime," evolve (indeed, have done so regularly) to vitiate these NULL-set definitions.

The purest definition seems to be the predicationally-determined set {NULL: x != x}.

Any potential member x of NULL must surely fail this test, for who can assert x != x without denying the ultimate tautology, x == x?

So, skipping centuries of debate (what does x == x really mean? Can equality be established in finite time? Does 1 == .9999999...?), we can claim a sort of context-free NULL set. We can also gainsay the common ultra-naive belief that NULL itself belongs to NULL! No way -- the NULL set, be told, is a valid member of other non-empty sets, but NULL itself is empty.

The ultimate meta-mathematical irony is that the boringly unique member-free NULL set spawns a uniquely fruitful sequence of sets: NULL with no members; {NULL} the unique non-null set with the single member NULL, {{NULL},NULL} the unique set with two unique members -- and so on -- whence, eventually, with "natural" mappings to the numbers 0, 1, 2, ..., to the very fiber of arithmetic. But (one of the biggest buts imaginable), must we allow the universal set, the complement of NULL, as it were, which allows membership to whatever? As Hamlet or one of that crowd said "That way madness lies." Cruel, crippling paradoxes have emerged and persist as I write. Never mind, let's have a nice cuppa tea.

Over the years, my brief columnar dips into FOM (Foundations of Mathematics) have invoked extreme reactions from yawn/desist to wow/tell-us-more. In particular, I've enjoyed exchanges with Alan Nash who shares my fascination with the "terrible beauty" of foundational math [ref 4].

In the real, sweaty, rent-paying [ref 5], programming world most of us (including Alan Nash) inhabit, the token NULL plays an equally vital but less formal role. As my chart-topping song proclaimed:

"Without a song, that stream would never bend,
"Without a NULL, that string would never end ..."

Bjarne Stroustrup [ref 6] cites

"Language shapes the way we think and determines what we can think about." (B. L. Whorf)

This Sapir-Whorf hypothesis has led to much disputation and is generally out of favor, replaced by the converse Pinker [sic] notion that how and what we think shapes our language! [ref 7]

The oft-quoted ethnolinguistic "proofs" offered by Edward Sapir and Benjamin Lee Whorf have been demolished by linguists more familiar with the cited native languages. Thus, "New Age" timeless Navajo and Hopi do have constructs representing past and future tenses. You could, equally wrongly, claim that Damon Runyan's guys'n'dolls, speaking only in an ever-present, know nothing of the pluperfect subjunctive:

"Yesterday, I walk down Broadway and I meet Nicely-Nicely. Nicely-Nicely tells me that last year he is in Miami where this dame says maybe she leaves for Paris next month..."

We can also discount Mike Rejsa's observation that the Inuit (never say Eskimo) have many names for snow, yet

"Here in Minneapolis we know about snow, but that's all we call it. Why then, do I find myself saying "", '', 0, 0L, '\0' NULL, (int *)0, 0x00, 0x0000, FALSE, etc.? Methinks this is much ado about nothing..."

ACM2000

Speaking of time and Guys'n'Dolls: Saturday, May 6th finds me at the San Francisco Fairmont for a black-tie, super-posh bash, viz the annual $150-a-plate [ref 8] ACM Awards Banquet. This is the event for which you must shun even your least-JOLT-stained USENIX T-shirt and rent some decent clobber.

ACM honored dozens of deserving causes and causers (see www.acm.org/awards/) and inducted thirty something new Fellows.

The super-prestigious A. M. Turing Award went to ... drumroll ... Fred (Mythical Man Month) Brooks, now at the University of North Carolina, applying all his IBM Stretch and 360 SE lessons to the latest 3-D molecular graphics challenges. (Next month, I hope to discuss recent counterexamples to Brooks's Laws from Eric Raymond, Bertrand Meyers et al.)

Fred Brooks

But I was fully roused from my weary, o'er-conventioned ass, by the ACM2000 joint keynote address from Kay Mauchly Antonelli and Jean Bartik: "ENIAC -- Where It All Began."

This was an overdue acknowlegement of their role in the really early days when the term "computer" meant a person (usually female) who keyed away at Monroes and Fridens and programmed by setting switches and plugging wires. Countess Ada was smiling from above.

The Sunday after ACM2000 saw us at Mills College, Oakland CA for the ACM-Mills Conference on Pioneering Women in Computing, organized by Dr Ellen Spertus (more at www.mills.edu). One of my many highlights was chatting with former ACM President Jean Sammet and swapping yarns about Amazing Grace (Murray Hopper). So much to relate -- so little time.

Unsubscribing Discouraged

I'm building a case-use-DB of unsubscribing methodologies. I welcome reader examples of those that tend, using the lazy- inertia principle, to bind you unto and beyond the grave.

Extreme instances always include the phrase "To unsubscribe simply..." followed by some inanely complex set of commands. Thus, "Simply download PISSOFF.DLL from www.xxx.com and recompile everything ..."

There are often discouraging pleas such as "We are sorry if this message reached you error, although our sole purpose is to make you rich overnight. Should you not be interested, you dumb shit, in receiving future wealth-winning offers, simply ..."

I start the thread with a relatively simple example from the Mother Church of ACM:

-- To unsubscribe from the ACM TechNews Early Alert Service: Please send a separate email to listserv@listserv2.acm.org with the line

signoff technews

in the body of your message.

-- Please note that replying directly to this message does not automatically unsubscribe you from the TechNews list.

-- ACM may have a different email address on file for you, so if you're unable to "unsubscribe" yourself, please direct your request to: technews-request@acm.org


This Column 15 Years Ago

UNIX Review JUNE 1985 - Stan Kelly-Bootle

You've Either Got, or You Haven't Got...STYLE

"It was a tempestuous, nocturnal environment..." Sorry, I seem to have left my WWB (Writer's Workbench) in Novella Mode.

You may not yet be aware that as part of the drive to make UNIX System V a universally acceptable standard, AT&T has established a set of modes for the style command. In addition to the usual checks on grammar and word-frequency, the enhanced WWB+ makes helpful suggestions from its built-in Thesaurus, or rather Thesauri, since each mode has a specialized database of synonyms and paradigms.

Rather than simply prompting the author with the occasional mot juste, or warning you that you've already used the word "environment" four times in the current sentence, the new system can offer global re-writes. They are as easy as, say, Control+B reformats in Wordstar (tm).

Using

$ rewrite/c pome

for example, where /c is the Chaucerian modifier,

$ cat pome

gave me:

Prologue to the Programmer's Tale

"A Youthe ther was fulle berded like a Parde,
"Experiaunced in Wares bothe Softe and Harde;
"Fluant was he in Languages obscourre;
"Lange programmes hadde he scribed, no-one more,
"In Algolle, APL and Graspe
"And divourse dialects of UniHaspe.
"Sonne's days he scorned to laboure alle the night
"Promoting Kernelles left and right;
"Of every Shelle fulle welle he knew the Range
"In deede, eek monthe his Jobbe woulde change!
"And everye time thatte he moved Companye
"His Income grew with certaintye,
"For oft he quoteth 'Those who write Compilers
"Are rarer thanne Foure-Minute Milers!`"

There are obvious dangers, of course. Expect a spate of systems manuals produced in /p (for Proustian) mode. If your next Overdue Invoice starts:

And thus we Bill like Bill yet Bill no more, For patience and thine credit weareth thin As did the unfed Dido pining for her love..

you can bet that some smart clerk has used the popular Shakespearean /s switch.

Some options are clearly irresistible, witness the glut of spreadsheets in Old Gothic Macfont.

When does an option become a maligned feature? Kernighan and Pike complain: "Creeping featurism encrusts commands with options that obscure the original intention of the programs." (The UNIX Programming Environment, Prentice-Hall, 1984. page 316). Whether you agree or not, you must admire the Churchilian splendor of the prose, produced without the aid of WWB+.

To my mind, the word "featurism" smacks of subjective polemic, reminiscent of Lenin's use of "Kautskyism" or "revisionism." My features are nice to have, but featurists are nasty persons who add options I personally do not want. Yet the whole point of options is that they are optional. Standards for UNIX (or anything else) should never inhibit enhancements of the superset variety.

The need for a UNIX standard is undisputable. I want command X and option Y to work consistently wherever I go, but I don't mind if X' also = X, nor if a new option Z appears. We just do not know yet what OS features might be deemed desirable by tomorrow's users on tomorrow's software. What is certain is that as memory prices decline and speeds increase, the old preoccupations with program size and efficiency are becoming less relevant. A $5 encrustment is no encrustment, no barnacle neither, me brave hearties.

Reading about the new Integrated Voice/Data UNIX systems prompted me to speculate whether the new AT&T standards will include sections on the preferred formats for spoken messages. The Bell tradition suggests that we might soon be hearing:

"The disk block number you have reached, 770123, has been changed. The new number is 654310. Please make a note of the new number for all future references. The disk block number you have reached, 770123, has been changed. The new number is 654310. Please make a note of the new number for all future references...."

or:

"The filename you have requested, FOOBAR, is unobtainable at this time. Please hang up and try later..."

or even:

"The OS you are invoking, UNIX V, has been changed. The new OS is S1. Please make a note of the new name for all future references."


ref 1: The lower-case greek epsilon is read here as "belongs to/is a member of." In other contexts it means a "vanishingly" small (infinitesimal) quantity -- which is probably why we can't find the proper symbol in our HTML font repertoire. The upper-case greek epsilon, by the way, looks like "E," completely devoid of glamor and authority.

ref 2: Paul Halmos's classic Naive Set Theory established an enduring mathematical in-joke: after the Hilbert/Gödel turmoils, there had to be a sort of minimum axiomatic Pax Mathematica allowing mathematicians to get on with the job of doing "real" mathematics with a clear conscience.

ref 3: The most unnatural plural of "spouse." John Donne warned us against boasting ("Do not tell me") of marital fidelity -- even while you are reporting the fact, your partner will be "false to two or three." In CS parlance, GetState() is seldom thread-safe. In the popular-song idiom, "Do nothing 'til you hear from me," invites the obverse.

ref 4: A term also applied to the doomed heroics of the Irish Easter Rebellion. "Terrible" as in "invoking terror."

ref 5: How open-source volunteers pay their rent and feed their kids (if any!) is the subject of much debate upon which I'll report anon. Briefly, there's a "Needy Hackers' Charity" funded from Stallman's MacArthur Prize, profits from Eric Raymond's The Cathedral & The Bazaar, with a $10K pa adminstrative contribution from Red Hat.

ref 6: page ix, The C++ Programming Language -- Special Edition, Bjarne Stroustrup, Addison-Wesley, Reading MASS, 2000. This is the latest deluxe, hard-back version weighing in at $59.95 and worth every cent per avoirdupois. You might call it the fourth edition of the sequence starting with 1 == 1985; 2 == 1991; and 3 == 1997. The special edition incorporates much new material reflecting the final (big sigh of relief) state of the C++ ISO standard and Bjarne's always honest views of its raison d'être and ups'n'downs. Rather like the Jerusalem Bible, the book provides two sexy (yellow and blue) ribbon place markers. I've set the yellow one at page 88, which urges the use of a literal 0 rather than the deprecated C-tainted macro NULL. My blue marker is at page 835 which shows a fascinatng rebus spelling out NULL as a white-spaced sequence of "!" characters. Yes, the net result is a valid NULL. No, I won't try to reproduce it here. Buy the book! See also [ref 9]!

ref 7: The Language Instinct, Steven Pinker, Morrow, 1994.

ref 8: When I "first came to this land," circa the mid-70s, I was befriended, and vice versa, by Suzy West (RIP, alas) then head [sic] PR for the Fairmont. Of our many pleasant sessions at the bar with owner Dick Swig [sic] and a night in the President's Suite ("We never dared to ask the price") you must curb your curiosity until the liability statutes expire.

ref 9: This reference is deliberately NULL beyond valid dereferencing -- dedicated to Bjarne who recently tells me that he finds my footnotes more interesting than the main text.

Stan's bio:

Liverpool-born Stan Kelly-Bootle has been exposed to computing, on and off and vice-versa, since 1953 when, after graduating in Pure Mathematics at Cambridge University, he switched to impure post-grad work on the wondrous EDSAC I. After some trenching with IBM and Univac in the 1960s and 70s, Stan opted for self-employment as a consultant, writer, folk-song revivalist, after-dinner entertainer, and cunning linguist.

His monthly DA ("Devil's Advocate") column ran and ran in UNIX Review (aka Performance Computing) from 1984 until January 2000 (a date that will live in infamy) but lives on as SODA ("Son of DA") via www.sarcheck.com the homepage devoted to UNIX performance.

The latest of his umpteen books are "The Computer Contradictionary" (MIT Press) and "UNIX Complete" (Sybex). More on his biblio- and disco-graphy can be found on http://www.feniks.com/skb/ soon due for its millennial update. Stan's Computer Contradictionary column appears monthly at www.unixreview.com.

Stan welcomes reader reaction: skb@atdial.net

To the SarCheck home page

The URL of this page may change in the future. Please bookmark the home page instead of this one.

Portions © copyright Stan Kelly-Bootle 2000.
Portions © copyright Aurora Software Inc. 1997-2000, all rights reserved.
This column is sponsored by Aurora Software Inc., makers of SarCheck. The opinions of Stan Kelly-Bootle are his own and do not necessarily reflect the opinions of Aurora Software Inc. Especially opinions about people who can afford expensive lawyers! Other products and companies referred to herein are trademarks or registered trademarks of their respective companies or mark holders.