Node:Ob-, Next:Obfuscated C Contest, Previous:nyetwork, Up:= O =

Ob- /ob/ pref.

Obligatory. A piece of netiquette acknowledging that the author

has been straying from the newsgroup's charter topic. For

example, if a posting in alt.sex is a response to a part of

someone else's posting that has nothing particularly to do with

sex, the author may append `ObSex' (or `Obsex') and toss off a

question or vignette about some unusual erotic act. It is

considered a sign of great winnitude when one's Obs are more

interesting than other people's whole postings.

Node:Obfuscated C Contest,

Next:obi-wan error,

Previous:Ob-, Up:= O =

Obfuscated C Contest n.

(in full, the `International Obfuscated C Code Contest', or

IOCCC) An annual contest run since 1984 over Usenet by Landon

Curt Noll and friends. The overall winner is whoever produces the

most unreadable, creative, and bizarre (but working) C program;

various other prizes are awarded at the judges' whim. C's terse

syntax and macro-preprocessor facilities give contestants a lot

of maneuvering room. The winning programs often manage to be

simultaneously (a) funny, (b) breathtaking works of art, and (c)

horrible examples of how not to code in C.

This relatively short and sweet entry might help convey the

flavor of obfuscated C:

/*

* HELLO WORLD program

* by Jack Applin and Robert Heckendorn, 1985

* (Note: depends on being able to modify elements of argv[],

* which is not guaranteed by ANSI and often not possible.)

*/

main(v,c)char**c;{for(v[c++]="Hello, world!\n)";

(!!c)[*c]&&(v--||--c&&execlp(*c,*c,c[!!c]+!!c,!c));

**c=!c)write(!!*c,*c,!!**c);}

Here's another good one:

/*

* Program to compute an approximation of pi

* by Brian Westley, 1988

* (requires pcc macro concatenation; try gcc -traditional-cpp)

*/

#define _ -F<00||--F-OO--;

int F=00,OO=00;

main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO()

{

_-_-_-_

_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_-_-_-_-_

_-_-_-_-_-_-_-_

_-_-_-_

}

Note that this program works by computing its own area. For

more digits, write a bigger program. See also hello world.

The IOCCC has an official home page at http://www.ioccc.org.

Node:obi-wan error, Next:Objectionable-C, Previous:Obfuscated C

Contest, Up:= O =

obi-wan error /oh'bee-won` er'*r/ n.

[RPI, from `off-by-one' and the Obi-Wan Kenobi character in

"Star Wars"] A loop of some sort in which the index is off by 1.

Common when the index should have started from 0 but instead

started from 1. A kind of off-by-one error. See also zeroth.

The Jargon File, Version 4.2.2, 20 Aug 2000 · 第 1183 / 1941 题