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

+455 -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,467 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2012/endoh1/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>2012 endoh1</title>
<meta name="description" content="IOCCC year: 2012 IOCCC winner: endoh1 winner index page">
<meta name="keywords" content="IOCCC,2012,endoh1,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>2012/endoh1</title>
<meta name="description" content="2012 IOCCC winner endoh1">
<meta name="keywords" content="IOCCC, 2012, IOCCC 2012, IOCCC winner, endoh1">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2012 endoh1</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>2012/endoh1</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%2F2012%2Fendoh1%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2012/endoh1/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../dlowe/index.html">&larr; dlowe</a>
<a class="Left" href="../index.html">&uarr; 2012 &uarr;</a>
<a class="Left" href="../endoh2/index.html">endoh2 &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#Yusuke_Endoh">Yusuke Endoh</a><br>
Location: <a href="/temp-test-ioccc/location.html#JP">JP</a></p>
<!-- END: next line ends content generated by: bin/gen-author.sh -->
<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 two alt versions that let you control the compile time
variables that control the fluid behaviour and the added variables to
speed up or slow down the fluid as well as setting a timeout (if not 0):
one for the original black and white and the colour one added by the
author at the request of the judges. Another version is the deobfuscated
version provided by the author as well. 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">./endoh1</span> <span class="op">&lt;</span> configuration.txt</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">./endoh1</span> <span class="op">&lt;</span> endoh1.c</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh1</span> <span class="op">&lt;</span> pour-out.txt</span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh1</span> <span class="op">&lt;</span> fountain.txt</span></code></pre></div>
<p>Also try using <code>endoh1_color</code> as you would
<code>endoh1</code> above. <code>make</code> will compile this by
default.</p>
<h2 id="alternate-code">Alternate code:</h2>
<p>The files <a href="endoh1.alt.c">endoh1.alt.c</a> and <a
href="endoh1_color.alt.c">endoh1_color.alt.c</a> correspond to <a
href="endoh1.c">endoh1.c</a> and <a
href="endoh1_color.c">endoh1_color.c</a> but which allow you to speed up
or slow down the fluid and change the behaviour of the fluid. The file
<a href="endoh1.alt.c">endoh1.alt2.c</a> is deobfuscated and was
provided by the author.</p>
<h3 id="alternate-build">Alternate build:</h3>
<p>For the default values, 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="fu">make</span> alt alt2</span></code></pre></div>
<p>The <code>alt2</code> is only necessary if you wish to compile the
deobfuscated version but it is equivalent in function to the original
entry, <a href="endoh1.c">endoh1.c</a>.</p>
<p>In the <code>alt</code> versions a default time of 10 seconds is set
as an alarm so that one can more easily go through the list of files to
see them all in succession for fun. That is controlled by the variable
<code>A</code>; 0 disables it.</p>
<p>If you wish to change the speed you should do:</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 SLEEP=N alt</span></code></pre></div>
<p>where <code>N</code> is number or the letter <code>I</code>.</p>
<p>WARNING: if you’re sensitive to flashing colours or any flashing at
all do make sure you don’t decrease the value of <code>S</code>, the
sleep time passed to <code>usleep(3)</code>, too much.</p>
<p>If however you wish to change the gravity factor, pressure factor
and/or viscosity factor, you should redefine the values <code>G</code>,
<code>P</code> and/or <code>V</code> macros, respectively, with the same
caveat about numbers for <code>S</code> above. For instance if you wish
to change the viscosity and pressure factors but leave the other macros
alone:</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 VISCOSITY=X PRESSURE=Y alt</span></code></pre></div>
<p>where <code>X</code> and <code>Y</code> are numbers or the letter
<code>I</code> and which are, respectively, the viscosity and pressure
factors.</p>
<p>There is no restriction on what the number is because doing so
prevents the macros from being defined to <code>I</code> which would
prevent the author’s remarks about it from being done.</p>
<p>If you want to disable the alarm time, set <code>A</code> to 0:</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 TIMER=0 alt</span></code></pre></div>
<p>It cannot be &lt; 0 or &gt; 60 (arbitrarily selected).</p>
<p>Try slowing down the display by increasing the sleep time from
<code>12321</code> to <code>50000</code>:</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">make</span> clobber SLEEP=50000 alt</span></code></pre></div>
<p>Now try using both <code>endoh1.alt</code> and
<code>endoh1_color.alt</code> as you would <code>endoh1</code>
above.</p>
<p>Also try speeding up the display by decreasing the sleep time from
<code>12321</code> to <code>9999</code>:</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">make</span> clobber SLEEP=9999 alt2</span></code></pre></div>
<p>WARNING: again, be careful with too low a value if you’re sensitive
to flashing colours or anything at all.</p>
<p>Now try using both <code>endoh1.alt</code> and
<code>endoh1_color.alt</code> as you would <code>endoh1</code>
above.</p>
<p>You might also wish to try redefining the macros <code>G</code>,
<code>P</code> and/or <code>V</code>. For instance:</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">make</span> clobber GRAVITY=5 PRESSURE=5 VISCOSITY=5 alt</span></code></pre></div>
<p>You might try even:</p>
<div class="sourceCode" id="cb11"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber GRAVITY=I alt</span></code></pre></div>
<p>See the author’s remarks for details on these macros.</p>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>endoh1.alt</code>, <code>endoh1_color.alt</code> and
<code>endoh1.alt2</code> as you would <code>endoh1</code> and
<code>endoh1_color</code> above.</p>
<h3 id="alternate-try">Alternate try:</h3>
<p>To see two different ways run on the source file and each of the text
files, try:</p>
<div class="sourceCode" id="cb12"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.alt.sh</span></span></code></pre></div>
<p>The second run of each will be with the gravity factor set to
<code>I</code>.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Let’s play <a
href="https://en.wikipedia.org/wiki/Jeopardy!">Jeopardy!</a></p>
<p>A: An obfuscated program that deals with complex numbers and produces
animated ASCII graphics. Q: What is a Mandelbrot simulator?</p>
<p>Bzzzt!</p>
<p>Such heavily squeezed fluid simulation (this is parsed uniquely as
fluids are not squeezable) has a few quirks that the judges were happy
to experiment with.</p>
<p>One configuration file was inspired by an <a
href="https://web.archive.org/web/20230711134609/https://whatif.xkcd.com/6/">XKCD
what if? entry</a>.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="synopsis">Synopsis</h3>
<p><strong>DO NOT FORGET</strong> <code>-DG=1 -DP=4 -DV=8</code> and
make your terminal window larger than 80 x 25.</p>
<div class="sourceCode" id="cb13"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> endoh1.c <span class="at">-DG</span><span class="op">=</span>1 <span class="at">-DP</span><span class="op">=</span>4 <span class="at">-DV</span><span class="op">=</span>8 <span class="at">-D_BSD_SOURCE</span> <span class="at">-o</span> endoh1 <span class="at">-lm</span></span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh1</span> <span class="op">&lt;</span> endoh1.c</span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh1</span> <span class="op">&lt;</span> logo.txt</span>
<span id="cb13-4"><a href="#cb13-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh1</span> <span class="op">&lt;</span> column.txt</span>
<span id="cb13-5"><a href="#cb13-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh1</span> <span class="op">&lt;</span> pour-out.txt</span>
<span id="cb13-6"><a href="#cb13-6" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh1</span> <span class="op">&lt;</span> tanada.txt</span></code></pre></div>
<h3 id="what-it-is">What it is</h3>
<pre><code> ,___. ,. ,. ,. ,___. ,. ,. ,.
|/--&#39; || `&#39; || |/--&#39; `&#39; || |\_.
|\__. || ,. ,. ,. ,__/| |\__. ,. ,____. ,. ,. || ,_. |/-&#39; ,_. ,__.
|/--&#39; || || || || |/-\| `--\| || |/\/\| || || || ,/-\. || ,/-\. |/-\.
|| || `\_/| || |\_/| ,__/| || |||||| `\_/| || `\_/\.`\_. `\_/&#39; || `&#39;
`&#39; `&#39; `--&#39; `&#39; `---&#39; `---&#39; `&#39; `&#39;`&#39;`&#39; `--&#39; `&#39; `-&#39;`&#39; `-&#39; `-&#39; `&#39;
,.,. ,.,.
,/\/\. ,. ,. ,. ,/\/\. ,. ,. ,__.
|||#/&#39; || `&#39; ,_.|| |||#/&#39; `&#39;,_.,__. || ||\\. ,.
|||#\. || ,. ,. ,.,/#||| |\//\. ,.|#||##| ,. ,. || ,.,. |\/-&#39; ,.,. ,.|\.
|\/--&#39; ||,/\.|| |||#/\/| `\#||| |||#||/\|,/\.|| ||,/&#39;`\.|#| ,/&#39;`\.|\/-\.
`\| ||`\#||| |||#||\| ,//\/| ||`\|||||`\#||| ||`\.,/\/\|,.`\.,/&#39;`\| `&#39;
`&#39; `&#39; `-&#39;`&#39; `&#39;`-&#39;`-&#39; `-&#39;`-&#39; `&#39; `&#39;`&#39;`&#39; `-&#39;`&#39; `&#39; `&#39;`--&#39;`&#39;`&#39; `&#39;`&#39; `&#39;
,_.,_. ,. ,. ,. ,_.,_. ,. ,. ,.
|#||#| || `&#39; || |#||#| `&#39; || ||,_.
||\/#| ||,. ,. ,.,_.,/| |\||#| ,.,_.,__.,. ,. || ,.,. |||#| ,.,. ,.,_.
|||##| |||| || |||#||#| |#||#| |||#||##||| || ||,/||\.||`-&#39;,/||\.|||#\.
||`--&#39; ||`\_.|| |||\||#| |#||#| ||||&#39;||\|`\_.|| ||`\||#|`\.,.`\||/&#39;||`--&#39;
`&#39; `&#39; |#||| `&#39;|#||#| |#||#| `&#39;`&#39; `&#39;`&#39; |#||| `&#39; |||/&#39; |||| |||| `&#39;
`-&#39;`&#39; `-&#39;`-&#39; `-&#39;`-&#39; `-&#39;`&#39; `&#39;`&#39; `&#39;`&#39; `&#39;`&#39;
</code></pre>
<p>This program is a fluid simulator using the <a
href="http://en.wikipedia.org/wiki/Smoothed-particle_hydrodynamics">Smoothed-particle
hydrodynamics (SPH)</a> method.</p>
<p>The SPH particles represent the fluid flow. Particles have
information about the position, density, and velocity. In every
simulation step, they are changed by pressure force, viscosity force,
and external force (i.e., gravity).</p>
<p>This program reads a text from standard input, and uses it as an
initial configuration of the particles. The character <code>#</code>
represents a “wall particle” (a particle with a fixed position), and any
other non-space characters represent free particles.</p>
<p>The compilation options <code>-DG=1 -DP=4 -DV=8</code> represent,
respectively, the factor of gravity, pressure, and viscosity. By
changing their values, you can see different fluid behavior.</p>
<p><a href="http://en.wikipedia.org/wiki/Marching_squares">Marching
square</a>-like algorithm is used to render the particles.</p>
<h3 id="portability">Portability</h3>
<p>The program requires a C99 compiler; it uses <code>complex</code>
types and one-line comments. It also uses <code>usleep(3)</code>, which
may require <code>-D_BSD_SOURCE</code> or so to build with no warning.
Under these conditions, it should be portable. At least, recent
compilers with <code>-std=c99 -Wall -W -Wextra -pedantic</code> say
nothing.</p>
<div class="sourceCode" id="cb15"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="at">-DG</span><span class="op">=</span>1 <span class="at">-DP</span><span class="op">=</span>4 <span class="at">-DV</span><span class="op">=</span>8 <span class="at">-D_BSD_SOURCE</span> <span class="at">-std</span><span class="op">=</span>c99 <span class="at">-Wall</span> <span class="at">-W</span> <span class="at">-Wextra</span> <span class="at">-pedantic</span> endoh1.c</span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> <span class="at">-DG</span><span class="op">=</span>1 <span class="at">-DP</span><span class="op">=</span>4 <span class="at">-DV</span><span class="op">=</span>8 <span class="at">-D_BSD_SOURCE</span> <span class="at">-std</span><span class="op">=</span>c99 <span class="at">-Wall</span> <span class="at">-W</span> <span class="at">-Wextra</span> <span class="at">-pedantic</span> endoh1.c</span></code></pre></div>
<p>I expect it to work in any Unix-like environment. VTxxx/ANSI
sequences are used to clear screen and move cursor to home.</p>
<p>I’ve tested with gcc-4.6.3 and clang-3.0 on Linux (Ubuntu 12.04) and
gcc-4.5.3 and clang-3.1 on Cygwin. On Cygwin, gcc and clang complain
about a usage of <code>I</code> (complex’s imaginary unit), but I bet
this is cygwin’s issue; it is surely a C99 feature.</p>
<h3 id="obfuscation-w-spoiler">Obfuscation w/ Spoiler</h3>
<p>First of all, the source code itself serves as an initial
configuration. Preprocessing directives (such as
<code>#include</code>)’s <code>#</code> serve as walls.</p>
<p>This program uses <code>double complex</code> to represent any 2D
vector. But, note that the <code>x-axis</code> and <code>y-axis</code>
are swapped (real axis = y-axis, imaginary axis = x-axis). The purpose
of swapping is not only obfuscation, but also short coding: for example,
to add gravity to total force, <code>force += G</code> suffices, rather
than <code>force += G*I</code>.</p>
<p>(Incidentally, you can exert horizontal gravity by using for instance
<code>-DG=I</code>)</p>
<p>Every five entries of <code>double complex a[]</code> contain
information of one particle: position, wall-flag, density, force, and
velocity, in turn.</p>
<p>You can use <code>G</code>, <code>P</code>, and <code>V</code> as a
guide to find the calculation code of gravity, pressure, and viscosity
forces.</p>
<p>Though some assignments may look meaningless, they are actually
meaningful; they extract “integer part of real part” from a complex
value by assigning (and casting) it to an integer-type variable.</p>
<h3 id="notes-about-additional-files">Notes about Additional Files</h3>
<p><a href="logo.txt">logo.txt</a> is a source of the logo in this
remark file.</p>
<p><a href="column.txt">column.txt</a> is a water column collapse, which
is a popular demo of SPH.</p>
<p><a href="pour-out.txt">pour-out.txt</a> pours you a cup of tea.</p>
<p><a href="tanada.txt">tanada.txt</a> simulates “Terrace farming”.
(“Tanada” means a “<a
href="https://en.wikipedia.org/wiki/Terrace_(earthworks)">terraced rice
fields</a>” in Japanese.)</p>
<p><a href="clock.txt">clock.txt</a> is a “water” clock created by
HAMANO Tsukasa.</p>
<p>Other <code>*.txt</code> files are from the judges.</p>
<p><a href="endoh1_color.c">endoh1_color.c</a> is a variant that shows
the density by using terminal 256 colors.</p>
<h3 id="acknowledgments">Acknowledgments</h3>
<p>I would like to thank my wife <span class="citation"
data-cites="hirekoke">@hirekoke</span> for her teaching me the SPH
method.</p>
<p>The judges <strike>ordered</strike> suggested creating a color
version after the contest.</p>
<p>The judges and HAMANO Tsukasa (The silver medalist at this IOCCC)
kindly provided many configuration files.</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-2012endoh1"><a name="inventory"></a>Inventory for
2012/endoh1</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/2012/endoh1/endoh1.c">endoh1.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/endoh1.alt.c">endoh1.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/endoh1.alt2.c">endoh1.alt2.c</a>
- alternate alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/endoh1_color.alt.c">endoh1_color.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/endoh1.orig.c">endoh1.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/clock.txt">clock.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/column.txt">column.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/column2.txt">column2.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/column3.txt">column3.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/corners.txt">corners.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/dripping-pan.txt">dripping-pan.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/evaporation.txt">evaporation.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/flat.txt">flat.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/fountain.txt">fountain.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/funnel.txt">funnel.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/funnel2.txt">funnel2.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/funnel3.txt">funnel3.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/glass-half-empty.txt">glass-half-empty.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/leidenfrost.txt">leidenfrost.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/logo.txt">logo.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/pour-out.txt">pour-out.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/tanada.txt">tanada.txt</a>
- fluid initial state as text</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/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/2012/endoh1/endoh1_color.c">endoh1_color.c</a>
- alternative source using terminal 256 colors</li>
<li><a href="2012_endoh1.tar.bz2">2012_endoh1.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/2012/endoh1/.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/2012/endoh1/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/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%2F2012%2Fendoh1%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 -->