force use of pandoc version >= 3.1.12.2

The `bin/pandoc-wrapper.sh` tool will verify that the ssytem
has a recent enough version of `pandoc(1)`.

We explain why we insist on `pandoc(1)`. version >= 3.1.12.2
in comments where the $PANDOC_MIN_VERSION is set.

Added `--wrap=preserve` as a default argument to `pandoc(1)`.
While this change will impact every HTML file generated,
we believe this will improve the ability of someone to look
at the generated HTML and correlate with the original markdown.

Changed `bin/pandoc-wrapper.sh` VERSION from "1.4.2 2024-03-17"
to "1.4.3 2024-03-18".

Performed `make www` to achieve all of the above and to generate
HTML using the new  `--wrap=preserve` `pandoc(1)` mode.
This commit is contained in:
Landon Curt Noll committed 2024-03-18 01:26:39 -07:00
1 parent 9eb7a54e9f
commit b0b212acb1
402 files changed
+37061 -55132

No files matched your search

+123 -160
View File
@@ -130,8 +130,8 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Gil_Dogon">Gil Dogon</a><br>
Location: <a href="../../location.html#IL">IL</a> - <em>State of
Israel</em> (<em>Israel</em>) <br><br></li>
Location: <a href="../../location.html#IL">IL</a> - <em>State of Israel</em> (<em>Israel</em>)
<br><br></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -141,38 +141,35 @@ Israel</em> (<em>Israel</em>) <br><br></li>
<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>
<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>
<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>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 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 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>
<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>
@@ -185,180 +182,146 @@ direction of the main tunnel.</code></pre>
<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>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>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>
<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>
<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>
<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>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>
<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>
<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>
<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>
<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>
<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>
<p>For more information, see: https://creativecommons.org/licenses/by-sa/4.0/</p>
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.sh -->
<!-- START: this line starts content generated by: bin/output-index-inventory.sh -->
<h1 id="inventory-for-2015dogon"><a name="inventory"></a>Inventory for
2015/dogon</h1>
<h1 id="inventory-for-2015dogon"><a name="inventory"></a>Inventory for 2015/dogon</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/dogon/prog.c">prog.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/dogon/Makefile">Makefile</a>
- entry 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 entry
source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/dogon/prog.c">prog.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/dogon/Makefile">Makefile</a> - entry 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 entry source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/dogon/.entry.json">.entry.json</a>
- description of entry in JSON</li>
<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="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2015/dogon/.entry.json">.entry.json</a> - description of entry in JSON</li>
<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/README.md">README.md</a>
- markdown source for index.html</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/output-index-inventory.sh -->