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
+24
-52
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Anthony_C_Howe">Anthony C.
|
||||
Howe</a><br> Location: <a href="../../location.html#CA">CA</a> -
|
||||
<em>Canada</em> <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Anthony_C_Howe">Anthony C. Howe</a><br>
|
||||
Location: <a href="../../location.html#CA">CA</a> - <em>Canada</em>
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -144,17 +144,15 @@ Howe</a><br> Location: <a href="../../location.html#CA">CA</a> -
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: missing file - please provide it</code></pre>
|
||||
<p>For more detailed information see <a
|
||||
href="../../bugs.html#1993_ant">1993 ant bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1993_ant">1993 ant 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">./ant</span> <span class="st">'ERE'</span> [file ...]</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>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>See the author’s POSIX P1003.2-like documentation file <a
|
||||
href="ant.txt">ant.txt</a> for more information.</p>
|
||||
<p>This program demonstrates that POSIX doesn’t guarantee readability.
|
||||
:-)</p>
|
||||
<p>See the author’s POSIX P1003.2-like documentation file <a href="ant.txt">ant.txt</a> for
|
||||
more information.</p>
|
||||
<p>This program demonstrates that POSIX doesn’t guarantee readability. :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>Some of the features of my entry are:</p>
|
||||
<ul>
|
||||
@@ -165,66 +163,40 @@ href="ant.txt">ant.txt</a> for more information.</p>
|
||||
<li>Code tested on a variety of platforms.</li>
|
||||
<li>Make driven test script.</li>
|
||||
<li>Can be compiled with ANSI or K&R C.</li>
|
||||
<li>Not a toy, but actually useful and usable on systems that use
|
||||
DOS.</li>
|
||||
<li>Not a toy, but actually useful and usable on systems that use DOS.</li>
|
||||
<li>See also <a href="ant.txt">ant.txt</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-1993ant"><a name="inventory"></a>Inventory for
|
||||
1993/ant</h1>
|
||||
<h1 id="inventory-for-1993ant"><a name="inventory"></a>Inventory for 1993/ant</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/1993/ant/ant.c">ant.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ant.orig.c">ant.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ant.txt">ant.txt</a>
|
||||
- ag man page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ant.test.mk">ant.test.mk</a>
|
||||
- test suite</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ants.txt">ants.txt</a>
|
||||
- lots of ASCII ants</li>
|
||||
<li><a href="1993_ant.tar.bz2">1993_ant.tar.bz2</a> - download entry
|
||||
source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ant.c">ant.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ant.orig.c">ant.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ant.txt">ant.txt</a> - ag man page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ant.test.mk">ant.test.mk</a> - test suite</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ants.txt">ants.txt</a> - lots of ASCII ants</li>
|
||||
<li><a href="1993_ant.tar.bz2">1993_ant.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/1993/ant/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/.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/1993/ant/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/.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/1993/ant/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+39
-63
@@ -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 -->
|
||||
@@ -140,23 +140,20 @@ Mills</a><br> Location: <a href="../../location.html#US">US</a> -
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>We recommend you try the alt version first so you can get a better
|
||||
idea of what this entry was like back in 1993. See the <a
|
||||
href="#original-code">original code</a> section below to run the
|
||||
original.</p>
|
||||
<p>We recommend you try the alt version first so you can get a better idea of what
|
||||
this entry was like back in 1993. See the <a href="#original-code">original code</a>
|
||||
section below to run the original.</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> alt</span></code></pre></div>
|
||||
<p>NOTE: this entry requires the <code>X11/Xlib.h</code> header file and
|
||||
the X11 library to compile. If you’re under macOS and do not know how to
|
||||
install and use X11 programs see <a href="../../faq.html#X11macos">FAQ
|
||||
3.7 - How do I compile and use on macOS, an IOCCC entry that requires
|
||||
X11?</a>.</p>
|
||||
<p>NOTE: this entry requires the <code>X11/Xlib.h</code> header file and the X11 library to
|
||||
compile. If you’re under macOS and do not know how to install and use X11
|
||||
programs see <a href="../../faq.html#X11macos">FAQ 3.7 - How do I compile and use on macOS, an IOCCC entry that
|
||||
requires X11?</a>.</p>
|
||||
<p>To configure how many microseconds to sleep before updates try:</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 SLEEP=200 alt</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: known bug - please help us fix</code></pre>
|
||||
<p>For more detailed information see <a
|
||||
href="../../bugs.html#1993_cmills">1993 cmills bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1993_cmills">1993 cmills 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="va">DISPLAY</span><span class="op">=</span><span class="st">"your_X_server_display"</span></span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="bu">export</span> <span class="va">DISPLAY</span></span>
|
||||
@@ -165,14 +162,12 @@ href="../../bugs.html#1993_cmills">1993 cmills bugs</a>.</p>
|
||||
<p><code>speed</code> is update speed from 1 to 9 (default is 9).</p>
|
||||
<p>NOTE: in most cases <code>DISPLAY</code> should already be set.</p>
|
||||
<h2 id="original-code">Original code:</h2>
|
||||
<p>We recommend the version that uses <code>usleep(3)</code> to more
|
||||
easily see what is going on but you can use the original without any
|
||||
delays if you wish.</p>
|
||||
<p>We recommend the version that uses <code>usleep(3)</code> to more easily see what is going
|
||||
on but you can use the original without any delays if you wish.</p>
|
||||
<h3 id="original-build">Original build:</h3>
|
||||
<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">make</span> all</span></code></pre></div>
|
||||
<h3 id="original-use">Original use:</h3>
|
||||
<p>Use <code>cmills</code> as you would <code>cmills.alt</code>
|
||||
above.</p>
|
||||
<p>Use <code>cmills</code> as you would <code>cmills.alt</code> above.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>From the San Jose Mercury News (May 15, 1993 page 20A “West Hackers
|
||||
trounce East in computer quiz game”):</p>
|
||||
@@ -184,73 +179,54 @@ said. "What is the name of this contest"
|
||||
- a product over which Apple sued Microsoft five years ago. Not
|
||||
the right answer - it's "The Obfuscated C Contest [sic]" - but
|
||||
it brought down the house of Apple partisans...</code></pre>
|
||||
<p>[The expression on Bill Gates’ face was a sight to behold, as
|
||||
reported to us by several who were there].</p>
|
||||
<p>You must set <code>$DISPLAY</code> in your environment or the program
|
||||
will dump core. This is not a bug as the author documented it as a
|
||||
feature. :-)</p>
|
||||
<p>[The expression on Bill Gates’ face was a sight to behold, as reported
|
||||
to us by several who were there].</p>
|
||||
<p>You must set <code>$DISPLAY</code> in your environment or the program will
|
||||
dump core. This is not a bug as the author documented it as
|
||||
a feature. :-)</p>
|
||||
<p>The optional argument is integer which controls the speed of the
|
||||
program. By default the speed is 9. You may want to try 1.</p>
|
||||
<p>You will have to kill the program (i.e., ^C) to stop it.</p>
|
||||
<p>WARNING: Slow servers or servers with long request queues will
|
||||
continue to ‘run’ for a while after you have killed the program.</p>
|
||||
<p>This program makes your windows about as useful as their windows.
|
||||
:-)</p>
|
||||
continue to ‘run’ for a while after you have killed
|
||||
the program.</p>
|
||||
<p>This program makes your windows about as useful as their windows. :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>The program uses a single backing pixmap (which is the size of the
|
||||
screen) for all of its subwindows (with a little bit of trickery to move
|
||||
the offset around). This is much better (and faster) than the obvious
|
||||
implementation which would require a full-screen pixmap and a separate
|
||||
backing pixmap for each subwindow.</p>
|
||||
screen) for all of its subwindows (with a little bit of trickery to
|
||||
move the offset around). This is much better (and faster) than the
|
||||
obvious implementation which would require a full-screen pixmap and
|
||||
a separate backing pixmap for each subwindow.</p>
|
||||
<p>The chance that a window breaks is based on it’s kinetic energy,
|
||||
which in turn is based on it’s area and speed. How silly!</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-1993cmills"><a name="inventory"></a>Inventory for
|
||||
1993/cmills</h1>
|
||||
<h1 id="inventory-for-1993cmills"><a name="inventory"></a>Inventory for 1993/cmills</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/1993/cmills/cmills.c">cmills.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/cmills.alt.c">cmills.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/cmills.orig.c">cmills.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1993_cmills.tar.bz2">1993_cmills.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/cmills.c">cmills.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/cmills.alt.c">cmills.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/cmills.orig.c">cmills.orig.c</a> - original source</li>
|
||||
<li><a href="1993_cmills.tar.bz2">1993_cmills.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/1993/cmills/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/.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/1993/cmills/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/.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/1993/cmills/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+35
-71
@@ -130,8 +130,8 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#David_Gibson">David Gibson</a><br>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown
|
||||
location</em> <br><br></li>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -144,14 +144,13 @@ location</em> <br><br></li>
|
||||
<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">./dgibson.sh</span> <span class="pp">[</span><span class="ss">datafile</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>where:</p>
|
||||
<p><code>datafile</code> is the initial pattern (default: <a
|
||||
href="dgibson.data1">dgibson.data1</a>)</p>
|
||||
<p><code>datafile</code> is the initial pattern (default: <a href="dgibson.data1">dgibson.data1</a>)</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="ex">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>We have provided the shell script <a href="dgibson.sh">dgibson.sh</a>
|
||||
to make it easier to run this entry. Run this shell script several times
|
||||
to see what happens.</p>
|
||||
<p>We have provided the shell script <a href="dgibson.sh">dgibson.sh</a> to make it easier
|
||||
to run this entry. Run this shell script several times to
|
||||
see what happens.</p>
|
||||
<p>There are a number of data files available:</p>
|
||||
<ul>
|
||||
<li><a href="dgibson.data1">dgibson.data1</a></li>
|
||||
@@ -160,26 +159,23 @@ to see what happens.</p>
|
||||
<li><a href="dgibson.data4">dgibson.data4</a></li>
|
||||
<li><a href="dgibson.data5">dgibson.data5</a></li>
|
||||
</ul>
|
||||
<p>For <a href="dgibson.data5">dgibson.data5</a> you will need a large
|
||||
screen, lots of virtual memory and lots of time! The <a
|
||||
href="try.sh">try.sh</a> script will run <a
|
||||
href="dgibson.sh">dgibson.sh</a> on all the data files.</p>
|
||||
<p>Good luck trying to use a debugger on this entry! Life is not always
|
||||
pretty.</p>
|
||||
<p>For <a href="dgibson.data5">dgibson.data5</a> you will need a large screen, lots of virtual
|
||||
memory and lots of time! The <a href="try.sh">try.sh</a> script will run
|
||||
<a href="dgibson.sh">dgibson.sh</a> on all the data files.</p>
|
||||
<p>Good luck trying to use a debugger on this entry! Life is not
|
||||
always pretty.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program plays the <a
|
||||
href="https://en.wikipedia.org/wiki/Conway's_Game_of_Life">Game of
|
||||
<p>This program plays the <a href="https://en.wikipedia.org/wiki/Conway's_Game_of_Life">Game of
|
||||
Life</a>.</p>
|
||||
<p>Life is a cellular automaton invented by J. H. Conway, in which each
|
||||
of a rectangular grid of cells can be alive or dead, and cells with more
|
||||
<p>Life is a cellular automaton invented by J. H. Conway, in which each of
|
||||
a rectangular grid of cells can be alive or dead, and cells with more
|
||||
than 3 or less than 2 (out of 8) live neighbours die, and empty cells
|
||||
with exactly 3 neighbours give birth.</p>
|
||||
<h3 id="some-notes">Some notes</h3>
|
||||
<ul>
|
||||
<li>the “STAT n” information does not have to be present in the initial
|
||||
configuration</li>
|
||||
<li>the initial configuration should not have live cells around the
|
||||
edges</li>
|
||||
<li>the initial configuration should not have live cells around the edges</li>
|
||||
<li>the grid should be a perfect rectangle.</li>
|
||||
</ul>
|
||||
<p>Further features: the current generation number is preserved, and the
|
||||
@@ -188,73 +184,41 @@ small.</p>
|
||||
<p>When writing this program, my goal was to make each cell in the life
|
||||
grid expand to the code which calculates the fate of that cell. In
|
||||
addition, the resulting program is a single expression, which makes it
|
||||
necessary to recurse <code>main()</code> in two “directions”
|
||||
simultaneously.</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>
|
||||
necessary to recurse <code>main()</code> in two “directions” simultaneously.</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-1993dgibson"><a name="inventory"></a>Inventory for
|
||||
1993/dgibson</h1>
|
||||
<h1 id="inventory-for-1993dgibson"><a name="inventory"></a>Inventory for 1993/dgibson</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/1993/dgibson/dgibson.c">dgibson.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.orig.c">dgibson.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.sh">dgibson.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data1">dgibson.data1</a>
|
||||
- life cell layout</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data2">dgibson.data2</a>
|
||||
- life cell layout</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data3">dgibson.data3</a>
|
||||
- life cell layout</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data4">dgibson.data4</a>
|
||||
- life cell layout</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data5">dgibson.data5</a>
|
||||
- life cell layout</li>
|
||||
<li><a href="1993_dgibson.tar.bz2">1993_dgibson.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.c">dgibson.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.orig.c">dgibson.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.sh">dgibson.sh</a> - how to run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data1">dgibson.data1</a> - life cell layout</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data2">dgibson.data2</a> - life cell layout</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data3">dgibson.data3</a> - life cell layout</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data4">dgibson.data4</a> - life cell layout</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data5">dgibson.data5</a> - life cell layout</li>
|
||||
<li><a href="1993_dgibson.tar.bz2">1993_dgibson.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/1993/dgibson/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/.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/1993/dgibson/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/.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/1993/dgibson/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+9
-8
@@ -121,14 +121,15 @@
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h1 id="the-towers-of-hanoi-puzzle">The Towers of Hanoi puzzle</h1>
|
||||
<p>The Towers of Hanoi is a puzzle consisting of three posts and several
|
||||
rings of various sizes. The initial configuration of the game is that
|
||||
all the rings are stacked in decreasing order of size on one post. The
|
||||
object of the game is to move all the rings from one post to another
|
||||
subject to two rules: only one ring can be moved at a time, and at no
|
||||
time can one ring be placed on top of a smaller ring. The number of
|
||||
steps necessary to solve this puzzle is exponential in the number
|
||||
rings.</p>
|
||||
<p>The Towers of Hanoi is a puzzle consisting of three posts
|
||||
and several rings of various sizes. The initial
|
||||
configuration of the game is that all the rings are stacked
|
||||
in decreasing order of size on one post. The object of the
|
||||
game is to move all the rings from one post to another
|
||||
subject to two rules: only one ring can be moved at a time,
|
||||
and at no time can one ring be placed on top of a smaller
|
||||
ring. The number of steps necessary to solve this puzzle is
|
||||
exponential in the number rings.</p>
|
||||
|
||||
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
+56
-88
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#E_Jay_Berkenbilt">E. Jay
|
||||
Berkenbilt</a><br> Location: <a href="../../location.html#ZZ">ZZ</a> -
|
||||
<em>Unknown location</em> <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#E_Jay_Berkenbilt">E. Jay Berkenbilt</a><br>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -148,116 +148,84 @@ Berkenbilt</a><br> Location: <a href="../../location.html#ZZ">ZZ</a> -
|
||||
<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>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>A negative argument plays the patience puzzle. An argument greater
|
||||
than 0 plays the Tower of Hanoi puzzle. In either case the absolute
|
||||
value of the argument specifies the size of the respective puzzle. Refer
|
||||
to the web pages <a href="hanoi.html">hanoi.html</a> and <a
|
||||
href="patience.html">patience.html</a> for more information on these
|
||||
puzzles.</p>
|
||||
<p>Of course, you need a different kind of “patience” if you give the
|
||||
argument 127 to this program and want to see it finish!</p>
|
||||
<p>A negative argument plays the patience puzzle. An argument
|
||||
greater than 0 plays the Tower of Hanoi puzzle. In either case
|
||||
the absolute value of the argument specifies the size of the
|
||||
respective puzzle. Refer to the web pages <a href="hanoi.html">hanoi.html</a> and
|
||||
<a href="patience.html">patience.html</a> for more information on these puzzles.</p>
|
||||
<p>Of course, you need a different kind of “patience” if you give
|
||||
the argument 127 to this program and want to see it finish!</p>
|
||||
<p>We note that this also works under macOS just fine.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="what-this-program-does">What this program does</h3>
|
||||
<h4 id="output-solution-to-towers-of-hanoi-for-five-rings">Output
|
||||
solution to Towers of Hanoi for five rings:</h4>
|
||||
<h4 id="output-solution-to-towers-of-hanoi-for-five-rings">Output solution to Towers of Hanoi for five rings:</h4>
|
||||
<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">./ejb</span> 5</span></code></pre></div>
|
||||
<p>The format of the output for the Towers of Hanoi case is simply a
|
||||
text description of how to solve the puzzle.</p>
|
||||
<h4 id="output-solution-to-the-patience-puzzle-for-six-rings">Output
|
||||
solution to the Patience puzzle for six rings:</h4>
|
||||
<h4 id="output-solution-to-the-patience-puzzle-for-six-rings">Output solution to the Patience puzzle for six rings:</h4>
|
||||
<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">./ejb</span> <span class="at">-6</span></span></code></pre></div>
|
||||
<p>For the patience puzzle, the output is a sequence binary codes
|
||||
representing successive states of the puzzle. The rightmost digit
|
||||
represents the first ring. A <code>1</code> means the ring is on the
|
||||
<code>U</code>; a <code>0</code> means it is off the <code>U</code>. The
|
||||
program prints the word <code>"Invalid"</code> in response to illegal
|
||||
command line parameters.</p>
|
||||
<p>For the patience puzzle, the output is a sequence binary codes representing
|
||||
successive states of the puzzle. The rightmost digit represents the first ring.
|
||||
A <code>1</code> means the ring is on the <code>U</code>; a <code>0</code> means it is off the <code>U</code>. The program
|
||||
prints the word <code>"Invalid"</code> in response to illegal command line parameters.</p>
|
||||
<h3 id="motivation">Motivation</h3>
|
||||
<p>Most people who have written software for other people have been
|
||||
asked to count lines of code. Naturally, this brings up the
|
||||
controversial question of exactly what defines a line of code. This
|
||||
program serves to show that counting semicolons will not always provide
|
||||
a meaningful measure of code size. This is especially true in this
|
||||
program where the number of semicolons itself is ambiguous. Does it have
|
||||
two or three? In addition, the only C keyword this program uses besides
|
||||
type names and qualifiers is <code>return</code>, and the only function
|
||||
defined in the code is <code>main()</code>. The level of complexity of
|
||||
the program without multiple semicolons, statements, and functions is
|
||||
achieved by abusing C operators, especially the comma operator.
|
||||
Considerable use of <code>||</code>, <code>&&</code>, and
|
||||
<code>?:</code> helps too. In addition, <code>main()</code> is called
|
||||
recursively. The NULL pointer that terminates <code>argv</code> is used
|
||||
to pass additional information into <code>main()</code>. Even though the
|
||||
algorithms used by this code are simple, this program is still hard to
|
||||
follow even when indented properly. (It is pretty hard to indent this
|
||||
code reasonably, however.)</p>
|
||||
<p>Although this program has only been tested on UNIX systems it will
|
||||
probably run on just about any machine with an ANSI C compiler. It does
|
||||
not use the C preprocessor at all. The only functions it uses are
|
||||
<code>atoi()</code>, <code>malloc()</code>, <code>memset()</code>,
|
||||
<code>printf()</code>, and <code>puts()</code>. It does, however,
|
||||
require that the architecture it runs on have bytes that are at least
|
||||
eight bits long and pointers that are at least four bytes long. In
|
||||
addition, it requires an ANSI compiler since it uses
|
||||
<code>signed char</code> and ANSI-style function declarations.</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>
|
||||
controversial question of exactly what defines a line of code.
|
||||
This program serves to show that counting semicolons will not
|
||||
always provide a meaningful measure of code size. This is
|
||||
especially true in this program where the number of semicolons
|
||||
itself is ambiguous. Does it have two or three? In addition, the
|
||||
only C keyword this program uses besides type names and
|
||||
qualifiers is <code>return</code>, and the only function defined in the code
|
||||
is <code>main()</code>. The level of complexity of the program without multiple
|
||||
semicolons, statements, and functions is achieved by abusing C
|
||||
operators, especially the comma operator. Considerable use of <code>||</code>,
|
||||
<code>&&</code>, and <code>?:</code> helps too. In addition, <code>main()</code> is called recursively.
|
||||
The NULL pointer that terminates <code>argv</code> is used to pass additional
|
||||
information into <code>main()</code>. Even though the algorithms used by this
|
||||
code are simple, this program is still hard to follow even when
|
||||
indented properly. (It is pretty hard to indent this code
|
||||
reasonably, however.)</p>
|
||||
<p>Although this program has only been tested on UNIX systems it will probably run
|
||||
on just about any machine with an ANSI C compiler. It does not use the C
|
||||
preprocessor at all. The only functions it uses are <code>atoi()</code>, <code>malloc()</code>,
|
||||
<code>memset()</code>, <code>printf()</code>, and <code>puts()</code>. It does, however, require that the
|
||||
architecture it runs on have bytes that are at least eight bits long and
|
||||
pointers that are at least four bytes long. In addition, it requires an ANSI
|
||||
compiler since it uses <code>signed char</code> and ANSI-style function declarations.</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-1993ejb"><a name="inventory"></a>Inventory for
|
||||
1993/ejb</h1>
|
||||
<h1 id="inventory-for-1993ejb"><a name="inventory"></a>Inventory for 1993/ejb</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/1993/ejb/ejb.c">ejb.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/ejb.orig.c">ejb.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="hanoi.html">hanoi.html</a> - about the Towers of Hanoi
|
||||
puzzle</li>
|
||||
<li><a href="patience.html">patience.html</a> - about the Patience
|
||||
puzzle</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1993_ejb.tar.bz2">1993_ejb.tar.bz2</a> - download entry
|
||||
source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/ejb.c">ejb.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/ejb.orig.c">ejb.orig.c</a> - original source</li>
|
||||
<li><a href="hanoi.html">hanoi.html</a> - about the Towers of Hanoi puzzle</li>
|
||||
<li><a href="patience.html">patience.html</a> - about the Patience puzzle</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="1993_ejb.tar.bz2">1993_ejb.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/1993/ejb/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/.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/1993/ejb/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/.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/1993/ejb/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/hanoi.md">hanoi.md</a>
|
||||
- markdown source for hanoi.html</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/patience.md">patience.md</a>
|
||||
- markdown source for patience.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/README.md">README.md</a> - markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/hanoi.md">hanoi.md</a> - markdown source for hanoi.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/patience.md">patience.md</a> - markdown source for patience.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+80
-71
@@ -121,49 +121,54 @@
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h1 id="the-patience-puzzle">The Patience puzzle</h1>
|
||||
<p>The Patience puzzle, probably of Chinese origin, consists of an iron
|
||||
U-shaped piece and several rings that link around it. The physical shape
|
||||
of the puzzle is very difficult to describe verbally, but here is an
|
||||
attempt.</p>
|
||||
<p>This description of the puzzle is presented as a set of instructions
|
||||
for constructing the puzzle. Start with a flat piece of iron about 15
|
||||
centimeters long by about two centimeters wide. Drill six holes in the
|
||||
piece of iron. Through each hole, place a rod. The rod should have a
|
||||
diameter slightly less than that of the hole so that it can move freely.
|
||||
One end of the rod is like the head of a nail and is larger than the
|
||||
hole to prevent it from coming free. The other end is looped around a
|
||||
metal ring with a diameter of about five centimeters. This completely
|
||||
prevents the iron rod from separating from the base. Each rod, in
|
||||
addition to going through the iron base, goes through the ring at the
|
||||
end of the rod to its right. The only rod free of this restriction is
|
||||
the rightmost rod. What has been described so far is one of the two
|
||||
components of the puzzle.</p>
|
||||
<p>The Patience puzzle, probably of Chinese origin, consists of
|
||||
an iron U-shaped piece and several rings that link around
|
||||
it. The physical shape of the puzzle is very difficult to
|
||||
describe verbally, but here is an attempt.</p>
|
||||
<p>This description of the puzzle is presented as a set of
|
||||
instructions for constructing the puzzle. Start with a flat
|
||||
piece of iron about 15 centimeters long by about two
|
||||
centimeters wide. Drill six holes in the piece of iron.
|
||||
Through each hole, place a rod. The rod should have a
|
||||
diameter slightly less than that of the hole so that it can
|
||||
move freely. One end of the rod is like the head of a nail
|
||||
and is larger than the hole to prevent it from coming free.
|
||||
The other end is looped around a metal ring with a diameter
|
||||
of about five centimeters. This completely prevents the
|
||||
iron rod from separating from the base. Each rod, in
|
||||
addition to going through the iron base, goes through the
|
||||
ring at the end of the rod to its right. The only rod free
|
||||
of this restriction is the rightmost rod. What has been
|
||||
described so far is one of the two components of the puzzle.</p>
|
||||
<p>The other component is another iron rod shaped like a <code>U</code>.
|
||||
The <code>U</code> is as long from the tips to the base as the original
|
||||
piece of iron with the holes in it. The ends of the <code>U</code> are
|
||||
looped around another ring of about five centimeters in diameter. In the
|
||||
puzzle’s initial configuration, the <code>U</code> is placed through the
|
||||
rings so that it is held in place by the iron rods. Imagine starting
|
||||
with the <code>U</code> piece before the iron loop is placed at the end.
|
||||
Slide the legs of the <code>U</code> through the loops so that the iron
|
||||
rods securing the loops to the metal strip go up the center of the
|
||||
<code>U</code>. Placing the final ring at the ends of the <code>U</code>
|
||||
prevents it from coming out. The object of the puzzle is to free the
|
||||
<code>U</code>-shaped piece from the other piece.</p>
|
||||
<p>The following illustration (sideways) shows a three-ring case of this
|
||||
puzzle. If you look carefully, you can see that the first ring could be
|
||||
lifted over the edge of the <code>U</code> and slid down through the
|
||||
center of the <code>U</code>, thereby freeing the <code>U</code> from
|
||||
the first iron rod. The second ring can also be freed in the initial
|
||||
configuration since it is already over the rod for the first ring. The
|
||||
third ring cannot be moved, however, since it is blocked by the iron rod
|
||||
to which the first ring is attached. If the first first is removed, then
|
||||
the third ring is no longer blocked by the first ring’s iron rod and can
|
||||
be removed freely. The second ring, however cannot be moved if the first
|
||||
ring is gone because it will then be blocked by the first ring in its
|
||||
new position outside of the <code>U</code>.</p>
|
||||
<p>Here is an illustration of the three-ring case. The bottom of the
|
||||
puzzle is on the left-hand side of the page.</p>
|
||||
looped around another ring of about five centimeters in
|
||||
diameter. In the puzzle’s initial configuration, the <code>U</code> is
|
||||
placed through the rings so that it is held in place by the
|
||||
iron rods. Imagine starting with the <code>U</code> piece before the
|
||||
iron loop is placed at the end. Slide the legs of the <code>U</code>
|
||||
through the loops so that the iron rods securing the loops
|
||||
to the metal strip go up the center of the <code>U</code>. Placing the
|
||||
final ring at the ends of the <code>U</code> prevents it from coming out.
|
||||
The object of the puzzle is to free the <code>U</code>-shaped piece from
|
||||
the other piece.</p>
|
||||
<p>The following illustration (sideways) shows a three-ring
|
||||
case of this puzzle. If you look carefully, you can see
|
||||
that the first ring could be lifted over the edge of the <code>U</code>
|
||||
and slid down through the center of the <code>U</code>, thereby freeing
|
||||
the <code>U</code> from the first iron rod. The second ring can also be
|
||||
freed in the initial configuration since it is already over
|
||||
the rod for the first ring. The third ring cannot be moved,
|
||||
however, since it is blocked by the iron rod to which the
|
||||
first ring is attached. If the first first is removed, then
|
||||
the third ring is no longer blocked by the first ring’s iron
|
||||
rod and can be removed freely. The second ring, however
|
||||
cannot be moved if the first ring is gone because it will
|
||||
then be blocked by the first ring in its new position
|
||||
outside of the <code>U</code>.</p>
|
||||
<p>Here is an illustration of the three-ring case. The bottom
|
||||
of the puzzle is on the left-hand side of the page.</p>
|
||||
<pre><code>
|
||||
|
||||
|
||||
@@ -216,37 +221,41 @@ puzzle is on the left-hand side of the page.</p>
|
||||
\ | \\ ||
|
||||
\ | \\||
|
||||
\| \||</code></pre>
|
||||
<p>This puzzle takes other forms as well. One such puzzle is called
|
||||
“Spin-Out”. This puzzle consists of one plastic piece that encases
|
||||
another piece that can slide in and out of it. The movement of the
|
||||
smaller piece is restricted by discs that, when turned to one angle,
|
||||
lock the smaller piece inside the larger one and, when turned the other
|
||||
way, allow it to move. This puzzle is as difficult to describe as the
|
||||
first and, since I don’t have one in front of me, I will not attempt to
|
||||
describe it. The object of this puzzle is to free the smaller piece from
|
||||
the larger one. The other puzzle that is like this one consists of a
|
||||
cylinder with rods protruding from the top. The rods can be slid from
|
||||
the center to the edge of the cylinder constrained by a series of discs
|
||||
in the center. The discs have cuts in them that allow some rods to move
|
||||
and force others in one place based on the relative rotations of the
|
||||
discs. The object here is to move all the rods from the inside to the
|
||||
outside.</p>
|
||||
<p>What makes these puzzles similar is that the physical shapes of the
|
||||
puzzles put the same restrictions on the movement of the pieces.
|
||||
Specifically, there is always one piece that is free to move. The only
|
||||
other piece that is free to move is the second one that is still
|
||||
attached to the base it is trying to be freed from. In the case of the
|
||||
original puzzle, consider the rings numbered from 1 to 6 with ring 1
|
||||
being the one at the closed end of the <code>U</code>. Ring 1 can always
|
||||
be removed from or added to the <code>U</code>. In the initial state,
|
||||
when all rings are around the <code>U</code>, ring 2 is the other one
|
||||
that can be moved because it is second. If ring 1 is removed, then only
|
||||
two operations are possible: the restoration of ring 1 and the removal
|
||||
of ring 3. This is because ring 1 is always movable, and ring 3 is
|
||||
currently the second ring still attached to the <code>U</code>. This
|
||||
constraint leads to a recursive solution to the puzzle. Like the <a
|
||||
href="hanoi.md">Towers of Hanoi</a>, the number of steps to solve this
|
||||
puzzle is exponential in the number of rings.</p>
|
||||
<p>This puzzle takes other forms as well. One such puzzle is
|
||||
called “Spin-Out”. This puzzle consists of one plastic
|
||||
piece that encases another piece that can slide in and out
|
||||
of it. The movement of the smaller piece is restricted by
|
||||
discs that, when turned to one angle, lock the smaller piece
|
||||
inside the larger one and, when turned the other way, allow
|
||||
it to move. This puzzle is as difficult to describe as the
|
||||
first and, since I don’t have one in front of me, I will not
|
||||
attempt to describe it. The object of this puzzle is to
|
||||
free the smaller piece from the larger one. The other
|
||||
puzzle that is like this one consists of a cylinder with
|
||||
rods protruding from the top. The rods can be slid from the
|
||||
center to the edge of the cylinder constrained by a series
|
||||
of discs in the center. The discs have cuts in them that
|
||||
allow some rods to move and force others in one place based
|
||||
on the relative rotations of the discs. The object here is
|
||||
to move all the rods from the inside to the outside.</p>
|
||||
<p>What makes these puzzles similar is that the physical shapes
|
||||
of the puzzles put the same restrictions on the movement of
|
||||
the pieces. Specifically, there is always one piece that is
|
||||
free to move. The only other piece that is free to move is
|
||||
the second one that is still attached to the base it is
|
||||
trying to be freed from. In the case of the original
|
||||
puzzle, consider the rings numbered from 1 to 6 with ring 1
|
||||
being the one at the closed end of the <code>U</code>. Ring 1 can
|
||||
always be removed from or added to the <code>U</code>. In the initial
|
||||
state, when all rings are around the <code>U</code>, ring 2 is the other
|
||||
one that can be moved because it is second. If ring 1 is
|
||||
removed, then only two operations are possible: the
|
||||
restoration of ring 1 and the removal of ring 3. This is
|
||||
because ring 1 is always movable, and ring 3 is currently
|
||||
the second ring still attached to the <code>U</code>. This constraint
|
||||
leads to a recursive solution to the puzzle. Like the
|
||||
<a href="hanoi.md">Towers of Hanoi</a>, the number of steps to solve this puzzle is
|
||||
exponential in the number of rings.</p>
|
||||
|
||||
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
+45
-65
@@ -123,96 +123,76 @@
|
||||
<!-- 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="tenth-international-obfuscated-c-code-contest">Tenth
|
||||
International Obfuscated C Code Contest</h1>
|
||||
<p>View the <code>index.html</code> web page for the given winning entry
|
||||
for information on how on how to compile it 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>Use <code>make</code> to compile entries. It is possible that on BSD
|
||||
or non-Unix systems the Makefile needs to be changed. See the Makefiles
|
||||
and/or <code>README.md</code> (that are used to build the
|
||||
<code>index.html</code> web page) files for details.</p>
|
||||
<p>Read over the Makefile and/or <code>README.md</code> files for
|
||||
compile/build issues. Your system may require certain changes (add or
|
||||
remove a library, add or remove a <code>#define</code> i.e. the
|
||||
<code>-D</code> flag).</p>
|
||||
<h1 id="tenth-international-obfuscated-c-code-contest">Tenth International Obfuscated C Code Contest</h1>
|
||||
<p>View the <code>index.html</code> web page for the given winning entry for information on how
|
||||
on how to compile it 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>Use <code>make</code> to compile entries. It is possible that on BSD or non-Unix
|
||||
systems the Makefile needs to be changed. See the Makefiles and/or <code>README.md</code>
|
||||
(that are used to build the <code>index.html</code> web page) files for details.</p>
|
||||
<p>Read over the Makefile and/or <code>README.md</code> files for compile/build issues. Your
|
||||
system may require certain changes (add or remove a library, add or remove a
|
||||
<code>#define</code> i.e. the <code>-D</code> flag).</p>
|
||||
<p>Name and address information are separated from the actual program
|
||||
prior to judging. This eliminates any chance that we would bias our
|
||||
judging for/against any person or group.</p>
|
||||
<p>This year was the first year that ANSI C was the default. Use of
|
||||
classic K&R C was allowed so long as ANSI C compilers could still
|
||||
compile the entry. If you do not have an ANSI C compiler, you may not be
|
||||
able to compile the entry, sorry!</p>
|
||||
<h2 id="a-few-notes-regarding-future-contests">A few notes regarding
|
||||
future contests:</h2>
|
||||
<p>Be sure to wait until the 1994 rules are posted before submitting
|
||||
entries. Rules differ from year to year, sometimes in significant
|
||||
ways.</p>
|
||||
compile the entry. If you do not have an ANSI C compiler, you may
|
||||
not be able to compile the entry, sorry!</p>
|
||||
<h2 id="a-few-notes-regarding-future-contests">A few notes regarding future contests:</h2>
|
||||
<p>Be sure to wait until the 1994 rules are posted before submitting entries.
|
||||
Rules differ from year to year, sometimes in significant ways.</p>
|
||||
<p>In 1994, we will retract the guideline that discouraged the use of C
|
||||
constructs such as <code>3["curds"]</code>. At one time, certain ANSI
|
||||
compilers did not consider such expressions to be valid ANSI C. Alert
|
||||
readers noted that the current ANSI standard considered them to be
|
||||
valid. We were unable to find an ANSI C compiler that flagged such
|
||||
expressions as errors.</p>
|
||||
constructs such as <code>3["curds"]</code>. At one time, certain ANSI compilers did
|
||||
not consider such expressions to be valid ANSI C. Alert readers noted
|
||||
that the current ANSI standard considered them to be valid. We were
|
||||
unable to find an ANSI C compiler that flagged such expressions as
|
||||
errors.</p>
|
||||
<p>Please send us comments and suggestions what we have expressed above.
|
||||
Also include anything else that you would like to see in future
|
||||
contests. Send such email to:</p>
|
||||
Also include anything else that you would like to see in future contests.
|
||||
Send such email to:</p>
|
||||
<pre><code>...!{sun,pacbell,uunet,pyramid}!hoptoad!judges
|
||||
judges@toad.com</code></pre>
|
||||
<p>If you use, distribute or publish these entries in some way, please
|
||||
drop us a line. We enjoy seeing who, where and how the contest is
|
||||
used.</p>
|
||||
<p>If you use, distribute or publish these entries in some way, please drop
|
||||
us a line. We enjoy seeing who, where and how the contest is used.</p>
|
||||
<h2 id="final-comments">Final Comments</h2>
|
||||
<p><strong>IMPORTANT NOTE</strong>: The email addresses found above are
|
||||
for historical purposes only, and should not be used today. 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>: The email addresses found above are for historical
|
||||
purposes only, and should not be used today. 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>
|
||||
<h3 id="credits">Credits:</h3>
|
||||
<p>We would like to thank Barbara Frezza for her role as official chef
|
||||
of the contest. Landon Curt Noll and Larry Bassel appreciated the
|
||||
opportunity to serve as official taste testers. And as usual, the food
|
||||
was excellent.</p>
|
||||
of the contest. Landon Curt Noll and Larry Bassel appreciated the opportunity
|
||||
to serve as official taste testers. And as usual, the food was excellent.</p>
|
||||
<h1 id="copyright-and-license">Copyright and License</h1>
|
||||
<p>Copyright (c) 1993,2023, Landon Curt Noll and Larry Bassel. 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) 1993,2023, Landon Curt Noll and Larry Bassel. 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-1993---the-10th-ioccc"><a name=inventory></a><a name=1993></a>Winning
|
||||
Entries of 1993 - The 10th IOCCC</h1>
|
||||
<p><strong>Download IOCCC</strong> <a
|
||||
href="1993/ioccc.1993.tar.bz2">1993 entry source</a></p>
|
||||
<h1 id="winning-entries-of-1993---the-10th-ioccc"><a name=inventory></a><a name=1993></a>Winning Entries of 1993 - The 10th IOCCC</h1>
|
||||
<p><strong>Download IOCCC</strong> <a href="1993/ioccc.1993.tar.bz2">1993 entry source</a></p>
|
||||
<ul>
|
||||
<li><a href="ant/index.html">1993/ant</a> - Best Utility</li>
|
||||
<li><a href="cmills/index.html">1993/cmills</a> - Bill Gates Award</li>
|
||||
<li><a href="dgibson/index.html">1993/dgibson</a> - Best Abuse of the C
|
||||
Preprocessor</li>
|
||||
<li><a href="ejb/index.html">1993/ejb</a> - Best Obfuscated
|
||||
Algorithm</li>
|
||||
<li><a href="jonth/index.html">1993/jonth</a> - Most Obfuscated X
|
||||
Program</li>
|
||||
<li><a href="dgibson/index.html">1993/dgibson</a> - Best Abuse of the C Preprocessor</li>
|
||||
<li><a href="ejb/index.html">1993/ejb</a> - Best Obfuscated Algorithm</li>
|
||||
<li><a href="jonth/index.html">1993/jonth</a> - Most Obfuscated X Program</li>
|
||||
<li><a href="leo/index.html">1993/leo</a> - Best Game</li>
|
||||
<li><a href="lmfjyh/index.html">1993/lmfjyh</a> - Most Versatile
|
||||
Source</li>
|
||||
<li><a href="lmfjyh/index.html">1993/lmfjyh</a> - Most Versatile Source</li>
|
||||
<li><a href="plummer/index.html">1993/plummer</a> - Best One Liner</li>
|
||||
<li><a href="rince/index.html">1993/rince</a> - Most Well Rounded</li>
|
||||
<li><a href="schnitzi/index.html">1993/schnitzi</a> - Obfuscated
|
||||
Intelligence Award</li>
|
||||
<li><a href="vanb/index.html">1993/vanb</a> - Most Irregular
|
||||
Expression</li>
|
||||
<li><a href="schnitzi/index.html">1993/schnitzi</a> - Obfuscated Intelligence Award</li>
|
||||
<li><a href="vanb/index.html">1993/vanb</a> - Most Irregular Expression</li>
|
||||
</ul>
|
||||
<p> <strong>Jump to:</strong> <a href="#">top</a></p>
|
||||
|
||||
|
||||
+27
-48
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Jon_Thingvold">Jon
|
||||
Thingvold</a><br> Location: <a href="../../location.html#NO">NO</a> -
|
||||
<em>Kingdom of Norway</em> (<em>Norway</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Jon_Thingvold">Jon Thingvold</a><br>
|
||||
Location: <a href="../../location.html#NO">NO</a> - <em>Kingdom of Norway</em> (<em>Norway</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -140,72 +140,51 @@ Thingvold</a><br> Location: <a href="../../location.html#NO">NO</a> -
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>NOTE: this entry requires <code>X11/Xlib.h</code> header file and the
|
||||
X11 library to compile. macOS users running Mountain Lion and later will
|
||||
need to download and install <a
|
||||
href="https://www.xquartz.org">XQuartz</a> in order to compile and run
|
||||
this entry.</p>
|
||||
<p>NOTE: this entry requires <code>X11/Xlib.h</code> header file and the X11 library to
|
||||
compile. macOS users running Mountain Lion and later will need to download and
|
||||
install <a href="https://www.xquartz.org">XQuartz</a> in order to compile and run this
|
||||
entry.</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> all</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="ex">./jonth</span> <span class="co"># must be run on an X11 server</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Use <code>h</code> and <code>l</code> to shift objects left or right.
|
||||
Use <code>k</code> to rotate and press SPACE to drop.</p>
|
||||
<p>This program’s output may be even more obfuscated when played on
|
||||
inverse video. :-)</p>
|
||||
<p>Use <code>h</code> and <code>l</code> to shift objects left or right. Use <code>k</code> to
|
||||
rotate and press SPACE to drop.</p>
|
||||
<p>This program’s output may be even more obfuscated when played
|
||||
on inverse video. :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This is <code>jonth</code> (<code>jon's t(h)etris</code>) for the X
|
||||
Window System.</p>
|
||||
<p>This is <code>jonth</code> (<code>jon's t(h)etris</code>) for the X Window System.</p>
|
||||
<p>This program is also an example of data abstraction. The X array is
|
||||
after initialization hidden by the well defined macros <code>t</code>,
|
||||
<code>u</code> and <code>F</code>.</p>
|
||||
<p>This program is highly portable as it runs on a “Notebook” size
|
||||
SPARC. This program will not work on machines where
|
||||
<code>sizeof(int)!=sizeof(void *)</code>.</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>
|
||||
after initialization hidden by the well defined macros <code>t</code>, <code>u</code> and <code>F</code>.</p>
|
||||
<p>This program is highly portable as it runs on a “Notebook” size SPARC.
|
||||
This program will not work on machines where <code>sizeof(int)!=sizeof(void *)</code>.</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-1993jonth"><a name="inventory"></a>Inventory for
|
||||
1993/jonth</h1>
|
||||
<h1 id="inventory-for-1993jonth"><a name="inventory"></a>Inventory for 1993/jonth</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/1993/jonth/jonth.c">jonth.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/jonth/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/jonth/jonth.orig.c">jonth.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1993_jonth.tar.bz2">1993_jonth.tar.bz2</a> - download entry
|
||||
source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/jonth/jonth.c">jonth.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/jonth/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/jonth/jonth.orig.c">jonth.orig.c</a> - original source</li>
|
||||
<li><a href="1993_jonth.tar.bz2">1993_jonth.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/1993/jonth/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/jonth/.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/1993/jonth/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/jonth/.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/1993/jonth/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/jonth/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
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Leonid_A_Broukhis">Leonid A.
|
||||
Broukhis</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#Leonid_A_Broukhis">Leonid A. Broukhis</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 -->
|
||||
@@ -149,40 +149,36 @@ Broukhis</a><br> Location: <a href="../../location.html#US">US</a> -
|
||||
<p>where:</p>
|
||||
<p>[colors] is the number of possible colors (1 to 15) (default: 6)</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>By default, the number of colors is 6. You may specify a value of
|
||||
between 1 and 15 colors. See the author’s notes for instructions of how
|
||||
to play.</p>
|
||||
<p>By default, the number of colors is 6. You may specify a
|
||||
value of between 1 and 15 colors. See the author’s notes
|
||||
for instructions of how to play.</p>
|
||||
<p>We look forward to more entries from the newer members of the
|
||||
International Internet community.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program plays
|
||||
[Mastermind](https://en.wikipedia.org/wiki/Mastermind_(board_game), if
|
||||
you call it by a name ending by ‘d’, otherwise it <em>solves</em>
|
||||
Mastermind. Call it without parameters to use 6 digits (colors), or
|
||||
indicate the number of possible digits (you cannot change the number of
|
||||
positions so easily).</p>
|
||||
[Mastermind](https://en.wikipedia.org/wiki/Mastermind_(board_game), if you call
|
||||
it by a name ending by ‘d’, otherwise it <em>solves</em> Mastermind. Call it without
|
||||
parameters to use 6 digits (colors), or indicate the number of possible digits
|
||||
(you cannot change the number of positions so easily).</p>
|
||||
<p>The number in parentheses is the number of possible combinations,
|
||||
based on previous questions and answers. If you solve the puzzle, “(1)”
|
||||
indicates that your previous moves are enough to give correct answer. If
|
||||
the program acts as solver and terminates prematurely, it means that
|
||||
you’re mistaken in your answers to its question(s). Question marks
|
||||
indicate the number of digits you have to enter (either 4 when you guess
|
||||
or 2 when computer guesses).</p>
|
||||
<p>Note that the program uses the same code for both player and solver,
|
||||
and the only place where it makes a difference is the interactive part.
|
||||
Many obfuscations have been made to achieve this. An expression giving
|
||||
<code>(bulls * 16 + cows)</code> from two numbers is, however, quite
|
||||
straightforward :-) , as well as the arithmetic of binary coded
|
||||
colors-base numbers is.</p>
|
||||
<h3
|
||||
id="limitations-maximum-number-of-digits-colors-is-14-1..f.">Limitations:
|
||||
maximum number of digits (colors) is 14 (1..F).</h3>
|
||||
based on previous questions and answers. If you solve the puzzle,
|
||||
“(1)” indicates that your previous moves are enough to give correct
|
||||
answer. If the program acts as solver and terminates prematurely,
|
||||
it means that you’re mistaken in your answers to its question(s).
|
||||
Question marks indicate the number of digits you have to enter
|
||||
(either 4 when you guess or 2 when computer guesses).</p>
|
||||
<p>Note that the program uses the same code for both player and
|
||||
solver, and the only place where it makes a difference is the
|
||||
interactive part. Many obfuscations have been made to achieve
|
||||
this. An expression giving <code>(bulls * 16 + cows)</code> from two numbers
|
||||
is, however, quite straightforward :-) , as well as the arithmetic
|
||||
of binary coded colors-base numbers is.</p>
|
||||
<h3 id="limitations-maximum-number-of-digits-colors-is-14-1..f.">Limitations: maximum number of digits (colors) is 14 (1..F).</h3>
|
||||
<p>Suggestions: Use terminal (or emulator) with non-destructive
|
||||
backspaces. Do “disable scrolling” on cmdtool or similar emulators.</p>
|
||||
<h4 id="bugs">Bugs</h4>
|
||||
<p>Please don’t type ^D at the prompt!!</p>
|
||||
<h5 id="example-suppose-we-think-of-1234">EXAMPLE: Suppose we think of
|
||||
1234</h5>
|
||||
<h5 id="example-suppose-we-think-of-1234">EXAMPLE: Suppose we think of 1234</h5>
|
||||
<pre><code>$ ./leo
|
||||
(1296): 6433
|
||||
?? 12 # one 3 is a bull, another is a cow, and 4 is a cow
|
||||
@@ -194,8 +190,7 @@ backspaces. Do “disable scrolling” on cmdtool or similar emulators.</p>
|
||||
?? 13 # 3 is a bull; 1, 2 and 4 are cows
|
||||
(1): 1234
|
||||
?? 40 # you may enter everything there</code></pre>
|
||||
<h5 id="example-guess-the-computers-number">EXAMPLE: Guess the
|
||||
computer’s number</h5>
|
||||
<h5 id="example-guess-the-computers-number">EXAMPLE: Guess the computer’s number</h5>
|
||||
<pre><code>$ ./mind
|
||||
(1296): ???? 1122 # my strategy isn't the best, just as example
|
||||
00
|
||||
@@ -209,50 +204,33 @@ computer’s number</h5>
|
||||
00
|
||||
(1): ???? 6444
|
||||
40 # we have guessed the number</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-1993leo"><a name="inventory"></a>Inventory for
|
||||
1993/leo</h1>
|
||||
<h1 id="inventory-for-1993leo"><a name="inventory"></a>Inventory for 1993/leo</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/1993/leo/leo.c">leo.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/leo/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/leo/leo.orig.c">leo.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1993_leo.tar.bz2">1993_leo.tar.bz2</a> - download entry
|
||||
source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/leo/leo.c">leo.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/leo/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/leo/leo.orig.c">leo.orig.c</a> - original source</li>
|
||||
<li><a href="1993_leo.tar.bz2">1993_leo.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/1993/leo/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/leo/.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/1993/leo/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/leo/.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/1993/leo/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/leo/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+96
-130
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Jyrki_Holopainen">Jyrki
|
||||
Holopainen</a><br> Location: <a href="../../location.html#FI">FI</a> -
|
||||
<em>Republic of Finland </em> (<em>Finland</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Jyrki_Holopainen">Jyrki Holopainen</a><br>
|
||||
Location: <a href="../../location.html#FI">FI</a> - <em>Republic of Finland </em> (<em>Finland</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,114 +142,102 @@ Holopainen</a><br> Location: <a href="../../location.html#FI">FI</a> -
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>If you have gcc < 2.3.3 you can build this entry like:</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> all</span></code></pre></div>
|
||||
<p>This will create a file called
|
||||
<code>";main(){puts("Hello World!");}char*C=".c</code> which would print
|
||||
<code>Hello World!</code> when compiled.</p>
|
||||
<p>For an explanation of why and how this works see the author’s
|
||||
remarks. The gist of the entry itself, however, is the file name
|
||||
<em>itself <strong>is</strong> the code</em>.</p>
|
||||
<p>NOTE: we delete the temporary file whether or not the compilation
|
||||
succeeds because it is an unsafe filename and not doing so would cause
|
||||
problems for anyone running <code>make</code>.</p>
|
||||
<p>This entry will not compile with gcc < 2.3.3 as it relies on a bug
|
||||
which was fixed in gcc 2.3.3 which was fixed a very long time ago now.
|
||||
There is an alternate version for <a
|
||||
href="https://www.collinsdictionary.com/dictionary/english/everyone">those
|
||||
of us</a> with gcc >= 2.3.3. See <a href="#alternate-code">Alternate
|
||||
code</a> section below for more details.</p>
|
||||
<p>However, there is an another version that will be compiled in the
|
||||
extremely likely case this fails. This should happen automatically. See
|
||||
<a href="#alternate-code">Alternate code</a> below for more details on
|
||||
it.</p>
|
||||
<p>This will create a file called <code>";main(){puts("Hello World!");}char*C=".c</code> which
|
||||
would print <code>Hello World!</code> when compiled.</p>
|
||||
<p>For an explanation of why and how this works see the author’s remarks. The gist
|
||||
of the entry itself, however, is the file name <em>itself <strong>is</strong> the code</em>.</p>
|
||||
<p>NOTE: we delete the temporary file whether or not the compilation succeeds
|
||||
because it is an unsafe filename and not doing so would cause problems for
|
||||
anyone running <code>make</code>.</p>
|
||||
<p>This entry will not compile with gcc < 2.3.3 as it relies on a bug which was
|
||||
fixed in gcc 2.3.3 which was fixed a very long time ago now. There is an
|
||||
alternate version for <a href="https://www.collinsdictionary.com/dictionary/english/everyone">those of
|
||||
us</a> with gcc >=
|
||||
2.3.3. See <a href="#alternate-code">Alternate code</a> section below for more details.</p>
|
||||
<p>However, there is an another version that will be compiled in the extremely
|
||||
likely case this fails. This should happen automatically. See <a href="#alternate-code">Alternate
|
||||
code</a> below for more details on it.</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#1993_lmfjyh">1993 lmfjyh bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1993_lmfjyh">1993 lmfjyh bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<p>If you have gcc < 2.3.3 (i.e. the entry can compile):</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">./lmfjyh</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This version does what the code did but in a way that will work with
|
||||
modern compilers. We’d like to say there’s something special about it
|
||||
but there isn’t. Nonetheless it will be compiled in case the original
|
||||
entry fails to compile (which will happen unless you have gcc <
|
||||
2.3.3.</p>
|
||||
<p>This version does what the code did but in a way that will work with modern
|
||||
compilers. We’d like to say there’s something special about it but there isn’t.
|
||||
Nonetheless it will be compiled in case the original entry fails to compile
|
||||
(which will happen unless you have gcc < 2.3.3.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>Should you wish to build this version manually:</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>lmfjyh.alt</code> as you would <code>lmfjyh</code> above.
|
||||
Note that other code could also be done with the bug that the entry
|
||||
abuses but that would have to be manually programmed for this version;
|
||||
see the author’s remarks for more details.</p>
|
||||
<p>Use <code>lmfjyh.alt</code> as you would <code>lmfjyh</code> above. Note that other code could also be
|
||||
done with the bug that the entry abuses but that would have to be manually
|
||||
programmed for this version; see the author’s remarks for more details.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>There’s more than one way to get around disk quotas. :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>“Practical and efficient method of compressing source code”.</p>
|
||||
<h3 id="introduction">Introduction</h3>
|
||||
<p>I will shortly present a totally new compression method. It may be
|
||||
used to compress any types of files, but it works best with C-source
|
||||
code.</p>
|
||||
<p>As an example, I have taken a simple “Hello world!” program that
|
||||
should be familiar to all C-programmers.</p>
|
||||
<h4 id="listing-1-a-simple-hello-world-program">Listing 1: A simple
|
||||
“Hello World” program</h4>
|
||||
<p>I will shortly present a totally new compression method.
|
||||
It may be used to compress any types of files, but it works
|
||||
best with C-source code.</p>
|
||||
<p>As an example, I have taken a simple “Hello world!” program
|
||||
that should be familiar to all C-programmers.</p>
|
||||
<h4 id="listing-1-a-simple-hello-world-program">Listing 1: A simple “Hello World” program</h4>
|
||||
<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>main<span class="op">()</span></span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> puts<span class="op">(</span><span class="st">"Hello World!"</span><span class="op">);</span></span>
|
||||
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
|
||||
<h3 id="packing-method">Packing method</h3>
|
||||
<p>Normally a file name is used only to identify the file, but this new
|
||||
revolutionary method introduces a totally new concept: <strong>THE FILE
|
||||
NAME <em>IS</em> THE PROGRAM</strong>. There is no need to waste
|
||||
valuable disk space to store source code. The program is embedded in the
|
||||
file name, only a minor portion of it is inside the file.</p>
|
||||
<h4 id="listing-2-compressed-hello-world">Listing 2: Compressed “Hello
|
||||
world”</h4>
|
||||
revolutionary method introduces a totally new concept: <strong>THE FILE NAME <em>IS</em> THE
|
||||
PROGRAM</strong>. There is no need to waste valuable disk space to store source code.
|
||||
The program is embedded in the file name, only a minor portion of it is inside
|
||||
the file.</p>
|
||||
<h4 id="listing-2-compressed-hello-world">Listing 2: Compressed “Hello world”</h4>
|
||||
<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="dt">char</span><span class="op">*</span>_<span class="op">=</span>__FILE__<span class="op">;</span></span></code></pre></div>
|
||||
<h4 id="listing-3-code-embedded-in-the-file-name">Listing 3: Code
|
||||
embedded in the file name</h4>
|
||||
<h4 id="listing-3-code-embedded-in-the-file-name">Listing 3: Code embedded in the file name</h4>
|
||||
<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="st">";main(){puts("</span>Hello World<span class="op">!</span><span class="st">");}char*C="</span><span class="op">.</span>c</span></code></pre></div>
|
||||
<p>The sample program in listing 1 is 36 bytes long. By using the new
|
||||
compression method, the example program may be squeezed to sixteen
|
||||
bytes. In the example the compression ratio is 2:1. It is evident that
|
||||
the longer the program is, the better the compression ratio is. The
|
||||
maximum compression ratio in a UNIX environment is 254:16 which equals
|
||||
approximately to 16:1. By using the method a one megabyte of source code
|
||||
file can be compressed to 64 kilobytes.</p>
|
||||
bytes. In the example the compression ratio is 2:1. It is evident
|
||||
that the longer the program is, the better the compression ratio
|
||||
is. The maximum compression ratio in a UNIX environment is 254:16
|
||||
which equals approximately to 16:1. By using the method a one
|
||||
megabyte of source code file can be compressed to 64 kilobytes.</p>
|
||||
<p>One might easily think that the program could be compressed to a
|
||||
single byte by writing a one character long preprocessor directive in
|
||||
the source file and defining the actual source code in the command line,
|
||||
e.g. <code>cc hello.c -DX='main(){puts ...'</code>. With this method
|
||||
nothing is gained, since the compiling commands must be stored in a
|
||||
file, and that takes even more space than writing the code in a source
|
||||
file as presented in listing 1.</p>
|
||||
<h3 id="packing-files-in-a-unix-environment">Packing files in a UNIX
|
||||
environment</h3>
|
||||
single byte by writing a one character long preprocessor directive
|
||||
in the source file and defining the actual source code in the
|
||||
command line, e.g. <code>cc hello.c -DX='main(){puts ...'</code>. With this
|
||||
method nothing is gained, since the compiling commands must be
|
||||
stored in a file, and that takes even more space than writing the
|
||||
code in a source file as presented in listing 1.</p>
|
||||
<h3 id="packing-files-in-a-unix-environment">Packing files in a UNIX environment</h3>
|
||||
<p>In a UNIX environment it is possible to write almost any program by
|
||||
including the code in file names. Since <code>/</code> is used to
|
||||
separate path components and cannot therefore exist in a file name, all
|
||||
including the code in file names. Since <code>/</code> is used to separate
|
||||
path components and cannot therefore exist in a file name, all
|
||||
features of the C language cannot be used.</p>
|
||||
<p>In C, the <code>/</code> is used as a division operator and it may
|
||||
also be a part of a comment start and end identifier. This, however, is
|
||||
not a dangerous limitation, since practice has shown that comments are
|
||||
almost totally unnecessary. A real programmer can more easily understand
|
||||
pure source code, and misleading comments are disastrous. The division
|
||||
operation may be replaced with <code>pow(x, -1)</code> and
|
||||
multiplication when using real numbers or with <code>div()</code>
|
||||
function when using integers.</p>
|
||||
<p>In C, the <code>/</code> is used as a division operator and it may also be a
|
||||
part of a comment start and end identifier. This, however, is not a
|
||||
dangerous limitation, since practice has shown that comments are
|
||||
almost totally unnecessary. A real programmer can more easily
|
||||
understand pure source code, and misleading comments are
|
||||
disastrous. The division operation may be replaced with <code>pow(x, -1)</code>
|
||||
and multiplication when using real numbers or with <code>div()</code> function
|
||||
when using integers.</p>
|
||||
<p>Large programs must be separated into small modules. This enforces
|
||||
people to write better programs, since monolithic programming style
|
||||
cannot be used. Program development will also be faster, no extra code
|
||||
needs be recompiled after changes have been made.</p>
|
||||
<h3 id="usage-with-currently-available-tools">Usage with currently
|
||||
available tools</h3>
|
||||
<p>I have tested how well this new method works with currently available
|
||||
programming tools.</p>
|
||||
cannot be used. Program development will also be faster, no extra
|
||||
code needs be recompiled after changes have been made.</p>
|
||||
<h3 id="usage-with-currently-available-tools">Usage with currently available tools</h3>
|
||||
<p>I have tested how well this new method works with currently
|
||||
available programming tools.</p>
|
||||
<p>Any ANSI conforming C-compiler that runs under a REAL operating
|
||||
system should be able to compile the code (there might be problems with
|
||||
some older UNIX variants).</p>
|
||||
system should be able to compile the code (there might be problems
|
||||
with some older UNIX variants).</p>
|
||||
<h3 id="compilers">Compilers</h3>
|
||||
<p>These worked:</p>
|
||||
<ul>
|
||||
@@ -263,79 +251,57 @@ some older UNIX variants).</p>
|
||||
<li>cc/xlc (AIX) - could not open source</li>
|
||||
</ul>
|
||||
<h3 id="other-tools">Other tools</h3>
|
||||
<h4 id="debuggers-tested-at-sunos-4.1.2">Debuggers: (tested at SunOS
|
||||
4.1.2)</h4>
|
||||
<h4 id="debuggers-tested-at-sunos-4.1.2">Debuggers: (tested at SunOS 4.1.2)</h4>
|
||||
<ul>
|
||||
<li><p><code>dbx</code> - Quit with a very ‘informative’ error message:
|
||||
<code>"dbx: fatal error: Is a directory"</code></p></li>
|
||||
<li><p>gdb - Printed almost the same error message
|
||||
<code>": Is a directory"</code>. It was, however, possible to step
|
||||
through the code but not list it.</p></li>
|
||||
<li><p>gdb - Printed almost the same error message <code>": Is a directory"</code>.
|
||||
It was, however, possible to step through the code but
|
||||
not list it.</p></li>
|
||||
</ul>
|
||||
<h4 id="lints">Lints</h4>
|
||||
<p>None of the lints tested environments were able to parse the
|
||||
file.</p>
|
||||
<p>None of the lints tested environments were able to parse the file.</p>
|
||||
<h3 id="conclusions">Conclusions</h3>
|
||||
<p>The method can be used to compress any type of file and the
|
||||
compression ratios are even better when compressing files other than C
|
||||
source. For example plain text files may be compressed with INFINITE
|
||||
compression ratio. It is trivial task to compress a 100 kilobytes long
|
||||
text file in about 400 files whose lengths are zero bytes. The drawback
|
||||
is that the files must be unpacked before they can be used, so a large
|
||||
amount of temporary disk space is needed, while C source is totally
|
||||
usable in the compressed form.</p>
|
||||
<p>The method can be used to compress any type of file and the compression ratios
|
||||
are even better when compressing files other than C source. For example plain
|
||||
text files may be compressed with INFINITE compression ratio. It is trivial task
|
||||
to compress a 100 kilobytes long text file in about 400 files whose lengths are
|
||||
zero bytes. The drawback is that the files must be unpacked before they can be
|
||||
used, so a large amount of temporary disk space is needed, while C source is
|
||||
totally usable in the compressed form.</p>
|
||||
<p>Evidently, there is a long way to go before this new programming
|
||||
technique may be widely used, since currently there are only few tools
|
||||
supporting it. The advantages over the traditional methods are, however,
|
||||
so great that there is no doubt that this method will be new
|
||||
standard.</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>
|
||||
technique may be widely used, since currently there are only few
|
||||
tools supporting it. The advantages over the traditional methods
|
||||
are, however, so great that there is no doubt that this method will
|
||||
be new standard.</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-1993lmfjyh"><a name="inventory"></a>Inventory for
|
||||
1993/lmfjyh</h1>
|
||||
<h1 id="inventory-for-1993lmfjyh"><a name="inventory"></a>Inventory for 1993/lmfjyh</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/1993/lmfjyh/lmfjyh.c">lmfjyh.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/lmfjyh.alt.c">lmfjyh.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/lmfjyh.orig.c">lmfjyh.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1993_lmfjyh.tar.bz2">1993_lmfjyh.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/lmfjyh.c">lmfjyh.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/lmfjyh.alt.c">lmfjyh.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/lmfjyh.orig.c">lmfjyh.orig.c</a> - original source</li>
|
||||
<li><a href="1993_lmfjyh.tar.bz2">1993_lmfjyh.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/1993/lmfjyh/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/.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/1993/lmfjyh/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/.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/1993/lmfjyh/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/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
-106
@@ -130,8 +130,8 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Mark_Plummer">Mark Plummer</a><br>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown
|
||||
location</em> <br><br></li>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -141,16 +141,15 @@ location</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> alt</span></code></pre></div>
|
||||
<p>We recommend that you try the alternate version first to get a better
|
||||
idea of what this entry looked like back in 1993. The alternate version
|
||||
sleeps (via <code>usleep(3)</code>) in between writes, defaulting at
|
||||
1000 microseconds (but reconfigurable). If you wish to see the original
|
||||
entry then see <a href="#original-code">original code</a> below.</p>
|
||||
<p>If you wish to speed the entry up, say to 500 microseconds between
|
||||
writes, try:</p>
|
||||
<p>We recommend that you try the alternate version first to get a better idea of
|
||||
what this entry looked like back in 1993. The alternate version sleeps (via
|
||||
<code>usleep(3)</code>) in between writes, defaulting at 1000 microseconds (but
|
||||
reconfigurable). If you wish to see the original entry then see <a href="#original-code">original
|
||||
code</a> below.</p>
|
||||
<p>If you wish to speed the entry up, say to 500 microseconds between writes, try:</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 SLEEP=500 alt</span></code></pre></div>
|
||||
<p>Alternatively if you wish to slow it down, say to 1500 microseconds
|
||||
between writes, try:</p>
|
||||
<p>Alternatively if you wish to slow it down, say to 1500 microseconds between
|
||||
writes, 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> clobber SLEEP=1500 alt</span></code></pre></div>
|
||||
<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">./plummer.alt</span> number arg</span></code></pre></div>
|
||||
@@ -159,9 +158,8 @@ between writes, try:</p>
|
||||
<li>number is a number (try 21701)</li>
|
||||
<li>arg is any argument</li>
|
||||
</ul>
|
||||
<p>Wait until you’re bored enough to send intr/ctrl-c to exit or until
|
||||
the <a href="https://hitchhikers.fandom.com/wiki/Vogon">Vogons</a> build
|
||||
that <a href="https://hitchhikers.fandom.com/wiki/Bypass">hyperspace
|
||||
<p>Wait until you’re bored enough to send intr/ctrl-c to exit or until the
|
||||
<a href="https://hitchhikers.fandom.com/wiki/Vogon">Vogons</a> build that <a href="https://hitchhikers.fandom.com/wiki/Bypass">hyperspace
|
||||
bypass</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">./try.alt.sh</span></span>
|
||||
@@ -180,14 +178,13 @@ bypass</a>.</p>
|
||||
<span id="cb5-14"><a href="#cb5-14" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb5-15"><a href="#cb5-15" aria-hidden="true" tabindex="-1"></a><span class="va">SLEEP</span><span class="op">=</span>1200 <span class="ex">./try.alt.sh</span> xyzzyzzyx 5555</span></code></pre></div>
|
||||
<h2 id="original-code">Original code:</h2>
|
||||
<p>This version, the original, does not sleep in between writes, and is
|
||||
thus much faster (depending on the <code>SLEEP</code> parameter
|
||||
specified in the build of <code>alt</code>, of course).</p>
|
||||
<p>This version, the original, does not sleep in between writes, and is thus much
|
||||
faster (depending on the <code>SLEEP</code> parameter specified in the build of <code>alt</code>, of
|
||||
course).</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>plummer</code> as you would <code>plummer.alt</code>
|
||||
above.</p>
|
||||
<p>Use <code>plummer</code> as you would <code>plummer.alt</code> above.</p>
|
||||
<h3 id="original-try">Original try:</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">./try.sh</span></span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
@@ -206,113 +203,84 @@ above.</p>
|
||||
<p>For extra credit: What happens when ‘number’ contains non-numeric
|
||||
characters, and why?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program prints out all numbers up to a given number of digits on
|
||||
a single line. When the largest number is reached, the program starts
|
||||
again with 0. It takes two arguments: the first argument specifies the
|
||||
number to start counting from and uses leading <code>0</code>s to
|
||||
indicate the number of digits, the second argument can be anything but
|
||||
must be present.</p>
|
||||
<p>Variable names are single characters chosen for their similarity to
|
||||
other characters (<code>O</code> for <code>0</code> (zero),
|
||||
<code>l</code> for <code>1</code> (one), <code>S</code> for
|
||||
<code>5</code> (five) in some fonts, and <code>_</code> for … well
|
||||
nothing really, but it is easy to miss). To prevent the need for
|
||||
<code>strlen()</code>, the fact that argv is laid out sequentially is
|
||||
exploited
|
||||
(i.e. <code>argv[i + 1] == argv[i] + strlen(argv[i]) + 1</code>). This
|
||||
is not portable (by the books), but it seems to work everywhere I try
|
||||
(actually, for VMS, that only holds for <code>i > 1</code>). Also, I
|
||||
depend on the fact that a carriage return causes the line just written
|
||||
to be overwritten. <code>lint</code> (and most compilers) complain that
|
||||
there is no control path leading to a return from <code>main()</code>.
|
||||
At 125 characters, it still fits on a single line (for those of us who
|
||||
don’t mind ruining our eyes with 132 column screens).</p>
|
||||
<p>This program prints out all numbers up to a given number of digits
|
||||
on a single line. When the largest number is reached, the program
|
||||
starts again with 0. It takes two arguments: the first argument
|
||||
specifies the number to start counting from and uses leading <code>0</code>s to
|
||||
indicate the number of digits, the second argument can be anything
|
||||
but must be present.</p>
|
||||
<p>Variable names are single characters chosen for their similarity to other
|
||||
characters (<code>O</code> for <code>0</code> (zero), <code>l</code> for <code>1</code> (one), <code>S</code> for <code>5</code> (five) in some
|
||||
fonts, and <code>_</code> for … well nothing really, but it is easy to miss). To
|
||||
prevent the need for <code>strlen()</code>, the fact that argv is laid out sequentially is
|
||||
exploited (i.e. <code>argv[i + 1] == argv[i] + strlen(argv[i]) + 1</code>). This is not
|
||||
portable (by the books), but it seems to work everywhere I try (actually, for
|
||||
VMS, that only holds for <code>i > 1</code>). Also, I depend on the fact that a carriage
|
||||
return causes the line just written to be overwritten. <code>lint</code> (and most
|
||||
compilers) complain that there is no control path leading to a return from
|
||||
<code>main()</code>. At 125 characters, it still fits on a single line (for those of us
|
||||
who don’t mind ruining our eyes with 132 column screens).</p>
|
||||
<h3 id="spoiler">Spoiler:</h3>
|
||||
<p>The first statement points the base of <code>l</code> (the argument
|
||||
vector) to be the first argument by incrementing it. It then assigns
|
||||
<code>O</code> to point to the character before the first character of
|
||||
the second argument which also happens to be the NUL termination of the
|
||||
first argument. <code>*O</code> gets a <code>\r</code> assigned to it.
|
||||
Finally <code>0</code> is assigned to the first character of the second
|
||||
argument which has the effect of NUL terminating the first argument
|
||||
after the carriage return had removed its NUL termination. I really
|
||||
tried to make the last part of that statement part of the original
|
||||
expression, but the best I could do was attach it with a comma (against
|
||||
the advice of K&R). The for loop runs the next for loop continuously
|
||||
(actually until the machine crashes or the user gets tired of seeing the
|
||||
<p>The first statement points the base of <code>l</code> (the argument vector) to
|
||||
be the first argument by incrementing it. It then assigns <code>O</code> to
|
||||
point to the character before the first character of the second
|
||||
argument which also happens to be the NUL termination of the first
|
||||
argument. <code>*O</code> gets a <code>\r</code> assigned to it. Finally <code>0</code> is assigned to
|
||||
the first character of the second argument which has the effect of
|
||||
NUL terminating the first argument after the carriage return had
|
||||
removed its NUL termination. I really tried to make the last part
|
||||
of that statement part of the original expression, but the best I
|
||||
could do was attach it with a comma (against the advice of K&R).
|
||||
The for loop runs the next for loop continuously (actually until
|
||||
the machine crashes or the user gets tired of seeing the
|
||||
counting). The next for loop is the meat of the program. In the
|
||||
initialization statement, the string pointed to by <code>l</code> (the
|
||||
first argument containing the digits used for counting followed by a
|
||||
<code>\r</code>) is printed, and <code>_</code> is started at the least
|
||||
significant digit in the string. In the test portion, <code>_</code> is
|
||||
ensured not to be past the beginning of the string (the most significant
|
||||
digit), and the digit pointed to by <code>_</code> is incremented and
|
||||
checked to be sure that it <em>is</em> greater than <code>9</code>
|
||||
(written here as <code>(S+*O+S)*S</code>). If the test fails, either the
|
||||
string has been incremented or each digit in the string has been reset
|
||||
to <code>0</code>. If the test succeeded, the iteration statement
|
||||
assigns <code>0</code> (written here as <code>(S+*O)*S</code> (which has
|
||||
the added bonus of having the code be a cry for help)) to
|
||||
<code>*_</code> and decrements <code>_</code> to point to the next more
|
||||
significant digit to be incremented; it is done only when a carry
|
||||
situation results (<code>*_</code> has been incremented past
|
||||
<code>9</code>).</p>
|
||||
initialization statement, the string pointed to by <code>l</code> (the first
|
||||
argument containing the digits used for counting followed by a <code>\r</code>)
|
||||
is printed, and <code>_</code> is started at the least significant digit in the
|
||||
string. In the test portion, <code>_</code> is ensured not to be past the
|
||||
beginning of the string (the most significant digit), and the digit
|
||||
pointed to by <code>_</code> is incremented and checked to be sure that it <em>is</em>
|
||||
greater than <code>9</code> (written here as <code>(S+*O+S)*S</code>). If the test fails,
|
||||
either the string has been incremented or each digit in the string
|
||||
has been reset to <code>0</code>. If the test succeeded, the iteration
|
||||
statement assigns <code>0</code> (written here as <code>(S+*O)*S</code> (which has the
|
||||
added bonus of having the code be a cry for help)) to <code>*_</code> and
|
||||
decrements <code>_</code> to point to the next more significant digit to be
|
||||
incremented; it is done only when a carry situation results (<code>*_</code> has
|
||||
been incremented past <code>9</code>).</p>
|
||||
<p>The inspiration for this program came from actual code which dealt
|
||||
with scanning for a unique temporary filename by appending a
|
||||
successively larger number to the end of a string.</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-1993plummer"><a name="inventory"></a>Inventory for
|
||||
1993/plummer</h1>
|
||||
<h1 id="inventory-for-1993plummer"><a name="inventory"></a>Inventory for 1993/plummer</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/1993/plummer/plummer.c">plummer.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/plummer.alt.c">plummer.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/plummer.orig.c">plummer.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/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/1993/plummer/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1993_plummer.tar.bz2">1993_plummer.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/plummer.c">plummer.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/plummer.alt.c">plummer.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/plummer.orig.c">plummer.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/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/1993/plummer/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="1993_plummer.tar.bz2">1993_plummer.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/1993/plummer/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/.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/1993/plummer/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/.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/1993/plummer/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+40
-46
@@ -121,75 +121,69 @@
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h1 id="implementation-notes">Implementation notes</h1>
|
||||
<p>Due to the long time this has been slowly evolving, it’s hard to
|
||||
describe quite whether it’s been <code>implemented</code>. I think
|
||||
perhaps evolve is a better term. The basic concept behind the program is
|
||||
to describe a game as a simple, slightly cheaty, cellular automata
|
||||
system, with some of the transitions bound to key presses.</p>
|
||||
<p>For instance, assume you wish to make a boulder <code>o</code> roll
|
||||
off a hill <code>/</code> A standard automata would have 2 rules
|
||||
something like this:</p>
|
||||
<p>Due to the long time this has been slowly evolving, it’s hard to describe
|
||||
quite whether it’s been <code>implemented</code>. I think perhaps evolve is a better
|
||||
term. The basic concept behind the program is to describe a game as a simple,
|
||||
slightly cheaty, cellular automata system, with some of the transitions
|
||||
bound to key presses.</p>
|
||||
<p>For instance, assume you wish to make a boulder <code>o</code> roll off a hill <code>/</code>
|
||||
A standard automata would have 2 rules something like this:</p>
|
||||
<pre><code>
|
||||
o.. ...
|
||||
\.. --> 'o' .o. --> '.'
|
||||
... .\.</code></pre>
|
||||
<p>However, the system I devised, in order to keep things small and
|
||||
neat(!), was to define a 3x3 to 3x3 map (instead of the 3x3 to 1x1 shown
|
||||
above). Hence:</p>
|
||||
<p>However, the system I devised, in order to keep things small and neat(!),
|
||||
was to define a 3x3 to 3x3 map (instead of the 3x3 to 1x1 shown above).
|
||||
Hence:</p>
|
||||
<pre><code> .o. ...
|
||||
.\. --> .\o
|
||||
... ...</code></pre>
|
||||
<p>This does of course have the odd problem with clashes. What if we
|
||||
want to roll two boulders down simultaneously towards the same square. I
|
||||
perform no buffering, and so this situation is just a ‘fight it out’ and
|
||||
let which ever transition has priority win. Such a case may produce the
|
||||
following change of maps (depending on which ‘roll’ transition is used
|
||||
first).</p>
|
||||
<p>This does of course have the odd problem with clashes. What if we want to roll
|
||||
two boulders down simultaneously towards the same square. I perform no
|
||||
buffering, and so this situation is just a ‘fight it out’ and let which ever
|
||||
transition has priority win. Such a case may produce the following change of
|
||||
maps (depending on which ‘roll’ transition is used first).</p>
|
||||
<pre><code> o.o ..o o..
|
||||
\./ changes to \o/ or to \o/
|
||||
... ... ...</code></pre>
|
||||
<p>I claim that it is possible to perform all of the 3x3 to 1x1
|
||||
transitions in a 3x3 to 3x3 based system. One other feature added in is
|
||||
a workaround for the ‘no buffering’ problem. If we define a space ship
|
||||
(as in the <a href="https://en.wikipedia.org/wiki/Space_Invaders">Space
|
||||
Invaders</a> example) to fly right, and we are ‘walking through’ our map
|
||||
from top-left to bottom-right, then it is easy to foresee a situation
|
||||
where our space ship would zip right as far as possible in only the one
|
||||
cycle of the automata. However, a similar leftwards-bound space ship
|
||||
would only move the required one square. For this reason I have two
|
||||
lists of transitions and apply them independently of each other; first
|
||||
top-left to bottom right, and the second in the reverse direction. This
|
||||
means that I can make any ‘object’ move by any amount in a single
|
||||
<p>I claim that it is possible to perform all of the 3x3 to 1x1 transitions in a
|
||||
3x3 to 3x3 based system. One other feature added in is a workaround for the ‘no
|
||||
buffering’ problem. If we define a space ship (as in the <a href="https://en.wikipedia.org/wiki/Space_Invaders">Space
|
||||
Invaders</a> example) to fly right,
|
||||
and we are ‘walking through’ our map from top-left to bottom-right, then it is
|
||||
easy to foresee a situation where our space ship would zip right as far as
|
||||
possible in only the one cycle of the automata. However, a similar
|
||||
leftwards-bound space ship would only move the required one square. For this
|
||||
reason I have two lists of transitions and apply them independently of each
|
||||
other; first top-left to bottom right, and the second in the reverse direction.
|
||||
This means that I can make any ‘object’ move by any amount in a single
|
||||
transition.</p>
|
||||
<p>Now comes the key important addition to make it ‘game’ worthy - the
|
||||
addition of external control by the user. This is done by requesting
|
||||
that some transitions are only valid when a certain key has been
|
||||
pressed. So for example, if we (an <code>@</code> symbol) wish to move
|
||||
right when the <code>l</code> key is hit we have a transition like:</p>
|
||||
addition of external control by the user. This is done by requesting that
|
||||
some transitions are only valid when a certain key has been pressed.
|
||||
So for example, if we (an <code>@</code> symbol) wish to move right when the <code>l</code> key
|
||||
is hit we have a transition like:</p>
|
||||
<h2 id="key-l">Key: l</h2>
|
||||
<pre><code> * * * * * *
|
||||
* @ . * . @
|
||||
* * * * * *</code></pre>
|
||||
<p>Here I also use wildcards. On the match side (left) of the
|
||||
transition, an asterisk will match against any character. On the update
|
||||
side (right), an asterisk means ‘keep whatever was here before’. So the
|
||||
above example simply means to swap the <code>@</code> and <code>.</code>
|
||||
around when <code>l</code> is pressed. For the purposes of space saving,
|
||||
this transition is shrunk to a single line.</p>
|
||||
<p>Here I also use wildcards. On the match side (left) of the transition, an
|
||||
asterisk will match against any character. On the update side (right), an
|
||||
asterisk means ‘keep whatever was here before’. So the above example
|
||||
simply means to swap the <code>@</code> and <code>.</code> around when <code>l</code> is pressed. For the
|
||||
purposes of space saving, this transition is shrunk to a single line.</p>
|
||||
<h2 id="key-k">Key: K</h2>
|
||||
<pre><code> a b c 1 2 3
|
||||
d e f 4 5 6
|
||||
g h i 7 8 9</code></pre>
|
||||
<p>is written as: <code>eabcdfghi512346789K</code>.</p>
|
||||
<p>If there are no keys needed for this transition, the character
|
||||
<code>*1</code> should be used instead. Now the format of the game
|
||||
description file is now the following (angle brackets denote an ‘entity’
|
||||
to be defined):</p>
|
||||
<p>If there are no keys needed for this transition, the character <code>*1</code> should
|
||||
be used instead. Now the format of the game description file is now
|
||||
the following (angle brackets denote an ‘entity’ to be defined):</p>
|
||||
<pre><code> <top-bot transition>*\n<bot-top transition>*\n<X size>[ \t]+<Y size>\n
|
||||
<map></code></pre>
|
||||
<p>The <code><X size></code> should take into account the newline
|
||||
at the end of each line of map, and hence should also be one larger than
|
||||
expected.</p>
|
||||
<p>The <code><X size></code> should take into account the newline at the end of each line
|
||||
of map, and hence should also be one larger than expected.</p>
|
||||
|
||||
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
+97
-150
@@ -129,10 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#James_Bonfield">James
|
||||
Bonfield</a><br> Location: <a href="../../location.html#GB">GB</a> -
|
||||
<em>United Kingdom of Great Britain and Northern Ireland</em>
|
||||
(<em>United Kingdom</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#James_Bonfield">James Bonfield</a><br>
|
||||
Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great Britain and Northern Ireland</em> (<em>United Kingdom</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,82 +141,68 @@ Bonfield</a><br> Location: <a href="../../location.html#GB">GB</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> all</span></code></pre></div>
|
||||
<p>NOTE: there are two alternate versions of this program, both allowing
|
||||
one to slow down the game and the second one with movements more
|
||||
familiar to vi users. See the <a href="#alternate-code">Alternate
|
||||
code</a> section below.</p>
|
||||
<p>NOTE: there are two alternate versions of this program, both allowing one to
|
||||
slow down the game and the second one with movements more familiar to vi users.
|
||||
See the <a href="#alternate-code">Alternate code</a> section 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#1993_rince">bugs report with 1993/rince</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1993_rince">bugs report with 1993/rince</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">./rince</span> <span class="pp">[</span><span class="ss">cabbage</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>where:</p>
|
||||
<p><code>[cabbage]</code> is a CABBAGE description file (default:
|
||||
<code>rince.c</code>)</p>
|
||||
<p><code>[cabbage]</code> is a CABBAGE description file (default: <code>rince.c</code>)</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>Some people may want to slow down the game by increasing the value 17
|
||||
in the lines:</p>
|
||||
<p>Some people may want to slow down the game by increasing the
|
||||
value 17 in the lines:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> timeval v<span class="op">=</span> <span class="op">{</span><span class="dv">0</span><span class="op">,</span><span class="dv">1</span><span class="op"><<</span><span class="dv">17</span><span class="op">}</span> <span class="op">;</span></span></code></pre></div>
|
||||
<p>and</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>refresh<span class="op">(),</span>c<span class="op">=</span>select<span class="op">(</span>k<span class="op">,&</span>y<span class="op">,</span><span class="dv">0</span><span class="op">,</span><span class="dv">0</span><span class="op">,(</span>v<span class="op">.</span>tv_usec<span class="op">=</span><span class="dv">1</span><span class="op"><<</span><span class="dv">17</span><span class="op">,&</span>v<span class="op">))?</span>getch<span class="op">():</span><span class="dv">0</span><span class="op">;</span></span></code></pre></div>
|
||||
<p>to another value like 18 or 19 which you can do with the alternate
|
||||
code.</p>
|
||||
<p>In the case of <a href="rince.alt2.c">rince.alt2.c</a> the movement
|
||||
keys for the default game are slightly different and will feel more
|
||||
familiar to vi users: <code>h</code> for left, <code>l</code> for right
|
||||
(that was not changed) and <code>k</code> for fire (that was also not
|
||||
<p>to another value like 18 or 19 which you can do with the alternate code.</p>
|
||||
<p>In the case of <a href="rince.alt2.c">rince.alt2.c</a> the movement keys for the default
|
||||
game are slightly different and will feel more familiar to vi users: <code>h</code> for
|
||||
left, <code>l</code> for right (that was not changed) and <code>k</code> for fire (that was also not
|
||||
changed).</p>
|
||||
<h3 id="alternate-build">Alternate 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> SLEEP=18 clobber alt</span></code></pre></div>
|
||||
<p>Replace 18 with whatever number you wish.</p>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>rince.alt</code> or <code>rince.alt2</code> as you would
|
||||
<code>rince</code> above.</p>
|
||||
<p>Use <code>rince.alt</code> or <code>rince.alt2</code> as you would <code>rince</code> above.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The author has provided several CABBAGE files for your amusement:</p>
|
||||
<ul>
|
||||
<li><p><a href="rince.data1">rince.data1</a> plays
|
||||
[Breakout](https://en.wikipedia.org/wiki/Breakout_(video_game). Keys are
|
||||
<code>,</code> for left, <code>/</code> for right, and <code>.</code>
|
||||
for ‘fire the ball’.</p></li>
|
||||
<li><p><a href="rince.data2">rince.data2</a> plays the old <a
|
||||
href="../../authors.html#James_Bonfield">James Bonfield</a>’s (<a
|
||||
href="../../1991/rince/index.html">1991/rince</a> game from IOCCC
|
||||
1991.</p></li>
|
||||
<li><p><a href="rince.data3">rince.data3</a> Sokoban screen 11. You are
|
||||
the <code>o</code> character. You must push the money <code>m</code>
|
||||
into the dotted region of the screen. The game is considered finished
|
||||
when all the <code>m</code>s are then <code>M</code>s.</p></li>
|
||||
<li><p><a href="rince.data4">rince.data4</a> Sokoban screen 13. Same
|
||||
rules as above.</p></li>
|
||||
[Breakout](https://en.wikipedia.org/wiki/Breakout_(video_game). Keys are <code>,</code>
|
||||
for left, <code>/</code> for right, and <code>.</code> for ‘fire the ball’.</p></li>
|
||||
<li><p><a href="rince.data2">rince.data2</a> plays the old <a href="../../authors.html#James_Bonfield">James Bonfield</a>’s
|
||||
(<a href="../../1991/rince/index.html">1991/rince</a> game from IOCCC 1991.</p></li>
|
||||
<li><p><a href="rince.data3">rince.data3</a> Sokoban screen 11. You are the <code>o</code> character.
|
||||
You must push the money <code>m</code> into the dotted region of the screen. The game is
|
||||
considered finished when all the <code>m</code>s are then <code>M</code>s.</p></li>
|
||||
<li><p><a href="rince.data4">rince.data4</a> Sokoban screen 13. Same rules as above.</p></li>
|
||||
</ul>
|
||||
<p>For a brief design description, see <a
|
||||
href="design.html">design.html</a>.</p>
|
||||
<p>For a brief design description, see <a href="design.html">design.html</a>.</p>
|
||||
<h3 id="warning-for-sunos-4.1.x">WARNING for SunOS 4.1.x:</h3>
|
||||
<p>If you are running SunOS 4.1.x (assuming you can find an ANSI
|
||||
compiler in the first place), this program may be used to log out very
|
||||
quickly. Unfortunately, you can’t do anything else with it.</p>
|
||||
compiler in the first place), this program may be used to log
|
||||
out very quickly. Unfortunately, you can’t do anything else
|
||||
with it.</p>
|
||||
<h3 id="additional-notes">Additional notes</h3>
|
||||
<p>Some people report that <code>rince</code> dumps core on their
|
||||
system.</p>
|
||||
<p>On some systems that use gcc, the <code>curses.h</code> used by gcc
|
||||
(typically <code>/usr/local/include/curses.h</code> if not
|
||||
<code>/usr/include/curses.h</code>) is not compatible with the curses
|
||||
library (typically <code>/lib/libcurses.a</code> for static libraries)
|
||||
<p>Some people report that <code>rince</code> dumps core on their system.</p>
|
||||
<p>On some systems that use gcc, the <code>curses.h</code> used by gcc (typically
|
||||
<code>/usr/local/include/curses.h</code> if not <code>/usr/include/curses.h</code>) is not compatible
|
||||
with the curses library (typically <code>/lib/libcurses.a</code> for static libraries)
|
||||
used. It has been suggested that the following gcc command may help:</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">gcc</span> <span class="at">-fno-builtin</span> <span class="at">-I</span>/usr/include <span class="at">-o</span> rince rince.c <span class="at">-lcurses</span> <span class="at">-ltermcap</span></span></code></pre></div>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This is a Cellular Automata Based, Beautifully Abysmal Game
|
||||
Environment (or CABBAGE for short). To execute the program simply type
|
||||
<code>./rince gamefile</code>, where <code>gamefile</code> is a game
|
||||
description file. A few are supplied for your enjoyment. Alternatively,
|
||||
with no arguments it will default to using it’s own datafile (the source
|
||||
code in fact). This happens to be a game of <a
|
||||
href="https://en.wikipedia.org/wiki/Space_Invaders">Space Invaders</a>.
|
||||
To prevent people from firing too often a very simple method is
|
||||
employed; you must move after firing to be able to fire again.</p>
|
||||
<p>This is a Cellular Automata Based, Beautifully Abysmal Game Environment (or
|
||||
CABBAGE for short). To execute the program simply type <code>./rince gamefile</code>,
|
||||
where <code>gamefile</code> is a game description file. A few are supplied for your
|
||||
enjoyment. Alternatively, with no arguments it will default to using it’s own
|
||||
datafile (the source code in fact). This happens to be a game of <a href="https://en.wikipedia.org/wiki/Space_Invaders">Space
|
||||
Invaders</a>.
|
||||
To prevent people from firing too often a very simple method is employed; you
|
||||
must move after firing to be able to fire again.</p>
|
||||
<h3 id="keys">Keys</h3>
|
||||
<ul>
|
||||
<li><code>j</code> - Left</li>
|
||||
@@ -225,11 +210,11 @@ employed; you must move after firing to be able to fire again.</p>
|
||||
<li><code>k</code> - Fire</li>
|
||||
</ul>
|
||||
<p>This is a new breed of generic games. For instance:</p>
|
||||
<p>Game play : Whatever you define Keys : Whatever you define Score : If
|
||||
you can figure out how to update it! Levels : Ahh well… it’s not
|
||||
<em>totally</em> generic.</p>
|
||||
<p>The proper definition for usage would be:
|
||||
<code>./rince [data_filename]</code></p>
|
||||
<p>Game play : Whatever you define
|
||||
Keys : Whatever you define
|
||||
Score : If you can figure out how to update it!
|
||||
Levels : Ahh well… it’s not <em>totally</em> generic.</p>
|
||||
<p>The proper definition for usage would be: <code>./rince [data_filename]</code></p>
|
||||
<h3 id="portability">Portability</h3>
|
||||
<p>I have compiled in on the following systems:</p>
|
||||
<pre><code>System OS Compiler (and flags)
|
||||
@@ -239,122 +224,84 @@ SPARCstation 10/31 Solaris 2.1 gcc -ansi -pedantic (*)
|
||||
DECAlpha 3000/500 OSF/1 V1.2 c89 -std
|
||||
SGI Indigo (R4000) IRIX 4.0.5F cc -ansi
|
||||
Alliant FX2800 Conentrix 3.0.0 fxc</code></pre>
|
||||
<p>* I never said it worked! The guidelines state that you dislike
|
||||
programs that won’t <em>compile</em> under both BSD or SysV
|
||||
<code>Unix</code>. This compiles, and indeed runs on all the others
|
||||
(both BSD and SysV) correctly.</p>
|
||||
<p>Alas, on Solaris it compiles, but mysteriously stops displaying
|
||||
output after a while until you quit with control-c, when it all catches
|
||||
up again. I think the problem may lie in either <code>select(2)</code>,
|
||||
or curses, (or perhaps conflict of the two).</p>
|
||||
<p>The use of <code>select(2)</code> no doubt makes it less portable to
|
||||
STRICT SysV machines. However I have tested this on several so-called
|
||||
SysV machines, and all of them support <code>select(2)</code>. In fact,
|
||||
the <code>select(2)</code> they support appears to be more portable
|
||||
between them than their <code>poll()</code> call.</p>
|
||||
<p>* I never said it worked! The guidelines state that you dislike programs that
|
||||
won’t <em>compile</em> under both BSD or SysV <code>Unix</code>. This compiles, and indeed runs
|
||||
on all the others (both BSD and SysV) correctly.</p>
|
||||
<p>Alas, on Solaris it compiles, but mysteriously stops displaying output
|
||||
after a while until you quit with control-c, when it all catches up again.
|
||||
I think the problem may lie in either <code>select(2)</code>, or curses, (or perhaps
|
||||
conflict of the two).</p>
|
||||
<p>The use of <code>select(2)</code> no doubt makes it less portable to STRICT SysV machines.
|
||||
However I have tested this on several so-called SysV machines, and all of them
|
||||
support <code>select(2)</code>. In fact, the <code>select(2)</code> they support appears to be more
|
||||
portable between them than their <code>poll()</code> call.</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>I have tried to use as many different obfuscation techniques,
|
||||
including some of which (such as <code>sizeof</code> confusion) I have
|
||||
not seen in any entries (hmmm - perhaps there’s a reason for that…) so
|
||||
far. Also, very poor structure (yes, I use <code>goto</code>’s) has led
|
||||
to apparently having an <code>fgets()</code> as the last line of main.
|
||||
Note that I have still tried to aim at least some efficiency (provided
|
||||
it makes things slightly more obfuscated of course). One such thing is
|
||||
the way I dynamically allocate a 2-dimensional array using only ONE
|
||||
<code>malloc()</code>. Hence this program could be used as a tutorial
|
||||
<p>I have tried to use as many different obfuscation techniques, including
|
||||
some of which (such as <code>sizeof</code> confusion) I have not seen in any entries
|
||||
(hmmm - perhaps there’s a reason for that…) so far. Also, very poor
|
||||
structure (yes, I use <code>goto</code>’s) has led to apparently having an <code>fgets()</code> as
|
||||
the last line of main. Note that I have still tried to aim at least some
|
||||
efficiency (provided it makes things slightly more obfuscated of course).
|
||||
One such thing is the way I dynamically allocate a 2-dimensional array
|
||||
using only ONE <code>malloc()</code>. Hence this program could be used as a tutorial
|
||||
for all those people who consistently ask this question in the C
|
||||
newsgroups.</p>
|
||||
<p>Also, the program does require a volatile type (especially when
|
||||
optimising) to perform correctly. This is the first time I have ever
|
||||
truly needed this when not accessing memory external to this process
|
||||
:-)</p>
|
||||
truly needed this when not accessing memory external to this process :-)</p>
|
||||
<p>Of course, all the usual obfuscation lurks within, such as combining
|
||||
multiple for loops into single ones; warped and twisted logic; plus a
|
||||
plethora of other minor oddities. It’s up to you to discover some of
|
||||
them of course… Sometimes I have sacrificed length for obfuscation. It
|
||||
is all too easy to change the arguments in <code>main()</code> to one
|
||||
character identifiers, but in my opinion they add to obfuscation in this
|
||||
case by being longer.</p>
|
||||
<p><code>lint</code> complains about lots of things. Firstly the use of
|
||||
curses immediately makes <code>lint</code> complain. The Alpha’s
|
||||
<code>lint</code> gave me some positive encouragement!
|
||||
plethora of other minor oddities. It’s up to you to discover some of them
|
||||
of course… Sometimes I have sacrificed length for obfuscation. It is all
|
||||
too easy to change the arguments in <code>main()</code> to one character identifiers, but
|
||||
in my opinion they add to obfuscation in this case by being longer.</p>
|
||||
<p><code>lint</code> complains about lots of things. Firstly the use of curses immediately
|
||||
makes <code>lint</code> complain. The Alpha’s <code>lint</code> gave me some positive encouragement!
|
||||
<code>precedence confusion possible: parenthesize!</code> :-) :-)
|
||||
<code>main()</code> does not return correctly, because, basically, it
|
||||
doesn’t return.</p>
|
||||
<code>main()</code> does not return correctly, because, basically, it doesn’t return.</p>
|
||||
<h3 id="bugs">Bugs</h3>
|
||||
<p>Very little error checking is performed. I do check for not being
|
||||
able to open the requested filename and return 1 upon failure. However,
|
||||
badly formatted data files will cause major problems. No other checking
|
||||
(such as insufficient memory) is performed.</p>
|
||||
<p>There is no ‘end of game’ checking method. Hence games like Sokoban
|
||||
rely on the user to decide when they have had enough. Also, there is no
|
||||
quit mechanism other than control-c.</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>Very little error checking is performed. I do check for not being able to
|
||||
open the requested filename and return 1 upon failure. However, badly
|
||||
formatted data files will cause major problems. No other checking (such as
|
||||
insufficient memory) is performed.</p>
|
||||
<p>There is no ‘end of game’ checking method. Hence games like Sokoban rely
|
||||
on the user to decide when they have had enough. Also, there is no quit
|
||||
mechanism other than control-c.</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-1993rince"><a name="inventory"></a>Inventory for
|
||||
1993/rince</h1>
|
||||
<h1 id="inventory-for-1993rince"><a name="inventory"></a>Inventory for 1993/rince</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/1993/rince/rince.c">rince.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.alt.c">rince.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.alt2.c">rince.alt2.c</a>
|
||||
- alternate alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.orig.c">rince.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.c">rince.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.alt.c">rince.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.alt2.c">rince.alt2.c</a> - alternate alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.orig.c">rince.orig.c</a> - original source</li>
|
||||
<li><a href="design.html">design.html</a> - implementation notes</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data1">rince.data1</a>
|
||||
- CABBAGE data file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data2">rince.data2</a>
|
||||
- CABBAGE data file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data3">rince.data3</a>
|
||||
- CABBAGE data file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data4">rince.data4</a>
|
||||
- CABBAGE data file</li>
|
||||
<li><a href="1993_rince.tar.bz2">1993_rince.tar.bz2</a> - download entry
|
||||
source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data1">rince.data1</a> - CABBAGE data file</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data2">rince.data2</a> - CABBAGE data file</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data3">rince.data3</a> - CABBAGE data file</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data4">rince.data4</a> - CABBAGE data file</li>
|
||||
<li><a href="1993_rince.tar.bz2">1993_rince.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/1993/rince/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/.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/1993/rince/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/.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/1993/rince/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/design.md">design.md</a>
|
||||
- markdown source for design.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/README.md">README.md</a> - markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/design.md">design.md</a> - markdown source for design.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+51
-78
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Mark_Schnitzius">Mark
|
||||
Schnitzius</a><br> Location: <a href="../../location.html#ZZ">ZZ</a> -
|
||||
<em>Unknown location</em> <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Mark_Schnitzius">Mark Schnitzius</a><br>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -144,14 +144,13 @@ Schnitzius</a><br> Location: <a href="../../location.html#ZZ">ZZ</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#1993_schnitzi">1993 schnitzi bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1993_schnitzi">1993 schnitzi 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">./schnitzi</span> file</span></code></pre></div>
|
||||
<p>where</p>
|
||||
<p><code>file</code> is a file containing some text.</p>
|
||||
<p>Certain input will cause the program to fail as described in <a
|
||||
href="../../bugs.html#1993_schnitzi">1993 schnitzi bugs</a>.</p>
|
||||
<p>Certain input will cause the program to fail as described
|
||||
in <a href="../../bugs.html#1993_schnitzi">1993 schnitzi bugs</a>.</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">./schnitzi</span> schnitzi.info</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="co"># ask some questions suggested by the author, noted below</span></span></code></pre></div>
|
||||
@@ -159,18 +158,18 @@ href="../../bugs.html#1993_schnitzi">1993 schnitzi bugs</a>.</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">Who</span> is Mark Schnitzus<span class="pp">?</span></span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="ex">Who</span> was Jack the Ripper <span class="pp">?</span></span></code></pre></div>
|
||||
<p>Notice how it still manages to answer the first question despite
|
||||
there being an intentional spelling error there.</p>
|
||||
<p>Notice how it still manages to answer the first question despite there being an
|
||||
intentional spelling error there.</p>
|
||||
<p>Try feeding the program source to the program and ask both:</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">What</span> is cat <span class="pp">?</span></span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="ex">What</span> is cat<span class="pp">?</span></span></code></pre></div>
|
||||
<p>What happens if you ask it other questions with and without a space
|
||||
before the <code>?</code>?</p>
|
||||
<p>What happens if you ask it other questions with and without a space before the
|
||||
<code>?</code>?</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>After this program prints the contents of ‘file’, ask it some
|
||||
questions related to the text.</p>
|
||||
<p>The author suggests the following questions when using <a
|
||||
href="schnitzi.info">schnitzi.info</a>:</p>
|
||||
<p>After this program prints the contents of ‘file’, ask it
|
||||
some questions related to the text.</p>
|
||||
<p>The author suggests the following questions when using
|
||||
<a href="schnitzi.info">schnitzi.info</a>:</p>
|
||||
<ul>
|
||||
<li>Who is Mark Schnitzius?</li>
|
||||
<li>What exactly does this program do?</li>
|
||||
@@ -181,98 +180,72 @@ href="schnitzi.info">schnitzi.info</a>:</p>
|
||||
<li>Is it true that Elvis is alive?</li>
|
||||
<li>Do colorless green ideas sleep furiously?</li>
|
||||
</ul>
|
||||
<p>We suggest you try using the body (minus the header and signature
|
||||
line) of a Usenet article. You might want to try something from
|
||||
alt.flame. :-)</p>
|
||||
<p>NOTE: If you have certain <code>'</code> in the question this entry
|
||||
might fail.</p>
|
||||
<p>We suggest you try using the body (minus the header and signature line)
|
||||
of a Usenet article. You might want to try something from alt.flame. :-)</p>
|
||||
<p>NOTE: If you have certain <code>'</code> in the question this entry might fail.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>I wanted to write a program that would read in a text file in natural
|
||||
language (such as English) and answer questions about that text file. I
|
||||
thought this might be a complicated task, and I was right – it took me
|
||||
over 800 bytes. Of course, it doesn’t always work, but that’s AI for
|
||||
you.</p>
|
||||
<p>This program accepts the name of a text file as the first parameter.
|
||||
For example, to run it on the supplied data file called ‘schnitzi.info’
|
||||
you would type <code>./schnitzi schnitzi.info</code>. It echoes the
|
||||
file, then gives you a prompt where you may type in questions about that
|
||||
text. The more words you use which are actually present in the text
|
||||
file, the better results you get. You’ll need to hit <code>ctrl-c</code>
|
||||
to break out of the program. Just hitting <code>return</code> at the
|
||||
<p>I wanted to write a program that would read in a text file in
|
||||
natural language (such as English) and answer questions about that
|
||||
text file. I thought this might be a complicated task, and I was
|
||||
right – it took me over 800 bytes. Of course, it doesn’t always
|
||||
work, but that’s AI for you.</p>
|
||||
<p>This program accepts the name of a text file as the first parameter. For
|
||||
example, to run it on the supplied data file called ‘schnitzi.info’ you would
|
||||
type <code>./schnitzi schnitzi.info</code>. It echoes the file, then gives you a prompt
|
||||
where you may type in questions about that text. The more words you use which
|
||||
are actually present in the text file, the better results you get. You’ll need
|
||||
to hit <code>ctrl-c</code> to break out of the program. Just hitting <code>return</code> at the
|
||||
prompt will reprint the paragraph.</p>
|
||||
<p>If you’re curious as to how it works, I guess you could feed in the
|
||||
source as the input file and ask “How does this work?” at the prompt,
|
||||
but I’m not guaranteeing any results…</p>
|
||||
<h3 id="compilation-notes">Compilation notes</h3>
|
||||
<ul>
|
||||
<li><p>The use of <code>strcasecmp(3)</code> may be non-standard.
|
||||
<code>strcmp(3)</code> can be substituted for it, with a slight
|
||||
performance penalty.</p></li>
|
||||
<li><p>This program depends on the first command-line parameter,
|
||||
typically called <code>argv[0]</code>, to hold the name of the
|
||||
executable. It is my understanding that this property of
|
||||
<code>argv[0]</code> is not guaranteed on some systems.</p></li>
|
||||
<li><p>The use of <code>strcasecmp(3)</code> may be non-standard. <code>strcmp(3)</code> can be substituted for
|
||||
it, with a slight performance penalty.</p></li>
|
||||
<li><p>This program depends on the first command-line parameter, typically called
|
||||
<code>argv[0]</code>, to hold the name of the executable. It is my understanding that this
|
||||
property of <code>argv[0]</code> is not guaranteed on some systems.</p></li>
|
||||
</ul>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<ul>
|
||||
<li><p>It uses a hidden string to test for punctuation.</p></li>
|
||||
<li><p>The layout, variable names, and expression format have been
|
||||
chosen in such a way as to cause visual confusion.</p></li>
|
||||
<li><p>It uses uses external <code>system(3)</code> calls to echo the
|
||||
text file and break up the question into individual words with a
|
||||
recursive call.</p></li>
|
||||
<li><p>It uses a clever hack to simulate artificial
|
||||
intelligence.</p></li>
|
||||
<li><p>The layout, variable names, and expression format have been chosen in such a
|
||||
way as to cause visual confusion.</p></li>
|
||||
<li><p>It uses uses external <code>system(3)</code> calls to echo the text file and break up the
|
||||
question into individual words with a recursive call.</p></li>
|
||||
<li><p>It uses a clever hack to simulate artificial intelligence.</p></li>
|
||||
</ul>
|
||||
<p>The text for the info file, by the way, consists largely of headlines
|
||||
from the Weekly World News.</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-1993schnitzi"><a name="inventory"></a>Inventory
|
||||
for 1993/schnitzi</h1>
|
||||
<h1 id="inventory-for-1993schnitzi"><a name="inventory"></a>Inventory for 1993/schnitzi</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/1993/schnitzi/schnitzi.c">schnitzi.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/schnitzi.orig.c">schnitzi.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/schnitzi.info">schnitzi.info</a>
|
||||
- some interesting statements</li>
|
||||
<li><a href="1993_schnitzi.tar.bz2">1993_schnitzi.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/schnitzi.c">schnitzi.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/schnitzi.orig.c">schnitzi.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/schnitzi.info">schnitzi.info</a> - some interesting statements</li>
|
||||
<li><a href="1993_schnitzi.tar.bz2">1993_schnitzi.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/1993/schnitzi/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/.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/1993/schnitzi/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/.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/1993/schnitzi/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
+55
-89
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#David_Van_Brackle">David Van
|
||||
Brackle</a><br> Location: <a href="../../location.html#ZZ">ZZ</a> -
|
||||
<em>Unknown location</em> <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#David_Van_Brackle">David Van Brackle</a><br>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -144,12 +144,11 @@ Brackle</a><br> Location: <a href="../../location.html#ZZ">ZZ</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#1993_vanb">1993 vanb bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1993_vanb">1993 vanb 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">./vanb</span> <span class="st">'exp'</span></span></code></pre></div>
|
||||
<p>where <code>exp</code> is an octal expression. See below for how it
|
||||
can also have hexadecimal and decimal numbers.</p>
|
||||
<p>where <code>exp</code> is an octal expression. See below for how it can also have
|
||||
hexadecimal and decimal numbers.</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 happens if you use something other than valid digits?</p>
|
||||
@@ -163,46 +162,37 @@ octal numbers: octal digits
|
||||
grouping: ()</code></pre>
|
||||
<p>No spaces are allowed in the expression. To avoid shell expansion,
|
||||
one should surround the expression in single quotes.</p>
|
||||
<p>It is a good thing that this program consists of only one expression,
|
||||
otherwise it might become hard to understand. :-)</p>
|
||||
<p>It is a good thing that this program consists of only one
|
||||
expression, otherwise it might become hard to understand. :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>The program does no error checking - erroneous expressions will
|
||||
produce spurious results. Note that unary <code>-</code> is an operator.
|
||||
Thus, decimal <code>-46</code> would be entered as <code>-d46</code> and
|
||||
not <code>d-46</code>.</p>
|
||||
<h3 id="what-makes-this-program-special">What Makes This Program
|
||||
Special:</h3>
|
||||
produce spurious results. Note that unary <code>-</code> is an operator. Thus,
|
||||
decimal <code>-46</code> would be entered as <code>-d46</code> and not <code>d-46</code>.</p>
|
||||
<h3 id="what-makes-this-program-special">What Makes This Program Special:</h3>
|
||||
<ol start="0" type="1">
|
||||
<li><p>Of course, the fact that the program takes input and produces
|
||||
output in octal, rather than a more useful system like decimal, makes it
|
||||
“special”.</p></li>
|
||||
<li><p>The entire program consists of a single expression, returned from
|
||||
<code>main()</code>.</p></li>
|
||||
<li><p>There are no global or local variables other than the parameters
|
||||
to <code>main()</code>.</p></li>
|
||||
<li><p>All of the constants in the program are expressed in octal -
|
||||
including the <code>printf(3)</code> string.</p></li>
|
||||
<li><p>The variables are given names which cause visual confusion with
|
||||
the octal constants.</p></li>
|
||||
<li><p>The program is formatted like a Roman numeral 8. The significance
|
||||
of 8 is obvious. I chose Roman numerals because it is a numbering system
|
||||
even more arcane than octal. It’s not very ‘deceptive’, but it’s
|
||||
difficult to deceptively format a program which has no explicit control
|
||||
structures (other than <code>?:</code>s).</p></li>
|
||||
<li><p>Many simple tasks are done many times. I tried to do these
|
||||
differently each time, to make the program harder to
|
||||
understand.</p></li>
|
||||
<li><p>Of course, the fact that the program takes input and produces output in
|
||||
octal, rather than a more useful system like decimal, makes it “special”.</p></li>
|
||||
<li><p>The entire program consists of a single expression, returned from <code>main()</code>.</p></li>
|
||||
<li><p>There are no global or local variables other than the parameters to <code>main()</code>.</p></li>
|
||||
<li><p>All of the constants in the program are expressed in octal - including the
|
||||
<code>printf(3)</code> string.</p></li>
|
||||
<li><p>The variables are given names which cause visual confusion with the octal
|
||||
constants.</p></li>
|
||||
<li><p>The program is formatted like a Roman numeral 8. The significance of 8 is
|
||||
obvious. I chose Roman numerals because it is a numbering system even more
|
||||
arcane than octal. It’s not very ‘deceptive’, but it’s difficult to deceptively
|
||||
format a program which has no explicit control structures (other than <code>?:</code>s).</p></li>
|
||||
<li><p>Many simple tasks are done many times. I tried to do these differently each
|
||||
time, to make the program harder to understand.</p></li>
|
||||
</ol>
|
||||
<h3 id="how-it-works">How It Works:</h3>
|
||||
<p>It’s a recursive descent parser, calling <code>main()</code> for all
|
||||
of its recursion. <code>O2</code> is a state variable, telling
|
||||
<code>main()</code> what grammar non-terminal to parse.
|
||||
<code>**O7</code> is the next character. <code>O3</code> is an
|
||||
intermediate result. Whenever you see a construct like:</p>
|
||||
<p>It’s a recursive descent parser, calling <code>main()</code>
|
||||
for all of its recursion. <code>O2</code> is a state variable, telling <code>main()</code>
|
||||
what grammar non-terminal to parse. <code>**O7</code> is the next character.
|
||||
<code>O3</code> is an intermediate result. Whenever you see a construct like:</p>
|
||||
<pre><code>!(expression with O2)?</code></pre>
|
||||
<p>it’s decrementing and testing <code>O2</code> to see what state it’s
|
||||
in. Comparisons involving <code>**O7</code> and octal constants are
|
||||
looking for certain characters.</p>
|
||||
<p>it’s decrementing and testing <code>O2</code> to see what state it’s in. Comparisons
|
||||
involving <code>**O7</code> and octal constants are looking for certain characters.</p>
|
||||
<p>Here’s the grammar (<code>'e'</code> denotes the empty string) :</p>
|
||||
<pre><code><E> ::= <T><E'>
|
||||
<E'> ::= +<T><E'> | -<T><E'> | e
|
||||
@@ -223,9 +213,9 @@ looking for certain characters.</p>
|
||||
<D> is 04
|
||||
<X> is 05
|
||||
<O> is 03</code></pre>
|
||||
<p>Here’s a version of the program before it got formatted into the
|
||||
VIII, augmented with comments showing where each state begins.
|
||||
<code>N1</code> and <code>N2</code> are notes:</p>
|
||||
<p>Here’s a version of the program before it got formatted into the VIII,
|
||||
augmented with comments showing where each state begins. <code>N1</code> and <code>N2</code> are
|
||||
notes:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#define O5 main</span></span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a>O5<span class="op">(</span>O2<span class="op">,</span>O7<span class="op">,</span>O3<span class="op">)</span><span class="dt">char</span><span class="op">**</span>O7<span class="op">;</span></span>
|
||||
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
|
||||
@@ -261,13 +251,11 @@ VIII, augmented with comments showing where each state begins.
|
||||
<span id="cb9-33"><a href="#cb9-33" aria-hidden="true" tabindex="-1"></a> O5<span class="op">(</span><span class="bn">011</span><span class="op">,</span>O7<span class="op">,</span>O5<span class="op">(</span><span class="bn">010</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">)):</span></span>
|
||||
<span id="cb9-34"><a href="#cb9-34" aria-hidden="true" tabindex="-1"></a><span class="co">/* C */</span> <span class="op">(++*</span>O7<span class="op">,</span>O3<span class="op">);</span></span>
|
||||
<span id="cb9-35"><a href="#cb9-35" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
|
||||
<p>Note <code>N1</code>: It should never enter this state, unless the
|
||||
user invokes the program with no parameters, in which case it just
|
||||
returns 0.</p>
|
||||
<p>Note <code>N2</code>: Since the program is properly invoked with 1
|
||||
parameter, this is the first state it will go into. This state just
|
||||
invokes printf, and sends the parser to state <code>012</code> (which is
|
||||
<code><E></code>).</p>
|
||||
<p>Note <code>N1</code>: It should never enter this state, unless the user invokes the
|
||||
program with no parameters, in which case it just returns 0.</p>
|
||||
<p>Note <code>N2</code>: Since the program is properly invoked with 1 parameter, this is
|
||||
the first state it will go into. This state just invokes
|
||||
printf, and sends the parser to state <code>012</code> (which is <code><E></code>).</p>
|
||||
<p>The <code>E</code> and <code>T</code> states work like this:</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="dt">int</span> e<span class="op">(){</span> <span class="cf">return</span> eprime<span class="op">(</span> t<span class="op">()</span> <span class="op">);</span> <span class="op">}</span></span></code></pre></div>
|
||||
<p>The <code>E'</code> and <code>T'</code> states work like this:</p>
|
||||
@@ -280,9 +268,8 @@ invokes printf, and sends the parser to state <code>012</code> (which is
|
||||
<span id="cb11-7"><a href="#cb11-7" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
|
||||
<span id="cb11-8"><a href="#cb11-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> <span class="cf">return</span> intermediate<span class="op">;</span></span>
|
||||
<span id="cb11-9"><a href="#cb11-9" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
|
||||
<p>The <code>D</code>, <code>X</code> and <code>O</code> states work
|
||||
like this (they assume that they’re initially called with
|
||||
<code>0</code>):</p>
|
||||
<p>The <code>D</code>, <code>X</code> and <code>O</code> states work like this (they assume that they’re initially
|
||||
called with <code>0</code>):</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">int</span> octal<span class="op">(</span> <span class="dt">int</span> intermediate <span class="op">)</span></span>
|
||||
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
|
||||
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span><span class="op">(</span> ch<span class="op">>=</span><span class="ch">'0'</span> <span class="op">&&</span> ch<span class="op"><=</span><span class="ch">'7'</span> <span class="op">)</span></span>
|
||||
@@ -294,56 +281,35 @@ like this (they assume that they’re initially called with
|
||||
<span id="cb12-9"><a href="#cb12-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> <span class="cf">return</span> intermediate<span class="op">;</span></span>
|
||||
<span id="cb12-10"><a href="#cb12-10" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
|
||||
<p><code>F</code> and <code>C</code> work similarly.</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-1993vanb"><a name="inventory"></a>Inventory for
|
||||
1993/vanb</h1>
|
||||
<h1 id="inventory-for-1993vanb"><a name="inventory"></a>Inventory for 1993/vanb</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/1993/vanb/vanb.c">vanb.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/vanb.alt.c">vanb.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/vanb.orig.c">vanb.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1993_vanb.tar.bz2">1993_vanb.tar.bz2</a> - download entry
|
||||
source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/vanb.c">vanb.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/vanb.alt.c">vanb.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/vanb.orig.c">vanb.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="1993_vanb.tar.bz2">1993_vanb.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/1993/vanb/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/.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/1993/vanb/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/.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/1993/vanb/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/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