2911 lines
179 KiB
HTML
2911 lines
179 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 -->
|
||
<!-- -->
|
||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||
<!-- !!! 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/top.default.html -->
|
||
<!-- -->
|
||
<!-- The original markdown content was formed by the tool: bin/gen-top-html.sh -->
|
||
<!-- The HTML was converted from markdown by the tool: bin/md2html.sh -->
|
||
<!-- -->
|
||
<!-- START: this line starts content from: inc/head.default.html -->
|
||
|
||
<head>
|
||
<link rel="stylesheet" href="./ioccc.css">
|
||
<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>
|
||
<meta name="description" content="IOCCC FAQ">
|
||
<meta name="keywords" content="IOCCC, FAQ, questions, answers, Frequently Asked Questions">
|
||
</head>
|
||
|
||
<!-- END: this line ends content from: inc/head.default.html -->
|
||
<!-- 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/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>Frequently Asked Questions</h2>
|
||
</div>
|
||
|
||
<!-- END: this line ends content from: inc/header.default.html -->
|
||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||
|
||
<div class="row">
|
||
|
||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||
|
||
<div class="leftcolumn">
|
||
|
||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||
|
||
<div class="sidenav">
|
||
<a href="#content">Jump to contents</a>
|
||
</div>
|
||
<hr>
|
||
<div class="sidenav">
|
||
<a href="./index.html">IOCCC Home</a>
|
||
<a href="./years.html">Winning Entries</a>
|
||
<a href="./authors.html">People who have won</a>
|
||
</div>
|
||
<hr>
|
||
<div class="sidenav">
|
||
<a href="./news.html">IOCCC News</a>
|
||
<a href="./faq.html#submit">How to enter the IOCCC</a>
|
||
<a href="./faq.html">FAQ</a>
|
||
</div>
|
||
<hr>
|
||
<div class="sidenav">
|
||
<a href="./bugs.html">Bugs & (mis)features</a>
|
||
<a href="./faq.html#fix_an_entry">Fixing IOCCC entries</a>
|
||
<a href="./faq.html#fix_web_site">Fixing the web site</a>
|
||
<a href="./faq.html#fix_author">Fixing author info</a>
|
||
<a href="./thanks-for-help.html">Thanks for the help</a>
|
||
</div>
|
||
<hr>
|
||
<div class="sidenav">
|
||
<a href="./judges.html">The IOCCC Judges</a>
|
||
<a href="./contact.html">Contacting the IOCCC</a>
|
||
</div>
|
||
<hr>
|
||
<div class="sidenav">
|
||
<a href="#top">Jump to top</a>
|
||
</div>
|
||
|
||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||
|
||
</div>
|
||
|
||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||
|
||
<div class="rightcolumn">
|
||
|
||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||
|
||
<a name="content"></a>
|
||
|
||
<!-- 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 -->
|
||
|
||
<h1 id="faq-table-of-contents">FAQ Table of Contents</h1>
|
||
<h2 id="section-0---submitting-entries-to-a-new-ioccc">Section 0 - <a
|
||
href="#faq0">Submitting entries to a new IOCCC</a></h2>
|
||
<ul>
|
||
<li><a href="#faq0_0">0.0 - How may I submit to the IOCCC?</a></li>
|
||
<li><a href="#faq0_1">0.1 - What types of entries have been
|
||
over-submitted to the IOCCC?</a></li>
|
||
<li><a href="#faq0_2">0.2 - What should I put in my entry’s
|
||
Makefile?</a></li>
|
||
<li><a href="#faq0_3">0.3 - May I use a different source or compiled
|
||
filename than prog.c or prog?</a></li>
|
||
<li><a href="#faq0_4">0.4 - What platform should I assume for my
|
||
entry?</a></li>
|
||
</ul>
|
||
<h2 id="section-1---history-of-the-ioccc">Section 1 - <a
|
||
href="#faq1">History of the IOCCC</a></h2>
|
||
<ul>
|
||
<li><a href="#faq1_0">1.0 - How did the IOCCC get started?</a></li>
|
||
<li><a href="#faq1_1">1.1 - Why are some years missing IOCCC
|
||
entries?</a></li>
|
||
<li><a href="#faq1_2">1.2 - What is the history of the IOCCC web
|
||
site?</a></li>
|
||
<li><a href="#faq1_3">1.3 - How has the IOCCC size limit rule changed
|
||
over the years?</a></li>
|
||
</ul>
|
||
<h2 id="section-2---ioccc-judging-process">Section 2 - <a
|
||
href="#faq2">IOCCC Judging process</a></h2>
|
||
<ul>
|
||
<li><a href="#faq2_0">2.0 - How many entries do the judges receive for a
|
||
given IOCCC?</a></li>
|
||
<li><a href="#faq2_1">2.1 - What should I put in the remarks.md file of
|
||
my entry?</a></li>
|
||
<li><a href="#faq2_2">2.2 - Why don’t you publish entries that do not
|
||
win?</a></li>
|
||
<li><a href="#faq2_3">2.3 - How much time does it take to judge the
|
||
contest?</a></li>
|
||
<li><a href="#faq2_4">2.4 - How many judging rounds do you
|
||
have?</a></li>
|
||
<li><a href="#faq2_5">2.5 - Why do some IOCCC entries receive the Grand
|
||
Prize or Best of Show award?</a></li>
|
||
<li><a href="#faq2_6">2.6 - How are IOCCC entries announced?</a></li>
|
||
</ul>
|
||
<h2 id="section-3---compiling-and-running-ioccc-entries">Section 3 - <a
|
||
href="#faq3">Compiling and running IOCCC entries</a></h2>
|
||
<ul>
|
||
<li><a href="#faq3_0">3.0 - What Makefile rules are available to build
|
||
or clean up IOCCC entries?</a></li>
|
||
<li><a href="#faq3_1">3.1 - Why doesn’t this IOCCC entry
|
||
compile?</a></li>
|
||
<li><a href="#faq3_2">3.2 - Why does a IOCCC entry fail on my 64-bit
|
||
system?</a></li>
|
||
<li><a href="#faq3_3">3.3 - Why do some IOCCC entries fail to compile
|
||
under macOS?</a></li>
|
||
<li><a href="#faq3_4">3.4 - Why does clang or gcc fail to compile an
|
||
IOCCC entry?</a></li>
|
||
<li><a href="#faq3_5">3.5 - What is this cb tool that is mentioned in
|
||
the IOCCC?</a></li>
|
||
<li><a href="#faq3_6">3.6 - An IOCCC entry messed up my terminal
|
||
application, how do I fix this?</a></li>
|
||
<li><a href="#faq3_7">3.7 - How do I run an IOCCC entry that requires
|
||
X11?</a></li>
|
||
<li><a href="#faq3_8">3.8 - How do I compile an IOCCC entry that
|
||
requires SDL1 or SDL2?</a></li>
|
||
<li><a href="#faq3_9">3.9 - How do I compile an IOCCC entry that
|
||
requires (n)curses?</a></li>
|
||
<li><a href="#faq3_10">3.10 - How do I compile and use an IOCCC entry
|
||
that requires sound?</a></li>
|
||
<li><a href="#faq3_11">3.11 - Why do Makefiles use -Weverything with
|
||
clang?</a></li>
|
||
<li><a href="#faq3_12">3.12 - How do I find out how to send
|
||
interrupt/EOF etc. for entries that require it?</a></li>
|
||
<li><a href="#faq3_13">3.13 - Why does an IOCCC entry fail to compile or
|
||
or fail run?</a></li>
|
||
<li><a href="#faq3_14">3.14 - How do I compile and install tcpserver for
|
||
entries that require it?</a></li>
|
||
<li><a href="#faq3_15">3.15 - How do I compile and install netpbm for
|
||
entries that require it?</a></li>
|
||
<li><a href="#faq3_16">3.16 - How do I compile and install libjpeg-turbo
|
||
for entries that require it?</a></li>
|
||
<li><a href="#faq3_17">3.17 - How do I compile and install ImageMagick
|
||
for entries that require it?</a></li>
|
||
<li><a href="#faq3_18">3.18 - How do I compile and install OpenGL for
|
||
entries that require it?</a></li>
|
||
</ul>
|
||
<h2 id="section-4---changes-made-to-ioccc-entries">Section 4 - <a
|
||
href="#faq4">Changes made to IOCCC entries</a></h2>
|
||
<ul>
|
||
<li><a href="#faq4_0">4.0 - Why are some winning author remarks
|
||
incongruent with the winning IOCCC code?</a></li>
|
||
<li><a href="#faq4_1">4.1 - Why were some calls to the libc function
|
||
<code>gets(3)</code> changed to use <code>fgets(3)</code>?</a></li>
|
||
<li><a href="#faq4_2">4.2 - What was changed in an IOCCC entry source
|
||
code?</a></li>
|
||
<li><a href="#faq4_3">4.3 - Why do author remarks sometimes not match
|
||
the source and/or why are there other inconsistencies with the original
|
||
entry?</a></li>
|
||
<li><a href="#faq4_4">4.4 - What is the meaning of the file ending in
|
||
.orig.c in IOCCC entries?</a></li>
|
||
</ul>
|
||
<h2 id="section-5---helping-the-ioccc">Section 5 - <a
|
||
href="#faq5">Helping the IOCCC</a></h2>
|
||
<ul>
|
||
<li><a href="#faq5_0">5.0 - How may I help the IOCCC?</a></li>
|
||
<li><a href="#faq5_1">5.1 - How do I report a bug in an IOCCC
|
||
entry?</a></li>
|
||
<li><a href="#faq5_2">5.2 - How may I submit a fix to an IOCCC
|
||
entry?</a></li>
|
||
<li><a href="#faq5_3">5.3 - How may I report an IOCCC web site
|
||
problem?</a></li>
|
||
<li><a href="#faq5_4">5.4 - How may I submit a fix to the IOCCC web
|
||
site?</a></li>
|
||
<li><a href="#faq5_5">5.5 - How may I correct or update IOCCC author
|
||
information?</a></li>
|
||
<li><a href="#faq5_6">5.6 - What should I do if I find a broken or wrong
|
||
web link?</a></li>
|
||
</ul>
|
||
<h2 id="section-6---miscellaneous-ioccc">Section 6 - <a
|
||
href="#faq6">Miscellaneous IOCCC</a></h2>
|
||
<ul>
|
||
<li><a href="#faq6_0">6.0 - How did an entry that breaks the size rule 2
|
||
win the IOCCC?</a></li>
|
||
<li><a href="#faq6_1">6.1 - Is there a list of known bugs and
|
||
(mis)features of IOCCC entries?</a></li>
|
||
<li><a href="#faq6_2">6.2 - May I mirror the IOCCC web site?</a></li>
|
||
<li><a href="#faq6_3">6.3 - May I use parts of the IOCCC in an article,
|
||
book, newsletter, or instructional material?</a></li>
|
||
<li><a href="#faq6_4">6.4 - Why do you sometimes use the first person
|
||
plural?</a></li>
|
||
<li><a href="#faq6_5">6.5 - What is an author handle?</a></li>
|
||
<li><a href="#faq6_6">6.6 - What is a author_handle.json file and how
|
||
are they used?</a></li>
|
||
<li><a href="#faq6_7">6.7 - What is a entry_id?</a></li>
|
||
<li><a href="#faq6_8">6.8 - What is the purpose of the .top, .year and
|
||
.path files?</a></li>
|
||
<li><a href="#faq6_9">6.9 - What is the current meaning of the IOCCC
|
||
terms Author, Entry, and Submission?</a></li>
|
||
<li><a href="#faq6_10">6.10 - How does someone make a change to a file
|
||
and submit that change as a GitHub pull request?</a></li>
|
||
</ul>
|
||
<h1 id="the-ioccc-faq">The IOCCC FAQ</h1>
|
||
<h2
|
||
id="section-0-submitting-entries-to-a-new-ioccc"><a name="faq0"></a>Section
|
||
0: Submitting entries to a new IOCCC</h2>
|
||
<h3
|
||
id="faq-0.0-how-may-i-submit-to-the-ioccc"><a name="faq0_0"></a><a name="submit"></a>FAQ
|
||
0.0: How may I submit to the IOCCC?</h3>
|
||
<p>To submit your code to the IOCCC, you <strong>MUST</strong> follow
|
||
these steps:</p>
|
||
<ol start="0" type="1">
|
||
<li><p>Verify that the IOCCC is open for submissions</p>
|
||
<p>Check the <a href="/status.json">status.json</a> URL and check the <a
|
||
href="/news.html#news">IOCCC news</a> to see of the IOCCC is open.</p>
|
||
<p>You may only register for the IOCCC and you may only submit your
|
||
entries to the IOCCC when the IOCCC is <strong>OPEN</strong>.</p></li>
|
||
<li><p>Read the latest IOCCC rules and review the IOCCC guidelines</p>
|
||
<p>Please pay close attention to the <a href="/rules.html">official
|
||
IOCCC rules</a>.</p>
|
||
<p>You are also <strong>highly encouraged</strong> to review the <a
|
||
href="/guidelines.html">official IOCCC guidelines</a> as they contain
|
||
important suggestions, useful hints, and IOCCC humor. :-)</p></li>
|
||
<li><p>Register for the IOCCC</p>
|
||
<p>XXX - instructions TBD - XXX</p>
|
||
<p>Once you have been registered, you will receive an email message for
|
||
how to prepare your entries for submission, and how to upload the
|
||
compressed tarballs to our submission portal.</p></li>
|
||
<li><p>Obtain the latest mkiocccentry toolkit</p>
|
||
<p>If you do not have an mkiocccentry tool directory:</p>
|
||
<p>cd some_directory git clone git@github.com:ioccc-src/mkiocccentry.git
|
||
cd mkiocccentry</p>
|
||
<p>If you already have an mkiocccentry tool directory:</p>
|
||
<p>cd mkiocccentry git fetch git rebase</p></li>
|
||
<li><p>Make the mkiocccentry toolkit</p>
|
||
<p>make clobber all</p></li>
|
||
<li><p>Run the mkiocccentry tool to form your entry tarball</p>
|
||
<pre><code> ./mkiocccentry work_dir prog.c Makefile remarks.md [file ...]</code></pre>
|
||
<p>where:</p>
|
||
<p>work_dir directory where the entry directory and tarball are formed
|
||
prog.c path to the C source for your entry</p>
|
||
<p>Makefile Makefile to build (make all) and cleanup (make clean &
|
||
make clobber)</p>
|
||
<p>remarks.md Remarks about your entry in markdown format NOTE: See the
|
||
<a href="https://www.markdownguide.org/basic-syntax">markdown syntax</a>
|
||
guide.</p>
|
||
<p>[file …] extra data files to include with your entry</p>
|
||
<p>NOTE: It is <em>NOT</em> necessary to install the tools to use them
|
||
as you can run the tools from the top of the <em>mkiocccentry repo</em>
|
||
directory just fine.</p>
|
||
<p>If <code>mkiocccentry</code> tool indicates that there is a problem
|
||
with your entry, especially if it identifies a <a
|
||
href="/rules.html#2">rule 2</a> related problem, you are
|
||
<strong>strongly</strong> encouraged to revise and correct your entry
|
||
and then re-run the <code>mkiocccentry</code> tool.</p>
|
||
<p>If you choose to risk violating rules, be sure an explain your reason
|
||
for doing so in your <em>remarks.md</em> file.</p></li>
|
||
<li><p>Upload your entry to the IOCCC submit server</p>
|
||
<p>XXX - instructions TBD - XXX</p></li>
|
||
</ol>
|
||
<h3
|
||
id="faq-0.1-what-types-of-entries-have-been-over-submitted-to-the-ioccc"><a name="faq0_1"></a>FAQ
|
||
0.1: What types of entries have been over-submitted to the IOCCC?</h3>
|
||
<p>There are types of entries that show up over and over again. The
|
||
IOCCC judges, and we suspect the public that enjoy viewing the results
|
||
of the IOCCC, like variety.</p>
|
||
<p>While it is possible to win a new IOCCC with one of these
|
||
<strong>over-submitted</strong> types of entries, level of the
|
||
competition from previous IOCCC entries make it more challenging to be
|
||
successful.</p>
|
||
<p>It is also important to note that the <a
|
||
href="/guidelines.html">guidelines</a> often state something along the
|
||
lines of:</p>
|
||
<blockquote>
|
||
<p><em>We tend to dislike programs that: are similar to previous winning
|
||
entries</em></p>
|
||
</blockquote>
|
||
<h4 id="maze-generator">maze generator</h4>
|
||
<ul>
|
||
<li><p><a href="/years.html#1985_shapiro">1985/shapiro</a></p></li>
|
||
<li><p><a href="/years.html#1991_buzzard">1991/buzzard</a></p></li>
|
||
<li><p><a href="/years.html#1995_cdua">1995/cdua</a></p></li>
|
||
<li><p><a href="years.html#1995_dodsond2">1995/dodsond2</a></p></li>
|
||
<li><p><a href="/years.html#1998_bas1">1998/bas1</a></p></li>
|
||
</ul>
|
||
<h4
|
||
id="tic-tac-toenoughts-and-crossesxs-and-os-game">tic-tac-toe/noughts
|
||
and crosses/Xs and Os game</h4>
|
||
<ul>
|
||
<li><p><a href="/years.html#1991_westley">1991/westley</a></p></li>
|
||
<li><p><a href="/years.html#1996_jonth">1996/jonth</a></p></li>
|
||
<li><p><a href="/years.html#2020_carlini">2020/carlini</a></p></li>
|
||
</ul>
|
||
<h4 id="solitaireothello-game">solitaire/Othello game</h4>
|
||
<ul>
|
||
<li><p><a href="/years.html#1987_lievaart">1987/lievaart</a></p></li>
|
||
<li><p><a href="/years.html#1994_dodsond1">1994/dodsond1</a></p></li>
|
||
</ul>
|
||
<h4
|
||
id="generating-small-primes-below-is-the-list-of-all-prime-related-winning-entries">generating
|
||
small primes (below is the list of all prime related winning
|
||
entries)</h4>
|
||
<ul>
|
||
<li><p><a href="/years.html#1985_august">1985/august</a></p></li>
|
||
<li><p><a href="/years.html#1988_applin">1988/applin</a></p></li>
|
||
<li><p><a href="/years.html#1994_weisberg">1994/weisberg</a></p></li>
|
||
<li><p><a href="/years.html#1995_makarios">1995/makarios</a></p></li>
|
||
<li><p><a href="/years.html#1996_dalbec">1996/dalbec</a></p></li>
|
||
<li><p><a href="/years.html#2000_bellard">2000/bellard</a></p></li>
|
||
</ul>
|
||
<p><em>As you can see, just a list of primes (let alone small primes)
|
||
does not cut it anymore.</em></p>
|
||
<h4 id="self-reproducing-program">self reproducing program</h4>
|
||
<ul>
|
||
<li><p><a href="/years.html#1990_scjones">1990/scjones</a></p></li>
|
||
<li><p><a href="/years.html#1994_smr">1994/smr</a> - _do not claim your
|
||
program is the smallest one without seeing this!</p></li>
|
||
<li><p><a href="/years.html#2000_dhyang">2000/dhyang</a> - <em>unless
|
||
you beat this one, your chances are slim</em></p></li>
|
||
</ul>
|
||
<h4 id="entries-that-just-print-hello-world">entries that just print
|
||
“Hello, world!”</h4>
|
||
<ul>
|
||
<li><p><a href="/years.html#1984_anonymous">1984/anonymous</a></p></li>
|
||
<li><p><a href="/years.html#1985_applin">1985/applin</a></p></li>
|
||
<li><p><a href="/years.html#1986_applin">1986/applin</a></p></li>
|
||
<li><p><a href="/years.html#1986_holloway">1986/holloway</a></p></li>
|
||
<li><p><a href="/years.html#1989_jar.1">1989/jar.1</a></p></li>
|
||
<li><p><a href="/years.html#1992_lush">1992/lush</a></p></li>
|
||
<li><p><a href="/years.html#2000_tomx">2000/tomx</a></p></li>
|
||
</ul>
|
||
<p><em><strong>…it’s so 20th century…</strong></em></p>
|
||
<h4
|
||
id="entries-that-use-some-complex-state-machinetable-to-print-something">entries
|
||
that use some complex state machine/table to print something</h4>
|
||
<ul>
|
||
<li><p><a href="/years.html#1988_isaak">1988/isaak</a></p></li>
|
||
<li><p><a href="/years.html#1988_phillipps">1988/phillipps</a></p></li>
|
||
<li><p><a href="/years.html#2018_ciura">2018/ciura</a></p></li>
|
||
<li><p><a href="/years.html#2018_giles">2018/giles</a></p></li>
|
||
</ul>
|
||
<h4 id="rot13">rot13</h4>
|
||
<ul>
|
||
<li><p><a href="/years.html#1985_sicherman">1985/sicherman</a></p></li>
|
||
<li><p><a href="/years.html#1989_westley">1989/westley</a></p></li>
|
||
<li><p><a href="/years.html#1990_dg">1990/dg</a></p></li>
|
||
<li><p><a href="/years.html#1991_fine">1991/fine</a></p></li>
|
||
</ul>
|
||
<h4 id="pi-or-e-computation"><strong>pi</strong> or <strong>e</strong>
|
||
computation</h4>
|
||
<ul>
|
||
<li><p><a href="/years.html#1986_august">1986/august</a></p></li>
|
||
<li><p><a href="/years.html#1988_robison">1988/robison</a></p></li>
|
||
<li><p><a href="/years.html#1988_westley">1988/westley</a></p></li>
|
||
<li><p><a href="/years.html#1989_roemer">1989/roemer</a></p></li>
|
||
</ul>
|
||
<h4 id="hints-on-overused-themes">Hints on overused themes</h4>
|
||
<p>HINT: It is not fatal to send in those types of entries, it is just
|
||
MUCH HARDER to win. Such an entry would have to do something <em>really
|
||
unique <strong>AND</strong> interesting</em> to even make it into the
|
||
final judging rounds. Entries that reuse these ‘worn out’ themes
|
||
frequently lose to other entries that do something different.</p>
|
||
<p>HINT: If you really MUST send in an entry based on an ‘overused
|
||
theme’, be sure that it is obfuscated in several new and novel ways. Be
|
||
sure to <em>clearly</em> explain near the beginning of your remarks why
|
||
you are submitting a entry based on an ‘overused theme’ and why the
|
||
judges should not simply toss it out as being boring.</p>
|
||
<h3
|
||
id="faq-0.2-what-should-i-put-in-my-entrys-makefile"><a name="faq0_2"></a>FAQ
|
||
0.2: What should I put in my entry’s Makefile?</h3>
|
||
<p>We recommend starting with the <a
|
||
href="https://github.com/ioccc-src/mkiocccentry/blob/master/Makefile.example">sample
|
||
Makefile</a> as found in the <a
|
||
href="https://github.com/ioccc-src/mkiocccentry">mkiocccentry GitHub
|
||
repo</a>, (renamed as <code>Makefile</code> of course) as a starting
|
||
point for your entry’s <code>Makefile</code>.</p>
|
||
<p>The <code>Makefile</code> is a file used by the <code>make(1)</code>
|
||
command that contains rules and UNIX shell-style commands.</p>
|
||
<p>The first and default rule should be the “all” rule and should build
|
||
your entry’s executable file.</p>
|
||
<p>If your entry depends on a particular source file name during
|
||
compilation or execution, your <code>Makefile</code> should copy
|
||
<code>prog.c</code> into the desired filename. For example:</p>
|
||
<p>If you are not familiar <code>Makefile</code>s, you might consider
|
||
the following tutorials:</p>
|
||
<ul>
|
||
<li><a
|
||
href="https://www.gnu.org/software/make/manual/make.html#Introduction">GNU
|
||
make</a></li>
|
||
<li><a href="https://opensource.com/article/18/8/what-how-makefile">What
|
||
is a Makefile and how does it work?</a></li>
|
||
<li><a href="https://makefiletutorial.com">Learn Makefiles</a></li>
|
||
</ul>
|
||
<p>For the <code>make(1)</code> <em>connoisseur</em>: As of 2023, IOCCC
|
||
judges use <a href="https://www.gnu.org/software/make/">GNU make
|
||
compatible</a> <code>make(1)</code> command that is compatible with GNU
|
||
Make version 3.81.</p>
|
||
<h3
|
||
id="faq-0.3-may-i-use-a-different-source-or-compiled-filename-than-prog.c-or-prog"><a name="faq0_3"></a>FAQ
|
||
0.3: May I use a different source or compiled filename than prog.c or
|
||
prog?</h3>
|
||
<p>While your entry’s source filename, as submitted, must be
|
||
<code>prog.c</code>, your entry’s <code>Makefile</code> may copy
|
||
<code>prog.c</code> to a different filename as part of the
|
||
compiling/building process. For example:</p>
|
||
<pre class="make"><code>all: desired_name
|
||
|
||
desired_name: desired_name.c
|
||
cc desired_name.c -o $@
|
||
|
||
desired_name.c: prog.c
|
||
rm -f $@
|
||
cp -f prog.c $@
|
||
|
||
clobber:
|
||
rm -f desired_name.c desired_name</code></pre>
|
||
<p>We recommend that the <code>make clobber</code> rule remove files
|
||
that your entry creates as part of the compiling/building process.</p>
|
||
<p>You may also copy the compiled <code>prog</code> into a different
|
||
file as part of compiling process. For example:</p>
|
||
<pre class="make"><code>different_name: prog
|
||
rm -f $@
|
||
cp -f prog $@</code></pre>
|
||
<h3
|
||
id="faq-0.4-what-platform-should-i-assume-for-my-entry"><a name="faq0_4"></a>FAQ
|
||
0.4: What platform should I assume for my entry?</h3>
|
||
<p>Your entry must compile with GCC and run under at least one flavor of
|
||
UNIX (e.g. Linux or Solaris). To improve chances to win, it should work
|
||
under both BSD and SysV style UNIX (think <strong>stty cbreak</strong>),
|
||
and should not depend on “Endianness”. If it can compile and run on
|
||
Windows and/or Mac (see <a
|
||
href="/years.html#2000_thadgavin">2000/thadgavin</a> for one example,
|
||
amongst others), even better. Being able to compile with other compilers
|
||
like clang is also a good thing.</p>
|
||
<h2 id="section-1-history-of-the-ioccc"><a name="faq1"></a>Section 1:
|
||
History of the IOCCC</h2>
|
||
<h3 id="faq-1.0-how-did-the-ioccc-get-started"><a name="faq1_0"></a>FAQ
|
||
1.0: How did the IOCCC get started?</h3>
|
||
<p>One day (1984 March 23 to be exact), Larry Bassel and I (Landon Curt
|
||
Noll) were working for National Semiconductor’s Genix porting group, we
|
||
were both in our offices trying to fix some very broken code.</p>
|
||
<p>Larry had been trying to fix a bug in the classic Bourne shell (C
|
||
code <code>#define</code>d to death to sort of look like Algol) and I
|
||
had been working on the finger program from early BSD (a bug ridden
|
||
finger implementation to be sure).</p>
|
||
<p>We happened to both wander (at the same time) out to the hallway in
|
||
Building 7C to clear our heads.</p>
|
||
<p>We began to compare notes: ‘<em>You won’t believe the code I am
|
||
trying to fix</em>’.</p>
|
||
<p>And: ’<em>Well you cannot imagine the brain damage level of the code
|
||
I’m trying to fix’</em>.</p>
|
||
<p>As well as: ’<em>It’s more than bad code, the author really had to
|
||
try to make it this bad!</em></p>
|
||
<p>After a few minutes we wandered back into my office where I posted a
|
||
<a
|
||
href="http://groups.google.com/groups?q=Obfuscated&hl=en&lr=&ie=UTF-8&as_drrb=b&as_mind=1&as_minm=1&as_miny=1983&as_maxd=18&as_maxm=4&as_maxy=1984&selm=789%40nsc.UUCP&rnum=3&filter=0%22">flame
|
||
to net.lang.c</a> inviting people to try and out obfuscate the UN*X
|
||
source code we had just been working on.</p>
|
||
<p>BTW: I (Landon Curt Noll) had to post this <a
|
||
href="http://groups.google.com/groups?q=Obfuscated&hl=en&lr=&ie=UTF-8&as_drrb=b&as_mind=1&as_minm=1&as_miny=1983&as_maxd=18&as_maxm=4&as_maxy=1984&selm=795%40nsc.UUCP&rnum=10&filter=0">typo
|
||
correction</a>. Thus began the tradition of putting typos in the contest
|
||
rules and guidelines … to make them more obfuscated of course! :-)</p>
|
||
<p>BTW: This posting was made back in the days when AT&T was the
|
||
evil giant. Now, Microsoft makes AT&T look mild and kind in
|
||
comparison. :-( (IMHO) ).</p>
|
||
<p>BTW: See the story about the ‘<a href="/1993/mills/README.md">Bill
|
||
Gates</a>’ award. :-)</p>
|
||
<p>OK, back to the story.</p>
|
||
<p>We (Larry and I) received a number of entries by email. When we began
|
||
to receive messages from outside of the US, Larry and I decided to
|
||
include International in the name.</p>
|
||
<p>The <a
|
||
href="http://groups.google.com/groups?q=Obfuscated&hl=en&lr=&ie=UTF-8&as_drrb=b&as_mind=1&as_minm=1&as_miny=1983&as_maxd=18&as_maxm=4&as_maxy=1984&selm=837%40nsc.UUCP&rnum=2&filter=0">1st
|
||
IOCCC entries</a> were posted on 17 April 1984.</p>
|
||
<p>There were 4 entries that won in 1984:</p>
|
||
<ol type="1">
|
||
<li><a
|
||
href="http://groups.google.com/groups?q=Obfuscated&hl=en&lr=&ie=UTF-8&as_drrb=b&as_mind=1&as_minm=1&as_miny=1983&as_maxd=18&as_maxm=4&as_maxy=1984&selm=842%40nsc.UUCP&rnum=8&filter=0">(dis)honorable
|
||
mention</a></li>
|
||
<li><a
|
||
href="http://groups.google.com/groups?q=Obfuscated&hl=en&lr=&ie=UTF-8&as_drrb=b&as_mind=1&as_minm=1&as_miny=1983&as_maxd=18&as_maxm=4&as_maxy=1984&selm=843%40nsc.UUCP&rnum=7&filter=0">3rd
|
||
place</a></li>
|
||
<li><a
|
||
href="http://groups.google.com/groups?q=Obfuscated&hl=en&lr=&ie=UTF-8&as_drrb=b&as_mind=1&as_minm=1&as_miny=1983&as_maxd=18&as_maxm=4&as_maxy=1984&selm=844%40nsc.UUCP&rnum=6&filter=0">2nd
|
||
place</a></li>
|
||
<li><a
|
||
href="http://groups.google.com/groups?q=Obfuscated&hl=en&lr=&ie=UTF-8&as_drrb=b&as_mind=1&as_minm=1&as_miny=1983&as_maxd=18&as_maxm=4&as_maxy=1984&selm=845%40nsc.UUCP&rnum=5&filter=0">1st
|
||
place</a></li>
|
||
</ol>
|
||
<p>BTW: The (dis)honorable mention wished to remain anonymous. While
|
||
many have asked who it was, we have continued to follow the author’s
|
||
wish to remain anonymous.</p>
|
||
<p>A few years ago, we asked the author if they still wanted to remain
|
||
anonymous. They said: ‘<em>Yes, I want to keep my anonymity. But you can
|
||
tell them that I am well known for my connection to the C
|
||
language</em>’. It was not until 2001 that another <a
|
||
href="/years.html#2001_anonymous">anonymous entry</a> received an
|
||
award.</p>
|
||
<p>BTW: The <a href="/years.html#1984_mullender">1984 winner</a> remains
|
||
one of my (Landon Curt Noll) all time favorites.</p>
|
||
<p>The name used in the posting of the <a
|
||
href="http://groups.google.com/groups?q=Obfuscated&hl=en&lr=&ie=UTF-8&as_drrb=b&as_mind=1&as_minm=1&as_miny=1983&as_maxd=18&as_maxm=4&as_maxy=1984&selm=837%40nsc.UUCP&rnum=2&filter=0">1st
|
||
IOCCC winner</a> posting was <strong>I</strong>nternational
|
||
<strong>O</strong>bfuscated <strong>C</strong> <strong>C</strong>ode
|
||
<strong>C</strong>ontest or <strong>IOCCC</strong> for short.</p>
|
||
<p>The posting said ‘<em>1st annual</em>’, so in 1985 we held the <a
|
||
href="/years.html#1985">2nd IOCCC contest</a> and the tradition
|
||
continues as the longest running contest on the Internet.</p>
|
||
<p>P.S. Part of the inspiration for making the IOCCC a contest goes to
|
||
the <a href="http://www.bulwer-lytton.com/">Bulwer-Lytton fiction
|
||
contest</a>.</p>
|
||
<p>P^2.S. See the <a href="/all/README.md">overall README</a> for more
|
||
details.</p>
|
||
<h3
|
||
id="faq-1.1-why-are-some-years-missing-ioccc-entries"><a name="faq1_1"></a>FAQ
|
||
1.1: Why are some years missing IOCCC entries?</h3>
|
||
<p>Some years, such as 1997, 1999, 2002-2003, 2007-2010, 2016-2017,
|
||
2021-2023, no IOCCC was held.</p>
|
||
<p>While we try to hold the IOCCC every year, sometime the other demands
|
||
on the IOCCC judges so not permit us to hold a new IOCCC.</p>
|
||
<p>The pause during the 2021-2023 period was due to the IOCCC judges
|
||
developing tools to make is much more likely for the IOCCC to be held in
|
||
a yearly basis later on.</p>
|
||
<h3
|
||
id="faq-1.2-what-is-the-history-of-the-ioccc-web-site"><a name="faq1_2"></a>FAQ
|
||
1.2: What is the history of the IOCCC web site?</h3>
|
||
<h4 id="in-the-beginning-of-www.ioccc.org">In the beginning of
|
||
www.ioccc.org</h4>
|
||
<p>The long history of the <a href="https://www.ioccc.org">official
|
||
IOCCC web site</a> can be viewed at the <a
|
||
href="https://web.archive.org">Internet Wayback Machine Wayback
|
||
Machine</a>.</p>
|
||
<p>One can view several thousand snapshots showing how the <a
|
||
href="https://web.archive.org/web/20230000000000*/www.ioccc.org">IOCCC
|
||
web site has evolved</a> going back as far as <a
|
||
href="https://web.archive.org/web/19981212030016/https://www.ioccc.org/">1998
|
||
Dec 12 www.ioccc.org</a>.</p>
|
||
<p>On 2020 Dec 31, the IOCCC source tree was moved to the <a
|
||
href="https://web.archive.org/web/20210101211346/https://www.ioccc.org/">IOCCC
|
||
winner repo</a> on <a href="https://github.com">GitHub</a>. From this
|
||
point on, the <a href="https://www.ioccc.org">official IOCCC web
|
||
site</a> became a <a href="https://pages.github.com">GitHub Pages</a>
|
||
web site.</p>
|
||
<h4 id="dec-28-bzip2-compressed-tarball-archive">2020 Dec 28 bzip2
|
||
compressed tarball archive</h4>
|
||
<p>Furthermore, a bzip2 compressed tarball containing the released IOCCC
|
||
entry source code may be found under the <a
|
||
href="/archive/histroic">archive/historic</a> directory. The file <a
|
||
href="/archive/historic/archive-all.tar.bz2">archive-all.tar.bz2</a>
|
||
contains all years and the individual years are in the form
|
||
<em>archive/historic/archive-YYYY.tar.bz2</em>.</p>
|
||
<p>These files were obtained from the <a
|
||
href="https://web.archive.org">Internet Wayback Machine</a> from the <a
|
||
href="https://web.archive.org/web/20201228005211/https://www.ioccc.org/">snapshot
|
||
of the website on 2020 Dec 28</a>. See <a
|
||
href="/archive/historic/README.md">archive/historic/README.md</a> for
|
||
details about these bzip2 compressed tarballs.</p>
|
||
<p><strong>XXX</strong>: Change the references to
|
||
<em>temp-test-ioccc</em> to <em>winners</em> when these fixes are
|
||
merged.</p>
|
||
<h4 id="dec-29-repo-fork">2022 Dec 29 repo fork</h4>
|
||
<p>On 2022 Dec 29, the <a
|
||
href="https://github.com/ioccc-src/winner">IOCCC winner repo</a>, from
|
||
which the <a
|
||
href="https://web.archive.org/web/20221231001721/https://www.ioccc.org/">official
|
||
IOCCC web site of 2022 Dec 29</a> was generated, was forked into a
|
||
temporary repo where it underwent several thousand changes and important
|
||
improvements such as:</p>
|
||
<ul>
|
||
<li>Moving IOCCC entries into their own separate directories</li>
|
||
<li>Fixing lots and lots of typos</li>
|
||
<li>Fixing Makefiles and code to allow for nearly all winning entries to
|
||
be compiled and work on modern systems</li>
|
||
<li>Reworking the Makefiles to use a consistent set of rules</li>
|
||
<li>Reworking the Makefiles specific to the gcc and clang C
|
||
compilers</li>
|
||
<li>Replacing the various hint files with a README.md markdown that is
|
||
more consistent across IOCCC years</li>
|
||
<li>Setting up a system whereby authors of IOCCC entries may update
|
||
their own contact information via a GitHub pull request</li>
|
||
<li>Setting up to generate the top level years.html file via a tool</li>
|
||
<li>Setting up to generate the top level authors.html file via a
|
||
tool</li>
|
||
<li>etc.</li>
|
||
</ul>
|
||
<h4 id="yy-mm-dd-the-great-fork-merge">20yy mm dd the great fork
|
||
merge</h4>
|
||
<p>On 20yy mm dd, the temporary repo was merged back into the <a
|
||
href="https://github.com/ioccc-src/winner">IOCCC winner repo</a>
|
||
resulting in substantial improvements to the <a
|
||
href="https://www.ioccc.org">official IOCCC web site</a>.</p>
|
||
<p><strong>XXX</strong>: Fill in the date when the pull request happens
|
||
including the size of the pull request and/or number of changes that
|
||
went into the pull request. We call this the <strong>great fork
|
||
merge</strong>.</p>
|
||
<h3
|
||
id="faq-1.3-how-has-the-ioccc-size-limit-rule-changed-over-the-years"><a name="faq1_3"></a><a name="size_rule"></a>FAQ
|
||
1.3: How has the IOCCC size limit rule changed over the years?</h3>
|
||
<p>The IOCCC size rule has changed over the years.</p>
|
||
<p>In later years, Rule 2 was split into two parts. These two parts of
|
||
Rule 2 are:</p>
|
||
<ul>
|
||
<li>Rule 2a: Overall size limit of “prog.c”</li>
|
||
<li>Rule 2b: Size of “prog.c”, w/o counting certain types of
|
||
characters</li>
|
||
</ul>
|
||
<h4 id="ioccc-1984-1985">IOCCC 1984-1985</h4>
|
||
<p>NOTE: The size rule was actually rule 1.</p>
|
||
<ul>
|
||
<li>Rule 2a: 512</li>
|
||
<li>Rule 2b: n/a</li>
|
||
</ul>
|
||
<h4 id="ioccc-1986-1987">IOCCC 1986-1987</h4>
|
||
<p>NOTE: The size rule was actually rule 1.</p>
|
||
<ul>
|
||
<li>Rule 2a: 1024</li>
|
||
<li>Rule 2b: n/a</li>
|
||
</ul>
|
||
<h4 id="ioccc-1988-1991">IOCCC 1988-1991</h4>
|
||
<p>NOTE: The size rule was actually rule 1.</p>
|
||
<ul>
|
||
<li>Rule 2a: 1536</li>
|
||
<li>Rule 2b: n/a</li>
|
||
</ul>
|
||
<h3 id="ioccc-1992-2000">IOCCC 1992-2000</h3>
|
||
<ul>
|
||
<li>Rule 2a: 3217</li>
|
||
<li>Rule 2b: 1536</li>
|
||
</ul>
|
||
<h3 id="ioccc-2001-2012">IOCCC: 2001-2012</h3>
|
||
<ul>
|
||
<li>Rule 2a: 4096</li>
|
||
<li>Rule 2b: 2048</li>
|
||
</ul>
|
||
<h3 id="ioccc-2013-2020">IOCCC 2013-2020</h3>
|
||
<ul>
|
||
<li>Rule 2a: 4096</li>
|
||
<li>Rule 2b: 2053</li>
|
||
</ul>
|
||
<h3 id="ioccc-2024-date">IOCCC 2024-date</h3>
|
||
<ul>
|
||
<li>Rule 2a: 4993</li>
|
||
<li>Rule 2b: 2503</li>
|
||
</ul>
|
||
<h2 id="section-2-ioccc-judging-process"><a name="faq2"></a>Section 2:
|
||
IOCCC Judging process</h2>
|
||
<h3
|
||
id="faq-2.0-how-many-entries-do-the-judges-receive-for-a-given-ioccc"><a name="faq2_0"></a>FAQ
|
||
2.0: How many entries do the judges receive for a given IOCCC?</h3>
|
||
<p>By tradition, we do not say.</p>
|
||
<h3
|
||
id="faq-2.1-what-should-i-put-in-the-remarks.md-file-of-my-entry"><a name="faq2_1"></a>FAQ
|
||
2.1: What should I put in the remarks.md file of my entry?</h3>
|
||
<p>While you may put in as much or as little as you wish into your
|
||
entry’s <code>remarks.md</code> file, we do have few important
|
||
suggestions:</p>
|
||
<p>We recommend that you explain how to use your entry. Explain the
|
||
command line (if any command line options and arguments are used) and
|
||
any input or actions if applicable.</p>
|
||
<p>We highly recommend that you explain why you think your entry is well
|
||
obfuscated.</p>
|
||
<p>For those entries that win the IOCCC, we often use much of text from
|
||
the <code>remarks.md</code> file in the <em>Author’s remarks</em>
|
||
section of the <code>README.md</code> file. For this reason, a well
|
||
written <code>remarks.md</code> file is considered a plus.</p>
|
||
<p>While not required, consider adding bit of humor to your
|
||
<code>remarks.md</code> as most people who are not humor impaired, as
|
||
well as the IOCCC judges appreciate the opportunity for a fun read as
|
||
well as a chuckle or two.</p>
|
||
<h4 id="what-helps">What helps:</h4>
|
||
<ul>
|
||
<li><p>explaining what your entry does</p></li>
|
||
<li><p>how to entice it to do what it is supposed to do</p></li>
|
||
<li><p>what obfuscations are used</p></li>
|
||
<li><p>what are the limitations of your entry in respect of portability
|
||
and/or input data</p></li>
|
||
<li><p>how it works (if you are really condescending)</p></li>
|
||
</ul>
|
||
<h4 id="what-does-not-help">What does not help:</h4>
|
||
<ul>
|
||
<li><p>admitting that your entry is not very obfuscated (you see, the
|
||
contest is called the <strong>IOCCC</strong>, not the
|
||
<strong>INVOCCC</strong> :-) ); but even if you do not admit it, not
|
||
very obfuscated entries have a minuscule chance to win (although <a
|
||
href="/years.html#2000_tomx">2000/tomx</a> is a notable
|
||
counterexample).</p></li>
|
||
<li><p>mentioning your name or any identifying information in the remark
|
||
section (or in the C code for that matter) - we like to be unbiased
|
||
during the judging rounds; we look at the author name only if an entry
|
||
wins. See the guidelines if this is not clear!</p></li>
|
||
<li><p>leaving the remark section empty.</p></li>
|
||
</ul>
|
||
<h3
|
||
id="faq-2.2-why-dont-you-publish-entries-that-do-not-win"><a name="faq2_1"></a>FAQ
|
||
2.2: Why don’t you publish entries that do not win?</h3>
|
||
<p>Because the publication on the IOCCC site
|
||
<strong><em>IS</em></strong> the award! Anyone is free to put their
|
||
IOCCC hopefuls, lookalikes and/or entries that do not win on their web
|
||
page for everyone to see.</p>
|
||
<h3
|
||
id="faq-2.3-how-much-time-does-it-take-to-judge-the-contest"><a name="faq2_3"></a>FAQ
|
||
2.3: How much time does it take to judge the contest?</h3>
|
||
<p>It takes a fair amount of time to setup, run, answer email, process
|
||
entries, review entries, trim down the set entries to a set of winning
|
||
entries, doing the write-up of the entries, announcing the entries,
|
||
reviewing final edits of the winning entry set, posting the winning
|
||
entries, being flamed :-), tell folks who send in late entries to wait
|
||
until the next contest, etc… It takes a few weekends and a number nights
|
||
of study and work … which is hard given that we are busy with many other
|
||
activities as well.</p>
|
||
<p>Note that we do not contact the author if an entry does not compile
|
||
or does not work as advertised, we might attempt to fix obvious
|
||
compilation problems or incompatibilities, but no more than that - so be
|
||
sure that your entry does work on at least a couple different platforms,
|
||
at least one of them being UNIX or POSIX-conforming.</p>
|
||
<h3
|
||
id="faq-2.4-how-many-judging-rounds-do-you-have"><a name="faq2_4"></a>FAQ
|
||
2.4: How many judging rounds do you have?</h3>
|
||
<p>Are you trying to trick us? :-)</p>
|
||
<p>By tradition, we do not say how many judging rounds we have in a
|
||
given IOCCC.</p>
|
||
<p>We often report when the IOCCC judges start the 1st round, and when
|
||
usually report when the IOCCC judges start near final judging rounds,
|
||
and sometimes we also report when we enter what we believe is the final
|
||
judging round, so you may guess that we have at least 3 rounds. :-) The
|
||
actual number of rounds is certainly more than 3.</p>
|
||
<h3
|
||
id="faq-2.5-why-do-some-ioccc-entries-receive-the-grand-prize-or-best-of-show-award"><a name="faq2_5"></a>FAQ
|
||
2.5: Why do some IOCCC entries receive the Grand Prize or Best of Show
|
||
award?</h3>
|
||
<p>In some years, the IOCCC judges discover a truly amazing IOCCC entry
|
||
that stands out among all of the other IOCCC entries received that year.
|
||
For such an IOCCC entry, the IOCCC judges award a “Grand Prize” or “Best
|
||
of Show award.</p>
|
||
<p>In 1984-1987, the grand prize winners are:</p>
|
||
<ul>
|
||
<li><p><a href="/years.html#1984_mullender">1984/mullender</a></p></li>
|
||
<li><p><a href="/years.html#1985_shapiro">1985/shapiro</a></p></li>
|
||
<li><p><a href="/years.html#1986_wall">1986/wall</a></p></li>
|
||
<li><p><a href="/years.html#1987_lievaart">1987/lievaart</a></p></li>
|
||
</ul>
|
||
<p>Starting from 1988, the entry we liked the most in that year is
|
||
called “Best of Show”. Here are the “Best of Show” entries:</p>
|
||
<ul>
|
||
<li><p><a href="/years.html#1988_applin">1988/applin</a></p></li>
|
||
<li><p><a href="/years.html#1989_jar.2">1989/jar.2</a></p></li>
|
||
<li><p><a href="/years.html#1990_theorem">1990/theorem</a></p></li>
|
||
<li><p><a href="/years.html#1991_brnstnd">1991/brnstnd</a></p></li>
|
||
<li><p><a href="/years.html#1992_vern">1992/vern</a></p></li>
|
||
<li><p><a href="/years.html#1996_august">1996/august</a></p></li>
|
||
<li><p><a href="/years.html#1998_banks">1998/banks</a></p></li>
|
||
<li><p><a href="/years.html#2000_jarijyrki">2000/jarijyrki</a></p></li>
|
||
<li><p><a href="/years.html#2020_carlini">2020/carlini</a></p></li>
|
||
</ul>
|
||
<p>In 1993, 1994 and 1995 the judges were unable to select a clear
|
||
overall winner. So to give a nod to the entry that had the highest
|
||
approval ranking from the judges, they used the following awards:</p>
|
||
<ul>
|
||
<li><p><a href="/years.html#1993_rince">1993/rince</a> - Most Well
|
||
Rounded</p></li>
|
||
<li><p><a href="/years.html#1994_shapiro">1994/shapiro</a> - Most Well
|
||
Rounded</p></li>
|
||
<li><p><a href="/years.html#1995_leo">1995/leo</a> - Best Use of
|
||
Obfuscation</p></li>
|
||
</ul>
|
||
<p>These could be considered the ‘best entry’ for those years with 1 or
|
||
more other entries that came in close behind.</p>
|
||
<h3
|
||
id="faq-2.6-how-are-ioccc-entries-announced"><a name="faq2_6"></a>FAQ
|
||
2.6: How are IOCCC entries announced?</h3>
|
||
<p>Once the <a href="https://www.ioccc.org/index.html#enter">IOCCC</a>
|
||
closes, the judges will select the <a
|
||
href="https://www.ioccc.org/years.html">winning entries</a> announce
|
||
them on the <a href="https://fosstodon.org/@ioccc"><span
|
||
class="citation" data-cites="IOCCC">@IOCCC</span> mastodon feed</a>,
|
||
notify the authors of entries that won the IOCCC via email using their
|
||
previously registered email address, and upload the winning code to the
|
||
<a href="https://github.com/ioccc-src/winner">winner repo</a> which in
|
||
turn will cause them to be displayed on the <a
|
||
href="https://www.ioccc.org/years.html">IOCCC winning entries
|
||
page</a>.</p>
|
||
<h2
|
||
id="section-3-compiling-and-running-ioccc-entries"><a name="faq3"></a>Section
|
||
3: Compiling and running IOCCC entries</h2>
|
||
<h3
|
||
id="faq-3.0-what-makefile-rules-are-available-to-build-or-clean-up-ioccc-entries"><a name="faq3_0"></a>FAQ
|
||
3.0: What Makefile rules are available to build or clean up IOCCC
|
||
entries?</h3>
|
||
<p>In general the best way to compile everything in an entry directory
|
||
is to run:</p>
|
||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber all</span></code></pre></div>
|
||
<p>If you wish to compile every entry for every year you should go to
|
||
the top level directory and run the same command as above,
|
||
<code>make clobber all</code>.</p>
|
||
<p>The <code>all</code> rule will build everything necessary except for
|
||
the alternate versions. Every Makefile has an <code>alt</code> rule but
|
||
it will only do something if an alternate version exists. To build all
|
||
the entries along with any alternate code you can do from the top level
|
||
directory:</p>
|
||
<pre><code>make clobber everything</code></pre>
|
||
<p>If you wish to only build alternate code you can do:</p>
|
||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber alt</span></code></pre></div>
|
||
<p>If you wish to not remove the entry binaries and only compile the
|
||
additional alt versions:</p>
|
||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||
<p>The following Makefile rules should be in all Makefiles:</p>
|
||
<ul>
|
||
<li>all: build the entry programs (main program and any supplementary
|
||
program)</li>
|
||
<li>alt: build alternate code</li>
|
||
<li>clobber: clean up object files and all binary files (except for
|
||
those that are not compiled)</li>
|
||
<li>clean: a simpler version of <code>clobber</code> that only removes
|
||
object files. <code>make clobber</code> depends on <code>clean</code> so
|
||
running <code>make clobber</code> will invoke
|
||
<code>make clean</code>.</li>
|
||
<li>everything: equivalent to <code>make all alt</code>.</li>
|
||
</ul>
|
||
<p>Are there any other rules? You tell us!</p>
|
||
<p>NOTE about the above rules: the Makefile default assumes
|
||
<code>cc</code> which might be a gcc-based compiler, or a clang-based
|
||
compiler, or some other compiler. Only by forcing <code>CC=clang</code>
|
||
or <code>CC=gcc</code> will one invoke a specific compiler to, say,
|
||
enable or disable additional warnings or flags. Even so different
|
||
versions or compilers might do different things, have different defects
|
||
or other issues.</p>
|
||
<h3
|
||
id="faq-3.1-why-doesnt-this-ioccc-entry-compile"><a name="faq3_1"></a>FAQ
|
||
3.1: Why doesn’t this IOCCC entry compile?</h3>
|
||
<p>Some entries that won the IOCCC, particularly entries from long ago,
|
||
no longer compile on more modern systems because the C language has
|
||
evolved (i.e. the modern C compilers are much more strict in what they
|
||
accept as a valid program), or the entry depended on operation system
|
||
and library features that where common back then but are
|
||
different/missing today.</p>
|
||
<p>Please see the other FAQs in this section as they might offer helpful
|
||
hints, especially in cases were something else needs to be
|
||
installed.</p>
|
||
<p>Please see the <a href="/bugs.md">bugs.md</a> file for details about
|
||
known problems with IOCCC entries. In some cases you may be dealing with
|
||
a problematic entry. In a few fun cases, the IOCCC does not compile by
|
||
design!</p>
|
||
<p>If you have a fix that makes a minimal impact to the entry, then
|
||
please consider submitting that change in the form of a pull request.
|
||
Please see FAQ 5.2 <a href="#fix_an_entry">“How may I submit a fix to an
|
||
IOCCC entry”</a> for details.</p>
|
||
<p>In some cases alternative code has been added that does compile on
|
||
some or most systems. Check the write up for the entry for “alt” code
|
||
and possible ways to compile and run that code. In some cases we
|
||
replaced the original code (but not the <code>.orig.c</code> file!) with
|
||
code that works for modern systems but one can view the original code in
|
||
the <code>.orig.c</code> files (sometimes the original code is also in
|
||
the directory as a <code>winner.alt.c</code> or
|
||
<code>prog.alt.c</code>).</p>
|
||
<h3
|
||
id="faq-3.2-why-does-a-ioccc-entry-fail-on-my-64-bit-system"><a name="faq3_2"></a>FAQ
|
||
3.2: Why does a IOCCC entry fail on my 64-bit system?</h3>
|
||
<p>Unfortunately some older entries are non-portable and require 32-bit
|
||
support or 32-bit binaries. A problem system here is macOS Catalina
|
||
(10.15) as as of that version macOS no longer supports 32-bit binaries.
|
||
If the entry acts on a certain type of binary, say ELF, then that will
|
||
also be a problem depending on the entry. For example <a
|
||
href="/2001/anonymous/README.md">2001/anonymous</a> requires 32-bit ELF
|
||
binaries.</p>
|
||
<p>There are numerous example entries that require 32-bit binaries. We
|
||
have tried to note these in both the respective Makefiles and README.md
|
||
files but it is possible that some were missed. These entries are very
|
||
likely in the <a href="/bugs.md">bugs.md</a> file and we welcome any
|
||
help in making an alternate version for 64-bit systems. Many were fixed
|
||
to work with modern systems but some are supposed to only work with
|
||
32-bit systems so any updated version of these entries should be an
|
||
alternate version.</p>
|
||
<p>Other entries like <a
|
||
href="/thanks-for-help.md#2001_herrmann2">2001/herrmann2</a> now work
|
||
with 32-bit AND 64-bit systems.</p>
|
||
<p>Please see the <a href="/bugs.md">bugs.md</a> file for the
|
||
problematic entry in question to see if the problem is known, and if a
|
||
fix is wanted, consider trying to port the code to a 64-bit system and
|
||
submitting a pull request with that change. Pull requests that fix such
|
||
code while trying to minimize the impact of any changes and preserving
|
||
the spirit of the original code are very welcome! Please see FAQ 5.2
|
||
<a href="#fix_an_entry">“How may I submit a fix to an IOCCC entry”</a>
|
||
for details.</p>
|
||
<h3
|
||
id="faq-3.3-why-do-some-ioccc-entries-fail-to-compile-under-macos"><a name="faq3_3"></a>FAQ
|
||
3.3: Why do some IOCCC entries fail to compile under macOS?</h3>
|
||
<p>If the entry requires gcc and you did not explicitly install gcc in
|
||
macOS you will not be able to run or use these entries. This is because
|
||
macOS gcc is actually clang, even <code>/usr/bin/gcc</code>.</p>
|
||
<p>That being said many (if not most) of these entries have been fixed
|
||
and some others will be looked at, when found.</p>
|
||
<p>In some cases the <a href="/bugs.md">bugs.md</a> file may note a
|
||
known macOS problem with an entry. Should you manage to port the entry,
|
||
and assuming your changes also attempt to preserve the original intent
|
||
of the IOCCC entry, we would encourage you to submit a pull request with
|
||
your ported code. Please see FAQ 5.2 <a href="#fix_an_entry">“How may I
|
||
submit a fix to an IOCCC entry”</a> for details.</p>
|
||
<h3
|
||
id="faq-3.4-why-does-clang-or-gcc-fail-to-compile-an-ioccc-entry"><a name="faq3_4"></a>FAQ
|
||
3.4: Why does clang or gcc fail to compile an IOCCC entry?</h3>
|
||
<p>Although we have fixed numerous entries to work with clang (sometimes
|
||
in an alt version but usually in the program itself) there are some that
|
||
simply cannot be fixed or if they are fixable they have not yet been
|
||
fixed (we are working on this but other things have to be done too and
|
||
all on free time).</p>
|
||
<p>This is because clang has some defects where the args of main() are
|
||
required to be a specific type and some versions of clang allow only 1,
|
||
2 or 3 args, not 4, to main(). In the case of types of args many were
|
||
changed to the right type and then what was main() became another
|
||
function of the original main() type.</p>
|
||
<p>At the same time some entries are not designed to work with clang.
|
||
There might be alternate code added at some point but as above this
|
||
depends on free time and other things that have to be done plus
|
||
remembering to do it.</p>
|
||
<p>See if the problem is mentioned in <a href="/bugs.md">bugs.md</a>. If
|
||
you have a change that fixes the problem (even if it just a change to
|
||
the <code>Makefile</code>) that doesn’t negatively impact the entry too
|
||
much, consider submitting that change in the form of a pull request.
|
||
Please see FAQ 5.2 <a href="#fix_an_entry">“How may I submit a fix to an
|
||
IOCCC entry”</a> for details.</p>
|
||
<h3
|
||
id="faq-3.5-what-is-this-cb-tool-that-is-mentioned-in-the-ioccc"><a name="faq3_5"></a>FAQ
|
||
3.5: What is this cb tool that is mentioned in the IOCCC?</h3>
|
||
<p>This was a C beautifier for Unix, both AT&T and Berkeley, but it
|
||
seems to no longer be available, code wise, except for Plan 9, but Plan
|
||
9 was never used for judging the IOCCC. A Unix man page for
|
||
<code>cb</code> <a
|
||
href="https://www.ibm.com/docs/en/aix/7.3?topic=c-cb-command">still
|
||
exists</a>.</p>
|
||
<h3
|
||
id="faq-3.6-an-ioccc-entry-messed-up-my-terminal-application-how-do-i-fix-this"><a name="faq3_6"></a>FAQ
|
||
3.6: An IOCCC entry messed up my terminal application, how do I fix
|
||
this?</h3>
|
||
<p>The simplest way to do this is to type <code>reset</code>. If echo
|
||
was disabled you can get usually away with <code>stty echo</code>.
|
||
Sometimes you can also get away with <code>stty sane</code>.
|
||
<code>reset</code> does the most but note that it will clear the screen
|
||
(obviously <code>clear</code> will too but it won’t reset the
|
||
terminal).</p>
|
||
<h3
|
||
id="faq-3.7-how-do-i-run-an-ioccc-entry-that-requires-x11"><a name="faq3_7"></a><a name="X11macos"></a><a name="X11"></a>FAQ
|
||
3.7: How do I run an IOCCC entry that requires X11?</h3>
|
||
<h4
|
||
id="generally-to-compile-and-run-an-ioccc-entry-that-requires-x11"><a name="X11_general"></a>Generally,
|
||
to compile and run an IOCCC entry that requires X11:</h4>
|
||
<p>You must have the X11 related include files and X11 libraries in
|
||
order to compile the IOCCC entry. In order to do this you will need to
|
||
install Xorg and related packages including development related
|
||
packages. If you have macOS see further down for different instructions.
|
||
Otherwise: in particular you must:</p>
|
||
<ul>
|
||
<li>Install the Xorg server.</li>
|
||
<li>Configure the Xorg server for your graphics environment.</li>
|
||
<li>Install a X11 terminal application.</li>
|
||
<li>Start the Xorg server.</li>
|
||
<li>Launch the X11 terminal application.</li>
|
||
<li>Run the IOCCC entry in the X11 terminal application.</li>
|
||
</ul>
|
||
<p>By X11 terminal application we suggest one of:</p>
|
||
<ul>
|
||
<li><a href="https://www.gnome.org">Gnome</a> terminal application</li>
|
||
<li><a href="https://kde.org">KDE</a> terminal application</li>
|
||
<li><code>xterm(</code>) terminal application</li>
|
||
</ul>
|
||
<p>See below for various system related hints that may be of help.</p>
|
||
<h4
|
||
id="x.org-server-has-been-deprecated"><a name="Xorg_deprecated"></a>X.org
|
||
server has been deprecated</h4>
|
||
<p>The Red Hat RHEL9.0 release notes state that <a
|
||
href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/9.0_release_notes/deprecated_functionality#deprecated-functionality_graphics-infrastructures">X.org
|
||
Server is now deprecated</a>.</p>
|
||
<p>According to this <a
|
||
href="https://www.linuxfordevices.com/tutorials/linux/install-xorg-on-linux">Linux
|
||
for Devices tutorial on XOrg</a> as of 2023 Mar 25:</p>
|
||
<blockquote>
|
||
<p>Recently, RHEL developers categorized <a
|
||
href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/9.0_release_notes/deprecated_functionality">Xorg
|
||
was put in the ‘deprecated’ software</a>, as its development has mostly
|
||
halted. Subsequent updates will completely replace it with Wayland, a
|
||
more modern windowing system.. Although Wayland is not fully developed
|
||
yet, many applications do not support it properly yet and screen sharing
|
||
might not work sometime, but it is the future. Fedora, also developed by
|
||
RHEL, has switched to a Wayland session as it’s default windowing system
|
||
(And it works flawlessly on my Laptop).</p>
|
||
</blockquote>
|
||
<p>See the <a href="https://wayland.freedesktop.org">Wayland</a> web
|
||
site for more details.</p>
|
||
<p><strong>IMPORTANT NOTE</strong>: We do <strong>NOT</strong> know if
|
||
IOCCC entries will run under <strong>Wayland</strong>. Some IOCCC
|
||
entries that use X11 might be OK while other IOCCC entries that use X11
|
||
in an unusual way might fail under <strong>Wayland</strong>.</p>
|
||
<p>See the <a href="https://wayland.freedesktop.org/faq.html">Wayland
|
||
FAQ</a> for more information.</p>
|
||
<p>If your system uses <strong>Wayland</strong> and not X11, you might
|
||
give the IOCCC entries that use X11 a try. They might work but again we
|
||
do not know.</p>
|
||
<p><strong>IMPORTANT NOTE</strong>: The <a href="/judges.html">IOCCC
|
||
judges</a> <a href="#no_support">do not support IOCCC entries</a>. So if
|
||
an IOCCC entry that uses X11 fails under <strong>Wayland</strong>, and
|
||
you wish to provide a fix to the IOCCC entry so that it will run under
|
||
<strong>Wayland</strong>, then consider <a
|
||
href="#fix_an_entry">submitting a fix</a> so that it will run under
|
||
<strong>Wayland</strong>.</p>
|
||
<p>Basically: if you discover an entry does not work in Wayland you are
|
||
welcome to provide <strong>alternate code</strong> that works for
|
||
Wayland. We will happily credit you in the <a
|
||
href="/thanks-for-help.md">thanks-for-help.md</a> file.</p>
|
||
<h4 id="red-hat-based-linux">Red Hat based Linux</h4>
|
||
<p>First, see the above note on <a href="#X11_general">installing and
|
||
starting Xorg</a>.</p>
|
||
<p>Install Xorg and related packages:</p>
|
||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> dnf install <span class="at">--skip-broken</span> <span class="at">--best</span> <span class="at">--exclude</span> xorgxrdp <span class="at">--exclude</span> xorgxrdp-glamor <span class="st">'*xorg*'</span> <span class="st">'libx*'</span> <span class="st">'libX*'</span> <span class="st">'fontconfig*'</span></span></code></pre></div>
|
||
<p>See also:</p>
|
||
<ul>
|
||
<li><a href="https://www.wikihow.com/Configure-X11-in-Linux">How to
|
||
Configure X11 in Linux</a></li>
|
||
</ul>
|
||
<p><strong>IMPORTANT NOTE</strong>: The <a href="#Xorg_deprecated">X.org
|
||
server has been deprecated</a>. See the above note for details.</p>
|
||
<h4 id="macos">macOS</h4>
|
||
<p>First, see the above note on <a href="#X11_general">installing and
|
||
starting Xorg</a>. However, for macOS, instead of installing the Xorg
|
||
server, you need to install and launch the <a
|
||
href="https://www.xquartz.org">most recent XQuartz</a> application and
|
||
then run the IOCCC entry from the <a
|
||
href="https://en.wikipedia.org/wiki/Xterm">Xterm window shell</a>.</p>
|
||
<p>As an example we will use <a
|
||
href="/1993/jonth/README.md">1993/jonth</a> which works with macOS
|
||
14.2.1 (macOS Sonoma).</p>
|
||
<p>First of all you will need to install the <a
|
||
href="https://www.xquartz.org">most recent XQuartz</a>, preferably on an
|
||
<a href="https://support.apple.com/macos">Apple supported version of
|
||
macOS, preferably the most recent version</a>. After it is installed,
|
||
open the “XQuartz” application (usually located in
|
||
<code>/Applications/Utilities/XQuartz.app</code>) by typing at the
|
||
command line:</p>
|
||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">open</span> /Applications/Utilities/XQuartz.app</span></code></pre></div>
|
||
<p>With the “XQuartz” application open you will get an <a
|
||
href="https://www.x.org/wiki/">X Window System Manager</a> launched with
|
||
an <a href="https://en.wikipedia.org/wiki/Xterm">Xterm window shell</a>
|
||
started:</p>
|
||
<p><img alt="xterm-launch in macOS" src="png/xquartz-shell.png"></p>
|
||
<p>At this point you need to cd to the winning directory and compile it.
|
||
For example:</p>
|
||
<p><img alt="compiling an entry in xterm in macOS" src="png/xquartz-entry-compile.png"></p>
|
||
<p>And then run the program as directed by the <code>README.md</code>
|
||
file. For example with <code>1993/jonth</code>:</p>
|
||
<p><img alt="running 1993/jonth in macOS" src="png/xquartz-1993-jonth.png"></p>
|
||
<p>Note that you can compile the code in your regular terminal prior to
|
||
opening XQuartz, should you wish to. You can even run it from that
|
||
terminal and it should open XQuartz.</p>
|
||
<p><strong>IMPORTANT NOTE</strong>: The <a href="#Xorg_deprecated">X.org
|
||
server has been deprecated</a>. See the above note for details.</p>
|
||
<h4 id="debian-based-linux">Debian based Linux</h4>
|
||
<p>First, see the above note on <a href="#X11_general">installing and
|
||
starting Xorg</a>.</p>
|
||
<p>According to the <a href="https://wiki.debian.org/Xorg">Debian Xorg
|
||
wiki</a>, installing X11 requires:</p>
|
||
<div class="sourceCode" id="cb10"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> apt install xorg</span></code></pre></div>
|
||
<p><strong>IMPORTANT NOTE</strong>: The <a href="#Xorg_deprecated">X.org
|
||
server has been deprecated</a>. See the above note for details.</p>
|
||
<h4 id="other-linux-distributions">Other Linux distributions</h4>
|
||
<p>First, see the above note on <a href="#X11_general">installing and
|
||
starting Xorg</a>.</p>
|
||
<p>For general documentation on installing X11, this <a
|
||
href="https://help.ubuntu.com/community/ServerGUI">ServerGUI for
|
||
Ubuntu</a>, and in particular, these may be helpful:</p>
|
||
<ul>
|
||
<li><a
|
||
href="https://help.ubuntu.com/community/ServerGUI#X11_Client_Installation">X11
|
||
Client Installation</a></li>
|
||
<li><a
|
||
href="https://help.ubuntu.com/community/ServerGUI#X11_Server_Installation">X11
|
||
Server Installation</a></li>
|
||
<li><a
|
||
href="https://help.ubuntu.com/community/ServerGUI#Full_Desktop_Environments">Full
|
||
Desktop Environments</a></li>
|
||
</ul>
|
||
<p>See also:</p>
|
||
<ul>
|
||
<li><a href="https://www.wikihow.com/Configure-X11-in-Linux">How to
|
||
Configure X11 in Linux</a></li>
|
||
</ul>
|
||
<p>For systems that have the <code>dnf(1)</code> command:</p>
|
||
<div class="sourceCode" id="cb11"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> dnf install <span class="at">--skip-broken</span> <span class="at">--best</span> <span class="at">--exclude</span> xorgxrdp <span class="at">--exclude</span> xorgxrdp-glamor <span class="st">'*xorg*'</span> <span class="st">'libx*'</span> <span class="st">'libX*'</span> <span class="st">'fontconfig*'</span></span></code></pre></div>
|
||
<p>For systems that have the <code>yum(1)</code> command:</p>
|
||
<div class="sourceCode" id="cb12"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> yum install <span class="at">--skip-broken</span> <span class="at">--best</span> <span class="at">--exclude</span> xorgxrdp <span class="at">--exclude</span> xorgxrdp-glamor <span class="st">'*xorg*'</span> <span class="st">'libx*'</span> <span class="st">'libX*'</span> <span class="st">'fontconfig*'</span></span></code></pre></div>
|
||
<p><strong>IMPORTANT NOTE</strong>: The <a href="#Xorg_deprecated">X.org
|
||
server has been deprecated</a>. See the above note for details.</p>
|
||
<h4 id="package-website">package website</h4>
|
||
<p>First, see the above note on <a href="#X11_general">installing and
|
||
starting Xorg</a>.</p>
|
||
<p>See the <a href="https://x.org/wiki/">X.org</a> foundation web
|
||
site.</p>
|
||
<p><strong>IMPORTANT NOTE</strong>: The <a href="#Xorg_deprecated">X.org
|
||
server has been deprecated</a>. See the above note for details.</p>
|
||
<h3
|
||
id="faq-3.8-how-do-i-compile-an-ioccc-entry-that-requires-sdl1-or-sdl2"><a name="faq3_8"></a><a name="SDL"></a>FAQ
|
||
3.8: How do I compile an IOCCC entry that requires SDL1 or SDL2?</h3>
|
||
<p>This depends on your operating system but below are instructions for
|
||
Linux and macOS with alternative methods for macOS and different package
|
||
managers with Linux.</p>
|
||
<h4 id="red-hat-based-linux-1">Red Hat based Linux</h4>
|
||
<p>Execute the following as root or via sudo:</p>
|
||
<div class="sourceCode" id="cb13"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ex">dnf</span> install SDL2 SDL2-devel sdl12-compat sdl12-compat-devel</span></code></pre></div>
|
||
<p>Older RHEL distributions might have to use “yum” instead of “dnf” in
|
||
the above command.</p>
|
||
<p>In the past it was said that one might need to run <code>make</code>
|
||
like:</p>
|
||
<div class="sourceCode" id="cb14"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> ... SDL2_INCLUDE_ROOT=/usr</span></code></pre></div>
|
||
<p>or set the following environment variable:</p>
|
||
<div class="sourceCode" id="cb15"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="bu">export</span> <span class="va">SDL2_INCLUDE_ROOT</span><span class="op">=</span>/usr</span></code></pre></div>
|
||
<p>but this might not be necessary in more modern days especially as we
|
||
use <code>sdl-config</code> and <code>sdl2-config</code> which should
|
||
find the proper paths.</p>
|
||
<h4 id="macos-1">macOS</h4>
|
||
<p>If you’re using macOS there are at least three ways to obtain it. You
|
||
can use Homebrew or MacPorts. If you do not wish to use either of those
|
||
package managers, you can always try to install via the package website.
|
||
For macOS we do recommend using Homebrew or MacPorts instead of using
|
||
the package website.</p>
|
||
<h5 id="macos-via-homebrew">macOS via Homebrew</h5>
|
||
<p>If you have not already done so, install <a
|
||
href="https://brew.sh">Homebrew</a>.</p>
|
||
<p>Then to install SDL and SDL2, execute the following command:</p>
|
||
<div class="sourceCode" id="cb16"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="ex">brew</span> install sdl2 sdl12-compat</span>
|
||
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a><span class="bu">eval</span> <span class="st">"</span><span class="va">$(</span><span class="ex">/opt/homebrew/bin/brew</span> shellenv<span class="va">)</span><span class="st">"</span></span></code></pre></div>
|
||
<h5 id="macos-via-macports">macos via MacPorts</h5>
|
||
<p>If you haven’t already, install <a
|
||
href="https://www.macports.org/install.php">MacPorts</a>. Then run:</p>
|
||
<div class="sourceCode" id="cb17"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> port install libsdl libsdl2</span></code></pre></div>
|
||
<h4 id="debian-based-linux-1">Debian based Linux</h4>
|
||
<p>Execute the following as root or via sudo:</p>
|
||
<div class="sourceCode" id="cb18"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ex">apt</span> install libsdl1.2debian libsdl1.2-dev libsdl2-dev</span></code></pre></div>
|
||
<p>and then try <code>make all</code> again.</p>
|
||
<p>In the past it was said that one might need to run <code>make</code>
|
||
like:</p>
|
||
<div class="sourceCode" id="cb19"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> ... SDL2_INCLUDE_ROOT=/usr</span></code></pre></div>
|
||
<p>or set the following environment variable:</p>
|
||
<div class="sourceCode" id="cb20"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="bu">export</span> <span class="va">SDL2_INCLUDE_ROOT</span><span class="op">=</span>/usr</span></code></pre></div>
|
||
<p>but this might not be necessary in more modern days especially as we
|
||
use <code>sdl-config</code> and <code>sdl2-config</code> which should
|
||
find the proper paths.</p>
|
||
<h4 id="other-linux-distributions-1">Other Linux distributions</h4>
|
||
<p>Use your package manager to install the appropriate packages. Try the
|
||
search feature of the package manager to determine which packages you
|
||
need to install. Note that you might have to install both the library
|
||
and the developmental packages: one for compiling and one for linking /
|
||
running.</p>
|
||
<h4 id="package-website-1">package website</h4>
|
||
<p>Go to the <a href="https://www.libsdl.org">SDL website</a> and follow
|
||
their instructions for downloading, installing and using SDL.</p>
|
||
<p>We recommend trying a method suitable for your environment first, if
|
||
possible.</p>
|
||
<h4 id="note-there-might-be-extra-sdl-packages-required">NOTE: there
|
||
might be extra SDL packages required</h4>
|
||
<p>In the case that some entries do not work even with SDL1/SDL2
|
||
installed it might be that you need additional SDL libraries. See the
|
||
entry’s README.md for details. If something is not noted you’re welcome
|
||
to report it as an issue or fix it and make a new pull request.</p>
|
||
<h3
|
||
id="faq-3.9-how-do-i-compile-an-ioccc-entry-that-requires-ncurses"><a name="faq3_9"></a>FAQ
|
||
3.9: How do I compile an IOCCC entry that requires (n)curses?</h3>
|
||
<p>This depends on your operating system but below are instructions for
|
||
Linux and macOS with alternative methods for macOS and different package
|
||
managers with Linux.</p>
|
||
<h4 id="red-hat-based-linux-2">Red Hat based Linux</h4>
|
||
<p>Execute the following as root or via sudo:</p>
|
||
<div class="sourceCode" id="cb21"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="ex">dnf</span> install ncurses ncurses-devel</span></code></pre></div>
|
||
<h4 id="macos-2">macOS</h4>
|
||
<p>With macOS it should already be installed. If it is not you might
|
||
have to do:</p>
|
||
<div class="sourceCode" id="cb22"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a><span class="ex">xcode-select</span> <span class="at">--install</span></span></code></pre></div>
|
||
<p>and agree to the terms and conditions and proceed with the
|
||
install.</p>
|
||
<h5 id="macos-via-homebrew-1">macOS via Homebrew</h5>
|
||
<p>Not applicable, see above.</p>
|
||
<h5 id="macos-via-macports-1">macos via MacPorts</h5>
|
||
<p>Not applicable, see above.</p>
|
||
<h4 id="debian-based-linux-2">Debian based Linux</h4>
|
||
<p>Execute the following as root or via sudo:</p>
|
||
<div class="sourceCode" id="cb23"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="ex">apt</span> install libncurses6</span></code></pre></div>
|
||
<p>and then try <code>make all</code> again.</p>
|
||
<h4 id="other-linux-distributions-2">Other Linux distributions</h4>
|
||
<p>Use your package manager to install the appropriate packages. Try the
|
||
search feature of the package manager to determine which packages you
|
||
need to install. Note that you might have to install both the library
|
||
and the developmental packages: one for compiling and one for linking /
|
||
running.</p>
|
||
<h4 id="package-website-2">package website</h4>
|
||
<p>Go to the <a href="https://invisible-island.net/ncurses/">ncurses
|
||
website</a> and follow their instructions for downloading, installing
|
||
and using ncurses.</p>
|
||
<p>We recommend trying a method suitable for your environment first, if
|
||
possible.</p>
|
||
<h3
|
||
id="faq-3.10-how-do-i-compile-and-use-an-ioccc-entry-that-requires-sound"><a name="faq3_10"></a><a name="sox"></a>FAQ
|
||
3.10: How do I compile and use an IOCCC entry that requires sound?</h3>
|
||
<p>This might depend on the entry but most likely the Swiss Army Knife
|
||
of sound processing programs, <a
|
||
href="https://sox.sourceforge.net">SoX</a>, will work. How to install
|
||
depends on your OS.</p>
|
||
<h4 id="red-hat-based-linux-3">Red Hat based Linux</h4>
|
||
<p>As root or via sudo:</p>
|
||
<div class="sourceCode" id="cb24"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="ex">dnf</span> install <span class="at">-y</span> sox sox-devel</span></code></pre></div>
|
||
<h4 id="macos-3">macOS</h4>
|
||
<p>For macOS there are two well known options.</p>
|
||
<h5 id="macos-via-homebrew-2">macOS via Homebrew</h5>
|
||
<p>If you have not already done so, install <a
|
||
href="https://brew.sh">Homebrew</a>.</p>
|
||
<p>Then to install SoX, execute the following command:</p>
|
||
<div class="sourceCode" id="cb25"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="ex">brew</span> install sox</span>
|
||
<span id="cb25-2"><a href="#cb25-2" aria-hidden="true" tabindex="-1"></a><span class="bu">eval</span> <span class="st">"</span><span class="va">$(</span><span class="ex">/opt/homebrew/bin/brew</span> shellenv<span class="va">)</span><span class="st">"</span></span></code></pre></div>
|
||
<h5 id="macos-via-macports-2">macOS via MacPorts</h5>
|
||
<p>If you haven’t already, install <a
|
||
href="https://www.macports.org/install.php">MacPorts</a>. Then run:</p>
|
||
<div class="sourceCode" id="cb26"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> port install sox</span></code></pre></div>
|
||
<h4 id="debian-based-linux-3">Debian based Linux</h4>
|
||
<p>Usually the README.md file will explain how to use it under Debian so
|
||
we do not include this here, at least for now.</p>
|
||
<h4 id="package-website-3">package website</h4>
|
||
<p>Not applicable, see above.</p>
|
||
<h4 id="other-linux-distributions-3">Other Linux distributions</h4>
|
||
<p>Usually the README.md file will explain how to use it under Linux so
|
||
we do not include this here, at least for now.</p>
|
||
<h3
|
||
id="faq-3.10-why-do-makefiles-use--weverything-with-clang"><a name="faq3_11"></a>FAQ
|
||
3.10: Why do Makefiles use -Weverything with clang?</h3>
|
||
<p>While we know that use of <code>-Weverything</code> is generally not
|
||
recommended by <code>clang</code> C compiler developers, we do use the
|
||
<code>-Weverything</code> option in a certain case in IOCCC entry
|
||
<code>Makefile</code>s.</p>
|
||
<p>The use of <code>-Weverything</code> is limited to when one forces
|
||
<code>CC=clang</code> or more generally if the string ‘clang’ is in
|
||
<code>$(CC)</code>. If <code>$(CC)</code> contains ‘gcc’ the ‘gcc’
|
||
specific options are run instead.</p>
|
||
<p>Users with clang compilers are not required to set
|
||
<code>CC=clang</code> or equivalent but when they do,
|
||
<code>-Weverything</code> is enabled with all of its challenges,
|
||
pedantic warnings, and sometimes warnings about things that do not
|
||
matter, some of which are frankly frivolous and often downright
|
||
dubious.</p>
|
||
<p>To enable this feature:</p>
|
||
<div class="sourceCode" id="cb27"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber all CC=clang</span></code></pre></div>
|
||
<p>or:</p>
|
||
<div class="sourceCode" id="cb28"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber all <span class="st">'CWARN+= -Weverything'</span></span></code></pre></div>
|
||
<p>though it should be noted that if one tries <code>-Weverything</code>
|
||
with compilers that are not <code>clang</code> they <em>might</em> see
|
||
something like:</p>
|
||
<div class="sourceCode" id="cb29"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">'int main(void) {}'</span> <span class="op">></span> foo.c <span class="kw">;</span> <span class="fu">cc</span> <span class="at">-Weverything</span> foo.c <span class="at">-o</span> foo</span>
|
||
<span id="cb29-2"><a href="#cb29-2" aria-hidden="true" tabindex="-1"></a><span class="ex">cc:</span> error: unrecognized command-line option <span class="st">'-Weverything'</span></span></code></pre></div>
|
||
<p>which means that it can’t even be compiled. Thus the proper way to do
|
||
it is the first way, <code>make clobber all CC=clang</code>.</p>
|
||
<p>IOCCC authors who have access to <code>clang</code> might wish to try
|
||
their hand at compiling with <code>-Weverything</code> while using a
|
||
minimum of <code>-Wno-foo</code> statements. Sometimes there is a
|
||
technical or pedantic issue that <code>-Weverything</code> warns about
|
||
that would merit a change to your C code; often, however, it is not even
|
||
possible to fix let alone is it worth it. Of course if you’re running
|
||
out of bytes due to rule 2[ab] one might not have much choice. This is
|
||
something that obfuscation authors simply sometimes have to deal
|
||
with!</p>
|
||
<p>If you try to minimize the number of <code>-Wno-foo</code> options
|
||
needed with <code>-Weverything</code>, please mention this in your
|
||
remarks about the entry, as the judges note you attempt to honor it (see
|
||
also below). In some cases your obfuscated code will issue warnings with
|
||
<code>-Weverything</code> no matter what: the
|
||
<code>-Wno-poison-system-directories</code> is a common example of this
|
||
but there are others as well, sometimes depending on the version of
|
||
<code>clang</code>.</p>
|
||
<p>If you do try for a compile with <code>clang -Weverything</code>,
|
||
keep on mind that while <em>your</em> compile environment might be
|
||
warning free, a different clang version or a different build environment
|
||
might still have warnings. For instance the warning set is different in
|
||
macOS (which by default is <code>clang</code>: even when run as
|
||
<code>gcc</code>!) than Linux (due to versions and possibly other
|
||
things)!</p>
|
||
<p>Given that your entry <strong>MUST</strong> work as documented, you
|
||
may be safer to say that your entry keeps the number of warnings and
|
||
<code>-Wno-foo</code> options while compiling with
|
||
<code>clang -Weverything</code> at a minimum. You might want to say the
|
||
version number and platform too as an extra safety net. Because if you
|
||
claim zero warnings, and we find a warning situation, this may diminish
|
||
the value of your entry as it is not as documented. Thus it might be
|
||
wise to point this out and if you can test it in multiple platforms (or
|
||
versions of <code>clang</code>, see below note) this would be
|
||
advisable.</p>
|
||
<p>NOTE: different versions of <code>clang</code> have other differences
|
||
as well. For instance a defect of <code>clang</code> that required
|
||
numerous entries to be fixed for clang is that it requires that
|
||
<code>main()</code>’s arguments to be of a specific type. However some
|
||
versions of <code>clang</code> are more strict in the number of args
|
||
allowed. These reasons are part of why numerous entries had to be
|
||
modified so that <code>main()</code> calls another function instead of
|
||
doing it all in <code>main()</code> (another reason was that some
|
||
entries that recursively called <code>main()</code> caused a crash or
|
||
otherwise broke the entry in modern systems). Some entries do not work
|
||
in <code>clang</code> (or at least do not work completely) due to these
|
||
defects, for instance <a
|
||
href="/1989/westley/README.md">1989/westley</a>; <a
|
||
href="https://www.ioccc.org/authors.html#Cody_Boone_Ferguson">Cody Boone
|
||
Ferguson</a> was able to get much of it to work and looking at that
|
||
entry might be of value to your submissions, at least if you can figure
|
||
the code out :-). To see the differences, try from
|
||
<code>1989/westley</code>:</p>
|
||
<div class="sourceCode" id="cb30"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> diff_orig_prog</span></code></pre></div>
|
||
<p>If you have <code>colordiff</code> try:</p>
|
||
<div class="sourceCode" id="cb31"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> DIFF=colordiff diff_orig_prog</span></code></pre></div>
|
||
<p>Alternatively you can try:</p>
|
||
<div class="sourceCode" id="cb32"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..eb9e69fde657acc8c85a618a8a99af4c2f93b21d westley.c</span></code></pre></div>
|
||
<p>As you can see, using <code>clang</code> has some additional problems
|
||
to work out but if you can get your entry to work well in
|
||
<code>clang</code> it might very well be considered better than other
|
||
entries.</p>
|
||
<h3
|
||
id="faq-3.12-how-do-i-find-out-how-to-send-interrupteof-etc.-for-entries-that-require-it"><a name="faq3_12"></a>FAQ
|
||
3.12: How do I find out how to send interrupt/EOF etc. for entries that
|
||
require it?</h3>
|
||
<p>For some entries one needs to send interrupt or EOF or some other
|
||
signal/other special characters. There are typical defaults like (where
|
||
<code>^</code> = ctrl):</p>
|
||
<ul>
|
||
<li><code>^D</code> for EOF (<code>eof</code>)</li>
|
||
<li><code>^C</code> for interrupt (<code>intr</code>)</li>
|
||
<li><code>^U</code> for kill (<code>kill</code>)</li>
|
||
</ul>
|
||
<p>and various others. But if you don’t know this you can find out
|
||
through the <code>stty(1)</code> command with the <code>-a</code>
|
||
option. For instance with macOS you might see:</p>
|
||
<div class="sourceCode" id="cb33"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> stty <span class="at">-a</span></span>
|
||
<span id="cb33-2"><a href="#cb33-2" aria-hidden="true" tabindex="-1"></a><span class="ex">speed</span> 9600 baud<span class="kw">;</span> <span class="ex">rows</span> 40<span class="kw">;</span> <span class="ex">columns</span> 155<span class="kw">;</span></span>
|
||
<span id="cb33-3"><a href="#cb33-3" aria-hidden="true" tabindex="-1"></a><span class="ex">intr</span> = ^C<span class="kw">;</span> <span class="ex">quit</span> = ^<span class="dt">\;</span> erase = ^<span class="pp">?</span><span class="kw">;</span> <span class="bu">kill</span> = ^U<span class="kw">;</span> <span class="ex">eof</span> = ^D<span class="kw">;</span> <span class="ex">[..snip..]</span></span></code></pre></div>
|
||
<p>If you know the name you can use <code>grep</code> to find the
|
||
correct line and if your implementation of <code>grep(1)</code> has the
|
||
<code>-o</code> option you can filter it. For instance to find what the
|
||
<code>intr</code> is set to:</p>
|
||
<div class="sourceCode" id="cb34"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> stty <span class="at">-a</span> <span class="kw">|</span><span class="fu">grep</span> <span class="at">-o</span> <span class="st">'intr = ^[[:alpha:]]'</span></span>
|
||
<span id="cb34-2"><a href="#cb34-2" aria-hidden="true" tabindex="-1"></a><span class="ex">intr</span> = ^C</span></code></pre></div>
|
||
<p>… assuming of course that it’s a ctrl combination :-) If for some
|
||
strange reason it’s not you might have to do something else including
|
||
just piping it to just <code>grep intr</code> or whatever.</p>
|
||
<h3
|
||
id="faq-3.13-why-does-an-ioccc-entry-fail-to-compile-or-or-fail-run"><a name="faq3_13"></a><a name="no_support"></a>FAQ
|
||
3.13: Why does an IOCCC entry fail to compile or or fail run?</h3>
|
||
<p>What may have worked years ago may not work well or work at all
|
||
today. Please note that the IOCCC judges do <strong>NOT</strong> support
|
||
IOCCC entries. Nevertheless, there may be a number of reasons why an
|
||
IOCCC entry may fail to compile or run well or fail to run on your
|
||
system.</p>
|
||
<p>In some cases the American National Standards Institute’s ANSI C
|
||
committee has damaged the C standard to the point where perfectly valid
|
||
C programs no longer compile with modern compilers. As such some old
|
||
IOCCC entries cannot no longer be compiled with modern compilers.</p>
|
||
<p>In some cases programs that may have worked on an old computer system
|
||
longer work on modern computers. Some IOCCC entries do not work well, or
|
||
no longer work on modern computers or modern operating systems. Some
|
||
IOCCC entries fail to compile under clang, or gcc. Some IOCCC entries
|
||
require operating system services that may not be present on your
|
||
system.</p>
|
||
<p>In some cases the IOCCC entry simply has bugs or (Mis)features.</p>
|
||
<p>If you are having problems compiling or running an IOCCC entry, we
|
||
recommend that you look in <a href="/bugs.md">bugs.md</a> to see if
|
||
there is a known bugs or (Mis)feature. In some cases what you may think
|
||
is a bug is actually an feature that was intentionally written by the
|
||
authors. In some cases the problem is well known and we are looking for
|
||
someone to attempt to fix it.</p>
|
||
<p>In some cases there is an alternate version of the IOCCC entry that
|
||
you may wish to try.</p>
|
||
<p>It also possible that you may have discovered a bug in an IOCCC
|
||
winner. If so, you are invited to try an fix the IOCCC entry and submit
|
||
that fix by way of a <a
|
||
href="https://github.com/ioccc-src/temp-test-ioccc/pulls">GitHub pull
|
||
request</a>. Please see <a href="#faq5_2">FAQ 5.2</a> for how to submit
|
||
a fix to an IOCCC entry.</p>
|
||
<h3
|
||
id="faq-3.14---how-do-i-compile-and-install-tcpserver-for-entries-that-require-it"><a name="faq3_14"></a><a name="tcpserver"></a>FAQ
|
||
3.14 - How do I compile and install tcpserver for entries that require
|
||
it?</h3>
|
||
<p>If your OS package manager does not have the package
|
||
<code>tcpserver</code> you can download, making sure you’re in a
|
||
temporary directory, and compile the source like:</p>
|
||
<div class="sourceCode" id="cb35"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a><span class="fu">wget</span> http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz</span>
|
||
<span id="cb35-2"><a href="#cb35-2" aria-hidden="true" tabindex="-1"></a><span class="fu">tar</span> ucspi-tcp-0.88.tar.gz</span>
|
||
<span id="cb35-3"><a href="#cb35-3" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> ucspi-tcp-0.88</span>
|
||
<span id="cb35-4"><a href="#cb35-4" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||
<p>Then as root or via <code>sudo(1)</code> enter:</p>
|
||
<div class="sourceCode" id="cb36"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> setup check</span></code></pre></div>
|
||
<p>That will install it to <code>/usr/local/bin</code>. Now you should
|
||
be able to use the entry in question.</p>
|
||
<h3
|
||
id="how-do-i-compile-and-install-netpbm-for-entries-that-require-it"><a name="faq3_15"></a><a name="netpbm"></a>3.15
|
||
- How do I compile and install netpbm for entries that require it?</h3>
|
||
<p>This depends on your operating system for which we describe a couple
|
||
below.</p>
|
||
<h4 id="red-hat-based-linux-4">Red Hat based Linux</h4>
|
||
<p>Execute the following as root or via sudo:</p>
|
||
<div class="sourceCode" id="cb37"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="ex">dnf</span> install netpbm-progs netpbm</span></code></pre></div>
|
||
<p>Older RHEL distributions might have to use “yum” instead of “dnf” in
|
||
the above command.</p>
|
||
<h4 id="macos-4">macOS</h4>
|
||
<p>If you’re using macOS there are at least three ways to obtain it. You
|
||
can use Homebrew or MacPorts. If you do not wish to use either of those
|
||
package managers, you can always try to install via the package website.
|
||
For macOS we do recommend using Homebrew or MacPorts instead of using
|
||
the package website.</p>
|
||
<h5 id="macos-via-homebrew-3">macOS via Homebrew</h5>
|
||
<p>If you have not already done so, install <a
|
||
href="https://brew.sh">Homebrew</a>.</p>
|
||
<p>Then to install netpbm, execute the following command:</p>
|
||
<div class="sourceCode" id="cb38"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true" tabindex="-1"></a><span class="ex">brew</span> install netpbm</span></code></pre></div>
|
||
<h5 id="macos-via-macports-3">macos via MacPorts</h5>
|
||
<p>If you haven’t already, install <a
|
||
href="https://www.macports.org/install.php">MacPorts</a>. Then run:</p>
|
||
<div class="sourceCode" id="cb39"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> port install libnetpbm netpbm</span></code></pre></div>
|
||
<h4 id="debian-based-linux-4">Debian based Linux</h4>
|
||
<p>Execute the following as root or via sudo:</p>
|
||
<div class="sourceCode" id="cb40"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a><span class="ex">apt</span> install netpbm</span></code></pre></div>
|
||
<p>and then try <code>make all</code> again.</p>
|
||
<h4 id="other-linux-distributions-4">Other Linux distributions</h4>
|
||
<p>Use your package manager to install the appropriate packages. Try the
|
||
search feature of the package manager to determine which packages you
|
||
need to install. Note that you might have to install both the library
|
||
and the developmental packages: one for compiling and one for linking /
|
||
running.</p>
|
||
<h4 id="package-website-4">package website</h4>
|
||
<p>Go to the <a href="https://netpbm.sourceforge.net">netpbm website</a>
|
||
and follow their instructions for downloading, installing and using
|
||
netpbm.</p>
|
||
<p>We recommend trying a method suitable for your environment first, if
|
||
possible.</p>
|
||
<h3
|
||
id="how-do-i-compile-and-install-libjpeg-turbo-for-entries-that-require-it"><a name="faq3_16"></a><a name="libjpeg"></a>3.16
|
||
- How do I compile and install libjpeg-turbo for entries that require
|
||
it?</h3>
|
||
<p>This depends on your operating system for which we describe a couple
|
||
below.</p>
|
||
<h4 id="red-hat-based-linux-5">Red Hat based Linux</h4>
|
||
<p>Execute the following as root or via sudo:</p>
|
||
<div class="sourceCode" id="cb41"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true" tabindex="-1"></a><span class="ex">dnf</span> install libjpeg-turbo-utils libjpeg-turbo-devel libjpeg-turbo</span></code></pre></div>
|
||
<p>Older RHEL distributions might have to use “yum” instead of “dnf” in
|
||
the above command.</p>
|
||
<h4 id="macos-5">macOS</h4>
|
||
<p>If you’re using macOS there are at least three ways to obtain it. You
|
||
can use Homebrew or MacPorts. If you do not wish to use either of those
|
||
package managers, you can always try to install via the package website.
|
||
For macOS we do recommend using Homebrew or MacPorts instead of using
|
||
the package website.</p>
|
||
<h5 id="macos-via-homebrew-4">macOS via Homebrew</h5>
|
||
<p>If you have not already done so, install <a
|
||
href="https://brew.sh">Homebrew</a>.</p>
|
||
<p>Then to install libjpeg-turbo, execute the following command:</p>
|
||
<div class="sourceCode" id="cb42"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a><span class="ex">brew</span> install libjpeg-turbo</span></code></pre></div>
|
||
<h5 id="macos-via-macports-4">macos via MacPorts</h5>
|
||
<p>If you haven’t already, install <a
|
||
href="https://www.macports.org/install.php">MacPorts</a>. Then run:</p>
|
||
<div class="sourceCode" id="cb43"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> port install libjpeg-turbo libjpeg-turbo-devel</span></code></pre></div>
|
||
<h4 id="debian-based-linux-5">Debian based Linux</h4>
|
||
<p>Execute the following as root or via sudo:</p>
|
||
<div class="sourceCode" id="cb44"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb44-1"><a href="#cb44-1" aria-hidden="true" tabindex="-1"></a><span class="ex">apt</span> install libturbojpeg0 libturbojpeg0-dev</span></code></pre></div>
|
||
<p>and then try <code>make all</code> again.</p>
|
||
<h4 id="other-linux-distributions-5">Other Linux distributions</h4>
|
||
<p>Use your package manager to install the appropriate packages. Try the
|
||
search feature of the package manager to determine which packages you
|
||
need to install. Note that you might have to install both the library
|
||
and the developmental packages: one for compiling and one for linking /
|
||
running.</p>
|
||
<h4 id="package-website-5">package website</h4>
|
||
<p>Go to the <a href="https://www.libjpeg-turbo.org">libjpeg-turbo
|
||
website</a> and follow their instructions for downloading, installing
|
||
and using libjpeg-turbo.</p>
|
||
<p>We recommend trying a method suitable for your environment first, if
|
||
possible.</p>
|
||
<h3
|
||
id="how-do-i-compile-and-install-imagemagick-for-entries-that-require-it"><a name="faq3_17"></a><a name="imagemagick"></a>3.17
|
||
- How do I compile and install ImageMagick for entries that require
|
||
it?</h3>
|
||
<p>This depends on your operating system for which we describe a couple
|
||
below.</p>
|
||
<h4 id="red-hat-based-linux-6">Red Hat based Linux</h4>
|
||
<p>Execute the following as root or via sudo:</p>
|
||
<div class="sourceCode" id="cb45"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb45-1"><a href="#cb45-1" aria-hidden="true" tabindex="-1"></a><span class="ex">dnf</span> install ImageMagick</span></code></pre></div>
|
||
<p>Older RHEL distributions might have to use “yum” instead of “dnf” in
|
||
the above command.</p>
|
||
<h4 id="macos-6">macOS</h4>
|
||
<p>If you’re using macOS there are at least three ways to obtain it. You
|
||
can use Homebrew or MacPorts. If you do not wish to use either of those
|
||
package managers, you can always try to install via the package website.
|
||
For macOS we do recommend using Homebrew or MacPorts instead of using
|
||
the package website.</p>
|
||
<h5 id="macos-via-homebrew-5">macOS via Homebrew</h5>
|
||
<p>If you have not already done so, install <a
|
||
href="https://brew.sh">Homebrew</a>.</p>
|
||
<p>Then to install ImageMagick, execute the following command:</p>
|
||
<div class="sourceCode" id="cb46"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true" tabindex="-1"></a><span class="ex">brew</span> install ImageMagick</span></code></pre></div>
|
||
<h5 id="macos-via-macports-5">macos via MacPorts</h5>
|
||
<p>If you haven’t already, install <a
|
||
href="https://www.macports.org/install.php">MacPorts</a>. Then run:</p>
|
||
<div class="sourceCode" id="cb47"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb47-1"><a href="#cb47-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> port install ImageMagick</span></code></pre></div>
|
||
<h4 id="debian-based-linux-6">Debian based Linux</h4>
|
||
<p>Execute the following as root or via sudo:</p>
|
||
<div class="sourceCode" id="cb48"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb48-1"><a href="#cb48-1" aria-hidden="true" tabindex="-1"></a><span class="ex">apt</span> install imagemagick</span></code></pre></div>
|
||
<p>and then try <code>make all</code> again.</p>
|
||
<h4 id="other-linux-distributions-6">Other Linux distributions</h4>
|
||
<p>Use your package manager to install the appropriate packages. Try the
|
||
search feature of the package manager to determine which packages you
|
||
need to install. Note that you might have to install both the library
|
||
and the developmental packages: one for compiling and one for linking /
|
||
running.</p>
|
||
<h4 id="package-website-6">package website</h4>
|
||
<p>Go to the <a href="https://imagemagick.org">ImageMagick website</a>
|
||
and follow their instructions for downloading, installing and using
|
||
ImageMagick.</p>
|
||
<p>We recommend trying a method suitable for your environment first, if
|
||
possible.</p>
|
||
<h3
|
||
id="how-do-i-compile-and-install-opengl-for-entries-that-require-it"><a name="faq3_18"></a><a name="OpenGL"></a>3.18
|
||
- How do I compile and install OpenGL for entries that require it?</h3>
|
||
<p>This depends on your operating system for which we describe a couple
|
||
below.</p>
|
||
<p>In general OpenGL needs X11 to be installed and the X Window Server
|
||
to be running. See <a href="#X11_general">FAQ 3.7: How do I run an IOCCC
|
||
entry that requires X11?</a> for general information about X11.</p>
|
||
<p>Once X11 is install and the X Window Server is running, one needs to
|
||
compile and link with the two libraries, <em>GL</em> and
|
||
<em>GLU</em>:</p>
|
||
<div class="sourceCode" id="cb49"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb49-1"><a href="#cb49-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> ... <span class="at">-lGL</span> <span class="at">-lGLU</span> <span class="at">-L</span> _location-where-X11-libs-are-installed_ <span class="at">-lX11</span></span>
|
||
<span id="cb49-2"><a href="#cb49-2" aria-hidden="true" tabindex="-1"></a><span class="kw">``</span></span>
|
||
<span id="cb49-3"><a href="#cb49-3" aria-hidden="true" tabindex="-1"></a></span>
|
||
<span id="cb49-4"><a href="#cb49-4" aria-hidden="true" tabindex="-1"></a><span class="ex">NOTE:</span> The OpenGL development effort is being manageed by <span class="pp">[</span><span class="ss">vulkan.org</span><span class="pp">]</span><span class="er">(</span><span class="ex">https://vulkan.org</span><span class="kw">)</span><span class="bu">.</span></span>
|
||
<span id="cb49-5"><a href="#cb49-5" aria-hidden="true" tabindex="-1"></a><span class="ex">We</span> suggest you check out their resource for further information on OpenGL.</span>
|
||
<span id="cb49-6"><a href="#cb49-6" aria-hidden="true" tabindex="-1"></a></span>
|
||
<span id="cb49-7"><a href="#cb49-7" aria-hidden="true" tabindex="-1"></a></span>
|
||
<span id="cb49-8"><a href="#cb49-8" aria-hidden="true" tabindex="-1"></a><span class="co">#### Red Hat based Linux</span></span>
|
||
<span id="cb49-9"><a href="#cb49-9" aria-hidden="true" tabindex="-1"></a></span>
|
||
<span id="cb49-10"><a href="#cb49-10" aria-hidden="true" tabindex="-1"></a><span class="ex">Execute</span> the following as root or via sudo:</span>
|
||
<span id="cb49-11"><a href="#cb49-11" aria-hidden="true" tabindex="-1"></a></span>
|
||
<span id="cb49-12"><a href="#cb49-12" aria-hidden="true" tabindex="-1"></a><span class="kw">```</span><span class="fu">sh</span></span>
|
||
<span id="cb49-13"><a href="#cb49-13" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> dnf install glew-devel SDL2-devel SDL2_image-devel glm-devel freetype-devel</span></code></pre></div>
|
||
<p>See <a
|
||
href="https://en.wikibooks.org/wiki/OpenGL_Programming/Installation/Linux">OpenGL
|
||
Programming/Installation/Linux</a> for details.</p>
|
||
<p>Older RHEL distributions might have to use “yum” instead of “dnf” in
|
||
the above command.</p>
|
||
<h4 id="macos-7">macOS</h4>
|
||
<p>In the past, macOS has come with OpenGL pre-installed. However as of
|
||
macOS 10.14, <a
|
||
href="https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_intro/opengl_intro.html">OpenGL
|
||
has been deprecated on macOS</a> (in favor of Metal).</p>
|
||
<p>As long as Apple continues to ship OpenGL pre-installed and it works,
|
||
you should be able to go. However in Apple drops support for OpenGL
|
||
later on, you might look to install OpenGL via Homebrew or MacPorts.</p>
|
||
<h4 id="debian-based-linux-7">Debian based Linux</h4>
|
||
<p>Execute the following as root or via sudo:</p>
|
||
<div class="sourceCode" id="cb50"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb50-1"><a href="#cb50-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev</span></code></pre></div>
|
||
<p>and then try <code>make all</code> again.</p>
|
||
<p>See <a
|
||
href="https://en.wikibooks.org/wiki/OpenGL_Programming/Installation/Linux">OpenGL
|
||
Programming/Installation/Linux</a> for details.</p>
|
||
<h4 id="other-linux-distributions-7">Other Linux distributions</h4>
|
||
<p>Use your package manager to install the appropriate packages. Try the
|
||
search feature of the package manager to determine which packages you
|
||
need to install. Note that you might have to install both the library
|
||
and the developmental packages: one for compiling and one for linking /
|
||
running.</p>
|
||
<h4 id="package-website-7">package website</h4>
|
||
<p>Go to the <a href="https://vulkan.org">Vulkan website</a> and follow
|
||
their instructions for downloading, installing and using OpenGL.</p>
|
||
<p>We recommend trying a method suitable for your environment first, if
|
||
possible.</p>
|
||
<h2
|
||
id="section-4-changes-made-to-ioccc-entries"><a name="faq4"></a>Section
|
||
4: Changes made to IOCCC entries</h2>
|
||
<h3
|
||
id="faq-4.0-why-are-some-winning-entry-remarks-incongruent-with-the-winning-ioccc-code"><a name="faq4_0"></a>FAQ
|
||
4.0: Why are some winning entry remarks incongruent with the winning
|
||
IOCCC code?</h3>
|
||
<p>It is very likely in this case that the code was fixed to work for
|
||
modern systems as part of the reworking of the website. If you have this
|
||
problem in some entries you should look at the original code as in
|
||
<code>winner.orig.c</code> or <code>prog.orig.c</code>.
|
||
<code>winner</code> is the directory name. For instance, one of Landon’s
|
||
favourite entries of all time is <a
|
||
href="/1984/mullender/README.md">1984/mullender</a> and the winner there
|
||
would be <code>mullender</code>. Sometimes the original is in an alt
|
||
version like <code>winner.alt.c</code> or <code>prog.alt.c</code>. In
|
||
fact it is advisable to look at the original code when reading the
|
||
author’s (and sometimes authors’) remarks.</p>
|
||
<h2
|
||
id="section-4-changes-made-to-ioccc-entries-1"><a name="faq4"></a>Section
|
||
4: Changes made to IOCCC entries</h2>
|
||
<h3
|
||
id="faq-4.0-why-are-some-winning-entry-remarks-incongruent-with-the-winning-ioccc-code-1"><a name="faq4_0"></a>FAQ
|
||
4.0: Why are some winning entry remarks incongruent with the winning
|
||
IOCCC code?</h3>
|
||
<p>It is very likely in this case that the code was fixed to work for
|
||
modern systems as part of the reworking of the website. If you have this
|
||
problem in some entries you should look at the original code as in
|
||
<code>winner.orig.c</code> or <code>prog.orig.c</code>.
|
||
<code>winner</code> is the directory name. For instance, one of Landon’s
|
||
favourite entries of all time is <a
|
||
href="/1984/mullender/README.md">1984/mullender</a> and the winner there
|
||
would be <code>mullender</code>. Sometimes the original is in an alt
|
||
version like <code>winner.alt.c</code> or <code>prog.alt.c</code>. In
|
||
fact it is advisable to look at the original code when reading the
|
||
author’s (and sometimes authors’) remarks.</p>
|
||
<h3
|
||
id="faq-4.1-why-were-some-calls-to-the-libc-function-gets3-changed-to-use-fgets3"><a name="faq4_1"></a><a name="gets"></a>FAQ
|
||
4.1: Why were some calls to the libc function <code>gets(3)</code>
|
||
changed to use <code>fgets(3)</code>?</h3>
|
||
<p>Some may wonder: “Doesn’t this tamper with the entry too much?”</p>
|
||
<p>A fine line indeed has to be drawn here but it was decided that it is
|
||
worth it because of alarming warnings that can be displayed, in some
|
||
systems at runtime interspersed with the output of the program.</p>
|
||
<p>For instance in macOS the entry <a
|
||
href="/1990/tbr/README.md">1990/tbr</a> would output the warning in such
|
||
a way that caused confusing output for the entry, looking like:</p>
|
||
<div class="sourceCode" id="cb51"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb51-1"><a href="#cb51-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./tbr</span>
|
||
<span id="cb51-2"><a href="#cb51-2" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> warning: this program uses gets<span class="er">(</span><span class="kw">)</span><span class="ex">,</span> which is unsafe.</span>
|
||
<span id="cb51-3"><a href="#cb51-3" aria-hidden="true" tabindex="-1"></a><span class="co"># nothing here, what to do?</span></span></code></pre></div>
|
||
<p>In some cases changing the code to use <code>fgets()</code> is not so
|
||
easy to fix and in one case at least there is an alternate version that
|
||
has the fix instead due to a problem it creates (correct output but
|
||
segfaults after the output in one of the forms of input).</p>
|
||
<p>In some cases it is not possible to fix or at least it is highly
|
||
unlikely and so those have mainly not been touched except one that has
|
||
had the buffer size increased (which could be done for others that are
|
||
not possible to change to <code>fgets()</code> though this has not been
|
||
done).</p>
|
||
<p>Some entries can be made to look almost identical to the original
|
||
entry. For instance the fix to <a
|
||
href="/1988/reddy/README.md">1988/reddy</a> required only a single
|
||
<code>#define</code> be added.</p>
|
||
<p>In the future we, the judges, would prefer that entries use
|
||
<code>fgets()</code> to prevent these problems.</p>
|
||
<p>An annoying fact is that for ‘“compatibility” reasons’
|
||
<code>fgets()</code> retains the newline and <code>gets()</code> does
|
||
not. As the Unix version 7 man page used to say:</p>
|
||
<pre><code>BUGS
|
||
|
||
The fgets(3) function retains the newline while gets(3) does not, all in the
|
||
name of backward compatibility.</code></pre>
|
||
<p>We’re not sure how this is compatibility but either way it can cause
|
||
a problem and it is this that has complicated most of the fixes though
|
||
again some can look almost identical.</p>
|
||
<h3
|
||
id="faq-4.2-what-was-changed-in-an-ioccc-entry-source-code"><a name="faq4_2"></a>FAQ
|
||
4.2: What was changed in an IOCCC entry source code?</h3>
|
||
<p>We have set up make rules to easily do see what was changed in the
|
||
IOCCC winner source. Using the <code>Makefile</code> in the winner
|
||
directory, use one of the following <em>make(1)</em> rules:</p>
|
||
<p>The following <code>make</code> rules exist to make a difference:</p>
|
||
<ul>
|
||
<li><code>make diff_orig_prog</code>:
|
||
<ul>
|
||
<li>This rule will show the diff of the <em>original</em> source to the
|
||
current source (that is <code>entry.orig.c</code> to
|
||
<code>entry.c</code>).</li>
|
||
</ul></li>
|
||
<li><code>make make diff_alt_orig</code>:
|
||
<ul>
|
||
<li>This rule will show the diff of the alt code to the original code
|
||
(that is <code>entry.alt.c</code> to <code>entry.orig.c</code>). If no
|
||
alt code exists nothing will be shown.</li>
|
||
</ul></li>
|
||
<li><code>make diff_alt_prog</code>:
|
||
<ul>
|
||
<li>This rule will show the diff of the alt code to the entry as it
|
||
stands (that is <code>entry.alt.c</code> to <code>entry.c</code>).</li>
|
||
</ul></li>
|
||
<li><code>make diff_orig_alt</code>:
|
||
<ul>
|
||
<li>This rule will show the diff of the original code to the alt code
|
||
(that is <code>entry.orig.c</code> to <code>entry.alt.c</code>).</li>
|
||
</ul></li>
|
||
<li><code>make diff_prog_alt</code>:
|
||
<ul>
|
||
<li>This rule will show the diff of the entry to the alt code (that is
|
||
<code>entry.c</code> to <code>entry.alt.c</code>).</li>
|
||
</ul></li>
|
||
<li><code>make diff_prog_orig</code>:
|
||
<ul>
|
||
<li>This rule will show the diff of the entry to the original code (that
|
||
is <code>entry.c</code> to <code>entry.orig.c</code>).</li>
|
||
</ul></li>
|
||
</ul>
|
||
<p>For instance one of Landon’s all time favourite entries is <a
|
||
href="/1984/mullender/README.md">1984/mullender</a> so the file names
|
||
would be: <code>mullender.orig.c</code>, <code>mullender.alt.c</code>
|
||
and <code>mullender.c</code>. For later years, it would be instead
|
||
<code>prog.orig.c</code>, <code>prog.alt.c</code> and
|
||
<code>prog.c</code>.</p>
|
||
<p>Note that you might see something like:</p>
|
||
<pre><code>make: [Makefile:170: diff_orig_prog] Error 1 (ignored)</code></pre>
|
||
<p>at the end of the output but this is completely normal if there are
|
||
differences.</p>
|
||
<p>If the alt code is the same as the original, say with <a
|
||
href="/1984/anonymous/README.md">1984/anonymous</a>, then naturally
|
||
there is no point in running the rule and the same applies for all the
|
||
other rules but this system allows for easily seeing the diffs.</p>
|
||
<p>As some examples we’ll first look at one that has really long lines
|
||
which will make it harder to see what is different, <a
|
||
href="/2001/anonymous/README.md">2001/anonymous</a>. What you would do
|
||
is <code>cd 2001/anonymous</code> and then do:</p>
|
||
<div class="sourceCode" id="cb54"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb54-1"><a href="#cb54-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> diff_orig_prog</span></code></pre></div>
|
||
<p>and then be really confused! :-)</p>
|
||
<p>But for an entry like <a href="/1991/dds/README.md">1991/dds</a>, you
|
||
can see the differences much more easily. <code>1991/dds</code> is a
|
||
good example where it’s very simple to see what is different as it’s
|
||
just a couple lines.</p>
|
||
<p>You might be quite surprised how little some entries had to be
|
||
changed and at the same time how much other entries had to be changed,
|
||
often with quite complex differences! In some cases if the line is
|
||
rather long, like the above mentioned one, it will be harder to see what
|
||
changed but in other cases like <a
|
||
href="/1984/decot/README.md">1984/decot</a> or <a
|
||
href="/1986/wall/README.md">1986/wall</a> it’s a lot easier.</p>
|
||
<p>Well, at least it’s easier see the differences on a line-by-line
|
||
basis but maybe not what actually changed, especially since it’s easier
|
||
to know what was fixed when you have compiler errors :-) (though there
|
||
are, as noted, some examples where it’s quite easy to see the
|
||
differences).</p>
|
||
<p><a href="/1991/dds/README.md">1991/dds</a> is also a good example to
|
||
see the alt difference very easily. To do that <code>cd 1991/dds</code>
|
||
and then do:</p>
|
||
<div class="sourceCode" id="cb55"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb55-1"><a href="#cb55-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> diff_alt_prog</span></code></pre></div>
|
||
<p>and you’ll see a single line changed and very simply.</p>
|
||
<h4
|
||
id="tip-if-you-have-colordiff-installed-its-a-lot-easier-to-see-the-differences">Tip:
|
||
if you have <code>colordiff</code> installed it’s a lot easier to see
|
||
the differences</h4>
|
||
<p>To use these rules but provide a different <code>diff</code>, for
|
||
instance <code>colordiff</code>, just do:</p>
|
||
<div class="sourceCode" id="cb56"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb56-1"><a href="#cb56-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> DIFF=colordiff diff_orig_prog <span class="co"># for orig to prog diff</span></span>
|
||
<span id="cb56-2"><a href="#cb56-2" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> DIFF=colordiff diff_alt_prog <span class="co"># for alt to prog diff</span></span></code></pre></div>
|
||
<p>Obviously if you want to view the alt code or the orig code you can
|
||
just open the files as described above.</p>
|
||
<h3
|
||
id="faq-4.3---why-do-author-remarks-sometimes-not-match-the-source-andor-why-are-there-other-inconsistencies-with-the-original-entry"><a name="faq4_3"></a>
|
||
FAQ 4.3 - Why do author remarks sometimes not match the source and/or
|
||
why are there other inconsistencies with the original entry?</h3>
|
||
<p>If the entry has been fixed for modern systems and this fix required
|
||
modification to the code then invariably there will be entries where the
|
||
remarks of the author or authors are inconsistent with the original
|
||
code, the size of the code might be against rule 2 and other kinds of
|
||
inconsistencies might also be there.</p>
|
||
<p>This is why we recommend that when you read the remarks, sometimes
|
||
the judges’ remarks and always the author’s or authors’ remarks, you
|
||
look at the original code. When the entry source code is called
|
||
<code>prog.c</code> the original code is in <code>prog.orig.c</code>;
|
||
otherwise it is <code>winner.orig.c</code>. For instance one of Landon’s
|
||
all time favourite entries is <a
|
||
href="/1984/mullender/README.md">1984/mullender</a> and the original
|
||
code is in <a
|
||
href="/1984/mullender/mullender.orig.c">mullender.orig.c</a>. In some
|
||
cases, such as <code>1984/mullender</code>, the original code is the
|
||
same as the code as no changes were made (there is an alt version for
|
||
systems that are not VAX-11/PDP-11, however).</p>
|
||
<p>See also <a href="#faq4_2">FAQ 4.2: What was changed in an IOCCC
|
||
entry source code?</a></p>
|
||
<h3
|
||
id="faq-4.4-what-is-the-meaning-of-the-file-ending-in-.orig.c-in-ioccc-entries"><a name="faq4_4"></a>FAQ
|
||
4.4: What is the meaning of the file ending in .orig.c in IOCCC
|
||
entries?</h3>
|
||
<p>Due to the fact that the original code has sometimes had to change
|
||
these files are the original winning entry or as close to as possible to
|
||
the original that we can find.</p>
|
||
<h2
|
||
id="section-5-updating-or-correcting-ioccc-web-site-content"><a name="faq5"></a>Section
|
||
5: Updating or correcting IOCCC web site content</h2>
|
||
<h3
|
||
id="faq-5.0-how-may-i-help-the-ioccc"><a name="faq5_0"></a><a name="how_to_help"></a>FAQ
|
||
5.0: How may I help the IOCCC?</h3>
|
||
<h3 id="we-welcome-your-help-in-fixing-ioccc-entries">We welcome your
|
||
help in fixing IOCCC entries</h3>
|
||
<p>The <a href="/bugs.md">known bugs</a> file, order by IOCCC years,
|
||
contains a list of known bugs & (mis)features. If you are looking
|
||
for an IOCCC entry to try and fix, this file is a good place to
|
||
start.</p>
|
||
<p>See <a href="#faq5_2">FAQ 5.2</a> for information on how to submit a
|
||
fix to an IOCCC entry. Before you consider trying to fix an IOCCC
|
||
winner, please check the <a href="/bugs.md">known bugs</a> file for the
|
||
IOCCC entry in question. Note that in several cases what you may have
|
||
discovered, while a (mis)feature is not considered a bug and should
|
||
<strong>not be fixed</strong>. In cases where the bug is known, the
|
||
entry’s <a href="/bugs.md">known bugs</a> file section may offer you
|
||
important fixing clues.</p>
|
||
<h3 id="we-welcome-your-help-on-fixing-the-ioccc-web-site">We welcome
|
||
your help on fixing the IOCCC web site</h3>
|
||
<h3
|
||
id="faq-5.1-how-do-i-report-a-bug-in-an-ioccc-entry"><a name="faq5_1"></a><a name="report_bug"></a>FAQ
|
||
5.1: How do I report a bug in an IOCCC entry?</h3>
|
||
<p>We do not ‘maintain’ the contest entries as such. The code is made
|
||
available on an ‘AS IS’ basis. If you have a FIX for an entry, we
|
||
suggest that you submit your fixes in a <a
|
||
href="https://github.com/ioccc-src/temp-test-ioccc/pulls">GitHub pull
|
||
request</a> as we welcome pull requests that have a minimal impact on
|
||
the entry while improving the portability, functionality, and/or
|
||
addressing known problems.</p>
|
||
<p>If you do submit a pull request, we ask that each pull request
|
||
address just one IOCCC entry at a time.</p>
|
||
<p>Note that just because you have a fix does not mean it’ll be
|
||
accepted. This might be because the author objects or it doesn’t fit in
|
||
some way or another. Of course if the entry does not work we’ll
|
||
certainly be more inclined to accept the fix. If it is accepted we’ll be
|
||
happy to credit you in the <a href="/thanks-for-help.md">thanks</a>
|
||
file. If you’re a previous winner we will happily link to your entries;
|
||
if you’re not we can link to your website if you wish.</p>
|
||
<p>See <a href="#faq5_2">FAQ 5.2</a> for information on how to submit a
|
||
fix to an IOCCC entry.</p>
|
||
<h3
|
||
id="faq-5.2-how-may-i-submit-a-fix-to-an-ioccc-entry"><a name="faq5_2"></a><a name="fix_an_entry"></a>FAQ
|
||
5.2: How may I submit a fix to an IOCCC entry?</h3>
|
||
<p>If you see a problem with an IOCCC entry, first check the <a
|
||
href="/bugs.md">known bugs</a> file. In some cases what you might think
|
||
of as a bug is instead a known feature. In some cases the bug is known,
|
||
but no fix has ever been submitted. In other cases you may have found a
|
||
new problem.</p>
|
||
<p>If you do have a fix, and the <a href="/bugs.md">known bugs</a> file
|
||
<strong>does not recommend against fixing it</strong>, then please
|
||
consider opening a <a
|
||
href="https://github.com/ioccc-src/winner/pulls">GitHub pull request</a>
|
||
against the master <a
|
||
href="https://github.com/ioccc-src/winner/branches">branch</a> of the <a
|
||
href="https://github.com/ioccc-src/winner">ioccc-src/winner
|
||
repo</a>.</p>
|
||
<p>BTW: A <strong>problem</strong> is not limited to the code itself.
|
||
Fixing typos in files such as “<em>README.md</em>” files, fixing issues
|
||
in a “<em>Makefile</em>”, or otherwise correcting an IOCCC entry is
|
||
<strong>VERY MUCH WELCOME</strong>! Please use the same <a
|
||
href="https://github.com/ioccc-src/winner/pulls">GitHub pull request</a>
|
||
process against the master <a
|
||
href="https://github.com/ioccc-src/winner/branches">branch</a> of the <a
|
||
href="https://github.com/ioccc-src/winner">ioccc-src/winner
|
||
repo</a>.</p>
|
||
<p>NOTE: some of the issues in the <a href="/bugs.md">bugs.md</a> file
|
||
includes just missing files and we welcome these too!</p>
|
||
<p><strong>Please also help us fix typos and / or otherwise improve the
|
||
write-up</strong> of how IOCCC winning entries are presented!</p>
|
||
<p>In any event we will happily add you to the <a
|
||
href="/thanks-for-help.md">thanks</a> file for your help!</p>
|
||
<p>And of course, an IOCCC entry may update their own entries (metadata
|
||
as well as source code and any extra files) by opening a <a
|
||
href="https://github.com/ioccc-src/winner/pulls">GitHub pull request</a>
|
||
against the master <a
|
||
href="https://github.com/ioccc-src/winner/branches">branch</a> of the <a
|
||
href="https://github.com/ioccc-src/winner">ioccc-src/winner
|
||
repo</a>.</p>
|
||
<p>Note that we’re much more inclined to accept an author’s fixes but
|
||
the judges have the final say in the matter.</p>
|
||
<h3
|
||
id="faq-5.3-how-may-i-report-an-ioccc-web-site-problem"><a name="faq5_3"></a><a name="report_web_problem"></a>FAQ
|
||
5.3: How may I report an IOCCC web site problem?</h3>
|
||
<p>If you discover a problem with the IOCCC web site that is related to
|
||
a particular IOCCC entry, please see <a href="#faq5_1">FAQ 5.1</a> for
|
||
information about reporting a bug in an IOCCC entry, and see <a
|
||
href="#faq5_2">FAQ 5.2</a> for information on how to submit a fix to an
|
||
IOCCC entry.</p>
|
||
<p>If you discover a problem with the IOCCC web site (such as a broken
|
||
link, which may or may not be specific to a particular IOCCC entry) that
|
||
is <strong>not related to a particular IOCCC entry</strong>, the best
|
||
way you can help is to submit a fix to the IOCCC web site. See <a
|
||
href="#faq5_4">FAQ 5.4</a> for information on submitting fixes to the
|
||
IOCCC web site.</p>
|
||
<p>If you do not have a IOCCC web site fix, and just wish to report a
|
||
general IOCCC web site problem, we ask that you first look at the <a
|
||
href="https://github.com/ioccc-src/winner/issues">IOCCC issues</a> to
|
||
see if the problem has already been reported. If it has been reported,
|
||
feel free to add a comment to the issue. If you do not find an it has
|
||
been reported, then fee free to open a <a
|
||
href="//github.com/ioccc-src/winner/issues">new IOCCC issue</a>.</p>
|
||
<h3
|
||
id="faq-5.4-how-may-i-submit-a-fix-to-the-ioccc-web-site"><a name="faq5_4"></a><a name="fix_web_site"></a>FAQ
|
||
5.4: How may I submit a fix to the IOCCC web site?</h3>
|
||
<p>For IOCCC web site problems that relate to a particular IOCCC entry,
|
||
please see <a href="#faq5_2">FAQ 5.2</a> for information on how submit a
|
||
fix to an IOCCC entry.</p>
|
||
<p>You may open a <a
|
||
href="https://github.com/ioccc-src/winner/pulls">GitHub pull request</a>
|
||
against the master <a
|
||
href="https://github.com/ioccc-src/winner/branches">branch</a> of the <a
|
||
href="https://github.com/ioccc-src/winner">ioccc-src/winner repo</a> to
|
||
submit a fix.</p>
|
||
<h4 id="some-html-files-should-not-be-directly-modified">Some HTML files
|
||
should NOT be directly modified</h4>
|
||
<p>Most HTML files on the <a href="https://www.ioccc.org">IOCCC web
|
||
site</a> are built from <a
|
||
href="https://daringfireball.net/projects/markdown/">markdown</a> files.
|
||
If you see lines containing:</p>
|
||
<pre><code>!!! 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 !!!</code></pre>
|
||
<p>This means that the file is generated by a tool from the <a
|
||
href="https://github.com/ioccc-src/build-ioccc">build-ioccc repo</a>
|
||
using files found in the <a
|
||
href="https://github.com/ioccc-src/winner">ioccc-src/winner
|
||
repo</a>.</p>
|
||
<p>XXX - the text below for this FAQ entry needs to be updated - XXX XXX
|
||
- the text needs to be synced with what tools be written will do -
|
||
XXX</p>
|
||
<p>You will find a HTML comment of the form indicating which tool was
|
||
used to generate the contents:</p>
|
||
<pre><code>file: __some_file_path__ created by: __something__ version: __something__</code></pre>
|
||
<p>Along with HTML comments of the form indicating which files were used
|
||
by the tool to generate the HTML file;</p>
|
||
<pre><code>content source: __some_file_path__
|
||
content source: __another_file_path__
|
||
...</code></pre>
|
||
<p>Those <strong>content source:</strong> comment lines will give you a
|
||
clue to the content that is used by the tool to generate the <strong>DO
|
||
NOT MODIFY THIS FILE</strong> HTML file.</p>
|
||
<p>When in doubt, consider opening up an <a
|
||
href="https://github.com/ioccc-src/winner/issues">IOCCC issue</a>. See
|
||
<a href="#faq5_3">FAQ 5.3</a> for information on opening up an IOCCC
|
||
issue.</p>
|
||
<h2
|
||
id="faq-5.5-how-may-i-correct-or-update-ioccc-author-information"><a name="faq5_5"></a><a name="fix_author"></a>FAQ
|
||
5.5: How may I correct or update IOCCC author information?</h2>
|
||
<p>Authors of IOCCC winning entries are kept in JSON files of the
|
||
form:</p>
|
||
<pre><code>author/author_handle.json</code></pre>
|
||
<p>where <em>author_handle</em> is an author handle. See <a
|
||
href="#faq6_5">FAQ 6.5</a> for more information about an author
|
||
handles.</p>
|
||
<p>The contents of these JSON files contain the best known information
|
||
about authors of IOCCC entries. See <a href="#faq6_6">FAQ 6.6</a> for
|
||
information about the contents of these JSON file and how they are
|
||
used.</p>
|
||
<p>You may update IOCCC author information in a
|
||
<code>author_handle.json</code> file by opening a <a
|
||
href="https://github.com/ioccc-src/winner/pulls">GitHub pull request</a>
|
||
against the master <a
|
||
href="https://github.com/ioccc-src/winner/branches">branch</a> of the <a
|
||
href="https://github.com/ioccc-src/winner">ioccc-src/winner
|
||
repo</a>.</p>
|
||
<h2
|
||
id="faq-5.6-what-should-i-do-if-i-find-a-broken-or-wrong-web-link"><a name="faq5_6"></a><a name="fix_link"></a>FAQ
|
||
5.6: What should I do if I find a broken or wrong web link?</h2>
|
||
<p>We would appreciate if you try to fix the broken (the link goes
|
||
nowhere) or wrong (the link goes to something that clearly is not the
|
||
original intent) web link. If wish to fix such links, you may open a
|
||
GitHub pull request as described in <a href="#faq5_4">FAQ 5.4</a>. In
|
||
the case of dead links or invalid links it doesn’t matter if it’s a
|
||
specific winner or not; the procedure is the same: open a pull request
|
||
to fix the problem.</p>
|
||
<p>As far as how to find the updated link you can try using the <a
|
||
href="https://web.archive.org">Internet Wayback Machine</a> and see if
|
||
you can find the last non 4xx non 3xx page. Note, however, that just
|
||
because it redirects, does not mean it’s not valuable. Other times you
|
||
might find it with a web search.</p>
|
||
<p>Some links were changed to more recent URLs by doing this exact same
|
||
thing. Some links, while they were a valid web page, no longer reach the
|
||
intended web page (for example when the domain is sold and the new
|
||
domain owner’s content no longer provides the content that was
|
||
originally intended .. and while the content of the web page may be
|
||
humorous to some, the original content may have literally gone “up in
|
||
smoke”).</p>
|
||
<p>In cases where the original content is lost, try searching for it on
|
||
the <a href="https://web.archive.org">Internet Wayback Machine</a>. When
|
||
searching look back for dates that are around the year of given IOCCC
|
||
contest. If you do find the original content in Internet archive
|
||
history, please consider submitting a change to replace the link
|
||
accordingly.</p>
|
||
<p>If there is no alternative that you can find you might want to remove
|
||
the link instead by replacing the link with just phrase of text. For
|
||
example, if the text in some <code>README.md</code> file was:</p>
|
||
<pre><code>See the [author's description of the program](https://example.com) for more information.</code></pre>
|
||
<p>Assuming that the author’s description cannot be found in the <a
|
||
href="https://web.archive.org">Internet Wayback Machine</a> archive,
|
||
then replace that text with:</p>
|
||
<pre><code>See the **author's description of the program** (sorry the content is no longer available) for more information.</code></pre>
|
||
<p>If you just wish to report the bad link issue, see <a
|
||
href="#faq5_3">FAQ 5.3</a>.</p>
|
||
<h2 id="section-6-miscellaneous-ioccc"><a name="faq6"></a>Section 6:
|
||
Miscellaneous IOCCC</h2>
|
||
<h3
|
||
id="faq-6.0-how-did-an-entry-that-breaks-the-size-rule-2-win-the-ioccc"><a name="faq6_0"></a>FAQ
|
||
6.0: How did an entry that breaks the size rule 2 win the IOCCC?</h3>
|
||
<p>As entries have been fixed it is entirely possible that some of the
|
||
entries no longer fit within the year’s size restrictions. Invariably
|
||
the length of columns and/or number of rows have also changed.</p>
|
||
<p>The <code>winner.orig.c</code> file contains the original source code
|
||
that was subjected to rule 2 of the given IOCCC. You may also wish to
|
||
see the <a href="/archive">/archive</a> directory where you can find all
|
||
the original winning entries as compressed tar files for a given
|
||
year.</p>
|
||
<p>In some cases the entry may have abused rule 2 and declared an “abuse
|
||
of the rules” (although now blatant abuse of the rules to get around
|
||
rule 2 size limits is discouraged).</p>
|
||
<h3
|
||
id="faq-6.1-is-there-a-list-of-known-bugs-and-misfeatures-of-ioccc-entries"><a name="faq6_1"></a>FAQ
|
||
6.1: Is there a list of known bugs and misfeatures of IOCCC
|
||
entries?</h3>
|
||
<p>Yes! Please see <a href="/bugs.md">bugs.md</a> for a list of known
|
||
bugs and/or issues of a variety of kinds.</p>
|
||
<p>Note that just because an entry is not in the bugs file does not mean
|
||
there is not an issue and note that some issues are simply missing
|
||
files, dead URL(s) or something like that.</p>
|
||
<h3
|
||
id="faq-6.2-may-i-mirror-the-ioccc-web-site"><a name="faq6_2"></a>FAQ
|
||
6.2: May I mirror the IOCCC web site?</h3>
|
||
<p>We are not accepting mirror requests at this time, sorry. However you
|
||
are free to fork the <a href="https://github.com/ioccc-src/winner">IOCCC
|
||
winner repo</a>. We do ask that your fork keep up to date with the
|
||
latest changes when possible.</p>
|
||
<h3
|
||
id="faq-6.3-may-i-use-parts-of-the-ioccc-in-an-article-book-newsletter-or-instructional-material"><a name="faq6_3"></a>FAQ
|
||
6.3: May I use parts of the IOCCC in an article, book, newsletter, or
|
||
instructional material?</h3>
|
||
<p>While IOCCC judges look favorably on most requests to use IOCCC
|
||
material, we request that you ask the <a href="/judges.html">IOCCC
|
||
judges</a> first.</p>
|
||
<p>Please send your request using the instructions on the <a
|
||
href="/contact.html">contacting the IOCCC Judges</a> page.</p>
|
||
<h3
|
||
id="faq-6.4-why-do-you-sometimes-use-the-first-person-plural"><a name="faq6_4"></a>FAQ
|
||
6.4: Why do you sometimes use the first person plural?</h3>
|
||
<p>As a precedent for <a
|
||
href="https://en.wikipedia.org/wiki/Nosism">first person plural</a>, we
|
||
may sight <a
|
||
href="https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.35.1442">Two-,
|
||
Three-, and Four-Atom Exchange Effects in bcc in 3He</a> and the
|
||
co-authorship of <a
|
||
href="https://en.wikipedia.org/wiki/F._D._C._Willard">F. D. C.
|
||
Willard</a> as well as the <a
|
||
href="https://journals.aps.org/2014/04/01/aps-announces-a-new-open-access-initiative">APS
|
||
New Open Access Initiative</a>.</p>
|
||
<p>The number of <a href="https://www.ioccc.org/judges.html">IOCCC
|
||
judges</a> has always been “> 1” such that IOCCC judges often prefer
|
||
to themselves in the plural, sometimes <a
|
||
href="https://en.wikipedia.org/wiki/Plural">in the common plural</a>,
|
||
sometimes in the <a href="https://en.wikipedia.org/wiki/Nosism">first
|
||
person plural</a>, there may be some who reject such a practice.
|
||
Therefore please consider that when you believe that just one of the <a
|
||
href="https://www.ioccc.org/judges.html">IOCCC judges</a> is in action,
|
||
you may consider that <a
|
||
href="https://en.wikipedia.org/wiki/F._D._C._Willard">F. D. C.
|
||
Willard</a> has been consulted, agreed, and has authorized the statement
|
||
thus allowing the <a href="https://en.wikipedia.org/wiki/Plural">in the
|
||
common plural</a> to be used without offense.</p>
|
||
<p>And while some might claim that <a
|
||
href="https://en.wikipedia.org/wiki/F._D._C._Willard">F. D. C.
|
||
Willard</a> died in 1982, we suggest that the <a
|
||
href="https://en.wikipedia.org/wiki/Schrödinger%27s_cat">Schrödinger’s
|
||
cat</a> superposition may still be in effect and the 1982 <a
|
||
href="https://books.google.com/books?id=ms3tce7BgJsC&lpg=PA134&vq=%22the%20report%20of%20my%20death%20was%20an%20exaggeration%22&pg=PA134#v=onepage&q=%22the%20report%20of%20my%20death%20was%20an%20exaggeration%22&f=false">report
|
||
of death was an exaggeration</a>.</p>
|
||
<p>p.s. Here is an image of F. D. C. Willard:</p>
|
||
<p><a href="/png/F.D.C.Willard.png">F D C Willard</a></p>
|
||
<h3
|
||
id="faq-6.5-what-is-an-author-handle"><a name="faq6_5"></a><a name="author_handle"></a>FAQ
|
||
6.5: What is an author handle?</h3>
|
||
<p>An <code>author_handle</code> is string that refers to a given author
|
||
and is unique to the IOCCC. Each author has exactly one
|
||
<code>author_handle</code>.</p>
|
||
<p>For each <code>author_handle</code>, there will be a JSON file of the
|
||
form:</p>
|
||
<pre><code>author/author_handle.json</code></pre>
|
||
<p>See <a href="#faq6_6">FAQ 6.6</a> for information about the contents
|
||
of these JSON file and how they are used.</p>
|
||
<p>Because the <code>author_handle</code> is used to form a JSON
|
||
filename, the string must be POSIX safe string. Furthermore, the
|
||
<code>author_handle</code> must be an ASCII string that matches this
|
||
regexp:</p>
|
||
<pre class="re"><code>^[0-9A-Za-z][0-9A-Za-z_]*$</code></pre>
|
||
<p>Default <code>author_handle</code>’s do not have multiple consecutive
|
||
<code>_</code> (underscore) characters. Nevertheless, multiple
|
||
consecutive <code>_</code> (underscore) characters are allowed. Contest
|
||
submitters who wish to override their default <code>author_handle</code>
|
||
may do so.</p>
|
||
<p>The <code>author_handle</code> is derived from the name of the
|
||
author. While there is a algorithm that maps the name of the author
|
||
(which can contain any UTF-8 characters) into a default
|
||
<code>author_handle</code> string, those who submit an entry to the
|
||
IOCCC are free to choose a different <code>author_handle</code> string
|
||
if they so desire.</p>
|
||
<p>An <code>author</code> who has won a previous IOCCC is encouraged to
|
||
reuse their <code>author_handle</code> so that new winning entries can
|
||
be associated with the same author.</p>
|
||
<p>For an anonymous <code>author</code>, their handle is one of these
|
||
forms:</p>
|
||
<pre><code>Anonymous_year</code></pre>
|
||
<p>or:</p>
|
||
<pre><code>Anonymous_year.digits</code></pre>
|
||
<p>The latter form is in case there are more than one anonymous author
|
||
in a given year.</p>
|
||
<p>NOTE: even if the directory name is not <code>anonymous</code> the
|
||
above rules apply as in in the case of <a
|
||
href="/2005/anon/anon.c">2005/anon</a>.</p>
|
||
<p>Anonymous <code>author_handle</code>’s match this regexp:</p>
|
||
<pre class="re"><code>Anonymous_[0-9][0-9][0-9][0-9][.0-9]*$</code></pre>
|
||
<p>See <a href="#faq5_5">FAQ 5.5</a> for information about how to update
|
||
and/or correct IOCCC author information.</p>
|
||
<h3
|
||
id="faq-6.6-what-is-a-author_handle.json-file-and-how-are-they-used"><a name="faq6_6"></a><a name="author_json"></a>FAQ
|
||
6.6: What is a author_handle.json file and how are they used?</h3>
|
||
<p><strong>TL:DR</strong>: The contents of these JSON files contain the
|
||
best known information about authors of IOCCC entries and is used to
|
||
help form HTML files as well to contact an author.</p>
|
||
<p>The content of these JSON files are used by tools from the <a
|
||
href="https://github.com/ioccc-src/build-ioccc">build-ioccc repo</a> to
|
||
help build HTML content for the <a href="https://www.ioccc.org">official
|
||
IOCCC web site</a>. For example, the <code>index.html</code> file for
|
||
each IOCCC entry contains selected information about the authors. Tools
|
||
from the <a href="https://github.com/ioccc-src/build-ioccc">build-ioccc
|
||
repo</a> use the content of these JSON files to generate the
|
||
<code>index.html</code> files for each IOCCC winning entry.</p>
|
||
<p>Moreover, should the <a href="/judges.html">IOCCC judges</a> need to
|
||
contact an authors of a IOCCC entry, they will consult the contents of
|
||
the author’s JSON file for ways to contact them.</p>
|
||
<p>Each author of an IOCCC winning entry has their own
|
||
<code>author_handle.json</code> file of the form:</p>
|
||
<pre><code>author/author_handle.json</code></pre>
|
||
<p>where <em>author_handle</em> is an author handle. See <a
|
||
href="#faq6_5">FAQ 6.5</a> for more information about an author
|
||
handles.</p>
|
||
<h4 id="author_handle.json-json-file-contents">author_handle.json JSON
|
||
file contents</h4>
|
||
<p>The syntax of a <code>author_handle.json</code> follows the
|
||
<em>So-called JSON spec</em>. See <a
|
||
href="https://github.com/ioccc-src/mkiocccentry/blob/master/jparse/json_README.md#so_called_json_spec">json_README.md</a>
|
||
for information on the <em>So-called JSON spec</em>.</p>
|
||
<p>A good way to understand the JSON file contents of a
|
||
<code>author_handle.json</code> file is to look at an example, the
|
||
<code>author_handle.json</code> file for Yusuke Endoh:</p>
|
||
<pre><code>author/Yusuke_Endoh.json</code></pre>
|
||
<p>As of <em>Thu Nov 30 23:51:12 UTC 2023</em>, the contents was as
|
||
follows:</p>
|
||
<div class="sourceCode" id="cb70"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb70-1"><a href="#cb70-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
|
||
<span id="cb70-2"><a href="#cb70-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">"no_comment"</span> <span class="fu">:</span> <span class="st">"mandatory comment: because comments were removed from the original JSON spec"</span><span class="fu">,</span></span>
|
||
<span id="cb70-3"><a href="#cb70-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">"author_JSON_format_version"</span> <span class="fu">:</span> <span class="st">"1.0 2023-06-10"</span><span class="fu">,</span></span>
|
||
<span id="cb70-4"><a href="#cb70-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">"author_handle"</span> <span class="fu">:</span> <span class="st">"Yusuke_Endoh"</span><span class="fu">,</span></span>
|
||
<span id="cb70-5"><a href="#cb70-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">"full_name"</span> <span class="fu">:</span> <span class="st">"Yusuke Endoh"</span><span class="fu">,</span></span>
|
||
<span id="cb70-6"><a href="#cb70-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">"sort_word"</span> <span class="fu">:</span> <span class="st">"endoh"</span><span class="fu">,</span></span>
|
||
<span id="cb70-7"><a href="#cb70-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">"location_code"</span> <span class="fu">:</span> <span class="st">"JP"</span><span class="fu">,</span></span>
|
||
<span id="cb70-8"><a href="#cb70-8" aria-hidden="true" tabindex="-1"></a> <span class="dt">"location_name"</span> <span class="fu">:</span> <span class="st">"Japan"</span><span class="fu">,</span></span>
|
||
<span id="cb70-9"><a href="#cb70-9" aria-hidden="true" tabindex="-1"></a> <span class="dt">"email"</span> <span class="fu">:</span> <span class="st">"mame@ruby-lang.org"</span><span class="fu">,</span></span>
|
||
<span id="cb70-10"><a href="#cb70-10" aria-hidden="true" tabindex="-1"></a> <span class="dt">"url"</span> <span class="fu">:</span> <span class="st">"https://mametter.hatenablog.com"</span><span class="fu">,</span></span>
|
||
<span id="cb70-11"><a href="#cb70-11" aria-hidden="true" tabindex="-1"></a> <span class="dt">"alt_url"</span> <span class="fu">:</span> <span class="kw">null</span><span class="fu">,</span></span>
|
||
<span id="cb70-12"><a href="#cb70-12" aria-hidden="true" tabindex="-1"></a> <span class="dt">"deprecated_twitter_handle"</span> <span class="fu">:</span> <span class="kw">null</span><span class="fu">,</span></span>
|
||
<span id="cb70-13"><a href="#cb70-13" aria-hidden="true" tabindex="-1"></a> <span class="dt">"mastodon"</span> <span class="fu">:</span> <span class="st">"@mame@ruby.social"</span><span class="fu">,</span></span>
|
||
<span id="cb70-14"><a href="#cb70-14" aria-hidden="true" tabindex="-1"></a> <span class="dt">"mastodon_url"</span> <span class="fu">:</span> <span class="st">"https://ruby.social/@mame"</span><span class="fu">,</span></span>
|
||
<span id="cb70-15"><a href="#cb70-15" aria-hidden="true" tabindex="-1"></a> <span class="dt">"github"</span> <span class="fu">:</span> <span class="st">"@mame"</span><span class="fu">,</span></span>
|
||
<span id="cb70-16"><a href="#cb70-16" aria-hidden="true" tabindex="-1"></a> <span class="dt">"affiliation"</span> <span class="fu">:</span> <span class="kw">null</span><span class="fu">,</span></span>
|
||
<span id="cb70-17"><a href="#cb70-17" aria-hidden="true" tabindex="-1"></a> <span class="dt">"winning_entry_set"</span> <span class="fu">:</span> <span class="ot">[</span></span>
|
||
<span id="cb70-18"><a href="#cb70-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2012_endoh1"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-19"><a href="#cb70-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2012_endoh2"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-20"><a href="#cb70-20" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2013_endoh1"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-21"><a href="#cb70-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2013_endoh2"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-22"><a href="#cb70-22" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2013_endoh3"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-23"><a href="#cb70-23" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2013_endoh4"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-24"><a href="#cb70-24" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2014_endoh1"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-25"><a href="#cb70-25" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2014_endoh2"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-26"><a href="#cb70-26" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2015_endoh1"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-27"><a href="#cb70-27" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2015_endoh2"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-28"><a href="#cb70-28" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2015_endoh3"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-29"><a href="#cb70-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2015_endoh4"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-30"><a href="#cb70-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2018_endoh1"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-31"><a href="#cb70-31" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2018_endoh2"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-32"><a href="#cb70-32" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2019_endoh"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-33"><a href="#cb70-33" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2020_endoh1"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-34"><a href="#cb70-34" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2020_endoh2"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb70-35"><a href="#cb70-35" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2020_endoh3"</span> <span class="fu">}</span></span>
|
||
<span id="cb70-36"><a href="#cb70-36" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span></span>
|
||
<span id="cb70-37"><a href="#cb70-37" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
|
||
<p>We now will walk thru the above JSON document looking at various JSON
|
||
members:</p>
|
||
<h5 id="no_comment">no_comment</h5>
|
||
<div class="sourceCode" id="cb71"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb71-1"><a href="#cb71-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"no_comment"</span> <span class="er">:</span> <span class="er">"mandatory</span> <span class="er">comment:</span> <span class="er">because</span> <span class="er">comments</span> <span class="er">were</span> <span class="er">removed</span> <span class="er">from</span> <span class="er">the</span> <span class="er">original</span> <span class="er">JSON</span> <span class="er">spec",</span></span></code></pre></div>
|
||
<p>Because the authors of the so-called JSON spec removed the ability to
|
||
use comments in JSON (for reason(s) that seem to be less than credible),
|
||
the IOCCC mandates this <em>JSON member</em> be present in all IOCCC
|
||
related JSON files.</p>
|
||
<p>There <strong>MUST</strong> be one and only one
|
||
<code>no_comment</code> <em>JSON member</em> and the <em>JSON value</em>
|
||
<strong>MUST</strong> be the exact <em>JSON string</em> as shown
|
||
above.</p>
|
||
<h5 id="author_json_format_version">author_JSON_format_version</h5>
|
||
<div class="sourceCode" id="cb72"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb72-1"><a href="#cb72-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"author_JSON_format_version"</span> <span class="er">:</span> <span class="er">"1.0</span> <span class="er">2023-06-10",</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds the format version of the
|
||
<code>author_handle.json</code> JSON file.</p>
|
||
<p>There <strong>MUST</strong> be one and only one
|
||
<code>author_JSON_format_version</code> <em>JSON member</em> and the
|
||
<em>JSON value</em> <strong>MUST</strong> be a <em>JSON string</em>.</p>
|
||
<p>This is <strong>NOT</strong> the version of the contents! When
|
||
updating an <code>author_handle.json</code> JSON file, <strong>DO NOT
|
||
MODIFY author_JSON_format_version</strong>! As of <em>Thu Nov 30
|
||
23:51:12 UTC 2023</em>, the <em>JSON value</em> <strong>MUST</strong> be
|
||
<em>“1.0 2023-06-10”</em>.</p>
|
||
<p>The <em>author_JSON_format_version</em> would only changed when the
|
||
overall format of the these files is modified: and then only those who
|
||
maintain the <a href="https://www.ioccc.org">official IOCCC web site</a>
|
||
would be the one to do this in conjunction with changes to the <a
|
||
href="https://github.com/ioccc-src/build-ioccc">build-ioccc
|
||
repo</a>.</p>
|
||
<h5 id="author_handle">author_handle</h5>
|
||
<div class="sourceCode" id="cb73"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb73-1"><a href="#cb73-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"author_handle"</span> <span class="er">:</span> <span class="er">"Yusuke_Endoh",</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds the author handle of the author.</p>
|
||
<p>There <strong>MUST</strong> be one and only one
|
||
<code>author_handle</code> <em>JSON member</em> and the <em>JSON
|
||
value</em> <strong>MUST</strong> be a <em>JSON string</em> that is also
|
||
a value author handle.</p>
|
||
<p>See <a href="#faq6_5">FAQ 6.5</a> for more information about an
|
||
author handles.</p>
|
||
<p>Normally the <em>author_handle</em> <em>JSON value</em> should
|
||
<strong>NOT</strong> be changed <strong>unless there is a strong reason
|
||
to do so</strong>. If the <em>JSON value</em> changes, then all of the
|
||
<code>.entry.json</code> files for all of this authors winning IOCCC
|
||
entries should also be changed. The <em>author_handle</em> <em>JSON
|
||
value</em> must match the basename (without the leading path and without
|
||
the trailing <code>.json</code>) of the <code>author_handle.json</code>
|
||
file. So a change of <em>author_handle</em> <em>JSON value</em> would
|
||
also require the <code>author_handle.json</code> file to also be
|
||
renamed.</p>
|
||
<h5 id="full_name">full_name</h5>
|
||
<div class="sourceCode" id="cb74"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb74-1"><a href="#cb74-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"full_name"</span> <span class="er">:</span> <span class="er">"Yusuke</span> <span class="er">Endoh",</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds the full name of the author.</p>
|
||
<p>There <strong>MUST</strong> be one and only one
|
||
<code>full_name</code> <em>JSON member</em> and the <em>JSON value</em>
|
||
<strong>MUST</strong> be a <em>JSON string</em>.</p>
|
||
<p>The full name of an author may use non-ASCII characters so long as
|
||
the full name is properly encoded as a <em>JSON string</em>.</p>
|
||
<h5 id="sort_word">sort_word</h5>
|
||
<div class="sourceCode" id="cb75"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb75-1"><a href="#cb75-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"sort_word"</span> <span class="er">:</span> <span class="er">"endoh",</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds the string that will be used to sort
|
||
the author.</p>
|
||
<p>There <strong>MUST</strong> be one and only one
|
||
<code>sort_word</code> <em>JSON member</em> and the <em>JSON value</em>
|
||
<strong>MUST</strong> be a <em>JSON string</em>. Moreover the string
|
||
<strong>MUST</strong> be a lower case ASCII alphanumeric string that
|
||
starts with a lower case ASCII letter.</p>
|
||
<p>The <em>JSON value</em> is used, for example, to place a reference to
|
||
the author in the <code>/authors.html</code> file.</p>
|
||
<p>Normally the <code>sort_word</code> <em>JSON member</em> <em>JSON
|
||
value</em> is the last name of the author, translated into lower case
|
||
ASCII alphanumeric string that starts with a lower case ASCII letter. If
|
||
the author wishes to be found in the <code>/authors.html</code> file
|
||
under a different string, such as if they wish to be listed under their
|
||
first name or their username, then they may change this accordingly.</p>
|
||
<h5 id="location_code">location_code</h5>
|
||
<div class="sourceCode" id="cb76"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb76-1"><a href="#cb76-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"location_code"</span> <span class="er">:</span> <span class="er">"JP",</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds the string that is the <a
|
||
href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Decoding_table">ISO
|
||
3166-1 alpha-2 code</a> of the author’s location or country.</p>
|
||
<p>There <strong>MUST</strong> be one and only one
|
||
<code>location_code</code> <em>JSON member</em> and the <em>JSON
|
||
value</em> <strong>MUST</strong> be a <em>JSON string</em>. Moreover the
|
||
string <strong>MUST</strong> be 2 character UPPER case ASCII alphabetic
|
||
string that is <strong>NOT</strong> an Unassigned <a
|
||
href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Decoding_table">ISO
|
||
3166-1 alpha-2 code</a> value (not a 2 character symbol with a gray
|
||
background on that Wikipedia table)</p>
|
||
<p>The <code>soup/location</code> tool from the <a
|
||
href="https://github.com/ioccc-src/mkiocccentry">mkiocccentry repo</a>,
|
||
when run without arguments, will print the ISO 3166-1 alpha-2 codes that
|
||
permitted, along with the location name.</p>
|
||
<p>We use the term “location” (and not “country”) because some of the
|
||
ISO 3166-1 alpha-2 codes belong to locations that are not technically a
|
||
country, such as “Antarctica” or a User-assigned code.</p>
|
||
<p>If the author wishes to not specify a location, they should select
|
||
<strong>XX</strong>.</p>
|
||
<h5 id="location_name">location_name</h5>
|
||
<div class="sourceCode" id="cb77"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb77-1"><a href="#cb77-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"location_name"</span> <span class="er">:</span> <span class="er">"Japan",</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds the string that is the canonical
|
||
location name as reported by the <code>soup/location</code> tool from
|
||
the <a href="https://github.com/ioccc-src/mkiocccentry">mkiocccentry
|
||
repo</a>, when given the <a href="#location_code">location code</a> as
|
||
specified above.</p>
|
||
<p>There <strong>MUST</strong> be one and only one
|
||
<code>location_code</code> <em>JSON member</em> and the <em>JSON
|
||
value</em> <strong>MUST</strong> be a <em>JSON string</em>. Moreover the
|
||
string <strong>MUST</strong> be what the <code>soup/location</code> tool
|
||
prints when given the <code>location_code</code> as an argument.</p>
|
||
<p>We use the term “location” (and not “country”) because some of the
|
||
ISO 3166-1 alpha-2 codes belong to locations that are not technically a
|
||
country, such as “Antarctica” or a User-assigned code.</p>
|
||
<p>Often a given location may have a long official name, and multiple
|
||
common names. For names associated with the location <strong>DE</strong>
|
||
might be:</p>
|
||
<pre><code>Germany
|
||
Federal Republic of Germany
|
||
Bundesrepublik Deutschland
|
||
Deutschland
|
||
...</code></pre>
|
||
<p>The “location_name” printed by the <code>soup/location</code> tool is
|
||
often a short, common string that is sometimes called the formal
|
||
location name for the given ISO 3166 code. Thus in the above example for
|
||
<em>DE</em>, the location name of <em>Germany</em> is used.</p>
|
||
<p>If the author wishes to not specify a location, they should select
|
||
<strong>Anonymous location</strong>.</p>
|
||
<h5 id="email">email</h5>
|
||
<div class="sourceCode" id="cb79"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb79-1"><a href="#cb79-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"email"</span> <span class="er">:</span> <span class="er">"mame@ruby-lang.org",</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds the email address of the author, or
|
||
is the value null.</p>
|
||
<p>There <strong>MUST</strong> be one and only one <code>email</code>
|
||
<em>JSON member</em> and the <em>JSON value</em> <strong>MUST</strong>
|
||
be a <em>JSON string</em> or it <strong>MUST</strong> be a <em>JSON
|
||
null</em>.</p>
|
||
<p>If the author wishes to not specify an email address, or if the email
|
||
address is unknown, they should use the <em>JSON null</em> as the
|
||
<em>JSON value</em> of this <em>JSON member</em>. For example:</p>
|
||
<div class="sourceCode" id="cb80"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb80-1"><a href="#cb80-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"email"</span> <span class="er">:</span> <span class="er">null,</span></span></code></pre></div>
|
||
<p>NOTE: The <em>JSON null</em> is <strong>NOT</strong> enclosed in
|
||
quotes!</p>
|
||
<h5 id="url">url</h5>
|
||
<div class="sourceCode" id="cb81"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb81-1"><a href="#cb81-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"url"</span> <span class="er">:</span> <span class="er">"https://mametter.hatenablog.com",</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds the URL of the author’s home
|
||
page.</p>
|
||
<p>There <strong>MUST</strong> be one and only one <code>url</code>
|
||
<em>JSON member</em> and the <em>JSON value</em> <strong>MUST</strong>
|
||
be a <em>JSON string</em> or it <strong>MUST</strong> be a <em>JSON
|
||
null</em>.</p>
|
||
<p>If the author wishes to not specify an email address, or if the URL
|
||
is unknown, they should use the <em>JSON null</em> as the <em>JSON
|
||
value</em> of this <em>JSON member</em>. For example:</p>
|
||
<div class="sourceCode" id="cb82"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb82-1"><a href="#cb82-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"url"</span> <span class="er">:</span> <span class="er">null,</span></span></code></pre></div>
|
||
<p>NOTE: The <em>JSON null</em> is <strong>NOT</strong> enclosed in
|
||
quotes!</p>
|
||
<h5 id="alt_url">alt_url</h5>
|
||
<div class="sourceCode" id="cb83"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb83-1"><a href="#cb83-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"alt_url"</span> <span class="er">:</span> <span class="er">null,</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds an alternate or 2nd URL a home page
|
||
for the author.</p>
|
||
<p>There <strong>MUST</strong> be one and only one <code>url</code>
|
||
<em>JSON member</em> and the <em>JSON value</em> <strong>MUST</strong>
|
||
be a <em>JSON string</em> or it <strong>MUST</strong> be a <em>JSON
|
||
null</em>.</p>
|
||
<p>In some cases the author may wish to record a special URL for their
|
||
IOCCC entry, or a 2nd URL such as a work or school or personal home
|
||
page. For example, Cody as of <em>Thu Nov 30 23:51:12 UTC 2023</em>
|
||
used:</p>
|
||
<div class="sourceCode" id="cb84"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb84-1"><a href="#cb84-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"alt_url"</span> <span class="er">:</span> <span class="er">"https://ioccc.xexyl.net",</span></span></code></pre></div>
|
||
<p>If the author wishes to not specify an email address, or if the
|
||
alternate URL is unknown, they should use the <em>JSON null</em> as the
|
||
<em>JSON value</em> of this <em>JSON member</em>. For example:</p>
|
||
<div class="sourceCode" id="cb85"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb85-1"><a href="#cb85-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"url"</span> <span class="er">:</span> <span class="er">null,</span></span></code></pre></div>
|
||
<p>NOTE: The <em>JSON null</em> is <strong>NOT</strong> enclosed in
|
||
quotes!</p>
|
||
<h5 id="deprecated_twitter_handle">deprecated_twitter_handle</h5>
|
||
<p>This <em>JSON member</em> used to hold the twitter handle of the
|
||
author.</p>
|
||
<p>There <strong>MUST</strong> be one and only one
|
||
<code>deprecated_twitter_handle</code> <em>JSON member</em> and the
|
||
<em>JSON value</em> <strong>MUST</strong> be a <em>JSON string</em> or
|
||
it <strong>MUST</strong> be a <em>JSON null</em>.</p>
|
||
<p>The IOCCC no longer is associated with twitter (or whatever someone
|
||
chooses to call it), and so the <code>deprecated_twitter_handle</code>
|
||
is <strong>no longer used</strong>. A <em>JSON value</em> that is not a
|
||
<em>JSON null</em> is kept for only historic reasons. For example,
|
||
Anthony C. Howe once used:</p>
|
||
<div class="sourceCode" id="cb86"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb86-1"><a href="#cb86-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"deprecated_twitter_handle"</span> <span class="er">:</span> <span class="er">"@SirWumpus",</span></span></code></pre></div>
|
||
<p>If the author wishes to not specify an twitter handle, or if the
|
||
twitter handle is unknown, they should use the <em>JSON null</em> as the
|
||
<em>JSON value</em> of this <em>JSON member</em>. For example:</p>
|
||
<div class="sourceCode" id="cb87"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb87-1"><a href="#cb87-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"deprecated_twitter_handle"</span> <span class="er">:</span> <span class="er">null,</span></span></code></pre></div>
|
||
<p>NOTE: The <em>JSON null</em> is <strong>NOT</strong> enclosed in
|
||
quotes!</p>
|
||
<h5 id="mastodon">mastodon</h5>
|
||
<div class="sourceCode" id="cb88"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb88-1"><a href="#cb88-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"mastodon"</span> <span class="er">:</span> <span class="er">"@mame@ruby.social",</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds the <a
|
||
href="https://en.wikipedia.org/wiki/Mastodon_(social_network)">Mastodon
|
||
social network</a> handle of the author.</p>
|
||
<p>There <strong>MUST</strong> be one and only one <code>mastodon</code>
|
||
<em>JSON member</em> and the <em>JSON value</em> <strong>MUST</strong>
|
||
be a <em>JSON string</em> or it <strong>MUST</strong> be a <em>JSON
|
||
null</em>. The <em>JSON string</em> just be a valid Mastodon handle. In
|
||
particular is must start with an at sign (<em><span class="citation"
|
||
data-cites="_">@_</span>), followed by the Mastodon username, followed
|
||
by a 2nd sign (</em>@_), followed by the Mastodon server instance used
|
||
by the author.</p>
|
||
<p>For more information in Mastodon, see the <a
|
||
href="https://mastodon.help">Mastodon help</a> guide. See the “Mastodon
|
||
Address” section of that page in particular.</p>
|
||
<p>The IOCCC Mastodon handle is:</p>
|
||
<div class="sourceCode" id="cb89"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb89-1"><a href="#cb89-1" aria-hidden="true" tabindex="-1"></a><span class="er">@ioccc@fosstodon.org</span></span></code></pre></div>
|
||
<p>The IOCCC uses the Mastodon social network for announcements such as
|
||
the opening and closing of a new IOCCC, changes to the IOCCC web site,
|
||
updates during the judging process, and when new IOCCC entries are
|
||
selected. We recommend you follow us on Mastodon.</p>
|
||
<p>If the author wishes to not specify an Mastodon handle, or if the
|
||
Mastodon handle is unknown, they should use the <em>JSON null</em> as
|
||
the <em>JSON value</em> of this <em>JSON member</em>. For example:</p>
|
||
<div class="sourceCode" id="cb90"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb90-1"><a href="#cb90-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"mastodon"</span> <span class="er">:</span> <span class="er">null,</span></span></code></pre></div>
|
||
<p>NOTE: The <em>JSON null</em> is <strong>NOT</strong> enclosed in
|
||
quotes!</p>
|
||
<h5 id="mastodon_url">mastodon_url</h5>
|
||
<div class="sourceCode" id="cb91"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb91-1"><a href="#cb91-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"mastodon_url"</span> <span class="er">:</span> <span class="er">"https://ruby.social/@mame",</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds the URL of the author’s Mastodon
|
||
page.</p>
|
||
<p>There <strong>MUST</strong> be one and only one
|
||
<code>mastodon_url</code> <em>JSON member</em> and the <em>JSON
|
||
value</em> <strong>MUST</strong> be a <em>JSON string</em> or it
|
||
<strong>MUST</strong> be a <em>JSON null</em>. The <em>JSON string</em>
|
||
just be a valid URL. If the <code>mastodon</code> handle is a <em>JSON
|
||
null</em>, them the <code>mastodon_url</code> <strong>MUST</strong> be a
|
||
<em>JSON null</em>. If the <code>mastodon</code> handle is a <em>JSON
|
||
string</em>, then the <code>mastodon_url</code> <strong>MUST</strong> be
|
||
a <em>JSON string</em>.</p>
|
||
<p>The <code>mastodon_url</code> is just a translation of the above
|
||
mentioned <a href="#mastodon">mastodon</a> handle. For example, if the
|
||
Mastodon handle is:</p>
|
||
<pre><code>@user@server.domain</code></pre>
|
||
<p>Then the <code>mastodon_url</code> would be:</p>
|
||
<pre><code>https://server.domain/@user</code></pre>
|
||
<p>If the author wishes to not specify an Mastodon URL, or if the
|
||
Mastodon URL is unknown, they should use the <em>JSON null</em> as the
|
||
<em>JSON value</em> of this <em>JSON member</em>. For example:</p>
|
||
<div class="sourceCode" id="cb94"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb94-1"><a href="#cb94-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"mastodon_url"</span> <span class="er">:</span> <span class="er">null,</span></span></code></pre></div>
|
||
<p>NOTE: The <em>JSON null</em> is <strong>NOT</strong> enclosed in
|
||
quotes!</p>
|
||
<h5 id="github">github</h5>
|
||
<div class="sourceCode" id="cb95"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb95-1"><a href="#cb95-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"github"</span> <span class="er">:</span> <span class="er">"@mame",</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds the <a
|
||
href="https://github.com">GitHub</a> handle of the author.</p>
|
||
<p>There <strong>MUST</strong> be one and only one <code>github</code>
|
||
<em>JSON member</em> and the <em>JSON value</em> <strong>MUST</strong>
|
||
be a <em>JSON string</em> or it <strong>MUST</strong> be a <em>JSON
|
||
null</em>. The <code>github</code> <em>JSON string</em>
|
||
<strong>MUST</strong> start with an at sign (_<span class="citation"
|
||
data-cites="_">@_</span>) and <strong>MUST</strong> be a valid GitHub
|
||
username.</p>
|
||
<p>The IOCCC uses GitHub to hold the <a
|
||
href="https://github.com/ioccc-src/winner">official winner repo of the
|
||
IOCCC</a>, and hosts <a href="https://www.ioccc.org">official IOCCC web
|
||
site</a> on GitHub pages.</p>
|
||
<p>The IOCCC GitHub handle is:</p>
|
||
<pre><code>@ioccc-src</code></pre>
|
||
<p>If the author wishes to not specify an GitHub handle, or if the
|
||
GitHub handle is unknown, they should use the <em>JSON null</em> as the
|
||
<em>JSON value</em> of this <em>JSON member</em>. For example:</p>
|
||
<div class="sourceCode" id="cb97"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb97-1"><a href="#cb97-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"github"</span> <span class="er">:</span> <span class="er">null,</span></span></code></pre></div>
|
||
<p>NOTE: The <em>JSON null</em> is <strong>NOT</strong> enclosed in
|
||
quotes!</p>
|
||
<h5 id="affiliation">affiliation</h5>
|
||
<div class="sourceCode" id="cb98"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb98-1"><a href="#cb98-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"affiliation"</span> <span class="er">:</span> <span class="er">null,</span></span></code></pre></div>
|
||
<p>This <em>JSON member</em> holds the affiliation of the author.</p>
|
||
<p>There <strong>MUST</strong> be one and only one
|
||
<code>affiliation</code> <em>JSON member</em> and the <em>JSON
|
||
value</em> <strong>MUST</strong> be a <em>JSON string</em> or it
|
||
<strong>MUST</strong> be a <em>JSON null</em>.</p>
|
||
<p>An affiliation might be the name of a school, university, company, or
|
||
organization. It is recommended that the affiliation <em>JSON
|
||
string</em> be the formal affiliation name. For example, the affiliation
|
||
for the IOCCC would be:</p>
|
||
<pre><code>The International Obfuscared C Code Contest</code></pre>
|
||
<p>If the author wishes to not specify an affiliation, or if the
|
||
affiliation is unknown, they should use the <em>JSON null</em> as the
|
||
<em>JSON value</em> of this <em>JSON member</em>. For example:</p>
|
||
<div class="sourceCode" id="cb100"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb100-1"><a href="#cb100-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"affiliation"</span> <span class="er">:</span> <span class="er">null,</span></span></code></pre></div>
|
||
<p>NOTE: The <em>JSON null</em> is <strong>NOT</strong> enclosed in
|
||
quotes!</p>
|
||
<h5 id="winning_entry_set">winning_entry_set</h5>
|
||
<h5 id="entry_id">entry_id</h5>
|
||
<div class="sourceCode" id="cb101"><pre
|
||
class="sourceCode json"><code class="sourceCode json"><span id="cb101-1"><a href="#cb101-1" aria-hidden="true" tabindex="-1"></a> <span class="er">"winning_entry_set"</span> <span class="er">:</span> <span class="ot">[</span></span>
|
||
<span id="cb101-2"><a href="#cb101-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2012_endoh1"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb101-3"><a href="#cb101-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2012_endoh2"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb101-4"><a href="#cb101-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2013_endoh1"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb101-5"><a href="#cb101-5" aria-hidden="true" tabindex="-1"></a><span class="er">...</span></span>
|
||
<span id="cb101-6"><a href="#cb101-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2020_endoh1"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb101-7"><a href="#cb101-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2020_endoh2"</span> <span class="fu">}</span><span class="ot">,</span></span>
|
||
<span id="cb101-8"><a href="#cb101-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span> <span class="dt">"entry_id"</span> <span class="fu">:</span> <span class="st">"2020_endoh3"</span> <span class="fu">}</span></span>
|
||
<span id="cb101-9"><a href="#cb101-9" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span></span></code></pre></div>
|
||
<p>The <code>winning_entry_set</code> <em>JSON member</em> holds
|
||
<em>JSON array</em> containing one or more <code>entry_id</code> _JSON
|
||
member_s.</p>
|
||
<p>There <strong>MUST</strong> be one and only one
|
||
<code>winning_entry_set</code> and the <em>JSON value</em>
|
||
<strong>MUST</strong> be a non-empty <em>JSON array</em>. Each value in
|
||
that <em>JSON array</em> <strong>MUST</strong> must contain a <em>JSON
|
||
member</em> whose <em>JSON name</em> <strong>MUST</strong> be
|
||
“<em>entry_id</em>” and those <em>JSON value</em> is a valid winner
|
||
ID.</p>
|
||
<p>Due to the nature of the <em>So-called JSON spec</em>, the last value
|
||
of the <code>winning_entry_set</code> <em>JSON array</em> cannot end in
|
||
a comma (<em>,</em>).</p>
|
||
<p>See <a href="#faq6_7">FAQ 6.7</a> for information about winner
|
||
ids.</p>
|
||
<p>See <a href="#faq5_5">FAQ 5.5</a> for information about how to update
|
||
and/or correct IOCCC author information.</p>
|
||
<h3
|
||
id="faq-6.7-what-is-a-entry_id"><a name="faq6_7"></a><a name="author_json"></a>FAQ
|
||
6.7: What is a entry_id?</h3>
|
||
<p>A <code>entry_id</code> is a string that identifies a winning entry
|
||
of the IOCCC.</p>
|
||
<p>A <code>entry_id</code> is a 4-digit year, followed by an underscore,
|
||
followed by a directory name.</p>
|
||
<p>For example, the <code>entry_id</code> associated with Cody Boone
|
||
Ferguson’s 2nd winning IOCCC entry of 2020 is found under the following
|
||
directory:</p>
|
||
<pre><code>2020/ferguson2</code></pre>
|
||
<p>The <code>entry_id</code> for that winning entry is:</p>
|
||
<pre><code>2020_ferguson2</code></pre>
|
||
<h3
|
||
id="faq-6.8-what-is-the-purpose-of-the-.top-.year-and-.path-files"><a name="faq6_8"></a>FAQ
|
||
6.8: What is the purpose of the .top, .year and .path files?</h3>
|
||
<p>The <a href="/.top">.top</a> file resides at the top directory. This
|
||
file contains the complete list of IOCCC years.</p>
|
||
<p>Under each IOCCC year. one will find a <code>.year</code> file. These
|
||
files contain directory paths from the top directory, of the IOCCC entry
|
||
directories for a given year. For example, see the <a
|
||
href="/.1984/.year">1984/.year</a> file.</p>
|
||
<p>Under each IOCCC entry directory, you will find a <code>.path</code>
|
||
file. These files contain the directory path from the top directory. For
|
||
example see <a
|
||
href="/1984/anonymous/.path">1984/anonymous/.path</a>.</p>
|
||
<p>The .top, .year and .path files are generated from the top level
|
||
Makefile, by:</p>
|
||
<div class="sourceCode" id="cb104"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb104-1"><a href="#cb104-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> genpath</span></code></pre></div>
|
||
<h3
|
||
id="faq-6.9-what-is-the-current-meaning-of-the-ioccc-terms-author-entry-and-submission"><a name="faq6_9"></a>FAQ
|
||
6.9: What is the current meaning of the IOCCC terms Author, Entry, and
|
||
Submission?</h3>
|
||
<p>The IOCCC is now attempting to use the following terms:</p>
|
||
<ul>
|
||
<li>Author</li>
|
||
</ul>
|
||
<p>An <em>author</em> is someone who has submitted an entry that has won
|
||
the IOCCC.</p>
|
||
<p>An entry can have more than one authors. A number of authors have
|
||
submitted entries that have won the IOCCC, sometimes in the same IOCCC
|
||
contest year.</p>
|
||
<p><strong>An apology for being inconsistent</strong>: In the past, the
|
||
IOCCC used the term <em>winner</em> to refer to what is now an
|
||
<em>author</em>. In a number of historical cases, such as old rules and
|
||
old guidelines, terms such as <em>winner</em> may still be found.
|
||
Moreover, out of habit, the IOCCC judges sometimes use old names such as
|
||
<em>winner</em> when they should use <em>author</em>. Sorry (tm Canada)!
|
||
:-)</p>
|
||
<ul>
|
||
<li>Entry</li>
|
||
</ul>
|
||
<p>An <em>entry</em> is a submission that won the IOCCC.</p>
|
||
<p>An <em>entry</em> has one or more <em>authors</em>.</p>
|
||
<p>An <em>entry</em> includes all of the files needed to compile it,
|
||
plus sample input files, a <code>Makefile</code>, an
|
||
<code>.entry.json</code> file describing the entry, a compressed tarball
|
||
containing all of files in the entry, etc. Under the IOCCC tree, an
|
||
<em>entry</em> that win the IOCCC in year <em>YYYY</em> is located under
|
||
the directory <code>YYYY/entry</code>.</p>
|
||
<p><strong>An apology for being inconsistent</strong>: In the past, the
|
||
IOCCC used the term <em>winner</em> to refer to what is now an
|
||
<em>entry</em>. In a number of historical cases, such as old rules and
|
||
old guidelines, terms such as <em>winner</em> may still be found.
|
||
Moreover, out of habit, the IOCCC judges sometimes use old names such as
|
||
<em>winner</em> when they should use <em>entry</em>. Sorry (tm Canada)!
|
||
:-)</p>
|
||
<ul>
|
||
<li>Submission</li>
|
||
</ul>
|
||
<p>A <em>submission</em> is something given to the IOCCC judges for
|
||
consideration when the IOCCC is open.</p>
|
||
<p>When the IOCCC is open for submissions, those who register to enter
|
||
the IOCCC may use the <a
|
||
href="https://github.com/ioccc-src/mkiocccentry">mkiocccentry tool</a>
|
||
to package their code into a compressed tarball that may be uploaded to
|
||
the <a href="https://submit.ioccc.org">IOCCC submit server</a>. This
|
||
compressed tarball is formatted in such a way that the IOCCC judges do
|
||
not see who wrote the code.</p>
|
||
<p>A <em>submission</em> that the IOCCC judges deem to have won the
|
||
IOCCC becomes an <em>entry</em>. Only then do the IOCCC judges look into
|
||
the special JSON file to discover who the <em>author</em>(s) are.</p>
|
||
<p><strong>An apology for being inconsistent</strong>: In the past, the
|
||
IOCCC used the term <em>entry</em> to refer to what is now an
|
||
<em>submission</em>. In a number of historical cases, such as old rules
|
||
and old guidelines, terms such as <em>entry</em> may still be found.
|
||
Moreover, out of habit, the IOCCC judges sometimes use old names such as
|
||
<em>entry</em> when they should use <em>submission</em>. Sorry (tm
|
||
Canada)! :-)</p>
|
||
<h3
|
||
id="faq-6.10-how-does-someone-make-a-change-to-a-file-and-submit-that-change-as-a-github-pull-request"><a name="faq6_10"></a>FAQ
|
||
6.10: How does someone make a change to a file and submit that change as
|
||
a GitHub pull request?</h3>
|
||
<p>First, if you do not already have a GitHub account or you have not
|
||
installed an ssh key to your account you must do so. For this we will
|
||
assume you do not have a GitHub account. For the steps following
|
||
creating a GitHub account you will have to be logged into your
|
||
account.</p>
|
||
<p>To help you out here is a navigation menu in this FAQ entry:</p>
|
||
<ul>
|
||
<li><a href="#creating-a-github-account">Creating a GitHub
|
||
account</a></li>
|
||
<li><a href="#installing-an-ssh-key">Installing an ssh key to
|
||
GitHub</a></li>
|
||
<li><a href="#forking-the-temp-test-ioccc-repo">Forking the
|
||
temp-test-ioccc repo</a></li>
|
||
<li><a href="#cloning-the-temp-test-ioccc-repo">Cloning the
|
||
temp-test-ioccc repo</a></li>
|
||
<li><a href="#making-changes-fixes-etc">Making changes, fixes
|
||
etc.</a></li>
|
||
<li><a href="#committing-your-changes">Committing your changes</a></li>
|
||
<li><a href="#opening-a-pull-request">Opening a pull request</a></li>
|
||
<li><a href="#what-to-do-after-a-merge">What to do after a
|
||
merge</a></li>
|
||
</ul>
|
||
<h4 id="creating-a-github-account">Creating a GitHub account</h4>
|
||
<p>Go to <a href="https://github.com/">GitHub</a> and click on ‘Sign
|
||
up’. Follow the instructions. Once you’ve completed this task make sure
|
||
you log in to GitHub.</p>
|
||
<h4 id="installing-an-ssh-key-to-github">Installing an ssh key to
|
||
GitHub</h4>
|
||
<p>Assuming you do not have an ssh key you should go to the command
|
||
prompt and type (if you already have one and are okay using it for
|
||
GitHub you can use that one):</p>
|
||
<div class="sourceCode" id="cb105"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb105-1"><a href="#cb105-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ssh-keygen</span> <span class="at">-t</span> rsa <span class="at">-b</span> 4096 <span class="at">-C</span> <span class="st">"luser@example.com"</span></span></code></pre></div>
|
||
<p>where <code>luser@example.com</code> is the email you want associated
|
||
with your key. Follow the instructions. It will tell you the key
|
||
files.</p>
|
||
<p>Once you have an ssh key you need to go to your <a
|
||
href="https://github.com/settings/profile">account settings</a>. Once
|
||
there, in the menu on the left you should see the item <em>SSH and GPG
|
||
keys</em>. Click that and then click (on the right side) the button that
|
||
says <em>New SSH key</em>. You will see that you have to specify a
|
||
title, the key type and the PUBLIC key. Put whatever title you want and
|
||
keep the key type as <em>Authentication Key</em>. Now you need to put
|
||
the PUBLIC key in.</p>
|
||
<p>If you used an rsa key the default file will likely be found in:
|
||
<code>~/.ssh/id_rsa.pub</code>. If you used a different algorithm the
|
||
file name will be different. For instance if you used
|
||
<code>ed25519</code> the default PUBLIC key file would be
|
||
<code>~/.ssh/id_ed25519</code>. If, like some people do, you have a
|
||
separate key for GitHub, it could be anything you wish, as long as it’s
|
||
in <code>~/.ssh</code>. For instance it might be
|
||
<code>~/.ssh/github.pub</code>.</p>
|
||
<p>Whatever the key file is, copy the contents and paste it into the
|
||
GitHub field labelled <em>Key</em>. Once you have done so click on
|
||
<em>Add SSH key</em>.</p>
|
||
<h4 id="forking-the-temp-test-ioccc-repo">Forking the temp-test-ioccc
|
||
repo</h4>
|
||
<p>Open in your browser the link: <a
|
||
href="https://github.com/ioccc-src/temp-test-ioccc/fork"
|
||
class="uri">https://github.com/ioccc-src/temp-test-ioccc/fork</a>. You
|
||
now should follow the instructions in forking the repo.</p>
|
||
<h4 id="cloning-the-temp-test-ioccc-repo">Cloning the temp-test-ioccc
|
||
repo</h4>
|
||
<p>Once you have forked the repo you are ready to clone it to your
|
||
system. For instance Cody Boone Ferguson has the GitHub handle
|
||
<em>xexyl</em> so he would type in:</p>
|
||
<div class="sourceCode" id="cb106"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb106-1"><a href="#cb106-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> clone https://github.com/xexyl/temp-test-ioccc <span class="pp">[</span><span class="ss">target_dir</span><span class="pp">]</span></span></code></pre></div>
|
||
<p>Once that is completed you will need to change to that directory. The
|
||
default directory would be the name of the repo but if you specified a
|
||
target directory it will be that. For instance using the above example
|
||
you might do:</p>
|
||
<div class="sourceCode" id="cb107"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb107-1"><a href="#cb107-1" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> temp-test-ioccc</span></code></pre></div>
|
||
<p>You’re ready to make your changes now!</p>
|
||
<h4 id="making-changes-fixes-etc.">Making changes, fixes etc.</h4>
|
||
<p>Here you must use your wits, knowledge, creativity and whatever else
|
||
you have. Let’s say that Cody wants to update his file <a
|
||
href="/2020/ferguson1/play.sh">/2020/ferguson1/play.sh</a> script. He
|
||
would open it in his editor of choice (in his case vim) and make the
|
||
changes. He would then make sure (as there is a last updated date) to
|
||
update the last updated date. For instance he might add the
|
||
following:</p>
|
||
<blockquote>
|
||
<p>BTW: did you know that some people believe in snake human hybrids?
|
||
It’s true! See http://www.macroevolution.net/snake-human-hybrids.html
|
||
and have a laugh, shock or an exercise in sibilance!</p>
|
||
</blockquote>
|
||
<p>Then, assuming that the date is 1 March 2024, he would update the
|
||
line that starts with <code># Last updated:</code> to refer to
|
||
<code>01 March 2024</code> rather than what it is now (at the time of
|
||
writing this), <code>15 April 2023</code>.</p>
|
||
<p>But what if he wanted to add a file? He’d create the file and then
|
||
type:</p>
|
||
<div class="sourceCode" id="cb108"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb108-1"><a href="#cb108-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> add foo</span></code></pre></div>
|
||
<p>where <em>foo</em> is the file to add.</p>
|
||
<p>When he’s ready to make a commit he would need to create a new branch
|
||
for the pull request.</p>
|
||
<h4 id="committing-your-changes">Committing your changes</h4>
|
||
<p>First, as an aside, if this is your first pull request (which we
|
||
assume is if you’re reading this :-) ) you need to make sure that you
|
||
can push changes to GitHub with your ssh key. To do this you need to
|
||
do:</p>
|
||
<div class="sourceCode" id="cb109"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb109-1"><a href="#cb109-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ssh</span> <span class="at">-T</span> git@github.com</span></code></pre></div>
|
||
<p>Cody would see:</p>
|
||
<blockquote>
|
||
<p>Hi xexyl! You’ve successfully authenticated, but GitHub does not
|
||
provide shell access.</p>
|
||
</blockquote>
|
||
<p>Now, assuming that the forked repo is <a
|
||
href="https://github.com/xexyl/temp-test-ioccc"
|
||
class="uri">https://github.com/xexyl/temp-test-ioccc</a>, you’d
|
||
type:</p>
|
||
<div class="sourceCode" id="cb110"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb110-1"><a href="#cb110-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> remote set-url origin git@github.com:xexyl/temp-test-ioccc.git</span></code></pre></div>
|
||
<p>Now you’d be ready to make your commits.</p>
|
||
<p>Before doing anything else, however, a new branch needs to be
|
||
created. Continuing the example above for <a
|
||
href="/2020/ferguson1/play.sh">2020/ferguson1/play.sh</a>, it might be
|
||
that:</p>
|
||
<div class="sourceCode" id="cb111"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb111-1"><a href="#cb111-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> checkout <span class="at">-B</span> human-snakes</span></code></pre></div>
|
||
<p>This would change the branch to the newly created branch
|
||
<code>human-snakes</code> branch. Now Cody could commit the changes:</p>
|
||
<div class="sourceCode" id="cb112"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb112-1"><a href="#cb112-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> commit play.sh <span class="co"># if specifying specific files</span></span>
|
||
<span id="cb112-2"><a href="#cb112-2" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> commit <span class="at">-a</span> <span class="co"># if committing everything</span></span></code></pre></div>
|
||
<p>He could also have done:</p>
|
||
<div class="sourceCode" id="cb113"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb113-1"><a href="#cb113-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> add play.sh</span>
|
||
<span id="cb113-2"><a href="#cb113-2" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> commit</span></code></pre></div>
|
||
<p>In any case this would open an editor (in his case vim) to write a
|
||
commit log. It is recommended that the first line is <=51 chars and
|
||
the next line is blank. Then if necessary add a description for the log.
|
||
For instance the above might warrant the log:</p>
|
||
<pre><code>Add fun link to 2020/ferguson1/play.sh
|
||
|
||
Did you know some people believe in snake human hybrids? I added a link to the
|
||
script that discusses this and gives supposed examples.</code></pre>
|
||
<p>Now a pull request has to be opened.</p>
|
||
<h4 id="opening-a-pull-request">Opening a pull request</h4>
|
||
<p>To do this depends on the branch name. Assuming the branch from
|
||
above, <code>human-snakes</code>, you would type:</p>
|
||
<div class="sourceCode" id="cb115"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb115-1"><a href="#cb115-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> push <span class="at">--set-upstream</span> origin human-snakes</span></code></pre></div>
|
||
<p>This might show:</p>
|
||
<pre><code>Enumerating objects: 9, done.
|
||
Counting objects: 100% (9/9), done.
|
||
Delta compression using up to 10 threads
|
||
Compressing objects: 100% (5/5), done.
|
||
Writing objects: 100% (5/5), 739 bytes | 147.00 KiB/s, done.
|
||
Total 5 (delta 4), reused 0 (delta 0), pack-reused 0
|
||
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
|
||
remote:
|
||
remote: Create a pull request for 'human-snakes' on GitHub by visiting:
|
||
remote: https://github.com/xexyl/temp-test-ioccc/pull/new/human-snakes
|
||
remote:
|
||
To github.com:xexyl/temp-test-ioccc.git
|
||
* [new branch] human-snakes -> human-snakes
|
||
branch 'human-snakes' set up to track 'origin/human-snakes'.</code></pre>
|
||
<p>The link referred to above would then be opened to open a pull
|
||
request. Just follow the instructions at this point. If however it does
|
||
not show a link it is likely because the branch already exists in your
|
||
GitHub account (for the repo). In this case you can open the link: <a
|
||
href="https://github.com/ioccc-src/temp-test-ioccc/pulls"
|
||
class="uri">https://github.com/ioccc-src/temp-test-ioccc/pulls</a> which
|
||
might show something like:</p>
|
||
<pre><code>xexyl:human-snakes had recent pushes 1 minute ago</code></pre>
|
||
<p>and to the right of it you would see a button that says <em>Compare
|
||
& pull request</em> which you could click on. Do that and follow the
|
||
instructions.</p>
|
||
<p>An important note is if you have more than one pull request opened
|
||
it’ll only show the branch name as the summary. You should in that case
|
||
copy paste the log you put in into the website. For instance the line
|
||
(on the website) <em>Add a title</em> could have:</p>
|
||
<blockquote>
|
||
<p>Add fun link to 2020/ferguson1/play.sh</p>
|
||
</blockquote>
|
||
<p>and then the text field that is labelled <em>Add a description</em>
|
||
would have:</p>
|
||
<blockquote>
|
||
<p>Did you know some people believe in snake human hybrids? I added a
|
||
link to the script that discusses this and gives supposed examples.</p>
|
||
</blockquote>
|
||
<p>Once you’ve done this you should click on <em>Create pull
|
||
request</em>.</p>
|
||
<h4 id="what-to-do-after-a-merge">What to do after a merge</h4>
|
||
<p>When the judges have merged the pull request you now need to make
|
||
sure your fork has the merge. To do this from the command line, assuming
|
||
the fork in the above example, you would type:</p>
|
||
<div class="sourceCode" id="cb118"><pre
|
||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb118-1"><a href="#cb118-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> checkout master <span class="kw">&&</span> <span class="fu">git</span> pull https://github.com/ioccc-src/temp-test-ioccc.git master <span class="kw">&&</span> <span class="fu">git</span> push origin master</span></code></pre></div>
|
||
<p>This will merge your pull request to your fork.</p>
|
||
|
||
<!-- 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 -->
|
||
|
||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||
|
||
</div>
|
||
|
||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||
|
||
</div>
|
||
|
||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||
|
||
<div class="footer">
|
||
<hr>
|
||
<h2>Coda</h2>
|
||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2Flocation.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 -->
|