Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!samsung!umich!sharkey!amara!mcdaniel From: mcdaniel@adi.com (Tim McDaniel) Newsgroups: comp.lang.c Subject: Re: TRUE and FALSE Summary: Get a clue, folks! Message-ID: Date: 11 Sep 90 16:44:17 GMT References: <11215@alice.UUCP> <514@demott.COM> <2316@cirrusl.UUCP> <728@tetrauk.UUCP> <931@hls0.hls.oz> Sender: news@adi.COM Organization: Applied Dynamics International, Inc.; Ann Arbor, Michigan, USA Lines: 44 In-reply-to: george@hls0.hls.oz's message of 11 Sep 90 01:16:49 GMT Ye gods, folks, get a clue! george@hls0.hls.oz (George Turczynski) writes: Don't think for one second that I would entertain the idea of using these macros! Felix Lee posted his set, some of which expanded to 200,000++ characters. Thinking this was ridiculous, and that I might save some people wasting too much of their time, I posted the same (but improved) macro set, that didn't waste so much space. Felix Lee was indeed being ridiculous -- deliberately. It is called "satire", a subclass of the class "joke". Specifically, he was "making fun" of the whole TRUE/FALSE definition topic. Trying to "optimize" those macros was itself a complete waste of time. My own contribution was > > I rather like the way I did CONS. I didn't want the overhead of > checking for free space and allocating more on every call. Basically, > it increments the free-store pointer and just dereferences it. If > it's a bad pointer now, a signal handler does an "sbrk" to get a lot > more space, and it restarts the instruction that failed. And it's so > portable -- at least, it worked on every VAX that I tried it on. > > Have I mentioned dereferencing NIL yet, to get 0? > > By the way, would anyone like a copy of the shell I wrote in this > LISPish C? I call it "The Still-Bourne Shell". NOTE: THESE WERE ALSO "JOKES", as may be inferred from the "portability == VAX" line. Among other things, signal handlers on some machines cannot or do not restart the instruction that failed. Also, "(char *) 0" can be dereferenced in a *few* operating systems to get '\0', but on most architectures, it causes a fatal error or fetches garbage. (See the "Frequently-Asked Questions" list.) The original Bourne shell (called /bin/sh on most machines) was written in pseudo-Algolish C, and used the "sbrk" kludge to do memory allocation. It was a maintenance nightmare and ridiculously unportable, and basically had to be rewritten. -- Tim McDaniel Applied Dynamics Int'l.; Ann Arbor, Michigan, USA Work phone: +313 973 1300 Home phone: +313 677 4386 Internet: mcdaniel@adi.com UUCP: {uunet,sharkey}!amara!mcdaniel