build index.html for all winners
Updated manifest as per recent file changes. Updated winner `.winner.json` to reflect the manifest changes. Added [bin/all_run.sh](bin/all_run.sh) tool to run a command over all winning entries. These tools had slight improvements in the help usage message: * bin/gen-author.sh VERSION="1.3.1 2024-01-16" * bin/gen-inventory.sh VERSION="1.0.1 2024-01-16" * bin/pandoc_wrapper.sh VERSION="1.3.1 2024-01-16" * bin/subst.default.sh VERSION="1.1.1 2024-01-16" * bin/subst.winner-index.sh VERSION="1.1.1 2024-01-16" The `bin/readme2index.sh` tool was improved so that if the `index.html` file exists and the tool forms the exact same content, then the file `index.html` file is NOT touched. * bin/readme2index.sh VERSION="1.1 2024-01-16" We used the following command to generate `index.html` files for all winning entries: ```sh bin/all_run.sh -v 3 bin/readme2index.sh ``` NOTE: We have not (yet) built HTML files above the winner directory level (e.g., no year level nor top level HTML), nor have be built non-index HTML files for winners. NOTE: By default we are running `pandoc(1)` with: ``` --fail-if-warnings=true ``` This means that any problems with markdown to HTML generates an error. This is done to be sure that the HTML conversion is clean. We had to fix the following `README.md` files: * `2000/rince/README.md` The reference [^2] was never used. We made a guess that [^2] applies to the same spot as [^1]. Perhaps there is a better spot where [^2] applies? NOTE: For every reference, there MUST be some place where that reference is used. * 2012/vik/README.md The string "$...$" is assumed to be a TeX encoded string. NOTE: Every "$..$" needs to be backslashed as in "\$..\$". * 2018/burton1/README.md The reference [2] was duplicated. We changed the second [2] to [3]. NOTE: Every reference needs to have a unique number. * 2020/carlini/README.md The string "$...$" is assumed to be a TeX encoded string. NOTE: Every "$..$" needs to be backslashed as in "\$..\$". We also found 2 errors in the `author/author_handle.json` file set: * author/Anonymous_2001.json The `author/Anonymous_2001.json` file was missing. * author/Jari_Arkko.json The winner ID for `1989_jar.1` had a typo.
This commit is contained in:
1 parent
893cd915b6
commit
c1466f5165
350 files changed
+95242
-4217
No files matched your search
+281
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,293 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/anonymous/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 anonymous</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: anonymous winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,anonymous,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/anonymous</title>
|
||||
<meta name="description" content="2004 IOCCC winner anonymous">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, anonymous">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 anonymous</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/anonymous</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.first.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fanonymous%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/anonymous/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left Disabled" href="#">first entry</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../arachnid/index.html">arachnid →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.first.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Anonymous_2004">Anonymous
|
||||
2004</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#SG">SG</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./anonymous</span> <span class="st">'foo'</span> <span class="op">></span> bar.pgm</span></code></pre></div>
|
||||
<p>Now open the output using your favourite <a
|
||||
href="https://en.wikipedia.org/wiki/Netpbm#PGM_example">pgm</a> viewer.
|
||||
If you don’t have a <code>pgm</code> viewer then we suggest the <a
|
||||
href="https://netpbm.sourceforge.net">netpbm toolkit</a> to convert the
|
||||
image to a graphics format that you can view. Most graphical web
|
||||
browsers can display PNG or JPEG images.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./anonymous</span> <span class="st">"ash nazg durhbatuluhk, ash nazg gimbatul, </span><span class="dt">\</span></span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="st"> ash nazg thrakatuluhk, agh burzhumh-ishi krimpatul."</span> <span class="op">></span>ring.pgm</span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./anonymous</span> <span class="st">"My Precious. Yes, my Precious."</span> <span class="op">></span> precious.pgm</span></code></pre></div>
|
||||
<p>NOTE: technically the text is supposed to be in all lower case but
|
||||
the above still works for demonstration purposes.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Did you know that in the first edition of The Hobbit Gollum was
|
||||
willing to give up the ring? It was not the Ruling Ring, the One Ring,
|
||||
the Ring of Power or anything like that: it was simply a literary device
|
||||
that could make one invisible. When Bilbo won the famous riddle game
|
||||
Gollum went to fetch the Ring - not to kill and eat Bilbo but to give it
|
||||
to him! But Bilbo had already found it just like in the later editions.
|
||||
Gollum profusely apologised and begged for forgiveness. Bilbo told him
|
||||
never mind because he would have had it anyway. But he’d let him off on
|
||||
one condition: that he show him the way out. It was at this point that
|
||||
Bilbo slipped the ring on and Gollum saw him vanish and understood that
|
||||
he already found it. But there was no call of thief and no hatred of
|
||||
Bilbo.</p>
|
||||
<p>If you want to read the first edition they reprinted it some years
|
||||
back: <code>The Hobbit Facsimile First Edition</code>. The details are
|
||||
also discussed in History of Middle-earth [HoMe] VI, <a
|
||||
href="https://tolkiengateway.net/wiki/The_Return_of_the_Shadow">The
|
||||
Return of the Shadow</a>, part one of the history of The Lord of the
|
||||
Rings of a twelve volume set - as well as in <a
|
||||
href="https://tolkiengateway.net/wiki/The_History_of_The_Hobbit">The
|
||||
History of the Hobbit</a>.</p>
|
||||
<p>p.s. Frodo lives!</p>
|
||||
<h3 id="an-important-aside--">An important aside :-)</h3>
|
||||
<p>BTW: if you haven’t read <a
|
||||
href="https://en.wikipedia.org/wiki/The_Lord_of_the_Rings">The Lord of
|
||||
the Rings</a> what are you waiting for? :-) You’ll find out the source
|
||||
of the text above though you’ll see that there are some circumflexes
|
||||
missing! That’s okay though due to I/O of the entry and in earlier
|
||||
drafts sometimes the û with an umlaut had no umlaut but H after the
|
||||
<code>u</code> it. The real text is:</p>
|
||||
<blockquote>
|
||||
<p>Ash nazg durbatulûk, ash nazg gimbatul, ash nazg thrakatulûk, agh
|
||||
burzum-ishi krimpatul.</p>
|
||||
</blockquote>
|
||||
<p>which when translated from <a
|
||||
href="https://www.glyphweb.com/arda/b/blackspeech.html">Black Speech</a>
|
||||
means:</p>
|
||||
<blockquote>
|
||||
<p><a href="https://www.glyphweb.com/arda/o/onering.html">One Ring</a>
|
||||
to rule them all, <a
|
||||
href="https://www.glyphweb.com/arda/o/onering.html">One Ring</a> to find
|
||||
them,<br />
|
||||
<a href="https://www.glyphweb.com/arda/o/onering.html">One Ring</a> to
|
||||
bring them all and in the darkness bind them.</p>
|
||||
</blockquote>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program takes a single command line argument, transcribes the
|
||||
argument text into Tolkien’s Elvish letters, and writes the
|
||||
transcription to standard output as a <a
|
||||
href="https://en.wikipedia.org/wiki/Netpbm#PGM_example">portable
|
||||
graymap</a> (PGM) file.</p>
|
||||
<p>The specific transcription mode is the <a
|
||||
href="https://www.glyphweb.com/arda/b/blackspeech.html">Black Speech</a>
|
||||
(<a href="https://www.glyphweb.com/arda/t/tengwar.html">Tengwar
|
||||
mode</a>), as used in the inscription on the <a
|
||||
href="https://www.glyphweb.com/arda/o/onering.html">One Ring</a>. The
|
||||
program handles the following digraphs:</p>
|
||||
<ul>
|
||||
<li><code>gh</code>, <code>sh</code>, <code>th</code>: the corresponding
|
||||
<a href="https://www.glyphweb.com/arda/t/tengwar.html">tengwar</a> are
|
||||
output for these specific sounds.</li>
|
||||
<li><code>mh</code> denotes the full <a
|
||||
href="https://www.glyphweb.com/arda/t/tengwar.html">tengwa</a> for
|
||||
<code>[m]</code>; <code>m</code> by itself means a horizontal bar above
|
||||
the next letter.</li>
|
||||
<li><code>rh</code> denotes the <code>[r]</code> <a
|
||||
href="https://www.glyphweb.com/arda/t/tengwar.html">tengwa</a>.</li>
|
||||
<li><code>uh</code> denotes the <a
|
||||
href="https://www.glyphweb.com/arda/t/tehtar.php">tehta</a> for long
|
||||
vowel <code>[u:]</code>.</li>
|
||||
<li><code>zh</code> selects the up-reaching <a
|
||||
href="https://www.glyphweb.com/arda/t/tengwar.html">tengwa</a> for
|
||||
<code>[z]</code>, while <code>z</code> selects the down-reaching
|
||||
one.</li>
|
||||
</ul>
|
||||
<p>Punctuation marks other than commas and periods are ignored, as are
|
||||
whitespace characters. In addition, the argument text must be entirely
|
||||
in lower case.</p>
|
||||
<p>The following command thus writes a rendering of the <a
|
||||
href="https://www.glyphweb.com/arda/r/ringinscription.html">Ring
|
||||
inscription</a> to the file <code>ring.pgm</code>:</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="ex">./anonymous</span> <span class="st">"ash nazg durhbatuluhk, ash nazg gimbatul, </span><span class="dt">\</span></span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="st"> ash nazg thrakatuluhk, agh burzhumh-ishi krimpatul."</span> <span class="op">></span>ring.pgm</span></code></pre></div>
|
||||
<p>The source code assumes the ASCII character set; also, due to space
|
||||
constraints, the program uses rather inefficient algorithms, so it may
|
||||
waste a lot of time and space even when rendering moderately long
|
||||
strings.</p>
|
||||
<p>The code contains a vector font which was derived by toying with <a
|
||||
href="https://alboin.fi">Harri Perälä</a>’s <a
|
||||
href="https://alboin.fi/tengwar.htm">Tengwar Cursive font</a>.
|
||||
Currently, only the glyphs used in the <a
|
||||
href="https://www.glyphweb.com/arda/r/ringinscription.html">Ring
|
||||
inscription</a> are included in the font.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004anonymous"><a name="inventory"></a>Inventory
|
||||
for 2004/anonymous</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/anonymous/anonymous.c">anonymous.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/anonymous/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/anonymous/anonymous.orig.c">anonymous.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="2004_anonymous.tar.bz2">2004_anonymous.tar.bz2</a> -
|
||||
download winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/anonymous/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/anonymous/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/anonymous/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fanonymous%2Findex.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 -->
|
||||
+223
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,235 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/arachnid/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 arachnid</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: arachnid winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,arachnid,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/arachnid</title>
|
||||
<meta name="description" content="2004 IOCCC winner arachnid">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, arachnid">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 arachnid</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/arachnid</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Farachnid%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/arachnid/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../anonymous/index.html">← anonymous</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../burley/index.html">burley →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Nick_Johnson">Nick Johnson</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#NZ">NZ</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<p>There is an alt version for rogue players, vi(m) users and Dvorak
|
||||
typist (i.e. those who need <code>hljk</code> for moving left, right,
|
||||
down and up. See <a href="#alternate-code">alternate code</a> below.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./arachnid</span> <span class="pp">[</span><span class="ss">mazefile</span><span class="pp">]</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./arachnid</span> arachnid.info</span></code></pre></div>
|
||||
<p>and then try:</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="ex">./arachnid</span> arachnid.c</span></code></pre></div>
|
||||
<p>Navigation is through the use of the <code>wasd</code> inverted-T
|
||||
formation on QWERTY keyboards. Rogue players, vi users, and Dvorak
|
||||
typists are invited to get lost (or use the alt version)!</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>If you don’t like the <code>wasd</code> movement keys you can try the
|
||||
vi(m) movement keys instead.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>arachnid.alt</code> as you would <code>arachnid</code>
|
||||
above.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The fun part comes when you realize that the maze scrolls. The
|
||||
overall visual effect is quite pleasing (at least on some displays),
|
||||
and, well, it’s a lot of fun.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program accepts ASCII formatted mazes as input, and renders them
|
||||
on screen for the user to explore, complete with Line Of Sight - you
|
||||
cannot see parts of the maze your avatar (the <code>@</code>) could not
|
||||
have seen.</p>
|
||||
<p>The maze files will be interpreted with spaces <code>' '</code> as
|
||||
gaps, tilde <code>~</code> symbols (if any) as exits (which get
|
||||
represented as a <a href="https://www.nethack.org">NetHack</a> style
|
||||
<code><</code> once loaded), and any other characters as walls.</p>
|
||||
<p>Feed the program its own source for a default maze. Running it with
|
||||
no command line parameters will do this. In a nice symmetry, the
|
||||
character constant <code>~</code> that recognises exits to input mazes
|
||||
itself forms the exit to the default maze. Another maze, <a
|
||||
href="arachnid.txt">arachnid.txt</a> has also been provided. This maze
|
||||
is 255x255, about the largest maze supported, for the particularly
|
||||
insane maze explorers out there.</p>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<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="ex">./arachnid</span> <span class="pp">[</span><span class="ss">mazefile</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>You can explore the maze using the
|
||||
<code>w</code>,<code>a</code>,<code>s</code>, and <code>d</code>
|
||||
keys.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004arachnid"><a name="inventory"></a>Inventory
|
||||
for 2004/arachnid</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/arachnid/arachnid.c">arachnid.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/arachnid/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/arachnid/arachnid.alt.c">arachnid.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/arachnid/arachnid.orig.c">arachnid.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/arachnid/arachnid.txt">arachnid.txt</a>
|
||||
- an alternate maze</li>
|
||||
<li><a href="2004_arachnid.tar.bz2">2004_arachnid.tar.bz2</a> - download
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/arachnid/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/arachnid/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/arachnid/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Farachnid%2Findex.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 -->
|
||||
+220
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,232 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/burley/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 burley</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: burley winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,burley,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/burley</title>
|
||||
<meta name="description" content="2004 IOCCC winner burley">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, burley">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 burley</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/burley</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fburley%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/burley/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../arachnid/index.html">← arachnid</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../gavare/index.html">gavare →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Brent_Burley">Brent Burley</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#US">US</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<p>NOTE: We FORCE the use of -O0 even if someone overrides it because
|
||||
this entry will not work with it enabled.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./burley</span></span></code></pre></div>
|
||||
<p>NOTE: you need to input a number first. See judges’ remarks below for
|
||||
information on how to play.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This is a <a href="https://en.wikipedia.org/wiki/Draw_poker">draw
|
||||
poker</a> program. You start with $100. Input alternates between your
|
||||
bet and which cards to keep. Example:</p>
|
||||
<pre><code>5 <== you enter a bet of $5 (defaults to $1)
|
||||
J Q J 9 5 <== your hand is Jack of Clubs, Queen of Hearts,
|
||||
C H D S C Jack of Diamonds, 9 of Spades, 5 of Clubs
|
||||
123 <== you enter which cards you want to keep
|
||||
(enter 0 to 5 digits between 1 and 5)
|
||||
J Q J J Q <== your new hand is Jack of Clubs, Queen of Hearts,
|
||||
C H D S C Jack of Diamonds, Jack of Spaces, Queen of clubs
|
||||
$145 (45) <== Your new balance is now $145. You had a Full House
|
||||
so your payoff is 9 times your bet == 45</code></pre>
|
||||
<p>The payout is according to “Vegas rules”:</p>
|
||||
<pre><code>Straight Flush 50 times your bet
|
||||
Four of a Kind 25 times your bet
|
||||
Full House 9 times your bet
|
||||
Flush 6 times your bet
|
||||
Straight 4 times your bet
|
||||
3 of a Kind 3 times your bet
|
||||
2 Pair 2 times your bet
|
||||
Jacks or Better 1 times your bet</code></pre>
|
||||
<p>The program allows you to go into debt. However I’m sure you would
|
||||
never control-C to kill the program just because you got behind, right?
|
||||
On the other hand the program never willingly exits, so you have to
|
||||
leave even when you are ahead. :-)</p>
|
||||
<p>Can you figure out a winning betting “strategy”? Then can you modify
|
||||
the program so this “strategy” no longer works?</p>
|
||||
<p>Notice the clever use of <code>setjmp(3)</code> and
|
||||
<code>longjmp(3)</code> calls. Can you keep track of what state is being
|
||||
saved and restored?</p>
|
||||
<p>NOTE: the author talks about how it is a single statement. This might
|
||||
not be strictly true in 2023 for the fixes for it to work so you can
|
||||
look at the original file <a href="burley.orig.c">burley.orig.c</a> to
|
||||
see what is meant.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program plays draw poker. What is unusual about it is that it is
|
||||
written as a single statement – count the semicolons! (OK, there are
|
||||
really three statements if you count the variable declarations.) To keep
|
||||
things simple, I have avoided the C preprocessor and tricky statements
|
||||
such as <code>if</code>, <code>for</code>, <code>do</code>,
|
||||
<code>while</code>, <code>switch</code>, and <code>goto</code>.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004burley"><a name="inventory"></a>Inventory for
|
||||
2004/burley</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/burley/burley.c">burley.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/burley/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/burley/burley.orig.c">burley.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="2004_burley.tar.bz2">2004_burley.tar.bz2</a> - download
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/burley/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/burley/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/burley/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fburley%2Findex.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 -->
|
||||
+256
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,268 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/gavare/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 gavare</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: gavare winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,gavare,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/gavare</title>
|
||||
<meta name="description" content="2004 IOCCC winner gavare">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, gavare">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 gavare</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/gavare</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fgavare%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/gavare/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../burley/index.html">← burley</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../gavin/index.html">gavin →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Anders_Gavare">Anders Gavare</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#SE">SE</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<p>There are three alternate versions; see <a
|
||||
href="#alternate-code">alternate code</a> below for more details.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./gavare</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./gavare</span> <span class="op">></span> ioccc_ray.ppm</span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>The alt code, <a href="gavare.alt.c">gavare.alt.c</a>, allows you to
|
||||
change the size of the image as well as the anti-alias setting, when
|
||||
compiling.</p>
|
||||
<p>The author also provided <a
|
||||
href="https://gavare.se/ioccc/ioccc_gavare.c.html">on their web page for
|
||||
the entry</a> an unobfuscated version that was used during development,
|
||||
which we have included in the file <a
|
||||
href="gavare.r3.c">gavare.r3.c</a>.</p>
|
||||
<p>Finally, there’s a version, <a href="gavare.alt2.c">gavare.alt2.c</a>
|
||||
that sets binary mode on <code>stdout</code> which theoretically should
|
||||
work in Windows.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>To build the configurable and unobfuscated versions:</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> alt</span></code></pre></div>
|
||||
<p>To change the default size from 1024x768 try:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber XX=640 YY=480 alt</span></code></pre></div>
|
||||
<p>You might also wish to change the anti-alias setting:</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 AA=2 alt</span></code></pre></div>
|
||||
<p>This is not possible with the author’s version but it is with the alt
|
||||
versions (Windows - see below - and otherwise).</p>
|
||||
<p>As the Windows version will not compile on most viewers’ systems we
|
||||
do not build it with <code>make alt</code>; instead try:</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> alt2</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>gavare.alt</code>, <code>gavare.r3</code> or
|
||||
<code>gavare.alt2</code> as you would <code>gavare</code> above.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>For users of systems that distinguish between text and binary mode
|
||||
(you know who you are), add a library call that specifies binary mode
|
||||
for <code>stdout</code> as the first statement of <code>main()</code>,
|
||||
or use <code>freopen("ioccc_ray.ppm", "wb", stdout);</code> and do not
|
||||
use redirection.</p>
|
||||
<p>A freely distributable command-line version of Microsoft Visual C
|
||||
exhibits an optimizer bug when compiling this entry. Disable
|
||||
<code>/Og</code> for best results.</p>
|
||||
<p>The judges were able to figure out how to control position (in all 3
|
||||
coordinates), size, and color (to some extent) of the balls.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>It is possible to write some kinds of programs in C without using
|
||||
reserved words. For very short and trivial programs, it usually isn’t
|
||||
very hard to write a variant using no reserved words, but with this
|
||||
program I want to show that also non-trivial programs can be written
|
||||
this way. This IOCCC entry contains no reserved words (I don’t count
|
||||
<code>main</code> as a reserved word, although the compiler gives it
|
||||
special meaning) and no preprocessor directives.</p>
|
||||
<p>The program is a small <a
|
||||
href="https://en.wikipedia.org/wiki/Ray_tracing_(graphics)">ray-tracer</a>.
|
||||
The first line of the source code may be modified if you want the
|
||||
resulting image to be of some other resolution than the predefined. The
|
||||
<code>A</code> value is an anti-alias factor. Setting it to
|
||||
<code>1</code> disables the anti-aliasing feature which makes the output
|
||||
look bad, but setting it too high makes the trace take a lot more time
|
||||
to complete.</p>
|
||||
<p>The ppm image can then be viewed using an image viewer of your own
|
||||
choice. (Running the ray-tracer may take several minutes, even on fast
|
||||
machines, so be patient.)</p>
|
||||
<p>I am very much aware about the fact that I’m breaking the guidelines.
|
||||
For example, the word <code>int</code> is a reserved word and therefore
|
||||
all variable declarations are implicit. There will no doubt be
|
||||
<em>lots</em> of warnings, no matter which compiler is used. Still, the
|
||||
source code should be word- length-independent and
|
||||
endianness-independent.</p>
|
||||
<h3 id="humor">Humor</h3>
|
||||
<p>Another reason for writing code without using reserved words is that
|
||||
many text editors will make all reserved words turn BOLD when printed on
|
||||
paper. Since I care for the global environment, we shouldn’t waste any
|
||||
more laser toner, or ink, than necessary. Everyone should write C code
|
||||
with no reserved words, and our world will be a better place.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004gavare"><a name="inventory"></a>Inventory for
|
||||
2004/gavare</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/gavare.c">gavare.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/gavare.alt.c">gavare.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/gavare.alt2.c">gavare.alt2.c</a>
|
||||
- alternate alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/gavare.orig.c">gavare.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/gavare.r3.c">gavare.r3.c</a>
|
||||
- ray tracer used during development</li>
|
||||
<li><a href="2004_gavare.tar.bz2">2004_gavare.tar.bz2</a> - download
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavare/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fgavare%2Findex.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 -->
|
||||
+324
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,336 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/gavin/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 gavin</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: gavin winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,gavin,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/gavin</title>
|
||||
<meta name="description" content="2004 IOCCC winner gavin">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, gavin">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 gavin</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/gavin</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fgavin%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/gavin/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../gavare/index.html">← gavare</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../hibachi/index.html">hibachi →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Gavin_Barraclough">Gavin
|
||||
Barraclough</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#null">unknown</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<p>There is an alternate version for those who wish to use QEMU rather
|
||||
than having to reboot and rely on having a floppy drive (if you even
|
||||
remember what those are :-) ) etc. See <a
|
||||
href="#alternate-code">alternate code</a> below.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: compiled executable crashes - please help us fix
|
||||
STATUS: doesn't work with some platforms - please help us fix
|
||||
STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#2004-gavin">2004
|
||||
gavin in bugs.md</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./gavin</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>To enjoy the results (on a Linux/x86 machine) with a floppy drive
|
||||
(remember those? We do!):</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">su</span></span></code></pre></div>
|
||||
<p>Make a floppy with an ext2 filesystem (<code>mke2fs /dev/fd0</code>
|
||||
replacing <code>fd0</code> with whatever the floppy device is!), mount
|
||||
it under <code>/mnt/floppy</code> and then:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cp</span> kernel fs.tar lilo.conf boot.b /mnt/floppy</span></code></pre></div>
|
||||
<p>NOTE: If the version of your lilo is not 21.4, use the appropriate
|
||||
boot.b file.</p>
|
||||
<p>NOTE: If your floppy drive is not <code>/dev/fd0</code>, edit
|
||||
lilo.conf appropriately.</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="ex">lilo</span> <span class="at">-C</span> /mnt/floppy/lilo.conf</span></code></pre></div>
|
||||
<p>Boot from the floppy on an x86 machine with a PS/2 keyboard and
|
||||
mouse. Move the window away from the corner.</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">vi</span> gavin.c</span></code></pre></div>
|
||||
<p>Scroll up and down the file with up-arrow and down-arrow.</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">sh</span></span></code></pre></div>
|
||||
<p>You can have several shell windows:</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="fu">vi</span> README.md</span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./prim</span></span></code></pre></div>
|
||||
<p>Press and hold any key.</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This version’s main difference is that the macro <code>K</code> is
|
||||
redefined to <code>1</code> so that you can use it with
|
||||
<code>QEMU</code>.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<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">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>The use is mostly the same as <code>gavin</code> except that one
|
||||
initially executes <code>gavin.alt</code> (which <code>make alt</code>
|
||||
will do) and one will have to use <code>QEMU</code> instead. The files
|
||||
generated are the same names. See <a href="#to-use">to use</a> and <a
|
||||
href="#try">try</a> above as well as the judges’ remarks below plus <a
|
||||
href="gavin.md">gavin.md</a>.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Over the years, we’ve seen a program that immediately dumps core if
|
||||
executed on the “wrong” architectures (<a
|
||||
href="1984/mullender/README.md">1984/mullender</a>) and a program that
|
||||
dumps core after a while (<a
|
||||
href="/2001/bellard/bellard.c">2001/bellard</a>). This entry will
|
||||
happily compile and execute on most any architecture - the trick is that
|
||||
the result, to be useful, must be produced (and can only be enjoyed) on
|
||||
a particular architecture. We have not decided yet whether to disallow
|
||||
this for future contests.</p>
|
||||
<p>If you do not want to mess with a floppy and you use GRUB, see <a
|
||||
href="gavin.md">gavin.md</a>.</p>
|
||||
<p>You can put additional text files in <code>fs.tar</code> for browsing
|
||||
with vi.</p>
|
||||
<p>If you do not want to bother rebooting your computer at all, see <a
|
||||
href="http://bellard.org" class="uri">http://bellard.org</a> for QEMU
|
||||
(<a href="/winners.html#Fabrice_Bellard">Fabrice Bellard</a> is an IOCCC
|
||||
2001 winner), but your experience will be limited; use the <a
|
||||
href="#alternate-code">alternate code</a> instead. You’ll have to move
|
||||
the mouse to trigger the initial screen update.</p>
|
||||
<p>The judges were able to write a few more programs to run in this OS.
|
||||
What are the limitations for such programs?</p>
|
||||
<p>What can you do and what can you not do in such programs?</p>
|
||||
<p>The program called <code>prim</code>, written by the judges, computes
|
||||
and prints prime numbers.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This is a 32-bit multitasking operating system for x86 computers,
|
||||
with GUI and filesystem, support for loading and executing user
|
||||
applications in ELF binary format, with PS/2 mouse and keyboard drivers,
|
||||
and VESA graphics. And a command shell. And an application - a simple
|
||||
text-file viewer.</p>
|
||||
<p>The OS has ended up as a traditional monolith with one entry point
|
||||
for syscalls, with apps treated as cooperative-multitasking tasks that
|
||||
can be sent different messages (e.g. ‘initialize’, ‘key hit’, ‘render to
|
||||
buffer’) through their main entry point, and which will return control
|
||||
to the OS after having performed the necessary work. Applications are
|
||||
passed a pointer to their task structure, which is partially defined by
|
||||
the OS, and partially for the application’s own use.</p>
|
||||
<p>The program compiles into a tool to build a kernel image, so having
|
||||
built the program, the <a href="Makefile">Makefile</a> will run it,
|
||||
redirecting the output into a file called <code>kernel</code>. The
|
||||
Makefile will then proceed to build a root filesystem image. This
|
||||
involves rebuilding the program with different compiler flags, then
|
||||
building a tarball containing the resulting programs (the filesystem
|
||||
format supported by the OS is the tarball format).</p>
|
||||
<p>For further usage information see <a
|
||||
href="gavin.md">gavin.md</a>.</p>
|
||||
<p>The filenames <code>vi</code> and <code>sh</code> are significant,
|
||||
and should not be changed.</p>
|
||||
<h3 id="known-features">Known ‘features’</h3>
|
||||
<p>Known issues are really too plentiful to list.</p>
|
||||
<p>If the mouse pointer goes off the left hand side of the screen it
|
||||
will reappear on the right, and vice-versa. If it goes off the top or
|
||||
bottom, it will go and corrupt some memory.</p>
|
||||
<p>The file system is kinda optimistic about matching names, so, for
|
||||
example if you type the command <code>shell</code> into a command-line
|
||||
it will execute the program <code>sh</code> - close enough a match for
|
||||
it.</p>
|
||||
<p>The <a
|
||||
href="https://en.wikipedia.org/wiki/Executable_and_Linkable_Format">ELF
|
||||
binaries</a> are not loaded at the correct address, and their entry
|
||||
point must be the start address of the <a
|
||||
href="https://en.wikipedia.org/wiki/Code_segment">text segment</a>.</p>
|
||||
<p>The keyboard driver can cope with the basic alpha-numeric keys, but
|
||||
gets confused by fancy things like <code>shift</code> or
|
||||
<code>backspace</code>.</p>
|
||||
<p>In the text-file viewer, <code>vi</code>, the up/down and PgUp/PgDn
|
||||
keys scroll up or down by one line. There is nothing to stop you from
|
||||
scrolling above the top of the file, and pressing any other keys might
|
||||
have an undefined effect.</p>
|
||||
<p>The x86 is bootstrapped into 32bit mode in 6 instructions, with 4
|
||||
more to set up data/stack segments and a stack-pointer to allow C code
|
||||
to be run. On top of this there are also about a dozen instructions to
|
||||
switch the video card into graphics mode. All in all, a relatively tiny
|
||||
number of instructions next to the size of the C program. Also, the
|
||||
string is mostly composed of data - a Linux-esque kernel header for the
|
||||
bootloader, protected mode descriptor tables, keyboard maps, etc. (I
|
||||
should also mention that it contains mini functions to perform an x86
|
||||
<code>in</code> and <code>out</code> instruction - to allow the keyboard
|
||||
& mouse to be driven from C code).</p>
|
||||
<p>Porting to another architecture should be relatively easy* - the
|
||||
string simply needs be replaced with one containing data & code
|
||||
suitable for the new target platform. Accesses to data in the string are
|
||||
made relative to the define <code>V</code>, so these may need updating
|
||||
as appropriate (<code>0x90200</code> is the address at which a Linux
|
||||
bootloader loads an x86 kernel image).</p>
|
||||
<pre><code>\* ;-)</code></pre>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004gavin"><a name="inventory"></a>Inventory for
|
||||
2004/gavin</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavin/gavin.c">gavin.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavin/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavin/gavin.alt.c">gavin.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavin/gavin.orig.c">gavin.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="gavin.html">gavin.html</a> - author usage guide</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavin/lilo.conf">lilo.conf</a>
|
||||
- boot loader configuration</li>
|
||||
<li><a href="boot.b">boot.b</a> - boot sector</li>
|
||||
<li><a href="img/fs.tar">img/fs.tar</a> - tar of root file system</li>
|
||||
<li><a href="img/kernel">img/kernel</a> - Linux kernel x86 boot
|
||||
executable zImage</li>
|
||||
<li><a href="prim">prim</a> - prime number printing program</li>
|
||||
<li><a href="2004_gavin.tar.bz2">2004_gavin.tar.bz2</a> - download
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavin/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavin/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavin/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/gavin/gavin.md">gavin.md</a>
|
||||
- markdown source for gavin.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fgavin%2Findex.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 -->
|
||||
+409
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,421 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/hibachi/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 hibachi</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: hibachi winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,hibachi,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/hibachi</title>
|
||||
<meta name="description" content="2004 IOCCC winner hibachi">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, hibachi">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 hibachi</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/hibachi</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fhibachi%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/hibachi/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../gavin/index.html">← gavin</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../hoyle/index.html">hoyle →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Anthony_C_Howe">Anthony C.
|
||||
Howe</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#CA">CA</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> build<span class="kw">;</span> <span class="ex">./hibachi-start.sh</span> <span class="kw">&</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> build<span class="kw">;</span> <span class="ex">./hibachi-start.sh</span> <span class="kw">&</span></span></code></pre></div>
|
||||
<p>Then use your web browser to visit
|
||||
<code>http://localhost:8008/</code>. When you’re finished make sure to
|
||||
kill <code>hibachi</code>.</p>
|
||||
<p>NOTE: you must be in the <code>build</code> directory when running
|
||||
<code>hibachi</code> for this to work.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This entry violates the <a href="/2004/guidelines.txt">guidelines</a>
|
||||
in so many ways! We are not exactly sure how many organisations will be
|
||||
upset with this entry, but we are considering starting an IOCCC
|
||||
standards body just to reign in the likes of Mr Howe.</p>
|
||||
<p>This entry also has the dubious honour of being the only one to have
|
||||
been submitted with its own <a href="build/configure">configure</a>
|
||||
script.</p>
|
||||
<p>NOTE: the author states there is a tarball <code>hibachi.tgz</code>
|
||||
but this was extracted so the file does not exist here.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="readme.txt-feb-2004">README.TXT (Feb 2004)</h3>
|
||||
<p><code>Hibachi</code> is a simple, small, and (probably) very secure
|
||||
web server.</p>
|
||||
<p>There is a <code>hibachi.tgz</code> file that unpacks several support
|
||||
files and a subdirectory tree containing the documentation and examples.
|
||||
It can be viewed by:</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">tar</span> <span class="at">-zxf</span> hibachi.tgz</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="fu">lynx</span> hibachi/localhost/index.html</span></code></pre></div>
|
||||
<p>Or once <code>Hibachi</code> is running, use a web browser
|
||||
(preferably one that supports images and JavaScript, to view the
|
||||
documentation and try some of the CGI examples) to visit:
|
||||
<code>http://localhost:8008/</code>.</p>
|
||||
<h3 id="building">Building</h3>
|
||||
<p>To build just the executable:</p>
|
||||
<p>For Cygwin, FreeBSD, Linux (newer), Mac OS X:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="at">-o</span> hibachi hibachi.c</span></code></pre></div>
|
||||
<p>For Linux (older):</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">gcc</span> <span class="at">-DSHUT_WR</span><span class="op">=</span>1 <span class="at">-o</span> hibachi hibachi.c</span></code></pre></div>
|
||||
<p>For SunOS:</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">gcc</span> <span class="at">-o</span> hibachi hibachi.c <span class="at">-lnsl</span> <span class="at">-lsocket</span></span></code></pre></div>
|
||||
<p>Since some systems place socket and network functions into other
|
||||
libraries, a <a href="https://en.wikipedia.org/wiki/Autoconf">GNU
|
||||
autoconf</a> <a
|
||||
href="https://en.wikipedia.org/wiki/Configure_script">configure</a>
|
||||
script has been provided to figure out the necessary link libraries, to
|
||||
verify all the necessary headers and functions are present, and setup
|
||||
the <code>#!</code> paths for the CGI examples. In which case the
|
||||
preferred build commands are:</p>
|
||||
<pre><code>./configure [--enable-port=number]
|
||||
make</code></pre>
|
||||
<p>To start the server on the default port (8008):</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="bu">cd</span> build<span class="kw">;</span></span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./hibachi-start.sh</span> <span class="kw">&</span></span></code></pre></div>
|
||||
<p>To test the server:</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">lynx</span> http://localhost:8008/</span></code></pre></div>
|
||||
<p>To stop the server:</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="bu">kill</span> %1</span></code></pre></div>
|
||||
<h3 id="features">Features</h3>
|
||||
<ul>
|
||||
<li><p>Supports virtual hosts.</p></li>
|
||||
<li><p>Supports all <a
|
||||
href="https://en.wikipedia.org/wiki/MIME">MIME</a> types.</p></li>
|
||||
<li><p>Supports <a
|
||||
href="https://en.wikipedia.org/wiki/Common_Gateway_Interface">Common
|
||||
Gateway Interface (CGI)</a> scripts and programs.</p></li>
|
||||
<li><p>Supports multiple <code>index.*</code> file extensions and
|
||||
types:</p>
|
||||
<p>index.htm, index.html, index.php, index.pl, index.sh, index.rb,
|
||||
index.py</p></li>
|
||||
<li><p>Supports subset of <a
|
||||
href="https://datatracker.ietf.org/doc/html/rfc2616">RFC 2616</a> <a
|
||||
href="https://en.wikipedia.org/wiki/HTTP">HTTP/1.1</a> methods:
|
||||
<code>GET</code>, <code>HEAD</code>, and <code>POST</code>.</p></li>
|
||||
<li><p>Simple & straight forward configuration using environment
|
||||
variables.</p></li>
|
||||
<li><p>Portability across Unix-like environments, such as: Cygwin,
|
||||
FreeBSD, Linux, SunOS.</p></li>
|
||||
<li><p>Known to work with Lynx, Mozilla, Opera, and Internet Explorer
|
||||
web browsers.</p></li>
|
||||
<li><p>Is a dedicated process-forking server that does not use <a
|
||||
href="https://en.wikipedia.org/wiki/Inetd">inetd</a>.</p></li>
|
||||
<li><p>Is secure against <a
|
||||
href="https://cwe.mitre.org/data/definitions/23.html">relative path file
|
||||
snooping</a>.</p></li>
|
||||
<li><p>Is secure against directory searches.</p></li>
|
||||
<li><p>CGI script execution managed through Unix file
|
||||
permissions.</p></li>
|
||||
<li><p>~155 lines of source, 1940 bytes long by IOCCC 2004 rules, ~6KB
|
||||
compiled & stripped for FreeBSD.</p></li>
|
||||
<li><p>Superior & smaller than <a
|
||||
href="http://www.acme.com/software/micro_httpd/">micro_httpd</a> from <a
|
||||
href="http://www.acme.com/"
|
||||
class="uri">http://www.acme.com/</a>.</p></li>
|
||||
<li><p>And has a really cool tongue-in-cheek animated logo too.</p></li>
|
||||
</ul>
|
||||
<h3 id="comments">Comments</h3>
|
||||
<ul>
|
||||
<li><p>This code is properly indented using the <a
|
||||
href="https://wiki.c2.com/?OneTrueBraceStyle">One True Brace
|
||||
style</a>.</p></li>
|
||||
<li><p><code>HTTP/1.0 200 OK</code> ==
|
||||
<code>HTTP/1.1 200 OK CRLF Connection: close</code> ?</p></li>
|
||||
<li><p><code>getenv()</code> == <code>putenv()</code> ?</p></li>
|
||||
<li><p><code>Hibachi</code> can serve <a
|
||||
href="https://www.ioccc.org">www.ioccc.org</a>.</p></li>
|
||||
<li><p>Commented spoiler available.</p></li>
|
||||
</ul>
|
||||
<h3 id="known-issues">Known Issues</h3>
|
||||
<ul>
|
||||
<li>The <a
|
||||
href="https://en.wikipedia.org/wiki/Links_(web_browser)">links</a> text
|
||||
browser does not support RFC 2616 section 7.2.1 paragraph 3 sentence 2,
|
||||
and so fails to display responses from <code>hibachi</code>.</li>
|
||||
</ul>
|
||||
<h3 id="suggested-ioccc-categories">Suggested IOCCC Categories</h3>
|
||||
<ul>
|
||||
<li>Best Utility</li>
|
||||
<li>Best Support</li>
|
||||
<li>Most Portable Package</li>
|
||||
<li>Most Likely to Cook Apache</li>
|
||||
<li>Best Interpretation of RFC 2616</li>
|
||||
<li>Winner of The Far Too Much Free Time Award</li>
|
||||
</ul>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004hibachi"><a name="inventory"></a>Inventory for
|
||||
2004/hibachi</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/hibachi.c">src/hibachi.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/hibachi.orig.c">hibachi.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/configure">src/configure</a>
|
||||
- GNU autoconf script</li>
|
||||
<li><a href="src/localhost/index.html">src/localhost/index.html</a> -
|
||||
home page of HIBACHI web server</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/CHANGES-OBFUSCATED.TXT">src/localhost/CHANGES-OBFUSCATED.TXT</a>
|
||||
- change log for code</li>
|
||||
<li><a
|
||||
href="src/localhost/reference/rfc2616.html">src/localhost/reference/rfc2616.html</a>
|
||||
- RFC 2616 - Hypertext Transfer Protocol</li>
|
||||
<li><a
|
||||
href="src/localhost/test/perl/index.html">src/localhost/test/perl/index.html</a>
|
||||
- perl home page</li>
|
||||
<li><a
|
||||
href="src/localhost/test/php/index.php">src/localhost/test/php/index.php</a>
|
||||
- PHP making an ISO 8601:2000 calendar</li>
|
||||
<li><a
|
||||
href="src/localhost/test/ruby/index.rb">src/localhost/test/ruby/index.rb</a>
|
||||
- ruby home page</li>
|
||||
<li><a
|
||||
href="src/localhost/test/shell/test0.sh">src/localhost/test/shell/test0.sh</a>
|
||||
- POSIX shell CGI home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/hibachi-start.sh">src/hibachi-start.sh</a>
|
||||
- start the web server</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/perl/yahoo-ticker.pl">src/localhost/test/perl/yahoo-ticker.pl</a>
|
||||
- stock price fetch example in Perl</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/configure.in">src/configure.in</a>
|
||||
- authconf declarations</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/hibachi-start.sh.in">src/hibachi-start.sh.in</a>
|
||||
- hibachi-start.sh declarations</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/CHANGES-SPOILER.TXT">src/localhost/CHANGES-SPOILER.TXT</a>
|
||||
- Spoiler change log</li>
|
||||
<li><a href="2004_hibachi.tar.bz2">2004_hibachi.tar.bz2</a> - download
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a
|
||||
href="src/localhost/Img/cygwin-icon.gif">src/localhost/Img/cygwin-icon.gif</a>
|
||||
- image for home page</li>
|
||||
<li><a
|
||||
href="src/localhost/Img/freebsd.gif">src/localhost/Img/freebsd.gif</a> -
|
||||
image for home page</li>
|
||||
<li><a
|
||||
href="src/localhost/Img/hibachi-256-oc-nc-300x150.gif">src/localhost/Img/hibachi-256-oc-nc-300x150.gif</a>
|
||||
- image for home page</li>
|
||||
<li><a
|
||||
href="src/localhost/Img/hot-coal-edge-110-indent.png">src/localhost/Img/hot-coal-edge-110-indent.png</a>
|
||||
- image for home page</li>
|
||||
<li><a
|
||||
href="src/localhost/Img/logosml.256.png">src/localhost/Img/logosml.256.png</a>
|
||||
- image for home page</li>
|
||||
<li><a
|
||||
href="src/localhost/Img/php-small-trans-light.gif">src/localhost/Img/php-small-trans-light.gif</a>
|
||||
- image for home page</li>
|
||||
<li><a
|
||||
href="src/localhost/Img/powered-by-hibachi-150x75.png">src/localhost/Img/powered-by-hibachi-150x75.png</a>
|
||||
- image for home page</li>
|
||||
<li><a
|
||||
href="src/localhost/Img/rectangle_power_perl.gif">src/localhost/Img/rectangle_power_perl.gif</a>
|
||||
- image for home page</li>
|
||||
<li><a
|
||||
href="src/localhost/Img/sun_logo.gif">src/localhost/Img/sun_logo.gif</a>
|
||||
- image for home page</li>
|
||||
<li><a href="src/localhost/Img/win.gif">src/localhost/Img/win.gif</a> -
|
||||
image for home page</li>
|
||||
<li><a href="src/localhost/style.css">src/localhost/style.css</a> - CSS
|
||||
for home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/perl/yahoo-ticker.pl.in">src/localhost/test/perl/yahoo-ticker.pl.in</a>
|
||||
- stock price fetch declarations</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/php/Date.php">src/localhost/test/php/Date.php</a>
|
||||
- PHP example page support file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/php/index_php.in">src/localhost/test/php/index_php.in</a>
|
||||
- PHP example page support file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/php/info.php.in">src/localhost/test/php/info.php.in</a>
|
||||
- PHP example page support file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/php/info.php">src/localhost/test/php/info.php</a>
|
||||
- PHP example support file</li>
|
||||
<li><a
|
||||
href="src/localhost/test/php/sendform.html">src/localhost/test/php/sendform.html</a>
|
||||
- PHP example page support file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/php/sendform.php.in">src/localhost/test/php/sendform.php.in</a>
|
||||
- PHP example page support file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/php/sendform.php">src/localhost/test/php/sendform.php</a>
|
||||
- PHP example page support file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/ruby/LUHN.rb">src/localhost/test/ruby/LUHN.rb</a>
|
||||
- ruby example page support file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/ruby/index_rb.in">src/localhost/test/ruby/index_rb.in</a>
|
||||
- ruby example page support file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/shell/dump.sh">src/localhost/test/shell/dump.sh</a>
|
||||
- POSIX shell page support file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/shell/test1.sh">src/localhost/test/shell/test1.sh</a>
|
||||
- POSIX shell page support file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/localhost/test/shell/test2.sh">src/localhost/test/shell/test2.sh</a>
|
||||
- POSIX shell page support file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hibachi/src/makefile.in">src/makefile.in</a>
|
||||
- configure.in experiment that is not used</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fhibachi%2Findex.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 -->
|
||||
+209
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,221 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/hoyle/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 hoyle</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: hoyle winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,hoyle,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/hoyle</title>
|
||||
<meta name="description" content="2004 IOCCC winner hoyle">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, hoyle">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 hoyle</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/hoyle</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fhoyle%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/hoyle/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../hibachi/index.html">← hibachi</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../jdalbec/index.html">jdalbec →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Jonathan_Hoyle">Jonathan
|
||||
Hoyle</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#US">US</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./hoyle</span> point ...</span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./hoyle</span> 10 0.5</span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./hoyle</span> 1 1 1 1</span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./hoyle</span> 2 0 1 0 <span class="at">-0.001</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The obfuscation functions at several levels. Note the clever use of
|
||||
use of <code>#define</code>s. The <code>#define do(if,else)</code>, for
|
||||
example, is delightful. The code itself contains a bunch of curves
|
||||
designed to throw you off axis. :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This application graphs polynomials on a standard Cartesian
|
||||
coordinate system. Polynomials of the form
|
||||
<code>ax^0 + bx^1 + cx^2 + ...</code> are graphed by passing the
|
||||
coefficients <code>a</code>, <code>b</code>, <code>c</code>, etc. as
|
||||
double precision arguments. It allows up to 8 parameters (thus up to
|
||||
<code>x^7</code>).</p>
|
||||
<h3 id="points-of-note">Points of note:</h3>
|
||||
<ul>
|
||||
<li>the <a href="https://mathworld.wolfram.com/x-Axis.html">x axis</a>
|
||||
goes from <code>-32</code> to <code>+31</code>.</li>
|
||||
<li>the <a href="https://mathworld.wolfram.com/y-Axis.html">y axis</a>
|
||||
auto scales!</li>
|
||||
<li>up to 8 <a
|
||||
href="https://en.wikipedia.org/wiki/Coefficient">coefficients</a> may be
|
||||
passed in.</li>
|
||||
<li>the graph will determine direction and use slashes and dashes rather
|
||||
than simple block <code>X</code>s.</li>
|
||||
</ul>
|
||||
<p>For example, to graph <code>y = x^2</code>:</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="ex">./hoyle</span> 0 0 1</span></code></pre></div>
|
||||
<p>Note that:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./hoyle</span> 0 0 2</span></code></pre></div>
|
||||
<p>will produce the same graph, since the <code>y-axis</code> is auto
|
||||
scaling.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004hoyle"><a name="inventory"></a>Inventory for
|
||||
2004/hoyle</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hoyle/hoyle.c">hoyle.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hoyle/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hoyle/hoyle.orig.c">hoyle.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="2004_hoyle.tar.bz2">2004_hoyle.tar.bz2</a> - download
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hoyle/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hoyle/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/hoyle/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fhoyle%2Findex.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 -->
|
||||
+357
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,369 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/jdalbec/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 jdalbec</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: jdalbec winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,jdalbec,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/jdalbec</title>
|
||||
<meta name="description" content="2004 IOCCC winner jdalbec">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, jdalbec">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 jdalbec</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/jdalbec</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fjdalbec%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/jdalbec/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../hoyle/index.html">← hoyle</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../kopczynski/index.html">kopczynski →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#John_Dalbec">John Dalbec</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#US">US</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<p>There is an alternate version that allows one to control the number
|
||||
of numbers to print on a line. See <a href="#alternate-code">alternate
|
||||
code</a> below.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a
|
||||
href="/bugs.md#2004-jdalbec">2004 jdalbec in bugs.md</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./jdalbec</span> number ...</span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<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="ex">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This version lets you control how many numbers to show on a line
|
||||
before adding a newline as it can be harder to see when there are a lot
|
||||
of numbers. For lines that don’t end up having too many line breaks it
|
||||
also makes it easier to see which line it is on.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<p>The macro <code>Ag</code> (<a
|
||||
href="https://en.wikipedia.org/wiki/Silver">silver</a>) controls how
|
||||
many number of lines to print on a line. Set at default to 11 protons,
|
||||
salt, if you wish to make it silver, 47 (a prime) protons, 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 Ag=47 alt</span></code></pre></div>
|
||||
<p>though it might be odd to have 47 numbers on a line as it would
|
||||
defeat the purpose. :-) Or if you prefer some prime, golden irony:</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> clobber Ag=79 alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>jdalbec.alt</code> as you would <code>jdalbec</code>
|
||||
above.</p>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
<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="ex">./try.alt.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>We still aren’t sure whether or not this is a useful program, but
|
||||
it’s the first atomic fission we’ve seen in the IOCCC.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>It’s elementary!</p>
|
||||
<p>See <a href="http://mathworld.wolfram.com/LookandSaySequence.html"
|
||||
class="uri">http://mathworld.wolfram.com/LookandSaySequence.html</a> and
|
||||
<a href="http://mathworld.wolfram.com/CosmologicalTheorem.html"
|
||||
class="uri">http://mathworld.wolfram.com/CosmologicalTheorem.html</a>
|
||||
and the references listed there.</p>
|
||||
<p>Go read the web pages and come back.</p>
|
||||
<p>This program implements the <a
|
||||
href="https://mathworld.wolfram.com/LookandSaySequence.html">look-and-say
|
||||
sequence (one of the above listed links)</a> with the added feature that
|
||||
each “decay product” is automatically split into its constituent
|
||||
“elements” separated by spaces. Furthermore, arguments passed to the
|
||||
program are treated as separate elements for the purpose of computing
|
||||
further decay products. (Compare the output of <code>./jdalbec 1</code>,
|
||||
<code>./jdalbec 11</code>, and <code>./jdalbec 1 1</code>.) This allows
|
||||
output lines from the program to be passed back to the program as input
|
||||
(minus the initial generation number).</p>
|
||||
<p>The common elements are listed in <a
|
||||
href="http://mathworld.wolfram.com/CosmologicalTheorem.html">CosmologicalTheorem.html</a>.
|
||||
The non-<a
|
||||
href="https://en.wikipedia.org/wiki/Primordial_nuclide">primordial</a>
|
||||
<a href="https://en.wikipedia.org/wiki/Transuranium_element">transuranic
|
||||
elements</a> are the <a
|
||||
href="https://en.wikipedia.org/wiki/Isotope">isotopes</a> of <a
|
||||
href="https://en.wikipedia.org/wiki/Neptunium">Neptunium</a> and <a
|
||||
href="https://en.wikipedia.org/wiki/Plutonium">Plutonium</a>. Isotopes
|
||||
of a given <a
|
||||
href="https://en.wikipedia.org/wiki/Chemical_element">element</a> differ
|
||||
only in the last digit. Four common elements could also be written as
|
||||
isotopes of these two elements: <code>He=Np(2)</code>,
|
||||
<code>Li=Pu(2)</code>, <code>Ta=Np(3)</code>, <code>W=Pu(3)</code>. To
|
||||
get other isotopes, just change the last digit to a number greater than
|
||||
3.</p>
|
||||
<p>The build file runs <a href="jdalbec.c">jdalbec.c</a> through the C
|
||||
preprocessor to generate <code>jdalbec2.c</code> which is edited with
|
||||
<code>ed(1)</code> (NOTE: this was changed to <code>sed(1)</code> by the
|
||||
judges) to correct spacing problems caused by some preprocessors. (I
|
||||
know you dislike Perl, but hopefully <code>ed(1)</code> is more common
|
||||
on POSIX systems than Perl.) The build file then compiles
|
||||
<code>jdalbec2.c]</code> and removes the <code>jdalbec2.c</code>
|
||||
file.</p>
|
||||
<p>I don’t think I’m abusing the <a href="Makefile">Makefile</a> since
|
||||
I’m only using 147 characters including white space and the
|
||||
<code>#!</code> line and the commented-out <code>-Wall -pedantic</code>
|
||||
options. The <a href="/2004/rules.txt">rules for the 16th IOCCC</a>
|
||||
specifically allowed build files up to 521 characters long so my build
|
||||
file would have been well within those limits. (What typo?)</p>
|
||||
<p><code>gcc -E -Wall -pedantic</code> complains that trigraphs are
|
||||
present and that
|
||||
<code>"pasting ... does not yield a valid processing token"</code>.</p>
|
||||
<p><code>gcc -ansi -Wall -pedantic</code> complains about
|
||||
<code>#line</code> directives, trigraphs, and expressions and statements
|
||||
that have no effect. The last complaint is false in all but one case.
|
||||
Removing the offending expressions causes some compilers to report
|
||||
syntax errors because they can’t determine whether a name refers to a
|
||||
variable or a type.</p>
|
||||
<p>Since buffer overflows are a common security problem these days I
|
||||
have stolen the idea of using a “safe” buffer API from
|
||||
<code>vsftpd</code>. This means the program should never crash,
|
||||
right?</p>
|
||||
<p>The program was tested on: AMD K6/MMX 266MHz, Debian GNU/Linux
|
||||
testing “Sarge”, gcc 3.3.2 Intel 486DX 33MHz, Red Hat Linux 7.3, gcc
|
||||
2.96 PowerPC Macintosh G4 Quicksilver, Mac OS X 10.3.2, gcc 3.3 PowerPC
|
||||
Macintosh G4 Quicksilver, Mac OS X 10.1.5, cc 2.95.2 PowerPC Macintosh
|
||||
Performa 5200CD, Mac OS 8.6, CodeWarrior 11 Sun SPARC Ultra 10, Solaris
|
||||
8, gcc 3.2</p>
|
||||
<p>Compiling on Mac OS 8.6 requires some degree of manual intervention
|
||||
because Mac OS 8.6 doesn’t have shell scripting or even a normal command
|
||||
prompt. The <code>CodeWarrior</code> 11 compiler is the reason I had to
|
||||
use trigraphs. I have to preprocess <code>jdalbec.c</code> without
|
||||
trigraphs, save the result as <code>jdalbec2.c</code>, then compile
|
||||
<code>jdalbec2.c</code> with trigraphs to get the program to work. I
|
||||
also have to add an include file and a function call to the program to
|
||||
get a pseudo command line so I can pass arguments. The compiler also
|
||||
requires function prototypes by default, which is why I have prototypes
|
||||
for all my functions.</p>
|
||||
<p>Compiling on Mac OS X 10.1.5 requires changing <code>??=</code> to
|
||||
<code>#</code> on line 3 because the compiler doesn’t recognize
|
||||
<code>??=</code> as a trigraph (which I consider a compiler bug). The
|
||||
initial preprocessing step on Mac OS X 10.1.5 generates lots of errors
|
||||
in “smart mode” because the “smart” preprocessor expects a valid C
|
||||
program as input. The preprocessor then falls back to “basic mode” and
|
||||
preprocesses <a href="jdalbec.c">jdalbec.c</a> successfully without
|
||||
warnings, even when I give it the <code>-Wall -pedantic</code> options.
|
||||
It inserts a lot of extra spaces into the preprocessed output which is
|
||||
why I had to add the <code>ed(1)</code> step to the build file so that
|
||||
my macro <code>#defines</code> would work. The compile step gives the
|
||||
usual messages with <code>-Wall -pedantic</code>. The link step
|
||||
generates a warning about a name conflict between my <code>BC()</code>
|
||||
and a <code>BC()</code> from curses in the main system library.</p>
|
||||
<h3 id="bugs-features"><strike>BUGS</strike> FEATURES:</h3>
|
||||
<p>Arguments matching <code>/[^2]22$/</code> cause the program to
|
||||
segfault after rapidly exhausting the available stack space. I could
|
||||
probably fix this by adding some special cases to the code, but [Blaine
|
||||
the Mono] it’s quite a bit more exciting this way, don’t you
|
||||
think?[/Blaine] Since the trailing <code>22</code> will be its own atom
|
||||
anyway, you can just insert a space in front of it if you run into this
|
||||
feature (e.g. <code>1 22</code> instead of <code>122</code>).</p>
|
||||
<p>Note: you may want to be sure you have a limit on stack size before
|
||||
trying this. I ran it on Debian GNU/Linux and discovered that I did not
|
||||
have a limit on stack size. Fortunately the OS killed the process after
|
||||
a while. This is consistent with the output of <a
|
||||
href="/1996/schweikh3/schweikh3.c">1996/schweikh3</a> which reports
|
||||
<code>malloc lied! Killed by SIGKILL</code>.</p>
|
||||
<p>Arguments matching <code>/(?:.){10,}/</code> will produce visually
|
||||
incorrect results (e.g., generation 1 starting from 1111111111 will
|
||||
print as <code>: 1</code>), but there’s nothing interesting about these
|
||||
arguments that can’t be modeled using shorter runs of the same
|
||||
symbol.</p>
|
||||
<p>Arguments matching <code>/(?:.){257,}/</code> may produce
|
||||
mathematically incorrect results (e.g., generation 1 starting from a
|
||||
string of 257 <code>1</code>s will be calculated as <code>11</code>);
|
||||
the remark from the previous paragraph applies here also.</p>
|
||||
<p>The program has exactly 2004 IOCCC countable bytes. It’s tailor-made
|
||||
for this competition!</p>
|
||||
<p>Although there are no comments, the program still manages to be
|
||||
self-documenting in an obscure fashion (periodic table of the
|
||||
(non-primordial) elements, “OBFUSCATED C”).</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>The program is obfuscated:</p>
|
||||
<ul>
|
||||
<li>By invoking <code>cpp</code> twice.</li>
|
||||
<li>By the use of <code>#define</code>s.</li>
|
||||
<li>By the use of <code>typedef</code>s.</li>
|
||||
<li>By the use of global constants.</li>
|
||||
<li>By the use of global functions that replace the standard ones (I
|
||||
particularly like substituting <code>At</code> (<a
|
||||
href="https://en.wikipedia.org/wiki/Astatine">Astatine</a>, highly
|
||||
unstable) for <code>abort()</code>.) By overloading symbols (For
|
||||
example, <code>B</code> is a type, a structure, a structure member, a
|
||||
macro parameter, and a variable.).</li>
|
||||
<li>By standard tricks like writing <code>'\0'</code> as
|
||||
<code>1["3"]</code> or <code>2["22"]</code>.</li>
|
||||
<li>By using ternary operators to avoid <code>else</code>.</li>
|
||||
<li>By using the <code>Sb()</code> function to create sub-buffers from
|
||||
either end.</li>
|
||||
<li>By naming everything after chemical elements or pairs of
|
||||
elements.</li>
|
||||
<li>Because it says so in the source. ;)</li>
|
||||
</ul>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004jdalbec"><a name="inventory"></a>Inventory for
|
||||
2004/jdalbec</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec/jdalbec.c">jdalbec.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec/jdalbec.alt.c">jdalbec.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec/jdalbec.orig.c">jdalbec.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec/try.alt.sh">try.alt.sh</a>
|
||||
- how to run alternative code</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="2004_jdalbec.tar.bz2">2004_jdalbec.tar.bz2</a> - download
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/jdalbec/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fjdalbec%2Findex.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 -->
|
||||
+360
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,372 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/kopczynski/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 kopczynski</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: kopczynski winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,kopczynski,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/kopczynski</title>
|
||||
<meta name="description" content="2004 IOCCC winner kopczynski">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, kopczynski">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 kopczynski</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/kopczynski</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fkopczynski%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/kopczynski/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../jdalbec/index.html">← jdalbec</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../newbern/index.html">newbern →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Eryk_Kopczynski">Eryk
|
||||
Kopczynski</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#PL">PL</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<p>NOTE: We FORCE the use of -O0 even if someone overrides it because
|
||||
this entry will not work with it enabled.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./kopczynski</span> <span class="op"><</span> input_file</span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try</span></span></code></pre></div>
|
||||
<p>What happens if you feed the program source to the program? Can you
|
||||
figure out why?</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>The judges modified the program to print its result. The original
|
||||
program returned the result as an exit code which is what the alternate
|
||||
version does.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<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> alt</span></code></pre></div>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./kopczynski.alt</span> <span class="op"><</span> kopczynski-10</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="va">$?</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>What is in a line? A lot when you obfuscate the way Eryk Kopczynski
|
||||
did it. This small one line program is an outstanding technical work of
|
||||
art as well as one of the better one-liner programs that we have seen in
|
||||
years!</p>
|
||||
<p>Compile and run without arguments. As input, give it an ASCII
|
||||
graphics figure 8, 9, 10, or 11 made of pound signs and spaces, of any
|
||||
size, shape, or orientation (that’s right, an upside down 9 is still 9
|
||||
:-) ). There is one restriction: the only line not containing “#”
|
||||
characters must be the last.</p>
|
||||
<p>The program will print what it thinks you’ve entered. If you enter
|
||||
anything that does not resemble 8, 9, 10, or 11, the result is seemingly
|
||||
arbitrary. Actually it is not pseudo-random; can you find a pattern when
|
||||
it does not resemble 8, 9, 10 or 11?</p>
|
||||
<p>Here is a related puzzle: how to continue the sequence:</p>
|
||||
<pre><code>1, 0, 0, 0, 0, 0, 1, 0, 2, 1, ...</code></pre>
|
||||
<p>With certain arguments, you can alter the exit value / output. Can
|
||||
you figure out how and why?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>The program proves it is not as hard to recognize numbers. The
|
||||
current one liner version should correctly recognize all numbers from 8
|
||||
to 11. (Unless you give it some very hard cases. For example, it cannot
|
||||
recognize negatives, zeros which have dots or slashes inside them,
|
||||
digits should be separated, and numbers should be “complete”.)</p>
|
||||
<p>This program returns the number as its exit status. (In most shells,
|
||||
you can see the exit status of the last command with
|
||||
<code>echo $?</code> (or just <code>$?</code>).)</p>
|
||||
<p><strong>NOTE: The judges altered the primary version to output a
|
||||
number.</strong></p>
|
||||
<p>On the input, give numbers formed as a sequences of empty spaces and
|
||||
<code>#</code> signs (you can also use dots instead of spaces), ending
|
||||
with an empty line. (No number has an empty line in it.) The program
|
||||
should return the number from 8 to 11 that it thinks it is.</p>
|
||||
<ul>
|
||||
<li><p>The line is 131 bytes long (in 1986, 165 bytes was OK, and the
|
||||
size limit has grown from 1986…).</p></li>
|
||||
<li><p>I have decided that it is better for this program to return the
|
||||
number, not to print it, but if you think otherwise, the change would
|
||||
cost 6 chars (plus a warning). Change <code>return *</code> to
|
||||
<code>printf("%d",*)</code>. (<code>$?</code> is shorter)</p></li>
|
||||
<li><p>I achieved some additional tightness by <code>-Dif=while</code>
|
||||
which saved 9 chars of source for the cost of 11 chars of the <a
|
||||
href="Makefile">Makefile</a>. If I used <code>-DB=while</code>, I would
|
||||
save 12 for 10, but I think the current version is slightly more
|
||||
obfuscated.</p></li>
|
||||
</ul>
|
||||
<h3 id="portability">Portability</h3>
|
||||
<p>It only requires two’s complement arithmetics, as far as I know. The
|
||||
maximum length of an input line is <code>N-9</code>, where
|
||||
<code>N</code> is the size of <code>int</code> in bits (you can try to
|
||||
compile with an option <code>'-Dint=long long'</code> for longer
|
||||
lines).</p>
|
||||
<h3 id="algorithm-obfuscation">Algorithm & Obfuscation</h3>
|
||||
<ol type="1">
|
||||
<li><p>This program works by calculating the <a
|
||||
href="https://en.wikipedia.org/wiki/Euler_characteristic">Euler
|
||||
characteristics</a> of input, plus 9. It is the number of digits
|
||||
(i.e. separated <code>#</code>-regions) minus the number of holes in
|
||||
them. It turns out that this algorithm works correctly for all numbers
|
||||
from 8 to 11.</p></li>
|
||||
<li><p>We know that <a
|
||||
href="https://en.wikipedia.org/wiki/Euler_characteristic">Euler
|
||||
characteristics</a> is the number of “vertexes”</p></li>
|
||||
</ol>
|
||||
<pre><code> #</code></pre>
|
||||
<p>minus the number of “edges”</p>
|
||||
<pre><code> ## # #. .#
|
||||
# .# #. ('.' must be empty)</code></pre>
|
||||
<p>plus the number of “faces”</p>
|
||||
<pre><code> ##
|
||||
##</code></pre>
|
||||
<ol start="3" type="1">
|
||||
<li>If we fill all these patterns to 2x2 squares,</li>
|
||||
</ol>
|
||||
<pre><code> #? ## #? #. .# ##
|
||||
?? ?? #? .# #. ##
|
||||
+1 -1 -1 -1 -1 +1</code></pre>
|
||||
<p>substitute all possible “values” of <code>?</code> and sum them up,
|
||||
we get that it is enough to calculate:</p>
|
||||
<pre><code> #. .# ##
|
||||
.. #. #.
|
||||
+1 -1 -1</code></pre>
|
||||
<p>Note now it is simple and obfuscated enough to be used as a “magic
|
||||
trick”.</p>
|
||||
<ol start="4" type="1">
|
||||
<li><p>I make a 16-character array; when indexed by 4-bit value which
|
||||
represents the 2x2 squares, it will return a number to add/subtract
|
||||
<code>{-1,0,+1}</code></p></li>
|
||||
<li><p>We convert lines of input to bitmaps (<code>N-bit</code>
|
||||
integers). Additionally, it is heavily obfuscated by using negative
|
||||
numbers (two’s complement). For example, it turns out that
|
||||
<code>6</code> in <code>z=6</code> is the only 1-digit number which
|
||||
works here (and it’s not only because we have <code>z>5</code> in the
|
||||
following <code>while</code>). The conversion routine also sets
|
||||
<code>n=8</code> in an obfuscated and concise way.</p></li>
|
||||
<li><p>Since we always return the number from 8 to 11, we can calculate
|
||||
modulo 4. Instead of <code>16 {-1,0,+1}</code> values, we use a
|
||||
15-character string which agrees modulo 4 to the array in
|
||||
(<code>4</code>). (<code>'\0'</code> fits very well as the 16th
|
||||
character, so we use 15-character string.)</p></li>
|
||||
<li><p>Since the rule found in (3) did not produce any funny messages, I
|
||||
changed it until it did. (The <code>#</code> character to find vertexes
|
||||
is in the top right corner, not the top left one.) The following
|
||||
messages will also work instead of
|
||||
<code>has dirtiest IF</code>:</p></li>
|
||||
</ol>
|
||||
<pre><code>HighlandYachter
|
||||
TestDirtiestTen
|
||||
has lintiest IF
|
||||
TighterLaughter
|
||||
HustlerDaughter
|
||||
TighterDemoThen</code></pre>
|
||||
<p>They can be mixed, of course!</p>
|
||||
<ol start="8" type="1">
|
||||
<li><p>NOTE: item 8 was removed by the judges so as to not spoil the
|
||||
challenge of figuring how arguments can be used to alter the exit
|
||||
value.</p></li>
|
||||
<li><p>The variable names are confusing.</p></li>
|
||||
<li><p>Finally, the program tries to be as concise as possible. Some
|
||||
obfuscation comes from this. For additional obfuscation and conciseness,
|
||||
<code>if</code> means <code>while</code>.</p></li>
|
||||
</ol>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004kopczynski"><a name="inventory"></a>Inventory
|
||||
for 2004/kopczynski</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski.c">kopczynski.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski.alt.c">kopczynski.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski.orig.c">kopczynski.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-10-rev">kopczynski-10-rev</a>
|
||||
- reverse character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-10">kopczynski-10</a>
|
||||
- character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-11-rev">kopczynski-11-rev</a>
|
||||
- reverse character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-11">kopczynski-11</a>
|
||||
- character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-8a-rev">kopczynski-8a-rev</a>
|
||||
- reverse character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-8a">kopczynski-8a</a>
|
||||
- character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-8b-rev">kopczynski-8b-rev</a>
|
||||
- reverse character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-8b">kopczynski-8b</a>
|
||||
- character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-8c-rev">kopczynski-8c-rev</a>
|
||||
- reverse character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-8c">kopczynski-8c</a>
|
||||
- character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-9-rev">kopczynski-9-rev</a>
|
||||
- reverse character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-9">kopczynski-9</a>
|
||||
- character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-a-rev">kopczynski-a-rev</a>
|
||||
- reverse character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/kopczynski-a">kopczynski-a</a>
|
||||
- character to recognize</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="2004_kopczynski.tar.bz2">2004_kopczynski.tar.bz2</a> -
|
||||
download winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/kopczynski/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fkopczynski%2Findex.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 -->
|
||||
+201
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,213 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/newbern/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 newbern</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: newbern winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,newbern,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/newbern</title>
|
||||
<meta name="description" content="2004 IOCCC winner newbern">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, newbern">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 newbern</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/newbern</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fnewbern%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/newbern/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../kopczynski/index.html">← kopczynski</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../omoikane/index.html">omoikane →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Jeff_Newbern">Jeff Newbern</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#null">unknown</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./newbern</span> [file.dat arg]</span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./newbern</span> newbern.dat <span class="st">"IOCCC 2004"</span></span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> SOS <span class="kw">|</span> <span class="ex">./newbern</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The program is formatted using the same font glyphs as the example
|
||||
data file.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This is a configurable <code>banner(1)</code>-like program.</p>
|
||||
<h3 id="examples">Examples:</h3>
|
||||
<ul>
|
||||
<li>To convert a character glyph into a data file:</li>
|
||||
</ul>
|
||||
<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="ex">./newbern</span> char <span class="op"><</span> some_nicely_shaped_text <span class="op">>></span> data_file</span></code></pre></div>
|
||||
<ul>
|
||||
<li>To print a string using glyphs from a data file:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./newbern</span> data_file a_string</span></code></pre></div>
|
||||
<h3 id="extra-functionality">Extra functionality</h3>
|
||||
<p>The program can also act as a Morse encoder, unarguably.</p>
|
||||
<p>It also has double-super-secret encryption capabilities. Decryption
|
||||
is left as an exercise for the reader.</p>
|
||||
<h3 id="portability">Portability</h3>
|
||||
<p>The program assumes an ASCII operating environment.</p>
|
||||
<p>The program is best viewed with tab-stops set to 8.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004newbern"><a name="inventory"></a>Inventory for
|
||||
2004/newbern</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/newbern/newbern.c">newbern.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/newbern/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/newbern/newbern.orig.c">newbern.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/newbern/newbern.dat">newbern.dat</a>
|
||||
- sample input</li>
|
||||
<li><a href="2004_newbern.tar.bz2">2004_newbern.tar.bz2</a> - download
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/newbern/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/newbern/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/newbern/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fnewbern%2Findex.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 -->
|
||||
+282
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,294 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/omoikane/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 omoikane</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: omoikane winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,omoikane,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/omoikane</title>
|
||||
<meta name="description" content="2004 IOCCC winner omoikane">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, omoikane">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 omoikane</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/omoikane</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fomoikane%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/omoikane/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../newbern/index.html">← newbern</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../schnitzi/index.html">schnitzi →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Don_Yang">Don Yang</a><br> Location:
|
||||
<a href="/temp-test-ioccc/location.html#US">US</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./omoikane</span> infile layout outfile</span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre><code>./omoikane omoikane.info omoikane.info omoikane.output</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>For extra credit, spot the checksum in the source file itself. What
|
||||
makes this one particularly interesting is that the checksum, strictly
|
||||
speaking, isn’t being computed at all. Rather, the file is modified to
|
||||
have the desired checksum! This does, we suppose, solve the problem that
|
||||
inserting a checksum would change the file’s checksum; if you have to
|
||||
change it, you might as well change it!</p>
|
||||
<p>This program was submitted under the name <code>Rinia</code>, so the
|
||||
Author’s Comments refer to it as such.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="rinia-11404"><code>Rinia</code> (1/14/04)</h3>
|
||||
<p><code>Rinia</code> is a tool for embedding CRCs in text files. No
|
||||
need to assign strange file names or package .SFVs with your files!
|
||||
<code>Rinia</code> will insert a human-readable checksum string in the
|
||||
text itself! <code>^_^</code></p>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<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="ex">./omoikane</span> <span class="op"><</span>infile<span class="op">></span> <span class="op"><</span>layout<span class="op">></span> <span class="op"><</span>outfile<span class="op">></span></span></code></pre></div>
|
||||
<p>All three arguments may reference the same file. All files is assumed
|
||||
to be of ASCII character set.</p>
|
||||
<h3 id="input">Input</h3>
|
||||
<p>Any file larger than 8 bytes is valid. Upper limit on file size is
|
||||
limited by memory.</p>
|
||||
<p>If input file can’t be loaded for any reason, <code>Rinia</code> will
|
||||
say “bad input” and exit immediately.</p>
|
||||
<h3 id="layout">Layout</h3>
|
||||
<p>The layout file contains a map of where <code>Rinia</code> can patch.
|
||||
The content consists of marker characters (where <code>Rinia</code> is
|
||||
allowed to change in the original text) and other characters (where the
|
||||
original text will stay as is). <code>Rinia</code> will select the
|
||||
marker character using these heuristics:</p>
|
||||
<ol type="1">
|
||||
<li>Ignore all space/control/extended characters.</li>
|
||||
<li>Select characters that appeared 8 times in a row.</li>
|
||||
<li>Of those selected characters, pick one with the lowest
|
||||
frequency.</li>
|
||||
</ol>
|
||||
<p>One way to create the layout file is to make a copy of the original
|
||||
file, replace where you want <code>Rinia</code> to match with a rare
|
||||
character, then replace the remaining ones with space. Often it’s
|
||||
possible to write the original file in such a way that it can be used as
|
||||
a layout.</p>
|
||||
<p>Example file/layout:</p>
|
||||
<pre><code>file: layout:
|
||||
crc = ######## ... . XXXXXXXX
|
||||
patch = ###### ..... . XXXXXX
|
||||
other text here ..... .... ....</code></pre>
|
||||
<p>And <code>Rinia</code> may generate a file similar to this:</p>
|
||||
<pre><code>crc = 1bad73cf
|
||||
patch = #FR-QQ
|
||||
other text here</code></pre>
|
||||
<p>Note that the original file by itself is a valid layout file, since
|
||||
<code>Rinia</code> will recognize that only <code>#</code> marks enough
|
||||
space to hold the checksum, and has the lowest frequency.</p>
|
||||
<p>If layout file can’t be used for any reason, <code>Rinia</code> will
|
||||
say “bad layout” and exit immediately.</p>
|
||||
<h3 id="output-m">Output m</h3>
|
||||
<p>If <code>Rinia</code> finds a usable checksum, she will say “OK.” and
|
||||
write to the specified output file. Otherwise the exit message is “fail”
|
||||
and nothing is written.</p>
|
||||
<p>Chances of success and how long it takes to run to completion is
|
||||
completely dominated by the layout file design. In general,
|
||||
<code>Rinia</code> runs faster if the checksum is placed before the
|
||||
other marker characters rather than after, e.g.:</p>
|
||||
<pre><code> a: X X XXX b: XXXXXXXX c: XXXXXXXX
|
||||
XXXXXXXX X X XXX XXXXX
|
||||
</code></pre>
|
||||
<p><code>a</code> usually takes the longest time, while <code>c</code>
|
||||
usually is the fastest.</p>
|
||||
<p>That said, each run is randomized with respect to system time, so
|
||||
it’s not always certain whether <code>Rinia</code> will succeed in a
|
||||
short time or not. In general, 5 marker characters are sufficient, and
|
||||
takes a few minutes.</p>
|
||||
<p>For reference, <code>rinia.c</code> was produced on a 1.7GHz machine
|
||||
(the checksum is at line 17). Out of 25 runs, the shortest was 2 seconds
|
||||
while the longest took 5 minutes. Average was about a minute. Checksum
|
||||
for this file (<code>b7a81524</code>) took about 4 minutes.</p>
|
||||
<h3 id="algorithm">Algorithm</h3>
|
||||
<p>Inserting a checksum in the file you are computing the checksum of
|
||||
isn’t quite trivial, since changing the file content would change the
|
||||
final checksum value.</p>
|
||||
<p>To insert the checksum, <code>Rinia</code> first assumes a random
|
||||
final checksum, inserts that string, then modifies other parts to
|
||||
compensate for the change in content.</p>
|
||||
<p>The compensation bytes are very easy to compute for binary files with
|
||||
enough consecutive scratch areas, but for text files with
|
||||
non-consecutive areas and limited degrees of freedom, <code>Rinia</code>
|
||||
has to try out all character combinations. This is done in a
|
||||
hierarchical fashion, computing only smallest partial checksum after
|
||||
each change.</p>
|
||||
<p>For computers a few years old, this is probably still too slow to be
|
||||
acceptable… but at the speed the IOCCC judges run the contest these
|
||||
days, I am sure you have enough patience for it <code>_^</code></p>
|
||||
<h3 id="source-code">Source code</h3>
|
||||
<p><code>rinia.c</code> should compile anywhere (but with a few
|
||||
warnings). I don’t have a big-endian machine to test but
|
||||
<code>Rinia</code> should work there as well. ASCII character set
|
||||
required though.</p>
|
||||
<p>Code is formatted to the shape of “<code>Rinia</code>” from the
|
||||
anime/game “Moekko Company”. Of course at 90x50 it’s hard to recognize
|
||||
anything <code>^_^</code></p>
|
||||
<p><code>Rinia</code> is the slow but hardworking android. On some jobs
|
||||
she does very well, on others she would spend lots of time and effort
|
||||
but still fail…</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004omoikane"><a name="inventory"></a>Inventory
|
||||
for 2004/omoikane</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/omoikane/omoikane.c">omoikane.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/omoikane/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/omoikane/omoikane.orig.c">omoikane.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/omoikane/omoikane.info">omoikane.info</a>
|
||||
- information about Rinia</li>
|
||||
<li><a href="2004_omoikane.tar.bz2">2004_omoikane.tar.bz2</a> - download
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/omoikane/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/omoikane/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/omoikane/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fomoikane%2Findex.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 -->
|
||||
+285
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,297 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/schnitzi/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 schnitzi</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: schnitzi winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,schnitzi,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/schnitzi</title>
|
||||
<meta name="description" content="2004 IOCCC winner schnitzi">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, schnitzi">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 schnitzi</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/schnitzi</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fschnitzi%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/schnitzi/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../omoikane/index.html">← omoikane</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../sds/index.html">sds →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Mark_Schnitzius">Mark
|
||||
Schnitzius</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#null">unknown</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schnitzi</span> <span class="op"><</span>foo <span class="kw">|</span> <span class="fu">vi</span> <span class="at">-n</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<p>NOTE: if you’re one of those who don’t know how to exit
|
||||
<code>vi</code> :-) don’t worry as it will exit for you.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This exemplifies the meaning of Visual Editor, but we don’t think
|
||||
that any benchmarking sites are going to use this to tout the
|
||||
performance of the latest hardware!</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>If you’ve ever pasted a large chunk of text into an editor (such as
|
||||
<code>vi</code>) without first putting it into insert mode, or turning
|
||||
off the auto-indent, you know the dismay of watching your screen fill up
|
||||
with misaligned junk.</p>
|
||||
<p>It’s not the editor’s fault. The editor is just acting just as if you
|
||||
typed exactly what you’re pasting. (Of course, you could blame the
|
||||
editor for being modal in the first place, but that’s a discussion for
|
||||
another time.)</p>
|
||||
<p>It occurred to me that you could get interesting results by pasting a
|
||||
carefully designed string into the editor. In fact, if the pasted string
|
||||
contains cursor navigation commands, you can go back and overwrite
|
||||
things that were already inserted earlier in string, anywhere on the
|
||||
screen. Can you see where this is going?</p>
|
||||
<h3 id="animation">ANIMATION!</h3>
|
||||
<p>The program takes input from <code>stdin</code> which defines the
|
||||
animated elements (sprites) that appear on the screen. For each sprite,
|
||||
you can specify exactly when and how long it will appear, and which
|
||||
direction it is moving. Also, the sprite can oscillate between up to
|
||||
four different views, which appear in subsequent frames. Forgive me,
|
||||
animators, if I’m mangling the terminology. Sprites which appear later
|
||||
in the input file will be drawn in front of sprites which appear
|
||||
earlier.</p>
|
||||
<p>The output, written to <code>stdout</code>, is a string which, when
|
||||
pasted into vi, will perform the animation defined in the input. (The vi
|
||||
editor is a common (and ancient) editor that should be available on most
|
||||
Unix, Linux, Solaris, and macOS systems; you can get it on Windows by
|
||||
installing Cygwin, which is how I do it.)</p>
|
||||
<h3 id="the-input">THE INPUT</h3>
|
||||
<p>It’s easiest to place the input in a file, so you can redirect it to
|
||||
<code>stdin</code> when running the program. What follows is a detailed
|
||||
description of the input file format.</p>
|
||||
<p>The first line is specified thusly:</p>
|
||||
<pre><code>[duration] [timefactor]</code></pre>
|
||||
<p>The first parameter, <code>duration</code>, defines how long the
|
||||
animation will run. The second, <code>timefactor</code>, is used as sort
|
||||
of a fudge factor for machines that run too fast to see the animation. A
|
||||
<code>timefactor</code> of 0 means, “run the animation as fast as you
|
||||
can”. On a pretty fast machine, I’ve had to set it as high as 2000 to
|
||||
get the animation to slow down sufficiently. Note that the higher the
|
||||
<code>timefactor</code>, the longer the output string that you’ll have
|
||||
to copy and paste, as extra characters are necessary to “waste time”
|
||||
between frames.</p>
|
||||
<p>Following the first line parameters, you may have up to nine
|
||||
different sprites, each up 50 by 50 in size, and with up to four
|
||||
different ‘views’ of that object, which are cycled through with each
|
||||
successive frame. Each sprite begins with a line of parameters of the
|
||||
following form:</p>
|
||||
<pre><code>[start] [end] [x] [y] [dx] [dy] [cols] [rows] [viewcount]</code></pre>
|
||||
<p>where:</p>
|
||||
<ul>
|
||||
<li><p><code>start</code> is the time at which this sprite first
|
||||
appears.</p></li>
|
||||
<li><p><code>end</code> is the time at which it disappears.</p></li>
|
||||
<li><p><code>x</code> is the horizontal position at which it
|
||||
starts.</p></li>
|
||||
<li><p><code>y</code> is the vertical position.</p></li>
|
||||
<li><p><code>dx</code> is the amount that the <code>x</code> position
|
||||
changes per frame.</p></li>
|
||||
<li><p><code>dy</code> is the amount that the <code>y</code> position
|
||||
changes per frame.</p></li>
|
||||
<li><p><code>cols</code> is the number of columns in each view.</p></li>
|
||||
<li><p><code>rows</code> is the number of rows in each view.</p></li>
|
||||
<li><p><code>viewcount</code> is the number of views to cycle
|
||||
through.</p></li>
|
||||
</ul>
|
||||
<p>Each such parameter line will be followed by <code>viewcount</code>
|
||||
view frames, each with <code>rows</code> rows and <code>cols</code>
|
||||
columns.</p>
|
||||
<p>Input is terminated by end of file. Duh.</p>
|
||||
<p>Two samples input files are included; one a nice pastoral park scene,
|
||||
the other a bit of scrolling text.</p>
|
||||
<h3 id="running-the-animation">RUNNING THE ANIMATION</h3>
|
||||
<p>Try one of these methods to get the animation to run:</p>
|
||||
<ol type="1">
|
||||
<li>Redirect the output directly to vi, like this:</li>
|
||||
</ol>
|
||||
<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="ex">./schnitzi</span> <span class="op"><</span> input.dat <span class="kw">|</span> <span class="fu">vi</span></span></code></pre></div>
|
||||
<ol start="2" type="1">
|
||||
<li>Redirect the output to a file, like this:</li>
|
||||
</ol>
|
||||
<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="ex">./schnitzi</span> <span class="op"><</span> input.dat <span class="op">></span> output.dat</span></code></pre></div>
|
||||
<p>Then, open the output file, select the text, and copy it to your
|
||||
system pasteboard/cut/selection buffer and paste it into vi. The paste
|
||||
is NOT the vi paste command, but rather an action you take within your
|
||||
operating system. On a Windows machine running vi via Cygwin,
|
||||
“Edit|Paste” is a right-click menu option on the top window bar.</p>
|
||||
<ol start="3" type="1">
|
||||
<li>Memorize the output, and type it into vi really really fast.</li>
|
||||
</ol>
|
||||
<h3 id="a-final-note">A FINAL NOTE</h3>
|
||||
<p>I would like to remind the Pixar Animation Studios that I retain
|
||||
royalties on this technique.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004schnitzi"><a name="inventory"></a>Inventory
|
||||
for 2004/schnitzi</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi/schnitzi.c">schnitzi.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi/schnitzi.orig.c">schnitzi.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi/schnitzi.inp0">schnitzi.inp0</a>
|
||||
- example input</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi/schnitzi.inp1">schnitzi.inp1</a>
|
||||
- example input</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="2004_schnitzi.tar.bz2">2004_schnitzi.tar.bz2</a> - download
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/schnitzi/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fschnitzi%2Findex.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 -->
|
||||
+246
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,258 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/sds/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 sds</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: sds winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,sds,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/sds</title>
|
||||
<meta name="description" content="2004 IOCCC winner sds">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, sds">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 sds</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/sds</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fsds%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/sds/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../schnitzi/index.html">← schnitzi</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../vik1/index.html">vik1 →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Stephen_Sykes">Stephen Sykes</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#FI">FI</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#2004-sds">2004
|
||||
sds in bugs.md</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./sds</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<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="ex">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Why not use the program to hide another program in the program? It
|
||||
must have seemed reasonable at the time.</p>
|
||||
<p>The ability to hide a message in plain text is quite charming,
|
||||
really. We must admit to a bit of uncertainty about where you’d find
|
||||
such messages, or how useful they’d be. Or, of course, whether all those
|
||||
horribly badly formatted emails spammers send might contain secret
|
||||
messages. Annoyingly, it’s a little too obvious that SOMETHING has been
|
||||
done to a message for us to hide one in the remarks. :)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p><a
|
||||
href="https://en.wikipedia.org/wiki/Steganography">Steganography</a> is
|
||||
the term for the family of techniques used for hiding information within
|
||||
other information. Today, it has many real world uses, particularly for
|
||||
digital watermarking.</p>
|
||||
<p>This program uses a steganographic technique to hide information in
|
||||
any text file. The specific technique used is aimed at writers of
|
||||
obfuscated programs for the IOCCC, as the hidden information is encoded
|
||||
in the whitespace in the source file. As we know, there are up to an
|
||||
additional 2048 characters of whitespace available to entrants to the
|
||||
IOCCC, so it turns out that this is an ideal place to hide things.</p>
|
||||
<p>The program as provided is the steganographic decoder. Rather than
|
||||
provide a separate encoding program, you should not be surprised to
|
||||
learn that I opted to steganographically hide the encoder inside the
|
||||
decoder.</p>
|
||||
<p>Try it out. Compile the program, then type</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./sds</span> <span class="op"><</span> sds.c</span></code></pre></div>
|
||||
<p>You should see the encoder program displayed. Now save it, like:</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="ex">./sds</span> <span class="op"><</span> sds.c <span class="op">></span> encoder.c</span></code></pre></div>
|
||||
<p>Then compile <code>encoder.c</code>. You now have the complete system
|
||||
ready.</p>
|
||||
<p>The encoder expects to get a filename as an argument. This filename
|
||||
is the name of the file containing the information to be hidden. It
|
||||
expects the file in which to hide the information to be on the standard
|
||||
input, and will output the results on the standard output.</p>
|
||||
<p>You can use it like this (assuming you have a file called
|
||||
remarks):</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="bu">echo</span> <span class="st">'Hello, World!'</span> <span class="op">></span> message</span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./encoder</span> message <span class="op"><</span> remarks <span class="op">></span> remarks_msg</span></code></pre></div>
|
||||
<p>Then to decode:</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="ex">./sds</span> <span class="op"><</span> remarks_msg</span>
|
||||
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="ex">Hello,</span> World!</span></code></pre></div>
|
||||
<p>C programs are mostly unaffected by adding steganographic content,
|
||||
but it is possible in certain circumstances for whitespace to be changed
|
||||
inside strings where it should be left alone. Plain text files are good
|
||||
candidates for hiding information in, but the added spacing may render
|
||||
the text somewhat difficult to read.</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>This program is obfuscated in a number of ways:</p>
|
||||
<ul>
|
||||
<li>The code is all but impossible to read due to the spacing.</li>
|
||||
<li>The algorithm is well hidden in the code due to copious
|
||||
red-herrings.</li>
|
||||
<li>The long expressions cause indentation tools to give poor
|
||||
results.</li>
|
||||
<li>And good old fashioned ternary operators are the icing on the
|
||||
cake.</li>
|
||||
</ul>
|
||||
<h3 id="compiling-the-program">Compiling the program</h3>
|
||||
<p>The program (and the encoder program) should compile on any
|
||||
reasonable compiler. In particular, they are known to compile under GNU
|
||||
C.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004sds"><a name="inventory"></a>Inventory for
|
||||
2004/sds</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/sds/sds.c">sds.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/sds/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/sds/sds.orig.c">sds.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/sds/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="2004_sds.tar.bz2">2004_sds.tar.bz2</a> - download winning
|
||||
source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/sds/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/sds/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/sds/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fsds%2Findex.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 -->
|
||||
+263
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,275 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/vik1/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 vik1</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: vik1 winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,vik1,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/vik1</title>
|
||||
<meta name="description" content="2004 IOCCC winner vik1">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, vik1">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 vik1</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/vik1</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fvik1%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/vik1/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../sds/index.html">← sds</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left" href="../vik2/index.html">vik2 →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Daniel_Vik">Daniel Vik</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#US">US</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./vik1</span> <span class="pp">[</span><span class="ss">arg</span><span class="pp">]</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./vik1</span></span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./vik1</span> a</span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./vik1</span> d2</span>
|
||||
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./vik1</span> ad3</span></code></pre></div>
|
||||
<p>Can you figure out how to cheat?</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Daniel Vik has presented a tour de force feature rich X11-based
|
||||
racing game that fit within the contest size limits. Take a glance at
|
||||
the feature list he provided below. Amazing!</p>
|
||||
<p>The author posted a video of this on YouTube: <a
|
||||
href="https://www.youtube.com/watch?v=xTseqWCtAUA"
|
||||
class="uri">https://www.youtube.com/watch?v=xTseqWCtAUA</a>.</p>
|
||||
<p>Happy touring on the road and in the code!</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="features">Features</h3>
|
||||
<p>This program is a complete car race game with a lot of nice
|
||||
features:</p>
|
||||
<ul>
|
||||
<li><p>Drive on a road in a 3D landscape with hills and curves.</p></li>
|
||||
<li><p>Mountains in the horizon.</p></li>
|
||||
<li><p>A sun in the sky when driving during the day.</p></li>
|
||||
<li><p>Dark sky and reduced visibility when driving at night.</p></li>
|
||||
<li><p>Snow when driving in the winter.</p></li>
|
||||
<li><p>Slippery road when driving in the winter.</p></li>
|
||||
<li><p>When driving off the road, the car slows down to a halt.</p></li>
|
||||
<li><p>Three different race tracks that takes about one minute to
|
||||
complete.</p></li>
|
||||
<li><p>Speedometer.</p></li>
|
||||
<li><p>Computer driven opponent cars.</p></li>
|
||||
<li><p>Collision detection when driving into other cars.</p></li>
|
||||
<li><p>Lap time measurement.</p></li>
|
||||
<li><p>The best lap time is stored as reference.</p></li>
|
||||
</ul>
|
||||
<h3 id="build-and-run">Build and Run</h3>
|
||||
<p>Compile the source code and link X libraries if necessary. The
|
||||
program takes three options which have to be typed in a specific order
|
||||
as described below.</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="ex">Usage:</span> ./vik1 <span class="pp">[</span><span class="st">'a'</span><span class="pp">][</span><span class="st">'d'</span><span class="pp">][</span><span class="ss">#</span><span class="pp">]</span></span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">a</span> <span class="at">-</span> Advanced racing in a winter landscape</span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="ex">d</span> <span class="at">-</span> Racing in at night in the dark</span>
|
||||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="co"># - Race track selection 1-3 are valid numbers</span></span></code></pre></div>
|
||||
<p>Here are a few examples:</p>
|
||||
<pre><code>Command line: Description:
|
||||
|
||||
$ ./vik1 Run track 1 at daytime in the summer
|
||||
$ ./vik1 a Run track 1 at daytime in the winter
|
||||
$ ./vik1 d Run track 1 at night in the summer
|
||||
$ ./vik1 3 Run track 3 at daytime in the summer
|
||||
$ ./vik1 d3 Run track 3 at night in the summer
|
||||
$ ./vik1 ad2 Run track 2 at night in the winter</code></pre>
|
||||
<p>Note that the order in which the argument characters are entered is
|
||||
important. It is for example not possible to type
|
||||
<code>./vik1 da</code>. (Well it is possible, but the result will not be
|
||||
as expected.)</p>
|
||||
<p>The space key accelerates the car. Releasing the space key slowly
|
||||
reduces the speed. The left and right arrow keys are used to steer the
|
||||
car.</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>The main obfuscation is the fact that the program is extremely
|
||||
compact. There are a few things I didn’t want to do, e.g. define
|
||||
<code>#define</code> to a single letter to save some space, or to remove
|
||||
casts to save some space.</p>
|
||||
<p>The program uses a lot of variables. In fact, all letters
|
||||
<code>a-z</code> are used and most letters <code>A-Z</code>.</p>
|
||||
<p>The constants are chosen very carefully and they have multiple
|
||||
purposes, e.g. a constant can be both the length of the track and a
|
||||
color.</p>
|
||||
<p>Most of the code is kept inside five <code>for</code> loops each
|
||||
without a body. Each <code>for</code> loop does many things. One
|
||||
<code>for</code> loop draws all cars by restarting a couple of times.
|
||||
Another draws the road, mountains, and the sun.</p>
|
||||
<p><code>main()</code> is called recursively. The return value and
|
||||
output depends on the arguments. <code>main()</code> can return the
|
||||
current time, draw lines and of course be the entry point of the
|
||||
application.</p>
|
||||
<p>The program frequently uses the <code>?:</code> operator mainly to
|
||||
save space but it makes the program more obscure.</p>
|
||||
<h3 id="compiler-warnings">Compiler warnings</h3>
|
||||
<p>There are no compiler warnings when compiling with <code>-ansi</code>
|
||||
but there are many warnings from lclint. Mainly because the program is
|
||||
very optimized for code size.</p>
|
||||
<h3 id="limitations">Limitations</h3>
|
||||
<p>The program only compiles and runs on X based systems.</p>
|
||||
<p>The program requires a display with 24 bit color depth. It also
|
||||
assumes that the byte order of the colors are as on my Linux PC. That
|
||||
is, The colors are represented by a 32 bit value where the bytes (from
|
||||
high to low) are <code>{ 0, RED, GREEN, BLUE }</code>.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004vik1"><a name="inventory"></a>Inventory for
|
||||
2004/vik1</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik1/vik1.c">vik1.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik1/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik1/vik1.orig.c">vik1.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="2004_vik1.tar.bz2">2004_vik1.tar.bz2</a> - download winning
|
||||
source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik1/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik1/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik1/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fvik1%2Findex.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 -->
|
||||
+366
-13
@@ -1,4 +1,6 @@
|
||||
<!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 !!! -->
|
||||
@@ -6,27 +8,378 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2004/vik2/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2004 vik2</title>
|
||||
<meta name="description" content="IOCCC year: 2004 IOCCC winner: vik2 winner index page">
|
||||
<meta name="keywords" content="IOCCC,2004,vik2,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2004/vik2</title>
|
||||
<meta name="description" content="2004 IOCCC winner vik2">
|
||||
<meta name="keywords" content="IOCCC, 2004, IOCCC 2004, IOCCC winner, vik2">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2004 vik2</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2004/vik2</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.last.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2004%2Fvik2%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2004/vik2/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../vik1/index.html">← vik1</a>
|
||||
<a class="Left" href="../index.html">↑ 2004 ↑</a>
|
||||
<a class="Left Disabled" href="#">last entry</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.last.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="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Daniel_Vik">Daniel Vik</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#US">US</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./vik2</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The fun thing about <a
|
||||
href="https://en.wikipedia.org/wiki/C_preprocessor">CPP</a> abuses is
|
||||
that, in most cases, running the <a
|
||||
href="https://en.wikipedia.org/wiki/C_preprocessor">preprocessor</a> on
|
||||
them doesn’t help you decipher the obfuscated code. That’s assuming your
|
||||
preprocessor can take it at all.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="introduction">Introduction</h3>
|
||||
<p>It’s been a while since the last <a
|
||||
href="https://en.wikipedia.org/wiki/C_preprocessor">pre-processor</a>
|
||||
killer won the IOCCC. I thought it was time to relive hour long compile
|
||||
times so I made a program that does (almost) all computation in the
|
||||
pre-processor. The program even causes <code>gcc</code> (and other
|
||||
pre-processors) to crash when configured to do maximum number of
|
||||
computations. The default configuration of the <a
|
||||
href="Makefile">Makefile</a> is set to make the program compile in a not
|
||||
too long time.</p>
|
||||
<p>I’ve got <code>cpp</code> to crash in a couple of different ways.
|
||||
Most common is to get a segmentation fault, but a couple of times it
|
||||
just got stuck in some infinite loop.</p>
|
||||
<p>I actually had to write my own <a
|
||||
href="https://en.wikipedia.org/wiki/C_preprocessor">pre-processor</a> to
|
||||
verify that the program was doing the right thing…</p>
|
||||
<p>Since it takes a very long time to compile the program, there is a
|
||||
symbol that can be defined to shorten the compile time and avoid
|
||||
compiler errors.</p>
|
||||
<h3 id="features">Features</h3>
|
||||
<p>The program implements an 11-bit <a
|
||||
href="https://en.wikipedia.org/wiki/Arithmetic_logic_unit">ALU</a> in
|
||||
the <a
|
||||
href="https://en.wikipedia.org/wiki/C_preprocessor">pre-processor</a>.
|
||||
The ALU has two <a
|
||||
href="https://en.wikipedia.org/wiki/Processor_register">registers</a>,
|
||||
<code>X</code> and <code>Y</code>, for calculations and one status
|
||||
register <code>SR</code>. Each bit in the registers are represented by
|
||||
one symbol that are either defined or undefined.</p>
|
||||
<p>The ALU has six instructions:</p>
|
||||
<ul>
|
||||
<li><p><code>CLR_X</code> - Clear <a
|
||||
href="https://en.wikipedia.org/wiki/Processor_register">register</a>
|
||||
<code>X</code>.</p></li>
|
||||
<li><p><code>CLR_Y</code> - Clear <a
|
||||
href="https://en.wikipedia.org/wiki/Processor_register">register</a>
|
||||
<code>Y</code>.</p></li>
|
||||
<li><p><code>ADD</code> - Calculates <code>X</code> + <code>Y</code> and
|
||||
stores the result in <code>X</code>. If the result is larger than 11
|
||||
bits, the <a href="https://en.wikipedia.org/wiki/Carry_flag">CARRY
|
||||
bit</a> in <code>SR</code> is set otherwise the <code>CARRY</code> bit
|
||||
is cleared.</p></li>
|
||||
<li><p><code>SUB</code> - Calculates <code>X</code> - <code>Y</code> and
|
||||
stores the result in <code>X</code>. If <code>Y</code> was larger than
|
||||
<code>X</code>, the <a
|
||||
href="https://en.wikipedia.org/wiki/Carry_flag">CARRY bit</a> in
|
||||
<code>SR</code> is set otherwise the <code>CARRY</code> bit is
|
||||
cleared.</p></li>
|
||||
<li><p><code>TST</code> - If <code>X</code> == <code>Y</code> the
|
||||
<code>EQ</code> bit in <code>SR</code> is set, otherwise the
|
||||
<code>EQ</code> bit is cleared. If <code>X</code> < <code>Y</code>
|
||||
the <code>LT</code> bit in <code>SR</code> is set, otherwise the
|
||||
<code>LT</code> bit is cleared.</p></li>
|
||||
<li><p><code>INC2</code> - Calculates <code>X</code> + 2 and stores the
|
||||
result in <code>X</code>. The <a
|
||||
href="https://en.wikipedia.org/wiki/Carry_flag">CARRY bit</a> is handled
|
||||
as in the <code>ADD</code> instruction.</p></li>
|
||||
</ul>
|
||||
<p>Internally the <a
|
||||
href="https://en.wikipedia.org/wiki/Arithmetic_logic_unit">ALU</a>
|
||||
implements a one bit adder with a carry in and carry out. This adder is
|
||||
the core of the ALU. The <code>ADD</code> instruction uses the one bit
|
||||
adder to create the 11-bit adder. The <code>SUB</code> instruction is
|
||||
implemented by adding <code>~Y</code> to <code>X</code> and then add 1.
|
||||
Finally the <code>TST</code> instruction calculates <code>X-Y</code> and
|
||||
checks the result and the <a
|
||||
href="https://en.wikipedia.org/wiki/Carry_flag">CARRY bit</a> in the
|
||||
<code>SR</code> <a
|
||||
href="https://en.wikipedia.org/wiki/Processor_register">register</a> to
|
||||
set the <code>EQ</code> and <code>LT</code> bits.</p>
|
||||
<p>All calculations are made using only <code>#ifdef</code>,
|
||||
<code>#ifndef</code>, <code>#else</code>, <code>#endif</code>,
|
||||
<code>#define</code> and <code>#undef</code>. I never assign a value to
|
||||
a defined symbol. The logic is done by assuming that a defined symbol is
|
||||
1 and an undefined symbol is 0. (I guess this means that I have
|
||||
unlimited memory as long as I only store zeroes (!)).</p>
|
||||
<p>The application that uses the <a
|
||||
href="https://en.wikipedia.org/wiki/C_preprocessor">pre-processor</a> <a
|
||||
href="https://en.wikipedia.org/wiki/Arithmetic_logic_unit">ALU</a> is a
|
||||
<a href="https://en.wikipedia.org/wiki/Prime_number">prime number</a>
|
||||
generator. The application uses the same pre-processor directives.
|
||||
Needed variables are stored in memory represented by one defined or
|
||||
undefined symbol per bit. When doing arithmetics, the variables are
|
||||
loaded into the <code>X</code> and <code>Y</code> registers by defining
|
||||
/ undefining the <code>X</code> and <code>Y</code> <a
|
||||
href="https://en.wikipedia.org/wiki/Processor_register">register</a>
|
||||
bits. Then the calculation is made and the result is moved back to the
|
||||
memory.</p>
|
||||
<p>The choice of application may be a bit unfortunate since we’ve
|
||||
already seen a winning entry calculating <a
|
||||
href="https://en.wikipedia.org/wiki/Prime_number">prime numbers</a> in
|
||||
the <a
|
||||
href="https://en.wikipedia.org/wiki/C_preprocessor">pre-processor</a>.
|
||||
There is a big difference though. The <a
|
||||
href="/1988/applin/README.md">1988/applin</a> entry uses pre- processor
|
||||
arithmetic (in a very nice way though). This program only defines and
|
||||
undefines symbols in a well defined ;) way and doesn’t do any
|
||||
pre-processor arithmetics.</p>
|
||||
<p>The reason why I chose to do a <a
|
||||
href="https://en.wikipedia.org/wiki/Prime_number">prime number</a>
|
||||
application is that the algorithm can be written to do a lot of
|
||||
calculations without a lot of nesting (GNU <code>cpp</code> allows only
|
||||
200 nested includes).</p>
|
||||
<h3 id="build-and-run">Build and Run</h3>
|
||||
<p>First, do a first pre-processing of the initial definitions. The
|
||||
<code>FNAME</code> symbol must be defined to the name of the output
|
||||
file. If you want to speed up the compilation, define the
|
||||
<code>STOP</code> symbol to anything from <code>_3</code> to
|
||||
<code>_10</code>. (The default value is <code>_10</code> which will make
|
||||
the compilation take some time.) Prime numbers up to <code>2^STOP</code>
|
||||
will be calculated.</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cpp</span> <span class="st">'-DSTOP=_5'</span> <span class="st">'-DFNAME="tmp1.c"'</span> prog.c tmp1.c</span></code></pre></div>
|
||||
<p>Then use <code>cpp</code> or any other <a
|
||||
href="https://en.wikipedia.org/wiki/C_preprocessor">pre-processor</a> to
|
||||
do the actual work. This will take some time….</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">cpp</span> tmp1.c <span class="op">></span> tmp2.c</span></code></pre></div>
|
||||
<p>Finally compile the pre-processed file</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-O</span> tmp2.c <span class="at">-o</span> prog</span></code></pre></div>
|
||||
<p>Then run the program to reveal all prime numbers up to 32 (if you
|
||||
used <code>STOP=_5</code> as above):</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="ex">./vik2</span></span></code></pre></div>
|
||||
<h3 id="verification">Verification</h3>
|
||||
<p>I wasn’t able to compile the full program which calculates <a
|
||||
href="https://en.wikipedia.org/wiki/Prime_number">prime numbers</a> up
|
||||
to 1024 using GNU <code>cpp</code> (or any other <a
|
||||
href="https://en.wikipedia.org/wiki/C_preprocessor">pre-processor</a>)
|
||||
so I had to write my own. Knowing how the program works it was quite
|
||||
easy to reduce the compilation time from several hours to about one
|
||||
second. I also added some statistics to my home made pre-processor and I
|
||||
found that calculating prime numbers up to 1024 makes the program
|
||||
include itself over 6.8 million times (see the statistics table
|
||||
below).</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>Well, since 98.5% of the program is <a
|
||||
href="https://en.wikipedia.org/wiki/C_preprocessor">preprocessor</a>
|
||||
directives, the main obfuscation is the use of preprocessor
|
||||
directives.</p>
|
||||
<p>Doing arithmetics without actually using any arithmetic operations
|
||||
makes the program quite hard to follow.</p>
|
||||
<p>In order to actually do the calculations, the program includes itself
|
||||
a lot.</p>
|
||||
<p>The symbol names are made as short as possible to meet the space
|
||||
limits. This of course adds to the obfuscation (even though the program
|
||||
is quite obfuscated with longer, readable macro names.</p>
|
||||
<p>Finally, I made the 1.5% C code a bit harder to read by breaking all
|
||||
lines after three characters.</p>
|
||||
<p>The program has 1029 lines which makes it the longest entry (so
|
||||
far).</p>
|
||||
<p>Even though the pre-processed and indented output is easier to read,
|
||||
it is quite hard to find the code in it. The size of the pre-processed
|
||||
file is several Mb when using GNU <code>cpp</code>.</p>
|
||||
<h3 id="limitations">Limitations</h3>
|
||||
<p>In order to fit the program within the space limits, I had to define
|
||||
the <code>#define</code>, <code>#endif</code>, and some other directives
|
||||
as single character symbols. This does not compile on all <a
|
||||
href="https://en.wikipedia.org/wiki/C_preprocessor">pre-processors</a>
|
||||
but using GNU <code>cpp</code> as a first compilation step solves
|
||||
this.</p>
|
||||
<h3 id="statistics">Statistics</h3>
|
||||
<p>The table below contains some interesting statistics about the
|
||||
compilation of the program. The intermediate file size is the size of
|
||||
the output file of the <code>cpp</code> <a
|
||||
href="https://en.wikipedia.org/wiki/C_preprocessor">pre-processor</a>.
|
||||
The times taken to pre-process the program were measured using GNU
|
||||
<code>cpp</code> on my 2.0MHz P4 with 512Mb ram and a lot of disk.</p>
|
||||
<pre><code> Generated Recursive Max nest Intermediate
|
||||
Level prime nrs includes count file size Time
|
||||
|
||||
_3 < 8 2 322 9 74 748 4"
|
||||
_4 < 16 4 672 9 182 652 9"
|
||||
_5 < 32 14 237 9 629 121 32"
|
||||
_6 < 64 43 748 9 1 998 134 1'41"
|
||||
_7 < 128 149 851 11 6 823 575 5'50"
|
||||
_8 < 256 526 874 17 24 028 933 20'37"
|
||||
_9 < 512 1 920 272 38 65 527 808(*) 1h 42'19"(*)
|
||||
_10 < 1024 6 826 389 114 63 782 912(*) 2h 47'58"(*)
|
||||
|
||||
(*) Before cpp crashed.</code></pre>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2004vik2"><a name="inventory"></a>Inventory for
|
||||
2004/vik2</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik2/vik2.c">vik2.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik2/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik2/vik2.orig.c">vik2.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik2/vik2.possible.cat.death.c">vik2.possible.cat.death.c</a>
|
||||
- include file for winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik2/vik2_1.c">vik2_1.c</a>
|
||||
- include file for winning source</li>
|
||||
<li><a href="2004_vik2.tar.bz2">2004_vik2.tar.bz2</a> - download winning
|
||||
source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik2/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik2/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2004/vik2/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.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%2F2004%2Fvik2%2Findex.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 -->
|
||||
Reference in new issue
Block a user