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:
Landon Curt Noll committed 2024-01-17 00:32:39 -08:00
1 parent 893cd915b6
commit c1466f5165
350 files changed
+95242 -4217

No files matched your search

+346 -13
View File
@@ -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,358 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2015/dogon/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>2015 dogon</title>
<meta name="description" content="IOCCC year: 2015 IOCCC winner: dogon winner index page">
<meta name="keywords" content="IOCCC,2015,dogon,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>2015/dogon</title>
<meta name="description" content="2015 IOCCC winner dogon">
<meta name="keywords" content="IOCCC, 2015, IOCCC 2015, IOCCC winner, dogon">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2015 dogon</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>2015/dogon</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%2F2015%2Fdogon%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2015/dogon/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../burton/index.html">&larr; burton</a>
<a class="Left" href="../index.html">&uarr; 2015 &uarr;</a>
<a class="Left" href="../duble/index.html">duble &rarr;</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 &amp; (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#Gil_Dogon">Gil Dogon</a><br>
Location: <a href="/temp-test-ioccc/location.html#IL">IL</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>To change the dimensions you can use the <code>WIDTH</code> and
<code>HEIGHT</code> variables when compiling (default 1024 x 800):</p>
<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="fu">make</span> clobber WIDTH=640 HEIGHT=480</span></code></pre></div>
<p>to make the game 640 x 480. Obviously changing it to non numbers or
negative numbers or too large numbers will cause problems.</p>
<p>There is an alternate version that is based on the author’s
suggestion to change a value in order to see a bug that they avoided in
their entry. See <a href="#alternate-code">Alternate code</a> below.</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">./prog</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">./prog</span></span></code></pre></div>
<p>Press and hold the Left Arrow key until you turn 90-degrees to the
left.</p>
<p>When you see a long tunnel, press the function key F2.</p>
<p>Use the Up, Down, Left and Right keys to change your path.</p>
<p>Press function higher numbered function keys (F3, F4, …) to go
faster.</p>
<p>Press F1 to stop.</p>
<p>Turn 90-degrees to one side.</p>
<p>Press F4 to drill into some blocks for a bit.</p>
<p>Press F1 to stop.</p>
<p>Turn 180-degrees to face the way you came.</p>
<p>Press F2 and navigate back down the new hole until you reach the long
tunnel again.</p>
<p>Press F1 to stop.</p>
<p>etc.</p>
<p>Press the ESC key.</p>
<h2 id="alternate-code">Alternate code:</h2>
<p>The author suggested that one change <code>q</code> to
<code>0x82000820000000</code> instead of <code>0x820008202625a0</code>
to see a bug that they avoided, writing:</p>
<pre><code>To see this bug in action change the assignment above
to q=0x82000820000000`, and look towards the negative
direction of the main tunnel.</code></pre>
<p>This alt version does this for you.</p>
<h3 id="alternate-build">Alternate build:</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="fu">make</span> alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>prog.alt</code> as you would <code>prog</code> above.</p>
<h3 id="alternate-try">Alternate try:</h3>
<p>Try locating the issue the author suggested exists.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>You are in a twisty maze blocks, almost all alike.</p>
<p>Those blocks are generated by twisty maze of code blocks, almost all
different.</p>
<p>Can you find your way around either and understand where you are?</p>
<p>How many function keys does your keyboard have? Can you generate very
high number function keys such as F30 or F31? :-)</p>
<p><em>Textures? We don’t need no stinking textures.</em></p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="what-is-it">What is it?</h3>
<p>Just run <code>./prog</code> with no arguments on an X11-compatible
system. The scenery, though pseudo-randomly generated should be
strangely familiar, especially to those still in their teenage years.
You can navigate using the keyboard arrow keys and the function keys.
Your speed is a linear function of <code>(n-1)</code> where
<code>Fn</code> is the last function key you have pressed, and you
always move in the direction you are looking at. Be aware that you are
probably some kind of a Creeper as is obvious from looking at the
program, hence your movement is destructive to the environment. So after
pressing F12 for warp speed, and moving around randomly, you might find
yourself in a 3D maze of twisty little passages, from which there is
only one Esc(ape) key. Note that in theory if you have a specialty
keyboard with 32 function keys you may even press F31 to reach infinite
improbability drive speed, though the author had never tested this
feature. However a hidden comment in <code>keysymdef.h</code> suggests
the existence of a mythical Sun Keyboard with 35 function keys :)</p>
<h3 id="full-disclosure">Full disclosure:</h3>
<p>This entry, though pretty thoroughly obfuscated, is not entirely
original, nor am I Notch. The inspiration for this entry is a demo code
written by the Notch himself, which was released with the following
license: “you may use the code in here for any purpose in any way you
want, at your own risk”. That version will henceforth be referred to as
the original. Though the original in itself was quite nice and rather
dense piece of code, it was not written in C, nor entirely and
meticulously obfuscated, a state of things I hopefully rectified.</p>
<h3 id="some-extra-features">Some extra features:</h3>
<p>Basing it on the original which already had a wonderful simple and
concise ray casting through a generated voxel world rendering, I added a
few tweaks of my own device:</p>
<ul>
<li>Two pass optimized rendering. The program first calculates 1/16 of
the output image by ray casting and then, when possible, uses texture
interpolation on the voxel faces. It speeds up the rendering by at least
a factor of 4 on most scenes, but extra care must be taken when passing
rays through the leaves voxels …</li>
<li>Fixed a small omission in the original. When you looked though a
transparent leaves voxel, you did not see the leaves at voxel faces that
were far from you. In this version the rendering of those (far face
leaves) is correct.</li>
<li>Window rendering size specified in Makefile.</li>
<li>Added the keyboard controls for navigation (and destruction).</li>
</ul>
<h3 id="portability-issues">Portability issues:</h3>
<p>This entry is rather portable I think on modern platforms. It assumes
of course basic X-windows availability. There are several other salient
assumptions though:</p>
<ul>
<li>The entry assumes <code>sizeof(int)==4</code>. This seems to cover
pretty much everything that supports X-windows so would be broken only
on quite ancient machines, embedded processors, or some big iron 64 bit
system where <code>sizeof(int)=8</code>.</li>
<li>The entry assumes the default visual has 24 bit depth (RGB). This
seems to be the case on most X Servers these days.</li>
<li>The entry, does a thing which is an absolute No-No for X-windows
program, i.e. assuming it knows some numeric values for keysyms defined
in <code>keysymdef.h</code>. I have searched far and wide the lord
Google’s domain, yet was unable to find a version of the file where
those assumptions were broken. This enables the important support of up
to 32 function keys keyboards without spilling over the size limit, and
allows us to use such fun expression for arrow view control as the
following:</li>
</ul>
<div class="sourceCode" id="cb7"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="op">*(</span>a<span class="op">&amp;</span><span class="dv">1</span><span class="op">?&amp;</span>C<span class="op">:&amp;</span>B<span class="op">)-=(</span><span class="fl">.05</span> <span class="op">-</span>a<span class="op">/</span><span class="dv">2</span><span class="op">%</span><span class="dv">2</span><span class="op">*</span><span class="fl">.1</span><span class="op">)*!(</span>a<span class="op">-</span><span class="dv">1</span><span class="op">&amp;</span><span class="dv">4092</span><span class="op">^</span><span class="dv">3920</span><span class="op">)</span></span></code></pre></div>
<h3 id="precision-issues">Precision issues:</h3>
<p>The entry, on purpose, (see the section about SIMD below) does not
use enough bits of precision, so sometimes the ray will miss the
intersection of two voxel faces and push on through. That’s why you may
notice some noise along close up voxel edges. Fixing this issue would
have taken the entry over the size limit regrettably.</p>
<h3 id="obfuscations">Obfuscations:</h3>
<p>Well, of course you have all the usual suspects, used for extreme
compression, and such a nice layout: not very informative identifiers,
which are being reused all over the place, some rather gruesome looking
expressions, a whole load of magic constants with apparently no rhyme or
reason (including a Lagrange polynomial), and a message from our
friendly Cetaceans. However it also includes some clever and not so
obvious though instructive techniques, to subtly make the code more
magical and efficient, at the same time.</p>
<p>Those techniques are about the use of 64 bit integers in order to do
SIMD work, in a portable way without ever using any SSE/AVX or other
non-portable compiler inline functions! The irony though, is that when
compiling the program on modern X86 architectures indeed SSE/AVX is used
for the long longs. Following is some “Spoiler” information, So if you
want to play tough, stop reading at this point.</p>
<h3 id="portable-simd-programming">Portable SIMD programming:</h3>
<p>So how is this done? Quite simply by using the whole
<code>long long</code> arithmetic’s capability. I think the C99 standard
assures us that <code>long long</code> has at least 64 bits. Most of
those bits are unused in normal programs, however here we use them more
wisely. For example, in the inner loop of the program you have the
innocent looking expression <code>i+=d</code>. What it does in fact, is
a SIMD addition of two vectors, each with three signed fixed point
coordinates, advancing our ray in 3D space!</p>
<p>To spell it out, the macro producing such vectors is <code>P</code>,
and the assignment <code>q=0x820008202625a0</code> sets our creeper
original position to about <code>(32.5, 32.5019, 2441.406)</code>.</p>
<p>Evidently when doing such arithmetics, care must me taken to avoid
overflow from one component to the other, but since our voxel world is a
torus of size 64 in each dimension this hardly matters. A subtle issue,
is how to deal with signed quantities. In the <code>i+=d</code>
expression above <code>i</code> has 3 positive components, but
<code>d</code> has arbitrary signed components, as our ray may face in
any direction. It seems things should not work, specially as we defined
both <code>i</code> and <code>d</code> as <code>unsigned</code>! However
notice that the <code>T</code> (and <code>P</code>) macros convert
<code>float</code> to <code>signed long long</code>s.</p>
<p>Once sign is extended from a least component into higher bits, it
seems at first to be recipe for disaster, however everything works
beautifully, and you get precise component results when the final
accumulation components in <code>i</code> are positive. This only gets
broken a bit when the final accumulation has a least significant
negative component. To see this bug in action change the assignment
above to <code>q=0x82000820000000</code>, and look towards the negative
direction of the main tunnel.</p>
<p>Similar technique is used on the RGB components so their brightness
can be adjusted simultaneously by the expression:
<code>o=o*b&gt;&gt;8</code>. Of course some spare bits are needed
between the components, so they are spread in the <code>long long</code>
and reordered as RBG.</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-2015dogon"><a name="inventory"></a>Inventory for
2015/dogon</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/2015/dogon/prog.c">prog.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/dogon/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/dogon/prog.alt.c">prog.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/dogon/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a href="2015_dogon.tar.bz2">2015_dogon.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/2015/dogon/.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/2015/dogon/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/dogon/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%2F2015%2Fdogon%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 -->