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:
Landon Curt Noll committed 2024-03-18 01:26:39 -07:00
1 parent 9eb7a54e9f
commit b0b212acb1
402 files changed
+37061 -55132

No files matched your search

+73 -108
View File
@@ -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 -->
@@ -141,62 +141,55 @@ Howe</a><br> Location: <a href="../../location.html#CA">CA</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>There is an <a href="#alternate-code">alternate version</a> that
might feel a bit more familiar to vi(m) users.</p>
<p>There is an <a href="#alternate-code">alternate version</a> that might feel a bit more
familiar to vi(m) users.</p>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./ant</span> some_file</span></code></pre></div>
<p>NOTE: the file must already exist and not specifying any arg will
make the program exit without doing anything.</p>
<p>NOTE: the file must already exist and not specifying any arg will make the
program exit without doing anything.</p>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> hill</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./ant</span> hill</span></code></pre></div>
<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> mole</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./ant</span> mole</span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>This version changes the commands slightly so that to go to the first
column you should enter <code>0</code>, to go to the last column you
should enter <code>$</code>, to quit you should enter <code>q</code>, to
go back a word you should enter <code>b</code> and to go forwards a word
you should enter <code>w</code>. Also, and perhaps most useful, rather
than having to hit ctrl-L (form-feed, <code>\f</code>) to get back to
command mode you can use the usual ESC (<code>\x1b</code>).</p>
<p>These will make it slightly less unwieldy for those familiar with
vi(m); the rest was unchanged.</p>
<p>This version changes the commands slightly so that to go to the first column you
should enter <code>0</code>, to go to the last column you should enter <code>$</code>, to quit you
should enter <code>q</code>, to go back a word you should enter <code>b</code> and to go forwards a
word you should enter <code>w</code>. Also, and perhaps most useful, rather than having to
hit ctrl-L (form-feed, <code>\f</code>) to get back to command mode you can use the usual
ESC (<code>\x1b</code>).</p>
<p>These will make it slightly less unwieldy for those familiar with vi(m); the
rest was unchanged.</p>
<h3 id="alternate-build">Alternate 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> alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>ant.alt</code> as you would <code>ant</code> above with the
changes in the input keys. See the author’s remarks for the remaining
keys.</p>
<p>Use <code>ant.alt</code> as you would <code>ant</code> above with the changes in the input keys. See
the author’s remarks for the remaining keys.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The author was kind enough to supply a list of references below, in
case you are still confused after read the source! :-)</p>
<p>BTW: you’ve most likely heard the joke that if you want a
pseudo-random string of characters you can put a user unfamiliar with
vi(m) in a vi(m) session (in insert mode) and ask them to exit. Well in
this case you’re likely to have this problem if you ARE a vi(m) user!
:-) … especially if you don’t read the information below. This means if
you’re reading this in vi(m) you’ll have to exit this like in normal
vi(m) and then try the same with <code>./ant</code> only to fail.
:-)</p>
<p>NOTE: to enter form feed you should be able to hit
<code>ctrl-L</code>. This will allow you to exit insert mode rather than
ESC like in normal vi(m). See the author’s commands section for other
commands.</p>
<p>The author was kind enough to supply a list of references below,
in case you are still confused after read the source! :-)</p>
<p>BTW: you’ve most likely heard the joke that if you want a pseudo-random string
of characters you can put a user unfamiliar with vi(m) in a vi(m) session (in
insert mode) and ask them to exit. Well in this case you’re likely to have this
problem if you ARE a vi(m) user! :-) … especially if you don’t read the
information below. This means if you’re reading this in vi(m) you’ll have to
exit this like in normal vi(m) and then try the same with <code>./ant</code> only to fail. :-)</p>
<p>NOTE: to enter form feed you should be able to hit <code>ctrl-L</code>. This will allow you
to exit insert mode rather than ESC like in normal vi(m). See the author’s
commands section for other commands.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>Ant’s Editor vIOCCC91</p>
<p>Text files consists of lines of printable text or tab characters. A
line can be of arbitrary length and is delimited by either a newline or
the end of file. Carriage return is mapped to newline on input and
ignored on output. Tab stops are every eight columns. Non-printable
characters may have unpredictable results depending on the
implementation of <code>curses</code>.</p>
<p>Text files consists of lines of printable text or tab characters. A line can be
of arbitrary length and is delimited by either a newline or the end of file.
Carriage return is mapped to newline on input and ignored on output. Tab stops
are every eight columns. Non-printable characters may have unpredictable
results depending on the implementation of <code>curses</code>.</p>
<h3 id="commands">Commands</h3>
<ul>
<li>h j k l left, down, up, right cursor movement</li>
<li>H J K L word left, page down, page up, word right</li>
<li><label><input type="checkbox" />beginning and end of
line</label></li>
<li><label><input type="checkbox" />beginning and end of line</label></li>
<li>t b top and bottom of file</li>
<li>i enter insert mode, form-feed to quit</li>
<li>x delete character under the cursor</li>
@@ -210,99 +203,71 @@ line</label></li>
<li>2 missing edit filename</li>
</ul>
<h3 id="about-this-entry">About this entry</h3>
<p>The <code>BUF</code> size should be set at compile time to 32767.
This value was used because the Sozobon C compiler for the Atari ST has
16 bit ints and a limit on the size of arrays &amp; structures of 32k.
Also the WatCom C compiler for the PC also has 16 bits ints. On machines
that have 32 bit ints (most unix boxes), a larger value for
<code>BUF</code> could be used.</p>
<p>It is recommend that compact memory model be used on PC class
machines. Small memory model may work too provided <code>BUF</code> is
not too large.</p>
<p>The character constants <code>'\b'</code>, <code>'\f'</code>,
<code>'\n'</code>, <code>'\r'</code>, <code>'\t'</code> are used in
order to provide more portable code, since the compiler should handle
the translation of them into the native character set. Note that
<code>'\f'</code> (form-feed) was used to exit insert mode because
K&amp;R C had no escape constant for the escape-key.</p>
<p>My goals for this project were to learn and experiment with the
Buffer Gap Scheme [Fin80][net90], write a useful and <em>portable</em>
program, and meet the requirements of the IOCCC. I initially planned to
have a mini <code>curses</code> built-in like <a
href="../../authors.html#John_Tromp">John Tromp</a>’s <a
href="../../1989/tromp/index.html">1989/tromp</a> Tetris entry, however
this was not as portable as using a <code>curses</code> library with
<p>The <code>BUF</code> size should be set at compile time to 32767. This value was used
because the Sozobon C compiler for the Atari ST has 16 bit ints and a limit on
the size of arrays &amp; structures of 32k. Also the WatCom C compiler for the PC
also has 16 bits ints. On machines that have 32 bit ints (most unix boxes), a
larger value for <code>BUF</code> could be used.</p>
<p>It is recommend that compact memory model be used on PC class machines. Small
memory model may work too provided <code>BUF</code> is not too large.</p>
<p>The character constants <code>'\b'</code>, <code>'\f'</code>, <code>'\n'</code>, <code>'\r'</code>, <code>'\t'</code> are used in order
to provide more portable code, since the compiler should handle the translation
of them into the native character set. Note that <code>'\f'</code> (form-feed) was used to
exit insert mode because K&amp;R C had no escape constant for the escape-key.</p>
<p>My goals for this project were to learn and experiment with the Buffer Gap
Scheme [Fin80][net90], write a useful and <em>portable</em> program, and meet the
requirements of the IOCCC. I initially planned to have a mini <code>curses</code> built-in
like <a href="../../authors.html#John_Tromp">John Tromp</a>’s
<a href="../../1989/tromp/index.html">1989/tromp</a> Tetris entry,
however this was not as portable as using a <code>curses</code> library with
<code>TERMINFO</code>/<code>TERMCAP</code> support.</p>
<p>I plan to post follow-ups such as unobfuscated versions and bugs
fixes to comp.editors. Reposts of the editor.101, gap.doc, and
editor.102 can be found in the same group every so often.</p>
<p>This entry will display a file with long lines, but has trouble
scrolling the screen with long lines. Paging up and down should work
correctly, however.</p>
<p>I plan to post follow-ups such as unobfuscated versions and bugs fixes to
comp.editors. Reposts of the editor.101, gap.doc, and editor.102 can be found
in the same group every so often.</p>
<p>This entry will display a file with long lines, but has trouble scrolling the
screen with long lines. Paging up and down should work correctly, however.</p>
<h3 id="references">References:</h3>
<p>[Fin80] Craig A. Finseth, “Theory and Practice of Text Editors
or<br />
<p>[Fin80] Craig A. Finseth, “Theory and Practice of Text Editors or<br />
A Cookbook For An EMACS”, TM-165, MIT Lab. for Computer<br />
Science</p>
<p>[KeP81] Kernighan &amp; Plauger, “Software Tools in Pascal”,<br />
Addison-Wesley, 81, chapter 6</p>
<p>[Mil86] Eugene W. Myers &amp; Webb Miller, “Row-replacement
Algorithms for Screen Editors”, TR 86-19, Dept. of Computer
Science,<br />
<p>[Mil86] Eugene W. Myers &amp; Webb Miller, “Row-replacement Algorithms
for Screen Editors”, TR 86-19, Dept. of Computer Science,<br />
U. of Arizona</p>
<p>[MyM86] Eugene W. Myers &amp; Webb Miller, “A simple
row-replacement<br />
<p>[MyM86] Eugene W. Myers &amp; Webb Miller, “A simple row-replacement<br />
method”, TR 86-28, Dept. of Computer Science, U. of Arizona</p>
<p>[Mil87] Webb Miller, “A Software Tools Sampler”, Prentice Hall, 87
ISBN 0-13-822305-X, chapter 5</p>
<p>[net90] “Editor 101/102” articles from comp.editors</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-1991ant"><a name="inventory"></a>Inventory for
1991/ant</h1>
<h1 id="inventory-for-1991ant"><a name="inventory"></a>Inventory for 1991/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/1991/ant/ant.c">ant.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/ant/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/ant/ant.alt.c">ant.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/ant/ant.orig.c">ant.orig.c</a>
- original source</li>
<li><a href="1991_ant.tar.bz2">1991_ant.tar.bz2</a> - download entry
source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/ant/ant.c">ant.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/ant/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/ant/ant.alt.c">ant.alt.c</a> - alternative source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/ant/ant.orig.c">ant.orig.c</a> - original source</li>
<li><a href="1991_ant.tar.bz2">1991_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/1991/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/1991/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/1991/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/1991/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/1991/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/1991/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 -->
+136 -223
View File
@@ -129,9 +129,9 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Daniel_J_Bernstein">Daniel J.
Bernstein</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#Daniel_J_Bernstein">Daniel J. Bernstein</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 -->
@@ -146,273 +146,186 @@ Bernstein</a><br> Location: <a href="../../location.html#US">US</a> -
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./sorta</span> <span class="op">&lt;</span> sorta.itailrec</span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>For info on more examples, read the <a
href="sorta.README.html">sorta.README.html</a> web page.</p>
<p>The author wished to win the “most useful program” award and
documented this in the source code. The judges were unmoved by this
blatant attempt to influence the contest and rejected this idea… so we
gave it the “Best of Show” instead!!</p>
<p>For info on more examples, read the <a href="sorta.README.html">sorta.README.html</a> web page.</p>
<p>The author wished to win the “most useful program” award and documented this in
the source code. The judges were unmoved by this blatant attempt to influence
the contest and rejected this idea… so we gave it the “Best of Show”
instead!!</p>
<p>NOTE: One should remove the final trailing newline to obtain the
original source file. This step is not needed to compile this entry.</p>
<p>To have a chance to compile under a modern CPP, we had to replace
<code>#D</code> with <code>#define</code>.</p>
original source file. This step is not needed to compile
this entry.</p>
<p>To have a chance to compile under a modern CPP, we had to
replace <code>#D</code> with <code>#define</code>.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>This is an interpreter for the programming language SORTA, a systems
and numerical programming language with features sorta from C, sorta
from FORTH, and sorta from Ada.</p>
<p>SORTA lets you manipulate files and spawn programs easily, has
bitwise operators, and gives you absolutely brilliant error messages
like ‘?’ (that’s the C bit). SORTA programs work with a stack (that’s
the FORTH bit)—actually two stacks, one for integers and one for
strings. And all SORTA operations are strongly typed, detect practically
any failure, and garbage-collect (that’s the Ada bit).</p>
<p>SORTA lets you manipulate files and spawn programs easily, has bitwise
operators, and gives you absolutely brilliant error messages like ‘?’
(that’s the C bit). SORTA programs work with a stack (that’s the FORTH
bit)—actually two stacks, one for integers and one for strings. And
all SORTA operations are strongly typed, detect practically any failure,
and garbage-collect (that’s the Ada bit).</p>
<p>SORTA also contains features you might not expect from such a small
interpreter: arbitrary-length string input and concatenation, for
instance, not to mention infinite-depth tail recursion.</p>
<p>SORTA ignores its arguments (though it makes them available to the
script); it takes all commands, character by character, from its
standard input. Unrecognized commands are repeated with a ‘?’.</p>
<p>SORTA maintains an <code>i</code> stack for integers and an
<code>s</code> stack for strings. It also keeps track of
<code>programs</code>, one for each character. Operations are silently
ignored if the relevant stacks are too low, except as noted for
<code>s</code>, <code>S</code>, and <code>!</code>. If the
<code>i</code> stack or <code>s</code> stack (or the stack of buffered
macro commands) grows too high, SORTA will exit silently with exit code
2. (Compile parameter <code>-Do=250</code> controls what ‘too high’
means; you should not make <code>o</code> larger than 250.) I don’t
think it’s possible to crash the interpreter.</p>
<p>SORTA maintains an <code>i</code> stack for integers and an <code>s</code> stack for strings. It also
keeps track of <code>programs</code>, one for each character. Operations are silently
ignored if the relevant stacks are too low, except as noted for <code>s</code>, <code>S</code>, and
<code>!</code>. If the <code>i</code> stack or <code>s</code> stack (or the stack of buffered macro commands)
grows too high, SORTA will exit silently with exit code 2. (Compile parameter
<code>-Do=250</code> controls what ‘too high’ means; you should not make <code>o</code> larger than
250.) I don’t think it’s possible to crash the interpreter.</p>
<p>Here, then, is the SORTA programming language. All non-digits delimit
numeric constants. Spaces and newlines are ignored except as numeric
delimiters.</p>
<h3 id="basic-operations">Basic operations</h3>
<ul>
<li><code>q</code>: quit</li>
<li><code>number</code>: push that number on top of the <code>i</code>
stack</li>
<li><code>"string"</code>: push that string on top of the <code>s</code>
stack, no length limit</li>
<li><code>[string]</code>: push that string on top of the <code>s</code>
stack, no length limit</li>
<li><code>#</code>: make top of <code>i</code> stack non-destructively
in ASCII, push result onto <code>s</code> stack</li>
<li><code>`</code>: print top of <code>s</code> stack
non-destructively</li>
<li><code>$</code>: print top of <code>s</code> stack non-destructively
without newline</li>
<li><code>number</code>: push that number on top of the <code>i</code> stack</li>
<li><code>"string"</code>: push that string on top of the <code>s</code> stack, no length limit</li>
<li><code>[string]</code>: push that string on top of the <code>s</code> stack, no length limit</li>
<li><code>#</code>: make top of <code>i</code> stack non-destructively in ASCII, push result onto <code>s</code> stack</li>
<li><code>`</code>: print top of <code>s</code> stack non-destructively</li>
<li><code>$</code>: print top of <code>s</code> stack non-destructively without newline</li>
<li><code>d</code>: drop (pop) top of <code>i</code> stack</li>
<li><code>D</code>: dup (duplicate) top of <code>i</code> stack</li>
<li><code>'</code>: dup top of <code>s</code> stack</li>
<li><code>s</code>: pop top of <code>i</code> stack. If it is
<code>n</code>, swap <code>(n+1)</code>th-top of <code>i</code> stack
with top. <code>1s</code>, for example, swaps the top two elements;
<code>2s</code> swaps the top with the third down; etc. This always pops
the top of the <code>i</code> stack, even upon failure.</li>
<li><code>S</code>: pop top of <code>i</code> stack, then act just like
<code>s</code> but upon <code>s</code> stack</li>
<li><code>l</code>: pop top of <code>s</code> stack, push its length
onto <code>i</code> stack</li>
<li><code>s</code>: pop top of <code>i</code> stack. If it is <code>n</code>, swap <code>(n+1)</code>th-top of <code>i</code> stack with top.
<code>1s</code>, for example, swaps the top two elements; <code>2s</code> swaps the top with the
third down; etc. This always pops the top of the <code>i</code> stack, even upon
failure.</li>
<li><code>S</code>: pop top of <code>i</code> stack, then act just like <code>s</code> but upon <code>s</code> stack</li>
<li><code>l</code>: pop top of <code>s</code> stack, push its length onto <code>i</code> stack</li>
<li><code>a</code>: push argc onto <code>i</code> stack</li>
<li><code>A</code>: pop top of <code>i</code> stack, push
<code>argv[i]</code> on top of <code>s</code> stack</li>
<li><code>T</code>: concatenate top two elements of <code>s</code>
stack</li>
<li><code>A</code>: pop top of <code>i</code> stack, push <code>argv[i]</code> on top of <code>s</code> stack</li>
<li><code>T</code>: concatenate top two elements of <code>s</code> stack</li>
<li><code>_</code>: negate top of <code>i</code> stack</li>
<li><code>+</code>: pop top two elements of <code>i</code> stack, add,
push back sum</li>
<li><code>*</code>: pop top two elements of <code>i</code> stack,
multiply, push back product</li>
<li><code>/</code>: pop top two elements of <code>i</code> stack,
divide, push back quotient</li>
<li><code>&gt;</code>: pop top two elements of <code>i</code> stack,
compare, push back 1 or 0 as in C</li>
<li><code>&amp;</code>: pop top two elements of <code>i</code> stack,
NAND, push back bitwise result Note that NAND is sufficient to construct
all bitwise operations, as demonstrated by <code>icalc</code> in <a
href="sorta.README.html">sorta.README.html</a>.</li>
<li><code>+</code>: pop top two elements of <code>i</code> stack, add, push back sum</li>
<li><code>*</code>: pop top two elements of <code>i</code> stack, multiply, push back product</li>
<li><code>/</code>: pop top two elements of <code>i</code> stack, divide, push back quotient</li>
<li><code>&gt;</code>: pop top two elements of <code>i</code> stack, compare, push back 1 or 0 as in C</li>
<li><code>&amp;</code>: pop top two elements of <code>i</code> stack, NAND, push back bitwise result
Note that NAND is sufficient to construct all bitwise operations, as
demonstrated by <code>icalc</code> in <a href="sorta.README.html">sorta.README.html</a>.</li>
</ul>
<h3 id="system-operations">System operations</h3>
<ul>
<li><code>o</code>: pop top of <code>s</code> stack and top two of
<code>i</code> stack; <code>open(s1,i2,i1);</code> leave result on
<code>i</code> stack</li>
<li><code>O</code>: pop top of <code>i</code> stack,
<code>close()</code> it</li>
<li><code>u</code>: pop top of <code>i</code> stack, <code>dup()</code>
it, push result back on</li>
<li><code>F</code>: <code>fork()</code>, push result on <code>i</code>
stack. This is not always safe while SORTA is reading keyboard input or
a script, as the forked programs share file descriptors. It is always
safe inside a program (see below).</li>
<li><code>P</code>: <code>pipe()</code>, push two ends
<code>&lt;p0&gt; &lt;p1&gt;</code> onto <code>i</code> stack. In case of
trouble, <code>push &lt;?&gt; &lt;-1&gt;</code> onto <code>i</code>
stack.</li>
<li><code>w</code>: <code>wait()</code>, push successful result (or
<code>-1</code> if no children) on <code>i</code> stack</li>
<li><code>!</code>: <code>execvp()</code> top of the <code>s</code>
stack. Arguments are the next things down on the <code>s</code> stack,
in reverse order from popping; the first character of each string is
lopped off. There must be an empty string somewhere in the
<code>s</code> stack to terminate the argument list. If the
<code>execve()</code> fails, any operation involving current members of
the <code>s</code> stack has undefined effects, and <code>-1</code> is
pushed onto the <code>i</code> stack.</li>
<li><code>o</code>: pop top of <code>s</code> stack and top two of <code>i</code> stack; <code>open(s1,i2,i1);</code> leave
result on <code>i</code> stack</li>
<li><code>O</code>: pop top of <code>i</code> stack, <code>close()</code> it</li>
<li><code>u</code>: pop top of <code>i</code> stack, <code>dup()</code> it, push result back on</li>
<li><code>F</code>: <code>fork()</code>, push result on <code>i</code> stack. This is not always safe while SORTA is
reading keyboard input or a script, as the forked programs share file
descriptors. It is always safe inside a program (see below).</li>
<li><code>P</code>: <code>pipe()</code>, push two ends <code>&lt;p0&gt; &lt;p1&gt;</code> onto <code>i</code> stack. In case of trouble,
<code>push &lt;?&gt; &lt;-1&gt;</code> onto <code>i</code> stack.</li>
<li><code>w</code>: <code>wait()</code>, push successful result (or <code>-1</code> if no children) on <code>i</code> stack</li>
<li><code>!</code>: <code>execvp()</code> top of the <code>s</code> stack. Arguments are the next things down on
the <code>s</code> stack, in reverse order from popping; the first character of
each string is lopped off. There must be an empty string somewhere
in the <code>s</code> stack to terminate the argument list. If the <code>execve()</code>
fails, any operation involving current members of the <code>s</code> stack has
undefined effects, and <code>-1</code> is pushed onto the <code>i</code> stack.</li>
</ul>
<h3 id="high-level-language-operations">High-level language
operations</h3>
<h3 id="high-level-language-operations">High-level language operations</h3>
<ul>
<li><code>:x</code>: copy the top of the <code>s</code> stack into a
program labeled by character <code>x</code></li>
<li><code>=x</code>: pop the top of the <code>i</code> stack. If it was
nonzero, execute the program labeled by character <code>x</code>. Note
that a digit at the end of a program will merge with any digits after
<code>=x</code>; in that case you usually want to add a space at the end
of the program.</li>
<li><code>:x</code>: copy the top of the <code>s</code> stack into a program labeled by character <code>x</code></li>
<li><code>=x</code>: pop the top of the <code>i</code> stack. If it was nonzero, execute the program
labeled by character <code>x</code>. Note that a digit at the end of a program
will merge with any digits after <code>=x</code>; in that case you usually want
to add a space at the end of the program.</li>
</ul>
<p>Common idioms: To drop the top of the <code>s</code> stack,
<code>ld</code>. To do a <code>&lt;</code>, <code>1s&gt;</code>. To
unconditionally execute the program labeled by character <code>x</code>,
<code>1=x</code> (or any nonzero number followed by <code>=x</code>). To
print the top of the <code>i</code> stack non-destructively,
<code>#</code> (or <code>#$</code> if you don’t want the newline). To
subtract, <code>_+</code>. To do mod or and or any of the other missing
operations, combine the available operations as illustrated below. To
introduce a comment,
<code>[ this is a comment string which is promptly eliminated ]ld</code>.</p>
<p><code>SORTA</code>’s requirements: it wants <code>fork()</code>,
<code>execvp()</code>, <code>open()</code>, <code>close()</code>,
<code>dup()</code>, <code>pipe()</code>, and <code>wait()</code>, so it
obviously won’t even compile on a non-UNIX machine. It also assumes that
you have a size-256 character set and that the characters between
<code>'0'</code> and <code>'9'</code> are exactly the digits in order.
It does <em>not</em> depend on ASCII, despite the code appearance. Also
note that SORTA does not attempt to declare <code>malloc()</code>, so
you will get some warnings about illegal pointer combinations. Also note
that there are unreachable statements in SORTA.</p>
<p>While the program source of course depends highly on
<code>#define</code>s for obfuscation, I like to think that this code
has those little touches, those professionally sharpened edges that mark
true software engineering. Observe, for instance, how <code>i</code> and
<code>s</code> are the string and integer stacks respectively. It’s
these little things that make you feel at home in an otherwise utterly
useless piece of code. They’re what make an obfuscation work.</p>
<p>The character pool (<code>I</code> after cpp) makes it rather painful
to see the effect of commands at a glance. I can just imagine people
spending hours bouncing between the pool and the rest of the code, or
accidentally changing the pool without realizing its importance. Without
documentation and example scripts, someone would find it a challenge to
figure out what the arrays are used for, let alone that SORTA is a
scripting language.</p>
<p>Another nice feature is that the SORTA language itself encourages you
to write not merely obfuscated but plain incomprehensible scripts (like
the <a href="sorta.README.html">examples in sorta.README.html</a> —after
working with the language for a while, I guess I can read it pretty
easily, but I also think FORTH is a beautiful language). The numbers
running around everywhere will make people think of ASCII, even though
the code is not ASCII-dependent. What’s your first thought when you see
several <code>arrays[256]</code>? This is pretty standard obfuscation
otherwise. I like the way that unbalanced macro braces can throw off the
reader in <code>if(c&gt;0){y+1]=z[c];</code>, and I had fun covering the
alphabet with <code>#define</code>s, but that’s nothing special.</p>
<p>Common idioms: To drop the top of the <code>s</code> stack, <code>ld</code>. To do a <code>&lt;</code>, <code>1s&gt;</code>. To
unconditionally execute the program labeled by character <code>x</code>, <code>1=x</code> (or any
nonzero number followed by <code>=x</code>). To print the top of the <code>i</code> stack
non-destructively, <code>#</code> (or <code>#$</code> if you don’t want the newline). To
subtract, <code>_+</code>. To do mod or and or any of the other missing operations,
combine the available operations as illustrated below. To introduce a
comment, <code>[ this is a comment string which is promptly eliminated ]ld</code>.</p>
<p><code>SORTA</code>’s requirements: it wants <code>fork()</code>, <code>execvp()</code>, <code>open()</code>,
<code>close()</code>, <code>dup()</code>, <code>pipe()</code>, and <code>wait()</code>, so it obviously won’t even compile
on a non-UNIX machine. It also assumes that you have a size-256
character set and that the characters between <code>'0'</code> and <code>'9'</code> are exactly
the digits in order. It does <em>not</em> depend on ASCII, despite the code
appearance. Also note that SORTA does not attempt to declare <code>malloc()</code>,
so you will get some warnings about illegal pointer combinations. Also
note that there are unreachable statements in SORTA.</p>
<p>While the program source of course depends highly on <code>#define</code>s for
obfuscation, I like to think that this code has those little touches,
those professionally sharpened edges that mark true software
engineering. Observe, for instance, how <code>i</code> and <code>s</code> are the string and
integer stacks respectively. It’s these little things that make you
feel at home in an otherwise utterly useless piece of code. They’re
what make an obfuscation work.</p>
<p>The character pool (<code>I</code> after cpp) makes it rather painful to
see the effect of commands at a glance. I can just imagine people
spending hours bouncing between the pool and the rest of the code,
or accidentally changing the pool without realizing its importance.
Without documentation and example scripts, someone would find it
a challenge to figure out what the arrays are used for, let alone
that SORTA is a scripting language.</p>
<p>Another nice feature is that the SORTA language itself encourages you to write
not merely obfuscated but plain incomprehensible scripts (like the <a href="sorta.README.html">examples in
sorta.README.html</a> —after working with the language for a
while, I guess I can read it pretty easily, but I also think FORTH is a
beautiful language). The numbers running around everywhere will make people
think of ASCII, even though the code is not ASCII-dependent. What’s your first
thought when you see several <code>arrays[256]</code>? This is pretty standard obfuscation
otherwise. I like the way that unbalanced macro braces can throw off the reader
in <code>if(c&gt;0){y+1]=z[c];</code>, and I had fun covering the alphabet with <code>#define</code>s,
but that’s nothing special.</p>
<p>Possible future extensions to SORTA include string extraction and
matching, reading from files into strings, and encrypting the string
pool to further confuse the judges. I don’t think I can fit this into
the size limit, unfortunately.</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-1991brnstnd"><a name="inventory"></a>Inventory for
1991/brnstnd</h1>
<h1 id="inventory-for-1991brnstnd"><a name="inventory"></a>Inventory for 1991/brnstnd</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/1991/brnstnd/brnstnd.c">brnstnd.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/brnstnd.orig.c">brnstnd.orig.c</a>
- original source</li>
<li><a href="sorta.README.html">sorta.README.html</a> - SORTA language
infomation</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/try.sh">try.sh</a>
- how to run</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/try.txt">try.txt</a>
- input data for try.sh</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.i2+2">sorta.i2+2</a>
- SORTA source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.iarg0">sorta.iarg0</a>
- SORTA source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.icalc">sorta.icalc</a>
- SORTA source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.idup">sorta.idup</a>
- SORTA source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.iecho">sorta.iecho</a>
- SORTA source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.ifact1">sorta.ifact1</a>
- SORTA source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.ifact2">sorta.ifact2</a>
- SORTA source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.ifact3">sorta.ifact3</a>
- SORTA source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.iio">sorta.iio</a>
- SORTA source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.irot13">sorta.irot13</a>
- SORTA source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.isleep">sorta.isleep</a>
- SORTA source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.itailrec">sorta.itailrec</a>
- SORTA source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.iwhosort">sorta.iwhosort</a>
- SORTA source</li>
<li><a href="1991_brnstnd.tar.bz2">1991_brnstnd.tar.bz2</a> - download
entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/brnstnd.c">brnstnd.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/brnstnd.orig.c">brnstnd.orig.c</a> - original source</li>
<li><a href="sorta.README.html">sorta.README.html</a> - SORTA language infomation</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/try.txt">try.txt</a> - input data for try.sh</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.i2+2">sorta.i2+2</a> - SORTA source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.iarg0">sorta.iarg0</a> - SORTA source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.icalc">sorta.icalc</a> - SORTA source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.idup">sorta.idup</a> - SORTA source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.iecho">sorta.iecho</a> - SORTA source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.ifact1">sorta.ifact1</a> - SORTA source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.ifact2">sorta.ifact2</a> - SORTA source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.ifact3">sorta.ifact3</a> - SORTA source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.iio">sorta.iio</a> - SORTA source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.irot13">sorta.irot13</a> - SORTA source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.isleep">sorta.isleep</a> - SORTA source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.itailrec">sorta.itailrec</a> - SORTA source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.iwhosort">sorta.iwhosort</a> - SORTA source</li>
<li><a href="1991_brnstnd.tar.bz2">1991_brnstnd.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/1991/brnstnd/.entry.json">.entry.json</a>
- description of entry in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/.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/1991/brnstnd/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/.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/1991/brnstnd/README.md">README.md</a>
- markdown source for index.html</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.README.md">sorta.README.md</a>
- markdown source for sorta.README.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/README.md">README.md</a> - markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/brnstnd/sorta.README.md">sorta.README.md</a> - markdown source for sorta.README.html</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
+31 -45
View File
@@ -120,14 +120,12 @@
<!-- 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 -->
<p>The <code>sorta</code> scripts described below can sorta be found in
this directory.</p>
<p>The <code>sorta</code> scripts described below can sorta be found in this directory.</p>
<h1 id="sorta.i22"><a href="sorta.i2+2">sorta.i2+2</a></h1>
<pre><code>2 2+#` [ about as basic as you can get ]ld</code></pre>
<p>This script takes 2, adds 2 to it, and prints the result (with a
newline). I get 5 on the hand-held Sinclair under ZYNIX. Let me know if
your machine produces a different result so that I can send you
patches.</p>
your machine produces a different result so that I can send you patches.</p>
<h1 id="sorta.iarg0"><a href="sorta.iarg0">sorta.iarg0</a></h1>
<pre><code>0A` [ take arg 0, print it ]</code></pre>
<p>This is self-explanatory.</p>
@@ -165,32 +163,27 @@ D # &quot; in binary is &quot;T 1=2 `ld
1=D 1s# &quot; &amp; &quot;T 1s#T &quot; is &quot;T &amp;D&amp; #T$ld &quot; (&quot; 1=2 &quot;)&quot;T `ld
1=D 1s# &quot; | &quot;T 1s#T &quot; is &quot;T D&amp;1sD&amp;&amp; #T$ld &quot; (&quot; 1=2 &quot;)&quot;T `ld
1=D 1s# &quot; ^ &quot;T 1s#T &quot; is &quot;T 1=D&amp;2sD&amp;1sD&amp;&amp;&amp;D&amp; #T$ld &quot; (&quot; 1=2 &quot;)&quot;T `ld</code></pre>
<p><code>icalc</code> shows off <code>SORTA</code>’s understanding of
integer arithmetic. You can run it with up to two arguments; the
arguments have default values of 27182 and 3145. Notice that
<code>SORTA</code> doesn’t have a language primitive for converting a
string to a number, yet <code>icalc</code> is performing arithmetic on
its arguments. Can you see how? (Hint: Try
<code>./sorta "2 2+" 3 &lt; sorta.icalc</code>. Look at program A.)
<code>icalc</code> also provides a useful binary output routine, and if
you can’t remember offhand that
<code>D2sD3s&amp;2sD&amp;1sD&amp;&amp;&amp;D&amp;</code> means XOR, you
can just look it up here.</p>
<p><code>icalc</code> shows off <code>SORTA</code>’s understanding of integer arithmetic. You can run
it with up to two arguments; the arguments have default values of 27182
and 3145. Notice that <code>SORTA</code> doesn’t have a language primitive for
converting a string to a number, yet <code>icalc</code> is performing arithmetic on
its arguments. Can you see how? (Hint: Try <code>./sorta "2 2+" 3 &lt; sorta.icalc</code>.
Look at program A.) <code>icalc</code> also provides a useful binary output routine,
and if you can’t remember offhand that <code>D2sD3s&amp;2sD&amp;1sD&amp;&amp;&amp;D&amp;</code> means XOR,
you can just look it up here.</p>
<h1 id="sorta.idup"><a href="sorta.idup">sorta.idup</a></h1>
<pre><code>[ld#1_+1=y]:x
[uD1+=x]:y
0&quot;&quot;1=y`</code></pre>
<p>This script prints out the maximum file descriptor available from
repeated <code>dup(2)</code>s—usually <code>NOFILE - 1</code>. Can you
see how it works?</p>
repeated <code>dup(2)</code>s—usually <code>NOFILE - 1</code>. Can you see how it works?</p>
<h1 id="sorta.iecho"><a href="sorta.iecho">sorta.iecho</a></h1>
<pre><code>[&quot; &quot;$ld]:sld [ print a space ]ld
[1s1+DA$ld1s1_+D=sD=x]:xld [ given n (argc-n), print args ]ld
0a1_+D=x&quot;&quot;` [ simulation of /bin/echo ]ld</code></pre>
<p>This is a clone of <code>/bin/echo</code>, minus any argument
processing and escape interpretation. (Note that, unlike some shells’
echo, <code>/bin/echo</code> prints a newline even with no arguments.)
Try <code>./sorta foo bar &lt; iecho</code>.</p>
<p>This is a clone of <code>/bin/echo</code>, minus any argument processing and escape
interpretation. (Note that, unlike some shells’ echo, <code>/bin/echo</code> prints a
newline even with no arguments.) Try <code>./sorta foo bar &lt; iecho</code>.</p>
<h1 id="sorta.ifact1"><a href="sorta.ifact1">sorta.ifact1</a></h1>
<pre><code>1#`ld2*#`ld3*#`ld4*#`ld5*#`ld6*#`ld7*#`ld8*#`ld9*#`ld10*#`ld</code></pre>
<p>This is a very straightforward factorial program: Take 1, print it,
@@ -199,25 +192,21 @@ multiply by 2, print it, multiply by 3, print it, etc.</p>
<pre><code>[1+D2s*#`ld1s]:f
1 0
1=f 1=f 1=f 1=f 1=f 1=f 1=f 1=f 1=f 1=f</code></pre>
<p><code>ifact1</code> does a lot of repeated work. <code>ifact2</code>
takes advantage of this by keeping the current <code>n!</code>
<code>n</code> on the stack. Each call to routine <code>f (1=f)</code>
increments <code>n</code> by <code>1</code> and prints out the
factorial.</p>
<p><code>ifact1</code> does a lot of repeated work. <code>ifact2</code> takes advantage of this by
keeping the current <code>n!</code> <code>n</code> on the stack. Each call to routine <code>f (1=f)</code>
increments <code>n</code> by <code>1</code> and prints out the factorial.</p>
<h1 id="sorta.ifact3"><a href="sorta.ifact3">sorta.ifact3</a></h1>
<pre><code>[1+D2s*#`ld1s]:f [ given (n-1)! (n-1), print n!, put n! n ]
[2s1=f2s1_+D0&gt;=x]:x [ given n n! x, print (n+1)! through (n+x)! ]
0 1 10 1=x</code></pre>
<p>Finally, <code>ifact3</code> removes all the redundancy from
<code>ifact2</code>, and exhibits proper documentation of stack
routines. You can replace the <code>10</code> by anything in this
version.</p>
<p>Finally, <code>ifact3</code> removes all the redundancy from <code>ifact2</code>, and exhibits
proper documentation of stack routines. You can replace the <code>10</code> by
anything in this version.</p>
<h1 id="sorta.iio"><a href="sorta.iio">sorta.iio</a></h1>
<pre><code> [ a simple example of interpreting code on the fly ]ld
[&quot;] &quot;2 2+&quot;:xT [&quot;]T &quot; produces &quot;T 1=x#T &quot; which should be 4.&quot;T`</code></pre>
<p>Notice that <code>"2 2+"</code> is a literal string inside the
program.</p>
<p>Notice that <code>"2 2+"</code> is a literal string inside the program.</p>
<h1 id="sorta.irot13"><a href="sorta.irot13">sorta.irot13</a></h1>
<pre><code>&quot;[] [.tr] &quot;
[&quot;]&quot;.[a-m][n-z][A-M][N-Z]&quot;[&quot; ]TTT [&quot;]&quot;.[n-z][a-m][N-Z][A-M]&quot;[&quot; ]TTT
@@ -228,15 +217,13 @@ a2_+=g
1A 0 [ that 0 is for RDONLY ]ld
0 &#39;o D0 1s&gt;=hld
0Ou1=x [ in a more complex spawner, this would be done under a fork ]ld</code></pre>
<p>Despite its name, <code>irot13</code> is meant to show how to exec a
program with redirection from within <code>sorta</code>. You run it as
<code>./sorta blah &lt; irot13</code>; it opens <code>blah</code> and
runs a (BSD-style) <code>tr</code> command to rotate all letters by 13
spots. <code>1A 0 0 o</code> opens <code>argv[1]</code>; the
<code>'</code> keeps the filename around for subroutine <code>h</code>
to print a nice error message if necessary. <code>0Ou</code> closes
stdout and replaces it with the new descriptor. Finally, subroutine
<code>x</code> executes the <code>tr</code>.</p>
<p>Despite its name, <code>irot13</code> is meant to show how to exec a program with
redirection from within <code>sorta</code>. You run it as <code>./sorta blah &lt; irot13</code>; it
opens <code>blah</code> and runs a (BSD-style) <code>tr</code> command to rotate all letters by 13
spots. <code>1A 0 0 o</code> opens <code>argv[1]</code>; the <code>'</code> keeps the filename around for
subroutine <code>h</code> to print a nice error message if necessary. <code>0Ou</code> closes
stdout and replaces it with the new descriptor. Finally, subroutine <code>x</code>
executes the <code>tr</code>.</p>
<h1 id="sorta.isleep"><a href="sorta.isleep">sorta.isleep</a></h1>
<pre><code>[&quot;&quot; &quot;+sleep&quot; &quot;+5&quot; &quot;sleep&quot; !q]:S [F0&gt;1_+=S]:s
&quot;forking sleep 5...&quot;`ld
@@ -248,10 +235,9 @@ w
<h1 id="sorta.itailrec"><a href="sorta.itailrec">sorta.itailrec</a></h1>
<pre><code>[3*#&quot; &quot;T$ldD=f]:f
1=f</code></pre>
<p>The sole purpose of this script is to prove that <code>sorta</code>
can do infinite tail recursion (in this case, in program
<code>f</code>). Do <code>./sorta &lt; itailrec | more</code> and watch
the powers of 3 (mod your computer’s word size) flow by.</p>
<p>The sole purpose of this script is to prove that <code>sorta</code> can do infinite
tail recursion (in this case, in program <code>f</code>). Do <code>./sorta &lt; itailrec | more</code>
and watch the powers of 3 (mod your computer’s word size) flow by.</p>
<h1 id="sorta.iwhosort"><a href="sorta.iwhosort">sorta.iwhosort</a></h1>
<pre><code>[0Ou &quot;&quot; &quot;+-u&quot; &quot;sort&quot; !q]:S [F0&gt;1_+=S]:s
[1Ou &quot;&quot; &quot;+-u&quot; &quot;who&quot; !q]:W [F0&gt;1_+=W]:w
+50 -71
View File
@@ -130,8 +130,8 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Sean_Barrett">Sean Barrett</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,23 +141,20 @@ 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> all</span></code></pre></div>
<p>There is an <a href="#alternate-code">alternate version</a> which
might feel more at home for vi(m) users in navigation.</p>
<p>There is an <a href="#alternate-code">alternate version</a> which might feel more at home
for vi(m) users in navigation.</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#1991_buzzard">1991 buzzard bugs</a>.</p>
<p>For more detailed information see <a href="../../bugs.html#1991_buzzard">1991 buzzard 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">./buzzard</span></span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>This version changes the keys <code>f</code> for forward,
<code>l</code> for left and <code>r</code> for right by default to
<code>k</code> for forward, <code>l</code> for right and <code>h</code>
for left, which is more natural for those who use vi(m). Also one can
just hit <code>q</code> followed by enter to quit the maze. It is
problematic to reconfigure the keys except by modifying the code
directly so the keys are not made a <code>-D</code> at the compiler.</p>
<p>This version changes the keys <code>f</code> for forward, <code>l</code> for left and <code>r</code> for right by
default to <code>k</code> for forward, <code>l</code> for right and <code>h</code> for left, which is more
natural for those who use vi(m). Also one can just hit <code>q</code> followed by enter to
quit the maze. It is problematic to reconfigure the keys except by modifying the
code directly so the keys are not made a <code>-D</code> at the compiler.</p>
<h3 id="alternate-build">Alternate build:</h3>
<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>
@@ -167,96 +164,78 @@ directly so the keys are not made a <code>-D</code> at the compiler.</p>
<p>You are invited to try to cheat, … if you can figure out how! :-)</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="how-to-play">How to play</h3>
<p>When the game starts, you are at the far end of the maze from the
exit, looking down a corridor. To move forward, type <code>f</code> and
press return. To turn 90 degrees right, type <code>r</code>; and for
left, <code>l</code>. You can put multiple commands on one line, and the
new view will be drawn after all the moves.</p>
<p>When the game starts, you are at the far end of the maze from the exit, looking
down a corridor. To move forward, type <code>f</code> and press return. To turn 90
degrees right, type <code>r</code>; and for left, <code>l</code>. You can put multiple commands on
one line, and the new view will be drawn after all the moves.</p>
<p>The game ends if you get out the exit (you’ll know it when you see
it) or when you type <code>^D</code> (EOF).</p>
<h3 id="hints-on-how-to-cheat">Hints on how to cheat</h3>
<p>You can, of course, cheat by looking at the maze map. The question
you need to ask yourself, though, is what sequence of characters marks
the place where you can escape the maze?</p>
<p>The algorithm is quite bizarre–the primary nested loop that generates
it goes top to bottom on the display, looping forward then backward from
the current position to draw the left side and then the right side.</p>
you need to ask yourself, though, is what sequence of characters
marks the place where you can escape the maze?</p>
<p>The algorithm is quite bizarre–the primary nested loop that
generates it goes top to bottom on the display, looping forward
then backward from the current position to draw the left side and
then the right side.</p>
<h3 id="advanced-usage-notes">Advanced usage notes</h3>
<p>The program can also be run from other files containing mazes. The
maze should be laid out graphically in the obvious format; newlines
separate physical rows in the maze; a space indicates a corridor, and
any other character is a wall. Tabs are also considered walls, so make
sure to convert tabs to spaces before using it.</p>
separate physical rows in the maze; a space indicates a corridor,
and any other character is a wall. Tabs are also considered walls,
so make sure to convert tabs to spaces before using it.</p>
<p>Usage:</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">./buzzard</span> [filename [escape-char [start-x start-yNNN</span></code></pre></div>
<p>Filename is the name of the file containing the maze. This defaults
to <code>buzzard.c</code> or rather <code>__FILE__</code>.</p>
<p>Filename is the name of the file containing the maze. This
defaults to <code>buzzard.c</code> or rather <code>__FILE__</code>.</p>
<p>Escape-char is the character in the maze that represents the exit.
You can put more than one exit in the maze (for example, you could make
all ’!’s in the maze be exits).</p>
<p>Start-x and start-y mark the coordinates where you begin playing. Y
coordinate is down the rows in the files, X is to the right through the
characters of each line. Both X and Y begin counting from 0. The default
is start-x = 4, start-y = 5, which is needed for the buzzard.c, but
would probably be inappropriate for other mazes.</p>
You can put more than one exit in the maze (for example, you could
make all ’!’s in the maze be exits).</p>
<p>Start-x and start-y mark the coordinates where you begin playing.
Y coordinate is down the rows in the files, X is to the right
through the characters of each line. Both X and Y begin counting
from 0. The default is start-x = 4, start-y = 5, which is needed
for the buzzard.c, but would probably be inappropriate for other
mazes.</p>
<h3 id="bugs">BUGS:</h3>
<p>You can’t change that at start you’re facing down (“south”).</p>
<p>The drawing algorithm cannot handle open spaces (two successive
side-corridors with no wall between them). In fact, it cannot handle
small dog-legs properly, although the error is subtle.</p>
<p>The exit is drawn like a normal corridor from the side view; it’s
only displayed as the exit when you are facing it.</p>
<p>The exit is drawn like a normal corridor from the side view;
it’s only displayed as the exit when you are facing it.</p>
<p>Improper command line arguments are not handled nicely.</p>
<p>Mazes with openings at the edges will cause the drawing program to
reach into arbitrary parcels of memory.</p>
<p>Mazes with openings at the edges will cause the drawing program
to reach into arbitrary parcels of memory.</p>
<p>The program assumes that tabs are set to 8 characters.</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-1991buzzard"><a name="inventory"></a>Inventory for
1991/buzzard</h1>
<h1 id="inventory-for-1991buzzard"><a name="inventory"></a>Inventory for 1991/buzzard</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/1991/buzzard/buzzard.c">buzzard.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/buzzard/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/buzzard/buzzard.alt.c">buzzard.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/buzzard/buzzard.orig.c">buzzard.orig.c</a>
- original source</li>
<li><a href="1991_buzzard.tar.bz2">1991_buzzard.tar.bz2</a> - download
entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/buzzard/buzzard.c">buzzard.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/buzzard/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/buzzard/buzzard.alt.c">buzzard.alt.c</a> - alternative source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/buzzard/buzzard.orig.c">buzzard.orig.c</a> - original source</li>
<li><a href="1991_buzzard.tar.bz2">1991_buzzard.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/1991/buzzard/.entry.json">.entry.json</a>
- description of entry in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/buzzard/.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/1991/buzzard/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/buzzard/.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/1991/buzzard/README.md">README.md</a>
- markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/buzzard/README.md">README.md</a> - markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
+21 -37
View File
@@ -129,9 +129,9 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Christian_Dupont">Christian
Dupont</a><br> Location: <a href="../../location.html#FR">FR</a> -
<em>French Republic</em> (<em>France</em>) <br><br></li>
<li>Name: <a href="../../authors.html#Christian_Dupont">Christian Dupont</a><br>
Location: <a href="../../location.html#FR">FR</a> - <em>French Republic</em> (<em>France</em>)
<br><br></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -149,61 +149,45 @@ Dupont</a><br> Location: <a href="../../location.html#FR">FR</a> -
<p>Notice that if you C beautify (cb) or pre-process this program, it
will no longer work correctly, if at all. (go ahead, try it… :-))</p>
<p>NOTE: One should remove the final trailing newline to obtain the
original source file. This step is not needed to compile this entry.</p>
original source file. This step is not needed to compile
this entry.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>The source code holds the letters of the message. Each letter,
combined with another key letter, is used to compute the coordinates of
the next letter and key. Thus, the message is code. That is why I use
silly comments, most often badly spaced.</p>
<p>The source code holds the letters of the message. Each letter, combined
with another key letter, is used to compute the coordinates of the next
letter and key. Thus, the message is code. That is why I use silly
comments, most often badly spaced.</p>
<p>The space character sequence between the words is given by a simple
computation in an octal constant (given here as an hex value, of
course).</p>
<p>This way, any message can be mixed into a code, since the keys allow
you to place the meaningful letters wherever you want.</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-1991cdupont"><a name="inventory"></a>Inventory for
1991/cdupont</h1>
<h1 id="inventory-for-1991cdupont"><a name="inventory"></a>Inventory for 1991/cdupont</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/1991/cdupont/cdupont.c">cdupont.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/cdupont/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/cdupont/cdupont.orig.c">cdupont.orig.c</a>
- original source</li>
<li><a href="1991_cdupont.tar.bz2">1991_cdupont.tar.bz2</a> - download
entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/cdupont/cdupont.c">cdupont.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/cdupont/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/cdupont/cdupont.orig.c">cdupont.orig.c</a> - original source</li>
<li><a href="1991_cdupont.tar.bz2">1991_cdupont.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/1991/cdupont/.entry.json">.entry.json</a>
- description of entry in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/cdupont/.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/1991/cdupont/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/cdupont/.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/1991/cdupont/README.md">README.md</a>
- markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/cdupont/README.md">README.md</a> - markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
+71 -88
View File
@@ -129,9 +129,9 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#David_Applegate">David
Applegate</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#David_Applegate">David Applegate</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 -->
@@ -157,115 +157,98 @@ Applegate</a><br> Location: <a href="../../location.html#US">US</a> -
<li>it did not require X to be on the host system</li>
<li>both BSD and SVR4 have sockets</li>
</ul>
<p>Now that X11 and sockets have become ‘standard’, we plan to open up
the contest to programs that use them. Future rules will explain this
further.</p>
<p>We are pleased that this entry has helped bring new ‘life’ into the
contest.</p>
<p>Now that X11 and sockets have become ‘standard’, we plan to open
up the contest to programs that use them. Future rules will
explain this further.</p>
<p>We are pleased that this entry has helped bring new ‘life’ into
the contest.</p>
<h2 id="authors-remarks">Authors’ remarks:</h2>
<p>The program is a fully-functional X client. It talks directly to the
X server through a socket without using Xlib, Xt or any other wussy
toolkit junk. With no arguments, it will try to run locally using the
unix-domain socket (only on BSD :-( ) or you can give it a command line
argument identifying a display host address (in dotted octet notation,
like 127.0.0.1:0.0) where the X server is running. It handles color and
monochrome displays, and performs whatever byte-swapping and
bit-reversal is needed (so that the program works even when the server
and the client have different architectures). It buffers communication
to the X server for efficiency.</p>
<p>The program is a fully-functional X client. It talks directly to
the X server through a socket without using Xlib, Xt or any other
wussy toolkit junk. With no arguments, it will try to run
locally using the unix-domain socket (only on BSD :-( ) or you can
give it a command line argument identifying a display host address
(in dotted octet notation, like 127.0.0.1:0.0) where the X server
is running. It handles color and monochrome displays, and
performs whatever byte-swapping and bit-reversal is needed (so
that the program works even when the server and the client have
different architectures). It buffers communication to the X
server for efficiency.</p>
<p>NOTE: The original source in davidguy.c used only an IP address
argument (assumed :0.0) and assumed the color of black and white.</p>
argument (assumed :0.0) and assumed the color of black
and white.</p>
<p>The program doesn’t require any user interaction; you can just sit
back and watch it run. All the action takes place in the root window of
the display.</p>
back and watch it run. All the action takes place in the root
window of the display.</p>
<p>We think the program is interesting for these reasons:</p>
<ol type="1">
<li><p>It belongs to a class of programs that programmers make the
following complaints about: they require a mountain of code to implement
even the simplest program; and they must be linked with giant libraries
of hard-to-understand functions. In contrast to these complaints (made
by wimps, in our humble opinion), our program fits in under 1536 bytes,
doesn’t need any external functions except for a few system calls, and
doesn’t need to include any header files.</p></li>
<li><p>It implements an extremely efficient algorithm for the
computation it performs. One cool feature of the algorithm (at least as
far as this contest is concerned) is that its obscurity is fundamentally
necessary for its efficiency. In other words, even if we took steps to
present the algorithm clearly, (we haven’t) the relation of the
computation performed to the specification of what the program was
supposed to do would still be hard to understand.</p></li>
<li><p>It belongs to a class of programs that programmers make the following
complaints about: they require a mountain of code to implement even the
simplest program; and they must be linked with giant libraries of
hard-to-understand functions. In contrast to these complaints (made by wimps,
in our humble opinion), our program fits in under 1536 bytes, doesn’t need any
external functions except for a few system calls, and doesn’t need to include
any header files.</p></li>
<li><p>It implements an extremely efficient algorithm for the computation it
performs. One cool feature of the algorithm (at least as far as this contest is
concerned) is that its obscurity is fundamentally necessary for its efficiency.
In other words, even if we took steps to present the algorithm clearly, (we
haven’t) the relation of the computation performed to the specification of what
the program was supposed to do would still be hard to understand.</p></li>
</ol>
<h3 id="quasi-spoiler-on-internals">Quasi-spoiler on internals:</h3>
<p>The program plays <a
href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">Conway’s
Game of Life</a> in the root window’s background pixmap. It starts by
setting the background to random bits, and then plays Life, with one
Life cell for each pixel of the screen. In the game of Life, a cell
survives to the next round if 2 or 3 of its 8 neighbors are also alive,
and a cell is born if exactly 3 of its neighbors are alive. Otherwise, a
cell dies of exposure if it has only 0 or 1 neighbors, and dies of
overcrowding if it has 4 or more neighbors.</p>
<p>The program plays <a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">Conway’s Game of
Life</a> in the root window’s
background pixmap. It starts by setting the background to random
bits, and then plays Life, with one Life cell for each pixel of the
screen. In the game of Life, a cell survives to the next round if
2 or 3 of its 8 neighbors are also alive, and a cell is born if
exactly 3 of its neighbors are alive. Otherwise, a cell dies of
exposure if it has only 0 or 1 neighbors, and dies of overcrowding
if it has 4 or more neighbors.</p>
<p>The algorithm used to compute the next generation is based on the
observation that a cell’s state in the next generation is a boolean
function of its current state, and the states of its 8 neighbors (i.e.,
a boolean function from 9 bits to 1 bit). This function can be computed
by a boolean circuit. In addition, intermediate values computed by the
circuit can be shared between neighboring cells, reducing the number of
gates per cell required. These ideas have been used before, to compute
the next generation through a series of <a
href="https://en.wikipedia.org/wiki/Bit_blit">bit blits</a>.</p>
<p>Instead of doing this, we map values in the circuit to bits in
registers, so that the next generation can be computed efficiently
within registers, minimizing memory access. As a result, the computation
of the next generation is performed with about 1.6 instructions per life
cell, consisting of .125 memory accesses, .17 shifts, and 1.3 logic
operations. The net result is that the time to transfer the bits to the
X server, and for the X server to draw them on the screen, dominates the
time to compute the next generation.</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>
function of its current state, and the states of its 8 neighbors
(i.e., a boolean function from 9 bits to 1 bit). This function can
be computed by a boolean circuit. In addition, intermediate values
computed by the circuit can be shared between neighboring cells,
reducing the number of gates per cell required. These ideas
have been used before, to compute the next generation through a
series of <a href="https://en.wikipedia.org/wiki/Bit_blit">bit blits</a>.</p>
<p>Instead of doing this, we map values in the circuit to bits in registers, so
that the next generation can be computed efficiently within registers,
minimizing memory access. As a result, the computation of the next generation
is performed with about 1.6 instructions per life cell, consisting of .125
memory accesses, .17 shifts, and 1.3 logic operations. The net result is that
the time to transfer the bits to the X server, and for the X server to draw them
on the screen, dominates the time to compute the next generation.</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-1991davidguy"><a name="inventory"></a>Inventory
for 1991/davidguy</h1>
<h1 id="inventory-for-1991davidguy"><a name="inventory"></a>Inventory for 1991/davidguy</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/1991/davidguy/davidguy.c">davidguy.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/davidguy/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/davidguy/davidguy.orig.c">davidguy.orig.c</a>
- original source</li>
<li><a href="1991_davidguy.tar.bz2">1991_davidguy.tar.bz2</a> - download
entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/davidguy/davidguy.c">davidguy.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/davidguy/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/davidguy/davidguy.orig.c">davidguy.orig.c</a> - original source</li>
<li><a href="1991_davidguy.tar.bz2">1991_davidguy.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/1991/davidguy/.entry.json">.entry.json</a>
- description of entry in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/davidguy/.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/1991/davidguy/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/davidguy/.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/1991/davidguy/README.md">README.md</a>
- markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/davidguy/README.md">README.md</a> - markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
+43 -72
View File
@@ -129,9 +129,9 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Diomidis_Spinellis">Diomidis
Spinellis</a><br> Location: <a href="../../location.html#GR">GR</a> -
<em>Hellenic Republic</em> (<em>Greece</em>) <br><br></li>
<li>Name: <a href="../../authors.html#Diomidis_Spinellis">Diomidis Spinellis</a><br>
Location: <a href="../../location.html#GR">GR</a> - <em>Hellenic Republic</em> (<em>Greece</em>)
<br><br></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -148,24 +148,21 @@ Spinellis</a><br> Location: <a href="../../location.html#GR">GR</a> -
<p>The author suggests trying:</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">./dds</span> LANDER.BAS</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./a.out</span></span></code></pre></div>
<p>Notice that a file <code>a.c</code> has been generated. Can you tell
how <code>a.c</code> was produced? How does <code>a.c</code> relate to
<a href="LANDER.BAS">LANDER.BAS</a>?</p>
<p>What happens if you give the program a C program like itself?
Try:</p>
<p>Notice that a file <code>a.c</code> has been generated. Can you tell how <code>a.c</code> was
produced? How does <code>a.c</code> relate to <a href="LANDER.BAS">LANDER.BAS</a>?</p>
<p>What happens if you give the program a C program like itself? Try:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./dds</span> dds.c</span></code></pre></div>
<p>You’ll get errors yes but what does the generated file look like?
What about other types of files?</p>
<p>You’ll get errors yes but what does the generated file look like? What about
other types of files?</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This obfuscated program translates BASIC programs into obfuscated C
programs by way of an obfuscated algorithm.</p>
<p>This obfuscated program translates BASIC programs into obfuscated
C programs by way of an obfuscated algorithm.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>This program is a companion to the <a
href="../../1990/dds/index.html">1990/dds</a> 1990 DDS-BASIC interpreter
program. This compiles BASIC programs into compilable C code and then
compiles it. The input format is almost identical to the input format of
the DDS-BASIC interpreter. The program needs an executable C compiler
called <code>cc</code> in your path in order to work.</p>
<p>This program is a companion to the <a href="../../1990/dds/index.html">1990/dds</a>
1990 DDS-BASIC interpreter program. This compiles BASIC programs into compilable C code
and then compiles it. The input format is almost identical to the input format
of the DDS-BASIC interpreter. The program needs an executable C compiler called
<code>cc</code> in your path in order to work.</p>
<h3 id="program-commands">Program commands:</h3>
<ul>
<li>variable names <code>A</code> to <code>Z</code></li>
@@ -183,84 +180,58 @@ called <code>cc</code> in your path in order to work.</p>
<li>var = exp</li>
<li>END</li>
</ul>
<p>Expressions are the same as the expressions of the C language. Many
system calls and C library calls can be used.</p>
<p>Expressions are the same as the expressions of the C language.
Many system calls and C library calls can be used.</p>
<h3 id="input-format">Input format:</h3>
<ul>
<li>Free format positioning of tokens on the line.</li>
<li>No space is allowed before the line number.</li>
<li>Exactly one space is needed after the <code>FOR</code> and
<code>NEXT</code> tokens.</li>
<li>Exactly one space is needed after the <code>FOR</code> and <code>NEXT</code> tokens.</li>
<li>ALL INPUT MUST BE UPPERCASE.</li>
</ul>
<h3 id="error-checking-error-reports">Error checking / error
reports:</h3>
<p>The compiler silently ignores many errors. Other errors may produce
errors in later phases of the compilation.</p>
<h3 id="can-you-figure-out-how-the-compiler-works">Can you figure out
how the compiler works?</h3>
<h3 id="error-checking-error-reports">Error checking / error reports:</h3>
<p>The compiler silently ignores many errors.
Other errors may produce errors in later phases of the compilation.</p>
<h3 id="can-you-figure-out-how-the-compiler-works">Can you figure out how the compiler works?</h3>
<h4 id="hint">Hint:</h4>
<p>The compiler is NOT written in C, so this is really a meta-obfuscated
program. The C code is an interpreter for the four register, seven
instruction <code>COGNIMP$</code> machine that is contained in the
<code>s</code> string. (<code>COGNIMP$</code> is named after the
symbolic names of the seven instructions it defines (<code>Copy</code>,
<code>Output</code>, <code>Goto</code>, <code>iNcrement</code>,
<code>If</code>, <code>Match</code> and <code>Print</code>).</p>
<p>The <code>$</code> sign is used for labels. The actual compiler is
written in <code>COGNIMP$</code>. Browsing through the
<code>COGNIMP$</code> code we encourage you to examine the loops for
scanning the expression in the <code>IF</code> statement and the way a
decision tree is implemented in order to match the statements. (Of
course the <code>s</code> string is encoded by adding one to every
character of it just to confuse you).</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>
instruction <code>COGNIMP$</code> machine that is contained in the <code>s</code> string.
(<code>COGNIMP$</code> is named after the symbolic names of the seven instructions it
defines (<code>Copy</code>, <code>Output</code>, <code>Goto</code>, <code>iNcrement</code>, <code>If</code>, <code>Match</code> and <code>Print</code>).</p>
<p>The <code>$</code> sign is used for labels. The actual compiler is written in <code>COGNIMP$</code>.
Browsing through the <code>COGNIMP$</code> code we encourage you to examine the loops for
scanning the expression in the <code>IF</code> statement and the way a decision tree is
implemented in order to match the statements. (Of course the <code>s</code> string is
encoded by adding one to every character of it just to confuse you).</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-1991dds"><a name="inventory"></a>Inventory for
1991/dds</h1>
<h1 id="inventory-for-1991dds"><a name="inventory"></a>Inventory for 1991/dds</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/1991/dds/dds.c">dds.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/dds/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/dds/dds.orig.c">dds.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/dds/LANDER.BAS">LANDER.BAS</a>
- BASIC source code</li>
<li><a href="1991_dds.tar.bz2">1991_dds.tar.bz2</a> - download entry
source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/dds/dds.c">dds.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/dds/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/dds/dds.orig.c">dds.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/dds/LANDER.BAS">LANDER.BAS</a> - BASIC source code</li>
<li><a href="1991_dds.tar.bz2">1991_dds.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/1991/dds/.entry.json">.entry.json</a>
- description of entry in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/dds/.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/1991/dds/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/dds/.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/1991/dds/README.md">README.md</a>
- markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/dds/README.md">README.md</a> - markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
+50 -73
View File
@@ -129,9 +129,9 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Thomas_A_Fine">Thomas A.
Fine</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#Thomas_A_Fine">Thomas A. Fine</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 -->
@@ -145,53 +145,50 @@ Fine</a><br> Location: <a href="../../location.html#US">US</a> -
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> text <span class="kw">|</span> <span class="ex">./fine</span></span></code></pre></div>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
<p>Make sure that you read the last line backwards! Credit goes to <a
href="../../authors.html#Brian_Westley">Merlyn LeRoy (Brian Westley)</a>
for that. See his 22 August 1992 <a
href="https://groups.google.com/g/rec.puzzles/c/z_xVPMRVBtg/m/lyEYSAeBD4gJ">rec.puzzles
post</a>. Some others come from his 1989 entry as well. To those who
have a harder time reading backwards it says:
<code>Gary lent the rug</code>, rotated from
<code>the rug gary lent</code>!</p>
<p>Make sure that you read the last line backwards! Credit goes to <a href="../../authors.html#Brian_Westley">Merlyn LeRoy (Brian
Westley)</a> for that. See his 22 August 1992
<a href="https://groups.google.com/g/rec.puzzles/c/z_xVPMRVBtg/m/lyEYSAeBD4gJ">rec.puzzles
post</a>.
Some others come from his 1989 entry as well. To
those who have a harder time reading backwards it says: <code>Gary lent the rug</code>,
rotated from <code>the rug gary lent</code>!</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This filter, 80 chars plus a newline, fits into a single line on most
terminals (unless your terminal has a line wrap mis-feature :-)).</p>
<p>Note in 2023: fixing this entry to work with modern systems increased
the size, originally to 106 characters but it was dropped back down to
80 with clever use of the Makefile.</p>
<p>Note in 2023: fixing this entry to work with modern systems increased the size,
originally to 106 characters but it was dropped back down to 80 with clever use
of the Makefile.</p>
<p>This entry is likely one of the smallest C implementations of this
filter, excluding programs that resort to command line or include file
tricks.</p>
filter, excluding programs that resort to command line or include
file tricks.</p>
<p>How does this program work? Which 3 bytes of C code can be changed
into 2 bytes, allowing the program to still work, but also stripping the
high bit off some input?</p>
into 2 bytes, allowing the program to still work, but also stripping
the high bit off some input?</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>The author wishes to thank J Greely for the last 6 bytes.</p>
<p>Here’s about how it does it:</p>
<p>NOTE: Bits are referred to as 76543210, high to low.</p>
<ol type="1">
<li><p>Get the character in variable <code>a</code>. Note the fun way we
check for <code>EOF</code>. (thanks J).</p></li>
<li><p>Get the character in variable <code>a</code>. Note the fun way we check for <code>EOF</code>.
(thanks J).</p></li>
<li><p>Reverse bit 6, and strip bit 5. Bit 6 determines (mostly) whether
or not this character is a letter. Bit 5 would determine case if we
cared. Assign this value to variable <code>b</code> (We need to save it,
since we need to make 2 comparisons and maybe one operation with this
value). We can’t abuse our first variable, since it saves the bits we’re
changing.</p></li>
or not this character is a letter. Bit 5 would determine case if
we cared. Assign this value to variable <code>b</code> (We need to save it,
since we need to make 2 comparisons and maybe one operation with
this value). We can’t abuse our first variable, since it saves the
bits we’re changing.</p></li>
<li><p>Check this value to see if it is a letter. It must be non-zero -
if it is zero, then we have either the <code>@</code> (64) or the
<code>`</code> (96). It also must be less than 27 - this checks the
range for letters as well as implicitly checking the value of bit 6 (if
it was originally clear, it is set now, so <code>b</code> would be too
big).</p></li>
range for letters as well as implicitly checking the value of bit 6
(if it was originally clear, it is set now, so <code>b</code> would be too big).</p></li>
<li><p>If it is not a letter, the conditional expression inside of the
<code>putchar()</code> returns the original character (<code>a</code>).
Otherwise, it returns a really messy expression that performs the actual
rotation and fixes the fifth and sixth bits:</p>
<code>putchar()</code> returns the original character (<code>a</code>). Otherwise, it
returns a really messy expression that performs the actual rotation
and fixes the fifth and sixth bits:</p>
<ul>
<li><ol type="A">
<li>Subtract 1, to get into the range 0-25 (for the modulo
operation).</li>
<li>Subtract 1, to get into the range 0-25 (for the modulo operation).</li>
</ol></li>
<li><ol start="2" type="A">
<li>Add 13 to the character. Steps A and B are combined.</li>
@@ -203,65 +200,45 @@ operation).</li>
<li>Fix bits 5 and 6, based on variable <code>a</code>.</li>
</ol></li>
<li><ol start="5" type="A">
<li>Add 1 back in (we took it out in step A.) This is okay to do
<em>after</em> step D, because we know the addition won’t trickle up
past the fourth bit (<code>b</code> would have to be 31 for this to
happen).</li>
<li>Add 1 back in (we took it out in step A.) This is okay to do <em>after</em>
step D, because we know the addition won’t trickle up past the fourth bit
(<code>b</code> would have to be 31 for this to happen).</li>
</ol></li>
</ul></li>
</ol>
<p>Notice that this implementation operates only on characters with the
high bit clear. The high bit can be ignored without changing the size of
the program. Also, if you know you are only dealing with seven bit data,
the size can be reduced by one byte. These are left as exercises for the
student.</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>
high bit clear. The high bit can be ignored without changing the size
of the program. Also, if you know you are only dealing with seven bit
data, the size can be reduced by one byte. These are left as exercises
for the student.</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-1991fine"><a name="inventory"></a>Inventory for
1991/fine</h1>
<h1 id="inventory-for-1991fine"><a name="inventory"></a>Inventory for 1991/fine</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/1991/fine/fine.c">fine.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/fine/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/fine/fine.orig.c">fine.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/fine/try.sh">try.sh</a>
- how to run</li>
<li><a href="1991_fine.tar.bz2">1991_fine.tar.bz2</a> - download entry
source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/fine/fine.c">fine.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/fine/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/fine/fine.orig.c">fine.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/fine/try.sh">try.sh</a> - how to run</li>
<li><a href="1991_fine.tar.bz2">1991_fine.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/1991/fine/.entry.json">.entry.json</a>
- description of entry in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/fine/.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/1991/fine/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/fine/.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/1991/fine/README.md">README.md</a>
- markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/fine/README.md">README.md</a> - markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
+61 -76
View File
@@ -123,114 +123,99 @@
<!-- 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="eighth-international-obfuscated-c-code-contest">Eighth
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>Instructions for use: Run <code>make</code> to compile entries. It is
possible that on BSD or non-Unix systems the Makefile needs to be
changed.</p>
<h1 id="eighth-international-obfuscated-c-code-contest">Eighth 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>Instructions for use: Run <code>make</code> to compile entries. It is possible that
on BSD or non-Unix systems the Makefile needs to be changed.</p>
<p>This year, we did not single out an entry that was better than all of
the rest. We selected 3 entries that, in our opinion, went beyond all of
the other entries this year:</p>
the rest. We selected 3 entries that, in our opinion, went beyond
all of the other entries this year:</p>
<ul>
<li><a href="westley/index.html">Grand Prize</a> by <a
href="../authors.html#Brian_Westley">Brian Westley</a></li>
<li><a href="dds/index.html">Most Well Rounded</a> by <a
href="../authors.html#Diomidis_Spinellis">Diomidis Spinellis</a></li>
<li><a href="brnstnd/index.html">Best Of Show</a> by <a
href="../authors.html#Daniel_J._Bernstein">Daniel J. Bernstein</a></li>
<li><a href="westley/index.html">Grand Prize</a> by <a href="../authors.html#Brian_Westley">Brian
Westley</a></li>
<li><a href="dds/index.html">Most Well Rounded</a> by <a href="../authors.html#Diomidis_Spinellis">Diomidis
Spinellis</a></li>
<li><a href="brnstnd/index.html">Best Of Show</a> by <a href="../authors.html#Daniel_J._Bernstein">Daniel J.
Bernstein</a></li>
</ul>
<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. In the end, we are surprised as
you are to see who has won. Even so, it is worth noting that <a
href="../authors.html#Brian_Westley">Brian Westley</a> has submitted a
winning entry for the past 5 years!</p>
<h2 id="a-few-notes-regarding-possible-changes-to-the-contest">A few
notes regarding possible changes to the contest:</h2>
judging for/against any person or group. In the end, we are surprised
as you are to see who has won. Even so, it is worth noting that
<a href="../authors.html#Brian_Westley">Brian Westley</a> has submitted
a winning entry for the past 5 years!</p>
<h2 id="a-few-notes-regarding-possible-changes-to-the-contest">A few notes regarding possible changes to the contest:</h2>
<p>We did not give awards to some traditional contest categories such as
“Best Layout” or “Worst Abuse of the Rules”. We felt that to do so would
deny awards to more deserving entries. These categories have not been
eliminated, and will likely be considered in future years.</p>
<p>A number of entries made use of the following C pre-processor
feature:</p>
“Best Layout” or “Worst Abuse of the Rules”. We felt that to do so
would deny awards to more deserving entries. These categories have not
been eliminated, and will likely be considered in future years.</p>
<p>A number of entries made use of the following C pre-processor feature:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#define X define</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#</span><span class="er">X foo bar</span></span></code></pre></div>
<p>This is not permitted under ANSI C. Some ANSI C compilers do allow
this. In the future, we do not want programs to use this feature.
Because this request was not stated in the <a href="rules.txt">1991
rules</a>, we did not reject entries of this type. However we provided
more portable versions so that more people could compile these
programs.</p>
<p>This is not permitted under ANSI C. Some ANSI C compilers do allow this. In
the future, we do not want programs to use this feature. Because this request
was not stated in the <a href="rules.txt">1991 rules</a>, we did not reject entries of this
type. However we provided more portable versions so that more people could
compile these programs.</p>
<p>This year we received entries that made use of the X Window System.
Since this functionality is now available on many systems, we feel that
programs that use these are now portable enough to be valid entries.</p>
<p>We may allow programs to make use of the X Window System libs and
include files, provided that they can operate with a system running at
the level of at least X11r4. Requiring the use of imake, a specific
window manager, specific display hardware, or a specific user interface
(<code>Openl**k</code>, <code>M*tif</code>, …) is likely not to be
allowed. We will provide a more detailed explanation of our viewpoint in
next year’s rules.</p>
<p>In order to encourage more ‘normal’ looking C programs, we are
considering the following change to the maximum size rule:</p>
<p>We may allow programs to make use of the X Window System libs and include
files, provided that they can operate with a system running at the level
of at least X11r4. Requiring the use of imake, a specific window manager,
specific display hardware, or a specific user interface (<code>Openl**k</code>,
<code>M*tif</code>, …) is likely not to be allowed. We will provide a more detailed
explanation of our viewpoint in next year’s rules.</p>
<p>In order to encourage more ‘normal’ looking C programs, we are considering
the following change to the maximum size rule:</p>
<pre><code>Your source, not counting any &lt;space&gt;, &lt;tab&gt;, and a &lt;newline&gt; character,
and not counting any &#39;;&#39;, &#39;{&#39; and &#39;}&#39; character followed by a &lt;newline&gt;
character, must be 1536 bytes or less. The entire source, counting all
characters, be 4096 bytes or less.</code></pre>
<p>Some thought has been given to adding some C++ categories, however
this is not likely to happen soon. We are waiting until C++ compilers
become common place on a wide number of systems. We also need time to
brace ourselves for what obfuscation C++ could wield!</p>
<p>Be sure to wait until the 1992 rules are posted before submitting
entries. We may fine tune the rules to reflect the some ideas above.</p>
<p>Some thought has been given to adding some C++ categories, however this
is not likely to happen soon. We are waiting until C++ compilers become
common place on a wide number of systems. We also need time to brace
ourselves for what obfuscation C++ could wield!</p>
<p>Be sure to wait until the 1992 rules are posted before submitting entries.
We may fine tune the rules to reflect the some ideas above.</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>
<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>
<h2 id="credits">Credits:</h2>
<p>We would like to thank Barbara Frezza for her role as official chef
of the contest. Landon Noll appreciated the opportunity to serve as
assistant pizza chef. Larry Bassel was official taste tester. Yummo!</p>
of the contest. Landon Noll appreciated the opportunity to serve
as assistant pizza chef. Larry Bassel was official taste tester. Yummo!</p>
<h1 id="copyright-and-license">Copyright and License</h1>
<p>Copyright (c) 1991,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) 1991,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-1991---the-8th-ioccc"><a name=inventory></a><a name=1991></a>Winning
Entries of 1991 - The 8th IOCCC</h1>
<p><strong>Download IOCCC</strong> <a
href="1991/ioccc.1991.tar.bz2">1991 entry source</a></p>
<h1 id="winning-entries-of-1991---the-8th-ioccc"><a name=inventory></a><a name=1991></a>Winning Entries of 1991 - The 8th IOCCC</h1>
<p><strong>Download IOCCC</strong> <a href="1991/ioccc.1991.tar.bz2">1991 entry source</a></p>
<ul>
<li><a href="ant/index.html">1991/ant</a> - Best Utility</li>
<li><a href="brnstnd/index.html">1991/brnstnd</a> - Best Of Show</li>
<li><a href="buzzard/index.html">1991/buzzard</a> - Best Output</li>
<li><a href="cdupont/index.html">1991/cdupont</a> - Most Useful
Label</li>
<li><a href="davidguy/index.html">1991/davidguy</a> - Best X11
Graphics</li>
<li><a href="cdupont/index.html">1991/cdupont</a> - Most Useful Label</li>
<li><a href="davidguy/index.html">1991/davidguy</a> - Best X11 Graphics</li>
<li><a href="dds/index.html">1991/dds</a> - Most Well Rounded</li>
<li><a href="fine/index.html">1991/fine</a> - Best One Liner</li>
<li><a href="rince/index.html">1991/rince</a> - Best Game</li>
+43 -68
View File
@@ -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,26 +141,25 @@ 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>There are two <a href="#alternate-code">alternate versions</a> which
allow one to not be restricted in movements or to change the maximum
number of movements, even if that’s fewer than the original program.</p>
<p>There are two <a href="#alternate-code">alternate versions</a> which allow one to not be
restricted in movements or to change the maximum number of movements, even if
that’s fewer than the original program.</p>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./rince</span></span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>The first alternate version, <a href="rince.alt.c">rince.alt.c</a>,
disables a maximum move count so that anyone with enough patience and
time can complete the puzzle, without having to worry about how many
moves they make, assuming they don’t get stuck. The second version, <a
href="rince.alt2.c">rince.alt2.c</a>, allows one to reconfigure at
compilation the maximum number of moves, even if that is lowering the
count.</p>
<p>The first alternate version, <a href="rince.alt.c">rince.alt.c</a>, disables a maximum move
count so that anyone with enough patience and time can complete the puzzle,
without having to worry about how many moves they make, assuming they don’t get
stuck. The second version, <a href="rince.alt2.c">rince.alt2.c</a>, allows one to
reconfigure at compilation the maximum number of moves, even if that is lowering
the count.</p>
<p>The author set the maximum number of moves to 484.</p>
<h3 id="alternate-build">Alternate build:</h3>
<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> alt</span></code></pre></div>
<p>This will build both alt versions where the first one,
<code>rince.alt</code>, has no restrictions in the number of movements
and the second one, <code>rince.alt2</code>, has a configurable maximum
number of moves allowed, defaulting to the entry’s max, 484.</p>
<p>This will build both alt versions where the first one, <code>rince.alt</code>, has no
restrictions in the number of movements and the second one, <code>rince.alt2</code>, has a
configurable maximum number of moves allowed, defaulting to the entry’s max,
484.</p>
<p>To reconfigure the maximum number of moves to 700:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber MAXMOVES=700 alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</h3>
@@ -169,18 +167,17 @@ number of moves allowed, defaulting to the entry’s max, 484.</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">./rince.alt</span></span></code></pre></div>
<p>To run the second alt version:</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">./rince.alt2</span></span></code></pre></div>
<p>Can you figure out how to make the two alternate versions equivalent
in functionality without modifying the code? That is can you make the
second alt version end up allowing any number of movements?</p>
<p>Can you figure out how to make the two alternate versions equivalent in
functionality without modifying the code? That is can you make the second alt
version end up allowing any number of movements?</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>In 2023 this entry was updated to allow most ANSI C compilers to
compile the code and to fix a bug where the win or lose message was not
seen.</p>
<p>In 2023 this entry was updated to allow most ANSI C compilers to compile
the code and to fix a bug where the win or lose message was not seen.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>This program is a simple puzzle type game. (I’ll leave you to play it
to see the rest of it .. :-) .) The general idea was to try and write
the smallest playable game, but keep the playability and enjoyment
high.</p>
<p>This program is a simple puzzle type game. (I’ll leave you to play
it to see the rest of it .. :-) .) The general idea was to try and
write the smallest playable game, but keep the playability and
enjoyment high.</p>
<h3 id="instructions">Instructions:</h3>
<p>Key to map:</p>
<pre><code> |
@@ -200,11 +197,10 @@ high.</p>
/@@@\ boulder | &lt; &gt; around (if only!) or manufacture by pushing
\@@@/ | \/ two &#39;crushable&#39; rocks together.
|</code></pre>
<p>The general idea of the game is to collect all the diamonds. This
must be done in the minimum amount of moves. I’ve allowed a margin of 5
moves which brings the moves allowed to <code>484</code>. (alter the
value of <code>u</code> in the program to set the max moves
allowed).</p>
<p>The general idea of the game is to collect all the diamonds. This must
be done in the minimum amount of moves. I’ve allowed a margin of 5
moves which brings the moves allowed to <code>484</code>. (alter the value of <code>u</code> in
the program to set the max moves allowed).</p>
<p>There are two types of boulders. Both can be pushed around, but only
the hollow (crushable) ones can be turned into diamonds (by pushing it
onto another hollow one).</p>
@@ -212,56 +208,35 @@ onto another hollow one).</p>
was done to keep the source as low as possible (as I only used 3 in the
map). To unlock a door simply push a key into the corresponding door.
Take care that it’s facing in the correct direction.</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-1991rince"><a name="inventory"></a>Inventory for
1991/rince</h1>
<h1 id="inventory-for-1991rince"><a name="inventory"></a>Inventory for 1991/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/1991/rince/rince.c">rince.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/rince/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/rince/rince.alt.c">rince.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/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/1991/rince/rince.orig.c">rince.orig.c</a>
- original source</li>
<li><a href="1991_rince.tar.bz2">1991_rince.tar.bz2</a> - download entry
source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/rince/rince.c">rince.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/rince/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/rince/rince.alt.c">rince.alt.c</a> - alternative source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/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/1991/rince/rince.orig.c">rince.orig.c</a> - original source</li>
<li><a href="1991_rince.tar.bz2">1991_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/1991/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/1991/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/1991/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/1991/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/1991/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/1991/rince/README.md">README.md</a> - markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
+101 -144
View File
@@ -129,9 +129,9 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Brian_Westley">Brian
Westley</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#Brian_Westley">Brian Westley</a><br>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
<br><br></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -141,39 +141,35 @@ Westley</a><br> Location: <a href="../../location.html#US">US</a> -
<h2 id="to-build">To build:</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
<p>There is an <a href="#alternate-code">alternate version</a> that is
supposed to win all the time.</p>
<p>There is an <a href="#alternate-code">alternate version</a> that is supposed to win all the
time.</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#1991_westley">1991 westley bugs</a>.</p>
<p>For more detailed information see <a href="../../bugs.html#1991_westley">1991 westley bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<p>NOTE: we have provided a script to perform the below procedure which
we include for the interested. See the <a href="#try">try</a> section if
you just want to play.</p>
<p>NOTE: we have provided a script to perform the below procedure which we include
for the interested. See the <a href="#try">try</a> section if you just want to play.</p>
<p>Make and then run as follows:</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">./westley</span> <span class="pp">[</span><span class="ss">move_location</span><span class="pp">]</span> <span class="kw">|</span> <span class="fu">tee</span> nextmove.c</span></code></pre></div>
<p>where the <code>move_location</code> is a digit from 1 to 9 that
represents a move on a tic-tac-toe board:</p>
<p>where the <code>move_location</code> is a digit from 1 to 9 that represents
a move on a tic-tac-toe board:</p>
<pre><code>1 2 3
4 5 6
7 8 9</code></pre>
<p>If you omit <code>move_location</code>, then the computer moves
first. For your next move, recompile <code>nextmove.c</code> and play it
again:</p>
<p>If you omit <code>move_location</code>, then the computer moves first. For your
next move, recompile <code>nextmove.c</code> and play it again:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> nextmove</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./nextmove</span> move_location <span class="kw">|</span> <span class="fu">tee</span> nextmove.c</span></code></pre></div>
<h2 id="try">Try:</h2>
<p>We have provided the shell script, <a href="ttt.sh">ttt</a>, to make
it easier to play the game:</p>
<p>We have provided the shell script, <a href="ttt.sh">ttt</a>, to make it easier to play the
game:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> ttt</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./ttt</span> <span class="pp">[</span><span class="ss">first_move</span><span class="pp">]</span> <span class="co"># &lt;- omit first arg to have it move first</span></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./ttt</span> next_move</span></code></pre></div>
<p>The shell script determines when the game is over, and automatically
replaces <code>merlyn.c</code> (copied from <a
href="westley.c">westley.c</a> with an improved version after a loss).
The <a href="ttt.sh">ttt</a> script has two other modes:</p>
<p>The shell script determines when the game is over, and automatically replaces
<code>merlyn.c</code> (copied from <a href="westley.c">westley.c</a> with an improved version after a
loss). The <a href="ttt.sh">ttt</a> script has two other modes:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./ttt</span> quitgame <span class="co"># cancel any game in progress, revert to merlyn.c</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./ttt</span> clobber <span class="co"># remove all game files, revert to original source</span></span></code></pre></div>
<p>For example here is a potentially losing game:</p>
@@ -209,25 +205,21 @@ The <a href="ttt.sh">ttt</a> script has two other modes:</p>
<span id="cb9-26"><a href="#cb9-26" aria-hidden="true" tabindex="-1"></a> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;}</span><span class="co">/*/ -1;F;}/*/</span></span>
<span id="cb9-27"><a href="#cb9-27" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb9-28"><a href="#cb9-28" aria-hidden="true" tabindex="-1"></a>ttt<span class="op">:</span> I win<span class="op">!</span></span></code></pre></div>
<p>Redirects stderr to <code>/dev/null</code> by default. If you need
errors or warnings use <code>-e</code>.</p>
<p>Redirects stderr to <code>/dev/null</code> by default. If you need errors or warnings use
<code>-e</code>.</p>
<h2 id="alternate-code">Alternate code:</h2>
<p>This version is based on the author’s remarks. It is not supposed to
lose but it can lose if you cheat. That’s supposed to happen. Can you
win any other time?</p>
<p>This version is based on the author’s remarks. It is not supposed to lose but it
can lose if you cheat. That’s supposed to happen. Can you win any other time?</p>
<h3 id="alternate-build">Alternate build:</h3>
<div class="sourceCode" id="cb10"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</h3>
<p>Rather than use <code>ttt</code> try the script <code>ttt.alt</code>
instead.</p>
<p>Rather than use <code>ttt</code> try the script <code>ttt.alt</code> instead.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Can you figure out why the board looks different than the <a
href="westley.c">westley.c</a>?</p>
<p>Can you figure out why the board looks different than the
<a href="westley.c">westley.c</a>?</p>
<p>What happens if you make a move already made?</p>
<p>Now go try and draw or better yet win (without cheating which is very
easy :-) )! Why is win better than draw? Because everyone knows how to
draw:</p>
<p>Now go try and draw or better yet win (without cheating which is very easy :-) )!
Why is win better than draw? Because everyone knows how to draw:</p>
<blockquote>
<p>Professor Falken: Did you ever play tic-tac-toe?<br />
Jennifer Mack: Yeah. Of course.<br />
@@ -235,85 +227,74 @@ Falken: But you don’t any more.<br />
Jennifer: No.<br />
Falken: Why?<br />
Jennifer: Because it’s a boring game. It’s always a tie.<br />
Falken: Exactly. There’s no way to win. The game itself is pointless.
But back at the <a href="../../judges.html">International Obfuscated C
Code Contest judges’ room</a> they believe that you can win tic-tac-toe,
that there can be acceptable draws.</p>
Falken: Exactly. There’s no way to win. The game itself is pointless. But back
at the <a href="../../judges.html">International Obfuscated C Code Contest judges’
room</a> they believe that
you can win tic-tac-toe, that there can be acceptable draws.</p>
</blockquote>
<p>This is supposed to happen. As is written in the <a
href="http://catb.org/jargon/html/F/feature.html">The Jargon
File</a>:</p>
<p>This is supposed to happen. As is written in the
<a href="http://catb.org/jargon/html/F/feature.html">The Jargon File</a>:</p>
<pre><code>That&#39;s not a bug, that&#39;s a feature.</code></pre>
<p>Try not to cheat (even though it’s very easy :-) ), the computer has
not learned how to catch you doing it.</p>
<p>Try not to cheat (even though it’s very easy :-) ), the computer has not learned
how to catch you doing it.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>A tic-tac-toe self-modifying program that “learns”. This C program
plays standard tic-tac-toe on itself. The code is written as a
tic-tac-toe grid; moves are carried out within the code.</p>
<p>The human is <code>X</code>, the computer <code>0</code> [sic,
“zero”, not letter “O”].</p>
<p>The program, when run, reproduces itself with both the player’s move
and the computer’s move added. Recompile THIS program (using the same
compile line) and repeat until the game is finished.</p>
<p>If the computer wins, the “straight face” in the upper right-hand
corner, “:-|”, will change into a happy face, “:-)”. If it is a draw,
the face does not change. If the computer loses, the board is blanked
and the face changes into a sad face, “:-(”. If this happens, the blank
board should replace the original program; the computer changes its play
and will continue to do so until it no longer loses games.</p>
<p>The human is <code>X</code>, the computer <code>0</code> [sic, “zero”, not letter “O”].</p>
<p>The program, when run, reproduces itself with both the player’s
move and the computer’s move added. Recompile THIS program (using
the same compile line) and repeat until the game is finished.</p>
<p>If the computer wins, the “straight face” in the upper right-hand corner, “:-|”,
will change into a happy face, “:-)”. If it is a draw, the face does not
change. If the computer loses, the board is blanked and the face changes into a
sad face, “:-(”. If this happens, the blank board should replace the original
program; the computer changes its play and will continue to do so until it no
longer loses games.</p>
<p>If you want a program that never loses, simply replace the string
<code>"9999999999 :-| "</code> with
<code>"9883857753 :-| "</code>.</p>
<code>"9999999999 :-| "</code> with <code>"9883857753 :-| "</code>.</p>
<h3 id="how-it-works">How it works</h3>
<p>The vertical “bars” of the grid are identical functions, with the
name of the function as <code>a()</code>, <code>b()</code>, or
<code>c()</code>. After each function is called, the global variables
<code>X</code> and <code>O</code> contain bitmasks of where all the
<code>X</code>s and <code>O</code>s are placed. The statement:</p>
<p>The vertical “bars” of the grid are identical functions, with the name of the
function as <code>a()</code>, <code>b()</code>, or <code>c()</code>. After each function is called, the global
variables <code>X</code> and <code>O</code> contain bitmasks of where all the <code>X</code>s and <code>O</code>s are placed.
The statement:</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>X<span class="op">=-</span> <span class="op">&lt;</span><span class="dt">char</span><span class="op">&gt;</span> <span class="op">-</span><span class="dv">1</span><span class="op">;</span></span></code></pre></div>
<p>evaluates to <code>1</code>, <code>-1</code>, or <code>-2</code> when
<code>X</code> is <code>1</code> and <code>&lt;char&gt;</code> is one of
<code>"X"</code>, <code>"0"</code>, or <code>" "</code>. The function
<code>S(&amp;X)</code> sets the appropriate bits in (global vars)
<code>X</code> and <code>O</code> and resets the value of
<code>&amp;X</code> to <code>1</code>. This is how the current position
is computed.</p>
<p>The player’s move is bitwise ORed into the <code>X</code> mask, and
(if it is the opening move) the strategy string’s first character is set
to the player’s first move (or <code>5</code> if the computer moves
first).</p>
<p>The evaluation function <code>y(M)</code> checks if the mask has a
winning pattern (any of the first eight bitmasks of the
<code>w[N]</code> array), and sets the variable <code>q</code> to
<code>0</code> if it does.</p>
<p>The player’s move is evaluated to see if the human has won. The
smiley is set to “:-)” or “:-(” depending on this. Also, if the human
has won, the digit in the strategy string is decremented to change the
computer’s play for the next round.</p>
<p>If the human has NOT won, the <code>e(N,M)</code> function evaluates
if ANY move not in mask <code>N</code> can produce a win in mask
<code>M</code>. The first evaluation <code>e(X,O)</code> checks if
<code>O</code> can make a legal winning move. If so, the computer has a
winning move and makes it. If not, the smiley is set to “:-|”, and a
non-winning move is generated.</p>
<p>A non-winning move first checks if <code>X</code> can win in one
move; if so, this move is selected, blocking the win. Otherwise, a move
is generated by looking down the list of “move templates”. The first
move template that generates a move that is NOT already occupied by an
<code>X</code> or <code>O</code> is returned.</p>
<p>evaluates to <code>1</code>, <code>-1</code>, or <code>-2</code> when <code>X</code> is <code>1</code> and <code>&lt;char&gt;</code> is one of <code>"X"</code>,
<code>"0"</code>, or <code>" "</code>. The function <code>S(&amp;X)</code> sets the appropriate bits in (global
vars) <code>X</code> and <code>O</code> and resets the value of <code>&amp;X</code> to <code>1</code>. This is how the current
position is computed.</p>
<p>The player’s move is bitwise ORed into the <code>X</code> mask, and (if it is the opening
move) the strategy string’s first character is set to the player’s first move
(or <code>5</code> if the computer moves first).</p>
<p>The evaluation function <code>y(M)</code> checks if the mask has a winning pattern (any of
the first eight bitmasks of the <code>w[N]</code> array), and sets the variable <code>q</code> to <code>0</code>
if it does.</p>
<p>The player’s move is evaluated to see if the human has won. The smiley is set
to “:-)” or “:-(” depending on this. Also, if the human has won, the digit in
the strategy string is decremented to change the computer’s play for the next
round.</p>
<p>If the human has NOT won, the <code>e(N,M)</code> function evaluates if ANY move
not in mask <code>N</code> can produce a win in mask <code>M</code>. The first evaluation
<code>e(X,O)</code> checks if <code>O</code> can make a legal winning move. If so, the
computer has a winning move and makes it. If not, the smiley is
set to “:-|”, and a non-winning move is generated.</p>
<p>A non-winning move first checks if <code>X</code> can win in one move; if so,
this move is selected, blocking the win. Otherwise, a move is
generated by looking down the list of “move templates”. The first
move template that generates a move that is NOT already occupied by
an <code>X</code> or <code>O</code> is returned.</p>
<p>The “move templates” are static tic-tac-toe positions that generate
possible moves by making the <code>e()</code> function return “winning”
moves, e.g. the template:</p>
possible moves by making the <code>e()</code> function return “winning” moves,
e.g. the template:</p>
<pre><code>. . .
O , O (this is the value 40; 2^3+2^5)
. . . (&quot;O&quot;s are 1 bits, &quot;.&quot; and &quot;,&quot; are 0 bits)</code></pre>
<p>…will make the <code>e()</code> function return a center move, as
this is the only move that produces three in a row. Notice that the
computer does not consider which cells contain <code>X</code>s and
<code>O</code>s when making a template move, only which cells are empty
and not-empty. This makes for unusual play.</p>
<p>The templates are carefully chosen to eventually block all traps that
<code>X</code> can try, by just blundering in the way.</p>
<p>…will make the <code>e()</code> function return a center move, as this is the only move
that produces three in a row. Notice that the computer does not consider which
cells contain <code>X</code>s and <code>O</code>s when making a template move, only which cells are
empty and not-empty. This makes for unusual play.</p>
<p>The templates are carefully chosen to eventually block all traps that <code>X</code> can
try, by just blundering in the way.</p>
<p>Also note that the winning &amp; strategy templates are part of the
compile line, making it possible to change the rules of the game by
changing the compile line.</p>
@@ -357,64 +338,40 @@ O , O
O , O
, , ,
O , O</code></pre>
<p>A digit of <code>9</code> means start with the first template,
<code>8</code> starts at the second, etc. The templates are scanned
until a legal move is found. A template is scanned from bottom to top,
right to left (i.e. move <code>9</code> is tested first, then
<code>8</code>, down to move <code>1</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>
<p>A digit of <code>9</code> means start with the first template, <code>8</code> starts at
the second, etc. The templates are scanned until a legal move is
found. A template is scanned from bottom to top, right to left
(i.e. move <code>9</code> is tested first, then <code>8</code>, down to move <code>1</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-1991westley"><a name="inventory"></a>Inventory for
1991/westley</h1>
<h1 id="inventory-for-1991westley"><a name="inventory"></a>Inventory for 1991/westley</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/1991/westley/westley.c">westley.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/westley.alt.c">westley.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/westley.orig.c">westley.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/ttt.alt.sh">ttt.alt.sh</a>
- how to run the alternative code</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/ttt.sh">ttt.sh</a>
- play tic-tac-toe</li>
<li><a href="1991_westley.tar.bz2">1991_westley.tar.bz2</a> - download
entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/westley.c">westley.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/westley.alt.c">westley.alt.c</a> - alternative source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/westley.orig.c">westley.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/ttt.alt.sh">ttt.alt.sh</a> - how to run the alternative code</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/ttt.sh">ttt.sh</a> - play tic-tac-toe</li>
<li><a href="1991_westley.tar.bz2">1991_westley.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/1991/westley/.entry.json">.entry.json</a>
- description of entry in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/.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/1991/westley/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/.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/1991/westley/README.md">README.md</a>
- markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1991/westley/README.md">README.md</a> - markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->