|
|
Line 1: |
Line 1: |
| {{primary sources|date=November 2011}}
| | Kiesha Sheahan is what individuals call her but it is not the most feminine name out generally there. For years she has been working as being a people owner. Ohio is his birth place and he doesn't look forward to changing this tool. What he loves doing is coing collecting but he hasn't made funds with it all. Go to her website to find out more: http://www.ixuepin.com/space.php?uid=12839938&do=blog&id=2904<br><br>My page - [http://www.ixuepin.com/space.php?uid=12839938&do=blog&id=2904 increase size plastic] |
| The '''International Obfuscated C Code Contest''' (abbreviated '''IOCCC''') is a [[computer programming]] contest for the most creatively [[obfuscated code|obfuscated]] [[C (programming language)|C]] [[Source code|code]]. Held annually between 1984 and 1996, and thereafter in 1998, 2000, 2001, 2004, 2005, 2006, 2011, 2012, and 2013<ref>{{cite web| url = http://www.ioccc.org/all/summary.txt | title = Summary of IOCCC Winners | accessdate = 2014-01-08 | year = 2014 | format = plain text| publisher = IOCCC}}</ref> it is described as "celebrating [C's] syntactical opaqueness".<ref>{{cite journal|url=http://pcworld.co.nz/pcworld/pcw.nsf/how-to/beyond-the-command-line |accessdate=2013-04-07 |title=Beyond the command line| magazine=PC World Magazine New Zealand |author= Palmer, Geoff |date=November 1, 2004}}</ref> The winning code for the 22nd contest, held in 2013, was released in January 2014.<ref>{{cite web| url = http://www.ioccc.org/years-spoiler.html | title = Previous IOCCC Winners | accessdate = 2014-01-08 | year = 2014 | publisher = IOCCC}}</ref>
| |
| | |
| Prior to 2004, entries were submitted by email.<ref>{{cite web| url = http://www.ioccc.org/2001/rules | title = 2001 Rules | accessdate = 2011-11-12 | year = 2001 | format = plain text | publisher = IOCCC}}</ref> In 2004, for the 17th IOCCC, the competition switched to using a web-based submission process.<ref>{{cite web| url = http://www.ioccc.org/2004/rules | title = 2004 Rules | accessdate = 2011-11-12 | year = 2004 | format = plain text | publisher = IOCCC}}</ref>
| |
| | |
| Entries are evaluated anonymously by a panel of judges. The judging process is documented in the competition guidelines<ref>{{cite web| url = http://www.ioccc.org/2011/guidelines.txt | title = 2011 Guidelines | accessdate = 2011-11-12 | year = 2011 | format = plain text | publisher = IOCCC}}</ref> and consists of elimination rounds. By tradition, no information is given about the total number of entries for each competition. Winning entries are awarded with a category, such as "Worst Abuse of the [[C preprocessor]]" or "Most Erratic Behavior", and then announced on the official IOCCC website. Entries that do not make it are deleted and forgotten; the contest states that being announced on the IOCCC website ''is'' the award for winning.
| |
| | |
| ==History==
| |
| | |
| The IOCCC was started by [[Landon Curt Noll]] and [[Larry Bassel]] in 1984 while employed at National Semiconductor's Genix porting group. The idea for the contest came after they compared notes with each other about some poorly written code that they had to fix.<ref>{{cite web | url =http://www.ioccc.org/faq.html | title = FAQ | publisher=IOCCC| accessdate = 2011-11-12 }}</ref> The contest itself was the topic of a quiz question in the 1993 [[Computer Bowl]].<ref>[http://nl.newsbank.com/nl-search/we/Archives?p_product=SJ&s_site=mercurynews&p_multi=SJ&p_theme=realcities&p_action=search&p_maxdocs=200&p_topdoc=1&p_text_direct-0=0EB71B1E74EA9019&p_field_direct-0=document_id&p_perpage=10&p_sort=YMD_date:D&s_trackval=GooglePM "Top Execs Fail To Computer Correctly"]. ''San Jose Mercury News'' (CA). May 15, 1993. Pg. 1A. Via [[Newsbank]]. {{subscription required}}</ref> After a hiatus of five years starting in 2006, the contest returned in 2011.<ref name=SJMerc11>{{cite web|url=http://www.pcworld.com/article/243995/obfuscated_code_contest_returns.html |title=Obfuscated Code Contest Returns |magazine=PCWorld |date=November 15, 2011 |author=Jackson, Joab |accessdate=2013-04-07}}</ref>
| |
| | |
| Compared with other programming contests, the IOCCC is described as "not all that serious" by [[Michael Swaine (author)|Michael Swaine]], editor of ''[[Dr. Dobbs]].<ref>{{cite journal |url=http://www.drdobbs.com/architecture-and-design/there-must-be-contest/207404123 |title=There Must be Contest | first=Michael | last=Swaine | authorlink=Michael Swaine (author) | magazine= [[Dr Dobb's]] |date=May 1, 2008 |accessdate=2013-04-07 }}</ref>
| |
| | |
| ==Rules==
| |
| | |
| Each year, the rules of the contest are published on the IOCCC website. Rules vary from year to year and are posted with a set of guidelines that attempt to convey the spirit of the rules.
| |
| | |
| ::"Hacking the contest rules is a tradition". ''Landon Curt Noll, 2011.''<ref name=SJMerc11/>
| |
| | |
| The rules are often deliberately written with subtle loopholes that contestants are somewhat encouraged to find and abuse. This is the result of the contest being a "parody of the software development process". Entries that take advantage of some loophole in the rules (whether or not they pass a final round of judging) can cause the rules for the following year's contest to be adjusted accordingly (although often other subtle loopholes are deliberately introduced in the process).
| |
| | |
| ==Obfuscations employed==
| |
| | |
| Due to the nature of the contest, entries often employ strange or unusual tricks, such as using the C preprocessor to do things it was not designed to do, or avoiding commonly used constructs in the C programming language in favor of much more obscure ways of achieving the same thing. Two contest winners generated a list of prime numbers using the C preprocessor "spectacularly", according to ''Dr. Dobbs''.<ref>{{cite web|url=http://www.drdobbs.com/open-source/code-finessing/193104882?pgno=2 |title=Code Finessing |magazine=[[Dr Dobb's]] |author= Spinellis, Diomidis |date=October 5, 2006 |accessdate=2013-04-07}}</ref> Some quotes from 2004 winners include:
| |
| | |
| {{bquote|To keep things simple, I have avoided the C preprocessor and tricky statements such as "if", "for", "do", "while", "switch", and "goto".''<ref>[http://www.ioccc.org/2004/burley.hint IOCCC 2004 - Best Calculated Risk]. IOCCC. Retrieved 2013-04-08.</ref>}}
| |
| | |
| {{bquote|We still aren't sure whether or not this is a useful program, but it's the first atomic fission we've seen in the IOCCC.''<ref>[http://www.ioccc.org/2004/jdalbec.hint IOCCC 2004 - Best abuse of the Periodic table]. IOCCC. Retrieved 2013-04-08.</ref>}}
| |
| | |
| {{bquote|Why not use the program to hide another program in the program? It must have seemed reasonable at the time.''<ref>[http://www.ioccc.org/2004/sds.hint IOCCC 2004 - Best abuse of Indentation]. IOCCC. Retrieved 2013-04-08.</ref>}}
| |
| | |
| {{bquote|The program implements an 11-bit [[Arithmetic logic unit|ALU]] in the [[C preprocessor]].<ref name="cpp_abuse">[http://www.ioccc.org/2004/vik2.hint IOCCC 2004 - Best Abuse of CPP]'' IOCCC. Retrieved 2013-04-08.</ref>}}
| |
| | |
| {{bquote|I found that calculating prime numbers up to 1024 makes the program include itself over 6.8 million times.''<ref name="cpp_abuse" />}}
| |
| | |
| Some ways in which contributions are notable include:
| |
| * The appearance of the source code, formatted to resemble images, text, etc., after the manner of [[ASCII art]].
| |
| * Preprocessor redefinitions to make code harder to read.
| |
| * [[Self-modifying code]].
| |
| * Worst abuse of the rules. In several years, an entry was submitted that was so patently absurd that it required a new definition of some of the rules for the next year.{{citation needed|date=April 2013}} This is regarded as a high honor. An example is the world's shortest [[Quine (computing)|self-reproducing program]]. The entry was a program designed to output its own source code, and which had zero bytes of source code. When the program ran, it printed all zero bytes of the entire program's source code (meaning it prints nothing).<ref>{{cite web| url = http://www.ioccc.org/1994/smr.hint| title = smr.hint| year = 1994| format = plain text| publisher = IOCCC| accessdate = 2006-09-16}}</ref>
| |
| | |
| In the effort to take obfuscation to its extremes, contestants have produced programs which skirt around the edges of C standards, or result in constructs which trigger rarely used code path combinations in compilers. As a result, several of the past entries may not compile directly in a modern compiler, and some may even cause crashes.
| |
| | |
| ==Examples==
| |
| Within the code size limit of only a few kilobytes, contestants have managed to do impressively complicated things – a 2004 winner turned out an operating system.<ref>{{cite web| url = http://www.ioccc.org/2004/gavin.hint| title = gavin.hint3| year = 2004| format = plain text| publisher = IOCCC| accessdate = 2007-03-01}}</ref>
| |
| | |
| Below is a 1988 entry which calculates [[pi]] by looking at its own [[area]]:<ref>[http://www0.us.ioccc.org/years.html#1988 5th International Obfuscated C Code Contest 1988] (westley.c). IOCCC.</ref>
| |
| | |
| <source lang="c">
| |
| #define _ -F<00||--F-OO--;
| |
| int F=00,OO=00;main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO()
| |
| {
| |
| _-_-_-_
| |
| _-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_-_-_-_-_
| |
| _-_-_-_-_-_-_-_
| |
| _-_-_-_
| |
| }
| |
| </source>
| |
| | |
| (This entry was written in [[K&R C]]; it does not work correctly in ANSI C without some change.<ref>using gcc, compile with the following command line: <code>gcc -traditional-cpp -o r r.c</code> or <code>gcc -E r.c | sed 's/- -/--/g' > r2.c ; gcc -o r2 r2.c</code> (The source file is <code>r.c</code>)</ref>)
| |
| | |
| Another example is the following flight simulator, the winner of the 1998 IOCCC,<ref>[http://www.aerojockey.com/software/ioccc/index.html IOCCC Flight Simulator]. aerojockey.com. Retrieved 2013-04-08.</ref> as listed and described in ''Calculated Bets: Computers, Gambling, and Mathematical Modeling to Win'' (2001)<ref>{{cite book |title= Calculated Bets: Computers, Gambling, and Mathematical Modeling to Win |author=Skiena, Steven |pages=152, 153 |publisher=The Mathematical Association of America|year=2001|isbn=978-0521009621}}</ref> and shown below:
| |
| | |
| <source lang="c">
| |
| #include <math.h>
| |
| #include <sys/time.h>
| |
| #include <X11/Xlib.h>
| |
| #include <X11/keysym.h>
| |
| double L ,o ,P
| |
| ,_=dt,T,Z,D=1,d,
| |
| s[999],E,h= 8,I,
| |
| J,K,w[999],M,m,O
| |
| ,n[999],j=33e-3,i=
| |
| 1E3,r,t, u,v ,W,S=
| |
| 74.5,l=221,X=7.26,
| |
| a,B,A=32.2,c, F,H;
| |
| int N,q, C, y,p,U;
| |
| Window z; char f[52]
| |
| ; GC k; main(){ Display*e=
| |
| XOpenDisplay( 0); z=RootWindow(e,0); for (XSetForeground(e,k=XCreateGC (e,z,0,0),BlackPixel(e,0))
| |
| ; scanf("%lf%lf%lf",y +n,w+y, y+s)+1; y ++); XSelectInput(e,z= XCreateSimpleWindow(e,z,0,0,400,400,
| |
| 0,0,WhitePixel(e,0) ),KeyPressMask); for(XMapWindow(e,z); ; T=sin(O)){ struct timeval G={ 0,dt*1e6}
| |
| ; K= cos(j); N=1e4; M+= H*_; Z=D*K; F+=_*P; r=E*K; W=cos( O); m=K*W; H=K*T; O+=D*_*F/ K+d/K*E*_; B=
| |
| sin(j); a=B*T*D-E*W; XClearWindow(e,z); t=T*E+ D*B*W; j+=d*_*D-_*F*E; P=W*E*B-T*D; for (o+=(I=D*W+E
| |
| *T*B,E*d/K *B+v+B/K*F*D)*_; p<y; ){ T=p[s]+i; E=c-p[w]; D=n[p]-L; K=D*m-B*T-H*E; if(p [n]+w[ p]+p[s
| |
| ]== 0|K <fabs(W=T*r-I*E +D*P) |fabs(D=t *D+Z *T-a *E)> K)N=1e4; else{ q=W/K *4E2+2e2; C= 2E2+4e2/ K
| |
| *D; N-1E4&& XDrawLine(e ,z,k,N ,U,q,C); N=q; U=C; } ++p; } L+=_* (X*t +P*M+m*l); T=X*X+ l*l+M *M;
| |
| XDrawString(e,z,k ,20,380,f,17); D=v/l*15; i+=(B *l-M*r -X*Z)*_; for(; XPending(e); u *=CS!=N){
| |
| XEvent z; XNextEvent(e ,&z);
| |
| ++*((N=XLookupKeysym
| |
| (&z.xkey,0))-IT?
| |
| N-LT? UP-N?& E:&
| |
| J:& u: &h); --*(
| |
| DN -N? N-DT ?N==
| |
| RT?&u: & W:&h:&J
| |
| ); } m=15*F/l;
| |
| c+=(I=M/ l,l*H
| |
| +I*M+a*X)*_; H
| |
| =A*r+v*X-F*l+(
| |
| E=.1+X*4.9/l,t
| |
| =T*m/32-I*T/24
| |
| )/S; K=F*M+(
| |
| h* 1e4/l-(T+
| |
| E*5*T*E)/3e2
| |
| )/S-X*d-B*A;
| |
| a=2.63 /l*d;
| |
| X+=( d*l-T/S
| |
| *(.19*E +a
| |
| *.64+J/1e3
| |
| )-M* v +A*
| |
| Z)*_; l +=
| |
| K *_; W=d;
| |
| sprintf(f,
| |
| "%5d %3d"
| |
| "%7d",p =l
| |
| /1.7,(C=9E3+
| |
| O*57.3)%0550,(int)i); d+=T*(.45-14/l*
| |
| X-a*130-J* .14)*_/125e2+F*_*v; P=(T*(47
| |
| *I-m* 52+E*94 *D-t*.38+u*.21*E) /1e2+W*
| |
| 179*v)/2312; select(p=0,0,0,0,&G); v-=(
| |
| W*F-T*(.63*m-I*.086+m*E*19-D*25-.11*u
| |
| )/107e2)*_; D=cos(o); E=sin(o); } }
| |
| </source>
| |
| | |
| This program needs following command line on a Linux system to be compiled:
| |
| <pre>
| |
| cc banks.c -o banks -DIT=XK_Page_Up -DDT=XK_Page_Down \
| |
| -DUP=XK_Up -DDN=XK_Down -DLT=XK_Left -DRT=XK_Right \
| |
| -DCS=XK_Return -Ddt=0.02 -lm -lX11 -L/usr/X11R6/lib
| |
| </pre>
| |
| | |
| ==See also==
| |
| | |
| *[[Obfuscated Perl Contest]]
| |
| *[[Underhanded C Contest]]
| |
| | |
| ==Notes and references==
| |
| <!-- See [[Wikipedia:Footnotes]] for instructions. -->
| |
| <references />
| |
| | |
| ==External links==
| |
| *[http://www.ioccc.org IOCCC web site]
| |
| | |
| [[Category:Recurring events established in 1984]]
| |
| [[Category:Programming contests]]
| |
| [[Category:Ironic and humorous awards]]
| |
| [[Category:C programming language]]
| |
| [[Category:Obfuscation]]
| |