build index.html for all winners
Updated manifest as per recent file changes. Updated winner `.winner.json` to reflect the manifest changes. Added [bin/all_run.sh](bin/all_run.sh) tool to run a command over all winning entries. These tools had slight improvements in the help usage message: * bin/gen-author.sh VERSION="1.3.1 2024-01-16" * bin/gen-inventory.sh VERSION="1.0.1 2024-01-16" * bin/pandoc_wrapper.sh VERSION="1.3.1 2024-01-16" * bin/subst.default.sh VERSION="1.1.1 2024-01-16" * bin/subst.winner-index.sh VERSION="1.1.1 2024-01-16" The `bin/readme2index.sh` tool was improved so that if the `index.html` file exists and the tool forms the exact same content, then the file `index.html` file is NOT touched. * bin/readme2index.sh VERSION="1.1 2024-01-16" We used the following command to generate `index.html` files for all winning entries: ```sh bin/all_run.sh -v 3 bin/readme2index.sh ``` NOTE: We have not (yet) built HTML files above the winner directory level (e.g., no year level nor top level HTML), nor have be built non-index HTML files for winners. NOTE: By default we are running `pandoc(1)` with: ``` --fail-if-warnings=true ``` This means that any problems with markdown to HTML generates an error. This is done to be sure that the HTML conversion is clean. We had to fix the following `README.md` files: * `2000/rince/README.md` The reference [^2] was never used. We made a guess that [^2] applies to the same spot as [^1]. Perhaps there is a better spot where [^2] applies? NOTE: For every reference, there MUST be some place where that reference is used. * 2012/vik/README.md The string "$...$" is assumed to be a TeX encoded string. NOTE: Every "$..$" needs to be backslashed as in "\$..\$". * 2018/burton1/README.md The reference [2] was duplicated. We changed the second [2] to [3]. NOTE: Every reference needs to have a unique number. * 2020/carlini/README.md The string "$...$" is assumed to be a TeX encoded string. NOTE: Every "$..$" needs to be backslashed as in "\$..\$". We also found 2 errors in the `author/author_handle.json` file set: * author/Anonymous_2001.json The `author/Anonymous_2001.json` file was missing. * author/Jari_Arkko.json The winner ID for `1989_jar.1` had a typo.
This commit is contained in:
1 parent
893cd915b6
commit
c1466f5165
350 files changed
+95242
-4217
No files matched your search
+423
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,435 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2013/hou/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>2013 hou</title>
|
||||
<meta name="description" content="IOCCC year: 2013 IOCCC winner: hou winner index page">
|
||||
<meta name="keywords" content="IOCCC,2013,hou,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>2013/hou</title>
|
||||
<meta name="description" content="2013 IOCCC winner hou">
|
||||
<meta name="keywords" content="IOCCC, 2013, IOCCC 2013, IOCCC winner, hou">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2013 hou</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>2013/hou</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2013%2Fhou%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2013/hou/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../endoh4/index.html">← endoh4</a>
|
||||
<a class="Left" href="../index.html">↑ 2013 ↑</a>
|
||||
<a class="Left" href="../mills/index.html">mills →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Qiming_HOU">Qiming HOU</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#CN">CN</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#2013-hou">2013
|
||||
hou in bugs.md</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./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>
|
||||
<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">./hou</span> BIG</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./hou</span> old_default.scene BIG</span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./hou</span> otherroom.scene</span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./hou</span> otherroom.scene NAIVE</span></code></pre></div>
|
||||
<p>Try opening the file and 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>
|
||||
</figure>
|
||||
<figure>
|
||||
<img src="otherroom.jpg" alt="./hou otherroom.scene - Other room" />
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
</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
|
||||
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>
|
||||
</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 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>
|
||||
</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>
|
||||
</ul>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<pre><code> 3225 3225 3225 9 9 3225 3225
|
||||
1 1 1 1 1 1 1 1 1 1
|
||||
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>
|
||||
<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>
|
||||
</ul>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2013hou"><a name="inventory"></a>Inventory for
|
||||
2013/hou</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/hou.c">hou.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/Makefile">Makefile</a>
|
||||
- winner 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="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="otherroom.jpg">otherroom.jpg</a> - sample image data</li>
|
||||
<li><a href="2013_hou.tar.bz2">2013_hou.tar.bz2</a> - download winning
|
||||
source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/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/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</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/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2013%2Fhou%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
Reference in new issue
Block a user