Add "<!-- BEFORE: 1st line of markdown file: FILE/PATH -->" before the markdown content. This line appears in the generated HTML. Add "<!-- AFTER: last line of markdown file: FILE/PATH -->" after the markdown content. This line appears in the generated HTML. We test a fix relating to problems produced by `pandoc(1)` when footnotes are added at the end of generated HTML. This test is made for `2000/bmeyer/index.html`. Fixed exit 4 in `bin/md2html.sh that should be exit 5. Changed `bin/md2html.sh` VERSION from to "1.3 2024-04-14" to "1.4 2024-04-18". Run `bin/readme2index.sh -v 1 2000/bmeyer` to perform the above.
368 lines
20 KiB
HTML
368 lines
20 KiB
HTML
<!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">
|
||
IOCCC
|
||
</div>
|
||
|
||
<div class="topbar-items">
|
||
<div class="item">
|
||
<span class="item-header">
|
||
Home
|
||
</span>
|
||
|
||
<div class="sub-item">
|
||
<div class="outfit-font"><a href="./index.html">IOCCC Home</a></div>
|
||
<div class="outfit-font"><a href="./years.html">Winning Entries</a></div>
|
||
<div class="outfit-font"><a href="./authors.html">People who have won</a></div>
|
||
<div class="outfit-font"><a href="./location.html">Location of authors</a></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<span class="item-header">
|
||
News
|
||
</span>
|
||
|
||
<div class="sub-item">
|
||
<div class="outfit-font"><a href="./news.html">IOCCC News</a></div>
|
||
<div class="outfit-font"><a href="./status.html">Contest status</a></div>
|
||
<div class="outfit-font"><a href="./next/index.html">Rules and Guidelines</a></div>
|
||
<div class="outfit-font"><a href="./faq.html#submit">How to enter the IOCCC</a></div>
|
||
<div class="outfit-font"><a href="./faq.html">FAQ</a></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<span class="item-header">
|
||
Bugs
|
||
</span>
|
||
|
||
<div class="sub-item">
|
||
<div class="outfit-font"><a href="./bugs.html">Bugs & (mis)features</a></div>
|
||
<div class="outfit-font"><a href="./faq.html#fix_an_entry">Fixing IOCCC entries</a></div>
|
||
<div class="outfit-font"><a href="./faq.html#fix_web_site">Fixing the web site</a></div>
|
||
<div class="outfit-font"><a href="./faq.html#fix_author">Fixing author info</a></div>
|
||
<div class="outfit-font"><a href="./thanks-for-help.html">Thanks for the help</a></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<span class="item-header">
|
||
Judges
|
||
</span>
|
||
|
||
<div class="sub-item">
|
||
<div class="outfit-font"><a href="./judges.html">The IOCCC Judges</a></div>
|
||
<div class="outfit-font"><a href="./contact.html">Contacting the IOCCC</a></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
</div>
|
||
|
||
<!-- END: this line ends content from: inc/topbar.default.html -->
|
||
<!-- START: this line starts content from: inc/header.default.html -->
|
||
|
||
<div class="header">
|
||
<img src="./png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||
<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">✓</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>) 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 '/^#.*include/d' 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&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, PLEASE don’t 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> Copyright © 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;"> 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> <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 -->
|