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
+389
-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,401 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2006/monge/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>2006 monge</title>
|
||||
<meta name="description" content="IOCCC year: 2006 IOCCC winner: monge winner index page">
|
||||
<meta name="keywords" content="IOCCC,2006,monge,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>2006/monge</title>
|
||||
<meta name="description" content="2006 IOCCC winner monge">
|
||||
<meta name="keywords" content="IOCCC, 2006, IOCCC 2006, IOCCC winner, monge">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2006 monge</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>2006/monge</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%2F2006%2Fmonge%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2006/monge/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../meyer/index.html">← meyer</a>
|
||||
<a class="Left" href="../index.html">↑ 2006 ↑</a>
|
||||
<a class="Left" href="../night/index.html">night →</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#Maurizio_Monge">Maurizio
|
||||
Monge</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#IT">IT</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>Make sure you have the SDL1 (not SDL2!) development environment
|
||||
installed.</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<p>There is alternate version that lets you redefine the width and
|
||||
height and number of iterations to use. See <a
|
||||
href="#alternate-code">Alternate code</a> below.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: doesn't work with some platforms - please help us fix
|
||||
STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#2006-monge">2006
|
||||
monge 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">./monge</span> expression ...</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">./monge</span> <span class="st">"z = 0"</span> <span class="st">"z = z*z*z + c; Abs2(z) < 4"</span></span></code></pre></div>
|
||||
<p>Incorrect formulas will ungracefully crash the program.</p>
|
||||
<p>This is supposed to happen. As is written in the <a
|
||||
href="http://catb.org/jargon/html/F/feature.html">The Jargon
|
||||
File</a>:</p>
|
||||
<pre><code>That's not a bug, that's a feature.</code></pre>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This alternate code lets you specify the width and height of the
|
||||
image as well as the number of iterations to perform.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>To use the default values, the same as <a href="monge.c">monge.c</a>,
|
||||
just do:</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<p>But if you wish to actually make use of it you will want to redefine
|
||||
one or more of the variables <code>W</code>, <code>H</code> and
|
||||
<code>I</code>. The defaults are (respectively) 400, 300 and \128. If
|
||||
you wish to change the image size to 500x500 but keep the iterations the
|
||||
same then do:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber WIDTH=500 HEIGHT=500 alt</span></code></pre></div>
|
||||
<p>If you wish to keep the dimensions the same but change the iterations
|
||||
to 512:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber ITERATIONS=512 alt</span></code></pre></div>
|
||||
<p>If you specify a value less than 1 for any of these it sets it back
|
||||
to the default. The value 1 was selected arbitrarily and such a small
|
||||
number as 1 will not do anything useful but as long as it’s at least 1
|
||||
it’ll not be redefined. Does not try taking care of overflows but such
|
||||
large values would be impractical anyway.</p>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>monge.alt</code> exactly as you would <code>monge</code>
|
||||
above.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>For those who are familiar with the previous <a
|
||||
href="/winners.html">IOCCC winners</a>, this program is best described
|
||||
as “<a href="/1994/tvr/tvr.c">1994/tvr</a> meets <a
|
||||
href="/2001/bellard/bellard.c">2001/bellard</a>”. Here you have
|
||||
mouse-manipulated fractals AND generated binary code, all in one
|
||||
package.</p>
|
||||
<p>A more appropriate award could have been “Best abuse of the rules”,
|
||||
because on a non-x86-based architecture this program is, quite
|
||||
predictably, a dud.</p>
|
||||
<p>At the time of judging we were too mesmerized by the graphics to
|
||||
realize it; and, after all, this entry does take a special effort to
|
||||
work on both <code>i386</code> and <code>x86_64</code>. Portable it is!
|
||||
:)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="for-the-impatient">For the impatient:</h3>
|
||||
<ol start="0" type="1">
|
||||
<li>Compile using the Makefile, or just run:</li>
|
||||
</ol>
|
||||
<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> monge.c <span class="at">-o</span> monge <span class="at">-O3</span> <span class="kw">`</span><span class="ex">sdl-config</span> <span class="at">--libs</span> <span class="at">--cflags</span><span class="kw">`</span></span></code></pre></div>
|
||||
<ol type="1">
|
||||
<li>Run:</li>
|
||||
</ol>
|
||||
<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">./monge</span> <span class="st">"z = 0"</span> <span class="st">"z = z*z + c; Abs2(z) < 4"</span></span></code></pre></div>
|
||||
<ol start="2" type="1">
|
||||
<li><p>Keep clicking with left or right button to zoom in or
|
||||
out.</p></li>
|
||||
<li><p>Use the number pad <code>+</code> and <code>-</code> to
|
||||
increase/decrease the iteration count when needed.</p></li>
|
||||
<li><p>Enjoy, unless you’re more interested in trying to understand how
|
||||
it works. :)</p></li>
|
||||
</ol>
|
||||
<h3 id="introduction">Introduction</h3>
|
||||
<p>This is a fractal generator that supports custom formulas and real
|
||||
time zoom. The program needs to be run with two arguments, the first
|
||||
being a semicolon separated list of assignments to do once per pixel,
|
||||
and the second a semicolon separated list of assignments and conditions
|
||||
that will be executed (and conditions checked) for each iteration (up to
|
||||
the maximum). Using the left and right mouse buttons you will be able to
|
||||
zoom in and out (a la <a
|
||||
href="https://github.com/xaos-project/XaoS">XaoS</a>), the zooming
|
||||
algorithm is a bit slower than <code>XaoS</code>’s but it should give
|
||||
slightly better results.</p>
|
||||
<p>Formulas can use all <code>a-z</code> (lowercase) variables, and the
|
||||
special variables <code>c</code> and <code>i</code> are respectively set
|
||||
by default to the complex coordinate of the pixel and to the complex
|
||||
imaginary <code>i</code>.</p>
|
||||
<p>All the constant numbers will be interpreted as real double values.
|
||||
Each expression must be an assignment (<code>[variable] = [expr]</code>)
|
||||
or a comparison with <code><</code> or <code>></code>
|
||||
(<code>[expr1] < [expr2]</code> or
|
||||
<code>[expr1] > [expr2]</code>), and you can add spaces as you like
|
||||
(as understood by the C function <code>isspace()</code>).</p>
|
||||
<p>Supported operations and functions are:</p>
|
||||
<pre><code>Operation | Description
|
||||
:-------- | :----------
|
||||
+,-,*,/ | Arithmetic operations, priority of * , / over +,- is
|
||||
| respected.
|
||||
|
|
||||
<,> | Compares the real parts of two complex numbers (the imaginary part
|
||||
| is ignored). Any number of conditions is allowed, the iteration
|
||||
| will just stop as soon as one of them fails.
|
||||
Abs2 | Calculates the squared norm, i.e.: Abs2(a+b*i) is (a*a+b*b)+0*i.
|
||||
Re | Extract the real part, i.e.: Re(a+b*i) is a+0*i.
|
||||
Im | Extract the imaginary part, i.e.: Im(a+b*i) is b+0*i.
|
||||
Exp | Calculates the complex exponential, i.e. Exp(a+b*i) is
|
||||
| e^a*(cos(b)+sin(b)*i).
|
||||
Ln | Calculates the principal value of the natural logarithm, i.e.
|
||||
Ln(a+b*i) is ln(a*a+b*b)/2 + atan(b/a)*i.</code></pre>
|
||||
<p>Here are a few examples of fractals you can draw:</p>
|
||||
<ul>
|
||||
<li>Mandelbrot:</li>
|
||||
</ul>
|
||||
<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">./monge</span> <span class="st">"z=1"</span> <span class="st">"z=z*z+c; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Mandelbrot (return time variation):</li>
|
||||
</ul>
|
||||
<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">./monge</span> <span class="st">"z=c"</span> <span class="st">"z=z*z+c; Abs2(z-c)>0.0001"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Julia, for <code>c=0.31+i*0.5</code>:</li>
|
||||
</ul>
|
||||
<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">./monge</span> <span class="st">"z=c; c=0.31+i*0.5"</span> <span class="st">"z=z*z+c; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Julia (return time variation), <code>for c=0.31+i*0.5</code>:</li>
|
||||
</ul>
|
||||
<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="ex">./monge</span> <span class="st">"z=c; c=0.31+i*0.5"</span> <span class="st">"z=z*z+c; Abs2(z-c)>0.0001"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Newton, for <code>x^3-1</code>:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb16"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z=c"</span> <span class="st">"p=z; z=0.6666*z+0.3333/(z*z); Abs2(p-z) > 0.001"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Newton-Mandelbrot:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb17"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z=0"</span> <span class="st">"p=z; z=z-(z*z*z + (c-1)*z - c)/(3*z*z+c-1); Abs2(p-z) > 0.001"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Phoenix, Mandelbrot version:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb18"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z=0; q=0"</span> <span class="st">"t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Phoenix, Julia version for <code>c=0.56667-i*0.5</code>:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb19"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z=c; c=0.56667-i*0.5; q=0"</span> <span class="st">"t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<h3 id="compilation-and-portability">Compilation and portability</h3>
|
||||
<p>This program will only work on x86 (with an x87 FPU) or x86_64
|
||||
machines, but it requires the SDL library.</p>
|
||||
<p>Another system requirement is the <code>mmap(2)</code> function (as
|
||||
<code>#define</code>d at the beginning of the program). If it is not
|
||||
available the macro <code>M(a)</code> will have to be replaced with a
|
||||
system dependent function that allocates readable, writable <em>AND</em>
|
||||
executable memory (it will not be possible to make this program run on
|
||||
paranoid systems (like OpenBSD IIRC) that do not allow <code>rwx</code>
|
||||
memory).</p>
|
||||
<p>However I was able to compile and make work the program under Linux
|
||||
(Debian/x86 and openSUSE/x86_64) and under Cygwin/x86. A friend of mine
|
||||
was able to make it work under macOS too.</p>
|
||||
<p>If you want you can change the window width and height, or the
|
||||
default number of iterations (that one can be tweaked at runtime,
|
||||
anyway) by changing the definitions of <code>W</code>, <code>H</code>
|
||||
and <code>I</code> at the beginning of the code.</p>
|
||||
<h3 id="caveats-i-just-a-selected-few-of-them">Caveats (I just a
|
||||
selected few of them!)</h3>
|
||||
<ul>
|
||||
<li>The zooming speed depends on the speed of the computer.</li>
|
||||
<li>Incorrect formulas will ungracefully crash the program.</li>
|
||||
<li>Many SDL identifiers are hardcoded as number, this is safe up to ABI
|
||||
incompatibility.</li>
|
||||
<li>Better optimization could be done treating known real numbers as
|
||||
just one <code>double</code>, instead of adding a 0 imaginary part to
|
||||
treat them as complex numbers.</li>
|
||||
<li>There should be some way to switch from Mandelbrot to Julia with
|
||||
chosen parameter.</li>
|
||||
</ul>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<p>Sure, I don’t want to deprive you of the pleasure of digging into the
|
||||
infernal mess created by my corrupted mind (writing this remark I
|
||||
noticed that I was ending sentences with ‘;’ instead of with ‘.’, and I
|
||||
worried for my sanity), but just in case…</p>
|
||||
<p>I used many obfuscation techniques, including a few ones that are
|
||||
different from the tricks used in most common IOCCC program (more ‘high
|
||||
level’, in the sense that they require an understanding of how all the
|
||||
program works to be worked out).</p>
|
||||
<p>This program is a formula parser that outputs machine code that
|
||||
calculates the formula and check the given conditions. The machine code
|
||||
targets the x87 stack based <a
|
||||
href="https://en.wikipedia.org/wiki/Floating-point_unit">FPU</a>, and it
|
||||
is almost identical for x86 and x86_64 (except for the comparison
|
||||
instructions, that have to be generated differently). The program keeps
|
||||
track of the FPU stack (the FPU has a cyclic stack of 8 registers) and
|
||||
will automatically swap to and from the main memory when required (i.e.,
|
||||
adds instructions to the generated machine code to take care of this
|
||||
issue).</p>
|
||||
<p>The formulas are parsed recursively and machine code for the inner
|
||||
iteration loop is also generated.</p>
|
||||
<p>After generating the machine code, a big event loop creates (or zooms
|
||||
into) the fractal executing the generated code when needed, and then
|
||||
waits for input events.</p>
|
||||
<p>The zooming algorithm works by remembering for each pixel the
|
||||
floating point offset to where the value was actually calculated. When
|
||||
zooming, the best match is searched, and if the offset is too big
|
||||
(<code>>1</code>) the pixel is recalculated.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2006monge"><a name="inventory"></a>Inventory for
|
||||
2006/monge</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/2006/monge/monge.c">monge.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/monge/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/monge/monge.alt.c">monge.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/monge/monge.orig.c">monge.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="2006_monge.tar.bz2">2006_monge.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/2006/monge/.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/2006/monge/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/monge/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2006%2Fmonge%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