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:
1 parent
9eb7a54e9f
commit
b0b212acb1
402 files changed
+37061
-55132
No files matched your search
+346
-526
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Michael_Birken">Michael
|
||||
Birken</a><br> Location: <a href="../../location.html#US">US</a> -
|
||||
<em>United States of America</em> (<em>United States</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Michael_Birken">Michael Birken</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -141,640 +141,460 @@ Birken</a><br> Location: <a href="../../location.html#US">US</a> -
|
||||
|
||||
<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> alt</span></code></pre></div>
|
||||
<p>We recommend that you use the alt version first to see what this
|
||||
entry looked like back in 2013 (with a configurable speed). If you wish
|
||||
to use the original version see the <a href="#original-code">original
|
||||
code</a> section below.</p>
|
||||
<p>We recommend that you use the alt version first to see what this entry looked
|
||||
like back in 2013 (with a configurable speed). If you wish to use the original
|
||||
version see the <a href="#original-code">original code</a> section 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">./birken.alt</span> <span class="op"><</span> 17_columns_wide_paint_by_numbers_file</span></code></pre></div>
|
||||
<p>NOTE: if your terminal is messed up after running this (perhaps from
|
||||
exiting before it finishes) try using <code>reset</code> to restore the
|
||||
terminal. This will clear the screen.</p>
|
||||
<p>NOTE: if your terminal is messed up after running this (perhaps from exiting
|
||||
before it finishes) try using <code>reset</code> to restore the terminal. This will clear
|
||||
the screen.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>This alternate version, which we recommend that you use in order to
|
||||
see what is happening with modern systems, and to not flash colours too
|
||||
quickly, which can be problematic for some people, can be configured to
|
||||
different speeds by way of the value used in <code>usleep(3)</code>. The
|
||||
default is <code>13500</code> but you can reconfigure it should you wish
|
||||
(see below).</p>
|
||||
<p>This alternate version, which we recommend that you use in order to see what is
|
||||
happening with modern systems, and to not flash colours too quickly, which can
|
||||
be problematic for some people, can be configured to different speeds by way of
|
||||
the value used in <code>usleep(3)</code>. The default is <code>13500</code> but you can reconfigure
|
||||
it should you wish (see below).</p>
|
||||
<p>To see the program run on each text file, try:</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="ex">./try.alt.sh</span></span></code></pre></div>
|
||||
<p>If you have perl installed it will also try a random run.</p>
|
||||
<p>Finding the ‘right’ default value was a fine line; the default, 15000
|
||||
microseconds (0.015 seconds), will take quite a while to finish but it
|
||||
allows one to more easily see what is going on. Even easier to see would
|
||||
be 25000 but these values make it quite slow and one could easily lose
|
||||
interest. Like some other entries where this was made an alternate
|
||||
version it is configurable at compile time. If you wish to speed it up
|
||||
by 100% you can instead do:</p>
|
||||
microseconds (0.015 seconds), will take quite a while to finish but it allows
|
||||
one to more easily see what is going on. Even easier to see would be 25000 but
|
||||
these values make it quite slow and one could easily lose interest. Like some
|
||||
other entries where this was made an alternate version it is configurable at
|
||||
compile time. If you wish to speed it up by 100% you can instead 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">make</span> clobber SLEEP=7500 alt</span></code></pre></div>
|
||||
<p>and then try <code>birken.alt</code> as above.</p>
|
||||
<p>If you wish to speed that up 200% (300% total) you can use instead
|
||||
try <code>SLEEP=3750</code>. Doing this you might find the right value
|
||||
to your liking; use ctrl-c to terminate the program early but note that
|
||||
the terminal is likely to be messed up. In that case try:</p>
|
||||
<p>If you wish to speed that up 200% (300% total) you can use instead try
|
||||
<code>SLEEP=3750</code>. Doing this you might find the right value to your liking; use
|
||||
ctrl-c to terminate the program early but note that the terminal is likely to be
|
||||
messed up. In that case 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="ex">reset</span></span></code></pre></div>
|
||||
<p>to make it sane again (running to completion will do that for
|
||||
you).</p>
|
||||
<p>to make it sane again (running to completion will do that for you).</p>
|
||||
<h2 id="original-code">Original code:</h2>
|
||||
<p>The original code will run faster with modern systems which is likely
|
||||
to make it hard to see the art of the entry but you may do so if you
|
||||
wish.</p>
|
||||
<p>The original code will run faster with modern systems which is likely to make it
|
||||
hard to see the art of the entry but you may do so if you wish.</p>
|
||||
<h3 id="original-build">Original 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> all</span></code></pre></div>
|
||||
<h3 id="original-use">Original use:</h3>
|
||||
<p>Use <code>birken</code> as you would <code>birken.alt</code>
|
||||
above.</p>
|
||||
<p>Use <code>birken</code> as you would <code>birken.alt</code> above.</p>
|
||||
<h3 id="original-try">Original try:</h3>
|
||||
<p>To use the demo script with the original code, 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="ex">./try.sh</span></span></code></pre></div>
|
||||
<p>PLEASE be careful if you are sensitive to flashing colours!</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This program also wins the “Most amusing abuse of the iocccsize tool”
|
||||
award; although not the absolute best: it is possible to achieve 0 by
|
||||
writing:</p>
|
||||
<p>This program also wins the “Most amusing abuse of the iocccsize tool” award;
|
||||
although not the absolute best: it is possible to achieve 0 by writing:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a> <span class="co">/* *\</span></span>
|
||||
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="co"> /....</span></span></code></pre></div>
|
||||
<p>The game of Tetris had been used in many endeavors, from studying <a
|
||||
href="http://arxiv.org/abs/cs/0210020">algorithmic complexity</a> to <a
|
||||
href="http://www.livescience.com/19894-tetris-treat-ptsd-flashbacks.html">treating
|
||||
PTSD</a> and it’s even been <a
|
||||
href="http://hacks.mit.edu/Hacks/by_year/2012/tetris/">put on MIT’s
|
||||
Green Building</a>. Using it for painting by numbers looks like a novel
|
||||
idea.</p>
|
||||
<p>The game of Tetris had been used in many endeavors, from studying <a href="http://arxiv.org/abs/cs/0210020">algorithmic
|
||||
complexity</a> to <a href="http://www.livescience.com/19894-tetris-treat-ptsd-flashbacks.html">treating
|
||||
PTSD</a> and
|
||||
it’s even been <a href="http://hacks.mit.edu/Hacks/by_year/2012/tetris/">put on MIT’s Green
|
||||
Building</a>.
|
||||
Using it for painting by numbers looks like a novel idea.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="about-this-document">About This Document</h3>
|
||||
<p>This document is best viewed as an HTML file in a browser that
|
||||
supports animated <a
|
||||
href="https://en.wikipedia.org/wiki/GIF">GIF</a>s.</p>
|
||||
<p>See the files: <code>*.txt</code>, <code>*.png</code> and
|
||||
<code>*.gif</code>.</p>
|
||||
<p>This document is best viewed as an HTML file in a browser that supports animated
|
||||
<a href="https://en.wikipedia.org/wiki/GIF">GIF</a>s.</p>
|
||||
<p>See the files: <code>*.txt</code>, <code>*.png</code> and <code>*.gif</code>.</p>
|
||||
<h3 id="abstract">Abstract</h3>
|
||||
<p>By rotating, positioning and dropping a predetermined sequence of
|
||||
pieces, this program exploits the mechanics of Tetris to generate
|
||||
arbitrary images.</p>
|
||||
<p>By rotating, positioning and dropping a predetermined sequence of pieces, this
|
||||
program exploits the mechanics of Tetris to generate arbitrary images.</p>
|
||||
<h3 id="algorithm-overview">Algorithm Overview</h3>
|
||||
<p>The algorithm converts pixels from a source image into squares in the
|
||||
<a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> play-field,
|
||||
one row at a time from the bottom up. To generate an individual square,
|
||||
the algorithm assembles a structure consisting of a rectangular region
|
||||
fully supported by a single square protruding from the bottom. When the
|
||||
rectangular region is completed, its rows are cleared, leaving behind
|
||||
the protruding square. Three examples of the process appear below.</p>
|
||||
<a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> play-field, one row at a time
|
||||
from the bottom up. To generate an individual square, the algorithm assembles a
|
||||
structure consisting of a rectangular region fully supported by a single square
|
||||
protruding from the bottom. When the rectangular region is completed, its rows
|
||||
are cleared, leaving behind the protruding square. Three examples of the process
|
||||
appear below.</p>
|
||||
<p><img src="pen0.gif" /></p>
|
||||
<p><img src="pen1.gif" /></p>
|
||||
<p><img src="pen2.gif" /></p>
|
||||
<p>During construction of a row, all of the squares produced by this
|
||||
method must be supported. In the images above, the generated squares are
|
||||
supported by the floor of the play-field. However, if an arbitrary row
|
||||
contains holes, it may not provide the support necessary for the
|
||||
construction of the row above it. The algorithm solves this problem by
|
||||
constructing a flat platform on top of the row with holes. In the
|
||||
animation below, a platform is built above a row comprising of a single
|
||||
red square. The platform is a temporary structure and inserting the
|
||||
<p>During construction of a row, all of the squares produced by this method must be
|
||||
supported. In the images above, the generated squares are supported by the floor
|
||||
of the play-field. However, if an arbitrary row contains holes, it may not
|
||||
provide the support necessary for the construction of the row above it. The
|
||||
algorithm solves this problem by constructing a flat platform on top of the row
|
||||
with holes. In the animation below, a platform is built above a row comprising
|
||||
of a single red square. The platform is a temporary structure and inserting the
|
||||
final piece removes it.</p>
|
||||
<p><img src="platform0.gif" /></p>
|
||||
<p>Below, a row containing 5 red squares is deposited above a row
|
||||
containing 3 red squares. This is accomplished by building a flat
|
||||
platform on top of the lower row. The platform provides the support
|
||||
necessary to generate the 5 red squares. Finally, the platform is
|
||||
removed by inserting its final piece and the new row drops into place.
|
||||
Note, if the algorithm needed to generate the rows in the opposite order
|
||||
(a row of 3 red squares above a row of 5 red squares), a platform would
|
||||
not be necessary.</p>
|
||||
<p>Below, a row containing 5 red squares is deposited above a row containing 3 red
|
||||
squares. This is accomplished by building a flat platform on top of the lower
|
||||
row. The platform provides the support necessary to generate the 5 red squares.
|
||||
Finally, the platform is removed by inserting its final piece and the new row
|
||||
drops into place. Note, if the algorithm needed to generate the rows in the
|
||||
opposite order (a row of 3 red squares above a row of 5 red squares), a platform
|
||||
would not be necessary.</p>
|
||||
<p><img src="platform1.gif" /></p>
|
||||
<h3 id="single-square-emitters">Single Square Emitters</h3>
|
||||
<p>For reference, the names of the 7 <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a> (the game
|
||||
pieces or actually a kind of geometric shape used in <a
|
||||
href="https://en.wikipedia.org/wiki/Tetris">Tetris</a>) appear in the
|
||||
table below.</p>
|
||||
<p>For reference, the names of the 7
|
||||
<a href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a> (the game pieces or
|
||||
actually a kind of geometric shape used in
|
||||
<a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a>) appear in the table below.</p>
|
||||
<p><img src="names.png" /></p>
|
||||
<p>This algorithm was tailored specifically to render sprites from early
|
||||
video games. Those games packed graphics into 8x8 tiles where 2 bits
|
||||
were dedicated to each pixel. Consequentially, sprites usually contained
|
||||
only 3 colors plus transparent regions and they were typically sized
|
||||
either 16x16 or 16x32 pixels.</p>
|
||||
<p>The animation below depicts all the patterns used to emit single
|
||||
squares. <code>J</code>, <code>T</code> and <code>L</code> <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a> are used
|
||||
interchangeably within each pattern to produce the protruding square at
|
||||
the bottom. The algorithm assigns those tetriminos to the 3 colors
|
||||
present in the sprite. The remaining tetriminos are assigned arbitrary
|
||||
colors. And, all the colors remain constant during gameplay.</p>
|
||||
<p>This algorithm was tailored specifically to render sprites from early video
|
||||
games. Those games packed graphics into 8x8 tiles where 2 bits were dedicated to
|
||||
each pixel. Consequentially, sprites usually contained only 3 colors plus
|
||||
transparent regions and they were typically sized either 16x16 or 16x32 pixels.</p>
|
||||
<p>The animation below depicts all the patterns used to emit single squares. <code>J</code>,
|
||||
<code>T</code> and <code>L</code> <a href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a> are used
|
||||
interchangeably within each pattern to produce the protruding square at the
|
||||
bottom. The algorithm assigns those tetriminos to the 3 colors present in the
|
||||
sprite. The remaining tetriminos are assigned arbitrary colors. And, all the
|
||||
colors remain constant during gameplay.</p>
|
||||
<p><img src="pen4.gif" /></p>
|
||||
<p>It is not possible to emit a square of all 3 colors in the first 2
|
||||
and the last 2 columns due to the shapes of the 3 <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a>. As a
|
||||
result, the minimal width of a play-field to accommodate a 16 pixel wide
|
||||
sprite is <code>2 + 16 + 2 = 20</code> squares. However, it turns out
|
||||
that 20 is too small.</p>
|
||||
<p>As illustrated below, the region above the protruding square cannot
|
||||
exclusively consist of a single row because the only pieces that could
|
||||
fit, the <code>I</code> <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a>, are
|
||||
unsupported.</p>
|
||||
<p>It is not possible to emit a square of all 3 colors in the first 2 and the last
|
||||
2 columns due to the shapes of the 3
|
||||
<a href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a>. As a result, the minimal
|
||||
width of a play-field to accommodate a 16 pixel wide sprite is <code>2 + 16 + 2 = 20</code>
|
||||
squares. However, it turns out that 20 is too small.</p>
|
||||
<p>As illustrated below, the region above the protruding square cannot exclusively
|
||||
consist of a single row because the only pieces that could fit, the <code>I</code>
|
||||
<a href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a>, are unsupported.</p>
|
||||
<p><img src="pen5.gif" /></p>
|
||||
<p>With 2 rows, the only means of spanning the full play-field width in
|
||||
a way that remains supported is to use <code>S</code> and <code>Z</code>
|
||||
<a href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a>. But,
|
||||
that will always leave holes in the upper row.</p>
|
||||
<p>With 2 rows, the only means of spanning the full play-field width in a way that
|
||||
remains supported is to use <code>S</code> and <code>Z</code>
|
||||
<a href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a>. But, that will always
|
||||
leave holes in the upper row.</p>
|
||||
<p><img src="pen6.gif" /></p>
|
||||
<p>The minimal number of rows required above the protruding square is 3
|
||||
and as shown repeatedly above, such patterns do exist. 20 squares is the
|
||||
minimal width required to fit a 16 pixel wide sprite. But,
|
||||
<code>20 * 3 + 1 = 61</code>, which is not evenly divisible by 4 and
|
||||
hence not constructible out of <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a>. However,
|
||||
a width of 21 yields <code>21 * 3 + 1 = 64</code>, which can be built
|
||||
with 16 tetriminos. That width actually enables the algorithm to render
|
||||
sprites up to 17 pixels wide.</p>
|
||||
<p>The original <a
|
||||
href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> play-field is 10
|
||||
x 20 squares, a 1:2 ratio. The program maintains that ratio by using a
|
||||
play-field of 21 x 42 squares.</p>
|
||||
<p>Since <code>J</code>, <code>T</code> and <code>L</code> <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a> are used
|
||||
interchangeably to produce the emitted square and 3 squares of those
|
||||
tetriminos contribute to the row above it, there are
|
||||
<code>21 - 3 + 1 = 19</code> single square emitting patterns. However,
|
||||
due to mirror symmetry, there are really only 10 patterns. Clearing 3
|
||||
rows works for the majority of them. But, an exhaustive computer search
|
||||
revealed that 2 of the patterns require more. The next possible option
|
||||
is 7 rows since <code>21 * 7 + 1 = 148</code>, requiring 37 tetriminos.
|
||||
As the images below show, those patterns do exist.</p>
|
||||
<p>The minimal number of rows required above the protruding square is 3 and as
|
||||
shown repeatedly above, such patterns do exist. 20 squares is the minimal width
|
||||
required to fit a 16 pixel wide sprite. But, <code>20 * 3 + 1 = 61</code>, which is not
|
||||
evenly divisible by 4 and hence not constructible out of
|
||||
<a href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a>. However, a width of 21
|
||||
yields <code>21 * 3 + 1 = 64</code>, which can be built with 16 tetriminos. That width
|
||||
actually enables the algorithm to render sprites up to 17 pixels wide.</p>
|
||||
<p>The original <a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> play-field is 10 x
|
||||
20 squares, a 1:2 ratio. The program maintains that ratio by using a play-field
|
||||
of 21 x 42 squares.</p>
|
||||
<p>Since <code>J</code>, <code>T</code> and <code>L</code> <a href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a> are
|
||||
used interchangeably to produce the emitted square and 3 squares of those
|
||||
tetriminos contribute to the row above it, there are <code>21 - 3 + 1 = 19</code> single
|
||||
square emitting patterns. However, due to mirror symmetry, there are really
|
||||
only 10 patterns. Clearing 3 rows works for the majority of them. But, an
|
||||
exhaustive computer search revealed that 2 of the patterns require more. The
|
||||
next possible option is 7 rows since <code>21 * 7 + 1 = 148</code>, requiring 37
|
||||
tetriminos. As the images below show, those patterns do exist.</p>
|
||||
<p><img src="pen7.gif" /></p>
|
||||
<p><img src="pen8.gif" /></p>
|
||||
<h3 id="platforms">Platforms</h3>
|
||||
<p>Before a row is constructed, the algorithm inspects the row below it.
|
||||
If the row below fails to provide support for all of the squares to be
|
||||
deposited above it, then a temporary platform is required. When that
|
||||
platform is removed, the new row will drop, leaving some of the squares
|
||||
apparently floating above empty space due to the way that gravity works
|
||||
in the original <a
|
||||
href="https://en.wikipedia.org/wiki/Tetris">Tetris</a>.</p>
|
||||
<p>The illustration below depicts the 10 platform patterns (really only
|
||||
5 considering mirror symmetry). The construction of a platform begins by
|
||||
dropping a <code>T</code> <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetrimino</a> on top one
|
||||
of the squares of the last generated row. The remaining tetriminos
|
||||
support each other down to that first <code>T</code>. Meaning, as long
|
||||
as the previously generated row contains at least 1 square, like the red
|
||||
square below, then it is possible to construct a flat platform above it
|
||||
for the generation of the next row.</p>
|
||||
<p>Before a row is constructed, the algorithm inspects the row below it. If the
|
||||
row below fails to provide support for all of the squares to be deposited above
|
||||
it, then a temporary platform is required. When that platform is removed, the
|
||||
new row will drop, leaving some of the squares apparently floating above empty
|
||||
space due to the way that gravity works in the original
|
||||
<a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a>.</p>
|
||||
<p>The illustration below depicts the 10 platform patterns (really only 5
|
||||
considering mirror symmetry). The construction of a platform begins by dropping
|
||||
a <code>T</code> <a href="https://en.wikipedia.org/wiki/Tetromino">tetrimino</a> on top one of the
|
||||
squares of the last generated row. The remaining tetriminos support each other
|
||||
down to that first <code>T</code>. Meaning, as long as the previously generated row
|
||||
contains at least 1 square, like the red square below, then it is possible to
|
||||
construct a flat platform above it for the generation of the next row.</p>
|
||||
<p><img src="platform2.gif" /></p>
|
||||
<p>In the middle of platform construction, the bottom row gets completed
|
||||
and cleared, leaving 3 rows above it. The final <code>J</code> or
|
||||
<code>L</code> <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetrimino</a> that will
|
||||
remove those rows is not inserted until the square emitters are done
|
||||
generating the next row of the sprite on top of the platform. That final
|
||||
piece precludes square emission in the first and last 2 columns. But, as
|
||||
discussed above, the square emitters are limited to the 17 inner columns
|
||||
due to the geometry of the <code>J</code>, <code>T</code> and
|
||||
<code>L</code> tetriminos used in the process.</p>
|
||||
<p>Also, of the 19 possible ways to start constructing a platform on top
|
||||
of a <code>T</code> <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetrimino</a>, only the
|
||||
10 patterns shown above exist.</p>
|
||||
<p>In the middle of platform construction, the bottom row gets completed and
|
||||
cleared, leaving 3 rows above it. The final <code>J</code> or <code>L</code>
|
||||
<a href="https://en.wikipedia.org/wiki/Tetromino">tetrimino</a> that will remove those rows
|
||||
is not inserted until the square emitters are done generating the next row of
|
||||
the sprite on top of the platform. That final piece precludes square emission
|
||||
in the first and last 2 columns. But, as discussed above, the square emitters
|
||||
are limited to the 17 inner columns due to the geometry of the <code>J</code>, <code>T</code> and <code>L</code>
|
||||
tetriminos used in the process.</p>
|
||||
<p>Also, of the 19 possible ways to start constructing a platform on top of a <code>T</code>
|
||||
<a href="https://en.wikipedia.org/wiki/Tetromino">tetrimino</a>, only the 10 patterns shown
|
||||
above exist.</p>
|
||||
<h3 id="program-input">Program Input</h3>
|
||||
<p>The input sprite is represented textually. Digit characters
|
||||
<code>0</code> to <code>7</code> correspond to pixels with colors from
|
||||
the palette below.</p>
|
||||
<p>The input sprite is represented textually. Digit characters <code>0</code> to <code>7</code>
|
||||
correspond to pixels with colors from the palette below.</p>
|
||||
<figure>
|
||||
<img src="palette.png" alt="ANSI color palette" />
|
||||
<figcaption aria-hidden="true">ANSI color palette</figcaption>
|
||||
</figure>
|
||||
<p>As discussed above, sprites are limited to a maximum of 3 colors from
|
||||
this palette.</p>
|
||||
<p>As discussed above, sprites are limited to a maximum of 3 colors from this
|
||||
palette.</p>
|
||||
<p>All other characters are interpreted as transparent pixels.</p>
|
||||
<p>The maximum permissible size of the input text is 32 rows by 17
|
||||
columns. Row length can vary as long as no single row exceeds 17
|
||||
characters.</p>
|
||||
<p>The maximum permissible size of the input text is 32 rows by 17 columns. Row
|
||||
length can vary as long as no single row exceeds 17 characters.</p>
|
||||
<p>Every row must contain at least one palette digit character.</p>
|
||||
<p>The <code>*.txt</code> files contain different sprites in this
|
||||
textual format that can be fed into standard input. Several examples
|
||||
take advantage of the <a
|
||||
href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> play-field
|
||||
background color. Instead of using character <code>0</code>, internal
|
||||
regions marked as transparent are effectively rendered as black.</p>
|
||||
<p>The <code>*.txt</code> files contain different sprites in this textual format that can be
|
||||
fed into standard input. Several examples take advantage of the
|
||||
<a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> play-field background color.
|
||||
Instead of using character <code>0</code>, internal regions marked as transparent are
|
||||
effectively rendered as black.</p>
|
||||
<h3 id="program-output">Program Output</h3>
|
||||
<p>The program conceptually uses <a
|
||||
href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> as an output
|
||||
device similar to a <a
|
||||
href="https://en.wikipedia.org/wiki/Line_printer">line printer</a>. It
|
||||
restricts itself to those operations that can be performed on the Tetris
|
||||
play-field: spawning, rotating, positioning and dropping <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a>. This
|
||||
process is visually represented using ANSI escape sequences.</p>
|
||||
<p>The program conceptually uses <a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> as
|
||||
an output device similar to a <a href="https://en.wikipedia.org/wiki/Line_printer">line
|
||||
printer</a>. It restricts itself to
|
||||
those operations that can be performed on the Tetris play-field: spawning,
|
||||
rotating, positioning and dropping
|
||||
<a href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a>. This process is visually
|
||||
represented using ANSI escape sequences.</p>
|
||||
<h3 id="ansimation">ANSImation</h3>
|
||||
<p>The rate at which the program plays <a
|
||||
href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> is completely
|
||||
determined by the rate in which the terminal application receives and
|
||||
displays the <a
|
||||
href="https://en.wikipedia.org/wiki/ANSI_escape_code">ANSI escape</a>
|
||||
sequences.</p>
|
||||
<p>To slow down the output programmatically, introduce a delay
|
||||
immediately after the call to <code>fflush(3)</code> (N.B: see <a
|
||||
href="birken.alt.c">birken.alt.c</a>).</p>
|
||||
<p>The rate at which the program plays
|
||||
<a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> is completely determined by the
|
||||
rate in which the terminal application receives and displays the <a href="https://en.wikipedia.org/wiki/ANSI_escape_code">ANSI
|
||||
escape</a> sequences.</p>
|
||||
<p>To slow down the output programmatically, introduce a delay immediately after the
|
||||
call to <code>fflush(3)</code> (N.B: see <a href="birken.alt.c">birken.alt.c</a>).</p>
|
||||
<h3 id="ioccc-size-tool-bug">IOCCC Size Tool Bug</h3>
|
||||
<p>This program demonstrates how to exploit a bug in IOCCC size tool
|
||||
version <code>2013-07-30-v17</code>. The first line of the program is
|
||||
reproduced below.</p>
|
||||
<p>This program demonstrates how to exploit a bug in IOCCC size tool version
|
||||
<code>2013-07-30-v17</code>. The first line of the program is reproduced below.</p>
|
||||
<pre><code>char*_ = "'""/*";</code></pre>
|
||||
<p>If that line is added to the top of any program, the tool will report
|
||||
a size of 8.</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="ex">$</span> ./iocccsize <span class="at">-i</span> <span class="op"><</span> prog.c</span>
|
||||
<p>If that line is added to the top of any program, the tool will report a size of 8.</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="ex">$</span> ./iocccsize <span class="at">-i</span> <span class="op"><</span> prog.c</span>
|
||||
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a><span class="ex">8</span></span></code></pre></div>
|
||||
<p>When that line is deleted from this program, the tool properly
|
||||
reports the secondary size limit of the program as 2048.</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="ex">$</span> ./iocccsize <span class="at">-i</span> <span class="op"><</span> birken.c</span>
|
||||
<p>When that line is deleted from this program, the tool properly reports the
|
||||
secondary size limit of the program as 2048.</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="ex">$</span> ./iocccsize <span class="at">-i</span> <span class="op"><</span> birken.c</span>
|
||||
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a><span class="ex">2048</span></span></code></pre></div>
|
||||
<p>Although this bug provides an easy means of circumventing contest
|
||||
rule 2, as demonstrated from the size value, this entry is not
|
||||
necessarily striving for a ‘worst abuse of the rules’ award.</p>
|
||||
<p>Although this bug provides an easy means of circumventing contest rule 2, as
|
||||
demonstrated from the size value, this entry is not necessarily striving for a
|
||||
‘worst abuse of the rules’ award.</p>
|
||||
<h3 id="obfuscations">Obfuscations</h3>
|
||||
<p>This program is almost, but not quite, entirely unlike a
|
||||
demonstration of good programming practices. Contrary to other programs,
|
||||
an inspection of this one will certainly reveal that it possesses tea,
|
||||
not to mention an affinity for the constant 42.</p>
|
||||
<p>Variables are named and ordered to spell out, <code>"Tetris"</code>,
|
||||
<code>"ELORG"</code>, <code>"DVK"</code> and the aforementioned
|
||||
<code>"Tea"</code>. <a
|
||||
href="https://en.wikipedia.org/wiki/Elektronorgtechnica">ELORG</a> is
|
||||
the abbreviation for <code>Elektronorgtechnica</code>, the former Soviet
|
||||
state owned computer organization that handled the worldwide Tetris
|
||||
intellectual property rights. DVK is the line of Soviet
|
||||
PDP-11-compatible personal computers capable of running <a
|
||||
href="https://en.wikipedia.org/wiki/Alexey_Pajitnov">Alexey
|
||||
Pajitnov</a>’s original 1984 <a
|
||||
href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> prototype.</p>
|
||||
<p>Carefully selected variable names also yielded wonderful expressions
|
||||
like <code>l=0</code>, <code>O=0</code>, <code>O=1</code> and
|
||||
<code>while(O)</code>. <code>"Tetris"</code> also makes a second
|
||||
appearance of sorts:</p>
|
||||
<p>This program is almost, but not quite, entirely unlike a demonstration of good
|
||||
programming practices. Contrary to other programs, an inspection of this one
|
||||
will certainly reveal that it possesses tea, not to mention an affinity for the
|
||||
constant 42.</p>
|
||||
<p>Variables are named and ordered to spell out, <code>"Tetris"</code>, <code>"ELORG"</code>, <code>"DVK"</code> and
|
||||
the aforementioned <code>"Tea"</code>.
|
||||
<a href="https://en.wikipedia.org/wiki/Elektronorgtechnica">ELORG</a> is the abbreviation
|
||||
for <code>Elektronorgtechnica</code>, the former Soviet state owned computer organization
|
||||
that handled the worldwide Tetris intellectual property rights. DVK is the line
|
||||
of Soviet PDP-11-compatible personal computers capable of running <a href="https://en.wikipedia.org/wiki/Alexey_Pajitnov">Alexey
|
||||
Pajitnov</a>’s original 1984
|
||||
<a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> prototype.</p>
|
||||
<p>Carefully selected variable names also yielded wonderful expressions like <code>l=0</code>,
|
||||
<code>O=0</code>, <code>O=1</code> and <code>while(O)</code>. <code>"Tetris"</code> also makes a second appearance of
|
||||
sorts:</p>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="op">[</span>T<span class="op">][</span>e<span class="op">][</span>t<span class="op">]--;</span> <span class="cf">while</span><span class="op">(</span>R<span class="op">+</span>i<span class="op">)</span> <span class="op">{</span> s</span></code></pre></div>
|
||||
<p>The source is formatted to resemble the <a
|
||||
href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> play-field
|
||||
mid-game. It is also an homage to all the <a
|
||||
href="../../years.html">past IOCCC entries</a> formatted as a compact
|
||||
block of text; the <code>T</code>, orientated appropriately to reflect
|
||||
its name and the first letter in the title of the game, is just a moment
|
||||
away from producing such a text block.</p>
|
||||
<p>The source is formatted to resemble the
|
||||
<a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> play-field mid-game. It is also
|
||||
an homage to all the <a href="../../years.html">past IOCCC entries</a> formatted as a compact
|
||||
block of text; the <code>T</code>, orientated appropriately to reflect its name and the
|
||||
first letter in the title of the game, is just a moment away from producing such
|
||||
a text block.</p>
|
||||
<p>Three tables are encoded as separate strings within the program:</p>
|
||||
<p>The first string stores the coordinates of the squares of the 19
|
||||
distinct rotations of <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a> (see
|
||||
below). Since a tetrimino is a chain of 4 squares, all tetriminos fit
|
||||
within a 4x4 matrix. To determine the coordinates of the squares, the
|
||||
tetrimino is pushed to the upper-left of the matrix. Each coordinate
|
||||
value requires 2 bits of storage. Consequentially, the four
|
||||
x-coordinates and the four y-coordinates were packed into separate
|
||||
octets. To convert the octets into valid ASCII characters, the squares
|
||||
were sorted such that the least significant bits stored the largest
|
||||
coordinate values. The results were offset by 35, the <code>#</code>
|
||||
character, which is 1 beyond the ASCII value of <code>"</code>, making
|
||||
it easier to pack into a string. None of the resultant values are beyond
|
||||
ASCII 127. The coordinates for all 19 rotations fit in a string of
|
||||
length 38.</p>
|
||||
<p>The first string stores the coordinates of the squares of the 19 distinct
|
||||
rotations of <a href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a> (see below).
|
||||
Since a tetrimino is a chain of 4 squares, all tetriminos fit within a 4x4
|
||||
matrix. To determine the coordinates of the squares, the tetrimino is pushed to
|
||||
the upper-left of the matrix. Each coordinate value requires 2 bits of storage.
|
||||
Consequentially, the four x-coordinates and the four y-coordinates were packed
|
||||
into separate octets. To convert the octets into valid ASCII characters, the
|
||||
squares were sorted such that the least significant bits stored the largest
|
||||
coordinate values. The results were offset by 35, the <code>#</code> character, which is 1
|
||||
beyond the ASCII value of <code>"</code>, making it easier to pack into a string. None of
|
||||
the resultant values are beyond ASCII 127. The coordinates for all 19 rotations
|
||||
fit in a string of length 38.</p>
|
||||
<p><img src="rotations.png" /></p>
|
||||
<p>The second string stores the single square emitter patterns and the
|
||||
platform patterns. Each pattern is a sequence of pairs,
|
||||
<code>{ tetrimino index, drop x-coordinate }</code>. As mentioned, there
|
||||
are 19 distinct rotations, requiring 5 bits of storage for the <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetrimino</a> index.
|
||||
Another 5 bits is required for the drop x-coordinate since there are 21
|
||||
<p>The second string stores the single square emitter patterns and the platform
|
||||
patterns. Each pattern is a sequence of pairs, <code>{ tetrimino index, drop x-coordinate }</code>. As mentioned, there are 19 distinct rotations, requiring 5
|
||||
bits of storage for the <a href="https://en.wikipedia.org/wiki/Tetromino">tetrimino</a>
|
||||
index. Another 5 bits is required for the drop x-coordinate since there are 21
|
||||
columns in the play-field. Necessarily, the pair is stored as 2 separate
|
||||
characters. By offsetting them by 40, the <code>(</code> character, the
|
||||
resultant string almost resembles a long and complex mathematical
|
||||
expression. The program takes advantage of mirror symmetry by only
|
||||
storing 10 single square emitter patterns and 5 platform patterns. The
|
||||
pattern lengths are not encoded within the string. Rather, they are
|
||||
embedded within the string decoding logic.</p>
|
||||
<p>The third string conceptually stores the default colors of the 19
|
||||
rotations. A 3-bit value is assigned to each, covering the 7 possible
|
||||
colors. In addition, when a mirrored pattern is executed, <code>J</code>
|
||||
exchanges with <code>L</code> and <code>S</code> exchanges with
|
||||
<code>Z</code>, necessitating a second list of 3-bit color values. Pairs
|
||||
of color values (6 bits) fit comfortably into a character that is offset
|
||||
by <code>#</code>. The result is a string of length 19.</p>
|
||||
characters. By offsetting them by 40, the <code>(</code> character, the resultant string
|
||||
almost resembles a long and complex mathematical expression. The program takes
|
||||
advantage of mirror symmetry by only storing 10 single square emitter patterns
|
||||
and 5 platform patterns. The pattern lengths are not encoded within the string.
|
||||
Rather, they are embedded within the string decoding logic.</p>
|
||||
<p>The third string conceptually stores the default colors of the 19 rotations. A
|
||||
3-bit value is assigned to each, covering the 7 possible colors. In addition,
|
||||
when a mirrored pattern is executed, <code>J</code> exchanges with <code>L</code> and <code>S</code> exchanges
|
||||
with <code>Z</code>, necessitating a second list of 3-bit color values. Pairs of color
|
||||
values (6 bits) fit comfortably into a character that is offset by <code>#</code>. The
|
||||
result is a string of length 19.</p>
|
||||
<h3 id="obfuscations-1">Obfuscations</h3>
|
||||
<p>The program is full of subtle obfuscations:</p>
|
||||
<ul>
|
||||
<li><p>The unary decrement operator is used in conjunction with global
|
||||
variable automatic zero initialization to set variables to
|
||||
<code>-1</code>.</p></li>
|
||||
<li><p>The boolean expression of the form, <code>x + 1</code>, is used
|
||||
multiple times to determine if a value is not <code>-1</code>.
|
||||
Similarly, expressions of the form <code>x - y</code> are used to
|
||||
determine if <code>x != y</code>.</p></li>
|
||||
<li><p>Several arrays store unrelated data in segments throughout the
|
||||
array to reduce named variables..</p></li>
|
||||
<li><p>The unary decrement operator is used in conjunction with global variable
|
||||
automatic zero initialization to set variables to <code>-1</code>.</p></li>
|
||||
<li><p>The boolean expression of the form, <code>x + 1</code>, is used multiple times to
|
||||
determine if a value is not <code>-1</code>. Similarly, expressions of the form <code>x - y</code>
|
||||
are used to determine if <code>x != y</code>.</p></li>
|
||||
<li><p>Several arrays store unrelated data in segments throughout the array to reduce
|
||||
named variables..</p></li>
|
||||
<li><p>The <code>x["..."]</code> trick appears once.</p></li>
|
||||
<li><p>Variable <code>i</code> is less than necessary.</p></li>
|
||||
<li><p>A cursorily glance at the expressions <code>4&&L</code>
|
||||
and <code>m&&e==m</code> suggests that they always evaluate to
|
||||
true.</p></li>
|
||||
<li><p>The varying single square emitter pattern lengths are resolved
|
||||
during string decoding using the clever expression,
|
||||
<code>(i & 3) - 3</code>, which identifies pattern 3 and 7 as
|
||||
longer.</p></li>
|
||||
<li><p>The file size of <a href="birken.c">birken.c</a> is a prime
|
||||
number. Deleting the first line also produces a prime-sized program.
|
||||
These properties do not qualify the program as a prime number
|
||||
generator.</p></li>
|
||||
<li><p>A cursorily glance at the expressions <code>4&&L</code> and <code>m&&e==m</code> suggests that they
|
||||
always evaluate to true.</p></li>
|
||||
<li><p>The varying single square emitter pattern lengths are resolved during string
|
||||
decoding using the clever expression, <code>(i & 3) - 3</code>, which identifies pattern 3
|
||||
and 7 as longer.</p></li>
|
||||
<li><p>The file size of <a href="birken.c">birken.c</a> is a prime number. Deleting the first
|
||||
line also produces a prime-sized program. These properties do not qualify the
|
||||
program as a prime number generator.</p></li>
|
||||
</ul>
|
||||
<h3 id="beyond-obfuscation">Beyond Obfuscation</h3>
|
||||
<p>Due to the contest code size constraint, some optimizations
|
||||
reluctantly had to be omitted. For example, multi-square emitters are
|
||||
possible:</p>
|
||||
<p>Due to the contest code size constraint, some optimizations reluctantly had to
|
||||
be omitted. For example, multi-square emitters are possible:</p>
|
||||
<p><img src="multi2.gif" /></p>
|
||||
<p><img src="multi3.gif" /></p>
|
||||
<p><img src="multi4.gif" /></p>
|
||||
<p><img src="multi5.gif" /></p>
|
||||
<p>In fact, using dynamic programming and creative heuristics, real-time
|
||||
search is possible, enabling patterns like this:</p>
|
||||
<p>In fact, using dynamic programming and creative heuristics, real-time search is
|
||||
possible, enabling patterns like this:</p>
|
||||
<p><img src="triple0.gif" /></p>
|
||||
<p>And, even this:</p>
|
||||
<p><img src="triple1.gif" /></p>
|
||||
<p>In addition, it is possible to extend the algorithm to 6 colors
|
||||
instead of just 3. This is achieved using <code>I</code>, <code>S</code>
|
||||
and <code>Z</code> to produce the protruding square. A series of
|
||||
rectangular regions are constructed above those <a
|
||||
href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a> to erode
|
||||
them down to a single emitted square.</p>
|
||||
<p>The details of these enhancements are left as an exercise to the
|
||||
reader.</p>
|
||||
<p>In addition, it is possible to extend the algorithm to 6 colors instead of just 3.
|
||||
This is achieved using <code>I</code>, <code>S</code> and <code>Z</code> to produce the protruding square. A
|
||||
series of rectangular regions are constructed above those
|
||||
<a href="https://en.wikipedia.org/wiki/Tetromino">tetriminos</a> to erode them down to a
|
||||
single emitted square.</p>
|
||||
<p>The details of these enhancements are left as an exercise to the reader.</p>
|
||||
<h3 id="example-files">Example Files</h3>
|
||||
<p>The following example files were created by the program author. They
|
||||
can be freely used and distributed.</p>
|
||||
<p>The following example files were created by the program author. They can be
|
||||
freely used and distributed.</p>
|
||||
<ul>
|
||||
<li><a href="format.txt">format.txt</a> - The layout of the
|
||||
program.</li>
|
||||
<li><a href="helloworld.txt">helloworld.txt</a> - Hello World,
|
||||
Tetris-style.</li>
|
||||
<li><a href="hilbert.txt">hilbert.txt</a> - A graphic based on the
|
||||
Hilbert curve.</li>
|
||||
<li><a href="format.txt">format.txt</a> - The layout of the program.</li>
|
||||
<li><a href="helloworld.txt">helloworld.txt</a> - Hello World, Tetris-style.</li>
|
||||
<li><a href="hilbert.txt">hilbert.txt</a> - A graphic based on the Hilbert curve.</li>
|
||||
<li><a href="ioccc.txt">ioccc.txt</a> - IOCCC.</li>
|
||||
<li><a href="landon.txt">landon.txt</a> - Portrait of a man with
|
||||
glasses.</li>
|
||||
<li><a href="leo.txt">leo.txt</a> - Portrait of a man without
|
||||
glasses.</li>
|
||||
<li><a href="landon.txt">landon.txt</a> - Portrait of a man with glasses.</li>
|
||||
<li><a href="leo.txt">leo.txt</a> - Portrait of a man without glasses.</li>
|
||||
<li><a href="rhino.txt">rhino.txt</a> - A purple rhinoceros.</li>
|
||||
<li><a href="simon.txt">simon.txt</a> - Portrait of a man without
|
||||
hair.</li>
|
||||
<li><a href="simon.txt">simon.txt</a> - Portrait of a man without hair.</li>
|
||||
</ul>
|
||||
<p>The following files are based on graphics from non-free, copyrighted
|
||||
video games. The use of a limited number of textual representations of
|
||||
the graphics for the demonstration of this program qualifies as fair use
|
||||
as such files do not significantly impede the right of the copyright
|
||||
holder to sell the copyrighted material and it is not being used to
|
||||
generate profit in this context. The origin of each file is detailed
|
||||
below (character, game, company, year).</p>
|
||||
<p>The following files are based on graphics from non-free, copyrighted video
|
||||
games. The use of a limited number of textual representations of the graphics
|
||||
for the demonstration of this program qualifies as fair use as such files do not
|
||||
significantly impede the right of the copyright holder to sell the copyrighted
|
||||
material and it is not being used to generate profit in this context. The
|
||||
origin of each file is detailed below (character, game, company, year).</p>
|
||||
<ul>
|
||||
<li><p><a href="belmont.txt">belmont.txt</a> - <a
|
||||
href="https://en.wikipedia.org/wiki/Simon_Belmont">Simon Belmont</a>, <a
|
||||
href="https://en.wikipedia.org/wiki/Castlevania_(1986_video_game)">Castlevania</a>,
|
||||
<a href="https://en.wikipedia.org/wiki/Konami">Konami</a>,
|
||||
1986.</p></li>
|
||||
<li><p><a href="bloober.txt">bloober.txt</a> - Bloober, <a
|
||||
href="https://www.mariowiki.com/Super_Mario_Bros.">Super Mario
|
||||
Brothers</a>, <a
|
||||
href="https://en.wikipedia.org/wiki/Nintendo">Nintendo</a>,
|
||||
1985.</p></li>
|
||||
<li><p><a href="bomberman.txt">bomberman.txt</a> - <a
|
||||
href="https://en.wikipedia.org/wiki/Bomberman">Bomberman</a>, Bomberman,
|
||||
<a href="https://en.wikipedia.org/wiki/Hudson_Soft">Hudson</a>,
|
||||
1983.</p></li>
|
||||
<li><p><a href="boo.txt">boo.txt</a> - <a
|
||||
href="https://www.mariowiki.com/Boo">Boo</a>, <a
|
||||
href="https://www.mariowiki.com/Super_Mario_Bros._3">Super Mario
|
||||
<li><p><a href="belmont.txt">belmont.txt</a> - <a href="https://en.wikipedia.org/wiki/Simon_Belmont">Simon
|
||||
Belmont</a>,
|
||||
<a href="https://en.wikipedia.org/wiki/Castlevania_(1986_video_game)">Castlevania</a>,
|
||||
<a href="https://en.wikipedia.org/wiki/Konami">Konami</a>, 1986.</p></li>
|
||||
<li><p><a href="bloober.txt">bloober.txt</a> - Bloober, <a href="https://www.mariowiki.com/Super_Mario_Bros.">Super Mario
|
||||
Brothers</a>,
|
||||
<a href="https://en.wikipedia.org/wiki/Nintendo">Nintendo</a>, 1985.</p></li>
|
||||
<li><p><a href="bomberman.txt">bomberman.txt</a> -
|
||||
<a href="https://en.wikipedia.org/wiki/Bomberman">Bomberman</a>, Bomberman,
|
||||
<a href="https://en.wikipedia.org/wiki/Hudson_Soft">Hudson</a>, 1983.</p></li>
|
||||
<li><p><a href="boo.txt">boo.txt</a> - <a href="https://www.mariowiki.com/Boo">Boo</a>, <a href="https://www.mariowiki.com/Super_Mario_Bros._3">Super Mario
|
||||
Brothers 3</a>, Nintendo, 1988.</p></li>
|
||||
<li><p><a href="bub.txt">bub.txt</a> - <a
|
||||
href="https://bubblebobble.fandom.com/wiki/Bub">Bub</a>, <a
|
||||
href="https://en.wikipedia.org/wiki/Bubble_Bobble">Bubble Bobble</a>,
|
||||
Taito, 1986.</p></li>
|
||||
<li><p><a href="cheepcheep.txt">cheepcheep.txt</a> - <a
|
||||
href="https://www.mariowiki.com/Cheep_Cheep">Cheep Cheep</a>, Super
|
||||
Mario Brothers, Nintendo,</p></li>
|
||||
<li><p><a href="bub.txt">bub.txt</a> - <a href="https://bubblebobble.fandom.com/wiki/Bub">Bub</a>, <a href="https://en.wikipedia.org/wiki/Bubble_Bobble">Bubble
|
||||
Bobble</a>, Taito, 1986.</p></li>
|
||||
<li><p><a href="cheepcheep.txt">cheepcheep.txt</a> - <a href="https://www.mariowiki.com/Cheep_Cheep">Cheep
|
||||
Cheep</a>, Super Mario Brothers, Nintendo,</p></li>
|
||||
</ul>
|
||||
<ol start="1985" type="1">
|
||||
<li></li>
|
||||
</ol>
|
||||
<ul>
|
||||
<li><p><a href="gurin.txt">gurin.txt</a> - Gurin, <a
|
||||
href="https://en.wikipedia.org/wiki/Binary_Land">Binary Land</a>,
|
||||
Hudson, 1983.</p></li>
|
||||
<li><p><a href="koopaparatroopa.txt">koopaparatroopa.txt</a> - <a
|
||||
href="https://www.mariowiki.com/Koopa_Paratroopa">Koopa Paratroopa</a>,
|
||||
<li><p><a href="gurin.txt">gurin.txt</a> - Gurin, <a href="https://en.wikipedia.org/wiki/Binary_Land">Binary
|
||||
Land</a>, Hudson, 1983.</p></li>
|
||||
<li><p><a href="koopaparatroopa.txt">koopaparatroopa.txt</a> - <a href="https://www.mariowiki.com/Koopa_Paratroopa">Koopa
|
||||
Paratroopa</a>, Super Mario Brothers,
|
||||
Nintendo, 1985.</p></li>
|
||||
<li><p><a href="lakitu.txt">lakitu.txt</a> - <a href="https://www.mariowiki.com/Lakitu">Lakitu</a>, Super
|
||||
Mario Brothers, Nintendo, 1985.</p></li>
|
||||
<li><p><a href="mario.txt">mario.txt</a> - <a href="https://www.mariowiki.com/Fire_Mario">Fire Mario</a>,
|
||||
Super Mario Brothers, Nintendo, 1985.</p></li>
|
||||
<li><p><a href="lakitu.txt">lakitu.txt</a> - <a
|
||||
href="https://www.mariowiki.com/Lakitu">Lakitu</a>, Super Mario
|
||||
Brothers, Nintendo, 1985.</p></li>
|
||||
<li><p><a href="mario.txt">mario.txt</a> - <a
|
||||
href="https://www.mariowiki.com/Fire_Mario">Fire Mario</a>, Super Mario
|
||||
Brothers, Nintendo, 1985.</p></li>
|
||||
<li><p><a href="mspacman.txt">mspacman.txt</a> - <a
|
||||
href="https://pacman.fandom.com/wiki/Ms._Pac-Man">Ms. Pac-Man</a> and
|
||||
Ghost, Ms. Pac-Man, <a
|
||||
href="https://en.wikipedia.org/wiki/Midway_Games">Midway</a>,
|
||||
1982.</p></li>
|
||||
<li><p><a href="paranaplant.txt">paranaplant.txt</a> - <a
|
||||
href="https://www.mariowiki.com/Piranha_Plant">Piranha Plant</a>, Super
|
||||
Mario Brothers, Nintendo,</p></li>
|
||||
<li><p><a href="mspacman.txt">mspacman.txt</a> - <a href="https://pacman.fandom.com/wiki/Ms._Pac-Man">Ms.
|
||||
Pac-Man</a> and Ghost, Ms. Pac-Man,
|
||||
<a href="https://en.wikipedia.org/wiki/Midway_Games">Midway</a>, 1982.</p></li>
|
||||
<li><p><a href="paranaplant.txt">paranaplant.txt</a> - <a href="https://www.mariowiki.com/Piranha_Plant">Piranha
|
||||
Plant</a>, Super Mario Brothers, Nintendo,</p></li>
|
||||
</ul>
|
||||
<ol start="1985" type="1">
|
||||
<li></li>
|
||||
</ol>
|
||||
<ul>
|
||||
<li><p><a href="samus.txt">samus.txt</a> - <a
|
||||
href="https://metroid.fandom.com/wiki/Samus_Aran">Samus Aran</a>, <a
|
||||
href="https://metroid.fandom.com/wiki/Metroid_(game)">Metroid</a>,
|
||||
Nintendo/<a
|
||||
href="https://en.wikipedia.org/wiki/Intelligent_Systems">Intelligent
|
||||
<li><p><a href="samus.txt">samus.txt</a> - <a href="https://metroid.fandom.com/wiki/Samus_Aran">Samus
|
||||
Aran</a>,
|
||||
<a href="https://metroid.fandom.com/wiki/Metroid_(game)">Metroid</a>, Nintendo/<a href="https://en.wikipedia.org/wiki/Intelligent_Systems">Intelligent
|
||||
Systems</a>, 1986.</p></li>
|
||||
<li><p><a href="toad.txt">toad.txt</a> - <a
|
||||
href="https://www.mariowiki.com/Toad">Toad</a>, Super Mario Brothers 2,
|
||||
Nintendo, 1987.</p></li>
|
||||
<li><p><a href="toad.txt">toad.txt</a> - <a href="https://www.mariowiki.com/Toad">Toad</a>, Super Mario
|
||||
Brothers 2, Nintendo, 1987.</p></li>
|
||||
</ul>
|
||||
<p>The origin of the remaining files are described below:</p>
|
||||
<ul>
|
||||
<li><p><a href="happyface.txt">happyface.txt</a> - Based on a <a
|
||||
href="https://en.wikipedia.org/wiki/Smiley">smiley</a>; original
|
||||
trademark of smiley <a
|
||||
href="https://en.wikipedia.org/wiki/The_Smiley_Company">Smiley
|
||||
Company</a>.</p></li>
|
||||
<li><p><a href="snoo.txt">snoo.txt</a> - 8-bit version of <a
|
||||
href="https://www.reddit.com/r/Snoo/">Snoo</a>, <a
|
||||
href="https://www.reddit.com">Reddit</a>’s alien mascot.</p></li>
|
||||
<li><p><a href="happyface.txt">happyface.txt</a> - Based on a
|
||||
<a href="https://en.wikipedia.org/wiki/Smiley">smiley</a>; original trademark of smiley
|
||||
<a href="https://en.wikipedia.org/wiki/The_Smiley_Company">Smiley Company</a>.</p></li>
|
||||
<li><p><a href="snoo.txt">snoo.txt</a> - 8-bit version of <a href="https://www.reddit.com/r/Snoo/">Snoo</a>,
|
||||
<a href="https://www.reddit.com">Reddit</a>’s alien mascot.</p></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>
|
||||
<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-2013birken"><a name="inventory"></a>Inventory for
|
||||
2013/birken</h1>
|
||||
<h1 id="inventory-for-2013birken"><a name="inventory"></a>Inventory for 2013/birken</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/2013/birken/birken.c">birken.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/birken.alt.c">birken.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/birken.orig.c">birken.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/belmont.txt">belmont.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/bloober.txt">bloober.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/bomberman.txt">bomberman.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/boo.txt">boo.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/bub.txt">bub.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/cheepcheep.txt">cheepcheep.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/format.txt">format.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/gurin.txt">gurin.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/happyface.txt">happyface.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/helloworld.txt">helloworld.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/hilbert.txt">hilbert.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/ioccc.txt">ioccc.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/koopaparatroopa.txt">koopaparatroopa.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/lakitu.txt">lakitu.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/landon.txt">landon.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/leo.txt">leo.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/mario.txt">mario.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/mspacman.txt">mspacman.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a href="names.png">names.png</a> - sprites in this textual
|
||||
format</li>
|
||||
<li><a href="palette.png">palette.png</a> - sprites in this textual
|
||||
format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/paranaplant.txt">paranaplant.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/rhino.txt">rhino.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a href="rotations.png">rotations.png</a> - sprites in this textual
|
||||
format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/samus.txt">samus.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/simon.txt">simon.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/snoo.txt">snoo.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/toad.txt">toad.txt</a>
|
||||
- sprites in this textual format</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/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/2013/birken/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="2013_birken.tar.bz2">2013_birken.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/birken.c">birken.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/birken.alt.c">birken.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/birken.orig.c">birken.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/belmont.txt">belmont.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/bloober.txt">bloober.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/bomberman.txt">bomberman.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/boo.txt">boo.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/bub.txt">bub.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/cheepcheep.txt">cheepcheep.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/format.txt">format.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/gurin.txt">gurin.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/happyface.txt">happyface.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/helloworld.txt">helloworld.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/hilbert.txt">hilbert.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/ioccc.txt">ioccc.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/koopaparatroopa.txt">koopaparatroopa.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/lakitu.txt">lakitu.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/landon.txt">landon.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/leo.txt">leo.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/mario.txt">mario.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/mspacman.txt">mspacman.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="names.png">names.png</a> - sprites in this textual format</li>
|
||||
<li><a href="palette.png">palette.png</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/paranaplant.txt">paranaplant.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/rhino.txt">rhino.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="rotations.png">rotations.png</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/samus.txt">samus.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/simon.txt">simon.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/snoo.txt">snoo.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/toad.txt">toad.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/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/2013/birken/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2013_birken.tar.bz2">2013_birken.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/2013/birken/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/.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/2013/birken/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/.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/2013/birken/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="multi2.gif">multi2.gif</a> - stages of multi-square
|
||||
emitters</li>
|
||||
<li><a href="multi3.gif">multi3.gif</a> - stages showing multi-square
|
||||
emitters</li>
|
||||
<li><a href="multi4.gif">multi4.gif</a> - stages showing multi-square
|
||||
emitters</li>
|
||||
<li><a href="multi5.gif">multi5.gif</a> - stages of multi-square
|
||||
emitters</li>
|
||||
<li><a href="pen0.gif">pen0.gif</a> - stages of single square rotruding
|
||||
from the bottom</li>
|
||||
<li><a href="pen1.gif">pen1.gif</a> - stages of single square rotruding
|
||||
from the bottom</li>
|
||||
<li><a href="pen2.gif">pen2.gif</a> - stages of single square rotruding
|
||||
from the bottom</li>
|
||||
<li><a href="pen4.gif">pen4.gif</a> - stages of single square rotruding
|
||||
from the bottom</li>
|
||||
<li><a href="pen5.gif">pen5.gif</a> - stages of single square rotruding
|
||||
from the bottom</li>
|
||||
<li><a href="pen6.gif">pen6.gif</a> - stages of single square rotruding
|
||||
from the bottom</li>
|
||||
<li><a href="pen7.gif">pen7.gif</a> - stages of single square rotruding
|
||||
from the bottom</li>
|
||||
<li><a href="pen8.gif">pen8.gif</a> - stages of single square rotruding
|
||||
from the bottom</li>
|
||||
<li><a href="platform0.gif">platform0.gif</a> - stages of 5 red squares
|
||||
above a row of 3 red squares</li>
|
||||
<li><a href="platform1.gif">platform1.gif</a> - stages of 5 red squares
|
||||
above a row of 3 red squares</li>
|
||||
<li><a href="platform2.gif">platform2.gif</a> - stages of 5 red squares
|
||||
above a row of 3 red squares</li>
|
||||
<li><a href="triple0.gif">triple0.gif</a> - stages of constructed of
|
||||
rectangular regions</li>
|
||||
<li><a href="triple1.gif">triple1.gif</a> - stages of constructed of
|
||||
rectangular regions</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/README.md">README.md</a> - markdown source for index.html</li>
|
||||
<li><a href="multi2.gif">multi2.gif</a> - stages of multi-square emitters</li>
|
||||
<li><a href="multi3.gif">multi3.gif</a> - stages showing multi-square emitters</li>
|
||||
<li><a href="multi4.gif">multi4.gif</a> - stages showing multi-square emitters</li>
|
||||
<li><a href="multi5.gif">multi5.gif</a> - stages of multi-square emitters</li>
|
||||
<li><a href="pen0.gif">pen0.gif</a> - stages of single square rotruding from the bottom</li>
|
||||
<li><a href="pen1.gif">pen1.gif</a> - stages of single square rotruding from the bottom</li>
|
||||
<li><a href="pen2.gif">pen2.gif</a> - stages of single square rotruding from the bottom</li>
|
||||
<li><a href="pen4.gif">pen4.gif</a> - stages of single square rotruding from the bottom</li>
|
||||
<li><a href="pen5.gif">pen5.gif</a> - stages of single square rotruding from the bottom</li>
|
||||
<li><a href="pen6.gif">pen6.gif</a> - stages of single square rotruding from the bottom</li>
|
||||
<li><a href="pen7.gif">pen7.gif</a> - stages of single square rotruding from the bottom</li>
|
||||
<li><a href="pen8.gif">pen8.gif</a> - stages of single square rotruding from the bottom</li>
|
||||
<li><a href="platform0.gif">platform0.gif</a> - stages of 5 red squares above a row of 3 red squares</li>
|
||||
<li><a href="platform1.gif">platform1.gif</a> - stages of 5 red squares above a row of 3 red squares</li>
|
||||
<li><a href="platform2.gif">platform2.gif</a> - stages of 5 red squares above a row of 3 red squares</li>
|
||||
<li><a href="triple0.gif">triple0.gif</a> - stages of constructed of rectangular regions</li>
|
||||
<li><a href="triple1.gif">triple1.gif</a> - stages of constructed of rectangular regions</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+47
-74
@@ -130,8 +130,8 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Adrian_Cable">Adrian Cable</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of
|
||||
America</em> (<em>United States</em>) <br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -146,16 +146,15 @@ America</em> (<em>United States</em>) <br><br></li>
|
||||
<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>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Partisan may be defined as a strong supporter of a cause, party or
|
||||
person. We need not limit ourselves to the two major political parties
|
||||
in the US today.</p>
|
||||
<p>Partisan may be defined as a strong supporter of a cause, party or person.
|
||||
We need not limit ourselves to the two major political parties in the US today.</p>
|
||||
<p>Let us consider:</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">./cable1</span> Cooper Mac PC</span></code></pre></div>
|
||||
<p>Simon works for Apple, so you would expect Mac. :-) Landon is a long
|
||||
time Mac user:</p>
|
||||
<p>Simon works for Apple, so you would expect Mac. :-)
|
||||
Landon is a long time Mac user:</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">./cable1</span> Noll Mac PC</span></code></pre></div>
|
||||
<p>That works too! Now Leo brings PCs to the IOCCC judging for
|
||||
cross-platform testing:</p>
|
||||
<p>That works too! Now Leo brings PCs to the IOCCC judging for cross-platform
|
||||
testing:</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">./cable1</span> Broukhis Mac PC</span></code></pre></div>
|
||||
<p>We can test other people. The late Steve Jobs:</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="ex">./cable1</span> Jobs Mac PC</span></code></pre></div>
|
||||
@@ -163,101 +162,75 @@ cross-platform testing:</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">./cable1</span> Gates Mac PC</span></code></pre></div>
|
||||
<p>A PC guy as expected. What about that other Steve?</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./cable1</span> Ballmer Mac PC</span></code></pre></div>
|
||||
<p>Humm .. maybe there is a hidden reason he is leaving the late
|
||||
Micro$oft? :-) Why late? Because:</p>
|
||||
<p>Humm .. maybe there is a hidden reason he is leaving the late Micro$oft? :-)
|
||||
Why late? Because:</p>
|
||||
<figure>
|
||||
<img src="dead-ms-tweet.jpg" alt="tweet about M$ being dead" />
|
||||
<figcaption aria-hidden="true">tweet about M$ being dead</figcaption>
|
||||
</figure>
|
||||
<p>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- An important 2023
|
||||
update about twitter:</p>
|
||||
<p>The IOCCC no longer uses twitter. Today the IOCCC uses Mastodon. For
|
||||
more information and to see our IOCCC Mastodon posts, see:</p>
|
||||
<p>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
An important 2023 update about twitter:</p>
|
||||
<p>The IOCCC no longer uses twitter. Today the IOCCC uses Mastodon.
|
||||
For more information and to see our IOCCC Mastodon posts, see:</p>
|
||||
<pre><code>https://fosstodon.org/@ioccc</code></pre>
|
||||
<p>End of important 2023 update to this historic note.
|
||||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-</p>
|
||||
<p>So how does a one line C source know so much? Hint: it doesn’t.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="presidents-of-the-united-states-of-america">Presidents of the
|
||||
United States of America!</h3>
|
||||
<p>Politics is full of memorable <a
|
||||
href="https://rationalwiki.org/wiki/Politics#Famous_quotes">one-liners</a>.
|
||||
Without wishing to <a
|
||||
href="https://www.youtube.com/watch?v=JhmdEq3JhoY">misunderestimate</a>
|
||||
the taste of the judges, nor prejudge the past, the author hopes you
|
||||
enjoy this contribution to the genre.</p>
|
||||
<p>This one-line C program accepts as a first command-line argument the
|
||||
last name of any of the last 31 US Presidents (from Franklin Pierce
|
||||
onwards), in lower case, and prints out their political affiliation.</p>
|
||||
<p>Use <code>republican</code> as the 2nd command-line argument, and
|
||||
<code>democrat</code> as the 3rd (or equivalent strings of your
|
||||
choice).</p>
|
||||
<h3 id="why-is-this-entry-obfuscatedinteresting">Why is this entry
|
||||
obfuscated/interesting?</h3>
|
||||
<p>The program looks up the name supplied on the command line against a
|
||||
list of Presidents’ names, and matches names to political affiliations
|
||||
using a look-up table. But where in the source is the list of names, and
|
||||
where is the look-up table?</p>
|
||||
<h3 id="presidents-of-the-united-states-of-america">Presidents of the United States of America!</h3>
|
||||
<p>Politics is full of memorable
|
||||
<a href="https://rationalwiki.org/wiki/Politics#Famous_quotes">one-liners</a>. Without wishing to
|
||||
<a href="https://www.youtube.com/watch?v=JhmdEq3JhoY">misunderestimate</a>
|
||||
the taste of the judges, nor prejudge the past, the author hopes you enjoy this
|
||||
contribution to the genre.</p>
|
||||
<p>This one-line C program accepts as a first command-line argument the last name
|
||||
of any of the last 31 US Presidents (from Franklin Pierce onwards), in lower
|
||||
case, and prints out their political affiliation.</p>
|
||||
<p>Use <code>republican</code> as the 2nd command-line argument, and <code>democrat</code> as the 3rd (or
|
||||
equivalent strings of your choice).</p>
|
||||
<h3 id="why-is-this-entry-obfuscatedinteresting">Why is this entry obfuscated/interesting?</h3>
|
||||
<p>The program looks up the name supplied on the command line against a list of
|
||||
Presidents’ names, and matches names to political affiliations using a look-up
|
||||
table. But where in the source is the list of names, and where is the look-up
|
||||
table?</p>
|
||||
<h3 id="notes">Notes</h3>
|
||||
<ul>
|
||||
<li><p>For Theodore Roosevelt, use:
|
||||
<code>./cable1 roosevelt republican democrat</code>.</p></li>
|
||||
<li><p>But, for Franklin D Roosevelt, use:
|
||||
<code>./cable1 fdr republican democrat</code>.</p></li>
|
||||
<li><p>For Theodore Roosevelt, use: <code>./cable1 roosevelt republican democrat</code>.</p></li>
|
||||
<li><p>But, for Franklin D Roosevelt, use: <code>./cable1 fdr republican democrat</code>.</p></li>
|
||||
<li><p>This program needs a little endian CPU to work properly.</p></li>
|
||||
</ul>
|
||||
<h3 id="compiler-warnings">Compiler warnings</h3>
|
||||
<p><code>clang</code> warns about a missing type specifier for
|
||||
<code>main()</code>, and that implicit function declarations are invalid
|
||||
in C99 (but still accepts them).</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><code>clang</code> warns about a missing type specifier for <code>main()</code>, and that implicit
|
||||
function declarations are invalid in C99 (but still accepts them).</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-2013cable1"><a name="inventory"></a>Inventory for
|
||||
2013/cable1</h1>
|
||||
<h1 id="inventory-for-2013cable1"><a name="inventory"></a>Inventory for 2013/cable1</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/2013/cable1/cable1.c">cable1.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/cable1.orig.c">cable1.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/cable1.c">cable1.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/cable1.orig.c">cable1.orig.c</a> - original source</li>
|
||||
<li><a href="dead-ms-tweet.jpg">dead-ms-tweet.jpg</a> - tweet image</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="2013_cable1.tar.bz2">2013_cable1.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2013_cable1.tar.bz2">2013_cable1.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/2013/cable1/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/.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/2013/cable1/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/.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/2013/cable1/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+94
-131
@@ -130,8 +130,8 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Adrian_Cable">Adrian Cable</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of
|
||||
America</em> (<em>United States</em>) <br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -144,176 +144,139 @@ America</em> (<em>United States</em>) <br><br></li>
|
||||
<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.html#2013_cable2">2013 cable2 bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2013_cable2">2013 cable2 bugs</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">./cable2</span> file.bmp <span class="pp">[</span><span class="ss">color</span><span class="pp">]</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>For different OCR examples:</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">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>We can confirm that this is the first time the IOCCC has been used to
|
||||
peer-review a new research. We had quite a bit of fun with a sharpie and
|
||||
a scanner.</p>
|
||||
<p>We can confirm that this is the first time the IOCCC has been used
|
||||
to peer-review a new research. We had quite a bit of fun with a sharpie and a
|
||||
scanner.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="ocr---obfuscated-character-recognition-of-handwritten-text">OCR
|
||||
- Obfuscated Character Recognition of Handwritten Text</h3>
|
||||
<p>This entry takes a BMP image file of hand-drawn (mouse-drawn?) text,
|
||||
specified as the first command-line parameter, and converts it to an
|
||||
ASCII text document. Magic!</p>
|
||||
<p>BMP files created by most paint programs should work. The author
|
||||
recommends Paint.NET.</p>
|
||||
<h3 id="ocr---obfuscated-character-recognition-of-handwritten-text">OCR - Obfuscated Character Recognition of Handwritten Text</h3>
|
||||
<p>This entry takes a BMP image file of hand-drawn (mouse-drawn?) text, specified
|
||||
as the first command-line parameter, and converts it to an ASCII text document.
|
||||
Magic!</p>
|
||||
<p>BMP files created by most paint programs should work. The author recommends
|
||||
Paint.NET.</p>
|
||||
<h3 id="features">Features</h3>
|
||||
<ul>
|
||||
<li>Every printable ASCII character is recognized (94 characters plus
|
||||
space), plus a special bonus character.</li>
|
||||
<li>Input images can be any size (limited only by memory), containing
|
||||
any number of lines of text.</li>
|
||||
<li>BMP is really a mess of different formats, but the program supports
|
||||
most of them from Windows 3.1 and later.</li>
|
||||
<li>Hand-drawn characters in the input image can be variably spaced and
|
||||
positioned and be of any width or height, but the bigger the better for
|
||||
accurate recognition (300 pixels tall or more is recommended).
|
||||
Characters must be drawn with a stroke width of around 9 pixels, and
|
||||
separated from adjacent characters. (In Paint.NET a brush of width 9
|
||||
works well, with anti-aliasing turned off.)</li>
|
||||
<li>You can use any colors you like for the text and background, even
|
||||
different colors for different text characters.</li>
|
||||
<li>If “color” is specified as the second command line parameter, the
|
||||
program’s output will also be in color, on ANSI/VTxxx terminals.</li>
|
||||
<li>Every printable ASCII character is recognized (94 characters plus space), plus
|
||||
a special bonus character.</li>
|
||||
<li>Input images can be any size (limited only by memory), containing any number
|
||||
of lines of text.</li>
|
||||
<li>BMP is really a mess of different formats, but the program supports most of
|
||||
them from Windows 3.1 and later.</li>
|
||||
<li>Hand-drawn characters in the input image can be variably spaced and positioned
|
||||
and be of any width or height, but the bigger the better for accurate
|
||||
recognition (300 pixels tall or more is recommended). Characters must be drawn
|
||||
with a stroke width of around 9 pixels, and separated from adjacent characters.
|
||||
(In Paint.NET a brush of width 9 works well, with anti-aliasing turned off.)</li>
|
||||
<li>You can use any colors you like for the text and background, even different
|
||||
colors for different text characters.</li>
|
||||
<li>If “color” is specified as the second command line parameter, the program’s
|
||||
output will also be in color, on ANSI/VTxxx terminals.</li>
|
||||
</ul>
|
||||
<h3 id="why-is-this-entry-obfuscatedinteresting">Why is this entry
|
||||
obfuscated/interesting?</h3>
|
||||
<h3 id="why-is-this-entry-obfuscatedinteresting">Why is this entry obfuscated/interesting?</h3>
|
||||
<ul>
|
||||
<li>The source is presented as a beautiful moonlit scene, in which a
|
||||
quick brown fox jumps over a lazy dog. Far too often in software
|
||||
development is aesthetic nuance lost in the name of serious-sounding
|
||||
conventions like “GNU style”, but not here.</li>
|
||||
<li>Newcomers to C find it hard to learn all those different ways to
|
||||
control flow: <code>for</code>, <code>while</code>, <code>if</code>,
|
||||
<code>do</code>, <code>goto</code>, <code>continue</code>,
|
||||
<code>break</code> and heaven knows what else! So, in this program we
|
||||
only use <code>for</code>, so absolute beginners can get into the code
|
||||
straight away.</li>
|
||||
<li>To teach newcomers all the important features of C, we demonstrate
|
||||
the importance of the liberal use of short circuits, sequence points,
|
||||
the ternary operator, using <code>x^y</code> or <code>x-y</code> instead
|
||||
of <code>x!=y</code>, using <code>~x</code> in place of
|
||||
<code>x!=-1</code> for conciseness, mixing <code>x[y]</code> and
|
||||
<code>y[x]</code> for variety, educational <code>#define</code>s, and so
|
||||
on.</li>
|
||||
<li><code>main()</code> is the most useful function in all of C - so it
|
||||
is a mystery to the author why most programs use it only once. Here we
|
||||
use it over and over for maximum benefit.</li>
|
||||
<li>The number <a href="https://hitchhikers.fandom.com/wiki/42">42</a>
|
||||
is featured in the source to provide an answer to the judges’ deeper
|
||||
questions.</li>
|
||||
<li>How are character colors converted from RGB in the input image to
|
||||
ANSI escape sequences? Clue: the weird macro <code>P</code> does the
|
||||
interesting part of it, but how?</li>
|
||||
<li>The program prints a string when the bonus character is detected.
|
||||
How does it do this? Clue: the string to print is defined in the macro
|
||||
<code>$</code>, but how can a string defined in that way ever get
|
||||
printed?</li>
|
||||
<li>The source is presented as a beautiful moonlit scene, in which a quick brown
|
||||
fox jumps over a lazy dog. Far too often in software development is aesthetic
|
||||
nuance lost in the name of serious-sounding conventions like “GNU style”, but
|
||||
not here.</li>
|
||||
<li>Newcomers to C find it hard to learn all those different ways to control flow:
|
||||
<code>for</code>, <code>while</code>, <code>if</code>, <code>do</code>, <code>goto</code>, <code>continue</code>, <code>break</code> and heaven knows what
|
||||
else! So, in this program we only use <code>for</code>, so absolute beginners can get into
|
||||
the code straight away.</li>
|
||||
<li>To teach newcomers all the important features of C, we demonstrate the
|
||||
importance of the liberal use of short circuits, sequence points, the ternary
|
||||
operator, using <code>x^y</code> or <code>x-y</code> instead of <code>x!=y</code>, using <code>~x</code> in place of <code>x!=-1</code>
|
||||
for conciseness, mixing <code>x[y]</code> and <code>y[x]</code> for variety, educational <code>#define</code>s,
|
||||
and so on.</li>
|
||||
<li><code>main()</code> is the most useful function in all of C - so it is a mystery to the
|
||||
author why most programs use it only once. Here we use it over and over for
|
||||
maximum benefit.</li>
|
||||
<li>The number <a href="https://hitchhikers.fandom.com/wiki/42">42</a> is featured in the
|
||||
source to provide an answer to the judges’ deeper questions.</li>
|
||||
<li>How are character colors converted from RGB in the input image to ANSI escape
|
||||
sequences? Clue: the weird macro <code>P</code> does the interesting part of it, but how?</li>
|
||||
<li>The program prints a string when the bonus character is detected. How does it
|
||||
do this? Clue: the string to print is defined in the macro <code>$</code>, but how can a
|
||||
string defined in that way ever get printed?</li>
|
||||
</ul>
|
||||
<h3 id="other-notes">Other notes</h3>
|
||||
<ul>
|
||||
<li>The novel character recognition algorithm used has not been
|
||||
previously published and was developed by the author specifically for
|
||||
the contest. Should this entry win the IOCCC, it will be the first time
|
||||
(to the author’s knowledge) that the IOCCC has been used for peer
|
||||
review/publication of original research.</li>
|
||||
<li>OCR in general is a hard problem. Here, we only recognise one
|
||||
possible form for each character. You can see what the supported
|
||||
character shapes look like by looking at the examples in <a
|
||||
href="ascii.bmp">ascii.bmp</a>. If you copy the shape of the character
|
||||
forms you find in there, recognition accuracy should be very good
|
||||
(95%+). A more “useful” version would extend the character stroke table
|
||||
to support multiple different commonly-used forms for each
|
||||
character.</li>
|
||||
<li>Despite being the largest possible IOCCC entry at 4096 bytes, it is
|
||||
also probably the smallest general-purpose OCR program ever written
|
||||
(including the character stroke data), maybe by several orders of
|
||||
magnitude.</li>
|
||||
<li>The author used an interesting compression algorithm (suggested by
|
||||
Gareth McCaughan - thank you!) to squeeze the character stroke table
|
||||
(containing around 2000 strokes for the whole ASCII character set) into
|
||||
a string constant of just 472 characters.</li>
|
||||
<li>The novel character recognition algorithm used has not been previously
|
||||
published and was developed by the author specifically for the contest. Should
|
||||
this entry win the IOCCC, it will be the first time (to the author’s knowledge)
|
||||
that the IOCCC has been used for peer review/publication of original research.</li>
|
||||
<li>OCR in general is a hard problem. Here, we only recognise one possible form
|
||||
for each character. You can see what the supported character shapes look like by
|
||||
looking at the examples in <a href="ascii.bmp">ascii.bmp</a>. If you copy the shape of the
|
||||
character forms you find in there, recognition accuracy should be very good
|
||||
(95%+). A more “useful” version would extend the character stroke table to
|
||||
support multiple different commonly-used forms for each character.</li>
|
||||
<li>Despite being the largest possible IOCCC entry at 4096 bytes, it is also
|
||||
probably the smallest general-purpose OCR program ever written (including the
|
||||
character stroke data), maybe by several orders of magnitude.</li>
|
||||
<li>The author used an interesting compression algorithm (suggested by Gareth
|
||||
McCaughan - thank you!) to squeeze the character stroke table (containing around
|
||||
2000 strokes for the whole ASCII character set) into a string constant of just
|
||||
472 characters.</li>
|
||||
</ul>
|
||||
<h3 id="bugsfeatures">Bugs/features</h3>
|
||||
<ul>
|
||||
<li>The width of input images must be a multiple of 4.</li>
|
||||
<li>Input images can be 8-bit greyscale, 24-bit color or 32-bit color
|
||||
only. 8-bit color and 16-bit color are not supported. If you use the
|
||||
“color” command-line feature, do not use a greyscale input file!</li>
|
||||
<li>Normal Windows BMP files are stored “upside-down”, i.e. the bottom
|
||||
line in the image is written first. Some (old) graphics programs
|
||||
actually write BMP files “top-to-bottom” and the program does not
|
||||
support such files.</li>
|
||||
<li>Using anti-aliased brush strokes to draw your letters is fine;
|
||||
however, antialiasing interferes with color detection in “color”
|
||||
mode.</li>
|
||||
<li>Only runs on little endian machines (since the BMP format is little
|
||||
endian, and endianness conversion would make the source too large for
|
||||
IOCCC rule 2).</li>
|
||||
<li>Input images can be 8-bit greyscale, 24-bit color or 32-bit color only. 8-bit
|
||||
color and 16-bit color are not supported. If you use the “color” command-line
|
||||
feature, do not use a greyscale input file!</li>
|
||||
<li>Normal Windows BMP files are stored “upside-down”, i.e. the bottom line in the
|
||||
image is written first. Some (old) graphics programs actually write BMP files
|
||||
“top-to-bottom” and the program does not support such files.</li>
|
||||
<li>Using anti-aliased brush strokes to draw your letters is fine; however,
|
||||
antialiasing interferes with color detection in “color” mode.</li>
|
||||
<li>Only runs on little endian machines (since the BMP format is little endian,
|
||||
and endianness conversion would make the source too large for IOCCC rule 2).</li>
|
||||
</ul>
|
||||
<h3 id="compiler-warnings">Compiler warnings</h3>
|
||||
<p><code>clang</code> warns about unused expression results, missing
|
||||
type specifiers, and incompatible pointer conversions - all just a fun
|
||||
consequence of the obfuscations.</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><code>clang</code> warns about unused expression results, missing type specifiers, and
|
||||
incompatible pointer conversions - all just a fun consequence of the
|
||||
obfuscations.</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-2013cable2"><a name="inventory"></a>Inventory for
|
||||
2013/cable2</h1>
|
||||
<h1 id="inventory-for-2013cable2"><a name="inventory"></a>Inventory for 2013/cable2</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/2013/cable2/cable2.c">cable2.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable2/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable2/cable2.orig.c">cable2.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable2/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable2/cable2.c">cable2.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable2/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable2/cable2.orig.c">cable2.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable2/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="ascii.bmp">ascii.bmp</a> - PC bitmap image</li>
|
||||
<li><a href="bonus.bmp">bonus.bmp</a> - PC bitmap image</li>
|
||||
<li><a href="hello_world.bmp">hello_world.bmp</a> - PC bitmap image</li>
|
||||
<li><a href="mixed_sizes.bmp">mixed_sizes.bmp</a> - PC bitmap image</li>
|
||||
<li><a href="multi_color.bmp">multi_color.bmp</a> - PC bitmap image</li>
|
||||
<li><a href="typeset.bmp">typeset.bmp</a> - PC bitmap image</li>
|
||||
<li><a href="2013_cable2.tar.bz2">2013_cable2.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="2013_cable2.tar.bz2">2013_cable2.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/2013/cable2/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable2/.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/2013/cable2/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable2/.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/2013/cable2/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable2/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+275
-382
@@ -130,8 +130,8 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Adrian_Cable">Adrian Cable</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of
|
||||
America</em> (<em>United States</em>) <br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -141,72 +141,56 @@ America</em> (<em>United States</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>An alternate version that should compile in Windows/MS Visual Studio
|
||||
is available. See the <a href="#alternate-code">Alternate code</a>
|
||||
section below.</p>
|
||||
<p>An alternate version that should compile in Windows/MS Visual Studio is
|
||||
available. See the <a href="#alternate-code">Alternate code</a> section 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">./cable3</span> bios-image-file floppy-image-file <span class="pp">[</span><span class="ss">harddisk</span><span class="pp">-</span><span class="ss">image</span><span class="pp">-</span><span class="ss">file</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">./cable3.sh</span></span></code></pre></div>
|
||||
<p>NOTE: to quit the program type <code>QUITEMU</code>. You might have
|
||||
to be at the top level directory of the drive, <code>A:</code> or
|
||||
<code>C:</code>.</p>
|
||||
<p>To send an <code>Alt+XXX</code> key combination, press
|
||||
(<code>^A</code> / <code>Ctrl+A</code>) then the key, so for example to
|
||||
type <code>Alt+F</code>, press (<code>^A</code> / <code>Ctrl+A</code>)
|
||||
then <code>F</code>.</p>
|
||||
<p>To send an <code>Fxx</code> key, press <code>^F</code> /
|
||||
<code>Ctrl+F</code> then a number key. For example, to get the
|
||||
<code>F4</code> key, press <code>^F</code> / <code>Ctrl+F</code> then
|
||||
<code>4</code>. To get <code>F10</code>, press <code>^F</code> /
|
||||
<p>NOTE: to quit the program type <code>QUITEMU</code>. You might have to be at the top level
|
||||
directory of the drive, <code>A:</code> or <code>C:</code>.</p>
|
||||
<p>To send an <code>Alt+XXX</code> key combination, press (<code>^A</code> / <code>Ctrl+A</code>) then the key, so
|
||||
for example to type <code>Alt+F</code>, press (<code>^A</code> / <code>Ctrl+A</code>) then <code>F</code>.</p>
|
||||
<p>To send an <code>Fxx</code> key, press <code>^F</code> / <code>Ctrl+F</code> then a number key. For example, to
|
||||
get the <code>F4</code> key, press <code>^F</code> / <code>Ctrl+F</code> then <code>4</code>. To get <code>F10</code>, press <code>^F</code> /
|
||||
<code>Ctrl+F</code> then <code>0</code>.</p>
|
||||
<p>To send a <code>Page Down</code> key, press <code>^F</code> /
|
||||
<code>Ctrl+F</code> then <code>O</code> (letter O, not digit zero). To
|
||||
send a <code>Page Up</code> key, press <code>^F</code> /
|
||||
<code>Ctrl+F</code> then <code>E</code>. Other key combinations are left
|
||||
for the discovery of the user.</p>
|
||||
<p>To send a <code>Page Down</code> key, press <code>^F</code> / <code>Ctrl+F</code> then <code>O</code> (letter O, not digit
|
||||
zero). To send a <code>Page Up</code> key, press <code>^F</code> / <code>Ctrl+F</code> then <code>E</code>. Other key
|
||||
combinations are left for the discovery of the user.</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>An alternate version, which should compile in Windows, is
|
||||
provided.</p>
|
||||
<p>An alternate version, which should compile in Windows, is provided.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>Assuming <code>make</code> is available and will function:</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>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>cable3.alt</code> as you would <code>cable3</code>
|
||||
above.</p>
|
||||
<p>Use <code>cable3.alt</code> as you would <code>cable3</code> above.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This entry weighs in at a magical 4043 bytes (8086 nibbles, 28,301
|
||||
bits). It manages to implement most of the hardware in a 1980’s era
|
||||
IBM-PC using a few hundred fewer bits than the total number of
|
||||
transistors used to implement the original 8086 CPU.</p>
|
||||
<p>If you are using macOS, the included <a
|
||||
href="sc-ioccc.terminal">sc-ioccc.terminal</a> configuration file will
|
||||
correctly display console applications that use ANSI graphics.</p>
|
||||
<p>NOTE: the author remarked that in some systems one might need to
|
||||
<code>#include <unistd.h></code>. This has been done in the entry
|
||||
but not the alternate version. This should not affect the usability of
|
||||
the program but will trigger a warning which we have disabled in the
|
||||
Makefile.</p>
|
||||
<p>Update: This entry now has its own website: <a
|
||||
href="https://github.com/adriancable/8086tiny"
|
||||
class="uri">https://github.com/adriancable/8086tiny</a></p>
|
||||
<p>If you are using macOS, the included <a href="sc-ioccc.terminal">sc-ioccc.terminal</a>
|
||||
configuration file will correctly display console applications that use ANSI
|
||||
graphics.</p>
|
||||
<p>NOTE: the author remarked that in some systems one might need to <code>#include <unistd.h></code>. This has been done in the entry but not the alternate version. This
|
||||
should not affect the usability of the program but will trigger a warning which
|
||||
we have disabled in the Makefile.</p>
|
||||
<p>Update: This entry now has its own website:
|
||||
<a href="https://github.com/adriancable/8086tiny" class="uri">https://github.com/adriancable/8086tiny</a></p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="a-tiny-but-highly-functional-pc-emulatorvirtual-machine">A tiny
|
||||
but highly functional PC emulator/virtual machine</h3>
|
||||
<p>The author hereby presents, for the delectation (?) of the judges, a
|
||||
portable PC emulator/VM written specifically for the IOCCC which runs
|
||||
DOS, Windows 3.0, Excel, MS Flight Simulator, AutoCAD, Lotus 1-2-3 …</p>
|
||||
<h3 id="a-tiny-but-highly-functional-pc-emulatorvirtual-machine">A tiny but highly functional PC emulator/virtual machine</h3>
|
||||
<p>The author hereby presents, for the delectation (?) of the judges, a portable PC
|
||||
emulator/VM written specifically for the IOCCC which runs DOS, Windows 3.0,
|
||||
Excel, MS Flight Simulator, AutoCAD, Lotus 1-2-3 …</p>
|
||||
<p>In just 4043 bytes of C source, you get a complete mid-late 1980s-era
|
||||
IBM-compatible PC, consisting of:</p>
|
||||
<ul>
|
||||
<li>Intel 8086/186 CPU</li>
|
||||
<li>1MB RAM</li>
|
||||
<li>8072A 3.5” floppy disk controller (1.44MB/720KB)</li>
|
||||
<li>Fixed disk controller (supports a single hard drive up to
|
||||
528MB)</li>
|
||||
<li>Hercules graphics card with 720x348 2-color graphics (64KB video
|
||||
RAM), and <a
|
||||
href="https://en.wikipedia.org/wiki/Color_Graphics_Adapter">CGA</a>
|
||||
<li>Fixed disk controller (supports a single hard drive up to 528MB)</li>
|
||||
<li>Hercules graphics card with 720x348 2-color graphics (64KB video RAM), and
|
||||
<a href="https://en.wikipedia.org/wiki/Color_Graphics_Adapter">CGA</a>
|
||||
80x25 16-color text mode support</li>
|
||||
<li>8253 programmable interval timer (PIT)</li>
|
||||
<li>8259 programmable interrupt controller (PIC)</li>
|
||||
@@ -214,326 +198,267 @@ href="https://en.wikipedia.org/wiki/Color_Graphics_Adapter">CGA</a>
|
||||
<li>MC146818 real-time clock</li>
|
||||
<li>PC speaker</li>
|
||||
</ul>
|
||||
<p>The emulator uses the <a href="https://www.libsdl.org">SDL graphics
|
||||
library</a> for portability, and compiles for Windows, macOS, Linux and
|
||||
probably most other 32-bit/64-bit systems too.</p>
|
||||
<p>If you like living on the edge you can try building the emulator on a
|
||||
big endian machine, and you will get an emulation of a big endian 8086,
|
||||
a rather bizarre and somewhat useless beast. For everyone else, please
|
||||
run the emulator on a little endian machine.</p>
|
||||
<p>The emulator uses the <a href="https://www.libsdl.org">SDL graphics library</a> for
|
||||
portability, and compiles for Windows, macOS, Linux and probably most other
|
||||
32-bit/64-bit systems too.</p>
|
||||
<p>If you like living on the edge you can try building the emulator on a big endian
|
||||
machine, and you will get an emulation of a big endian 8086, a rather bizarre
|
||||
and somewhat useless beast. For everyone else, please run the emulator on a
|
||||
little endian machine.</p>
|
||||
<h3 id="rule-2-abuse-disclaimer">RULE 2 ABUSE DISCLAIMER</h3>
|
||||
<ul>
|
||||
<li><a href="cable3.c">cable3.c</a> is 4043 bytes in length (half an
|
||||
8086).</li>
|
||||
<li><code>iocccsize -i < cable3.c</code> returns 1977 (the year the
|
||||
4.77 MHz 8086 CPU was announced)</li>
|
||||
<li>Therefore, any suspicions the judges may have regarding rule 2
|
||||
non-compliance might be well-intentioned but are groundless.</li>
|
||||
<li>Nonetheless, the author would like to apologise to the judges for
|
||||
the one-big-block-of-code nature of this entry, which turned out to be
|
||||
unavoidable. Hopefully the joys of this entry will make up for its
|
||||
shortcomings.</li>
|
||||
<li><a href="cable3.c">cable3.c</a> is 4043 bytes in length (half an 8086).</li>
|
||||
<li><code>iocccsize -i < cable3.c</code> returns 1977 (the year the 4.77 MHz 8086 CPU was announced)</li>
|
||||
<li>Therefore, any suspicions the judges may have regarding rule 2 non-compliance
|
||||
might be well-intentioned but are groundless.</li>
|
||||
<li>Nonetheless, the author would like to apologise to the judges for the
|
||||
one-big-block-of-code nature of this entry, which turned out to be unavoidable.
|
||||
Hopefully the joys of this entry will make up for its shortcomings.</li>
|
||||
</ul>
|
||||
<h3 id="why-is-this-entry-obfuscatedinteresting">Why is this entry
|
||||
obfuscated/interesting?</h3>
|
||||
<h3 id="why-is-this-entry-obfuscatedinteresting">Why is this entry obfuscated/interesting?</h3>
|
||||
<ul>
|
||||
<li>First of all the 8086 is a nightmare processor to emulate.
|
||||
Instruction codings are complex and irregular in size and structure,
|
||||
with multiple addressing modes and no consistent memory placement for
|
||||
operands, very often multiple possible encodings for the same
|
||||
instruction, and the bizarre segment:offset memory model. In addition,
|
||||
the 8086 has a number of bugs (e.g. PUSH SP), undocumented behaviours
|
||||
and instructions (e.g. AAM/AAD + imm8, SALC, flag behaviour for MUL/DIV,
|
||||
etc. etc.), and archaic features (e.g. parity/auxiliary flags) which all
|
||||
need to be emulated properly. Here we emulate every feature of the CPU
|
||||
pretty exactly (in fact better than most commercial clones of the
|
||||
processor e.g. the NEC V30), with the exception of the trap flag which
|
||||
no real software uses except for debuggers (although support for the TF
|
||||
can be added if deemed important, without exceeding the IOCCC size
|
||||
limit).</li>
|
||||
<li>In addition to the CPU we also emulate all the standard PC
|
||||
peripheral hardware. Parts of it are somewhat complete, much is rather
|
||||
dysfunctional (like the 8253/8259) but enough to support most real
|
||||
software.</li>
|
||||
<li>Nonetheless the source, while large for the IOCCC, is rather tiny
|
||||
for a functional PC emulator - around 2% of the size of the source of
|
||||
other open-source 8086 PC emulators with comparable functionality.</li>
|
||||
<li>In fact, this entry is just like happy hour - at 4043 bytes long,
|
||||
you pay for half the 8086, but you get served the whole one.</li>
|
||||
<li>Getting the code down to <= 4096 characters to meet the IOCCC
|
||||
rule 2 overall size limit required a good deal of effort (and
|
||||
appreciable risk of divorce), with obfuscation being a pretty
|
||||
unavoidable consequence in most places … for the rest, I use short
|
||||
circuit operators whenever possible, mix <code>x[y]</code> and
|
||||
<code>y[x]</code>, don’t use any flow control keywords except for
|
||||
<code>for</code>, use K&R-style declarations to honor the C
|
||||
language’s rich cultural heritage (plus it saves a byte), and
|
||||
occasionally go overboard with nasty nested indexes to give things like
|
||||
this:
|
||||
<li>First of all the 8086 is a nightmare processor to emulate. Instruction codings
|
||||
are complex and irregular in size and structure, with multiple addressing modes
|
||||
and no consistent memory placement for operands, very often multiple possible
|
||||
encodings for the same instruction, and the bizarre segment:offset memory model.
|
||||
In addition, the 8086 has a number of bugs (e.g. PUSH SP), undocumented
|
||||
behaviours and instructions (e.g. AAM/AAD + imm8, SALC, flag behaviour for
|
||||
MUL/DIV, etc. etc.), and archaic features (e.g. parity/auxiliary flags) which
|
||||
all need to be emulated properly. Here we emulate every feature of the CPU
|
||||
pretty exactly (in fact better than most commercial clones of the processor e.g.
|
||||
the NEC V30), with the exception of the trap flag which no real software uses
|
||||
except for debuggers (although support for the TF can be added if deemed
|
||||
important, without exceeding the IOCCC size limit).</li>
|
||||
<li>In addition to the CPU we also emulate all the standard PC peripheral
|
||||
hardware. Parts of it are somewhat complete, much is rather dysfunctional (like
|
||||
the 8253/8259) but enough to support most real software.</li>
|
||||
<li>Nonetheless the source, while large for the IOCCC, is rather tiny for a
|
||||
functional PC emulator - around 2% of the size of the source of other
|
||||
open-source 8086 PC emulators with comparable functionality.</li>
|
||||
<li>In fact, this entry is just like happy hour - at 4043 bytes long, you pay for
|
||||
half the 8086, but you get served the whole one.</li>
|
||||
<li>Getting the code down to <= 4096 characters to meet the IOCCC rule 2 overall
|
||||
size limit required a good deal of effort (and appreciable risk of divorce),
|
||||
with obfuscation being a pretty unavoidable consequence in most places … for
|
||||
the rest, I use short circuit operators whenever possible, mix <code>x[y]</code> and <code>y[x]</code>,
|
||||
don’t use any flow control keywords except for <code>for</code>, use K&R-style declarations
|
||||
to honor the C language’s rich cultural heritage (plus it saves a byte), and
|
||||
occasionally go overboard with nasty nested indexes to give things like this:
|
||||
<code>--64[T=1[O=32[L=(X=*Y&7)&1,o=X/2&1,l]=0,t=(c=y)&7,a=c/8&7,Y]>>6,g=~-T?y:(n)y,d=BX=y,l]</code>.</li>
|
||||
<li>This entry highlights the importance of comments in C.</li>
|
||||
<li>This entry might result in an adjustment to the IOCCC size tool for
|
||||
the 2014 competition (see above).</li>
|
||||
<li>This entry might result in an adjustment to the IOCCC size tool for the 2014
|
||||
competition (see above).</li>
|
||||
</ul>
|
||||
<h3 id="compiling-on-different-platforms">Compiling on different
|
||||
platforms</h3>
|
||||
<p>This entry has been tested on Windows (compiled with MS Visual Studio
|
||||
2010 and 2013), Mac OS X (clang and gcc), and Linux (clang and gcc). The
|
||||
Makefile supplied is good for Mac OS X, Linux and probably other Unices.
|
||||
I have received reports that the emulator works on Raspberry
|
||||
Pi/Android/ARM (you will need to compile with
|
||||
<code>-fsigned-char</code>) and iOS. You will need to adjust the <a
|
||||
href="Makefile">Makefile</a> if your system lacks
|
||||
<code>sdl-config</code> to correctly point to the SDL libraries and
|
||||
header files.</p>
|
||||
<p>On UNIX-based systems we can get raw keystrokes using
|
||||
<code>stty</code>. However Windows has no <code>stty</code>. Therefore
|
||||
the Makefile includes a <code>-D</code> option to define a “keyboard
|
||||
driver” <code>KB</code> which as it stands is suitable for Unices, but
|
||||
maybe not non-UNIX platforms. For example, for Windows/MS Visual Studio,
|
||||
instead of the Makefile definition of KB, use something slightly
|
||||
different - add the following entry to the Preprocessor Definitions list
|
||||
in the Project Properties page:</p>
|
||||
<h3 id="compiling-on-different-platforms">Compiling on different platforms</h3>
|
||||
<p>This entry has been tested on Windows (compiled with MS Visual Studio 2010 and
|
||||
2013), Mac OS X (clang and gcc), and Linux (clang and gcc). The Makefile
|
||||
supplied is good for Mac OS X, Linux and probably other Unices. I have received
|
||||
reports that the emulator works on Raspberry Pi/Android/ARM (you will need to
|
||||
compile with <code>-fsigned-char</code>) and iOS. You will need to adjust the
|
||||
<a href="Makefile">Makefile</a> if your system lacks <code>sdl-config</code> to correctly point to the
|
||||
SDL libraries and header files.</p>
|
||||
<p>On UNIX-based systems we can get raw keystrokes using <code>stty</code>. However Windows
|
||||
has no <code>stty</code>. Therefore the Makefile includes a <code>-D</code> option to define a
|
||||
“keyboard driver” <code>KB</code> which as it stands is suitable for Unices, but maybe not
|
||||
non-UNIX platforms. For example, for Windows/MS Visual Studio, instead of the
|
||||
Makefile definition of KB, use something slightly different - add the following
|
||||
entry to the Preprocessor Definitions list in the Project Properties page:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>KB<span class="op">=(</span>kb<span class="op">=</span>H<span class="op">(</span><span class="dv">8</span><span class="op">),</span>kbhit<span class="op">())&&(</span>r<span class="op">[</span><span class="dv">1190</span><span class="op">]=</span>getch<span class="op">(),</span>H<span class="op">(</span><span class="dv">7</span><span class="op">))</span></span></code></pre></div>
|
||||
<p>NOTE: this is done in the <a href="#alternate-code">Alternate
|
||||
code</a>.</p>
|
||||
<p>NOTE: this is done in the <a href="#alternate-code">Alternate code</a>.</p>
|
||||
<h3 id="posix-portability-note">POSIX portability note</h3>
|
||||
<p>The code as supplied uses implicit function declarations for POSIX
|
||||
file I/O and in doing so assumes that file offsets are the same bit
|
||||
width as your architecture. For some systems (e.g. 32-bit Mac OS X,
|
||||
which uses 64-bit file offsets) this is not the case, and to run
|
||||
successfully on these systems, you will need to explicitly declare these
|
||||
functions by adding the appropriate include to the top of the
|
||||
source:</p>
|
||||
<p>The code as supplied uses implicit function declarations for POSIX file I/O and
|
||||
in doing so assumes that file offsets are the same bit width as your
|
||||
architecture. For some systems (e.g. 32-bit Mac OS X, which uses 64-bit file
|
||||
offsets) this is not the case, and to run successfully on these systems, you
|
||||
will need to explicitly declare these functions by adding the appropriate
|
||||
include to the top of the source:</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><unistd.h></span></span></code></pre></div>
|
||||
<p>NOTE: this has been done in <a href="cable3.c">cable3.c</a>.</p>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<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">./cable3</span> bios-image-file floppy-image-file <span class="pp">[</span><span class="ss">harddisk</span><span class="pp">-</span><span class="ss">image</span><span class="pp">-</span><span class="ss">file</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>PLEASE NOTE that under Unices the keyboard must be in raw mode for
|
||||
the emulator to work properly. Therefore the emulator is best run from a
|
||||
shell script that looks something like:</p>
|
||||
<p>PLEASE NOTE that under Unices the keyboard must be in raw mode for the emulator
|
||||
to work properly. Therefore the emulator is best run from a shell script that
|
||||
looks something like:</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">stty</span> cbreak raw <span class="at">-echo</span> min 0</span>
|
||||
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./cable3</span> bios floppy.img harddisk.img</span>
|
||||
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="fu">stty</span> cooked echo</span></code></pre></div>
|
||||
<p>See the <a href="cable3.sh">cable3.sh</a> script.</p>
|
||||
<h2 id="to-use-the-emulator---floppy-mode-only">To use the emulator -
|
||||
floppy mode only</h2>
|
||||
<p>The simplest use of the emulator is with a single floppy boot disk
|
||||
image, like the <code>fd.img</code> provided, which is a FreeDOS boot
|
||||
disk.</p>
|
||||
<p>Before running the emulator on a Unix-type system, <code>stty</code>
|
||||
needs to be used to put the keyboard into raw mode (and afterwards it
|
||||
needs to be put back to cooked). So, run the emulator using something
|
||||
like this script (provided as <a href="cable3.sh">cable3.sh</a>):</p>
|
||||
<h2 id="to-use-the-emulator---floppy-mode-only">To use the emulator - floppy mode only</h2>
|
||||
<p>The simplest use of the emulator is with a single floppy boot disk image, like
|
||||
the <code>fd.img</code> provided, which is a FreeDOS boot disk.</p>
|
||||
<p>Before running the emulator on a Unix-type system, <code>stty</code> needs to be used to
|
||||
put the keyboard into raw mode (and afterwards it needs to be put back to
|
||||
cooked). So, run the emulator using something like this script (provided as
|
||||
<a href="cable3.sh">cable3.sh</a>):</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">stty</span> cbreak raw <span class="at">-echo</span> min 0</span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./cable3</span> bios fd.img</span>
|
||||
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="fu">stty</span> cooked echo</span></code></pre></div>
|
||||
<h2 id="to-use-the-emulator---floppy-hd-mode">To use the emulator -
|
||||
floppy + HD mode</h2>
|
||||
<p>Easiest to start with is to try a ready-made 40MB hard disk image
|
||||
containing a whole bunch of software which is in the included file
|
||||
<code>hd.img</code>.</p>
|
||||
<p>For the more adventurous, you can start off with (for example) a
|
||||
blank 40MB image file called hd.img made using e.g. Makefile. Then
|
||||
use:</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">stty</span> cbreak raw <span class="at">-echo</span> min 0</span>
|
||||
<h2 id="to-use-the-emulator---floppy-hd-mode">To use the emulator - floppy + HD mode</h2>
|
||||
<p>Easiest to start with is to try a ready-made 40MB hard disk image containing a
|
||||
whole bunch of software which is in the included file <code>hd.img</code>.</p>
|
||||
<p>For the more adventurous, you can start off with (for example) a blank 40MB
|
||||
image file called hd.img made using e.g. Makefile. Then use:</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">stty</span> cbreak raw <span class="at">-echo</span> min 0</span>
|
||||
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./cable3</span> bios fd.img hd.img</span>
|
||||
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a><span class="fu">stty</span> cooked echo</span></code></pre></div>
|
||||
<p>Preparing the hard disk for use in the emulator is done just like a
|
||||
real PC. Boot the emulator, and use <code>FDISK</code> to partition the
|
||||
hard disk. When it’s done <code>FDISK</code> will reboot the emulator.
|
||||
Then you can use <code>FORMAT C:</code> and you are done. The resulting
|
||||
disk image is in the right format to be mounted on a real Windows PC
|
||||
using e.g. <code>OSFMount</code> (Windows), <code>hdiutil</code>
|
||||
(macOS), or <code>mount</code> (linux/unix), providing an easy way to
|
||||
copy files and programs to and from the disk image. Or, you can install
|
||||
programs from regular floppy disk images (see <a
|
||||
href="#floppy-disk-support">Floppy disk support</a> below).</p>
|
||||
<p>Preparing the hard disk for use in the emulator is done just like a real PC.
|
||||
Boot the emulator, and use <code>FDISK</code> to partition the hard disk. When it’s done
|
||||
<code>FDISK</code> will reboot the emulator. Then you can use <code>FORMAT C:</code> and you are done. The
|
||||
resulting disk image is in the right format to be mounted on a real Windows PC
|
||||
using e.g. <code>OSFMount</code> (Windows), <code>hdiutil</code> (macOS), or <code>mount</code> (linux/unix), providing
|
||||
an easy way to copy files and programs to and from the disk image. Or, you can
|
||||
install programs from regular floppy disk images (see <a href="#floppy-disk-support">Floppy disk
|
||||
support</a> below).</p>
|
||||
<h3 id="keyboard-emulation">Keyboard emulation</h3>
|
||||
<p>The emulator emulates an XT-style keyboard controlled by an Intel
|
||||
8042 chip on I/O port 0x60, generating IRQ1 and then interrupt 9 on each
|
||||
key press. This is harder than it sounds because a real 8042 returns
|
||||
scan codes rather than the ASCII characters which the C standard I/O
|
||||
functions return. Rather than make the emulator less portable and use
|
||||
<code>ioctl(2)</code> or platform-dependent equivalents to obtain real
|
||||
scan codes from the keyboard, the emulator BIOS does the reverse of a
|
||||
real PC BIOS and converts ASCII characters to scan codes, simulating
|
||||
depress/release of the modifier keys (e.g. shift) as necessary to work
|
||||
like a “real” keyboard. The OS (DOS/Windows) then converts them back to
|
||||
ASCII characters and although this process normally works seamlessly
|
||||
don’t be surprised if there are issues, for example, with non-QWERTY
|
||||
e.g. international keyboards.</p>
|
||||
<p>Most of the time you can just type normally, but there are special
|
||||
sequences to get <code>Alt+xxx</code> and <code>Fxxx</code>.</p>
|
||||
<p>To send an <code>Alt+XXX</code> key combination, press
|
||||
(<code>^A</code> / <code>Ctrl+A</code>) then the key, so for example to
|
||||
type <code>Alt+F</code>, press (<code>^A</code> / <code>Ctrl+A</code>)
|
||||
then <code>F</code>.</p>
|
||||
<p>To send an <code>Fxx</code> key, press <code>^F</code> /
|
||||
<code>Ctrl+F</code> then a number key. For example, to get the
|
||||
<code>F4</code> key, press <code>^F</code> / <code>Ctrl+F</code> then
|
||||
<code>4</code>. To get <code>F10</code>, press <code>^F</code> /
|
||||
<p>The emulator emulates an XT-style keyboard controlled by an Intel 8042 chip on
|
||||
I/O port 0x60, generating IRQ1 and then interrupt 9 on each key press. This is
|
||||
harder than it sounds because a real 8042 returns scan codes rather than the
|
||||
ASCII characters which the C standard I/O functions return. Rather than make the
|
||||
emulator less portable and use <code>ioctl(2)</code> or platform-dependent equivalents to obtain
|
||||
real scan codes from the keyboard, the emulator BIOS does the reverse of a real
|
||||
PC BIOS and converts ASCII characters to scan codes, simulating depress/release of
|
||||
the modifier keys (e.g. shift) as necessary to work like a “real” keyboard. The
|
||||
OS (DOS/Windows) then converts them back to ASCII characters and although this
|
||||
process normally works seamlessly don’t be surprised if there are issues, for
|
||||
example, with non-QWERTY e.g. international keyboards.</p>
|
||||
<p>Most of the time you can just type normally, but there are special sequences to
|
||||
get <code>Alt+xxx</code> and <code>Fxxx</code>.</p>
|
||||
<p>To send an <code>Alt+XXX</code> key combination, press (<code>^A</code> / <code>Ctrl+A</code>) then the key, so
|
||||
for example to type <code>Alt+F</code>, press (<code>^A</code> / <code>Ctrl+A</code>) then <code>F</code>.</p>
|
||||
<p>To send an <code>Fxx</code> key, press <code>^F</code> / <code>Ctrl+F</code> then a number key. For example, to
|
||||
get the <code>F4</code> key, press <code>^F</code> / <code>Ctrl+F</code> then <code>4</code>. To get <code>F10</code>, press <code>^F</code> /
|
||||
<code>Ctrl+F</code> then <code>0</code>.</p>
|
||||
<p>To send a <code>Page Down</code> key, press <code>^F</code> /
|
||||
<code>Ctrl+F</code> then <code>O</code> (letter O, not digit zero). To
|
||||
send a <code>Page Up</code> key, press <code>^F</code> /
|
||||
<code>Ctrl+F</code> then <code>E</code>. Other key combinations are left
|
||||
for the discovery of the user.</p>
|
||||
<p>To send a <code>Page Down</code> key, press <code>^F</code> / <code>Ctrl+F</code> then <code>O</code> (letter O, not digit
|
||||
zero). To send a <code>Page Up</code> key, press <code>^F</code> / <code>Ctrl+F</code> then <code>E</code>. Other key
|
||||
combinations are left for the discovery of the user.</p>
|
||||
<h3 id="text-mode-support">Text mode support</h3>
|
||||
<p>The emulator supports both text output via the standard BIOS
|
||||
interrupt 0x10 interface, and also direct video memory access (one page,
|
||||
4KB video RAM at segment <code>B800</code>) in
|
||||
<code>80x25 CGA 16-color</code> text mode.</p>
|
||||
<p>BIOS text output calls are converted to simple writes to
|
||||
<code>stdout</code>. Direct video memory accesses for the
|
||||
<code>80x25 CGA color</code> text mode are converted to ANSI terminal
|
||||
escape sequences. If you are using a terminal which does not support
|
||||
ANSI (e.g. you are compiling the emulator with <code>MS VC++</code> and
|
||||
running in a Windows console window) then PC applications that directly
|
||||
write to video memory in text mode might be unusable.</p>
|
||||
<p>Most <code>CGA I/O</code> ports are not supported except for the
|
||||
<code>CGA refresh</code> register at <code>0x3DA</code>, which some
|
||||
applications use for timing or synchronisation.</p>
|
||||
<p>The regular PC character code page (<code>437</code>) includes
|
||||
various extended ASCII characters for things like line drawing. You
|
||||
might want to set the font in your terminal program to something that
|
||||
includes these (e.g. on Mac OS X there is a freeware font called <a
|
||||
href="https://www.dafont.com/perfect-dos-vga-437.font">Perfect DOS VGA
|
||||
<p>The emulator supports both text output via the standard BIOS interrupt 0x10
|
||||
interface, and also direct video memory access (one page, 4KB video RAM at
|
||||
segment <code>B800</code>) in <code>80x25 CGA 16-color</code> text mode.</p>
|
||||
<p>BIOS text output calls are converted to simple writes to <code>stdout</code>. Direct video
|
||||
memory accesses for the <code>80x25 CGA color</code> text mode are converted to ANSI
|
||||
terminal escape sequences. If you are using a terminal which does not support
|
||||
ANSI (e.g. you are compiling the emulator with <code>MS VC++</code> and running in a
|
||||
Windows console window) then PC applications that directly write to video memory
|
||||
in text mode might be unusable.</p>
|
||||
<p>Most <code>CGA I/O</code> ports are not supported except for the <code>CGA refresh</code> register at
|
||||
<code>0x3DA</code>, which some applications use for timing or synchronisation.</p>
|
||||
<p>The regular PC character code page (<code>437</code>) includes various extended ASCII
|
||||
characters for things like line drawing. You might want to set the font in your
|
||||
terminal program to something that includes these (e.g. on Mac OS X there is a
|
||||
freeware font called <a href="https://www.dafont.com/perfect-dos-vga-437.font">Perfect DOS VGA
|
||||
437</a> which does the trick).</p>
|
||||
<p>Occasionally a DOS application on exit will leave the video hardware
|
||||
in an odd state which confuses the emulator, resulting in subsequent
|
||||
text output being invisible. If this happens, just use the DOS
|
||||
<code>CLS</code> command to clear the screen and all will be well
|
||||
again.</p>
|
||||
<p>Occasionally a DOS application on exit will leave the video hardware in an odd
|
||||
state which confuses the emulator, resulting in subsequent text output being
|
||||
invisible. If this happens, just use the DOS <code>CLS</code> command to clear the screen
|
||||
and all will be well again.</p>
|
||||
<h3 id="graphics-mode-support">Graphics mode support</h3>
|
||||
<p><a
|
||||
href="https://en.wikipedia.org/wiki/Hercules_Graphics_Card">Hercules
|
||||
720x348 monochrome graphics mode</a> emulation is implemented using SDL.
|
||||
Most Hercules features are supported via the normal I/O interface on
|
||||
ports <code>0x3B8</code> and <code>0x3BA</code> including video memory
|
||||
bank switching (segments <code>B000</code>/<code>B800</code>), which
|
||||
some games use for double-buffered graphics. CGA graphics modes are not
|
||||
supported.</p>
|
||||
<p>When an application enters graphics mode, the emulator will open an
|
||||
SDL window (which will be closed when the application goes back to text
|
||||
mode). Including code to redirect keystrokes from the SDL window to the
|
||||
main terminal window would have busted the IOCCC size limits, so you
|
||||
need to keep the main emulator terminal window in focus at all times
|
||||
even when you are doing graphics (sounds a little odd but you will get
|
||||
used to it).</p>
|
||||
<p>On Unices, SDL will automatically output graphics via X11 if the
|
||||
DISPLAY environment variable is set up.</p>
|
||||
<p><a href="https://en.wikipedia.org/wiki/Hercules_Graphics_Card">Hercules 720x348 monochrome graphics
|
||||
mode</a> emulation is
|
||||
implemented using SDL. Most Hercules features are supported via the normal I/O
|
||||
interface on ports <code>0x3B8</code> and <code>0x3BA</code> including video memory bank switching
|
||||
(segments <code>B000</code>/<code>B800</code>), which some games use for double-buffered graphics. CGA
|
||||
graphics modes are not supported.</p>
|
||||
<p>When an application enters graphics mode, the emulator will open an SDL window
|
||||
(which will be closed when the application goes back to text mode). Including
|
||||
code to redirect keystrokes from the SDL window to the main terminal window
|
||||
would have busted the IOCCC size limits, so you need to keep the main emulator
|
||||
terminal window in focus at all times even when you are doing graphics (sounds a
|
||||
little odd but you will get used to it).</p>
|
||||
<p>On Unices, SDL will automatically output graphics via X11 if the DISPLAY
|
||||
environment variable is set up.</p>
|
||||
<h3 id="dual-graphics-card-support">Dual graphics card support</h3>
|
||||
<p>Some applications (e.g. AutoCAD) support a PC configuration with a
|
||||
CGA card and a Hercules card, for simultaneous text and graphics output
|
||||
on different displays. The emulator simulates this configuration, too,
|
||||
using separate windows for the (terminal) text and (SDL) graphics
|
||||
displays.</p>
|
||||
<p>Some applications (e.g. AutoCAD) support a PC configuration with a CGA card and
|
||||
a Hercules card, for simultaneous text and graphics output on different
|
||||
displays. The emulator simulates this configuration, too, using separate windows
|
||||
for the (terminal) text and (SDL) graphics displays.</p>
|
||||
<h3 id="bios">BIOS</h3>
|
||||
<p>Like a real PC, the emulator needs a BIOS to do anything useful. Here
|
||||
we use a custom BIOS, written from scratch specifically for the
|
||||
emulator. Source code for the BIOS (written in 8086 assembly language)
|
||||
which compiles with the freely-available NASM x86 assembler is in <a
|
||||
href="bios.asm">bios.asm</a>.</p>
|
||||
<p>The BIOS implements the standard interrupt interfaces for video,
|
||||
disk, timer, clock and so on, much as a “real” PC BIOS does, and also a
|
||||
small timer-controlled video driver to convert video memory formatting
|
||||
into ANSI escape sequences when the emulator is in text mode.</p>
|
||||
<p>Like a real PC, the emulator needs a BIOS to do anything useful. Here we use a
|
||||
custom BIOS, written from scratch specifically for the emulator. Source code for
|
||||
the BIOS (written in 8086 assembly language) which compiles with the
|
||||
freely-available NASM x86 assembler is in <a href="bios.asm">bios.asm</a>.</p>
|
||||
<p>The BIOS implements the standard interrupt interfaces for video, disk, timer,
|
||||
clock and so on, much as a “real” PC BIOS does, and also a small
|
||||
timer-controlled video driver to convert video memory formatting into ANSI
|
||||
escape sequences when the emulator is in text mode.</p>
|
||||
<h3 id="cpu-and-memory-emulation">CPU and memory emulation</h3>
|
||||
<p>Memory map is largely as per a real PC, with interrupt vector table
|
||||
at <code>0:0</code>, BIOS data area including keyboard buffer at
|
||||
<code>40:0</code>, CGA text video memory at <code>B800:0</code>,
|
||||
Hercules dual-bank graphics memory at
|
||||
<code>B000</code>/<code>B800:0</code>, and BIOS at
|
||||
<code>F000:100</code>. Unlike a real PC, in the emulator the CPU
|
||||
registers are memory-mapped (at <code>F000:0</code>), which enables
|
||||
considerable optimisation of the emulator’s instruction execution unit
|
||||
by permitting the unification of memory and register operations, while
|
||||
remaining invisible to the running software.</p>
|
||||
<p>The CPU supports the full 8086/186 instruction set. Due to the
|
||||
complexities of the 8086’s arbitrary-length instruction decoding and
|
||||
flags, 8086 instructions are first converted to a simpler intermediate
|
||||
format before being executed. This conversion, along with instruction
|
||||
lengths and how each instruction modifies the flags, is assisted by some
|
||||
lookup tables which form part of the BIOS binary.</p>
|
||||
<p>The CPU also implements some “special” two-byte opcodes to help the
|
||||
emulator talk with the outside world. These are:</p>
|
||||
<p>Memory map is largely as per a real PC, with interrupt vector table at <code>0:0</code>,
|
||||
BIOS data area including keyboard buffer at <code>40:0</code>, CGA text video memory at
|
||||
<code>B800:0</code>, Hercules dual-bank graphics memory at <code>B000</code>/<code>B800:0</code>, and BIOS at
|
||||
<code>F000:100</code>. Unlike a real PC, in the emulator the CPU registers are
|
||||
memory-mapped (at <code>F000:0</code>), which enables considerable optimisation of the
|
||||
emulator’s instruction execution unit by permitting the unification of memory
|
||||
and register operations, while remaining invisible to the running software.</p>
|
||||
<p>The CPU supports the full 8086/186 instruction set. Due to the complexities of
|
||||
the 8086’s arbitrary-length instruction decoding and flags, 8086 instructions
|
||||
are first converted to a simpler intermediate format before being executed. This
|
||||
conversion, along with instruction lengths and how each instruction modifies the
|
||||
flags, is assisted by some lookup tables which form part of the BIOS binary.</p>
|
||||
<p>The CPU also implements some “special” two-byte opcodes to help the emulator
|
||||
talk with the outside world. These are:</p>
|
||||
<ul>
|
||||
<li><code>0F 00</code> - output character in register <code>AL</code> to
|
||||
terminal.</li>
|
||||
<li><code>0F 01</code> - write real-time clock data (as returned by
|
||||
<code>localtime()</code>) to memory location <code>ES:BX</code>.</li>
|
||||
<li><code>0F 02</code> - read <code>AX</code> bytes from disk at offset
|
||||
<code>512*(16*SI+BP)</code> into memory location <code>ES:BX</code>.
|
||||
Disk is specified in <code>DL</code> (<code>0</code> = hard disk,
|
||||
<code>1</code> = floppy disk).</li>
|
||||
<li><code>0F 03</code> - write <code>AX</code> bytes at memory location
|
||||
<code>ES:BX</code> to disk at offset <code>512*(16*SI+BP)</code>. Disk
|
||||
is specified in <code>DL</code> as per <code>0F 02</code>.</li>
|
||||
<li><code>0F 00</code> - output character in register <code>AL</code> to terminal.</li>
|
||||
<li><code>0F 01</code> - write real-time clock data (as returned by <code>localtime()</code>) to memory
|
||||
location <code>ES:BX</code>.</li>
|
||||
<li><code>0F 02</code> - read <code>AX</code> bytes from disk at offset <code>512*(16*SI+BP)</code> into memory
|
||||
location <code>ES:BX</code>. Disk is specified in <code>DL</code> (<code>0</code> = hard disk, <code>1</code> = floppy
|
||||
disk).</li>
|
||||
<li><code>0F 03</code> - write <code>AX</code> bytes at memory location <code>ES:BX</code> to disk at offset
|
||||
<code>512*(16*SI+BP)</code>. Disk is specified in <code>DL</code> as per <code>0F 02</code>.</li>
|
||||
</ul>
|
||||
<p>Emulator exit is triggered if <code>CS:IP == 0:0</code> (which would
|
||||
be nonsensical in real software since this is where the interrupt vector
|
||||
table lives). The supplied <code>fd.img</code> disk includes a small
|
||||
program <code>QUITEMU.COM</code> which contains a single
|
||||
<code>JMP 0:0</code> instruction, to allow the user to easily quit the
|
||||
emulator without shutting down the terminal.</p>
|
||||
<p>Emulator exit is triggered if <code>CS:IP == 0:0</code> (which would be nonsensical in real
|
||||
software since this is where the interrupt vector table lives). The supplied
|
||||
<code>fd.img</code> disk includes a small program <code>QUITEMU.COM</code> which contains a single
|
||||
<code>JMP 0:0</code> instruction, to allow the user to easily quit the emulator without
|
||||
shutting down the terminal.</p>
|
||||
<h3 id="floppy-disk-support">Floppy disk support</h3>
|
||||
<p>Emulates a 3.5” high-density floppy drive. Can read, write and format
|
||||
1.44MB disks (18 sectors per track, 2 heads) and 720KB disks (9 sectors
|
||||
per track, 2 heads).</p>
|
||||
<p>If you want to install your own software from floppy images
|
||||
(downloaded from e.g. <a href="https://vetusware.com">Vetusware</a>),
|
||||
the easiest way to “change disks” is to copy each disk image in turn
|
||||
over the floppy image file you specify on the command line. Don’t forget
|
||||
to put your original boot disk back at the end!</p>
|
||||
<p>Emulates a 3.5” high-density floppy drive. Can read, write and format 1.44MB
|
||||
disks (18 sectors per track, 2 heads) and 720KB disks (9 sectors per track, 2
|
||||
heads).</p>
|
||||
<p>If you want to install your own software from floppy images (downloaded from
|
||||
e.g. <a href="https://vetusware.com">Vetusware</a>), the easiest way to “change disks” is
|
||||
to copy each disk image in turn over the floppy image file you specify on the
|
||||
command line. Don’t forget to put your original boot disk back at the end!</p>
|
||||
<h3 id="hard-disk-support">Hard disk support</h3>
|
||||
<p>Supports up to 1023 cylinders, 63 sectors per track, 63 heads for
|
||||
disks up to 528MB.</p>
|
||||
<p>Disk image format used is a subset of the standard “raw” format used
|
||||
by most disk image mount tools. In general, disk images prepared by the
|
||||
emulator will work with disk image tools and other emulators, but not
|
||||
the other way around.</p>
|
||||
<p>Supports up to 1023 cylinders, 63 sectors per track, 63 heads for disks up to
|
||||
528MB.</p>
|
||||
<p>Disk image format used is a subset of the standard “raw” format used by most
|
||||
disk image mount tools. In general, disk images prepared by the emulator will
|
||||
work with disk image tools and other emulators, but not the other way around.</p>
|
||||
<p>The emulator uses a particularly dumb algorithm to derive a simulated
|
||||
cylinder/sector/head geometry from the disk image file’s size. This
|
||||
algorithm often results in not all the space in the image file being
|
||||
available for disk partitions. For example, creating a 40,000,000 byte
|
||||
image file results in <code>DOS FDISK</code> seeing only 31.9MB as the
|
||||
volume size.</p>
|
||||
<p>Note that unlike a real PC, the emulator cannot boot from a hard disk
|
||||
(image). Therefore, you will always need to use a bootable floppy image,
|
||||
even if after boot everything runs from the HD.</p>
|
||||
cylinder/sector/head geometry from the disk image file’s size. This algorithm
|
||||
often results in not all the space in the image file being available for disk
|
||||
partitions. For example, creating a 40,000,000 byte image file results in <code>DOS FDISK</code> seeing only 31.9MB as the volume size.</p>
|
||||
<p>Note that unlike a real PC, the emulator cannot boot from a hard disk (image).
|
||||
Therefore, you will always need to use a bootable floppy image, even if after
|
||||
boot everything runs from the HD.</p>
|
||||
<h3 id="mouse">Mouse</h3>
|
||||
<p>No mouse is emulated.</p>
|
||||
<h3 id="real-time-clock">Real-time clock</h3>
|
||||
<p>Reading the <a
|
||||
href="https://en.wikipedia.org/wiki/Real-time_clock">RTC</a> (both time
|
||||
and date) is emulated via the standard BIOS clock interface, pulling the
|
||||
time/date from the host computer. Setting the time or date is not
|
||||
supported.</p>
|
||||
<p>Reading the <a href="https://en.wikipedia.org/wiki/Real-time_clock">RTC</a> (both time and
|
||||
date) is emulated via the standard BIOS clock interface, pulling the time/date
|
||||
from the host computer. Setting the time or date is not supported.</p>
|
||||
<h3 id="timers">Timers</h3>
|
||||
<p>A countdown timer on I/O port <code>0x40</code> is simulated in a
|
||||
broken way which is good enough for most software. On a real PC this has
|
||||
a default period of 55ms and is programmable. No programmability is
|
||||
supported in the emulator and the period may be about right or
|
||||
completely wrong depending on the actual speed of your computer.</p>
|
||||
<p>On a real PC, IRQ 0 and interrupt 8 are fired every 55ms. The
|
||||
emulator tries to do the same but again, the delay period is not
|
||||
calibrated so you get what you get.</p>
|
||||
<p>A countdown timer on I/O port <code>0x40</code> is simulated in a broken way which is good
|
||||
enough for most software. On a real PC this has a default period of 55ms and is
|
||||
programmable. No programmability is supported in the emulator and the period may
|
||||
be about right or completely wrong depending on the actual speed of your
|
||||
computer.</p>
|
||||
<p>On a real PC, IRQ 0 and interrupt 8 are fired every 55ms. The emulator tries to
|
||||
do the same but again, the delay period is not calibrated so you get what you
|
||||
get.</p>
|
||||
<h3 id="pc-speaker">PC speaker</h3>
|
||||
<p>Beeps only, through the console.</p>
|
||||
<h3 id="software-supported">Software supported</h3>
|
||||
<p>The emulator will run practically any software a real PC (of the spec
|
||||
listed at the top of this file) can. The author has tested a number of
|
||||
OSes/GUIs (MS-DOS 6.22, FreeDOS 0.82pl3, Windows 3.0, DESQview 2.8),
|
||||
professional software (Lotus 1-2-3 2.4 and AsEasyAs 5.7 for DOS, Excel
|
||||
2.1 for Windows, AutoCAD 2.5, WordStar 4), programming languages
|
||||
(QBASIC, GWBASIC, Turbo C++), games (Carrier Command, Police Quest, and
|
||||
a bunch of freeware Windows games), and diagnostic/benchmark software
|
||||
(Manifest, Microsoft MSD, InfoSpot, CheckIt) and all of them run
|
||||
well.</p>
|
||||
<p>Screenshots of some of these applications running (on Mac OS X) are
|
||||
provided for the impatient.</p>
|
||||
<p>The emulator will run practically any software a real PC (of the spec listed at
|
||||
the top of this file) can. The author has tested a number of OSes/GUIs (MS-DOS
|
||||
6.22, FreeDOS 0.82pl3, Windows 3.0, DESQview 2.8), professional software (Lotus
|
||||
1-2-3 2.4 and AsEasyAs 5.7 for DOS, Excel 2.1 for Windows, AutoCAD 2.5, WordStar
|
||||
4), programming languages (QBASIC, GWBASIC, Turbo C++), games (Carrier Command,
|
||||
Police Quest, and a bunch of freeware Windows games), and diagnostic/benchmark
|
||||
software (Manifest, Microsoft MSD, InfoSpot, CheckIt) and all of them run well.</p>
|
||||
<p>Screenshots of some of these applications running (on Mac OS X) are provided for
|
||||
the impatient.</p>
|
||||
<figure>
|
||||
<img src="screenshot_autocad.png" alt="AutoCAD" />
|
||||
<figcaption aria-hidden="true">AutoCAD</figcaption>
|
||||
@@ -559,79 +484,47 @@ provided for the impatient.</p>
|
||||
<figcaption aria-hidden="true">Windows 3 on macOS</figcaption>
|
||||
</figure>
|
||||
<h3 id="compiler-warnings">Compiler warnings</h3>
|
||||
<p>A lot of compiler warnings are produced by clang. Missing type
|
||||
specifiers, control reaching the end of functions without returning
|
||||
values, incompatible pointer type assignments, and some precedence
|
||||
warnings, all necessary to keep the source size down. Other compilers
|
||||
are likely to produce similar warnings.</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>A lot of compiler warnings are produced by clang. Missing type specifiers,
|
||||
control reaching the end of functions without returning values, incompatible
|
||||
pointer type assignments, and some precedence warnings, all necessary to keep
|
||||
the source size down. Other compilers are likely to produce similar warnings.</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-2013cable3"><a name="inventory"></a>Inventory for
|
||||
2013/cable3</h1>
|
||||
<h1 id="inventory-for-2013cable3"><a name="inventory"></a>Inventory for 2013/cable3</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/2013/cable3/cable3.c">cable3.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/cable3.alt.c">cable3.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/cable3.orig.c">cable3.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/cable3.sh">cable3.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="screenshot_autocad.png">screenshot_autocad.png</a> -
|
||||
Screenshots of some applications running on macOS</li>
|
||||
<li><a href="screenshot_flightsim4.png">screenshot_flightsim4.png</a> -
|
||||
Screenshots of some applications running on macOS</li>
|
||||
<li><a href="screenshot_lotus123.png">screenshot_lotus123.png</a> -
|
||||
Screenshots of some applications running on macOS</li>
|
||||
<li><a href="screenshot_qbasic.png">screenshot_qbasic.png</a> -
|
||||
Screenshots of some applications running on macOS</li>
|
||||
<li><a href="screenshot_simcity.png">screenshot_simcity.png</a> -
|
||||
Screenshots of some applications running on macOS</li>
|
||||
<li><a
|
||||
href="screenshot_win3_on_macosx.png">screenshot_win3_on_macosx.png</a> -
|
||||
Screenshots of some applications running on macOS</li>
|
||||
<li><a href="sc-ioccc.terminal">sc-ioccc.terminal</a> - configuration
|
||||
file will correctly display console apps</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/bios.asm">bios.asm</a>
|
||||
- BIOS source in assembly</li>
|
||||
<li><a href="2013_cable3.tar.bz2">2013_cable3.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/cable3.c">cable3.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/cable3.alt.c">cable3.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/cable3.orig.c">cable3.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/cable3.sh">cable3.sh</a> - how to run</li>
|
||||
<li><a href="screenshot_autocad.png">screenshot_autocad.png</a> - Screenshots of some applications running on macOS</li>
|
||||
<li><a href="screenshot_flightsim4.png">screenshot_flightsim4.png</a> - Screenshots of some applications running on macOS</li>
|
||||
<li><a href="screenshot_lotus123.png">screenshot_lotus123.png</a> - Screenshots of some applications running on macOS</li>
|
||||
<li><a href="screenshot_qbasic.png">screenshot_qbasic.png</a> - Screenshots of some applications running on macOS</li>
|
||||
<li><a href="screenshot_simcity.png">screenshot_simcity.png</a> - Screenshots of some applications running on macOS</li>
|
||||
<li><a href="screenshot_win3_on_macosx.png">screenshot_win3_on_macosx.png</a> - Screenshots of some applications running on macOS</li>
|
||||
<li><a href="sc-ioccc.terminal">sc-ioccc.terminal</a> - configuration file will correctly display console apps</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/bios.asm">bios.asm</a> - BIOS source in assembly</li>
|
||||
<li><a href="2013_cable3.tar.bz2">2013_cable3.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/2013/cable3/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/.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/2013/cable3/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/.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/2013/cable3/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/README.md">README.md</a> - markdown source for index.html</li>
|
||||
<li><a href="bios">bios</a> - custom BIOS</li>
|
||||
<li><a href="fd.img">fd.img</a> - DOS boot sector</li>
|
||||
<li><a href="hd.img">hd.img</a> - disk image</li>
|
||||
|
||||
+52
-87
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#J_David_Lowe">J. David
|
||||
Lowe</a><br> Location: <a href="../../location.html#US">US</a> -
|
||||
<em>United States of America</em> (<em>United States</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#J_David_Lowe">J. David Lowe</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -144,12 +144,10 @@ Lowe</a><br> Location: <a href="../../location.html#US">US</a> -
|
||||
<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.html#2013_dlowe">2013 dlowe bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2013_dlowe">2013 dlowe bugs</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">./dlowe</span> <span class="pp">[</span><span class="ss">number...</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>where <code>[number...]</code> is one or more number, space
|
||||
separated.</p>
|
||||
<p>where <code>[number...]</code> is one or more number, space separated.</p>
|
||||
<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>
|
||||
<p>What is different about the above if you do something like:</p>
|
||||
@@ -157,14 +155,13 @@ separated.</p>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="fu">rm</span> <span class="at">-f</span> ioccc.txt</span></code></pre></div>
|
||||
<p>?</p>
|
||||
<p>To make it simpler to see try showing just the different line
|
||||
like:</p>
|
||||
<p>To make it simpler to see try showing just the different line 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">./diff.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>We liked how this entry used Unicode, specifically UTF-8, in a
|
||||
somewhat obfuscated way.</p>
|
||||
<p>Also, why doesn’t it crash but instead produces a correct output when
|
||||
called with one argument or when all arguments are equal?</p>
|
||||
<p>We liked how this entry used Unicode, specifically UTF-8, in a somewhat
|
||||
obfuscated way.</p>
|
||||
<p>Also, why doesn’t it crash but instead produces a correct output when called
|
||||
with one argument or when all arguments are equal?</p>
|
||||
<p>For extra fun, compile and run <a href="fun.c">fun.c</a>:</p>
|
||||
<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="pp">#include </span><span class="im"><stdio.h></span></span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> main<span class="op">()</span> <span class="op">{</span></span>
|
||||
@@ -175,115 +172,83 @@ called with one argument or when all arguments are equal?</p>
|
||||
<pre><code>-2147483648 -2147483648 -2147483648</code></pre>
|
||||
<p>and with clang (3.3), we get</p>
|
||||
<pre><code>-2147483648 0 2147483647</code></pre>
|
||||
<p>and with Apple clang version 15.0.0 (clang-1500.0.40.1) in 2023, we
|
||||
get:</p>
|
||||
<p>and with Apple clang version 15.0.0 (clang-1500.0.40.1) in 2023, we get:</p>
|
||||
<pre><code>1840985120 -2033041452 35979112</code></pre>
|
||||
<p>Which one is correct? :)</p>
|
||||
<p>NOTE: <code>make all</code> will compile <a href="fun.c">fun.c</a>
|
||||
but to provide a different compiler you can do something like:</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> CC=clang fun</span></code></pre></div>
|
||||
<p>NOTE: <code>make all</code> will compile <a href="fun.c">fun.c</a> but to provide a different compiler
|
||||
you can do something like:</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> CC=clang fun</span></code></pre></div>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="sparkl">sparkl</h3>
|
||||
<p>A tiny implementation of command-line <a
|
||||
href="https://en.wikipedia.org/wiki/Sparkline">sparkline</a> data
|
||||
visualization.</p>
|
||||
<p>A tiny implementation of command-line
|
||||
<a href="https://en.wikipedia.org/wiki/Sparkline">sparkline</a> data visualization.</p>
|
||||
<h3 id="synopsis">Synopsis</h3>
|
||||
<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">$</span> ./sparkl 0 1 2 3 4 5 6 7</span>
|
||||
<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">$</span> ./sparkl 0 1 2 3 4 5 6 7</span>
|
||||
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a><span class="ex">▁▂▃▄▅▆▇▉</span></span>
|
||||
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo <span class="st">"sparkline of file lengths: </span><span class="va">$(</span><span class="fu">wc</span> <span class="at">-c</span> <span class="pp">*</span> <span class="kw">|</span> <span class="fu">awk</span> <span class="st">'{print $1}'</span> <span class="kw">|</span> <span class="fu">xargs</span> ./sparkl<span class="va">)</span><span class="st">"</span></span>
|
||||
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a><span class="ex">sparkline</span> of file sizes: ▁▁▁▃▃▂▁▂▁▁▉</span></code></pre></div>
|
||||
<p>NOTE: this has been provided in <a href="slflen.sh">slflen.sh</a> so
|
||||
you can try:</p>
|
||||
<div class="sourceCode" id="cb13"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./slflen.sh</span></span></code></pre></div>
|
||||
<p>NOTE: this has been provided in <a href="slflen.sh">slflen.sh</a> so you can try:</p>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./slflen.sh</span></span></code></pre></div>
|
||||
<p>instead (which <a href="try.sh">try.sh</a> also uses).</p>
|
||||
<h3 id="description">Description</h3>
|
||||
<p>This is a handy little tool for visualizing numeric series from the
|
||||
command line, using sparklines. Pass it a numeric series as arguments,
|
||||
and <code>sparkl</code> will display a sparkline graph, which you can
|
||||
use to very quickly get a sense of the shape of your data.</p>
|
||||
command line, using sparklines. Pass it a numeric series as arguments, and
|
||||
<code>sparkl</code> will display a sparkline graph, which you can use to very quickly get a
|
||||
sense of the shape of your data.</p>
|
||||
<h3 id="limitations">Limitations</h3>
|
||||
<ul>
|
||||
<li>Crashes with 0 arguments. It’d be trivial to fix, but adds a few
|
||||
bytes to the code.</li>
|
||||
<li>Crashes with 0 arguments. It’d be trivial to fix, but adds a few bytes to the
|
||||
code.</li>
|
||||
<li>Produces bogus graphs when given > about 5000 arguments.</li>
|
||||
<li>Only works if your terminal is UTF-8 and your font supports the 8
|
||||
glyphs used.</li>
|
||||
<li>Only works if your terminal is UTF-8 and your font supports the 8 glyphs
|
||||
used.</li>
|
||||
<li>Produces a few harmless compiler warnings.</li>
|
||||
</ul>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>The code is very terse. I was torn between submitting this version,
|
||||
and a one-line version compressed using a couple more <code>-D</code>
|
||||
flags.</p>
|
||||
<p>Hand-rolled UTF-8 sequence, magic numbers (what’s that 7 for?),
|
||||
meaningless variable names, reused variables, and so on.</p>
|
||||
<p>The code is very terse. I was torn between submitting this version, and a
|
||||
one-line version compressed using a couple more <code>-D</code> flags.</p>
|
||||
<p>Hand-rolled UTF-8 sequence, magic numbers (what’s that 7 for?), meaningless
|
||||
variable names, reused variables, and so on.</p>
|
||||
<h3 id="acknowledgements">Acknowledgements</h3>
|
||||
<p>Edward Tufte invented sparklines (among other things.) Brilliant.</p>
|
||||
<p>Zach Holman’s <a href="https://github.com/holman/spark">‘spark’
|
||||
utility</a> was absolutely an inspiration.</p>
|
||||
<p>As I was writing up this description, I discovered I’m not the first
|
||||
person to write an obfuscated C sparkline utility! Vicent Martí created
|
||||
<a href="https://gist.github.com/vmg/1368661">this one</a> years (!)
|
||||
ago. (My implementation is completely independent.)</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>Zach Holman’s <a href="https://github.com/holman/spark">‘spark’ utility</a> was absolutely
|
||||
an inspiration.</p>
|
||||
<p>As I was writing up this description, I discovered I’m not the first person to
|
||||
write an obfuscated C sparkline utility! Vicent Martí created
|
||||
<a href="https://gist.github.com/vmg/1368661">this one</a> years (!) ago. (My
|
||||
implementation is completely independent.)</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-2013dlowe"><a name="inventory"></a>Inventory for
|
||||
2013/dlowe</h1>
|
||||
<h1 id="inventory-for-2013dlowe"><a name="inventory"></a>Inventory for 2013/dlowe</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/2013/dlowe/dlowe.c">dlowe.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/dlowe.orig.c">dlowe.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/diff.sh">diff.sh</a>
|
||||
- difference tool</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/fun.c">fun.c</a>
|
||||
- compile and run for extra run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/slflen.sh">slflen.sh</a>
|
||||
- generate sparkline of file lengths</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="2013_dlowe.tar.bz2">2013_dlowe.tar.bz2</a> - download entry
|
||||
source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/dlowe.c">dlowe.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/dlowe.orig.c">dlowe.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/diff.sh">diff.sh</a> - difference tool</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/fun.c">fun.c</a> - compile and run for extra run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/slflen.sh">slflen.sh</a> - generate sparkline of file lengths</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2013_dlowe.tar.bz2">2013_dlowe.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/2013/dlowe/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/.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/2013/dlowe/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/.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/2013/dlowe/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+75
-129
@@ -144,8 +144,7 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em>
|
||||
<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.html#2013_endoh1">2013 endoh1 bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2013_endoh1">2013 endoh1 bugs</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">./endoh1</span> <span class="pp">[</span><span class="ss">file.lazy</span><span class="pp">]</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
@@ -153,12 +152,11 @@ href="../../bugs.html#2013_endoh1">2013 endoh1 bugs</a>.</p>
|
||||
<p>You might also enjoy running:</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">-E</span> endoh1.c <span class="kw">|</span> <span class="fu">less</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>We liked this entry because it can serve as a standalone program as
|
||||
well as an include file; and, as usual, because its input data is at
|
||||
least as obfuscated as the program itself.</p>
|
||||
<p>This entry can be considered an abuse of the GCC’s optimizer; it
|
||||
takes GCC about 4x longer to compile it with -O3 than without, compared
|
||||
to clang’s 2x.</p>
|
||||
<p>We liked this entry because it can serve as a standalone program as well as an
|
||||
include file; and, as usual, because its input data is at least as obfuscated as
|
||||
the program itself.</p>
|
||||
<p>This entry can be considered an abuse of the GCC’s optimizer; it takes GCC about
|
||||
4x longer to compile it with -O3 than without, compared to clang’s 2x.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="remarks">Remarks</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">less</span> endoh1.c</span>
|
||||
@@ -166,54 +164,42 @@ to clang’s 2x.</p>
|
||||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh1</span></span></code></pre></div>
|
||||
<p>… Isn’t there any more to it?</p>
|
||||
<p>Yes, of course.</p>
|
||||
<p>This is a tool <em>for C programmers</em> to play the <a
|
||||
href="http://en.wikipedia.org/wiki/SKI_combinator_calculus">SKI
|
||||
combinator calculus</a>, especially, <a
|
||||
href="https://tromp.github.io/cl/lazy-k.html">Lazy K</a>.</p>
|
||||
<p>This program will shine when it is used as a library. For example, <a
|
||||
href="hello.lazy">hello.lazy</a> is a “Hello world” program written in
|
||||
Lazy K.</p>
|
||||
<p>This is a tool <em>for C programmers</em> to play the <a href="http://en.wikipedia.org/wiki/SKI_combinator_calculus">SKI combinator calculus</a>,
|
||||
especially, <a href="https://tromp.github.io/cl/lazy-k.html">Lazy K</a>.</p>
|
||||
<p>This program will shine when it is used as a library. For example,
|
||||
<a href="hello.lazy">hello.lazy</a> is a “Hello world” program written in Lazy K.</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="ex">$</span> lazy hello.lazy</span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="ex">Hello,</span> world!</span></code></pre></div>
|
||||
<p>where <code>lazy</code> is <a href="https://github.com/irori/lazyk">a
|
||||
reference implementation of Lazy K</a>. At the same time, <a
|
||||
href="hello.lazy">hello.lazy</a> is <em>a valid C program</em> that uses
|
||||
<a href="endoh1.c">endoh1.c</a> as a library.</p>
|
||||
<p>where <code>lazy</code> is <a href="https://github.com/irori/lazyk">a reference implementation of Lazy K</a>. At the same time,
|
||||
<a href="hello.lazy">hello.lazy</a> is <em>a valid C program</em> that uses <a href="endoh1.c">endoh1.c</a>
|
||||
as a library.</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">$</span> gcc <span class="at">-o</span> hello <span class="at">-xc</span> hello.lazy</span>
|
||||
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./hello</span>
|
||||
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="ex">Hello,</span> world!</span></code></pre></div>
|
||||
<p>In other words, this program is a kind of <a
|
||||
href="http://en.wikipedia.org/wiki/Polyglot_%28computing%29">polyglot</a>.</p>
|
||||
<p>The usage is simple: you just have to wrap Lazy K program with
|
||||
<code>#include "endoh1.c"</code>. Note that <code>#</code> is a comment
|
||||
in Lazy K.</p>
|
||||
<p>In other words, this program is a kind of <a href="http://en.wikipedia.org/wiki/Polyglot_%28computing%29">polyglot</a>.</p>
|
||||
<p>The usage is simple: you just have to wrap Lazy K program with <code>#include "endoh1.c"</code>. Note that <code>#</code> is a comment in Lazy K.</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>… is inherent in SKI combinator calculus :-)</p>
|
||||
<p>In addition, it uses various hacks to parse SKI code as C, and to
|
||||
satisfy IOCCC’s size rule.</p>
|
||||
<p>In addition, it uses various hacks to parse SKI code as C,
|
||||
and to satisfy IOCCC’s size rule.</p>
|
||||
<ul>
|
||||
<li>Abuse of function pointers.</li>
|
||||
<li>Code duplication by macros.</li>
|
||||
<li>Short coding.</li>
|
||||
</ul>
|
||||
<p>These led to the good obfuscation.</p>
|
||||
<p>See <a href="#spoiler">Spoiler section</a> in detail, if you
|
||||
need.</p>
|
||||
<p>See <a href="#spoiler">Spoiler section</a> in detail, if you need.</p>
|
||||
<h3 id="limitation">Limitation</h3>
|
||||
<p>This program supports only “Combinator-calculus style notation” of
|
||||
Lazy K. “Unlambda style” and “Iota and Jot” style are not supported.</p>
|
||||
<p>Also, it requires a space between identifiers. In short, use
|
||||
<code>(S K)</code> instead of <code>(SK)</code>, “`sk”,
|
||||
<code>**i*i*i*ii*i*i*ii</code>, or <code>11111100011100</code>.</p>
|
||||
<p>Huge memory may be required to compile the program (about 300 MB on
|
||||
my machine).</p>
|
||||
<p>In addition, there are some limitations (and workarounds) mentioned
|
||||
in <a href="#spoiler">Spoiler section</a>.</p>
|
||||
<p>But I think it would only matter when you run the attached
|
||||
programs.</p>
|
||||
<p>This program supports only “Combinator-calculus style notation” of Lazy K.
|
||||
“Unlambda style” and “Iota and Jot” style are not supported.</p>
|
||||
<p>Also, it requires a space between identifiers. In short, use <code>(S K)</code> instead of
|
||||
<code>(SK)</code>, “`sk”, <code>**i*i*i*ii*i*i*ii</code>, or <code>11111100011100</code>.</p>
|
||||
<p>Huge memory may be required to compile the program (about 300 MB on my machine).</p>
|
||||
<p>In addition, there are some limitations (and workarounds) mentioned in <a href="#spoiler">Spoiler
|
||||
section</a>.</p>
|
||||
<p>But I think it would only matter when you run the attached programs.</p>
|
||||
<h3 id="portability">Portability</h3>
|
||||
<p>I confirmed that the program successfully worked with the following
|
||||
compilers:</p>
|
||||
<p>I confirmed that the program successfully worked with the following compilers:</p>
|
||||
<ul>
|
||||
<li>gcc 4.6.3 [Linux, Mac OS X]</li>
|
||||
<li>clang 3.0 [Linux, Mac OS X]</li>
|
||||
@@ -222,8 +208,7 @@ compilers:</p>
|
||||
<li>N.B. tcc 0.9.25 seems to have a bug and fails to run it.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<p>Recent compilers with <code>-Wall -W -Wextra -pedantic</code> say
|
||||
nothing.</p>
|
||||
<p>Recent compilers with <code>-Wall -W -Wextra -pedantic</code> say nothing.</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">gcc</span> <span class="at">-Wall</span> <span class="at">-W</span> <span class="at">-Wextra</span> <span class="at">-pedantic</span> prog.c</span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> <span class="at">-Wall</span> <span class="at">-W</span> <span class="at">-Wextra</span> <span class="at">-pedantic</span> prog.c</span>
|
||||
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="ex">tcc</span> <span class="at">-Wall</span> <span class="at">-W</span> <span class="at">-Wextra</span> <span class="at">-pedantic</span> prog.c</span></code></pre></div>
|
||||
@@ -233,47 +218,40 @@ nothing.</p>
|
||||
<li>Mac OS X</li>
|
||||
<li>Raspberry PI</li>
|
||||
</ul>
|
||||
<p>To check whether the program is specified on the command line or
|
||||
included from another source file, the program uses a predefined macro
|
||||
<code>__INCLUDE_LEVEL__</code>. It is a gcc extension, and also
|
||||
supported by clang. If your compiler does not support it, you cannot use
|
||||
the program as a library. But you can compile and run it as a standalone
|
||||
program, at least. In fact, tcc does not support the macro, but does
|
||||
work.</p>
|
||||
<p>To check whether the program is specified on the command line or included from
|
||||
another source file, the program uses a predefined macro <code>__INCLUDE_LEVEL__</code>.
|
||||
It is a gcc extension, and also supported by clang. If your compiler does not
|
||||
support it, you cannot use the program as a library. But you can compile and
|
||||
run it as a standalone program, at least. In fact, tcc does not support the
|
||||
macro, but does work.</p>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<p>The whole program is interpreted by macro expansion. For example,
|
||||
<code>S (K I)</code> is translated to a normal C code,
|
||||
<code>(s)((k)(i))</code>, or simply <code>s(k(i))</code>.</p>
|
||||
<p>This expression returns an abstract syntax tree, and <a
|
||||
href="endoh1.c">endoh1.c</a> evaluates it.</p>
|
||||
<p>This program uses a very simple “term rewriting” approach for
|
||||
evaluating SKI combinator calculus. The rewriting rules are shown in the
|
||||
shape of the code.</p>
|
||||
<p>The whole program is interpreted by macro expansion.
|
||||
For example, <code>S (K I)</code> is translated to a normal C code, <code>(s)((k)(i))</code>, or
|
||||
simply <code>s(k(i))</code>.</p>
|
||||
<p>This expression returns an abstract syntax tree, and <a href="endoh1.c">endoh1.c</a>
|
||||
evaluates it.</p>
|
||||
<p>This program uses a very simple “term rewriting” approach for evaluating SKI
|
||||
combinator calculus. The rewriting rules are shown in the shape of the code.</p>
|
||||
<h4 id="abuse-of-function-pointers">Abuse of function pointers</h4>
|
||||
<p>Consider a sequence of function applications in C:</p>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a>s<span class="op">(</span>x<span class="op">)(</span>x<span class="op">)(</span>x<span class="op">)(</span>x<span class="op">)...</span></span></code></pre></div>
|
||||
<p>What type should <code>s</code> have? Unfortunately, C does
|
||||
<em>not</em> provide a “recursive type”, such as
|
||||
<code>typedef f (*f)();</code>.</p>
|
||||
<p>What type should <code>s</code> have? Unfortunately, C does <em>not</em> provide a “recursive
|
||||
type”, such as <code>typedef f (*f)();</code>.</p>
|
||||
<p>So, I used a heavily nested function pointer type:</p>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="kw">typedef</span> <span class="dt">void</span> <span class="op">*(*(*(*...(*(</span>f<span class="op">))()...)())())</span></span></code></pre></div>
|
||||
<p>This limits how many arguments one function can be consecutively
|
||||
applied to. But you can increase the number by tweaking the definition
|
||||
of macro <code>p</code>.</p>
|
||||
<p>This limits how many arguments one function can be consecutively applied to.
|
||||
But you can increase the number by tweaking the definition of macro <code>p</code>.</p>
|
||||
<h4 id="code-duplication-by-macros">Code duplication by macros</h4>
|
||||
<p>Next, we need to encode “closures”. A closure is a function together
|
||||
with an environment which is a reference to non-local variable.</p>
|
||||
<p>In this case, we need something that meets all of the following
|
||||
criteria:</p>
|
||||
<p>Next, we need to encode “closures”. A closure is a function together with an
|
||||
environment which is a reference to non-local variable.</p>
|
||||
<p>In this case, we need something that meets all of the following criteria:</p>
|
||||
<ul>
|
||||
<li>Is callable itself.</li>
|
||||
<li>Internally possesses a reference to another closure as a non-local
|
||||
variable.</li>
|
||||
<li>Internally possesses a reference to another closure as a non-local variable.</li>
|
||||
<li>Applies the internal closure to an argument when it is called.</li>
|
||||
</ul>
|
||||
<p>However, no type in C is callable and has a reference at the same
|
||||
time. (It is feasible by dynamic code generation, but it is far from
|
||||
portable.)</p>
|
||||
<p>However, no type in C is callable and has a reference at the same time.
|
||||
(It is feasible by dynamic code generation, but it is far from portable.)</p>
|
||||
<p>So, I addressed this issue by generating many function definitions
|
||||
statically by (ab)using macros:</p>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="dt">void</span> <span class="op">*</span>x1<span class="op">;</span> <span class="dt">void</span> f1<span class="op">(</span><span class="dt">void</span> <span class="op">*</span>y<span class="op">)</span> <span class="op">{</span> <span class="cf">return</span> apply<span class="op">(</span>x1<span class="op">,</span> y<span class="op">);</span> <span class="op">}</span></span>
|
||||
@@ -282,79 +260,47 @@ statically by (ab)using macros:</p>
|
||||
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a><span class="op">...</span></span>
|
||||
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a><span class="dt">void</span> <span class="op">*(</span>h<span class="op">[])</span> <span class="op">=</span> <span class="op">{</span> f1<span class="op">,</span> f2<span class="op">,</span> f3<span class="op">,</span> <span class="op">...</span> <span class="op">}</span></span></code></pre></div>
|
||||
<p>and by allotting each of them when a closure is needed.</p>
|
||||
<p>This leads to another limitation: the number of pre-defined closures
|
||||
limits how many identifiers (<code>S</code> <code>K</code>
|
||||
<code>I</code>) one program can use.</p>
|
||||
<p>But you can increase this number by tweaking the definition of macro
|
||||
<code>A</code> <code>B</code> <code>C</code> and <code>D</code>. (Note
|
||||
that closures are allotted only when parsing; after the evaluation
|
||||
starts, “out of closure” cannot occur.)</p>
|
||||
<p>This leads to another limitation: the number of pre-defined closures limits how
|
||||
many identifiers (<code>S</code> <code>K</code> <code>I</code>) one program can use.</p>
|
||||
<p>But you can increase this number by tweaking the definition of macro <code>A</code> <code>B</code> <code>C</code>
|
||||
and <code>D</code>. (Note that closures are allotted only when parsing; after the
|
||||
evaluation starts, “out of closure” cannot occur.)</p>
|
||||
<h4 id="short-cording">Short cording</h4>
|
||||
<p>This margin is too narrow to contain a detailed explanation. Instead,
|
||||
I just ask you one question. Can you tell what
|
||||
<code>v s[]={0,0,s+6,s+2,s+4,s,s+3,s+5,s+1};</code> is? I found this by
|
||||
using an <a
|
||||
href="https://en.wikipedia.org/wiki/Satisfiability_modulo_theories">SMT
|
||||
<p>This margin is too narrow to contain a detailed explanation. Instead, I just
|
||||
ask you one question. Can you tell what <code>v s[]={0,0,s+6,s+2,s+4,s,s+3,s+5,s+1};</code> is? I found this by using an <a href="https://en.wikipedia.org/wiki/Satisfiability_modulo_theories">SMT
|
||||
solver</a>.</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>
|
||||
<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-2013endoh1"><a name="inventory"></a>Inventory for
|
||||
2013/endoh1</h1>
|
||||
<h1 id="inventory-for-2013endoh1"><a name="inventory"></a>Inventory for 2013/endoh1</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/2013/endoh1/endoh1.c">endoh1.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/endoh1.orig.c">endoh1.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/echo.lazy">echo.lazy</a>
|
||||
- lazy input</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/hello.lazy">hello.lazy</a>
|
||||
- lazy input</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/rot13.ed">rot13.ed</a>
|
||||
- ed script</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/tac.lazy">tac.lazy</a>
|
||||
- lazy input</li>
|
||||
<li><a href="2013_endoh1.tar.bz2">2013_endoh1.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/endoh1.c">endoh1.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/endoh1.orig.c">endoh1.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/echo.lazy">echo.lazy</a> - lazy input</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/hello.lazy">hello.lazy</a> - lazy input</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/rot13.ed">rot13.ed</a> - ed script</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/tac.lazy">tac.lazy</a> - lazy input</li>
|
||||
<li><a href="2013_endoh1.tar.bz2">2013_endoh1.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/2013/endoh1/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/.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/2013/endoh1/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/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/2013/endoh1/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+37
-59
@@ -143,25 +143,24 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em>
|
||||
<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="fu">make</span> check</span></code></pre></div>
|
||||
<p>You’ll need to have both <a href="https://www.ruby-lang.org">Ruby</a>
|
||||
and <a href="https://imagemagick.org/">ImageMagick</a> installed to run
|
||||
all the automated checks.</p>
|
||||
<p>If you do not have both, however, you can still do the below in the
|
||||
<a href="#try">try</a> section to enjoy the entry. The <a
|
||||
href="Makefile">Makefile</a> <code>check</code> rule will check if you
|
||||
have both and if either is not found it will report it and tell you
|
||||
where to download one or both before exiting.</p>
|
||||
<p>You’ll need to have both <a href="https://www.ruby-lang.org">Ruby</a> and
|
||||
<a href="https://imagemagick.org/">ImageMagick</a> installed to run all the automated
|
||||
checks.</p>
|
||||
<p>If you do not have both, however, you can still do the below in the <a href="#try">try</a>
|
||||
section to enjoy the entry. The <a href="Makefile">Makefile</a> <code>check</code> rule will check if
|
||||
you have both and if either is not found it will report it and tell you where to
|
||||
download one or both before exiting.</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="fu">less</span> jpeg.c</span></code></pre></div>
|
||||
<p>Next look at <code>jpeg.jpg</code> in an image viewer program.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This is a program which, when fed its own source, generates a program
|
||||
that almost is its whitespace inverse, which, in its order, generates a
|
||||
JPEG file (speaking of file size abuse, that is about 16.4 times larger
|
||||
than a PBM file with the same image, but the source was also abusing the
|
||||
size counting program…)</p>
|
||||
<p>Don’t pay attention to the OCR <del>behind the ruby curtain</del> —
|
||||
it’s a straightforward bitmap comparison.</p>
|
||||
<p>This is a program which, when fed its own source, generates a program that
|
||||
almost is its whitespace inverse, which, in its order, generates a JPEG file
|
||||
(speaking of file size abuse, that is about 16.4 times larger than a PBM file
|
||||
with the same image, but the source was also abusing the size counting
|
||||
program…)</p>
|
||||
<p>Don’t pay attention to the OCR <del>behind the ruby curtain</del> — it’s a
|
||||
straightforward bitmap comparison.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="highlights">Highlights</h3>
|
||||
<ul>
|
||||
@@ -174,20 +173,18 @@ it’s a straightforward bitmap comparison.</p>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h3 id="notes">Notes</h3>
|
||||
<p>I picked JPEG instead of PNG, GIF, or BMP because it is the most
|
||||
difficult to generate. I believe that the JPEG encoder is the world’s
|
||||
smallest ever.</p>
|
||||
<p>Nevertheless, the program was too big to meet the IOCCC’s size rule.
|
||||
So I created a smaller bootstrap program that generates the main
|
||||
program. <code>endoh2.c</code> contains fragments of the main program
|
||||
<em>as a comment</em> which <code>iocccsize -i</code> does <em>not</em>
|
||||
count. I gratefully thank the judges for spoiling the size rule this
|
||||
<p>I picked JPEG instead of PNG, GIF, or BMP
|
||||
because it is the most difficult to generate.
|
||||
I believe that the JPEG encoder is the world’s smallest ever.</p>
|
||||
<p>Nevertheless, the program was too big to meet the IOCCC’s size rule. So I
|
||||
created a smaller bootstrap program that generates the main program. <code>endoh2.c</code>
|
||||
contains fragments of the main program <em>as a comment</em> which <code>iocccsize -i</code> does
|
||||
<em>not</em> count. I gratefully thank the judges for spoiling the size rule this
|
||||
year.</p>
|
||||
<p>I think the program will work on any major platforms and
|
||||
compilers.</p>
|
||||
<p>I think the program will work on any major platforms and compilers.</p>
|
||||
<h3 id="legal">Legal</h3>
|
||||
<p>This program uses (a part of) Proggy Tiny Fonts which is distributed
|
||||
in MIT License:</p>
|
||||
<p>This program uses (a part of) Proggy Tiny Fonts
|
||||
which is distributed in MIT License:</p>
|
||||
<pre><code>Copyright (c) 2004, 2005 Tristan Grimmer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -207,53 +204,34 @@ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.</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>
|
||||
<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-2013endoh2"><a name="inventory"></a>Inventory for
|
||||
2013/endoh2</h1>
|
||||
<h1 id="inventory-for-2013endoh2"><a name="inventory"></a>Inventory for 2013/endoh2</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/2013/endoh2/endoh2.c">endoh2.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/endoh2.orig.c">endoh2.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/ocr.rb">ocr.rb</a>
|
||||
- test suite support file</li>
|
||||
<li><a href="2013_endoh2.tar.bz2">2013_endoh2.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/endoh2.c">endoh2.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/endoh2.orig.c">endoh2.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/ocr.rb">ocr.rb</a> - test suite support file</li>
|
||||
<li><a href="2013_endoh2.tar.bz2">2013_endoh2.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/2013/endoh2/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/.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/2013/endoh2/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/.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/2013/endoh2/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+74
-126
@@ -144,14 +144,12 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em>
|
||||
<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.html#2013_endoh3">2013 endoh3 bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2013_endoh3">2013 endoh3 bugs</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">./endoh3</span></span></code></pre></div>
|
||||
<p>This program plays sound. See <a href="../../faq.html#sox">FAQ 3.10 -
|
||||
How do I compile and use an IOCCC entry that requires sound?</a> if you
|
||||
do not know how to set your system up for this or if you want to verify
|
||||
that everything is oky.</p>
|
||||
<p>This program plays sound. See <a href="../../faq.html#sox">FAQ 3.10 - How do I compile and use an IOCCC
|
||||
entry that requires sound?</a> if you do not know how to set your
|
||||
system up for this or if you want to verify that everything is oky.</p>
|
||||
<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>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
@@ -160,59 +158,50 @@ that everything is oky.</p>
|
||||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> test.abc yankee.abc</span>
|
||||
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> <span class="pp">*</span>.abc</span></code></pre></div>
|
||||
<p>The script will check for SoX first and next <code>padsp</code> from
|
||||
<code>PulseAudio</code> and finally if neither are found if you have
|
||||
<code>ruby(1)</code> installed it’ll use the included ruby script to
|
||||
convert it to a WAV file for you to play.</p>
|
||||
<p>If no args are passed to the script it will play <a
|
||||
href="twinkle.abc">twinkle.abc</a> and the string <code>ABC</code>.
|
||||
Otherwise while there’s a remaining arg if it’s a file it will run the
|
||||
program on the file. If it’s not a file it’ll run it as a string.</p>
|
||||
<p>The script will check for SoX first and next <code>padsp</code> from <code>PulseAudio</code> and
|
||||
finally if neither are found if you have <code>ruby(1)</code> installed it’ll use the
|
||||
included ruby script to convert it to a WAV file for you to play.</p>
|
||||
<p>If no args are passed to the script it will play <a href="twinkle.abc">twinkle.abc</a> and
|
||||
the string <code>ABC</code>. Otherwise while there’s a remaining arg if it’s a file it will
|
||||
run the program on the file. If it’s not a file it’ll run it as a string.</p>
|
||||
<p>The <code>*.abc</code> files are provided as music samples.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This program can toot out a tune that is small enough to posted to
|
||||
most social media platforms that have small message length limits.</p>
|
||||
<p>This program can toot out a tune that is small enough to posted to most social
|
||||
media platforms that have small message length limits.</p>
|
||||
<p>This endoh3ram can toot out a tune that is small enough.</p>
|
||||
<h3
|
||||
id="a-modern-day-2023-note-about-the-award-most-tweetable-1-liner-and-twitter">A
|
||||
modern day (2023) note about the award ‘Most tweetable 1-liner’ and
|
||||
twitter:</h3>
|
||||
<p>The IOCCC no longer endorses the use of what was once twitter, or
|
||||
whatever it might be called today. We recommend that you pick a
|
||||
responsible social media platform to post the program’s output on.
|
||||
Nevertheless the award of this entry will remain the same for historical
|
||||
purposes.</p>
|
||||
<h3 id="a-modern-day-2023-note-about-the-award-most-tweetable-1-liner-and-twitter">A modern day (2023) note about the award ‘Most tweetable 1-liner’ and twitter:</h3>
|
||||
<p>The IOCCC no longer endorses the use of what was once twitter, or whatever it
|
||||
might be called today. We recommend that you pick a responsible social media
|
||||
platform to post the program’s output on. Nevertheless the award of this entry
|
||||
will remain the same for historical purposes.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="remarks">Remarks</h3>
|
||||
<p>This is a sound synthesizer for a subset of <a
|
||||
href="http://en.wikipedia.org/wiki/ABC_notation">ABC music
|
||||
<p>This is a sound synthesizer for a subset of <a href="http://en.wikipedia.org/wiki/ABC_notation">ABC music
|
||||
notation</a>.</p>
|
||||
<p>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">cc</span> <span class="at">-o</span> endoh3 endoh3.c</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">"CDEFGABc"</span> <span class="kw">|</span> <span class="ex">./endoh3</span> <span class="op">></span> /dev/dsp</span></code></pre></div>
|
||||
<p>If <code>/dev/dsp</code> is not available on your system, use an OSS
|
||||
sound wrapper such as <code>padsp</code> or <code>aoss</code>:</p>
|
||||
<p>If <code>/dev/dsp</code> is not available on your system, use an OSS sound wrapper such
|
||||
as <code>padsp</code> or <code>aoss</code>:</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="bu">echo</span> <span class="st">"CDEFGABc"</span> <span class="kw">|</span> <span class="ex">./endoh3</span> <span class="kw">|</span> <span class="ex">padsp</span> tee /dev/dsp <span class="op">></span> /dev/null</span></code></pre></div>
|
||||
<p>If you are using Mac OS X, try <a
|
||||
href="http://sox.sourceforge.net/">sox</a> like so:</p>
|
||||
<p>If you are using Mac OS X, try <a href="http://sox.sourceforge.net/">sox</a> like so:</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">"CDEFGABc"</span> <span class="kw">|</span> <span class="ex">./endoh3</span> <span class="kw">|</span> <span class="fu">sox</span> <span class="at">-q</span> <span class="at">-traw</span> <span class="at">-r8000</span> <span class="at">-b8</span> <span class="at">-e</span> unsigned-integer <span class="at">-</span> <span class="at">-tcoreaudio</span></span></code></pre></div>
|
||||
<p>If that does not work, use the attached script to convert the output
|
||||
into a wave file format:</p>
|
||||
<p>If that does not work, use the attached script to convert the output into a wave
|
||||
file format:</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="bu">echo</span> <span class="st">"CDEFGABc"</span> <span class="kw">|</span> <span class="ex">./endoh3</span> <span class="kw">|</span> <span class="ex">ruby</span> wavify.rb <span class="op">></span> cde.wav</span></code></pre></div>
|
||||
<p>and play <code>cde.wav</code>.</p>
|
||||
<p>You can also enjoy some music scores that I attached. With
|
||||
<code>/dev/dsp</code> you can do so like:</p>
|
||||
<p>You can also enjoy some music scores that I attached. With <code>/dev/dsp</code> you can
|
||||
do so like:</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">cat</span> twinkle.abc <span class="kw">|</span> <span class="ex">./endoh3</span> <span class="op">></span> /dev/dsp</span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span> menuet.abc <span class="kw">|</span> <span class="ex">./endoh3</span> <span class="op">></span> /dev/dsp</span></code></pre></div>
|
||||
<p>but you should be able to modify it a way to meet your system
|
||||
requirements as described above.</p>
|
||||
<p>but you should be able to modify it a way to meet your system requirements as
|
||||
described above.</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>The following sequence of questions may be helpful to understand the
|
||||
<code>endoh3ram</code> program:</p>
|
||||
<p>The following sequence of questions may be helpful to understand the <code>endoh3ram</code>
|
||||
program:</p>
|
||||
<ul>
|
||||
<li>How does it convert ABC notes into the frequency?</li>
|
||||
<li>What is <code>89/84.</code>? I found it by using the <a
|
||||
href="https://en.wikipedia.org/wiki/Stern-Brocot_tree">Stern-Brocot
|
||||
<li>What is <code>89/84.</code>? I found it by using the <a href="https://en.wikipedia.org/wiki/Stern-Brocot_tree">Stern-Brocot
|
||||
tree</a>.</li>
|
||||
<li>How does it generate a wave? Hint: it generates a saw wave.</li>
|
||||
</ul>
|
||||
@@ -221,10 +210,8 @@ tree</a>.</li>
|
||||
<ul>
|
||||
<li>Notes:
|
||||
<ul>
|
||||
<li><code>C</code> <code>D</code> <code>E</code> <code>F</code>
|
||||
<code>G</code> <code>A</code> <code>B</code> (in low octave)</li>
|
||||
<li><code>c</code> <code>d</code> <code>e</code> <code>f</code>
|
||||
<code>g</code> <code>a</code> <code>b</code> (in high octave)</li>
|
||||
<li><code>C</code> <code>D</code> <code>E</code> <code>F</code> <code>G</code> <code>A</code> <code>B</code> (in low octave)</li>
|
||||
<li><code>c</code> <code>d</code> <code>e</code> <code>f</code> <code>g</code> <code>a</code> <code>b</code> (in high octave)</li>
|
||||
</ul></li>
|
||||
<li>Rests: <code>z</code></li>
|
||||
<li>Note lengths:
|
||||
@@ -250,8 +237,8 @@ tree</a>.</li>
|
||||
<li>Bar line, repeat, ties and slurs, and everything else.</li>
|
||||
</ul>
|
||||
<h3 id="known-bugs">Known Bugs</h3>
|
||||
<p>You can <em>NOT</em> write a note length immediately followed by a
|
||||
note <code>E</code>, such as <code>C2E2</code>.</p>
|
||||
<p>You can <em>NOT</em> write a note length immediately followed by a note <code>E</code>,
|
||||
such as <code>C2E2</code>.</p>
|
||||
<p>Can you figure out why?</p>
|
||||
<p>A workaround is inserting a whitespace: <code>C2 E2</code>.</p>
|
||||
<h3 id="portability">Portability</h3>
|
||||
@@ -261,20 +248,17 @@ note <code>E</code>, such as <code>C2E2</code>.</p>
|
||||
<li>Mac OS X 10.6 with gcc 4.2.1 and clang 1.7.</li>
|
||||
</ul>
|
||||
<h3 id="legal">Legal</h3>
|
||||
<p>I believe that all the scores that I attached are
|
||||
out-of-copyright.</p>
|
||||
<p>I did write a score of the Happy Birthday song too. (It does not
|
||||
matter because the song is out-of-copyright in my country.) But I do not
|
||||
attach it to protect you from W****r.</p>
|
||||
<p>For the same reason, do not post a score that contains only
|
||||
<code>z1092</code>. You know, it is <a
|
||||
href="http://en.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3">“the famous
|
||||
song”</a>.</p>
|
||||
<p>I believe that all the scores that I attached are out-of-copyright.</p>
|
||||
<p>I did write a score of the Happy Birthday song too.
|
||||
(It does not matter because the song is out-of-copyright in my country.)
|
||||
But I do not attach it to protect you from W****r.</p>
|
||||
<p>For the same reason, do not post a score that contains only <code>z1092</code>.
|
||||
You know, it is <a href="http://en.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3">“the famous song”</a>.</p>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<p>Here is a magical expression which I found by brute-force:</p>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="op">(</span>c <span class="op">%</span> <span class="dv">32</span> <span class="op">+</span> <span class="dv">5</span><span class="op">)</span> <span class="op">*</span> <span class="dv">9</span> <span class="op">/</span> <span class="dv">5</span> <span class="op">%</span> <span class="dv">13</span> <span class="op">+</span> n <span class="op">/</span> <span class="dv">32</span> <span class="op">*</span> <span class="dv">12</span> <span class="op">-</span> <span class="dv">22</span></span></code></pre></div>
|
||||
<p>Interestingly, it converts an ASCII number of ABC notes to the
|
||||
corresponding tone number.</p>
|
||||
<p>Interestingly, it converts an ASCII number of ABC notes
|
||||
to the corresponding tone number.</p>
|
||||
<pre><code>'C' (ASCII 67) => 3
|
||||
'D' (ASCII 68) => 5
|
||||
'E' (ASCII 69) => 7
|
||||
@@ -289,97 +273,61 @@ corresponding tone number.</p>
|
||||
'g' (ASCII 103) => 22
|
||||
'a' (ASCII 97) => 24
|
||||
'b' (ASCII 98) => 26</code></pre>
|
||||
<p>By the way, you can write a half-tone by the following
|
||||
characters.</p>
|
||||
<p>By the way, you can write a half-tone by the following characters.</p>
|
||||
<pre><code>'K' => 4 (= C#)
|
||||
'L' => 6 (= D#)
|
||||
'U' => 8 (= F#)
|
||||
'V' => 11 (= G#)
|
||||
'P' => 13 (= A#)</code></pre>
|
||||
<p>Note that the tone numbers simply enumerate the semi-tone steps. So
|
||||
we can calculate the frequency easily: <code>pow(2, n / 12.0)</code>.
|
||||
Then, how can we calculate <code>pow</code> without <code>math.h</code>?
|
||||
<code>pow(2, 1.0 / 12.0)</code> is approximated by <code>89/84.</code>.
|
||||
(I found this approximation by using the <a
|
||||
href="http://en.wikipedia.org/wiki/Stern%E2%80%93Brocot_tree">Stern-Brocot
|
||||
tree</a>.) We can gain the frequency by multiplying the value by
|
||||
<code>n</code> times.</p>
|
||||
<p>Note that the tone numbers simply enumerate the semi-tone steps. So we can
|
||||
calculate the frequency easily: <code>pow(2, n / 12.0)</code>. Then, how can we calculate
|
||||
<code>pow</code> without <code>math.h</code>? <code>pow(2, 1.0 / 12.0)</code> is approximated by <code>89/84.</code>. (I
|
||||
found this approximation by using the <a href="http://en.wikipedia.org/wiki/Stern%E2%80%93Brocot_tree">Stern-Brocot
|
||||
tree</a>.) We can gain the
|
||||
frequency by multiplying the value by <code>n</code> times.</p>
|
||||
<p>Finally, the following code generates a saw wave:</p>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span><span class="op">(</span>c <span class="op">=</span> <span class="dv">0</span><span class="op">;</span> c <span class="op"><</span> len<span class="op">;</span> c<span class="op">++)</span> putchar<span class="op">(</span>a <span class="op">=</span> n <span class="op">*</span> D<span class="op">);</span></span></code></pre></div>
|
||||
<p>where <code>D</code> is a frequency and <code>a</code> is a variable
|
||||
whose type is <code>char</code>. By assigning <code>float</code> to
|
||||
<code>char</code> variable, the implicit type conversion is performed
|
||||
<p>where <code>D</code> is a frequency and <code>a</code> is a variable whose type is <code>char</code>. By
|
||||
assigning <code>float</code> to <code>char</code> variable, the implicit type conversion is performed
|
||||
from <code>float</code> to <code>char</code> (modulo 256).</p>
|
||||
<p>(Strictly speaking, this behavior is undefined according to 6.3.1.4
|
||||
in C99; you can replace it with <code>(long)(n*D)</code> if you are
|
||||
pedantic.)</p>
|
||||
<p>All that was left was to combine and condense the components. The key
|
||||
is squashing them into just one <code>for</code>-loop.</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>(Strictly speaking, this behavior is undefined according to 6.3.1.4 in C99; you
|
||||
can replace it with <code>(long)(n*D)</code> if you are pedantic.)</p>
|
||||
<p>All that was left was to combine and condense the components. The key is
|
||||
squashing them into just one <code>for</code>-loop.</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-2013endoh3"><a name="inventory"></a>Inventory for
|
||||
2013/endoh3</h1>
|
||||
<h1 id="inventory-for-2013endoh3"><a name="inventory"></a>Inventory for 2013/endoh3</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/2013/endoh3/endoh3.c">endoh3.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/endoh3.orig.c">endoh3.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/flea-waltz.abc">flea-waltz.abc</a>
|
||||
- sample input</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/menuet.abc">menuet.abc</a>
|
||||
- sample input</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/test.abc">test.abc</a>
|
||||
- sample input</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/twinkle.abc">twinkle.abc</a>
|
||||
- sample input</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/wavify.rb">wavify.rb</a>
|
||||
- post process output to form a WAV sound file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/yankee.abc">yankee.abc</a>
|
||||
- sample input</li>
|
||||
<li><a href="2013_endoh3.tar.bz2">2013_endoh3.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/endoh3.c">endoh3.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/endoh3.orig.c">endoh3.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/flea-waltz.abc">flea-waltz.abc</a> - sample input</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/menuet.abc">menuet.abc</a> - sample input</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/test.abc">test.abc</a> - sample input</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/twinkle.abc">twinkle.abc</a> - sample input</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/wavify.rb">wavify.rb</a> - post process output to form a WAV sound file</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/yankee.abc">yankee.abc</a> - sample input</li>
|
||||
<li><a href="2013_endoh3.tar.bz2">2013_endoh3.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/2013/endoh3/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/.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/2013/endoh3/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/.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/2013/endoh3/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+192
-527
@@ -141,24 +141,21 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em>
|
||||
|
||||
<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>If you wish to change the size (see the <a
|
||||
href="#authors-remarks">Author’s remarks</a> below) you can do so with
|
||||
the <code>SIZE</code> variable. For instance you can do:</p>
|
||||
<p>If you wish to change the size (see the <a href="#authors-remarks">Author’s remarks</a>
|
||||
below) you can do so with the <code>SIZE</code> variable. For instance you can do:</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 SIZE=50,50 all</span></code></pre></div>
|
||||
<p>but you can also do this directly with the <a
|
||||
href="endoh4.sh">endoh4.sh</a> script as described below.</p>
|
||||
<p>but you can also do this directly with the <a href="endoh4.sh">endoh4.sh</a> script as
|
||||
described 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.html#2013_endoh4">2013 endoh4 bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2013_endoh4">2013 endoh4 bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</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">./endoh4</span> <span class="op"><</span> file</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh4.sh</span> file</span></code></pre></div>
|
||||
<p>The second form is preferable as it will temporarily make the cursor
|
||||
invisible as recommended by the author. If no file is specified in the
|
||||
<code>./endoh4.sh</code> command line it will feed to the program <a
|
||||
href="endoh4.c">endoh4.c</a>.</p>
|
||||
<p>The second form is preferable as it will temporarily make the cursor invisible
|
||||
as recommended by the author. If no file is specified in the <code>./endoh4.sh</code> command
|
||||
line it will feed to the program <a href="endoh4.c">endoh4.c</a>.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<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">./endoh4.sh</span> cube.txt</span></code></pre></div>
|
||||
<p>Hit ctrl-c to end the program.</p>
|
||||
@@ -168,22 +165,18 @@ href="endoh4.c">endoh4.c</a>.</p>
|
||||
<p>You can provide more than one file:</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="ex">./endoh4.sh</span> solids/archimedian-solid/a11-truncated-icosahedron.txt cube.txt</span></code></pre></div>
|
||||
<p>Hit ctrl-c/intr to go to the next file.</p>
|
||||
<p>If you wish to change the size to <code>50,50</code> without passing
|
||||
any arg:</p>
|
||||
<p>If you wish to change the size to <code>50,50</code> without passing any arg:</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="va">SIZE</span><span class="op">=</span>50,50 <span class="ex">./endoh4.sh</span></span></code></pre></div>
|
||||
<p>Not specifying a file feeds <a href="endoh4.c">endoh4.c</a> to the
|
||||
program.</p>
|
||||
<p>Not specifying a file feeds <a href="endoh4.c">endoh4.c</a> to the program.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This program is formatted as the net for a tetrahedron (hint: try
|
||||
feeding the program it’s own source code like <code>./endoh4.sh</code>).
|
||||
When it runs there is an animation for the computation to work out the
|
||||
convex hull.</p>
|
||||
<p>This program is formatted as the net for a tetrahedron (hint: try feeding the
|
||||
program it’s own source code like <code>./endoh4.sh</code>). When it runs there is an
|
||||
animation for the computation to work out the convex hull.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="spec">Spec</h3>
|
||||
<p>This is a convex polyhedron viewer, which:</p>
|
||||
<ol type="1">
|
||||
<li>reads three-dimensional vertices (3N float values) from
|
||||
<code>stdin</code>,</li>
|
||||
<li>reads three-dimensional vertices (3N float values) from <code>stdin</code>,</li>
|
||||
<li>calculates a convex hull of them, and</li>
|
||||
<li>renders it.</li>
|
||||
</ol>
|
||||
@@ -205,539 +198,211 @@ triangulated)</li>
|
||||
</ul>
|
||||
<p>(Note that this program does not use <code>math.h</code>.)</p>
|
||||
<h3 id="portability">Portability</h3>
|
||||
<p>I think it conforms with both C89 and C99. I confirmed that it worked
|
||||
on gcc, clang, and tcc. It should not trigger warnings with
|
||||
<code>-pedantic</code> and <code>-Wextra</code>.</p>
|
||||
<p>I think it conforms with both C89 and C99. I confirmed that it worked on gcc,
|
||||
clang, and tcc. It should not trigger warnings with <code>-pedantic</code> and <code>-Wextra</code>.</p>
|
||||
<h3 id="tips">Tips</h3>
|
||||
<p>You may want to use <code>tput</code> to hide the terminal
|
||||
cursor.</p>
|
||||
<p>You may want to use <code>tput</code> to hide the terminal cursor.</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">tput</span> civis</span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh4</span> <span class="op"><</span> cube.txt</span>
|
||||
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="fu">tput</span> cnorm</span></code></pre></div>
|
||||
<p>or</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="ex">./endoh4.sh</span> cube.txt</span></code></pre></div>
|
||||
<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="ex">./endoh4.sh</span> cube.txt</span></code></pre></div>
|
||||
<h3 id="bonuses">Bonuses</h3>
|
||||
<p>You can change the screen size. Let the aspect ratio be about
|
||||
3:1.</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">cc</span> <span class="at">-DS</span><span class="op">=</span>120,40 <span class="at">-o</span> endoh4 endoh4.c</span></code></pre></div>
|
||||
<p>You can change the screen size. Let the aspect ratio be about 3:1.</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">cc</span> <span class="at">-DS</span><span class="op">=</span>120,40 <span class="at">-o</span> endoh4 endoh4.c</span></code></pre></div>
|
||||
<p>The shape of this code is the geometric net of a regular tetrahedron.
|
||||
So, 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">./endoh4</span> <span class="op"><</span> endoh4.c <span class="co"># or ./endoh4.sh</span></span></code></pre></div>
|
||||
<p>The <a href="solids/">solids/</a> directory includes various solid
|
||||
data:</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">./endoh4</span> <span class="op"><</span> endoh4.c <span class="co"># or ./endoh4.sh</span></span></code></pre></div>
|
||||
<p>The <a href="solids/">solids/</a> directory includes various solid data:</p>
|
||||
<ul>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Platonic_solid">Platonic
|
||||
solids</a></li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Archimedean_solid">Archimedean
|
||||
solids</a></li>
|
||||
<li><a
|
||||
href="http://en.wikipedia.org/wiki/Prism_%28geometry%29">Prisms</a></li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Platonic_solid">Platonic solids</a></li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Archimedean_solid">Archimedean solids</a></li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Prism_%28geometry%29">Prisms</a></li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Antiprism">Antiprisms</a></li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Bipyramid">Bipyramids</a></li>
|
||||
<li><a
|
||||
href="http://en.wikipedia.org/wiki/Trapezohedron">Trapezohedrons</a></li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Johnson_solid">Johnson
|
||||
solids</a></li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Trapezohedron">Trapezohedrons</a></li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Johnson_solid">Johnson solids</a></li>
|
||||
</ul>
|
||||
<p>I created the files by using the POV-Ray scripts (<a
|
||||
href="http://en.wikipedia.org/wiki/File:Poly.pov">1</a> and <a
|
||||
href="http://en.wikipedia.org/wiki/User:AndrewKepert/poly.pov">2</a>) in
|
||||
Wikipedia. They are copyrighted in CC BY-SA 3.0 by “User:Cyp” and
|
||||
“User:AndrewKepert”.</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>I created the files by using the POV-Ray scripts
|
||||
(<a href="http://en.wikipedia.org/wiki/File:Poly.pov">1</a> and
|
||||
<a href="http://en.wikipedia.org/wiki/User:AndrewKepert/poly.pov">2</a>) in Wikipedia.
|
||||
They are copyrighted in CC BY-SA 3.0 by “User:Cyp” and “User:AndrewKepert”.</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-2013endoh4"><a name="inventory"></a>Inventory for
|
||||
2013/endoh4</h1>
|
||||
<h1 id="inventory-for-2013endoh4"><a name="inventory"></a>Inventory for 2013/endoh4</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/2013/endoh4/endoh4.c">endoh4.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/endoh4.orig.c">endoh4.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/cube.txt">cube.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/endoh4.sh">endoh4.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a04-square-antiprism.txt">solids/antiprism/a04-square-antiprism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a05-pentagonal-antiprism.txt">solids/antiprism/a05-pentagonal-antiprism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a06-hexagonal-antiprism.txt">solids/antiprism/a06-hexagonal-antiprism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a07-heptagonal-antiprism.txt">solids/antiprism/a07-heptagonal-antiprism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a08-octagonal-antiprism.txt">solids/antiprism/a08-octagonal-antiprism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a09-enneagonal-antiprism.txt">solids/antiprism/a09-enneagonal-antiprism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a10-decagonal-antiprism.txt">solids/antiprism/a10-decagonal-antiprism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a01-cuboctahedron.txt">solids/archimedian-solid/a01-cuboctahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a02-great-rhombicosidodecahedron.txt">solids/archimedian-solid/a02-great-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a03-great-rhombicuboctahedron.txt">solids/archimedian-solid/a03-great-rhombicuboctahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a04-icosidodecahedron.txt">solids/archimedian-solid/a04-icosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a05-small-rhombicosidodecahedron.txt">solids/archimedian-solid/a05-small-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a06-small-rhombicuboctahedron.txt">solids/archimedian-solid/a06-small-rhombicuboctahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a07-snub-cube.txt">solids/archimedian-solid/a07-snub-cube.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a08-snub-dodecahedron.txt">solids/archimedian-solid/a08-snub-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a09-truncated-cube.txt">solids/archimedian-solid/a09-truncated-cube.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a10-truncated-dodecahedron.txt">solids/archimedian-solid/a10-truncated-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a11-truncated-icosahedron.txt">solids/archimedian-solid/a11-truncated-icosahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a12-truncated-octahedron.txt">solids/archimedian-solid/a12-truncated-octahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a13-truncated-tetrahedron.txt">solids/archimedian-solid/a13-truncated-tetrahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/bipyramid/b06-hexagonal-bipyramid.txt">solids/bipyramid/b06-hexagonal-bipyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/bipyramid/b07-heptagonal-bipyramid.txt">solids/bipyramid/b07-heptagonal-bipyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/bipyramid/b08-octagonal-bipyramid.txt">solids/bipyramid/b08-octagonal-bipyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/bipyramid/b09-enneagonal-bipyramid.txt">solids/bipyramid/b09-enneagonal-bipyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/bipyramid/b10-decagonal-bipyramid.txt">solids/bipyramid/b10-decagonal-bipyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c01-rhombic-dodecahedron.txt">solids/catalan-solid/c01-rhombic-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c02-disdyakis-triacontahedron.txt">solids/catalan-solid/c02-disdyakis-triacontahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c03-disdyakis-dodecahedron.txt">solids/catalan-solid/c03-disdyakis-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c04-rhombic-triacontahedron.txt">solids/catalan-solid/c04-rhombic-triacontahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c05-deltoidal-hexecontahedron.txt">solids/catalan-solid/c05-deltoidal-hexecontahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c06-deltoidal-icositetrahedron.txt">solids/catalan-solid/c06-deltoidal-icositetrahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c07-pentagonal-icositetrahedron.txt">solids/catalan-solid/c07-pentagonal-icositetrahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c08-pentagonal-hexecontahedron.txt">solids/catalan-solid/c08-pentagonal-hexecontahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c09-small-triakis-octahedron.txt">solids/catalan-solid/c09-small-triakis-octahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c10-triakis-icosahedron.txt">solids/catalan-solid/c10-triakis-icosahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c11-pentakis-dodecahedron.txt">solids/catalan-solid/c11-pentakis-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c12-tetrakis-hexahedron.txt">solids/catalan-solid/c12-tetrakis-hexahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c13-triakis-tetrahedron.txt">solids/catalan-solid/c13-triakis-tetrahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j01-square-pyramid.txt">solids/johnson-solid/j01-square-pyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j02-pentagonal-pyramid.txt">solids/johnson-solid/j02-pentagonal-pyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j03-triangular-cupola.txt">solids/johnson-solid/j03-triangular-cupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j04-square-cupola.txt">solids/johnson-solid/j04-square-cupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j05-pentagonal-cupola.txt">solids/johnson-solid/j05-pentagonal-cupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j06-pentagonal-rotunda.txt">solids/johnson-solid/j06-pentagonal-rotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j07-elongated-triangular-pyramid.txt">solids/johnson-solid/j07-elongated-triangular-pyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j08-elongated-square-pyramid.txt">solids/johnson-solid/j08-elongated-square-pyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j09-elongated-pentagonal-pyramid.txt">solids/johnson-solid/j09-elongated-pentagonal-pyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j10-gyroelongated-square-pyramid.txt">solids/johnson-solid/j10-gyroelongated-square-pyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j11-gyroelongated-pentagonal-pyramid.txt">solids/johnson-solid/j11-gyroelongated-pentagonal-pyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j12-triangular-dipyramid.txt">solids/johnson-solid/j12-triangular-dipyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j13-pentagonal-dipyramid.txt">solids/johnson-solid/j13-pentagonal-dipyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j14-elongated-triangular-dipyramid.txt">solids/johnson-solid/j14-elongated-triangular-dipyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j15-elongated-square-dipyramid.txt">solids/johnson-solid/j15-elongated-square-dipyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j16-elongated-pentagonal-dipyramid.txt">solids/johnson-solid/j16-elongated-pentagonal-dipyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j17-gyroelongated-square-dipyramid.txt">solids/johnson-solid/j17-gyroelongated-square-dipyramid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j18-elongated-triangular-cupola.txt">solids/johnson-solid/j18-elongated-triangular-cupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j19-elongated-square-cupola.txt">solids/johnson-solid/j19-elongated-square-cupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j20-elongated-pentagonal-cupola.txt">solids/johnson-solid/j20-elongated-pentagonal-cupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j21-elongated-pentagonal-rotunda.txt">solids/johnson-solid/j21-elongated-pentagonal-rotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j22-gyroelongated-triangular-cupola.txt">solids/johnson-solid/j22-gyroelongated-triangular-cupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j23-gyroelongated-square-cupola.txt">solids/johnson-solid/j23-gyroelongated-square-cupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j24-gyroelongated-pentagonal-cupola.txt">solids/johnson-solid/j24-gyroelongated-pentagonal-cupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j25-gyroelongated-pentagonal-rotunda.txt">solids/johnson-solid/j25-gyroelongated-pentagonal-rotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j26-gyrobifastigium.txt">solids/johnson-solid/j26-gyrobifastigium.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j27-triangular-orthobicupola.txt">solids/johnson-solid/j27-triangular-orthobicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j28-square-orthobicupola.txt">solids/johnson-solid/j28-square-orthobicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j29-square-gyrobicupola.txt">solids/johnson-solid/j29-square-gyrobicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j30-pentagonal-orthobicupola.txt">solids/johnson-solid/j30-pentagonal-orthobicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j31-pentagonal-gyrobicupola.txt">solids/johnson-solid/j31-pentagonal-gyrobicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j32-pentagonal-orthocupolarotunda.txt">solids/johnson-solid/j32-pentagonal-orthocupolarotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j33-pentagonal-gyrocupolarotunda.txt">solids/johnson-solid/j33-pentagonal-gyrocupolarotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j34-pentagonal-orthobirotunda.txt">solids/johnson-solid/j34-pentagonal-orthobirotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j35-elongated-triangular-orthobicupola.txt">solids/johnson-solid/j35-elongated-triangular-orthobicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j36-elongated-triangular-gyrobicupola.txt">solids/johnson-solid/j36-elongated-triangular-gyrobicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j37-elongated-square-gyrobicupola.txt">solids/johnson-solid/j37-elongated-square-gyrobicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j38-elongated-pentagonal-orthobicupola.txt">solids/johnson-solid/j38-elongated-pentagonal-orthobicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j39-elongated-pentagonal-gyrobicupola.txt">solids/johnson-solid/j39-elongated-pentagonal-gyrobicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j40-elongated-pentagonal-orthocupolarotunda.txt">solids/johnson-solid/j40-elongated-pentagonal-orthocupolarotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j41-elongated-pentagonal-gyrocupolarotunda.txt">solids/johnson-solid/j41-elongated-pentagonal-gyrocupolarotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j42-elongated-pentagonal-orthobirotunda.txt">solids/johnson-solid/j42-elongated-pentagonal-orthobirotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j43-elongated-pentagonal-gyrobirotunda.txt">solids/johnson-solid/j43-elongated-pentagonal-gyrobirotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j44-gyroelongated-triangular-bicupola.txt">solids/johnson-solid/j44-gyroelongated-triangular-bicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j45-gyroelongated-square-bicupola.txt">solids/johnson-solid/j45-gyroelongated-square-bicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j46-gyroelongated-pentagonal-bicupola.txt">solids/johnson-solid/j46-gyroelongated-pentagonal-bicupola.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j47-gyroelongated-pentagonal-cupolarotunda.txt">solids/johnson-solid/j47-gyroelongated-pentagonal-cupolarotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j48-gyroelongated-pentagonal-birotunda.txt">solids/johnson-solid/j48-gyroelongated-pentagonal-birotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j49-augmented-triangular-prism.txt">solids/johnson-solid/j49-augmented-triangular-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j50-biaugmented-triangular-prism.txt">solids/johnson-solid/j50-biaugmented-triangular-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j51-triaugmented-triangular-prism.txt">solids/johnson-solid/j51-triaugmented-triangular-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j52-augmented-pentagonal-prism.txt">solids/johnson-solid/j52-augmented-pentagonal-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j53-biaugmented-pentagonal-prism.txt">solids/johnson-solid/j53-biaugmented-pentagonal-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j54-augmented-hexagonal-prism.txt">solids/johnson-solid/j54-augmented-hexagonal-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j55-parabiaugmented-hexagonal-prism.txt">solids/johnson-solid/j55-parabiaugmented-hexagonal-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j56-metabiaugmented-hexagonal-prism.txt">solids/johnson-solid/j56-metabiaugmented-hexagonal-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j57-triaugmented-hexagonal-prism.txt">solids/johnson-solid/j57-triaugmented-hexagonal-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j58-augmented-dodecahedron.txt">solids/johnson-solid/j58-augmented-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j59-parabiaugmented-dodecahedron.txt">solids/johnson-solid/j59-parabiaugmented-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j60-metabiaugmented-dodecahedron.txt">solids/johnson-solid/j60-metabiaugmented-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j61-triaugmented-dodecahedron.txt">solids/johnson-solid/j61-triaugmented-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j62-metabidiminished-icosahedron.txt">solids/johnson-solid/j62-metabidiminished-icosahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j63-tridiminished-icosahedron.txt">solids/johnson-solid/j63-tridiminished-icosahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j64-augmented-tridiminished-icosahedron.txt">solids/johnson-solid/j64-augmented-tridiminished-icosahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j65-augmented-truncated-tetrahedron.txt">solids/johnson-solid/j65-augmented-truncated-tetrahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j66-augmented-truncated-cube.txt">solids/johnson-solid/j66-augmented-truncated-cube.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j67-biaugmented-truncated-cube.txt">solids/johnson-solid/j67-biaugmented-truncated-cube.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j68-augmented-truncated-dodecahedron.txt">solids/johnson-solid/j68-augmented-truncated-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j69-parabiaugmented-truncated-dodecahedron.txt">solids/johnson-solid/j69-parabiaugmented-truncated-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j70-metabiaugmented-truncated-dodecahedron.txt">solids/johnson-solid/j70-metabiaugmented-truncated-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j71-triaugmented-truncated-dodecahedron.txt">solids/johnson-solid/j71-triaugmented-truncated-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j72-gyrate-rhombicosidodecahedron.txt">solids/johnson-solid/j72-gyrate-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j73-parabigyrate-rhombicosidodecahedron.txt">solids/johnson-solid/j73-parabigyrate-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j74-metabigyrate-rhombicosidodecahedron.txt">solids/johnson-solid/j74-metabigyrate-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j75-trigyrate-rhombicosidodecahedron.txt">solids/johnson-solid/j75-trigyrate-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j76-diminished-rhombicosidodecahedron.txt">solids/johnson-solid/j76-diminished-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j77-paragyrate-diminished-rhombicosidodecahedron.txt">solids/johnson-solid/j77-paragyrate-diminished-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j78-metagyrate-diminished-rhombicosidodecahedron.txt">solids/johnson-solid/j78-metagyrate-diminished-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j79-bigyrate-diminished-rhombicosidodecahedron.txt">solids/johnson-solid/j79-bigyrate-diminished-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j80-parabidiminished-rhombicosidodecahedron.txt">solids/johnson-solid/j80-parabidiminished-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j81-metabidiminished-rhombicosidodecahedron.txt">solids/johnson-solid/j81-metabidiminished-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j82-gyrate-bidiminished-rhombicosidodecahedron.txt">solids/johnson-solid/j82-gyrate-bidiminished-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j83-tridiminished-rhombicosidodecahedron.txt">solids/johnson-solid/j83-tridiminished-rhombicosidodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j84-snub-disphenoid.txt">solids/johnson-solid/j84-snub-disphenoid.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j85-snub-square-antiprism.txt">solids/johnson-solid/j85-snub-square-antiprism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j86-sphenocorona.txt">solids/johnson-solid/j86-sphenocorona.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j87-augmented-sphenocorona.txt">solids/johnson-solid/j87-augmented-sphenocorona.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j88-sphenomegacorona.txt">solids/johnson-solid/j88-sphenomegacorona.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j89-hebesphenomegacorona.txt">solids/johnson-solid/j89-hebesphenomegacorona.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j90-disphenocingulum.txt">solids/johnson-solid/j90-disphenocingulum.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j91-bilunabirotunda.txt">solids/johnson-solid/j91-bilunabirotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j92-triangular-hebesphenorotunda.txt">solids/johnson-solid/j92-triangular-hebesphenorotunda.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/platonic-solid/p01-tetrahedron.txt">solids/platonic-solid/p01-tetrahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/platonic-solid/p02-cube.txt">solids/platonic-solid/p02-cube.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/platonic-solid/p03-octahedron.txt">solids/platonic-solid/p03-octahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/platonic-solid/p04-dodecahedron.txt">solids/platonic-solid/p04-dodecahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/platonic-solid/p05-icosahedron.txt">solids/platonic-solid/p05-icosahedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p03-triangular-prism.txt">solids/prism/p03-triangular-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p05-pentagonal-prism.txt">solids/prism/p05-pentagonal-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p06-hexagonal-prism.txt">solids/prism/p06-hexagonal-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p07-heptagonal-prism.txt">solids/prism/p07-heptagonal-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p08-octagonal-prism.txt">solids/prism/p08-octagonal-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p09-enneagonal-prism.txt">solids/prism/p09-enneagonal-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p10-decagonal-prism.txt">solids/prism/p10-decagonal-prism.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t04-tetragonal-trapezohedron.txt">solids/trapezohedron/t04-tetragonal-trapezohedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t05-pentagonal-trapezohedron.txt">solids/trapezohedron/t05-pentagonal-trapezohedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t06-hexagonal-trapezohedron.txt">solids/trapezohedron/t06-hexagonal-trapezohedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t08-octagonal-trapezohedron.txt">solids/trapezohedron/t08-octagonal-trapezohedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t10-decagonal-trapezohedron.txt">solids/trapezohedron/t10-decagonal-trapezohedron.txt</a>
|
||||
- 3D object coordinates</li>
|
||||
<li><a href="2013_endoh4.tar.bz2">2013_endoh4.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/endoh4.c">endoh4.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/endoh4.orig.c">endoh4.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/cube.txt">cube.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/endoh4.sh">endoh4.sh</a> - how to run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a04-square-antiprism.txt">solids/antiprism/a04-square-antiprism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a05-pentagonal-antiprism.txt">solids/antiprism/a05-pentagonal-antiprism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a06-hexagonal-antiprism.txt">solids/antiprism/a06-hexagonal-antiprism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a07-heptagonal-antiprism.txt">solids/antiprism/a07-heptagonal-antiprism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a08-octagonal-antiprism.txt">solids/antiprism/a08-octagonal-antiprism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a09-enneagonal-antiprism.txt">solids/antiprism/a09-enneagonal-antiprism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a10-decagonal-antiprism.txt">solids/antiprism/a10-decagonal-antiprism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a01-cuboctahedron.txt">solids/archimedian-solid/a01-cuboctahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a02-great-rhombicosidodecahedron.txt">solids/archimedian-solid/a02-great-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a03-great-rhombicuboctahedron.txt">solids/archimedian-solid/a03-great-rhombicuboctahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a04-icosidodecahedron.txt">solids/archimedian-solid/a04-icosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a05-small-rhombicosidodecahedron.txt">solids/archimedian-solid/a05-small-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a06-small-rhombicuboctahedron.txt">solids/archimedian-solid/a06-small-rhombicuboctahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a07-snub-cube.txt">solids/archimedian-solid/a07-snub-cube.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a08-snub-dodecahedron.txt">solids/archimedian-solid/a08-snub-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a09-truncated-cube.txt">solids/archimedian-solid/a09-truncated-cube.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a10-truncated-dodecahedron.txt">solids/archimedian-solid/a10-truncated-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a11-truncated-icosahedron.txt">solids/archimedian-solid/a11-truncated-icosahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a12-truncated-octahedron.txt">solids/archimedian-solid/a12-truncated-octahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/archimedian-solid/a13-truncated-tetrahedron.txt">solids/archimedian-solid/a13-truncated-tetrahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/bipyramid/b06-hexagonal-bipyramid.txt">solids/bipyramid/b06-hexagonal-bipyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/bipyramid/b07-heptagonal-bipyramid.txt">solids/bipyramid/b07-heptagonal-bipyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/bipyramid/b08-octagonal-bipyramid.txt">solids/bipyramid/b08-octagonal-bipyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/bipyramid/b09-enneagonal-bipyramid.txt">solids/bipyramid/b09-enneagonal-bipyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/bipyramid/b10-decagonal-bipyramid.txt">solids/bipyramid/b10-decagonal-bipyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c01-rhombic-dodecahedron.txt">solids/catalan-solid/c01-rhombic-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c02-disdyakis-triacontahedron.txt">solids/catalan-solid/c02-disdyakis-triacontahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c03-disdyakis-dodecahedron.txt">solids/catalan-solid/c03-disdyakis-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c04-rhombic-triacontahedron.txt">solids/catalan-solid/c04-rhombic-triacontahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c05-deltoidal-hexecontahedron.txt">solids/catalan-solid/c05-deltoidal-hexecontahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c06-deltoidal-icositetrahedron.txt">solids/catalan-solid/c06-deltoidal-icositetrahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c07-pentagonal-icositetrahedron.txt">solids/catalan-solid/c07-pentagonal-icositetrahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c08-pentagonal-hexecontahedron.txt">solids/catalan-solid/c08-pentagonal-hexecontahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c09-small-triakis-octahedron.txt">solids/catalan-solid/c09-small-triakis-octahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c10-triakis-icosahedron.txt">solids/catalan-solid/c10-triakis-icosahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c11-pentakis-dodecahedron.txt">solids/catalan-solid/c11-pentakis-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c12-tetrakis-hexahedron.txt">solids/catalan-solid/c12-tetrakis-hexahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/catalan-solid/c13-triakis-tetrahedron.txt">solids/catalan-solid/c13-triakis-tetrahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j01-square-pyramid.txt">solids/johnson-solid/j01-square-pyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j02-pentagonal-pyramid.txt">solids/johnson-solid/j02-pentagonal-pyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j03-triangular-cupola.txt">solids/johnson-solid/j03-triangular-cupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j04-square-cupola.txt">solids/johnson-solid/j04-square-cupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j05-pentagonal-cupola.txt">solids/johnson-solid/j05-pentagonal-cupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j06-pentagonal-rotunda.txt">solids/johnson-solid/j06-pentagonal-rotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j07-elongated-triangular-pyramid.txt">solids/johnson-solid/j07-elongated-triangular-pyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j08-elongated-square-pyramid.txt">solids/johnson-solid/j08-elongated-square-pyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j09-elongated-pentagonal-pyramid.txt">solids/johnson-solid/j09-elongated-pentagonal-pyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j10-gyroelongated-square-pyramid.txt">solids/johnson-solid/j10-gyroelongated-square-pyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j11-gyroelongated-pentagonal-pyramid.txt">solids/johnson-solid/j11-gyroelongated-pentagonal-pyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j12-triangular-dipyramid.txt">solids/johnson-solid/j12-triangular-dipyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j13-pentagonal-dipyramid.txt">solids/johnson-solid/j13-pentagonal-dipyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j14-elongated-triangular-dipyramid.txt">solids/johnson-solid/j14-elongated-triangular-dipyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j15-elongated-square-dipyramid.txt">solids/johnson-solid/j15-elongated-square-dipyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j16-elongated-pentagonal-dipyramid.txt">solids/johnson-solid/j16-elongated-pentagonal-dipyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j17-gyroelongated-square-dipyramid.txt">solids/johnson-solid/j17-gyroelongated-square-dipyramid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j18-elongated-triangular-cupola.txt">solids/johnson-solid/j18-elongated-triangular-cupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j19-elongated-square-cupola.txt">solids/johnson-solid/j19-elongated-square-cupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j20-elongated-pentagonal-cupola.txt">solids/johnson-solid/j20-elongated-pentagonal-cupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j21-elongated-pentagonal-rotunda.txt">solids/johnson-solid/j21-elongated-pentagonal-rotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j22-gyroelongated-triangular-cupola.txt">solids/johnson-solid/j22-gyroelongated-triangular-cupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j23-gyroelongated-square-cupola.txt">solids/johnson-solid/j23-gyroelongated-square-cupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j24-gyroelongated-pentagonal-cupola.txt">solids/johnson-solid/j24-gyroelongated-pentagonal-cupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j25-gyroelongated-pentagonal-rotunda.txt">solids/johnson-solid/j25-gyroelongated-pentagonal-rotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j26-gyrobifastigium.txt">solids/johnson-solid/j26-gyrobifastigium.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j27-triangular-orthobicupola.txt">solids/johnson-solid/j27-triangular-orthobicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j28-square-orthobicupola.txt">solids/johnson-solid/j28-square-orthobicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j29-square-gyrobicupola.txt">solids/johnson-solid/j29-square-gyrobicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j30-pentagonal-orthobicupola.txt">solids/johnson-solid/j30-pentagonal-orthobicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j31-pentagonal-gyrobicupola.txt">solids/johnson-solid/j31-pentagonal-gyrobicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j32-pentagonal-orthocupolarotunda.txt">solids/johnson-solid/j32-pentagonal-orthocupolarotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j33-pentagonal-gyrocupolarotunda.txt">solids/johnson-solid/j33-pentagonal-gyrocupolarotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j34-pentagonal-orthobirotunda.txt">solids/johnson-solid/j34-pentagonal-orthobirotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j35-elongated-triangular-orthobicupola.txt">solids/johnson-solid/j35-elongated-triangular-orthobicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j36-elongated-triangular-gyrobicupola.txt">solids/johnson-solid/j36-elongated-triangular-gyrobicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j37-elongated-square-gyrobicupola.txt">solids/johnson-solid/j37-elongated-square-gyrobicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j38-elongated-pentagonal-orthobicupola.txt">solids/johnson-solid/j38-elongated-pentagonal-orthobicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j39-elongated-pentagonal-gyrobicupola.txt">solids/johnson-solid/j39-elongated-pentagonal-gyrobicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j40-elongated-pentagonal-orthocupolarotunda.txt">solids/johnson-solid/j40-elongated-pentagonal-orthocupolarotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j41-elongated-pentagonal-gyrocupolarotunda.txt">solids/johnson-solid/j41-elongated-pentagonal-gyrocupolarotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j42-elongated-pentagonal-orthobirotunda.txt">solids/johnson-solid/j42-elongated-pentagonal-orthobirotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j43-elongated-pentagonal-gyrobirotunda.txt">solids/johnson-solid/j43-elongated-pentagonal-gyrobirotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j44-gyroelongated-triangular-bicupola.txt">solids/johnson-solid/j44-gyroelongated-triangular-bicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j45-gyroelongated-square-bicupola.txt">solids/johnson-solid/j45-gyroelongated-square-bicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j46-gyroelongated-pentagonal-bicupola.txt">solids/johnson-solid/j46-gyroelongated-pentagonal-bicupola.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j47-gyroelongated-pentagonal-cupolarotunda.txt">solids/johnson-solid/j47-gyroelongated-pentagonal-cupolarotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j48-gyroelongated-pentagonal-birotunda.txt">solids/johnson-solid/j48-gyroelongated-pentagonal-birotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j49-augmented-triangular-prism.txt">solids/johnson-solid/j49-augmented-triangular-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j50-biaugmented-triangular-prism.txt">solids/johnson-solid/j50-biaugmented-triangular-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j51-triaugmented-triangular-prism.txt">solids/johnson-solid/j51-triaugmented-triangular-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j52-augmented-pentagonal-prism.txt">solids/johnson-solid/j52-augmented-pentagonal-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j53-biaugmented-pentagonal-prism.txt">solids/johnson-solid/j53-biaugmented-pentagonal-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j54-augmented-hexagonal-prism.txt">solids/johnson-solid/j54-augmented-hexagonal-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j55-parabiaugmented-hexagonal-prism.txt">solids/johnson-solid/j55-parabiaugmented-hexagonal-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j56-metabiaugmented-hexagonal-prism.txt">solids/johnson-solid/j56-metabiaugmented-hexagonal-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j57-triaugmented-hexagonal-prism.txt">solids/johnson-solid/j57-triaugmented-hexagonal-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j58-augmented-dodecahedron.txt">solids/johnson-solid/j58-augmented-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j59-parabiaugmented-dodecahedron.txt">solids/johnson-solid/j59-parabiaugmented-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j60-metabiaugmented-dodecahedron.txt">solids/johnson-solid/j60-metabiaugmented-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j61-triaugmented-dodecahedron.txt">solids/johnson-solid/j61-triaugmented-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j62-metabidiminished-icosahedron.txt">solids/johnson-solid/j62-metabidiminished-icosahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j63-tridiminished-icosahedron.txt">solids/johnson-solid/j63-tridiminished-icosahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j64-augmented-tridiminished-icosahedron.txt">solids/johnson-solid/j64-augmented-tridiminished-icosahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j65-augmented-truncated-tetrahedron.txt">solids/johnson-solid/j65-augmented-truncated-tetrahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j66-augmented-truncated-cube.txt">solids/johnson-solid/j66-augmented-truncated-cube.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j67-biaugmented-truncated-cube.txt">solids/johnson-solid/j67-biaugmented-truncated-cube.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j68-augmented-truncated-dodecahedron.txt">solids/johnson-solid/j68-augmented-truncated-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j69-parabiaugmented-truncated-dodecahedron.txt">solids/johnson-solid/j69-parabiaugmented-truncated-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j70-metabiaugmented-truncated-dodecahedron.txt">solids/johnson-solid/j70-metabiaugmented-truncated-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j71-triaugmented-truncated-dodecahedron.txt">solids/johnson-solid/j71-triaugmented-truncated-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j72-gyrate-rhombicosidodecahedron.txt">solids/johnson-solid/j72-gyrate-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j73-parabigyrate-rhombicosidodecahedron.txt">solids/johnson-solid/j73-parabigyrate-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j74-metabigyrate-rhombicosidodecahedron.txt">solids/johnson-solid/j74-metabigyrate-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j75-trigyrate-rhombicosidodecahedron.txt">solids/johnson-solid/j75-trigyrate-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j76-diminished-rhombicosidodecahedron.txt">solids/johnson-solid/j76-diminished-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j77-paragyrate-diminished-rhombicosidodecahedron.txt">solids/johnson-solid/j77-paragyrate-diminished-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j78-metagyrate-diminished-rhombicosidodecahedron.txt">solids/johnson-solid/j78-metagyrate-diminished-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j79-bigyrate-diminished-rhombicosidodecahedron.txt">solids/johnson-solid/j79-bigyrate-diminished-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j80-parabidiminished-rhombicosidodecahedron.txt">solids/johnson-solid/j80-parabidiminished-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j81-metabidiminished-rhombicosidodecahedron.txt">solids/johnson-solid/j81-metabidiminished-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j82-gyrate-bidiminished-rhombicosidodecahedron.txt">solids/johnson-solid/j82-gyrate-bidiminished-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j83-tridiminished-rhombicosidodecahedron.txt">solids/johnson-solid/j83-tridiminished-rhombicosidodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j84-snub-disphenoid.txt">solids/johnson-solid/j84-snub-disphenoid.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j85-snub-square-antiprism.txt">solids/johnson-solid/j85-snub-square-antiprism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j86-sphenocorona.txt">solids/johnson-solid/j86-sphenocorona.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j87-augmented-sphenocorona.txt">solids/johnson-solid/j87-augmented-sphenocorona.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j88-sphenomegacorona.txt">solids/johnson-solid/j88-sphenomegacorona.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j89-hebesphenomegacorona.txt">solids/johnson-solid/j89-hebesphenomegacorona.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j90-disphenocingulum.txt">solids/johnson-solid/j90-disphenocingulum.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j91-bilunabirotunda.txt">solids/johnson-solid/j91-bilunabirotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/johnson-solid/j92-triangular-hebesphenorotunda.txt">solids/johnson-solid/j92-triangular-hebesphenorotunda.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/platonic-solid/p01-tetrahedron.txt">solids/platonic-solid/p01-tetrahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/platonic-solid/p02-cube.txt">solids/platonic-solid/p02-cube.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/platonic-solid/p03-octahedron.txt">solids/platonic-solid/p03-octahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/platonic-solid/p04-dodecahedron.txt">solids/platonic-solid/p04-dodecahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/platonic-solid/p05-icosahedron.txt">solids/platonic-solid/p05-icosahedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p03-triangular-prism.txt">solids/prism/p03-triangular-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p05-pentagonal-prism.txt">solids/prism/p05-pentagonal-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p06-hexagonal-prism.txt">solids/prism/p06-hexagonal-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p07-heptagonal-prism.txt">solids/prism/p07-heptagonal-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p08-octagonal-prism.txt">solids/prism/p08-octagonal-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p09-enneagonal-prism.txt">solids/prism/p09-enneagonal-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/prism/p10-decagonal-prism.txt">solids/prism/p10-decagonal-prism.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t04-tetragonal-trapezohedron.txt">solids/trapezohedron/t04-tetragonal-trapezohedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t05-pentagonal-trapezohedron.txt">solids/trapezohedron/t05-pentagonal-trapezohedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t06-hexagonal-trapezohedron.txt">solids/trapezohedron/t06-hexagonal-trapezohedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t08-octagonal-trapezohedron.txt">solids/trapezohedron/t08-octagonal-trapezohedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t10-decagonal-trapezohedron.txt">solids/trapezohedron/t10-decagonal-trapezohedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="2013_endoh4.tar.bz2">2013_endoh4.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/2013/endoh4/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/.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/2013/endoh4/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/.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/2013/endoh4/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+137
-178
@@ -122,8 +122,7 @@
|
||||
|
||||
<h1 id="scene-format-documentation">Scene format documentation</h1>
|
||||
<p>The file must be encoded in UTF-8 as the BOF marker indicates.</p>
|
||||
<p>You can directly feed it to the renderer. If you’re wondering about
|
||||
what the following code block does, that’s why:)</p>
|
||||
<p>You can directly feed it to the renderer. If you’re wondering about what the following code block does, that’s why:)</p>
|
||||
<pre><code>@|?|?z#
|
||||
@|||?z&
|
||||
>?Sedvf
|
||||
@@ -157,38 +156,31 @@ ZnY|{|e
|
||||
kkdr\{\{\%
|
||||
lkdr\{\{></code></pre>
|
||||
<h2 id="basic-structure">Basic structure</h2>
|
||||
<p>A scene file begins with arbitrary binary data, followed by several
|
||||
shader functions.</p>
|
||||
<p>Shader functions are declared using a one-character name followed by
|
||||
a <code>]</code> character. There are some special function names, which
|
||||
will be explained below.</p>
|
||||
<p>The language used to write shader functions is very simple.
|
||||
Basically, you write a sequence of assignment statements like this:</p>
|
||||
<p>A scene file begins with arbitrary binary data, followed by several shader
|
||||
functions.</p>
|
||||
<p>Shader functions are declared using a one-character name followed by a <code>]</code>
|
||||
character. There are some special function names, which will be explained below.</p>
|
||||
<p>The language used to write shader functions is very simple. Basically, you write
|
||||
a sequence of assignment statements like this:</p>
|
||||
<pre><code>A=A+D
|
||||
B=B+E</code></pre>
|
||||
<p>Namely, you write a one-character variable name, an equal sign
|
||||
(<code>=</code>), followed by an expression (made of operators and
|
||||
one-character variable names, of course).</p>
|
||||
<p>Namely, you write a one-character variable name, an equal sign (<code>=</code>), followed
|
||||
by an expression (made of operators and one-character variable names, of
|
||||
course).</p>
|
||||
<h2 id="expressions">Expressions</h2>
|
||||
<p>The shader language supports seven operators, listed highest priority
|
||||
first:</p>
|
||||
<p>The shader language supports seven operators, listed highest priority first:</p>
|
||||
<pre><code>*/+-<#:</code></pre>
|
||||
<p><code>*/+-<</code> each mean what they mean in C, but the priority
|
||||
part is a bit different. Basically, <code>*</code> has higher priority
|
||||
than <code>/</code>, so <code>A/4*4</code> actually computes
|
||||
<code>A/(4*4)</code>. And you can’t write <code>(A/4)*4</code> –
|
||||
brackets are not supported. As an advice, keep your expressions simple
|
||||
:) If you really needs to write something like <code>C=(A/4)*4</code>,
|
||||
write instead:</p>
|
||||
<p><code>*/+-<</code> each mean what they mean in C, but the priority part is a bit different.
|
||||
Basically, <code>*</code> has higher priority than <code>/</code>, so <code>A/4*4</code> actually computes
|
||||
<code>A/(4*4)</code>. And you can’t write <code>(A/4)*4</code> – brackets are not supported. As an
|
||||
advice, keep your expressions simple :) If you really needs to write something
|
||||
like <code>C=(A/4)*4</code>, write instead:</p>
|
||||
<pre><code>B=A/4+
|
||||
C=B*4</code></pre>
|
||||
<p>The <code>#</code> operator acts somewhat like the C <code>?:</code>.
|
||||
It returns one of its two operands based on, what else, the value of
|
||||
variable <code>#</code>. When <code>#</code> is true, <code>#</code>
|
||||
<p>The <code>#</code> operator acts somewhat like the C <code>?:</code>. It returns one of its two
|
||||
operands based on, what else, the value of variable <code>#</code>. When <code>#</code> is true, <code>#</code>
|
||||
returns its second operand.</p>
|
||||
<p>The <code>:</code> operator calls built-in functions. The first
|
||||
operand is the function id and the second is the parameter. Here is a
|
||||
list of functions:</p>
|
||||
<p>The <code>:</code> operator calls built-in functions. The first operand is the function id and the second is the parameter. Here is a list of functions:</p>
|
||||
<pre><code>0:x = the x-th byte of the scene file
|
||||
1:x = sin(x*PI)
|
||||
2:x = atan2(x,#)/PI
|
||||
@@ -197,43 +189,36 @@ list of functions:</p>
|
||||
5:x = the next number in the (allegedly random) number sequence, can't be called in volume shaders
|
||||
6:x = value of the variable (char)(120+x)
|
||||
7:x = write #'s value to the variable (char)(120+x)</code></pre>
|
||||
<p>Contrary to popular belief, the language itself doesn’t support
|
||||
numerical constants. Any character sitting between operators is a
|
||||
variable. When you see 1/2, it’s in fact dividing the variable 1’s value
|
||||
by the variable 2’s value. For everyone’s convenience, though, in the
|
||||
beginning every variable is initialized to its ASCII code minus 48. As
|
||||
long as you don’t write something like <code>3=1+1</code>, you can use
|
||||
single digit numbers as, well, single digit numbers. If you need
|
||||
something like <code>1920</code> or <code>0.73</code>, you need to
|
||||
compute it yourself. And yes, all variables store floating point
|
||||
values.</p>
|
||||
<p>If a character appears as the first character of any
|
||||
<code>argv</code>, it goes to zero. This includes the scene filename. If
|
||||
you name your scene <code>1.scene</code>, well, good luck with
|
||||
<code>1=0</code>!</p>
|
||||
<p>You can terminate a statement using any character that isn’t an
|
||||
operator, be it <code>\n</code> or <code>;</code>. But you must put in
|
||||
one and only one character. Put in two (e.g. the Windows
|
||||
<code>\r\n</code>), and it terminates your function. Also, the first
|
||||
statement must begin immediately after <code>]</code>.</p>
|
||||
<p>When a function terminates, the interpreter calls the next function
|
||||
specified by variable <code>R</code>. If you want to call function
|
||||
<code>n</code>, just write somewhere:</p>
|
||||
<p>Contrary to popular belief, the language itself doesn’t support numerical
|
||||
constants. Any character sitting between operators is a variable. When you see
|
||||
1/2, it’s in fact dividing the variable 1’s value by the variable 2’s value. For
|
||||
everyone’s convenience, though, in the beginning every variable is initialized
|
||||
to its ASCII code minus 48. As long as you don’t write something like <code>3=1+1</code>,
|
||||
you can use single digit numbers as, well, single digit numbers. If you need
|
||||
something like <code>1920</code> or <code>0.73</code>, you need to compute it yourself. And yes, all
|
||||
variables store floating point values.</p>
|
||||
<p>If a character appears as the first character of any <code>argv</code>, it goes to zero.
|
||||
This includes the scene filename. If you name your scene <code>1.scene</code>, well, good
|
||||
luck with <code>1=0</code>!</p>
|
||||
<p>You can terminate a statement using any character that isn’t an operator, be it
|
||||
<code>\n</code> or <code>;</code>. But you must put in one and only one character. Put in two (e.g.
|
||||
the Windows <code>\r\n</code>), and it terminates your function. Also, the first statement
|
||||
must begin immediately after <code>]</code>.</p>
|
||||
<p>When a function terminates, the interpreter calls the next function specified by
|
||||
variable <code>R</code>. If you want to call function <code>n</code>, just write somewhere:</p>
|
||||
<pre><code>R=n</code></pre>
|
||||
<p>providing you have left <code>n</code> at its initial value. If you
|
||||
want to actually return to the renderer, put in <code>R=0</code>.</p>
|
||||
<p>As you may have noticed, you can put in all kinds of stuff between
|
||||
functions, like this comment.</p>
|
||||
<h2 id="how-the-____-do-i-render-an-image-with-shaders">How the ____ do
|
||||
I render an image with shaders?</h2>
|
||||
<p>Basically, you define a geometry using volume shaders, define a
|
||||
camera using a camera shader, and define light sources and surface
|
||||
reflectance properties using material shaders.</p>
|
||||
<p>providing you have left <code>n</code> at its initial value. If you want to actually return
|
||||
to the renderer, put in <code>R=0</code>.</p>
|
||||
<p>As you may have noticed, you can put in all kinds of stuff between functions,
|
||||
like this comment.</p>
|
||||
<h2 id="how-the-____-do-i-render-an-image-with-shaders">How the ____ do I render an image with shaders?</h2>
|
||||
<p>Basically, you define a geometry using volume shaders, define a camera using a
|
||||
camera shader, and define light sources and surface reflectance properties using
|
||||
material shaders.</p>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Continue to the comments before function
|
||||
A</td>
|
||||
<td style="text-align: left;">Continue to the comments before function A</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -259,43 +244,37 @@ R=0#n</code></pre>
|
||||
H -- Image height, in pixels
|
||||
I -- Perturbation probability
|
||||
J -- Camera ray stratification probability</code></pre>
|
||||
<p>If you have used a MLT renderer before, you probably know what
|
||||
<code>I</code> and <code>J</code> does. If you don’t, well, use the same
|
||||
value as the default scene. Everything converges just fine under
|
||||
suboptimal settings, just a little slower. Generally, use a higher value
|
||||
for <code>I</code> if your scene is primarily illuminated by some
|
||||
<p>If you have used a MLT renderer before, you probably know what <code>I</code> and <code>J</code> does.
|
||||
If you don’t, well, use the same value as the default scene. Everything
|
||||
converges just fine under suboptimal settings, just a little slower. Generally,
|
||||
use a higher value for <code>I</code> if your scene is primarily illuminated by some
|
||||
indirect source.</p>
|
||||
<p><code>A</code> also serves as the geometry shader for volume 0. The
|
||||
scene geometry is made of up to 32 volumes, each with 64x64x64 cells.
|
||||
The volume 0 is the ‘top level’ volume where the camera goes. Each cell
|
||||
of a volume can be empty, filled with a material, or another volume. The
|
||||
roundish characters in <a
|
||||
href="../old_default.scene">old_default.scene</a> and the carpet on the
|
||||
floor in this file are examples where a cell is defined to another
|
||||
volume. Materials will be explained later.</p>
|
||||
<p>The volume shader for the i-th volume is named as the (i+1)-th
|
||||
capital letter. Each volume shader is invoked once for each cell. The
|
||||
cell coordinates (0..63) are given as inputs in variable
|
||||
<code>x</code>,<code>y</code>,<code>z</code>, and you’re supposed to
|
||||
return the cell content in variable <code>C</code>. To fill it with
|
||||
material <code>i</code>, return <code>64+i</code> in <code>C</code>. To
|
||||
fill it with volume <code>i</code>, well, return <code>i</code>. To
|
||||
leave it empty, return <code>C=0</code>.</p>
|
||||
<p>Before starting to build a scene, it’s better to have a draft sketch
|
||||
handy first. Something like <img src="draft.png" alt="Draft sketch" />.
|
||||
Sometimes it’s hard to imagine where something should go without the
|
||||
sketch. And you don’t have to stick to your sketch :)</p>
|
||||
<p>What motivated my default scene: it was the full moon’s day (a
|
||||
national holiday) in China and my parents were planning to renovate
|
||||
their apartment. I rendered the image to tell my mom how ridiculous her
|
||||
starry-sky wall paper would look like if she used it on every single
|
||||
wall. She ends up using it on just one wall, the one facing my bed, to
|
||||
thank me for the effort.</p>
|
||||
<p><code>A</code> also serves as the geometry shader for volume 0. The scene geometry is made
|
||||
of up to 32 volumes, each with 64x64x64 cells. The volume 0 is the ‘top level’
|
||||
volume where the camera goes. Each cell of a volume can be empty, filled with a
|
||||
material, or another volume. The roundish characters in
|
||||
<a href="../old_default.scene">old_default.scene</a> and the carpet on the floor in this
|
||||
file are examples where a cell is defined to another volume. Materials will be
|
||||
explained later.</p>
|
||||
<p>The volume shader for the i-th volume is named as the (i+1)-th capital letter.
|
||||
Each volume shader is invoked once for each cell. The cell coordinates (0..63)
|
||||
are given as inputs in variable <code>x</code>,<code>y</code>,<code>z</code>, and you’re supposed to return the
|
||||
cell content in variable <code>C</code>. To fill it with material <code>i</code>, return <code>64+i</code> in
|
||||
<code>C</code>. To fill it with volume <code>i</code>, well, return <code>i</code>. To leave it empty, return
|
||||
<code>C=0</code>.</p>
|
||||
<p>Before starting to build a scene, it’s better to have a draft sketch handy
|
||||
first. Something like <img src="draft.png" alt="Draft sketch" />. Sometimes it’s hard to
|
||||
imagine where something should go without the sketch. And you don’t have to
|
||||
stick to your sketch :)</p>
|
||||
<p>What motivated my default scene: it was the full moon’s day (a national holiday)
|
||||
in China and my parents were planning to renovate their apartment. I rendered
|
||||
the image to tell my mom how ridiculous her starry-sky wall paper would look
|
||||
like if she used it on every single wall. She ends up using it on just one wall,
|
||||
the one facing my bed, to thank me for the effort.</p>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Continue to the comments before function
|
||||
a</td>
|
||||
<td style="text-align: left;">Continue to the comments before function a</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -311,39 +290,32 @@ J=1/2+
|
||||
C=p+1+
|
||||
U=w+w+w</code></pre>
|
||||
<hr />
|
||||
<p>The function <code>a</code> is the camera shader, which, well,
|
||||
generates the camera ray. It’s supposed to return the ray in variables
|
||||
<code>UVWXYZ</code> and <code>ABCDEF</code> (that may sound like a lot
|
||||
of variables, but it really isn’t that much).</p>
|
||||
<p>Here comes some subtlety of <code>PSSMLT</code> (Primary Sample Space
|
||||
Metropolis Light Transport, or Kelemen-style MLT). Basically, a
|
||||
<code>PSSMLT</code> renderer gives you an (allegedly random) number
|
||||
sequence, and you compute a color out of it. This is usually done by
|
||||
generating and tracing rays out of those random numbers. The renderer
|
||||
would assemble the colors into an image.</p>
|
||||
<p>Remember the function <code>5</code>? Here it comes. The first two
|
||||
“random” numbers have special meaning and must specify a point on the
|
||||
image plane <code>[0,1)x[0,1)</code>. You’re supposed to transform the
|
||||
image plane to the 3D space, choose a point for the camera, and shoot a
|
||||
ray from the camera point to the image plane point, see <img
|
||||
src="camera.png" alt="Camera convention" />. The camera point goes to
|
||||
<code>(U,V,W)</code>, and the ray direction vector (image plane point -
|
||||
camera point) is <code>(X,Y,Z)</code>. For the coordinate space, volume
|
||||
0 is scaled up 64x here to <code>(0,0,0)-(4096,4096,4096)</code>.</p>
|
||||
<p>For a basic camera shader example, check <a
|
||||
href="../otherroom.scene">otherroom.scene</a>.</p>
|
||||
<p>If any ray goes out of volume 0, the renderer crashes. Make sure it
|
||||
doesn’t happen. Wall up everything.</p>
|
||||
<p>Variables <code>ABCDEF</code> control the color returned from the
|
||||
ray. They will be explained in the material shaders part. For now, just
|
||||
put in:</p>
|
||||
<p>The function <code>a</code> is the camera shader, which, well, generates the camera ray.
|
||||
It’s supposed to return the ray in variables <code>UVWXYZ</code> and <code>ABCDEF</code> (that may
|
||||
sound like a lot of variables, but it really isn’t that much).</p>
|
||||
<p>Here comes some subtlety of <code>PSSMLT</code> (Primary Sample Space Metropolis Light
|
||||
Transport, or Kelemen-style MLT). Basically, a <code>PSSMLT</code> renderer gives you an
|
||||
(allegedly random) number sequence, and you compute a color out of it. This is
|
||||
usually done by generating and tracing rays out of those random numbers. The
|
||||
renderer would assemble the colors into an image.</p>
|
||||
<p>Remember the function <code>5</code>? Here it comes. The first two “random” numbers have
|
||||
special meaning and must specify a point on the image plane <code>[0,1)x[0,1)</code>.
|
||||
You’re supposed to transform the image plane to the 3D space, choose a point for
|
||||
the camera, and shoot a ray from the camera point to the image plane point, see
|
||||
<img src="camera.png" alt="Camera convention" />. The camera point goes to <code>(U,V,W)</code>, and the
|
||||
ray direction vector (image plane point - camera point) is <code>(X,Y,Z)</code>. For the
|
||||
coordinate space, volume 0 is scaled up 64x here to <code>(0,0,0)-(4096,4096,4096)</code>.</p>
|
||||
<p>For a basic camera shader example, check <a href="../otherroom.scene">otherroom.scene</a>.</p>
|
||||
<p>If any ray goes out of volume 0, the renderer crashes. Make sure it doesn’t
|
||||
happen. Wall up everything.</p>
|
||||
<p>Variables <code>ABCDEF</code> control the color returned from the ray. They will be
|
||||
explained in the material shaders part. For now, just put in:</p>
|
||||
<pre><code>A=0;B=0;C=0
|
||||
D=1;E=1;F=1</code></pre>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Continue to the comments before function
|
||||
1</td>
|
||||
<td style="text-align: left;">Continue to the comments before function 1</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -371,39 +343,32 @@ W=p*8+
|
||||
A=0;B=0;C=0+
|
||||
D=1;E=1;F=1</code></pre>
|
||||
<hr />
|
||||
<p>The numbered functions define materials, i.e., surface reflectance
|
||||
properties. As the name suggests, the shader simulates ray-surface
|
||||
interaction. It’s done by updating <code>UVWXYZABCDEF</code>, of
|
||||
course.</p>
|
||||
<p><code>ABCDEF</code> define colors. <code>(A,B,C)</code> is the RGB
|
||||
irradiance ultimately returned to the renderer, and <code>(D,E,F)</code>
|
||||
maintain the cumulative RGB reflectance of the current ray path. This
|
||||
may sound confusing, but basically, if the surface is a light source,
|
||||
you accumulate the current path reflectance <code>(D,E,F)</code>,
|
||||
multiplied by the light strength, to <code>(A,B,C)</code>. See shader 6
|
||||
for an example.</p>
|
||||
<p>If you want a colored surface, use its color to modulate
|
||||
<code>(D,E,F)</code>, i.e. <code>D=D*red;E=E*green;F=F*blue</code>, easy
|
||||
as that. To get some texturing, compute the color procedurally or look
|
||||
up a binary table.</p>
|
||||
<p>There’s something subtle about colors. To go along with the trend,
|
||||
the renderer follows the practice of linear rendering with a gamma of
|
||||
<code>2</code>. Stripping the fancy jargon, that basically means after
|
||||
picking a color in your favorite image editing program, you need to
|
||||
convert the RGB values from 0..255 to 0..1, and then put here its
|
||||
<em>square</em>. Only after squaring you get your real, lively color in
|
||||
the output image, as opposed to something dull and gray. You need to do
|
||||
the same if you use a RGB texture. And yes, that is the what the second
|
||||
<code>sqrt(3)</code> in <a href="../a.c">a.c</a> is for.</p>
|
||||
<p>Going beyond colors, to define a shiny or dull surface one needs more
|
||||
maths, and optics. The jargon for this is <code>BRDF</code>
|
||||
(Bidirectional Reflectance Distribution Function) importance sampling.
|
||||
Let’s continue to function <code>o</code>.</p>
|
||||
<p>The numbered functions define materials, i.e., surface reflectance properties.
|
||||
As the name suggests, the shader simulates ray-surface interaction. It’s done by
|
||||
updating <code>UVWXYZABCDEF</code>, of course.</p>
|
||||
<p><code>ABCDEF</code> define colors. <code>(A,B,C)</code> is the RGB irradiance ultimately returned to
|
||||
the renderer, and <code>(D,E,F)</code> maintain the cumulative RGB reflectance of the
|
||||
current ray path. This may sound confusing, but basically, if the surface is a
|
||||
light source, you accumulate the current path reflectance <code>(D,E,F)</code>, multiplied
|
||||
by the light strength, to <code>(A,B,C)</code>. See shader 6 for an example.</p>
|
||||
<p>If you want a colored surface, use its color to modulate <code>(D,E,F)</code>, i.e.
|
||||
<code>D=D*red;E=E*green;F=F*blue</code>, easy as that. To get some texturing, compute the
|
||||
color procedurally or look up a binary table.</p>
|
||||
<p>There’s something subtle about colors. To go along with the trend, the renderer
|
||||
follows the practice of linear rendering with a gamma of <code>2</code>. Stripping the
|
||||
fancy jargon, that basically means after picking a color in your favorite image
|
||||
editing program, you need to convert the RGB values from 0..255 to 0..1, and
|
||||
then put here its <em>square</em>. Only after squaring you get your real, lively color
|
||||
in the output image, as opposed to something dull and gray. You need to do the
|
||||
same if you use a RGB texture. And yes, that is the what the second <code>sqrt(3)</code> in
|
||||
<a href="../a.c">a.c</a> is for.</p>
|
||||
<p>Going beyond colors, to define a shiny or dull surface one needs more maths, and
|
||||
optics. The jargon for this is <code>BRDF</code> (Bidirectional Reflectance Distribution
|
||||
Function) importance sampling. Let’s continue to function <code>o</code>.</p>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Continue to the comments before function
|
||||
o</td>
|
||||
<td style="text-align: left;">Continue to the comments before function o</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -434,34 +399,28 @@ E=E*4/7+
|
||||
d=I#2/5+
|
||||
F=F*d</code></pre>
|
||||
<hr />
|
||||
<p>Function <code>o</code> defines a diffuse (that is, dull) surface. To
|
||||
define reflectance properties like this, one needs to sample an outgoing
|
||||
ray direction, based on the incoming direction and the surface normal.
|
||||
It’s called importance sampling, because here the probability of each
|
||||
outgoing direction has to be proportional to the reflected light
|
||||
strength (i.e., the <code>BRDF</code>) on that direction. For a diffuse
|
||||
surface, sample the upper hemisphere with a probability proportional to
|
||||
the cosine of the outgoing angle, see <img src="cosine.png"
|
||||
alt="Cosine sampling" />.</p>
|
||||
<p>The incoming direction is in <code>(X,Y,Z)</code> and the hit point
|
||||
is <code>(U,V,W)</code>. The outgoing direction is returned in, where
|
||||
else, <code>(X,Y,Z)</code>.</p>
|
||||
<p>The surface normal is provided in variables <code>S</code> and
|
||||
<code>T</code>. Since the geometry is defined as a bunch of cube-shaped
|
||||
cells, there are only 6 possible normals:
|
||||
<code>(±1,0,0) (0,±1,0) (0,0,±1)</code>. Here <code>S</code> is the sign
|
||||
and <code>T</code> is the dimension. If you get <code>S=-1</code> and
|
||||
<code>T=1</code>, the normal is <code>(0,-1,0)</code>.</p>
|
||||
<p>If you don’t want to redo all the math yourself… this file provides a
|
||||
few simple shader functions:</p>
|
||||
<p>Function <code>o</code> defines a diffuse (that is, dull) surface. To define reflectance
|
||||
properties like this, one needs to sample an outgoing ray direction, based on
|
||||
the incoming direction and the surface normal. It’s called importance sampling,
|
||||
because here the probability of each outgoing direction has to be proportional
|
||||
to the reflected light strength (i.e., the <code>BRDF</code>) on that direction. For a
|
||||
diffuse surface, sample the upper hemisphere with a probability proportional to
|
||||
the cosine of the outgoing angle, see <img src="cosine.png" alt="Cosine sampling" />.</p>
|
||||
<p>The incoming direction is in <code>(X,Y,Z)</code> and the hit point is <code>(U,V,W)</code>. The
|
||||
outgoing direction is returned in, where else, <code>(X,Y,Z)</code>.</p>
|
||||
<p>The surface normal is provided in variables <code>S</code> and <code>T</code>. Since the geometry is
|
||||
defined as a bunch of cube-shaped cells, there are only 6 possible normals:
|
||||
<code>(±1,0,0) (0,±1,0) (0,0,±1)</code>. Here <code>S</code> is the sign and <code>T</code> is the dimension. If
|
||||
you get <code>S=-1</code> and <code>T=1</code>, the normal is <code>(0,-1,0)</code>.</p>
|
||||
<p>If you don’t want to redo all the math yourself… this file provides a few simple shader functions:</p>
|
||||
<pre><code>o -- Diffuse surface. Do the color thing your self and call R=o
|
||||
5 -- Perfect mirror.
|
||||
f -- Surface with a Fresnel term. Basically, it resembles a polished surface made from a dielectric material.</code></pre>
|
||||
<p>For something more complex like a fluffy carpet, well, you could use
|
||||
a volume to directly model the <a
|
||||
href="https://en.wikipedia.org/wiki/Mesoscopic_physics">mesoscopic</a>
|
||||
detail. Shader <code>D</code> in this file produces a bunch of dense,
|
||||
tiny spikes to simulate a fluffy appearance.</p>
|
||||
<p>For something more complex like a fluffy carpet, well, you could use a volume to
|
||||
directly model the
|
||||
<a href="https://en.wikipedia.org/wiki/Mesoscopic_physics">mesoscopic</a> detail. Shader
|
||||
<code>D</code> in this file produces a bunch of dense, tiny spikes to simulate a fluffy
|
||||
appearance.</p>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
@@ -567,8 +526,8 @@ y=4:#/7+
|
||||
#=#-y*7+
|
||||
C=7#C</code></pre>
|
||||
<hr />
|
||||
<p>The last line, well, is the output filename. Just remember to throw
|
||||
in two <code>]</code>s and don’t put a newline after it.</p>
|
||||
<p>The last line, well, is the output filename. Just remember to throw in two <code>]</code>s
|
||||
and don’t put a newline after it.</p>
|
||||
<pre><code>]]example.ppm</code></pre>
|
||||
|
||||
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
+166
-236
@@ -130,8 +130,8 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Qiming_HOU">Qiming HOU</a><br>
|
||||
Location: <a href="../../location.html#CN">CN</a> - <em>People’s
|
||||
Republic of China</em> (<em>China</em>) <br><br></li>
|
||||
Location: <a href="../../location.html#CN">CN</a> - <em>People’s Republic of China</em> (<em>China</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -144,166 +144,138 @@ Republic of China</em> (<em>China</em>) <br><br></li>
|
||||
<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.html#2013_hou">2013 hou bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2013_hou">2013 hou bugs</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">./hou</span> <span class="pp">[</span><span class="ss">scene</span><span class="pp">-</span><span class="ss">file</span><span class="pp">-</span><span class="ss">name</span><span class="pp">]</span> <span class="pp">[</span><span class="ss">options</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>Follow the instructions in <code>stdout</code>, preferably with an
|
||||
auto-refreshing PPM image viewer ready. Refresh the image every time the
|
||||
output refreshes, all effects should be more or less recognizable when
|
||||
you see 16.</p>
|
||||
<p>Follow the instructions in <code>stdout</code>, preferably with an auto-refreshing PPM
|
||||
image viewer ready. Refresh the image every time the output refreshes, all
|
||||
effects should be more or less recognizable when you see 16.</p>
|
||||
<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>
|
||||
<p>Try opening the file noted by the program then let the program run a
|
||||
while and every so often reopen the file, to see how it changes. The
|
||||
author suggests that you leave the program running overnight to see what
|
||||
happens. If however you do not have all night :-) then the following
|
||||
JPEG files should show you what happens with some of the invocations
|
||||
above:</p>
|
||||
<p>Try opening the file noted by the program then let the program run a while and
|
||||
every so often reopen the file, to see how it changes. The author suggests that
|
||||
you leave the program running overnight to see what happens. If however you do
|
||||
not have all night :-) then the following JPEG files should show you what
|
||||
happens with some of the invocations above:</p>
|
||||
<figure>
|
||||
<img src="luna.jpg" alt="./hou BIG - Luna" />
|
||||
<figcaption aria-hidden="true">./hou BIG - Luna</figcaption>
|
||||
</figure>
|
||||
<figure>
|
||||
<img src="old_default.jpg"
|
||||
alt="./hou old_default.scene - Old default" />
|
||||
<figcaption aria-hidden="true">./hou old_default.scene - Old
|
||||
default</figcaption>
|
||||
<img src="old_default.jpg" alt="./hou old_default.scene - Old default" />
|
||||
<figcaption aria-hidden="true">./hou old_default.scene - Old default</figcaption>
|
||||
</figure>
|
||||
<figure>
|
||||
<img src="otherroom.jpg" alt="./hou otherroom.scene - Other room" />
|
||||
<figcaption aria-hidden="true">./hou otherroom.scene - Other
|
||||
room</figcaption>
|
||||
<figcaption aria-hidden="true">./hou otherroom.scene - Other room</figcaption>
|
||||
</figure>
|
||||
<p>This program does not terminate by itself: you must kill
|
||||
<code>hou</code> (but not Qiming Hou :-) ) in order to end the
|
||||
program.</p>
|
||||
<p>This program does not terminate by itself: you must kill <code>hou</code> (but not Qiming
|
||||
Hou :-) ) in order to end the program.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>You could consider that this program violates the source code size
|
||||
limit. This is because the first compilation of this program is really
|
||||
just a decompressor to generate the real source code of the program.</p>
|
||||
<p>This program will loop infinitely while progressively refining a <a
|
||||
href="https://en.wikipedia.org/wiki/Ray_tracing_(graphics)">raytraced</a>
|
||||
image.</p>
|
||||
<p>NOTE: the author refers to <a href="a.c">a.c</a>, placed in a gzipped
|
||||
file <code>a.c.gz</code>. We do not include it but it can be generated
|
||||
like:</p>
|
||||
limit. This is because the first compilation of this program is
|
||||
really just a decompressor to generate the real source code of the
|
||||
program.</p>
|
||||
<p>This program will loop infinitely while progressively refining a
|
||||
<a href="https://en.wikipedia.org/wiki/Ray_tracing_(graphics)">raytraced</a> image.</p>
|
||||
<p>NOTE: the author refers to <a href="a.c">a.c</a>, placed in a gzipped file <code>a.c.gz</code>. We do not
|
||||
include it but it can be generated like:</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">-Wall</span> hou.c <span class="at">-o</span> hou <span class="at">-lm</span></span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./hou</span> <span class="op">></span> a.c</span></code></pre></div>
|
||||
<p>but there is no need to do this as the Makefile takes care of it
|
||||
without even needing to create a temporary file.</p>
|
||||
<p>but there is no need to do this as the Makefile takes care of it without even
|
||||
needing to create a temporary file.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="using-hou">Using hou</h3>
|
||||
<p>This program is a programmable rendering engine with a built-in
|
||||
default scene. The standard command line is:</p>
|
||||
<p>This program is a programmable rendering engine with a built-in default scene.
|
||||
The standard command line is:</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">./hou</span> <span class="pp">[</span><span class="ss">scene</span><span class="pp">-</span><span class="ss">file</span><span class="pp">-</span><span class="ss">name</span><span class="pp">]</span> <span class="pp">[</span><span class="ss">options</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>As <code>hou</code> runs, it writes a progressively refining image to
|
||||
a ppm file specified in the scene. The initialization may take a while,
|
||||
but once it’s done, a rough preview should be available in seconds.
|
||||
Leave <code>hou</code> running for the night, and you get a high quality
|
||||
result like the attached <code>*.jpg</code> files. Kill <code>hou</code>
|
||||
manually after you’re satisfied with the image quality.</p>
|
||||
<p>To save time and energy for the judges, rendered images for all
|
||||
provided scenes are provided as attached files.</p>
|
||||
<p>As <code>hou</code> runs, it writes a progressively refining image to a ppm file specified
|
||||
in the scene. The initialization may take a while, but once it’s done, a rough
|
||||
preview should be available in seconds. Leave <code>hou</code> running for the night, and you
|
||||
get a high quality result like the attached <code>*.jpg</code> files. Kill <code>hou</code> manually
|
||||
after you’re satisfied with the image quality.</p>
|
||||
<p>To save time and energy for the judges, rendered images for all provided scenes
|
||||
are provided as attached files.</p>
|
||||
<h3 id="features">Features</h3>
|
||||
<ul>
|
||||
<li>Fully programmable: Almost every stage of the renderer is
|
||||
programmable with a shader, i.e., a short script that does something
|
||||
rendering-related. In particular, each scene consists of one or more
|
||||
geometry shaders, a camera shader, and one or more material shaders.
|
||||
Shaders are written in an interpreted language that supports basic
|
||||
arithmetic, a few math functions, variables and procedural calls in the
|
||||
CPS (Continuation Passing Style).</li>
|
||||
<li>Fast preview: This renderer isn’t just a naive path tracer, it
|
||||
actually uses a modern global illumination algorithm which is robust
|
||||
against challenging scene configurations. You can mostly place light
|
||||
sources and specify surface properties as you please without worrying
|
||||
too much about the convergence speed; you always get a nice fast preview
|
||||
within one or two minutes. As proof, there is a comparison:
|
||||
<code>./hou otherroom.scene</code> gives a rough idea about the overall
|
||||
illumination at 16 samples per pixel (i.e., when the program prints 16),
|
||||
whereas the naive approach <code>./hou otherroom.scene NAIVE</code> only
|
||||
produces a mess of white dots.</li>
|
||||
<li>Rich visual effects: The algorithm samples all light path types so
|
||||
most physically based effects can be produced. The default scene
|
||||
demonstrates quite a few of them: reflection, area light, soft shadows,
|
||||
color bleeding, caustics, and depth-of-field blur. Of course, one can
|
||||
also get programmable-shading effects like procedural texturing and
|
||||
approximated Fresnel terms.</li>
|
||||
<li>Accelerated ray tracing: The ray tracing part uses an algorithm
|
||||
better than the brute-force intersection of everything. The renderer
|
||||
even builds an acceleration data structure! Despite the double precision
|
||||
and the single-threadedness, it still runs at about 0.5 million rays per
|
||||
second on the author’s machine.</li>
|
||||
<li>Pause and resume: Can’t run <code>./hou</code> overnight? No
|
||||
problem! You can kill and resume a rendering session whenever you want.
|
||||
The renderer automatically saves the progress every 16 samples and
|
||||
resumes where it’s left off when restarted. Also, each scene/parameter
|
||||
combination gets a different saved session so you don’t have to worry
|
||||
about conflicts.</li>
|
||||
<li>Fully programmable: Almost every stage of the renderer is programmable with
|
||||
a shader, i.e., a short script that does something rendering-related. In
|
||||
particular, each scene consists of one or more geometry shaders, a camera
|
||||
shader, and one or more material shaders. Shaders are written in an
|
||||
interpreted language that supports basic arithmetic, a few math functions,
|
||||
variables and procedural calls in the CPS (Continuation Passing Style).</li>
|
||||
<li>Fast preview: This renderer isn’t just a naive path tracer, it actually uses a
|
||||
modern global illumination algorithm which is robust against challenging scene
|
||||
configurations. You can mostly place light sources and specify surface
|
||||
properties as you please without worrying too much about the convergence speed;
|
||||
you always get a nice fast preview within one or two minutes. As proof, there
|
||||
is a comparison: <code>./hou otherroom.scene</code> gives a rough idea about the overall
|
||||
illumination at 16 samples per pixel (i.e., when the program prints 16), whereas
|
||||
the naive approach <code>./hou otherroom.scene NAIVE</code> only produces a mess of white
|
||||
dots.</li>
|
||||
<li>Rich visual effects: The algorithm samples all light path types so most
|
||||
physically based effects can be produced. The default scene demonstrates quite a
|
||||
few of them: reflection, area light, soft shadows, color bleeding, caustics, and
|
||||
depth-of-field blur. Of course, one can also get programmable-shading effects
|
||||
like procedural texturing and approximated Fresnel terms.</li>
|
||||
<li>Accelerated ray tracing: The ray tracing part uses an algorithm better than
|
||||
the brute-force intersection of everything. The renderer even builds an
|
||||
acceleration data structure! Despite the double precision and the
|
||||
single-threadedness, it still runs at about 0.5 million rays per second on the
|
||||
author’s machine.</li>
|
||||
<li>Pause and resume: Can’t run <code>./hou</code> overnight? No problem! You can kill and
|
||||
resume a rendering session whenever you want. The renderer automatically saves
|
||||
the progress every 16 samples and resumes where it’s left off when restarted.
|
||||
Also, each scene/parameter combination gets a different saved session so you
|
||||
don’t have to worry about conflicts.</li>
|
||||
</ul>
|
||||
<h3 id="abuse-of-the-rules">Abuse of the rules</h3>
|
||||
<ul>
|
||||
<li><a href="hou.c">hou.c</a> uses compression to get around the size
|
||||
limit. The compression fully complies with the rules and the guidelines
|
||||
(at least the portion that shows up in <code>grep</code> “size limit”).
|
||||
Please see the <a href="self-imposed-restrictions">Self-imposed
|
||||
<li><a href="hou.c">hou.c</a> uses compression to get around the size limit. The compression
|
||||
fully complies with the rules and the guidelines (at least the portion that
|
||||
shows up in <code>grep</code> “size limit”). Please see the <a href="self-imposed-restrictions">Self-imposed
|
||||
restrictions</a> section below for more details.</li>
|
||||
<li><code>hou</code> does not terminate (as suggested by the second line
|
||||
of rule 6).</li>
|
||||
<li><code>hou</code> does not terminate (as suggested by the second line of rule 6).</li>
|
||||
</ul>
|
||||
<h3 id="self-imposed-restrictions">Self-imposed restrictions</h3>
|
||||
<ul>
|
||||
<li>The building process does not involve any OS tool beyond
|
||||
<code>cc(1)</code> and <code>make(1)</code>. No <code>gzip(1)</code>
|
||||
compression! <code>a.c.gz</code> doesn’t fit in 2053 bytes, anyway.</li>
|
||||
<li>Neither <a href="hou.c">hou.c</a> nor <a href="a.c">a.c</a> (the
|
||||
<em>real</em> decompressed source) uses <code>#define</code> (or
|
||||
<code>cc -D</code>) at all.</li>
|
||||
<li>The building process does not involve any OS tool beyond <code>cc(1)</code> and
|
||||
<code>make(1)</code>. No <code>gzip(1)</code> compression! <code>a.c.gz</code> doesn’t fit in 2053 bytes, anyway.</li>
|
||||
<li>Neither <a href="hou.c">hou.c</a> nor <a href="a.c">a.c</a> (the <em>real</em> decompressed source) uses
|
||||
<code>#define</code> (or <code>cc -D</code>) at all.</li>
|
||||
<li>The source code is not required at runtime.</li>
|
||||
<li><a href="a.c">a.c</a> does not drop optional features to reduce
|
||||
size. There are pure optimization code that can be dropped without
|
||||
affecting the converged output (only affecting the ray tracing speed /
|
||||
convergence rate). All files are properly <code>fopen()</code>ed with
|
||||
<code>"rb"</code> / <code>"wb"</code> for Windows compatibility. The PPM
|
||||
header has a comment line for non-standard-compliant viewers
|
||||
(specifically, my old HDRShop 1.0). And there is a nice text message
|
||||
saying “please wait…”. Despite the messy look, <a href="a.c">a.c</a> and
|
||||
<a href="hou.c">hou.c</a> compile warning-free (<a
|
||||
href="hou.c">hou.c</a> even wastes 18 bytes on
|
||||
<code>#include<stdio.h></code> just for <code>putchar(3)</code>).
|
||||
<a href="a.c">a.c</a> compiles mostly clean in the C99/ANSI modes of
|
||||
clang and gcc (with <code>-Wall --pedantic</code>). The only warning
|
||||
generated is a pedantic one:
|
||||
<code>"string constant too long"</code>.</li>
|
||||
<li><a href="a.c">a.c</a> does not drop optional features to reduce size. There are pure
|
||||
optimization code that can be dropped without affecting the converged output
|
||||
(only affecting the ray tracing speed / convergence rate). All files are
|
||||
properly <code>fopen()</code>ed with <code>"rb"</code> / <code>"wb"</code> for Windows compatibility. The PPM
|
||||
header has a comment line for non-standard-compliant viewers (specifically, my
|
||||
old HDRShop 1.0). And there is a nice text message saying “please wait…”.
|
||||
Despite the messy look, <a href="a.c">a.c</a> and <a href="hou.c">hou.c</a> compile warning-free
|
||||
(<a href="hou.c">hou.c</a> even wastes 18 bytes on <code>#include<stdio.h></code> just for <code>putchar(3)</code>).
|
||||
<a href="a.c">a.c</a> compiles mostly clean in the C99/ANSI modes of clang and gcc (with <code>-Wall --pedantic</code>). The only warning generated is a pedantic one: <code>"string constant too long"</code>.</li>
|
||||
</ul>
|
||||
<h3 id="comments-and-why-obfuscated">Comments and why obfuscated</h3>
|
||||
<ul>
|
||||
<li>Both the compression and the rendering use mathematically involved
|
||||
algorithms. Understanding the C doesn’t help much if one isn’t familiar
|
||||
with the math.</li>
|
||||
<li>Modern renderers provide shader access to just about any internal
|
||||
state. This one follows suit and reuses the same shader-accessible array
|
||||
for all important internal states.</li>
|
||||
<li>Infinity and NaN (not-a-number) are used during normal course of
|
||||
execution.</li>
|
||||
<li>Previous image-generating entries may take care to hide the “IOCCC”
|
||||
string in the code, but they leave the text clear in the
|
||||
<em>result</em>. This entry takes it further and obfuscates the output
|
||||
image as well. Can you find the text in the image? Hint: look up.</li>
|
||||
<li><a href="a.c">a.c</a> leaves all shaders in plain text, but the
|
||||
plain text shader code can’t be taken for its face value; the arithmetic
|
||||
rules subtly diverge from our common sense.</li>
|
||||
<li><a href="a.c">a.c</a> is less portable than <a
|
||||
href="hou.c">hou.c</a> itself. <a href="hou.c">hou.c</a> only depends on
|
||||
ASCII and should run just fine on 16-bit, small memory, or
|
||||
floating-point-incapable machines. <a href="a.c">a.c</a>, while still
|
||||
reasonably portable, is quite memory consuming, requires
|
||||
IEEE754-compliant <code>double</code>, and assumes <code>int</code> to
|
||||
be 32-bits.</li>
|
||||
<li>Though technically endian-dependent, <a href="a.c">a.c</a> remains
|
||||
portable providing that one doesn’t copy saved sessions across different
|
||||
endianness.</li>
|
||||
<li>Both the compression and the rendering use mathematically involved algorithms.
|
||||
Understanding the C doesn’t help much if one isn’t familiar with the math.</li>
|
||||
<li>Modern renderers provide shader access to just about any internal state. This
|
||||
one follows suit and reuses the same shader-accessible array for all important
|
||||
internal states.</li>
|
||||
<li>Infinity and NaN (not-a-number) are used during normal course of execution.</li>
|
||||
<li>Previous image-generating entries may take care to hide the “IOCCC” string in
|
||||
the code, but they leave the text clear in the <em>result</em>. This entry takes it
|
||||
further and obfuscates the output image as well. Can you find the text in the
|
||||
image? Hint: look up.</li>
|
||||
<li><a href="a.c">a.c</a> leaves all shaders in plain text, but the plain text shader code can’t
|
||||
be taken for its face value; the arithmetic rules subtly diverge from our common
|
||||
sense.</li>
|
||||
<li><a href="a.c">a.c</a> is less portable than <a href="hou.c">hou.c</a> itself. <a href="hou.c">hou.c</a> only depends
|
||||
on ASCII and should run just fine on 16-bit, small memory, or
|
||||
floating-point-incapable machines. <a href="a.c">a.c</a>, while still reasonably portable, is
|
||||
quite memory consuming, requires IEEE754-compliant <code>double</code>, and assumes <code>int</code> to be
|
||||
32-bits.</li>
|
||||
<li>Though technically endian-dependent, <a href="a.c">a.c</a> remains portable providing that one
|
||||
doesn’t copy saved sessions across different endianness.</li>
|
||||
</ul>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<pre><code> 3225 3225 3225 9 9 3225 3225
|
||||
@@ -311,132 +283,90 @@ endianness.</li>
|
||||
4225 1226 1 1 1 1 1222 1226
|
||||
1 1 1 1 1 1 1 1 1
|
||||
4226 1 4226 8 4222 4226 1 1</code></pre>
|
||||
<p>The program consists of a recursive-descent interpreter, a
|
||||
<code>3DDDA</code> (3D Discrete Differential Analysis) ray tracer, a
|
||||
<code>PSSMLT</code> (Primary Sample Space Metropolis Light Transport)
|
||||
light path sampler, all squeezed into the size limit using a
|
||||
<code>PPM</code> compressor (Prediction by Partial Matching, and yes,
|
||||
the output format is chosen for the pun..).</p>
|
||||
<p><code>PSSMLT</code> uses the Metropolis-Hasting algorithm to sample a
|
||||
32D unit hypercube. Each point in the hypercube is interpreted as a
|
||||
sequence of random numbers, and is sent to a path tracer to generate a
|
||||
light path. The point’s Metropolis-Hasting energy is then defined as the
|
||||
corresponding path’s contribution value to the final image. Since each
|
||||
path is sampled with a probability proportional to its energy, the
|
||||
sample distribution directly corresponds to the final image, which can
|
||||
then be produced as a simple per-pixel histogram of all generated paths.
|
||||
The robustness comes from a state mutation strategy that actively tries
|
||||
to explore the neighborhood of high energy peaks (e.g. paths that happen
|
||||
to hit the light source in <a
|
||||
href="otherroom.scene">otherroom.scene</a>). In addition, a rudimentary
|
||||
form of lens path stratification is added to balance the attention each
|
||||
pixel receives. The Metropolis-Hasting process completely avoids the
|
||||
tell-tale pixel sampling loop required in most other image generation
|
||||
methods.</p>
|
||||
<p>The <code>3DDDA</code> tracer is chosen for scalability: its
|
||||
performance doesn’t get much worse as scene complexity increases.
|
||||
Another benefit is that with the <code>DDA</code> code in place one can
|
||||
naturally use hierarchical grids as an acceleration structure. The
|
||||
downside, of course, is that the setup involves quite a few divisions,
|
||||
which naturally turns into divisions-by-zero. Fortunately, the IEEE754
|
||||
standard has a nice set of rules just for this purpose and the
|
||||
arithmetics are organized in a specific way to take advantage of this.
|
||||
The shader interpreter component is relatively straightforward, just an
|
||||
expression evaluator stripped to the bare minimum – it doesn’t even
|
||||
support numerical constants natively. A final little bit is a
|
||||
just-good-enough PRNG (Pseudo Random Number Generator) to replace the
|
||||
low precision Windows <code>rand()</code> and the non-C99 Unix
|
||||
<code>drand48(3)</code>. An overnight session would run through its
|
||||
short period many times, but that doesn’t necessarily map to the same
|
||||
set of paths in <code>PSSMLT</code>. After all, Metropolis-Hasting used
|
||||
an even worse PRNG in their 1953 paper.</p>
|
||||
<p>The <code>PPM</code> compressor uses statically weighted fixed order
|
||||
contexts with an arithmetic encoder tweaked for <a
|
||||
href="../iocccsize.c">iocccsize.c</a>. The encoder emits octet-space
|
||||
pairs where each octet encodes ~6.5 bits of information and each space
|
||||
encodes 2 bits (thanks to the generous definition of “space” in <a
|
||||
href="../iocccsize.c">iocccsize.c</a>). The compressor actively shuffles
|
||||
the variable names around until the compressed string happens to contain
|
||||
enough <code>{};</code>s to pass the final <a
|
||||
href="../iocccsize.c">iocccsize.c</a> test. There are a few other
|
||||
tweaks:</p>
|
||||
<p>The program consists of a recursive-descent interpreter, a <code>3DDDA</code> (3D Discrete
|
||||
Differential Analysis) ray tracer, a <code>PSSMLT</code> (Primary Sample Space Metropolis
|
||||
Light Transport) light path sampler, all squeezed into the size limit using a
|
||||
<code>PPM</code> compressor (Prediction by Partial Matching, and yes, the output format is
|
||||
chosen for the pun..).</p>
|
||||
<p><code>PSSMLT</code> uses the Metropolis-Hasting algorithm to sample a 32D unit hypercube.
|
||||
Each point in the hypercube is interpreted as a sequence of random numbers, and
|
||||
is sent to a path tracer to generate a light path. The point’s
|
||||
Metropolis-Hasting energy is then defined as the corresponding path’s
|
||||
contribution value to the final image. Since each path is sampled with a
|
||||
probability proportional to its energy, the sample distribution directly
|
||||
corresponds to the final image, which can then be produced as a simple per-pixel
|
||||
histogram of all generated paths. The robustness comes from a state mutation
|
||||
strategy that actively tries to explore the neighborhood of high energy peaks
|
||||
(e.g. paths that happen to hit the light source in
|
||||
<a href="otherroom.scene">otherroom.scene</a>). In addition, a rudimentary form of lens
|
||||
path stratification is added to balance the attention each pixel receives. The
|
||||
Metropolis-Hasting process completely avoids the tell-tale pixel sampling loop
|
||||
required in most other image generation methods.</p>
|
||||
<p>The <code>3DDDA</code> tracer is chosen for scalability: its performance doesn’t get much
|
||||
worse as scene complexity increases. Another benefit is that with the <code>DDA</code> code
|
||||
in place one can naturally use hierarchical grids as an acceleration structure.
|
||||
The downside, of course, is that the setup involves quite a few divisions, which
|
||||
naturally turns into divisions-by-zero. Fortunately, the IEEE754 standard has a
|
||||
nice set of rules just for this purpose and the arithmetics are organized in a
|
||||
specific way to take advantage of this. The shader interpreter component is
|
||||
relatively straightforward, just an expression evaluator stripped to the bare
|
||||
minimum – it doesn’t even support numerical constants natively. A final little
|
||||
bit is a just-good-enough PRNG (Pseudo Random Number Generator) to replace the
|
||||
low precision Windows <code>rand()</code> and the non-C99 Unix <code>drand48(3)</code>. An overnight
|
||||
session would run through its short period many times, but that doesn’t
|
||||
necessarily map to the same set of paths in <code>PSSMLT</code>. After all,
|
||||
Metropolis-Hasting used an even worse PRNG in their 1953 paper.</p>
|
||||
<p>The <code>PPM</code> compressor uses statically weighted fixed order contexts with an
|
||||
arithmetic encoder tweaked for <a href="../iocccsize.c">iocccsize.c</a>. The encoder emits octet-space pairs
|
||||
where each octet encodes ~6.5 bits of information and each space encodes 2 bits
|
||||
(thanks to the generous definition of “space” in <a href="../iocccsize.c">iocccsize.c</a>). The compressor
|
||||
actively shuffles the variable names around until the compressed string happens
|
||||
to contain enough <code>{};</code>s to pass the final <a href="../iocccsize.c">iocccsize.c</a> test.
|
||||
There are a few other tweaks:</p>
|
||||
<ul>
|
||||
<li><p>The <code>PPM</code> model uses mostly whitespace characters for
|
||||
weights.</p></li>
|
||||
<li><p>The encoder never emits <code>'"'</code> and
|
||||
<code>'\\'</code>.</p></li>
|
||||
<li><p>The decoder uses an O(n^2) algorithm to avoid the gigabytes-sized
|
||||
hash table frequently found in other <code>PPM</code>
|
||||
implementations.</p></li>
|
||||
<li><p>The <code>PPM</code> model uses mostly whitespace characters for weights.</p></li>
|
||||
<li><p>The encoder never emits <code>'"'</code> and <code>'\\'</code>.</p></li>
|
||||
<li><p>The decoder uses an O(n^2) algorithm to avoid the gigabytes-sized hash table
|
||||
frequently found in other <code>PPM</code> implementations.</p></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>
|
||||
<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-2013hou"><a name="inventory"></a>Inventory for
|
||||
2013/hou</h1>
|
||||
<h1 id="inventory-for-2013hou"><a name="inventory"></a>Inventory for 2013/hou</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/2013/hou/hou.c">hou.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/hou.orig.c">hou.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="doc/example.html">doc/example.html</a> - detailed
|
||||
information about entry</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/old_default.scene">old_default.scene</a>
|
||||
- sample input</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/otherroom.scene">otherroom.scene</a>
|
||||
- sample input</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/hou.c">hou.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/hou.orig.c">hou.orig.c</a> - original source</li>
|
||||
<li><a href="doc/example.html">doc/example.html</a> - detailed information about entry</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/old_default.scene">old_default.scene</a> - sample input</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/otherroom.scene">otherroom.scene</a> - sample input</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="luna.jpg">luna.jpg</a> - sample image data</li>
|
||||
<li><a href="old_default.jpg">old_default.jpg</a> - sample image
|
||||
data</li>
|
||||
<li><a href="old_default.jpg">old_default.jpg</a> - sample image data</li>
|
||||
<li><a href="otherroom.jpg">otherroom.jpg</a> - sample image data</li>
|
||||
<li><a href="2013_hou.tar.bz2">2013_hou.tar.bz2</a> - download entry
|
||||
source</li>
|
||||
<li><a href="2013_hou.tar.bz2">2013_hou.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/2013/hou/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/.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/2013/hou/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/.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/2013/hou/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="doc/camera.png">doc/camera.png</a> - documentation support
|
||||
image</li>
|
||||
<li><a href="doc/cosine.png">doc/cosine.png</a> - documentation support
|
||||
image</li>
|
||||
<li><a href="doc/draft.png">doc/draft.png</a> - documentation support
|
||||
image</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/doc/example.md">doc/example.md</a>
|
||||
- markdown source for doc/example.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/README.md">README.md</a> - markdown source for index.html</li>
|
||||
<li><a href="doc/camera.png">doc/camera.png</a> - documentation support image</li>
|
||||
<li><a href="doc/cosine.png">doc/cosine.png</a> - documentation support image</li>
|
||||
<li><a href="doc/draft.png">doc/draft.png</a> - documentation support image</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/doc/example.md">doc/example.md</a> - markdown source for doc/example.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+52
-77
@@ -123,43 +123,36 @@
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h1 id="twenty-second-international-obfuscated-c-code-contest">Twenty
|
||||
Second International Obfuscated C Code Contest</h1>
|
||||
<h1 id="twenty-second-international-obfuscated-c-code-contest">Twenty Second International Obfuscated C Code Contest</h1>
|
||||
<h2 id="standard-ioccc-stuff">Standard IOCCC stuff</h2>
|
||||
<p>View the <code>index.html</code> web page for the given winning entry
|
||||
for information on how compile the entry and how to run the winning
|
||||
program. Look at the winning source and try to figure how it does what
|
||||
it does! You may then wish to look at the Author’s remarks for even more
|
||||
details.</p>
|
||||
<p>The IOCCC has a web site and now has a number of international
|
||||
mirrors. The primary site can be found at <a
|
||||
href="https://www.ioccc.org">www.ioccc.org</a>.</p>
|
||||
<p>Use <code>make</code> to compile entries. It is possible that on
|
||||
non-Unix / non-Linux systems the Makefile needs to be changed. See the
|
||||
Makefile for details.</p>
|
||||
<p>Read over the Makefile for compile/build issues. Your system might
|
||||
require certain changes (add or remove a library, add or remove a
|
||||
<code>#define</code> i.e. <code>-D</code> flag).</p>
|
||||
<p>View the <code>index.html</code> web page for the given winning entry for information on how
|
||||
compile the entry and how to run the winning program. Look at the winning
|
||||
source and try to figure how it does what it does! You may then wish to look at
|
||||
the Author’s remarks for even more details.</p>
|
||||
<p>The IOCCC has a web site and now has a number of international mirrors.
|
||||
The primary site can be found at <a href="https://www.ioccc.org">www.ioccc.org</a>.</p>
|
||||
<p>Use <code>make</code> to compile entries. It is possible that on non-Unix / non-Linux
|
||||
systems the Makefile needs to be changed. See the Makefile for details.</p>
|
||||
<p>Read over the Makefile for compile/build issues. Your system might require
|
||||
certain changes (add or remove a library, add or remove a <code>#define</code> i.e. <code>-D</code>
|
||||
flag).</p>
|
||||
<p>Some ANSI C compilers are not quite as good as they should be. If
|
||||
yours is lacking, you may need to compile using gcc instead of your
|
||||
local compiler.</p>
|
||||
<h2 id="remarks-on-some-of-the-entries">Remarks on some of the
|
||||
entries</h2>
|
||||
<p>We believe you will again be impressed with this year’s winning
|
||||
entries.</p>
|
||||
<p>This year, 9 won 15 awards. For the first time in the history of the
|
||||
contest, one person, <a href="../authors.html#Yusuke_Endoh">Yusuke
|
||||
Endoh</a> won 4 times while <a
|
||||
href="../authors.html#Adrian_Cable">Adrian Cable</a> won 3 times! It is
|
||||
also worth noting that <a href="../authors.html#Christopher_Mills">Chris
|
||||
Mills</a> last win was in 1993. Welcome back Chris!</p>
|
||||
<h2 id="remarks-on-some-of-the-entries">Remarks on some of the entries</h2>
|
||||
<p>We believe you will again be impressed with this year’s winning entries.</p>
|
||||
<p>This year, 9 won 15 awards. For the first time in the history of the contest,
|
||||
one person, <a href="../authors.html#Yusuke_Endoh">Yusuke Endoh</a> won
|
||||
4 times while <a href="../authors.html#Adrian_Cable">Adrian Cable</a>
|
||||
won 3 times! It is also worth noting that <a href="../authors.html#Christopher_Mills">Chris
|
||||
Mills</a> last win was in 1993.
|
||||
Welcome back Chris!</p>
|
||||
<p>We, the judges, were very surprised by this as many of the multiple
|
||||
authors submitted very different styles of entries.</p>
|
||||
<p>This year was the first time the IOCCC size tool was used. Entries
|
||||
had to print a value 2053 or less when the <code>-i</code> flag was
|
||||
used.</p>
|
||||
<p>Several people discovered an undocumented feature in that certain
|
||||
comments such as:</p>
|
||||
had to print a value 2053 or less when the <code>-i</code> flag was used.</p>
|
||||
<p>Several people discovered an undocumented feature in that
|
||||
certain comments such as:</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="co">///*</span></span></code></pre></div>
|
||||
<p>or:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a> <span class="op">*</span>\</span>
|
||||
@@ -168,9 +161,9 @@ comments such as:</p>
|
||||
<pre><code>In cases where the above summary and the algorithm implemented by
|
||||
the IOCCC size tool source code conflict, the algorithm implemented
|
||||
by the IOCCC size tool source code is preferred by the judges.</code></pre>
|
||||
<p>so this abuse was allowed (and encouraged). The judges hope that the
|
||||
IOCCC size tool author will patch the tool to block this kind of size
|
||||
abuse in future contests.</p>
|
||||
<p>so this abuse was allowed (and encouraged). The judges hope that
|
||||
the IOCCC size tool author will patch the tool to block this kind
|
||||
of size abuse in future contests.</p>
|
||||
<p>There were some outstanding entries that did not win. Unfortunately
|
||||
some very good entries lost because they:</p>
|
||||
<ul>
|
||||
@@ -181,64 +174,46 @@ excess by a clever abuse of the rules</li>
|
||||
<li>were very similar to previous winning entry</li>
|
||||
<li>didn’t work as documented</li>
|
||||
</ul>
|
||||
<p>We hope that the authors of some of those entries will fix and
|
||||
resubmit them for the next IOCCC.</p>
|
||||
<p>There is a risk in submitting an entry that is similar to a well used
|
||||
theme by previous winning entries. Previous entries set a very high bar.
|
||||
A new entry must not only compete against other submissions from the
|
||||
current year but they must also excel over similar previous winning
|
||||
entry in some particularly impressive way.</p>
|
||||
<p>We hope that the authors of some of those entries will fix and resubmit them
|
||||
for the next IOCCC.</p>
|
||||
<p>There is a risk in submitting an entry that is similar to a well used theme by
|
||||
previous winning entries. Previous entries set a very high bar. A new entry must not
|
||||
only compete against other submissions from the current year but they must also
|
||||
excel over similar previous winning entry in some particularly impressive way.</p>
|
||||
<h2 id="final-comments">Final Comments</h2>
|
||||
<p><strong>IMPORTANT NOTE</strong>: See <a
|
||||
href="../contact.html">contact.html</a> for up to date contact details
|
||||
as well as details on how to provide fixes to any of the entries. See
|
||||
also <a href="../faq.html">the IOCCC FAQ</a> for addition information on
|
||||
the IOCCC.</p>
|
||||
<p><strong>IMPORTANT NOTE</strong>: See <a href="../contact.html">contact.html</a> for up to date contact details
|
||||
as well as details on how to provide fixes to any of the entries.
|
||||
See also <a href="../faq.html">the IOCCC FAQ</a> for addition information on the IOCCC.</p>
|
||||
<h1 id="copyright-and-license">Copyright and License</h1>
|
||||
<p>Copyright (c) 2013,2023, Landon Curt Noll and Leonid A. Broukhis. All
|
||||
Rights Reserved. This work is licensed under a <a
|
||||
href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons
|
||||
CC BY-SA 4.0 DEED Attribution-ShareAlike 4.0 International</a> license.
|
||||
If you do use this work in some form, the <a href="../judges.html">IOCCC
|
||||
judges</a> would appreciate (but does not require) if you were to <a
|
||||
href="../contact.html">send us a note about your use</a>.</p>
|
||||
<p>Copyright (c) 2013,2023, Landon Curt Noll and Leonid A. Broukhis. All Rights Reserved.
|
||||
This work is licensed under a <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons CC BY-SA 4.0 DEED Attribution-ShareAlike
|
||||
4.0 International</a> license.
|
||||
If you do use this work in some form, the <a href="../judges.html">IOCCC judges</a> would appreciate
|
||||
(but does not require) if you were to <a href="../contact.html">send us a note about your use</a>.</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-year-index.sh via bin/md2html.sh -->
|
||||
|
||||
<!-- START: this line starts content generated by: bin/output-year-index.sh -->
|
||||
|
||||
<h1
|
||||
id="winning-entries-of-2013---the-22nd-ioccc"><a name=inventory></a><a name=2013></a>Winning
|
||||
Entries of 2013 - The 22nd IOCCC</h1>
|
||||
<p><strong>Download IOCCC</strong> <a
|
||||
href="2013/ioccc.2013.tar.bz2">2013 entry source</a></p>
|
||||
<h1 id="winning-entries-of-2013---the-22nd-ioccc"><a name=inventory></a><a name=2013></a>Winning Entries of 2013 - The 22nd IOCCC</h1>
|
||||
<p><strong>Download IOCCC</strong> <a href="2013/ioccc.2013.tar.bz2">2013 entry source</a></p>
|
||||
<ul>
|
||||
<li><a href="birken/index.html">2013/birken</a> - Best painting
|
||||
tool</li>
|
||||
<li><a href="cable1/index.html">2013/cable1</a> - Most partisan
|
||||
1-liner</li>
|
||||
<li><a href="birken/index.html">2013/birken</a> - Best painting tool</li>
|
||||
<li><a href="cable1/index.html">2013/cable1</a> - Most partisan 1-liner</li>
|
||||
<li><a href="cable2/index.html">2013/cable2</a> - Best of show</li>
|
||||
<li><a href="cable3/index.html">2013/cable3</a> - Largest small system
|
||||
emulator</li>
|
||||
<li><a href="dlowe/index.html">2013/dlowe</a> - Best sparkling
|
||||
utility</li>
|
||||
<li><a href="cable3/index.html">2013/cable3</a> - Largest small system emulator</li>
|
||||
<li><a href="dlowe/index.html">2013/dlowe</a> - Best sparkling utility</li>
|
||||
<li><a href="endoh1/index.html">2013/endoh1</a> - Most lazy SKIer</li>
|
||||
<li><a href="endoh2/index.html">2013/endoh2</a> - Most recyclable</li>
|
||||
<li><a href="endoh3/index.html">2013/endoh3</a> - Most tweetable
|
||||
1-liner</li>
|
||||
<li><a href="endoh3/index.html">2013/endoh3</a> - Most tweetable 1-liner</li>
|
||||
<li><a href="endoh4/index.html">2013/endoh4</a> - Most solid</li>
|
||||
<li><a href="hou/index.html">2013/hou</a> - Best use of 1 Infinite
|
||||
Loop</li>
|
||||
<li><a href="mills/index.html">2013/mills</a> - Most timely
|
||||
rendered</li>
|
||||
<li><a href="hou/index.html">2013/hou</a> - Best use of 1 Infinite Loop</li>
|
||||
<li><a href="mills/index.html">2013/mills</a> - Most timely rendered</li>
|
||||
<li><a href="misaka/index.html">2013/misaka</a> - Most catty</li>
|
||||
<li><a href="morgan1/index.html">2013/morgan1</a> - Smallest large
|
||||
system simulator</li>
|
||||
<li><a href="morgan2/index.html">2013/morgan2</a> - Most playfully
|
||||
versatile</li>
|
||||
<li><a href="robison/index.html">2013/robison</a> - Most poetic use of
|
||||
strings</li>
|
||||
<li><a href="morgan1/index.html">2013/morgan1</a> - Smallest large system simulator</li>
|
||||
<li><a href="morgan2/index.html">2013/morgan2</a> - Most playfully versatile</li>
|
||||
<li><a href="robison/index.html">2013/robison</a> - Most poetic use of strings</li>
|
||||
</ul>
|
||||
<p> <strong>Jump to:</strong> <a href="#">top</a></p>
|
||||
|
||||
|
||||
+72
-105
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Christopher_Mills">Christopher
|
||||
Mills</a><br> Location: <a href="../../location.html#US">US</a> -
|
||||
<em>United States of America</em> (<em>United States</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Christopher_Mills">Christopher Mills</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -144,41 +144,34 @@ Mills</a><br> Location: <a href="../../location.html#US">US</a> -
|
||||
<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.html#2013_mills">2013 mills bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2013_mills">2013 mills bugs</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">./mills</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">./mills</span> <span class="kw">&</span></span></code></pre></div>
|
||||
<p>While that is running, point your favorite browser at: <a
|
||||
href="http://localhost:8224">http://localhost:8224</a>.</p>
|
||||
<p>While that is running, point your favorite browser at:
|
||||
<a href="http://localhost:8224">http://localhost:8224</a>.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Who will be the first to post an image rendered during a
|
||||
leap-second?</p>
|
||||
<p>Who will be the first to post an image rendered during a leap-second?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="the-program">The Program</h3>
|
||||
<p>This program is a handy graphical clock. Simply run the program,
|
||||
click <em>OK</em> to any annoying security dialog that pop up (aren’t
|
||||
those annoying?), then fire up your web browser and type in the
|
||||
following URL: <a href="http://localhost:8224"
|
||||
class="uri">http://localhost:8224</a>.</p>
|
||||
<p>You will soon be presented with a lovely dynamically rendered 3D
|
||||
scene that also conveniently tells you the current time!</p>
|
||||
<p>This program is a handy graphical clock. Simply run the program, click <em>OK</em> to
|
||||
any annoying security dialog that pop up (aren’t those annoying?), then fire
|
||||
up your web browser and type in the following URL: <a href="http://localhost:8224" class="uri">http://localhost:8224</a>.</p>
|
||||
<p>You will soon be presented with a lovely dynamically rendered 3D scene that
|
||||
also conveniently tells you the current time!</p>
|
||||
<h3 id="usage-notes">Usage Notes</h3>
|
||||
<p>The program will continue to give you the time of day as it changes
|
||||
by reloading the page as often as it can render. If you grow tired of
|
||||
watching your life slip by, hit <code>Control-C</code> in the original
|
||||
window. Note that if you want to restart the program again, you should
|
||||
wait a minute or two before doing so. For details as to why this is
|
||||
necessary, feel free to Google <code>"TIME_WAIT"</code>,
|
||||
<code>"SO_REUSEADDR"</code> and <code>"SO_REUSEPORT"</code> (with the
|
||||
quotes). And while you are there, click on an ad. They could use the
|
||||
money.</p>
|
||||
<p>The program will continue to give you the time of day as it changes by
|
||||
reloading the page as often as it can render. If you grow tired of watching
|
||||
your life slip by, hit <code>Control-C</code> in the original window. Note that if you
|
||||
want to restart the program again, you should wait a minute or two before
|
||||
doing so. For details as to why this is necessary, feel free to Google
|
||||
<code>"TIME_WAIT"</code>, <code>"SO_REUSEADDR"</code> and <code>"SO_REUSEPORT"</code> (with the quotes). And
|
||||
while you are there, click on an ad. They could use the money.</p>
|
||||
<p>It would be possible to fix this by adding</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>n<span class="op">=</span><span class="dv">1</span><span class="op">,</span>setsockopt<span class="op">(</span>s<span class="op">,</span>SOL_SOCKET<span class="op">,</span>SO_REUSEADDR<span class="op">,&</span>n<span class="op">,</span><span class="kw">sizeof</span> n<span class="op">),</span></span></code></pre></div>
|
||||
<p>at an appropriate spot in the code (an exercise left to the reader).
|
||||
However, as this limitation is documented, it is not technically a
|
||||
bug.</p>
|
||||
<p>at an appropriate spot in the code (an exercise left to the reader). However,
|
||||
as this limitation is documented, it is not technically a bug.</p>
|
||||
<h3 id="details-of-operation">Details of Operation</h3>
|
||||
<p>The program wears many hats (not literally). It is</p>
|
||||
<ul>
|
||||
@@ -187,104 +180,78 @@ bug.</p>
|
||||
<li>a ray tracer</li>
|
||||
<li>a clock</li>
|
||||
</ul>
|
||||
<p>It replies to web requests with a PNG image that uses the <a
|
||||
href="http://en.wikipedia.org/wiki/Adam7_algorithm">Adam7</a> encoding
|
||||
to return data progressively. Since the data is returned in Adam7
|
||||
format, the scene is displayed initially at a lower resolution and
|
||||
allowed to be progressively refined as time goes on. The ray tracer is
|
||||
integrally tied to the PNG encoder, casting rays in the Adam7 order. The
|
||||
web server uses PNG primarily because of PNG’s ability to return data
|
||||
progressively, and not as you might think it being because the PNG
|
||||
standard is so obfuscated as to require both little and big-endian
|
||||
encodings at different spec layers.</p>
|
||||
<p>Since ray-tracing was an obvious choice to return to a web server, I
|
||||
needed something to ray-trace. A static scene would be uninteresting. I
|
||||
took inspiration (as I often do) from the IOCCC remarks file which
|
||||
says</p>
|
||||
<p>It replies to web requests with a PNG image that uses the
|
||||
<a href="http://en.wikipedia.org/wiki/Adam7_algorithm">Adam7</a> encoding to return data
|
||||
progressively. Since the data is returned in Adam7 format, the scene is
|
||||
displayed initially at a lower resolution and allowed to be progressively
|
||||
refined as time goes on. The ray tracer is integrally tied to the PNG encoder,
|
||||
casting rays in the Adam7 order. The web server uses PNG primarily because of
|
||||
PNG’s ability to return data progressively, and not as you might think it being
|
||||
because the PNG standard is so obfuscated as to require both little and
|
||||
big-endian encodings at different spec layers.</p>
|
||||
<p>Since ray-tracing was an obvious choice to return to a web server, I needed
|
||||
something to ray-trace. A static scene would be uninteresting. I took
|
||||
inspiration (as I often do) from the IOCCC remarks file which says</p>
|
||||
<blockquote>
|
||||
<p>At least one judge prefers to maintain the use of the leap-second as
|
||||
part of the world’s time standard.</p>
|
||||
<p>At least one judge prefers to maintain the use of the leap-second
|
||||
as part of the world’s time standard.</p>
|
||||
</blockquote>
|
||||
<p>Then it was obvious; the code should display the time. It is believed
|
||||
(but not confirmed) that the code will, in fact, display leap seconds
|
||||
correctly.</p>
|
||||
<p>To display the time, of course we would need a font. This font is
|
||||
encoded as a string, using only the C whitespace characters. Clearly,
|
||||
the judges intended this use of whitespace for data compression, since
|
||||
their tool doesn’t count whitespace in strings differently than
|
||||
whitespace outside of them.</p>
|
||||
<p>Then it was obvious; the code should display the time. It is believed (but
|
||||
not confirmed) that the code will, in fact, display leap seconds correctly.</p>
|
||||
<p>To display the time, of course we would need a font. This font is encoded
|
||||
as a string, using only the C whitespace characters. Clearly, the judges
|
||||
intended this use of whitespace for data compression, since their tool
|
||||
doesn’t count whitespace in strings differently than whitespace outside of
|
||||
them.</p>
|
||||
<h3 id="user-modifiable-features">User-modifiable Features</h3>
|
||||
<p>The code can be user-modified simply by changing the build command
|
||||
line. The following symbols are defined in the <a
|
||||
href="Makefile">Makefile</a>:</p>
|
||||
<p>The code can be user-modified simply by changing the build command line.
|
||||
The following symbols are defined in the <a href="Makefile">Makefile</a>:</p>
|
||||
<ul>
|
||||
<li><p><code>-DLT=x1,y1,z1,x2,y2,z2,...</code> defines the coordinates
|
||||
of the lights in the scene. It should be a comma-separated list of
|
||||
coordinates <code>(x, y, z)</code>, three per light.</p></li>
|
||||
<li><p><code>-DNL=n</code> defines the number of lights. It should be
|
||||
equal to the length of the list above (three times the number of
|
||||
lights).</p></li>
|
||||
<li><p><code>-DEY=x,y,z</code> defines the position of the viewer (the
|
||||
eye point) for the scene. The eye is looking at the origin
|
||||
<code>(0, 0, 0)</code>.</p></li>
|
||||
<li><p><code>-DLT=x1,y1,z1,x2,y2,z2,...</code> defines the coordinates of the lights in the
|
||||
scene. It should be a comma-separated list of coordinates <code>(x, y, z)</code>, three per
|
||||
light.</p></li>
|
||||
<li><p><code>-DNL=n</code> defines the number of lights. It should be equal to the length of the
|
||||
list above (three times the number of lights).</p></li>
|
||||
<li><p><code>-DEY=x,y,z</code> defines the position of the viewer (the eye point) for the scene.
|
||||
The eye is looking at the origin <code>(0, 0, 0)</code>.</p></li>
|
||||
</ul>
|
||||
<h3 id="other-build-flags">Other Build Flags</h3>
|
||||
<p>The original program bound the server to <code>INADDR_ANY</code> to
|
||||
allow everyone to experience the server’s output. The Judges suggested
|
||||
that I instead restrict the bind to <code>INADDR_LOOPBACK</code> to
|
||||
reduce security alarms. As a compliant veteran of innumerable post-ship
|
||||
late feature additions, I have modified the <a
|
||||
href="Makefile">Makefile</a> to inject the new code without destroying
|
||||
the beautiful spherical symmetry of the source code. In addition, I have
|
||||
altered the word <code>sin_port</code> to the more family-friendly
|
||||
version <code>win_port</code> (via
|
||||
<code>-Dwin_port="sin_addr.s_addr=htonl(2130706433),R.sin_port"</code>)
|
||||
to protect against curious impressionable youth trying to learn about
|
||||
sockets on the Internet.</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>The original program bound the server to <code>INADDR_ANY</code> to allow everyone to
|
||||
experience the server’s output. The Judges suggested that I instead restrict
|
||||
the bind to <code>INADDR_LOOPBACK</code> to reduce security alarms. As a compliant veteran
|
||||
of innumerable post-ship late feature additions, I have modified the
|
||||
<a href="Makefile">Makefile</a> to inject the new code without destroying the beautiful
|
||||
spherical symmetry of the source code. In addition, I have altered the word
|
||||
<code>sin_port</code> to the more family-friendly version <code>win_port</code> (via
|
||||
<code>-Dwin_port="sin_addr.s_addr=htonl(2130706433),R.sin_port"</code>) to protect against
|
||||
curious impressionable youth trying to learn about sockets on the Internet.</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-2013mills"><a name="inventory"></a>Inventory for
|
||||
2013/mills</h1>
|
||||
<h1 id="inventory-for-2013mills"><a name="inventory"></a>Inventory for 2013/mills</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/2013/mills/mills.c">mills.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/mills/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/mills/mills.orig.c">mills.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="2013_mills.tar.bz2">2013_mills.tar.bz2</a> - download entry
|
||||
source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/mills/mills.c">mills.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/mills/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/mills/mills.orig.c">mills.orig.c</a> - original source</li>
|
||||
<li><a href="2013_mills.tar.bz2">2013_mills.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/2013/mills/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/mills/.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/2013/mills/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/mills/.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/2013/mills/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/mills/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+107
-163
@@ -130,8 +130,8 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Don_Yang">Don Yang</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of
|
||||
America</em> (<em>United States</em>) <br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -141,112 +141,94 @@ America</em> (<em>United States</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>This will build a bunch of versions of the code. See the author’s
|
||||
details for information on all of these builds.</p>
|
||||
<p>This will build a bunch of versions of the code. See the author’s details for
|
||||
information on all of these builds.</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">./horizontal_cat</span> <span class="pp">[</span><span class="ss">files...</span><span class="pp">]</span> <span class="op">></span> <span class="pp">[</span><span class="ss">output</span><span class="pp">]</span></span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./vertical_cat</span> <span class="pp">[</span><span class="ss">files...</span><span class="pp">]</span> <span class="op">></span> <span class="pp">[</span><span class="ss">output</span><span class="pp">]</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>To understand the various intermediate source files that are built,
|
||||
try:</p>
|
||||
<p>To understand the various intermediate source files that are built, try:</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">make</span> understanding</span></code></pre></div>
|
||||
<p>Also 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">./try.sh</span></span></code></pre></div>
|
||||
<p>NOTE: Use - for standard input. For example:</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">./vertical_cat</span> <span class="at">-</span> <span class="at">-</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>There is more to cat than <a
|
||||
href="http://cheezburger.com/1680494336">mere cats</a>. Be they tall,
|
||||
fat, long or squat, this source code is sure to amuse.</p>
|
||||
<p>There is more to cat than <a href="http://cheezburger.com/1680494336">mere cats</a>. Be
|
||||
they tall, fat, long or squat, this source code is sure to amuse.</p>
|
||||
<h4 id="slight-diversion">Slight diversion</h4>
|
||||
<p>While one of the judges was reviewing this entry on the stern of the
|
||||
<a
|
||||
href="http://www.noble-caledonia.co.uk/information/detail.asp?id=2&spid=76">Island
|
||||
Sky</a> in the middle of the Atlantic Ocean waiting for the <a
|
||||
href="http://en.wikipedia.org/wiki/Solar_eclipse_of_November_3,_2013">total
|
||||
solar eclipse of 2013</a> the judge was struck by a <a
|
||||
href="http://en.wikipedia.org/wiki/Flying_fish">flying fish</a>. While
|
||||
the result of the impact was that the <a
|
||||
href="http://en.wikipedia.org/wiki/Port_wine">Port</a> from Portugal was
|
||||
lost, the <a
|
||||
href="https://web.archive.org/web/20130702003043/http://www.travelforpassion.com/grog-factory-cape-verde-santo-antao-cape-verde-1602-photo">Grog</a>
|
||||
<a href="http://www.noble-caledonia.co.uk/information/detail.asp?id=2&spid=76">Island Sky</a>
|
||||
in the middle of the Atlantic Ocean waiting for the
|
||||
<a href="http://en.wikipedia.org/wiki/Solar_eclipse_of_November_3,_2013">total solar eclipse of 2013</a>
|
||||
the judge was struck by a
|
||||
<a href="http://en.wikipedia.org/wiki/Flying_fish">flying fish</a>.
|
||||
While the result of the impact was that the
|
||||
<a href="http://en.wikipedia.org/wiki/Port_wine">Port</a> from Portugal was lost, the
|
||||
<a href="https://web.archive.org/web/20130702003043/http://www.travelforpassion.com/grog-factory-cape-verde-santo-antao-cape-verde-1602-photo">Grog</a>
|
||||
from Cape Verde and the laptop containing this entry was saved.</p>
|
||||
<p>While I’m sure most <a
|
||||
href="https://rationalwiki.org/wiki/Fun:Cat">cats</a> would have
|
||||
preferred otherwise, the flying fish was returned to <em>swim with the
|
||||
fishes</em>. :-) No <a
|
||||
href="https://rationalwiki.org/wiki/Fun:Cat">cats</a> were harmed in the
|
||||
process of judging this entry.</p>
|
||||
<p>While I’m sure most <a href="https://rationalwiki.org/wiki/Fun:Cat">cats</a> would have
|
||||
preferred otherwise, the flying fish was returned to <em>swim with the fishes</em>. :-)
|
||||
No <a href="https://rationalwiki.org/wiki/Fun:Cat">cats</a> were harmed in the process of
|
||||
judging this entry.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="overview">Overview</h3>
|
||||
<p><code>Misaka</code> is a file concatenation utility, with at least
|
||||
two modes of operation:</p>
|
||||
<p><code>Misaka</code> is a file concatenation utility, with at least two modes of
|
||||
operation:</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">cc</span> misaka.c <span class="at">-o</span> horizontal_cat</span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./horizontal_cat</span> <span class="pp">[</span><span class="ss">files...</span><span class="pp">]</span> <span class="op">></span> <span class="pp">[</span><span class="ss">output</span><span class="pp">]</span></span>
|
||||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./horizontal_cat</span> misaka.c misaka.c <span class="op">></span> misaka2.c</span>
|
||||
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> misaka2.c <span class="at">-o</span> vertical_cat</span>
|
||||
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a><span class="ex">./vertical_cat</span> <span class="pp">[</span><span class="ss">files...</span><span class="pp">]</span> <span class="op">></span> <span class="pp">[</span><span class="ss">output</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>Where <code>[files...]</code> is a list of text file names. Use
|
||||
<code>-</code> to read from <code>stdin</code>.</p>
|
||||
<p>Where <code>[files...]</code> is a list of text file names. Use <code>-</code> to read from <code>stdin</code>.</p>
|
||||
<h3 id="details">Details</h3>
|
||||
<h3 id="horizontal-cat">Horizontal cat</h3>
|
||||
<p>One of my favorite unix utilities is <code>cat</code>. The best thing
|
||||
about it was that it was named “<a
|
||||
href="https://rationalwiki.org/wiki/Fun:Cat">cat</a>”. That, and it’s
|
||||
useful for quickly showing contents of a file. Though it was primary
|
||||
meant for concatenating files, that function only seem to work if I
|
||||
wanted to concatenate files vertically.</p>
|
||||
<p>I thought the lack of horizontal concatenation must have been an
|
||||
oversight, so I implemented this utility:</p>
|
||||
<p>One of my favorite unix utilities is <code>cat</code>. The best thing about it was that it
|
||||
was named “<a href="https://rationalwiki.org/wiki/Fun:Cat">cat</a>”. That, and it’s useful
|
||||
for quickly showing contents of a file. Though it was primary meant for
|
||||
concatenating files, that function only seem to work if I wanted to concatenate
|
||||
files vertically.</p>
|
||||
<p>I thought the lack of horizontal concatenation must have been an oversight,
|
||||
so I implemented this utility:</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">cc</span> misaka.c <span class="at">-o</span> horizontal_cat</span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./horizontal_cat</span> files...</span></code></pre></div>
|
||||
<p><code>horizontal_cat</code> concatenates files horizontally and write
|
||||
the output to <code>stdout</code>. Each input file is padded with spaces
|
||||
on the right so that the original text alignments are preserved.</p>
|
||||
<p>If <code>-</code> is specified as a file name,
|
||||
<code>horizontal_cat</code> will read from <code>stdin</code>. Unlike
|
||||
<code>cat</code>, <code>horizontal_cat</code> loads all input to memory
|
||||
first. Thus you can specify <code>-</code> multiple times to get
|
||||
<code>stdin</code> multiplied horizontally. For example, if you have
|
||||
<code>seq(1)</code> in your shell, you can add line numbers to both
|
||||
<p><code>horizontal_cat</code> concatenates files horizontally and write the output to
|
||||
<code>stdout</code>. Each input file is padded with spaces on the right so that the
|
||||
original text alignments are preserved.</p>
|
||||
<p>If <code>-</code> is specified as a file name, <code>horizontal_cat</code> will read from <code>stdin</code>.
|
||||
Unlike <code>cat</code>, <code>horizontal_cat</code> loads all input to memory first. Thus you
|
||||
can specify <code>-</code> multiple times to get <code>stdin</code> multiplied horizontally. For
|
||||
example, if you have <code>seq(1)</code> in your shell, you can add line numbers to both
|
||||
sides of <a href="misaka.c">misaka.c</a> like this:</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">seq</span> <span class="at">-f</span> <span class="st">' %.0f '</span> 45 <span class="kw">|</span> <span class="ex">./horizontal_cat</span> <span class="at">-</span> misaka.c <span class="at">-</span></span></code></pre></div>
|
||||
<h3 id="vertical-cat">Vertical cat</h3>
|
||||
<p>Because <code>horizontal_cat</code> must know the maximum width of
|
||||
all files before writing any output, all files must be processed at
|
||||
least twice. To support <code>stdin</code>, file must be buffered to
|
||||
memory. This lead to the feature that <code>horizontal_cat</code> can be
|
||||
used to duplicate <code>stdin</code>.</p>
|
||||
<p>Seems like the <code>stdin</code> doubling feature might be useful
|
||||
even for concatenating files vertically, so I included a vertical mode.
|
||||
But supporting vertical mode with command line options would be no fun.
|
||||
Instead, vertical mode is enabled by concatenating the source code
|
||||
horizontally:</p>
|
||||
<p>Because <code>horizontal_cat</code> must know the maximum width of all files before
|
||||
writing any output, all files must be processed at least twice. To support
|
||||
<code>stdin</code>, file must be buffered to memory. This lead to the feature that
|
||||
<code>horizontal_cat</code> can be used to duplicate <code>stdin</code>.</p>
|
||||
<p>Seems like the <code>stdin</code> doubling feature might be useful even for concatenating
|
||||
files vertically, so I included a vertical mode. But supporting vertical
|
||||
mode with command line options would be no fun. Instead, vertical mode is
|
||||
enabled by concatenating the source code horizontally:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./horizontal_cat</span> misaka.c misaka.c <span class="op">></span> misaka2.c</span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> misaka2.c <span class="at">-o</span> vertical_cat</span>
|
||||
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./vertical_cat</span> files...</span></code></pre></div>
|
||||
<p><code>vertical_cat</code> works more or less like <code>cat</code>,
|
||||
except you can use <code>vertical_cat</code> to duplicate
|
||||
<code>stdin</code>:</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="ex">./vertical_cat</span> <span class="at">-</span> <span class="at">-</span></span></code></pre></div>
|
||||
<p><code>vertical_cat</code> works more or less like <code>cat</code>, except you can use
|
||||
<code>vertical_cat</code> to duplicate <code>stdin</code>:</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="ex">./vertical_cat</span> <span class="at">-</span> <span class="at">-</span></span></code></pre></div>
|
||||
<h3 id="long-cat">Long cat</h3>
|
||||
<p>After <code>horizontal_cat</code> and <code>vertical_cat</code>, I
|
||||
thought, maybe all I really wanted was just more <a
|
||||
href="https://rationalwiki.org/wiki/Fun:Cat">cats</a>. So I implemented
|
||||
one more mode, this one is enabled by concatenating <a
|
||||
href="misaka.c">misaka.c</a> vertically:</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="ex">./vertical_cat</span> misaka.c misaka.c <span class="op">></span> misaka3.c</span>
|
||||
<p>After <code>horizontal_cat</code> and <code>vertical_cat</code>, I thought, maybe all I really wanted
|
||||
was just more <a href="https://rationalwiki.org/wiki/Fun:Cat">cats</a>. So I implemented
|
||||
one more mode, this one is enabled by concatenating <a href="misaka.c">misaka.c</a>
|
||||
vertically:</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="ex">./vertical_cat</span> misaka.c misaka.c <span class="op">></span> misaka3.c</span>
|
||||
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> misaka3.c <span class="at">-o</span> long_cat</span>
|
||||
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./long_cat</span></span></code></pre></div>
|
||||
<p><code>long_cat</code> outputs ASCII art of a cat to
|
||||
<code>stdout</code>. You can make this cat exponentially longer by
|
||||
concatenating more files vertically (up to 31 levels high, depending on
|
||||
<code>sizeof(int)</code> for your compiler):</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">./vertical_cat</span> misaka.c misaka.c misaka.c <span class="op">></span> misaka4.c</span>
|
||||
<p><code>long_cat</code> outputs ASCII art of a cat to <code>stdout</code>. You can make this cat
|
||||
exponentially longer by concatenating more files vertically (up to 31 levels
|
||||
high, depending on <code>sizeof(int)</code> for your compiler):</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">./vertical_cat</span> misaka.c misaka.c misaka.c <span class="op">></span> misaka4.c</span>
|
||||
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> misaka4.c <span class="at">-o</span> loong_cat</span>
|
||||
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./vertical_cat</span> misaka.c misaka.c misaka.c misaka.c <span class="op">></span> misaka5.c</span>
|
||||
@@ -254,67 +236,55 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#
|
||||
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a><span class="ex">./vertical_cat</span> misaka.c misaka.c misaka.c misaka.c misaka.c <span class="op">></span> misaka6.c</span>
|
||||
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> misaka6.c <span class="at">-o</span> loooooooong_cat</span></code></pre></div>
|
||||
<p>If your terminal has really thin fonts, you can also make this output
|
||||
fatter by concatenating files horizontally:</p>
|
||||
<div class="sourceCode" id="cb13"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./vertical_cat</span> misaka.c misaka.c <span class="kw">|</span> <span class="ex">./horizontal_cat</span> <span class="at">-</span> <span class="at">-</span> <span class="op">></span> misaka7.c</span>
|
||||
<p>If your terminal has really thin fonts, you can also make this output fatter
|
||||
by concatenating files horizontally:</p>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./vertical_cat</span> misaka.c misaka.c <span class="kw">|</span> <span class="ex">./horizontal_cat</span> <span class="at">-</span> <span class="at">-</span> <span class="op">></span> misaka7.c</span>
|
||||
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> misaka7.c <span class="at">-o</span> long_fat_cat</span>
|
||||
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb13-4"><a href="#cb13-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./vertical_cat</span> misaka.c misaka.c <span class="kw">|</span> <span class="ex">./horizontal_cat</span> <span class="at">-</span> <span class="at">-</span> <span class="at">-</span> <span class="op">></span> misaka8.c</span>
|
||||
<span id="cb13-5"><a href="#cb13-5" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> misaka8.c <span class="at">-o</span> long_faat_cat</span></code></pre></div>
|
||||
<p>Output width is determined by the first level of stacked programs, so
|
||||
a triangle like the following will not have horizontally expanded
|
||||
output:</p>
|
||||
<div class="sourceCode" id="cb14"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./horizontal_cat</span> misaka.c misaka.c <span class="kw">|</span> <span class="ex">./vertical_cat</span> misaka.c <span class="at">-</span> <span class="op">></span> misaka9.c</span>
|
||||
<p>Output width is determined by the first level of stacked programs, so a
|
||||
triangle like the following will not have horizontally expanded output:</p>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./horizontal_cat</span> misaka.c misaka.c <span class="kw">|</span> <span class="ex">./vertical_cat</span> misaka.c <span class="at">-</span> <span class="op">></span> misaka9.c</span>
|
||||
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> misaka9.c <span class="at">-o</span> same_as_long_cat</span></code></pre></div>
|
||||
<p>Finally, if you lost track of how many <a
|
||||
href="misaka.c">misaka.c</a> you have stacked together, you can feed the
|
||||
source to a <a
|
||||
href="https://en.wikipedia.org/wiki/Brainfuck">brainfuck</a> interpreter
|
||||
to get an overview of how the programs are stacked. Example:</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">perl</span> bf.pl misaka9.c</span></code></pre></div>
|
||||
<p>Finally, if you lost track of how many <a href="misaka.c">misaka.c</a> you have stacked
|
||||
together, you can feed the source to a
|
||||
<a href="https://en.wikipedia.org/wiki/Brainfuck">brainfuck</a> interpreter to get an
|
||||
overview of how the programs are stacked. Example:</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">perl</span> bf.pl misaka9.c</span></code></pre></div>
|
||||
<p>This outputs:</p>
|
||||
<pre><code>MISAKA
|
||||
MISAKA MISAKA</code></pre>
|
||||
<h3 id="return-value">Return value</h3>
|
||||
<p><code>horizontal_cat</code> and <code>vertical_cat</code> will exit
|
||||
with zero status on success.</p>
|
||||
<p>If any input file fails to open, <code>horizontal_cat</code> and
|
||||
<code>vertical_cat</code> will report the offending file name to
|
||||
<code>stdout</code>, and exit with nonzero status.</p>
|
||||
<p>If <code>horizontal_cat</code> and <code>vertical_cat</code> ran out
|
||||
of memory, they will exit with nonzero status without outputting
|
||||
anything.</p>
|
||||
<p><code>horizontal_cat</code> and <code>vertical_cat</code> will exit with zero status on success.</p>
|
||||
<p>If any input file fails to open, <code>horizontal_cat</code> and <code>vertical_cat</code> will
|
||||
report the offending file name to <code>stdout</code>, and exit with nonzero status.</p>
|
||||
<p>If <code>horizontal_cat</code> and <code>vertical_cat</code> ran out of memory, they will exit
|
||||
with nonzero status without outputting anything.</p>
|
||||
<h3 id="compatibility">Compatibility</h3>
|
||||
<p><code>horizontal_cat</code> makes the following assumptions about
|
||||
input files:</p>
|
||||
<p><code>horizontal_cat</code> makes the following assumptions about input files:</p>
|
||||
<ul>
|
||||
<li>ASCII with LF end of line sequences. If CR-LF sequences are used, CR
|
||||
characters will appear in the middle of output lines.</li>
|
||||
<li>All characters are of equal width, even tab characters.</li>
|
||||
</ul>
|
||||
<p><code>Misaka</code> has been verified to work on these following
|
||||
compiler+OS combinations:</p>
|
||||
<p><code>Misaka</code> has been verified to work on these following compiler+OS combinations:</p>
|
||||
<ul>
|
||||
<li>gcc 4.6.3 on Linux 3.5.0-41</li>
|
||||
<li>gcc 4.4.5 on Linux 2.6.32-5</li>
|
||||
<li>gcc 4.3.5 on JS/Linux 2.6.20</li>
|
||||
<li>gcc 4.8.1 on Windows (Cygwin and MingW)</li>
|
||||
</ul>
|
||||
<p><code>Misaka</code> requires a C99 compiler due to the use of single
|
||||
line comments. <code>Misaka</code> does not depend on any other C99
|
||||
features.</p>
|
||||
<p><code>Misaka</code> requires a C99 compiler due to the use of single line comments.
|
||||
<code>Misaka</code> does not depend on any other C99 features.</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>Main obfuscation is in having a C program that compiles when tiled
|
||||
horizontally and vertically, while using single line comments in less
|
||||
than half of the lines <em>and</em> maintaining a meaningful layout
|
||||
while doing that.</p>
|
||||
<p>There are other challenges too, of course, like getting a Brainfuck
|
||||
program to tile horizontally and vertically. Really, tiling code of any
|
||||
sort horizontally is an interesting exercise, I encourage everyone to
|
||||
try this once.</p>
|
||||
horizontally and vertically, while using single line comments in less than
|
||||
half of the lines <em>and</em> maintaining a meaningful layout while doing that.</p>
|
||||
<p>There are other challenges too, of course, like getting a Brainfuck program
|
||||
to tile horizontally and vertically. Really, tiling code of any sort
|
||||
horizontally is an interesting exercise, I encourage everyone to try this
|
||||
once.</p>
|
||||
<p>Other features to look for:</p>
|
||||
<ul>
|
||||
<li>Peculiar bits that switches horizontal cat to vertical cat.</li>
|
||||
@@ -322,79 +292,53 @@ try this once.</p>
|
||||
<li>Symmetric and recycled variable names.</li>
|
||||
<li>CRC of the source code in the source code.</li>
|
||||
</ul>
|
||||
<p><code>gcc -Wall</code> should provide a hint to where the mode switch
|
||||
happens, it does not output any irrelevant other warnings (verified on
|
||||
4.6.3).</p>
|
||||
<p><code>gcc -Wall</code> should provide a hint to where the mode switch happens, it
|
||||
does not output any irrelevant other warnings (verified on 4.6.3).</p>
|
||||
<h3 id="extra-files">Extra files</h3>
|
||||
<p>Extra files included in my submission are informational only, they
|
||||
are not needed for the program to work.</p>
|
||||
<p>Extra files included in my submission are informational only, they are not
|
||||
needed for the program to work.</p>
|
||||
<ul>
|
||||
<li><a href="bf.pl">bf.pl</a> - a perl brainfuck interpreter, in case
|
||||
you don’t have one handy.</li>
|
||||
<li><a href="spoiler.html">spoiler.html</a> - making of this
|
||||
program.</li>
|
||||
<li><a href="bf.pl">bf.pl</a> - a perl brainfuck interpreter, in case you don’t have one
|
||||
handy.</li>
|
||||
<li><a href="spoiler.html">spoiler.html</a> - making of this program.</li>
|
||||
</ul>
|
||||
<h3 id="about-misaka">About <code>Misaka</code></h3>
|
||||
<p>The name, layout, and functionality of <code>Misaka</code> is
|
||||
inspired by a particular stackable figure:</p>
|
||||
<p>The name, layout, and functionality of <code>Misaka</code> is inspired by a particular
|
||||
stackable figure:</p>
|
||||
<ul>
|
||||
<li><a
|
||||
href="http://google.co.jp/search?q=%E3%83%9F%E3%82%B5%E3%82%AB%E7%9B%9B%E3%82%8A&tbm=isch">Google
|
||||
images</a></li>
|
||||
<li><a
|
||||
href="https://web.archive.org/web/20140325175014/http://main.kotobukiya.co.jp/figure/tsubucole_tmi_misakamori/">Kotobukiya</a></li>
|
||||
<li><a href="http://google.co.jp/search?q=%E3%83%9F%E3%82%B5%E3%82%AB%E7%9B%9B%E3%82%8A&tbm=isch">Google images</a></li>
|
||||
<li><a href="https://web.archive.org/web/20140325175014/http://main.kotobukiya.co.jp/figure/tsubucole_tmi_misakamori/">Kotobukiya</a></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>
|
||||
<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-2013misaka"><a name="inventory"></a>Inventory for
|
||||
2013/misaka</h1>
|
||||
<h1 id="inventory-for-2013misaka"><a name="inventory"></a>Inventory for 2013/misaka</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/2013/misaka/misaka.c">misaka.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/misaka.orig.c">misaka.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/bf.pl">bf.pl</a>
|
||||
- BF interpreter</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/misaka.c">misaka.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/misaka.orig.c">misaka.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/bf.pl">bf.pl</a> - BF interpreter</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="spoiler.html">spoiler.html</a> - SPOILER WARNING</li>
|
||||
<li><a href="2013_misaka.tar.bz2">2013_misaka.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="2013_misaka.tar.bz2">2013_misaka.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/2013/misaka/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/.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/2013/misaka/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/.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/2013/misaka/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+56
-87
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Yves-Marie_Morgan">Yves-Marie
|
||||
Morgan</a><br> Location: <a href="../../location.html#FR">FR</a> -
|
||||
<em>French Republic</em> (<em>France</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Yves-Marie_Morgan">Yves-Marie Morgan</a><br>
|
||||
Location: <a href="../../location.html#FR">FR</a> - <em>French Republic</em> (<em>France</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -143,9 +143,9 @@ Morgan</a><br> Location: <a href="../../location.html#FR">FR</a> -
|
||||
<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">echo</span> <span class="st">"YYYY/MM/DD"</span> <span class="kw">|</span> <span class="ex">./morgan1</span></span></code></pre></div>
|
||||
<p>where <code>YYYY</code> is the four digit year, <code>MM</code> is
|
||||
the two digit month and <code>DD</code> is two digit day of the month.
|
||||
The arrow keys control the shifting of the date as follows:</p>
|
||||
<p>where <code>YYYY</code> is the four digit year, <code>MM</code> is the two digit month and <code>DD</code> is two
|
||||
digit day of the month. The arrow keys control the shifting of the date as
|
||||
follows:</p>
|
||||
<ul>
|
||||
<li>Right : go forwards one day.</li>
|
||||
<li>Left : go backwards one day.</li>
|
||||
@@ -154,73 +154,65 @@ The arrow keys control the shifting of the date as follows:</p>
|
||||
</ul>
|
||||
<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>Use the same keys as described above to change the dates each time
|
||||
the program window is in focus.</p>
|
||||
<p>Use the same keys as described above to change the dates each time the program
|
||||
window is in focus.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>To verify the output, try echoing the date of an evening with a clear
|
||||
sky. Use binoculars and/or telescope as needed. In some cases you may
|
||||
need to wait for a better time of the evening. In a few cases, such as
|
||||
<p>To verify the output, try echoing the date of an evening with a clear sky.
|
||||
Use binoculars and/or telescope as needed. In some cases you may need
|
||||
to wait for a better time of the evening. In a few cases, such as
|
||||
the South Pole in the summer, you may need to move to a different
|
||||
observing site.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="instructions">Instructions</h3>
|
||||
<p>It displays the position of the 8 planets of the solar system around
|
||||
the Sun. The date given in the command line is in the format YYYY/MM/DD
|
||||
(year, month and day). The direction keys can be used to move in time
|
||||
:</p>
|
||||
<p>It displays the position of the 8 planets of the solar system around the Sun.
|
||||
The date given in the command line is in the format YYYY/MM/DD (year, month and
|
||||
day). The direction keys can be used to move in time :</p>
|
||||
<ul>
|
||||
<li>Left : go back 1 day.</li>
|
||||
<li>Right : go forward 1 day.</li>
|
||||
<li>Down : go back 20 days.</li>
|
||||
<li>Up : go forward 20 days.</li>
|
||||
</ul>
|
||||
<p>It handles correctly all leap years and the switch between <a
|
||||
href="https://en.wikipedia.org/wiki/Julian_calendar">Julian calendar</a>
|
||||
and <a href="https://en.wikipedia.org/wiki/Gregorian_calendar">Gregorian
|
||||
calendar</a> (10 days missing between 1582/10/04 and 1582/10/15).</p>
|
||||
<p>The scale is logarithmic to be able to display the <a
|
||||
href="http://news.bbc.co.uk/2/hi/5282440.stm">8 planets</a> without
|
||||
having <a href="https://science.nasa.gov/mercury">Mercury</a>, <a
|
||||
href="https://science.nasa.gov/venus/">Venus</a>, <a
|
||||
href="https://science.nasa.gov/earth/facts">Earth</a> and <a
|
||||
href="https://science.nasa.gov/mars">Mars</a> squeezed around the <a
|
||||
href="https://science.nasa.gov/sun/">Sun</a>.</p>
|
||||
<p>It handles correctly all leap years and the switch between <a href="https://en.wikipedia.org/wiki/Julian_calendar">Julian
|
||||
calendar</a> and
|
||||
<a href="https://en.wikipedia.org/wiki/Gregorian_calendar">Gregorian calendar</a> (10 days
|
||||
missing between 1582/10/04 and 1582/10/15).</p>
|
||||
<p>The scale is logarithmic to be able to display the <a href="http://news.bbc.co.uk/2/hi/5282440.stm">8
|
||||
planets</a> without having
|
||||
<a href="https://science.nasa.gov/mercury">Mercury</a>,
|
||||
<a href="https://science.nasa.gov/venus/">Venus</a>,
|
||||
<a href="https://science.nasa.gov/earth/facts">Earth</a> and
|
||||
<a href="https://science.nasa.gov/mars">Mars</a> squeezed around the
|
||||
<a href="https://science.nasa.gov/sun/">Sun</a>.</p>
|
||||
<p>The size is not proportional either.</p>
|
||||
<h3 id="bonus">Bonus</h3>
|
||||
<p>It also displays the position of 2 famous comets during their last
|
||||
approach:</p>
|
||||
<p>It also displays the position of 2 famous comets during their last approach:</p>
|
||||
<ul>
|
||||
<li>The <a
|
||||
href="https://science.nasa.gov/solar-system/comets/1p-halley/">first
|
||||
one</a> around the <a href="../../years.html#1986">third IOCCC</a>.</li>
|
||||
<li>The <a
|
||||
href="https://science.nasa.gov/solar-system/comets/c-1995-o1-hale-bopp/">second
|
||||
one</a> between the <a href="../../years.html#1996">thirteenth</a> and
|
||||
<a href="../../years.html#1998">fourteenth</a> IOCCC.</li>
|
||||
<li>The <a href="https://science.nasa.gov/solar-system/comets/1p-halley/">first one</a>
|
||||
around the <a href="../../years.html#1986">third IOCCC</a>.</li>
|
||||
<li>The <a href="https://science.nasa.gov/solar-system/comets/c-1995-o1-hale-bopp/">second
|
||||
one</a> between
|
||||
the <a href="../../years.html#1996">thirteenth</a> and <a href="../../years.html#1998">fourteenth</a> IOCCC.</li>
|
||||
</ul>
|
||||
<h3 id="limitations">Limitations</h3>
|
||||
<ul>
|
||||
<li>ASCII character set is assumed.</li>
|
||||
<li>A C99 compiler is required (for some <code>math.h</code>
|
||||
functions).</li>
|
||||
<li>A C99 compiler is required (for some <code>math.h</code> functions).</li>
|
||||
<li>The position should be correct for years between (-1000; +3000)</li>
|
||||
<li>The approximations done in the formula are OK for displaying the
|
||||
position around the <a href="https://science.nasa.gov/sun/">Sun</a> but
|
||||
not for other applications like <a
|
||||
href="https://en.wikipedia.org/wiki/Ephemeris">ephemeride</a> or sky
|
||||
view from <a href="https://science.nasa.gov/earth/facts">Earth</a>
|
||||
(angles may be off by 1 or 2 degrees sometimes).</li>
|
||||
<li>The approximations done in the formula are OK for displaying the position
|
||||
around the <a href="https://science.nasa.gov/sun/">Sun</a> but not for other applications
|
||||
like <a href="https://en.wikipedia.org/wiki/Ephemeris">ephemeride</a> or sky view from
|
||||
<a href="https://science.nasa.gov/earth/facts">Earth</a> (angles may be off by 1 or 2
|
||||
degrees sometimes).</li>
|
||||
</ul>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<ul>
|
||||
<li>Reuse of 1 letter variables.</li>
|
||||
<li>Only the <code>main()</code> function with some <code>for</code>
|
||||
loops.</li>
|
||||
<li>Only the <code>main()</code> function with some <code>for</code> loops.</li>
|
||||
<li>Constants for orbital elements encoded in a string.</li>
|
||||
<li>Hexadecimal and decimal values used inconsistently.</li>
|
||||
<li>Comparisons order are not consistent.</li>
|
||||
<li>A lot of stuff is done in the different parts of the
|
||||
<code>for</code> loop.</li>
|
||||
<li>A lot of stuff is done in the different parts of the <code>for</code> loop.</li>
|
||||
</ul>
|
||||
<h3 id="compilation-warnings">Compilation warnings</h3>
|
||||
<p>With gcc 4.7.2 on Linux Ubuntu 12.10:</p>
|
||||
@@ -236,61 +228,38 @@ morgan1.c:55:13: warning: '&&' within '||' [-Wlogical-op
|
||||
morgan1.c:56:14: warning: '&&' within '||' [-Wlogical-op-parentheses]</code></pre>
|
||||
<p>This is due to most of the parentheses and braces being removed when
|
||||
unnecessary.</p>
|
||||
<p>To verify the display, you can look at one of these programs : *
|
||||
xephem : <a
|
||||
href="https://web.archive.org/web/20130310133219/http://www.clearskyinstitute.com/xephem/"
|
||||
class="uri">https://web.archive.org/web/20130310133219/http://www.clearskyinstitute.com/xephem/</a>
|
||||
* homeplanet : <a href="https://www.fourmilab.ch/homeplanet/"
|
||||
class="uri">https://www.fourmilab.ch/homeplanet/</a> * <a
|
||||
href="https://www.theplanetstoday.com"
|
||||
class="uri">https://www.theplanetstoday.com</a></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>To verify the display, you can look at one of these programs :
|
||||
* xephem : <a href="https://web.archive.org/web/20130310133219/http://www.clearskyinstitute.com/xephem/" class="uri">https://web.archive.org/web/20130310133219/http://www.clearskyinstitute.com/xephem/</a>
|
||||
* homeplanet : <a href="https://www.fourmilab.ch/homeplanet/" class="uri">https://www.fourmilab.ch/homeplanet/</a>
|
||||
* <a href="https://www.theplanetstoday.com" class="uri">https://www.theplanetstoday.com</a></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-2013morgan1"><a name="inventory"></a>Inventory for
|
||||
2013/morgan1</h1>
|
||||
<h1 id="inventory-for-2013morgan1"><a name="inventory"></a>Inventory for 2013/morgan1</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/2013/morgan1/morgan1.c">morgan1.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/morgan1.orig.c">morgan1.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="2013_morgan1.tar.bz2">2013_morgan1.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/morgan1.c">morgan1.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/morgan1.orig.c">morgan1.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2013_morgan1.tar.bz2">2013_morgan1.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/2013/morgan1/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/.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/2013/morgan1/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/.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/2013/morgan1/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+60
-88
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Yves-Marie_Morgan">Yves-Marie
|
||||
Morgan</a><br> Location: <a href="../../location.html#FR">FR</a> -
|
||||
<em>French Republic</em> (<em>France</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Yves-Marie_Morgan">Yves-Marie Morgan</a><br>
|
||||
Location: <a href="../../location.html#FR">FR</a> - <em>French Republic</em> (<em>France</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -147,93 +147,82 @@ Morgan</a><br> Location: <a href="../../location.html#FR">FR</a> -
|
||||
<p>For the graphical version (X11):</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="ex">./morgan2</span> X</span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The judges enjoyed playing the game almost to completion; if we
|
||||
remember correctly, we managed to place 59 or 60 dominoes. We wonder,
|
||||
what would be faster: to play the game to completion or to write an
|
||||
unobfuscated version of it?</p>
|
||||
<p>The judges enjoyed playing the game almost to completion; if we remember
|
||||
correctly, we managed to place 59 or 60 dominoes. We wonder, what would be
|
||||
faster: to play the game to completion or to write an unobfuscated version of
|
||||
it?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program is a domino game. The goal is to place dominoes on the
|
||||
8x8 grid. Each domino is made of 6 squares of the colour red or green.
|
||||
To place a domino, at least one of its side shall match the other side
|
||||
of another domino.</p>
|
||||
<p>This program is a domino game. The goal is to place dominoes on the 8x8 grid.
|
||||
Each domino is made of 6 squares of the colour red or green. To place a domino,
|
||||
at least one of its side shall match the other side of another domino.</p>
|
||||
<h3 id="how-to-play">How to play</h3>
|
||||
<h3 id="start-of-the-game">Start of the game</h3>
|
||||
<p>At the start of the game, the first domino is placed randomly on the
|
||||
grid. You get another domino to place by selecting one empty position in
|
||||
the stack on the right. You can have up to 8 dominoes pending at any
|
||||
time.</p>
|
||||
<p>At the start of the game, the first domino is placed randomly on the grid. You
|
||||
get another domino to place by selecting one empty position in the stack on the
|
||||
right. You can have up to 8 dominoes pending at any time.</p>
|
||||
<h3 id="moving-in-the-stack">Moving in the stack</h3>
|
||||
<p>Use <code>Up</code> and <code>Down</code> key to move the cursor in
|
||||
the stack. Press <code>Enter</code> to either:</p>
|
||||
<p>Use <code>Up</code> and <code>Down</code> key to move the cursor in the stack. Press <code>Enter</code> to
|
||||
either:</p>
|
||||
<ul>
|
||||
<li>Reveal a new domino if the position was empty.</li>
|
||||
<li>Select the domino to try to place it if the position was not
|
||||
empty.</li>
|
||||
<li>Select the domino to try to place it if the position was not empty.</li>
|
||||
</ul>
|
||||
<p>The currently selected domino is indicated on the top right.</p>
|
||||
<h3 id="placing-a-domino">Placing a domino</h3>
|
||||
<p>Once a domino has been selected, the cursor moves to the grid. Use
|
||||
<code>Up</code>, <code>Down</code>, <code>Left</code> and
|
||||
<code>Right</code> keys to move in the grid. Press <code>Enter</code> on
|
||||
an empty position to place the domino.</p>
|
||||
<p>To go back to selection mode, press <code>Enter</code> on an occupied
|
||||
position.</p>
|
||||
<p>The domino can be placed in an empty position if all its neighbours
|
||||
have matching sides and the domino has at least one neighbour.</p>
|
||||
<p>Once a domino has been selected, the cursor moves to the grid. Use <code>Up</code>, <code>Down</code>,
|
||||
<code>Left</code> and <code>Right</code> keys to move in the grid. Press <code>Enter</code> on an empty position
|
||||
to place the domino.</p>
|
||||
<p>To go back to selection mode, press <code>Enter</code> on an occupied position.</p>
|
||||
<p>The domino can be placed in an empty position if all its neighbours have
|
||||
matching sides and the domino has at least one neighbour.</p>
|
||||
<h3 id="scoring">Scoring</h3>
|
||||
<p>First, depending on the number of dominoes pending in the stack, a
|
||||
bonus is accorded:</p>
|
||||
<p>First, depending on the number of dominoes pending in the stack, a bonus is
|
||||
accorded:</p>
|
||||
<ul>
|
||||
<li>1 domino in the stack: 8 points.</li>
|
||||
<li>2 dominoes in the stack: 4 points.</li>
|
||||
<li>3 or 4 dominoes in the stack: 2 points.</li>
|
||||
<li>5 or more dominoes in the stack: 0 points.</li>
|
||||
</ul>
|
||||
<p>Then the bonus is multiplied by the number of matching neighbours the
|
||||
placed domino has (1, 2, 3 or 4). This is added to the score.</p>
|
||||
<p>Finally, the total score is divided by the number of dominoes placed
|
||||
(1 - 64).</p>
|
||||
<p>The 3 numbers on display represent: the total score, the fill count
|
||||
and the final score (total score divided by fill count).</p>
|
||||
<p>Then the bonus is multiplied by the number of matching neighbours the placed domino
|
||||
has (1, 2, 3 or 4). This is added to the score.</p>
|
||||
<p>Finally, the total score is divided by the number of dominoes placed (1 - 64).</p>
|
||||
<p>The 3 numbers on display represent: the total score, the fill count and the
|
||||
final score (total score divided by fill count).</p>
|
||||
<h3 id="end-of-the-game">End of the game</h3>
|
||||
<p>The game is finished when no more dominoes can be placed and if one
|
||||
of the following occurs:</p>
|
||||
<p>The game is finished when no more dominoes can be placed and if one of the
|
||||
following occurs:</p>
|
||||
<ul>
|
||||
<li>You have completely filled the grid.</li>
|
||||
<li>You have 8 pending dominoes in the stack.</li>
|
||||
<li>No more dominoes can be revealed in the stack (more than 56 dominoes
|
||||
placed on the grid).</li>
|
||||
<li>No more dominoes can be revealed in the stack (more than 56 dominoes placed on
|
||||
the grid).</li>
|
||||
</ul>
|
||||
<p><strong>Note</strong>: There is no real end of game detection
|
||||
implemented in the program, simply press <code>q</code> when you have
|
||||
finished…</p>
|
||||
<p><strong>Note</strong>: There is no real end of game detection implemented in the program,
|
||||
simply press <code>q</code> when you have finished…</p>
|
||||
<h3 id="strategy">Strategy</h3>
|
||||
<ul>
|
||||
<li>Try to minimize the number of dominoes revealed in the stack. The
|
||||
lower the number, the higher the bonus.</li>
|
||||
<li>Each domino is unique and all combination of colours exists, so keep
|
||||
track of what is already placed and what is left.</li>
|
||||
<li>Make sure you don’t render dead some positions by preventing a
|
||||
future placement. If the corner of a domino does not match another
|
||||
corner diagonally, the move is valid but will prevent some future
|
||||
moves.</li>
|
||||
<li>Try to minimize the number of dominoes revealed in the stack. The lower the
|
||||
number, the higher the bonus.</li>
|
||||
<li>Each domino is unique and all combination of colours exists, so keep track
|
||||
of what is already placed and what is left.</li>
|
||||
<li>Make sure you don’t render dead some positions by preventing a future
|
||||
placement. If the corner of a domino does not match another corner diagonally,
|
||||
the move is valid but will prevent some future moves.</li>
|
||||
</ul>
|
||||
<h3 id="limitations">Limitations</h3>
|
||||
<ul>
|
||||
<li>ASCII character set is assumed.</li>
|
||||
<li>Requires both ncurses and X11 at compilation and runtime, but
|
||||
selection could be done at compilation with some extra code (mainly
|
||||
empty stubs).</li>
|
||||
<li>Requires both ncurses and X11 at compilation and runtime, but selection could
|
||||
be done at compilation with some extra code (mainly empty stubs).</li>
|
||||
</ul>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<ul>
|
||||
<li>1 letter identifiers, reused when possible.</li>
|
||||
<li>1 algorithm, 2 different kinds of display (ncurses and X11)
|
||||
mixed.</li>
|
||||
<li>No parameters to functions, all variables are global and
|
||||
shared.</li>
|
||||
<li>Some variables are not initialized if they have a known value at the
|
||||
time of use.</li>
|
||||
<li>1 algorithm, 2 different kinds of display (ncurses and X11) mixed.</li>
|
||||
<li>No parameters to functions, all variables are global and shared.</li>
|
||||
<li>Some variables are not initialized if they have a known value at the time of
|
||||
use.</li>
|
||||
</ul>
|
||||
<h3 id="compilation-warnings">Compilation warnings</h3>
|
||||
<p>With gcc 4.7.2 on Linux Ubuntu 12.10 :</p>
|
||||
@@ -241,50 +230,33 @@ time of use.</li>
|
||||
<p>With clang 3.1 on Linux Ubuntu 12.10 :</p>
|
||||
<pre><code>morgan2.c:23:24: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]</code></pre>
|
||||
<p><strong>!!!!! HAVE FUN !!!!!</strong></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>
|
||||
<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-2013morgan2"><a name="inventory"></a>Inventory for
|
||||
2013/morgan2</h1>
|
||||
<h1 id="inventory-for-2013morgan2"><a name="inventory"></a>Inventory for 2013/morgan2</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/2013/morgan2/morgan2.c">morgan2.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan2/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan2/morgan2.orig.c">morgan2.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="2013_morgan2.tar.bz2">2013_morgan2.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan2/morgan2.c">morgan2.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan2/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan2/morgan2.orig.c">morgan2.orig.c</a> - original source</li>
|
||||
<li><a href="2013_morgan2.tar.bz2">2013_morgan2.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/2013/morgan2/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan2/.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/2013/morgan2/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan2/.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/2013/morgan2/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan2/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+21
-49
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Arch_D_Robison">Arch D.
|
||||
Robison</a><br> Location: <a href="../../location.html#US">US</a> -
|
||||
<em>United States of America</em> (<em>United States</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Arch_D_Robison">Arch D. Robison</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -185,12 +185,8 @@ To give it a whirl, just punch 2 + 2 in.</p>
|
||||
Take unary minus and also subtract.<br />
|
||||
Summing hairs of a walrus? No longer a fuss.<br />
|
||||
Parenthetical grouping – no pushing a stack!</p>
|
||||
<p>Try dividing a <a
|
||||
href="https://en.wikipedia.org/wiki/Googol">googol</a> by one forty
|
||||
three,<br />
|
||||
Subtract an <a
|
||||
href="https://en.wikipedia.org/wiki/Names_of_large_numbers">octillion</a>
|
||||
- it’s simply divine.<br />
|
||||
<p>Try dividing a <a href="https://en.wikipedia.org/wiki/Googol">googol</a> by one forty three,<br />
|
||||
Subtract an <a href="https://en.wikipedia.org/wiki/Names_of_large_numbers">octillion</a> - it’s simply divine.<br />
|
||||
To compute a remainder, inscribe a percent.<br />
|
||||
For the sign of the answer, see C ninety nine!</p>
|
||||
<p>A hundred and twenty five digits or so,<br />
|
||||
@@ -205,68 +201,44 @@ Any base two to twenty – for that is the specs.</p>
|
||||
Divide <em>babbage</em> (in base seventeen) by <em>cafe</em> –<br />
|
||||
a nice <em>fad</em>, but avoid a division by nix:<br />
|
||||
No errant result, but you could wait all day!</p>
|
||||
<p>To grok the internals, ask <a
|
||||
href="https://en.wikipedia.org/wiki/Cleopatra">Queen
|
||||
Cleopatra</a>,<br />
|
||||
or <a href="https://en.wikipedia.org/wiki/Tutankhamun">King
|
||||
Tutankhamun</a>; for him it’s a romp.<br />
|
||||
<p>To grok the internals, ask <a href="https://en.wikipedia.org/wiki/Cleopatra">Queen Cleopatra</a>,<br />
|
||||
or <a href="https://en.wikipedia.org/wiki/Tutankhamun">King Tutankhamun</a>; for him it’s a romp.<br />
|
||||
Addition by cats, and if given two figures,<br />
|
||||
to tell which is bigger, sort down and string CMP!</p>
|
||||
<p>Unlawful subtraction, a grade school infraction,<br />
|
||||
starts at the left and works to the right.<br />
|
||||
Yet more innovation: like <a
|
||||
href="https://en.wikipedia.org/wiki/Ford_Motor_Company">Henry Ford’s
|
||||
cars</a>,<br />
|
||||
Yet more innovation: like <a href="https://en.wikipedia.org/wiki/Ford_Motor_Company">Henry Ford’s cars</a>,<br />
|
||||
With a pound and define, mass production of vars!</p>
|
||||
<p>The moral is clear, for programmers out there:<br />
|
||||
With the C lib for strings, you can hack with a flair.</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>
|
||||
<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-2013robison"><a name="inventory"></a>Inventory for
|
||||
2013/robison</h1>
|
||||
<h1 id="inventory-for-2013robison"><a name="inventory"></a>Inventory for 2013/robison</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/2013/robison/robison.c">robison.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/robison.orig.c">robison.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="2013_robison.tar.bz2">2013_robison.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/robison.c">robison.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/robison.orig.c">robison.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2013_robison.tar.bz2">2013_robison.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/2013/robison/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/.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/2013/robison/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/.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/2013/robison/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
Reference in new issue
Block a user