Files
ioccc/README.html
T

611 lines
26 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- START: two lines up starts content from: inc/top.default.html -->
<!-- END: this line ends content from: inc/top.default.html -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<link rel="stylesheet" href="./ioccc.css">
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap" rel="stylesheet">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>The International Obfuscated C Code Contest</title>
<link rel="icon" type="image/x-icon" href="./favicon.ico">
<meta name="description" content="IOCCC GitHub repo README">
<meta name="keywords" content="IOCCC, IOCCC GitHub repo README">
</head>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- END: this line ends content from: inc/head.default.html -->
<!-- -->
<!-- This web page was formed via the tool: bin/gen-top-html.sh -->
<!-- The content of main section of this web page came from: README.md -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! Do not modify this web page, instead modify the file: README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: README.md !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- Markdown content was converted into HTML via the tool: bin/md2html.sh -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/topbar.default.html -->
<div class="theader">
<nav class="topbar">
<div class="container">
<div class="logo">
<a href="./index.html" class="logo-link">
IOCCC
</a>
</div>
<div class="topbar-items">
<div class="item">
<span class="item-header">
Entries
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="./years.html" class="sub-item-link">
Winning Entries
</a>
</div>
<div class="outfit-font">
<a href="./authors.html" class="sub-item-link">
People who have won
</a>
</div>
<div class="outfit-font">
<a href="./location.html" class="sub-item-link">
Location of authors
</a>
</div>
<div class="outfit-font">
<a href="./bugs.html" class="sub-item-link">
Bugs &amp; (Mis)features
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
Status
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="./news.html" class="sub-item-link">
IOCCC News
</a>
</div>
<div class="outfit-font">
<a href="./status.html" class="sub-item-link">
Contest status
</a>
</div>
<div class="outfit-font">
<a href="./next/index.html" class="sub-item-link">
Rules &amp; Guidelines
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
FAQ
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="./faq.html" class="sub-item-link">
FAQ
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#submit" class="sub-item-link">
How to enter the IOCCC
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#fix_an_entry" class="sub-item-link">
Fixing IOCCC entries
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#fix_web_site" class="sub-item-link">
Fixing the web site
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#fix_author" class="sub-item-link">
Fixing author info
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
About
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="./index.html" class="sub-item-link">
IOCCC Home
</a>
</div>
<div class="outfit-font">
<a href="./judges.html" class="sub-item-link">
The IOCCC Judges
</a>
</div>
<div class="outfit-font">
<a href="./contact.html" class="sub-item-link">
Contacting the IOCCC
</a>
</div>
<div class="outfit-font">
<a href="./thanks-for-help.html" class="sub-item-link">
Thanks for the help
</a>
</div>
</div>
</div>
</div>
</div>
</nav>
<div class="header-mobile-menu">
<noscript>
<a href="./nojs-menu.html" class="topbar-js-label">
Please Enable JavaScript
</a>
</noscript>
<button id="header-open-menu-button" class="topbar-mobile-menu">
<img
src="./png/hamburger-icon-open.png"
alt="hamburger style menu icon - open state"
width=48
height=48>
</button>
<button id="header-close-menu-button" class="hide-content">
<img
src="./png/hamburger-icon-closed.png"
alt="hamburger style menu icon - closed state"
width=48
height=48>
</button>
<div id="mobile-menu-panel" class="hide-content">
<div class="mobile-menu-container">
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
Entries
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="./years.html">
Winning Entries
</a>
<a class="mobile-submenu-item" href="./authors.html">
People who have won
</a>
<a class="mobile-submenu-item" href="./location.html">
Location of authors
</a>
<a class="mobile-submenu-item" href="./bugs.html">
Bugs &amp; (Mis)features
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
Status
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="./status.html">
Contest status
</a>
<a class="mobile-submenu-item" href="./next/index.html">
Rules &amp; Guidelines
</a>
<a class="mobile-submenu-item" href="./news.html">
IOCCC News
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
FAQ
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="./faq.html">
Frequently Asked Questions
</a>
<a class="mobile-submenu-item" href="./faq.html#submit">
How to enter the IOCCC
</a>
<a class="mobile-submenu-item" href="./faq.html#fix_an_entry">
Fixing IOCCC entries
</a>
<a class="mobile-submenu-item" href="./faq.html#fix_web_site">
Fixing the web site
</a>
<a class="mobile-submenu-item" href="./faq.html#fix_author">
Fixing author info
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
About
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="./index.html">
IOCCC Home
</a>
<a class="mobile-submenu-item" href="./judges.html">
The IOCCC Judges
</a>
<a class="mobile-submenu-item" href="./contact.html">
Contacting the IOCCC
</a>
<a class="mobile-submenu-item" href="./thanks-for-help.html">
Thanks for the help
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
var headerOpenMenuButton = document.getElementById("header-open-menu-button");
var headerCloseMenuButton = document.getElementById("header-close-menu-button");
var mobileMenuPanel = document.getElementById("mobile-menu-panel");
headerOpenMenuButton.addEventListener("click", () => {
headerOpenMenuButton.classList.remove("topbar-mobile-menu");
headerOpenMenuButton.classList.add("hide-content");
headerCloseMenuButton.classList.remove("hide-content");
headerCloseMenuButton.classList.add("topbar-mobile-menu");
mobileMenuPanel.classList.remove("hide-content");
mobileMenuPanel.classList.add("topbar-mobile-panel");
});
headerCloseMenuButton.addEventListener("click", () => {
headerCloseMenuButton.classList.remove("topbar-mobile-menu");
headerCloseMenuButton.classList.add("hide-content");
mobileMenuPanel.classList.add("hide-content");
mobileMenuPanel.classList.remove("topbar-mobile-panel");
headerOpenMenuButton.classList.add("topbar-mobile-menu");
headerOpenMenuButton.classList.remove("hide-content");
});
</script>
<!-- END: this line ends content from: inc/topbar.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<div class="header">
<a href="./2011/zucker/index.html">
<img src="./png/ioccc.png"
alt="IOCCC image by Matt Zucker"
width=300
height=110>
</a>
<h1>The International Obfuscated C Code Contest</h1>
<h2>About the IOCCC GitHub repo</h2>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/navbar.empty.html -->
<div class="navbar">
<a class="Right" href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2FREADME.html">&#x2713;</a>
</div>
<!-- END: this line ends content from: inc/navbar.empty.html -->
<!-- START: this line starts content from: inc/before-content.default.html -->
<div class="content" id="content">
<!-- END: this line ends content from: inc/before-content.default.html -->
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- BEFORE: 1st line of markdown file: README.md -->
<h3 id="this-is-not-the-official-ioccc-web-site">This is NOT the official IOCCC web site!</h3>
<p>Please visit <a href="https://www.ioccc.org">www.ioccc.org</a> for the official <strong>IOCCC</strong> web site.</p>
<p>Please do NOT bookmark or link to this <a href="https://ioccc-src.github.io/temp-test-ioccc/">experimental web site</a>.</p>
<p>When this experiment is finished, this site will go away!</p>
<p>This test web tree is part of the <a href="https://github.com/ioccc-src/temp-test-ioccc">temp-test-ioccc GitHub repo</a>.</p>
<p>This web site will be undergoing major changes, so expect many
broken links, typos and other problems. If you wish to recommend
changes (understanding that things may be rapidly changing out from
under your copy), then consider making pull requests against the
temp-test-ioccc GitHub repo.</p>
<p>XXX - The text from the top down to the <em>What follows is the actual README.md file</em>
line will be removed when this web site becomes official - XXX</p>
<h2 id="what-follows-is-the-actual-readme.md-file---remove-from-top-down-through-this-line---xxx">What follows is the actual README.md file - Remove from top down through this line - XXX</h2>
<h1 id="the-international-obfuscated-c-code-contest">The International Obfuscated C Code Contest</h1>
<h2 id="obfuscate-verb-with-object"><strong>Obfuscate</strong> | <em>verb</em> [with object]</h2>
<ul>
<li><p>render obscure, unclear, or unintelligible: the spelling changes will deform
some familiar words and obfuscate their etymological origins.</p>
<ul>
<li>bewilder (someone): it is more likely to obfuscate people than enlighten them.
obfuscatory | adjective</li>
</ul>
<p>late Middle English (as adjective): from late Latin <strong>obfuscat-</strong>
‘darkened’, from the verb <strong>obfuscare</strong>, based on Latin <strong>fuscus</strong> ‘dark’.</p></li>
</ul>
<h2 id="obfuscation-noun"><strong>Obfuscation</strong> | <em>noun</em></h2>
<ul>
<li><p>the action of making something obscure, unclear, or unintelligible: when
confronted with sharp questions they resort to obfuscation | ministers put up
mealy-mouthed denials and obfuscations.</p>
<p>late Middle English: from late Latin <strong>obfuscatio(n-)</strong>, from <strong>obfuscare</strong>
‘to darken or obscure’ (see <em>obfuscate</em>).</p></li>
</ul>
<p>The official IOCCC web site is <a href="https://www.ioccc.org">www.ioccc.org</a>.</p>
<h2 id="how-it-was-started">How it was started:</h2>
<p>The original inspiration of the International Obfuscated C Code Contest came
from the Bourne Shell source and the <code>finger(1)</code> command as distributed in
<a href="https://en.wikipedia.org/wiki/History_of_the_Berkeley_Software_Distribution#4.2BSD">4.2BSD</a>.
If this is what could result from what some people claim is reasonable
programming practice, then to what depths might quality sink if people really
tried to write poor code?</p>
<p>I put that question to the USENET news groups net.lang.c and net.unix-wizards in
the form of a contest. I selected a form similar to the contest
(<a href="https://www.bulwer-lytton.com">Bulwer-Lytton</a> contest) that asks people to create the
worst opening line to a novel (that contest in turn was inspired by disgust over
<a href="https://en.wikipedia.org/wiki/Paul_Clifford">a novel</a> by <a href="https://en.wikipedia.org/wiki/Edward_Bulwer-Lytton">Edward
Bulwer-Lytton</a> that opened
with the line <em>“It was a dark and stormy night.”</em>). The rules were simple: write,
in 512 bytes or less, the worst complete C program.</p>
<p>Thru the contest I have tried to instill two things in people. First is a
disgust for poor coding style. Second was the notion of just how much utility
is lost when a program is written in an unstructured fashion. IOCCC winning entries
help do this by what I call <em>satirical programming</em>. To see why, observe one of
the definitions of <em>satire</em>:</p>
<blockquote>
<p>Keen or energetic activity of the mind used for the purpose
of exposing and discrediting vice or folly.</p>
</blockquote>
<p>The authors of the winning entries placed a great deal of thought into their
programs. These programs in turn exposed and discredited what I considered to
be the programmer’s equivalent of “<em>vice or folly</em>”.</p>
<p>There were two unexpected benefits that came from IOCCC winning entries. First
was an educational value to the programs. To understand these C programs is to
understand subtle points of the C programming language. The second benefit is
the entertainment value, which should become evident as you read further!</p>
<h2 id="suggestions-on-how-to-understand-the-winning-entries">Suggestions on how to understand the winning entries:</h2>
<p>You are strongly urged to try to determine what each program will produce by
visual inspection. Often this is an impossible task, but the difficulty that
you encounter should give you more appreciation for the entry.</p>
<p>If you have the energy to type in the text, or if you have access to a machine
readable version of these programs, you should next consider some preprocessing
such as:</p>
<pre><code>sed -e &#39;/^#.*include/d&#39; prog.c | cc -E</code></pre>
<p>This strips away comments and expands the program’s macros without having things
such as includes and macros cluttering up the output. If the entry requires or
suggests the use of compile line options (such as <code>-Dindex=strchr</code>) they should
be added after the <code>-E</code> flag. See the entry index.html and/or Makefile. For the
Makefiles look at the variable <code>CDEFINE</code>.</p>
<p>The next stage towards understanding is to use a C beautifier or C indenting
program on the source. Be warned that a number of these entries are so twisted
that such tools may abort or become very confused, sometimes even preventing
them from compiling. You may need to help out by doing some initial formatting
with an editor. You might also try renaming variables and labels to give more
meaningful names. Be aware, however, that some entries will not work if you
rename variables, even if you manage to determine where exactly they are (to say
nothing of the fact that the name might be elsewhere in the code).</p>
<p>Now try linting the program. You may be surprised at how little lint complains
about these programs. Pay careful attention to messages about unused variables,
wrong types, pointer conversions, etc. But be careful, some lints produce
incorrect error messages or even abort (or even crash)! Your lint may detect
syntax errors in the source. See the next paragraph for suggestions on how to
deal with this.</p>
<p>When you get to the stage where you are ready to compile the program, examine
the compilation comments above each entry. A simple <code>#define</code> (or <code>-D</code> at the
compiler) or edit may be required due to differing semantics between operating
systems. If you are able to successfully compile the program, experiment with it
by giving it different arguments or input. You may also use the Makefile
provided to compile the program. Look at the <code>To build</code> and <code>Try</code> sections at
the top of the index.html for each entry as well. Keep in mind that C compilers
often have bugs, or features which result the program failing to compile. You
may have to do some syntax changing as we did to get old programs to compile on
strict ANSI C compilers.</p>
<p>Last, read the judges’ remarks/spoilers on the program. Hints for <code>foo.c</code> are
given in <code>index.html</code>. Often they will contain suggested arguments or
recommended data to use. Authors also sometimes give spoilers.</p>
<p>If you do gain some understanding of how a program works, go back to the source
and reexamine it using some of the techniques outlined above. See if you can
convince yourself of why the program does what it does.</p>
<h2 id="regarding-the-source-archive">Regarding the source archive:</h2>
<p>Each sub-directory contains all the entries for a single year. Often the file
names match one of the last names of the author. Judges’ hints are given in
files of the form <code>index.html</code>.</p>
<p>You may need to tweak the Makefile to get everything to compile correctly. Read
the index.html files for suggestions.</p>
<p>The rules for a given year are given in the file named <code>rules.txt</code>. Each
archive contains a copy of the rules for the upcoming contest.</p>
<p>The <a href="years.html">years.html</a> web page the official archive of the winning entries.</p>
<h2 id="regarding-the-distribution-of-sources">Regarding the distribution of sources:</h2>
<p>All contest results are in the public domain. We do ask that you observe the
following request:</p>
<p>You may share these files with others, but please do not prevent them of
doing the same. If some of these files and/or contest entries are
published in printed form, or if you use them in a business or classroom
setting, please let us know. We ask that you drop a line to the
judges’ email box. See <a href="contact.html">contact.html</a> for instructions on
how to send us a message.</p>
<h2 id="some-final-things-to-remember">Some final things to remember:</h2>
<p>While the idea for the contests has remained the same through the years, the
contest rules and guidelines vary. What was novel one year may be considered
common the next. The categories for awards differ because they are determined
after the judges examine all of the entries.</p>
<p>The judges’ hints assume that the program resides in a file with the same
username as the author or <code>prog.c</code> (depending on the year). Where there is more
than one author, the first named author is used. If an author wins more than
one entry <em>per year</em> there are different formats used but the first entry has 1
appended, the second has 2 etc. In some years it was <code>.1</code> and <code>.2</code> instead.</p>
<p>Some C compilers are unable to compile some of these programs. The judges tried
to select programs that were widely portable and compilable, but did not always
succeed. As of 1990, an entry may use both <code>K&amp;R</code> and ANSI C compilers.
Makefiles for both types of C compilers are used. See the contest rules for
details.</p>
<p>You are strongly encouraged to read the new contest rules before sending any
entries. The rules, and sometimes the contest email address itself, change from
time to time. A valid entry one year may be rejected in a later year due to
changes in the rules. See <a href="news.html">news.html</a> for up to
date information on how to enter.</p>
<p>Last, <strong>PLEASE DO <em>NOT</em></strong> code in the style of these programs! It is hoped that you will
gain an understanding that poor style destroys an otherwise correct program.
Real programmers don’t write obfuscated programs, unless they are submitting a
contest entry! :-)</p>
<p>Happy pondering!</p>
<h2 id="about-the-ioccc-github-repository">About the IOCCC GitHub repository</h2>
<p>The <a href="https://github.com/ioccc-src/winner">official IOCCC entries GitHub repository</a> are the
official entries that won the <strong>International Obfuscated C Code Contest (IOCCC)</strong>, the
Internet’s oldest ongoing contest.</p>
<p><strong>IMPORTANT NOTE</strong>: See <a href="contact.html">contact.html</a> for up to date contact details
as well as details on how to provide fixes to any of the entries.
See also <a href="faq.html">the IOCCC FAQ</a> for additional information on the IOCCC.</p>
<!--
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
-->
<!-- AFTER: last line of markdown file: README.md -->
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content from: inc/after-content.default.html -->
</div>
<!-- END: this line ends content from: inc/after-content.default.html -->
<!-- START: this line starts content from: inc/footer.default.html -->
<!--
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
-->
<div class="footer">
<div id="copyright"><h2>Copyright and CC BY-SA 4.0 License</h2></div>
<p>All IOCCC content including this file and web page are:</p>
<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copyright &copy; 1984-2024 by Landon Curt Noll. <a href="https://creativecommons.org/faq/#what-does-some-rights-reserved-mean">Some Rights Reserved</a>.</b>
<p>This work is licensed by Landon Curt Noll under:</p>
<p><b><a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1"
target="_blank" rel="license noopener noreferrer" style="display:inline-block;">&nbsp;&nbsp;&nbsp;&nbsp;CC BY-SA 4.0
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="./png/cc.png"
alt="cc inside circle symbol">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="./png/by.png"
alt="person inside circle symbol">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="./png/sa.png"
alt="arrow looping back on itself inside circle symbol">
</a></b></p>
<p>The <b>CC BY-SA 4.0 LEGAL CODE</b> for this license is found under:</p>
<p>&nbsp;&nbsp;&nbsp;<b><a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en">
https://creativecommons.org/licenses/by-sa/4.0/legalcode.en</a></b></p>
<p>You should <b>carefully review</b> all of the terms and conditions of the
<a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en">actual license</a>
before using the licensed material.</p>
<p>You may wish to review the <b><a href="./license.html">highlights of some of the key
features and terms</a></b> of the <a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en">actual license</a>.</p>
<h2>Coda</h2>
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2FREADME.html">Nu HTML check this web page</a></p>
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
</div>
<!-- END: this line ends content from: inc/footer.default.html -->
<!-- START: this line starts content from: inc/bottom.default.html -->
</body>
</html>
<!-- END: this line ends content from: inc/bottom.default.html -->