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
+437
-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,449 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 2019/dogon/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>2019 dogon</title>
|
||||
<meta name="description" content="IOCCC year: 2019 IOCCC winner: dogon winner index page">
|
||||
<meta name="keywords" content="IOCCC,2019,dogon,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>2019/dogon</title>
|
||||
<meta name="description" content="2019 IOCCC winner dogon">
|
||||
<meta name="keywords" content="IOCCC, 2019, IOCCC 2019, IOCCC winner, dogon">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>2019 dogon</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>2019/dogon</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%2F2019%2Fdogon%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2019/dogon/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../burton/index.html">← burton</a>
|
||||
<a class="Left" href="../index.html">↑ 2019 ↑</a>
|
||||
<a class="Left" href="../karns/index.html">karns →</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#Gil_Dogon">Gil Dogon</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#IL">IL</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></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: uses gets() - change to fgets() if possible</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#2019-dogon">2019
|
||||
dogon 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">./prog</span> <span class="op"><</span> pattern.mc</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">./try.sh</span></span></code></pre></div>
|
||||
<p>Make sure that you keep focus of windows in mind when going back and
|
||||
forth to the program and the script.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p><a
|
||||
href="http://ioccc.org/years.html#1991_davidguy">1991/davidguy</a>, <a
|
||||
href="http://ioccc.org/years.html#2011_blakely">2011/blakely</a>, …</p>
|
||||
<p>…This entry likely concludes the IOCCC category “Cellular automata
|
||||
simulators”; it would be very hard to beat it on its field.</p>
|
||||
<p>FYI: The <code>.mc</code> extension stands for
|
||||
<code>Golly macrocell</code> format.</p>
|
||||
<p>We truly have not much more to add, except two things:</p>
|
||||
<ul>
|
||||
<li><p>If a large sparse pattern is given, at the start of the program
|
||||
you are much more likely to see a blank board rather than the loaded
|
||||
configuration, and to see it, you may need to zoom out a few
|
||||
times.</p></li>
|
||||
<li><p>If you’re using a virtual machine with less than 4 Gb of
|
||||
available model RAM, you’d want to reduce the value of the Z define in
|
||||
the Makefile to <code>0x10000000</code>, otherwise the entry will
|
||||
promptly crash. To do this you can do:</p>
|
||||
<p>make clobber MEMORY=0x10000000 all</p>
|
||||
<p>Notice that that value must be a power of two!</p></li>
|
||||
</ul>
|
||||
<p>In the interest of saving lives, this entry was not fuzzed.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="what-is-it">What is it?</h3>
|
||||
<p>Just run with no arguments on an X11-compatible system using one of
|
||||
the supplied input <code>.mc</code> files as standard input. Press
|
||||
<code>-</code> several time to zoom out if necessary, then press space.
|
||||
For acceleration press <code>]</code> several times. That’s rather quick
|
||||
don’t you think?</p>
|
||||
<h3 id="historical-timeline">Historical Timeline</h3>
|
||||
<ul>
|
||||
<li>Circa 3.77 - 4.28 Billion years ago: Microorganisms appear on
|
||||
Earth.</li>
|
||||
<li>3000 BC: Ankh symbol is used in Egyptian hieroglyph to represent
|
||||
life.</li>
|
||||
<li>1940s: John Von Neumann and Stanislav Ulam are interested in
|
||||
artificial life eventually kick starting research on Cellular
|
||||
Automata.</li>
|
||||
<li>1970: J.H. Conway’s research discovers a rather minimal set of rules
|
||||
that seems quite interesting. <a
|
||||
href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">Conway’s
|
||||
Game of Life</a> gets published in <a
|
||||
href="https://web.stanford.edu/class/sts145/Library/life.pdf">Martin
|
||||
Gardner’s Scientific American column</a>.</li>
|
||||
<li>1970s: According to Knuth, a significant portion of computer time in
|
||||
the world is spent simulating GOL, mostly without the awareness of the
|
||||
people footing the bill.</li>
|
||||
<li>1984: Bill Gosper invents the <a
|
||||
href="https://en.wikipedia.org/wiki/Hashlife">Hashlife</a> algorithm.
|
||||
His implementation runs on Symbolics Lisp Machines. Unrelated to that,
|
||||
but in a cosmic coincidence the <a href="/years.html#1984">first
|
||||
IOCCC</a> is run!</li>
|
||||
<li>December 2000: Tom Rokicki has a breakthrough implementing <a
|
||||
href="https://en.wikipedia.org/wiki/Hashlife">Hashlife</a> in C,
|
||||
efficient, stable and production ready for modern machines.</li>
|
||||
<li>2006: First version of Golly by Andrew Trevorrow and Tomas Rokicki.
|
||||
Brings the delights of <a
|
||||
href="https://en.wikipedia.org/wiki/Hashlife">hashlife</a> to the
|
||||
masses.</li>
|
||||
</ul>
|
||||
<p>Which brings us to the present moment in time.</p>
|
||||
<h3 id="full-documentation-and-keys-ui">Full documentation and keys
|
||||
UI</h3>
|
||||
<p>Yes, this program is a Conway’s Game of Life graphic simulator
|
||||
implementing Bill Gosper’s hashlife algorithm. The entry’s UI is rather
|
||||
terse and somewhat obfuscated, as it should be. Also, when you,
|
||||
accidentally or not, press any of the keys not specified below, some
|
||||
stuff will happen or not, there is no guarantee whatsoever.</p>
|
||||
<p>The program should be used as follows:</p>
|
||||
<p>The standard input should contain a Golly macrocell format file for a
|
||||
two state automaton. See: <a
|
||||
href="http://golly.sourceforge.net/Help/formats.html"
|
||||
class="uri">http://golly.sourceforge.net/Help/formats.html</a>. Of
|
||||
course only Conway’s GOL rules are supported, so rules in the files are
|
||||
ignored. The supplied input examples should be quite interesting. Except
|
||||
one, all are taken from Golly’s standard distribution. Information and
|
||||
credits to their designer are in the header comment of each.</p>
|
||||
<ul>
|
||||
<li>For image navigation use the arrow keys, and zoom in and out by the
|
||||
<code>+</code>/<code>-</code> keys (without pressing the shift on the
|
||||
<code>+</code>)</li>
|
||||
<li>Space : Toggle start/stop.</li>
|
||||
<li>0 (zero): Toggle single step/free run mode.</li>
|
||||
<li>Backspace: Toggle direction for the arrow of time.</li>
|
||||
<li><code>]</code>: Increase speed (time step) by a factor of 2.</li>
|
||||
<li><code>[</code>: Decrease speed (time step) by a factor of 2.</li>
|
||||
</ul>
|
||||
<p>Notice that when going backward in time we ignore the current time
|
||||
step setting and just jump by the amount that was specified before.
|
||||
However going forward is always using the current time step.</p>
|
||||
<p>There is a minimal text printout by the program, so you can know what
|
||||
Generation your are in (<code>G:</code>), Internal memory allocated till
|
||||
now (<code>M:</code>), and then which Level is the current macrocell
|
||||
(<code>L</code>) and which zoom Scale you are watching
|
||||
(<code>S</code>).</p>
|
||||
<h3 id="portability-issues">Portability issues</h3>
|
||||
<p>This entry is quite portable hopefully on most modern platforms. It
|
||||
assumes X Window support of course. More than 2GB of memory is
|
||||
recommended. Configuration through <a href="Makefile">Makefile</a> is
|
||||
provided for the display windows size and for the memory usage. The
|
||||
Makefile provided configuration (<code>Z=0x20000000</code>) will need a
|
||||
system with 4GB DRAM to run nicely. There are several other salient
|
||||
assumptions though:</p>
|
||||
<ul>
|
||||
<li>The entry assumes <code>sizeof(long)==8</code>. However it actually
|
||||
almost avoids using any pointers which are 64 bits these days, in order
|
||||
to save space. On machines with <code>sizeof(long)==4</code> try adding
|
||||
<code>#define long long long</code> …</li>
|
||||
<li>The entry assumes the X11 displays default visual has 24 bit depth
|
||||
(RGB).</li>
|
||||
<li>The entry assumes little endianness (in only one place though! If
|
||||
you have PowerPC you can try and find that place to make it work), but
|
||||
more than this it assumes unaligned loads of 64 bits <code>long</code>s
|
||||
are supported, i.e. it assumes that a <code>long</code> can be loaded
|
||||
from any address that could hold an <code>int</code> otherwise. On non
|
||||
antiquated X86 you’ll be fine.</li>
|
||||
<li>The entry heavily relies on bitwise arithmetic (you don’t
|
||||
say!).</li>
|
||||
</ul>
|
||||
<h3 id="limitations">Limitations:</h3>
|
||||
<p>Foremost the entry is very strict, unsafe and picky regarding its
|
||||
input. Anything straying from the standard Golly macrocell legal format
|
||||
will result in undefined behavior, meaning mostly a very defined core
|
||||
dump. Since aforementioned core is rather large by default (about 4GG)
|
||||
it is highly recommended to set the core dump size limit to 0 in the
|
||||
shell before playing with fire …</p>
|
||||
<p>This entry needs quite a lot of memory to be effective, but by modern
|
||||
standards that is not too much. It does not do any garbage collection,
|
||||
so sooner or later memory will run out, resulting, surprise, surprise,
|
||||
in a core dump. On the plus side, this enables the nice time reversal
|
||||
feature… Anyway the amount of memory used can be controlled by the
|
||||
Makefile <code>-DZ=...</code> argument. With the default <code>Z</code>,
|
||||
the program will support in total about 240 million 64bit
|
||||
<code>long</code>s for the internal memory, which should be sufficient
|
||||
for about 100 million nodes+leafs, as each node is 3 <code>long</code>s
|
||||
and each leaf is 2.</p>
|
||||
<p><em>Important:</em> Makefile <code>Z</code> define must be a power of
|
||||
two!</p>
|
||||
<p>Zooming out past about S58 scale will enter a buggy twilight zone as
|
||||
only <code>long</code> integers are used in the drawing code. Reverting
|
||||
to <code>double</code>s could have remedied that, but then I’d need to
|
||||
use a lot of <code>ldexp()</code>s which would take the program over the
|
||||
size limit. Also the program will crash once the universe goes past
|
||||
level 64, though this is simply fixed by modifying a single constant in
|
||||
the program, can you find it ? Anyway <code>2^58</code> squared is quite
|
||||
a big enough universe for such a tiny program to simulate, no ?</p>
|
||||
<p>In case cell memory did not run out, or your pattern did not grow too
|
||||
big, and you have had patience enough and did not increase speed too
|
||||
much, you can run out of the history buffer after <code>33333</code>
|
||||
steps.</p>
|
||||
<p>If all of the above did not happen and result in the expected core
|
||||
dump, you will encounter the final limitation, which is the absence of
|
||||
an escape key. Just close the window or use <code>^C</code>/intr to exit
|
||||
….</p>
|
||||
<h3 id="warnings">Warnings</h3>
|
||||
<p>Oh don’t get me started on the torrent of litanies gcc emits when
|
||||
used with <code>-Wall</code>! Does it think I have not memorized by
|
||||
heart C’s precious operator precedence table (or at least have a cheat
|
||||
sheet nearby) that it dares suggest extra parentheses that would take
|
||||
the program over the limit ? And what if I do not use a variable here or
|
||||
there, do I have to pay extra tax for every orphaned variable?</p>
|
||||
<p>There is the reasonable warning about some <code>long</code>s printed
|
||||
as <code>int</code>s but its OK too, trust me.</p>
|
||||
<p>Then there’s the warning about <code>gets(3)</code> being unsafe,
|
||||
which is indeed the only one that appears by default in some versions of
|
||||
gcc linker. Yes Virginia, I know it is unsafe, and I would not recommend
|
||||
anyone using this entry as part of a web daemon, or a spaceship, no,
|
||||
seriously don’ do that.</p>
|
||||
<h3 id="obfuscations">Obfuscations:</h3>
|
||||
<p>Well almost none of the obfuscations are done on purpose, but mostly
|
||||
out of necessity, so all identifiers possible to be one character, are,
|
||||
and they are mercilessly reused. In the <code>main()</code> function
|
||||
there’s even a nice little identifier first used as a global and then
|
||||
reused (shadowed) in the <em>same</em> scope, and this did not produce
|
||||
even a little squeak of a warning from the compiler! Macro compression
|
||||
is rather sparingly used, however magic numbers abound everywhere, and
|
||||
bit twiddling is magical too. Do you know for example why we have
|
||||
<code>unsigned F=-1</code> ? (No warning there of course :) Hint: Later
|
||||
in the program you have <code>F/=17</code>. Did that make any sense?
|
||||
Further hint: print the resulting <code>F</code> in hexadecimal…</p>
|
||||
<p>And yes, the layout hint involves a mix of the most trendy
|
||||
typographical character juxtaposed against a very ancient one, not to
|
||||
mention the program includes some famous name dropping and documents
|
||||
itself as usual.</p>
|
||||
<h3 id="further-spoilers-engineering-and-obfuscation-galore">Further
|
||||
spoilers, engineering, and obfuscation galore:</h3>
|
||||
<p>Those wait for you, curious and intrepid reader, in the attached <a
|
||||
href="apholife.c">apholife.c</a> file, which is a partially obfuscated
|
||||
version of the program I wrote with a lot of helpful annotations and
|
||||
comments for myself and posterity, revealing some of the magic under the
|
||||
hood. This program is also a somewhat improved version which uses
|
||||
<code>ldexp()</code>s in the draw routine and has bigger constants, so
|
||||
it can zoom up to level 1024 if memory allows, and it tries its best to
|
||||
avoid dumping core on the poor user when its memory runs out, rather it
|
||||
enters freeze mode where you can still travel in calculated frozen
|
||||
space-time. Well, it’s not nice and tame, it even has an escape key,
|
||||
usage message, and to top it all it even avoids
|
||||
<code>gets(3)</code>!</p>
|
||||
<h3 id="special-thanks">Special thanks:</h3>
|
||||
<p>To Tom Rockiki, the original co-writer of Golly, a personal friend
|
||||
and hashlife master, who reviewed some earlier versions of the entry and
|
||||
freely shared some of his vast knowledge regarding GOL programming and
|
||||
hashlife. As a free bonus, Tom has allowed me to show his code which is
|
||||
probably the most efficient yet most obfuscated way of calculating the
|
||||
GOL function on a 64 bits <code>8*8</code> leaf:</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><span class="dt">unsigned</span> <span class="dt">long</span> life8x8<span class="op">(</span><span class="dt">long</span> a<span class="op">)</span> <span class="op">{</span> <span class="dt">unsigned</span> <span class="dt">long</span> aw <span class="op">=</span> a <span class="op"><<</span> <span class="dv">1</span><span class="op">,</span> ae <span class="op">=</span> a <span class="op">>></span> <span class="dv">1</span><span class="op">,</span> s0 <span class="op">=</span> aw</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="op">^</span> ae<span class="op">,</span> s1 <span class="op">=</span> aw <span class="op">&</span> ae<span class="op">,</span> hs0 <span class="op">=</span> s0 <span class="op">^</span> a<span class="op">,</span> hs1 <span class="op">=</span> <span class="op">(</span>s0 <span class="op">&</span> a<span class="op">)</span> <span class="op">|</span> s1<span class="op">,</span> hs0w8 <span class="op">=</span> hs0 <span class="op">>></span> <span class="dv">8</span><span class="op">,</span> hs0e8 <span class="op">=</span></span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a>hs0 <span class="op"><<</span> <span class="dv">8</span><span class="op">,</span> hs1w8 <span class="op">=</span> hs1 <span class="op">>></span> <span class="dv">8</span><span class="op">,</span> hs1e8 <span class="op">=</span> hs1 <span class="op"><<</span> <span class="dv">8</span><span class="op">,</span> ts0 <span class="op">=</span> hs0w8 <span class="op">^</span> hs0e8<span class="op">,</span> ts1 <span class="op">=</span> <span class="op">(</span>hs0w8</span>
|
||||
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="op">&</span> hs0e8<span class="op">)</span> <span class="op">|</span> <span class="op">(</span>ts0 <span class="op">&</span> s0<span class="op">);</span> <span class="cf">return</span> <span class="op">(</span>hs1w8 <span class="op">^</span> hs1e8 <span class="op">^</span> ts1 <span class="op">^</span> s1<span class="op">)</span> <span class="op">&</span> <span class="op">((</span>hs1w8 <span class="op">|</span> hs1e8<span class="op">)</span> <span class="op">^</span></span>
|
||||
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="op">(</span>ts1 <span class="op">|</span> s1<span class="op">))</span> <span class="op">&</span> <span class="op">((</span>ts0 <span class="op">^</span> s0<span class="op">)</span> <span class="op">|</span> a<span class="op">);</span> <span class="op">}</span></span></code></pre></div>
|
||||
<p>This uses only 19 bitwise operations and six shifts to calculate the
|
||||
inner 6x6 next generation bits of the input 8x8 !</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-2019dogon"><a name="inventory"></a>Inventory for
|
||||
2019/dogon</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/2019/dogon/prog.c">prog.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/prog.orig.c">prog.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/glider.mc">glider.mc</a>
|
||||
- Golly macrocell input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/gotts-dots.mc">gotts-dots.mc</a>
|
||||
- Golly macrocell input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/infinite.mc">infinite.mc</a>
|
||||
- Golly macrocell input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/infinite_10cell.mc">infinite_10cell.mc</a>
|
||||
- Golly macrocell input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/infinite_5x5.mc">infinite_5x5.mc</a>
|
||||
- Golly macrocell input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/infinite_minimal.mc">infinite_minimal.mc</a>
|
||||
- Golly macrocell input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/jagged.mc">jagged.mc</a>
|
||||
- Golly macrocell input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/message.mc">message.mc</a>
|
||||
- Golly macrocell input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/metacatacryst.mc">metacatacryst.mc</a>
|
||||
- Golly macrocell input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/metapixel-parity64.mc">metapixel-parity64.mc</a>
|
||||
- Golly macrocell input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/mosquito5.mc">mosquito5.mc</a>
|
||||
- Golly macrocell input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/unlimited-novelty.mc">unlimited-novelty.mc</a>
|
||||
- Golly macrocell input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/apholife.c">apholife.c</a>
|
||||
- partially obfuscated source</li>
|
||||
<li><a href="2019_dogon.tar.bz2">2019_dogon.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/2019/dogon/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/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%2F2019%2Fdogon%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