improved indentation and whitespace for markdown code blocks

All code blocks in markdown have been intended by at least 4 spaces.

We add `--tab-stop=8` to all `pandoc(1)` executions in order to set
a better tab stop indentation, especially for tab intended code blocks.

Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.3 2024-03-26"
to "1.6 2024-03-31".

Fixed `1991/brnstnd/sorta.README.md` so that the sorta code
is code blocks.

Removed unneeded paragraph group in copyright in `inc/footer.default.html`.

Fixed excess whitespace after list Author on entry `index.html` page.

Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26"
to "1.6 2024-03-31".

Performed `make www` to perform the above and test under macOS.

TODO: Fix the problem of the initial line of code being extra intended.
TODO: Fix excess whitespace around code that is inline.
This commit is contained in:
Landon Curt Noll committed 2024-04-01 04:48:48 -07:00
1 parent b84c27ce02
commit a996f8d2b8
734 files changed
+16723 -16963

No files matched your search

+6 -6
View File
@@ -1,7 +1,7 @@
## To build:
```sh
make all
make all
```
@@ -10,7 +10,7 @@ make all
The current status of this entry is:
```
STATUS: known bug - please help us fix
STATUS: known bug - please help us fix
```
For more detailed information see [1989 fubar bugs](../../bugs.html#1989_fubar).
@@ -19,17 +19,17 @@ For more detailed information see [1989 fubar bugs](../../bugs.html#1989_fubar).
## To use:
```sh
./fubar <number>
./fubar <number>
```
## Try:
```sh
./try.sh # run on 1 - 7
./try.sh # run on 1 - 7
./fubar.sh 2 # run via script
./fubar 2 # run directly
./fubar.sh 2 # run via script
./fubar 2 # run directly
```
+7 -8
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Jay_Vosburgh">Jay Vosburgh</a><br>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
<br><br></li>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,18 +141,18 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<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>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code>STATUS: known bug - please help us fix</code></pre>
<pre><code> STATUS: known bug - please help us fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#1989_fubar">1989 fubar 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">./fubar</span> <span class="op">&lt;</span>number<span class="op">&gt;</span></span></code></pre></div>
<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">./fubar</span> <span class="op">&lt;</span>number<span class="op">&gt;</span></span></code></pre></div>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> <span class="co"># run on 1 - 7</span></span>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span> <span class="co"># run on 1 - 7</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./fubar.sh</span> 2 <span class="co"># run via script</span></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./fubar</span> 2 <span class="co"># run directly</span></span></code></pre></div>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./fubar.sh</span> 2 <span class="co"># run via script</span></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="ex">./fubar</span> 2 <span class="co"># run directly</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Run this with a single digit argument (or wait a long time and risk an infinite
loop as described in the <a href="../../bugs.html#1989_fubar">1989 fubar bugs</a> file).</p>
+5 -5
View File
@@ -3,7 +3,7 @@
NOTE: this will run the program itself.
```sh
make clobber all
make clobber all
```
There is an alternate version with a slight difference that you may wish to try.
@@ -13,7 +13,7 @@ See the [Alternate code](#alternate-code) section below for more details.
## To use:
```sh
./jar.1
./jar.1
```
@@ -27,14 +27,14 @@ This alternate code, which prints something slightly different, is provided as w
NOTE: this will run the program itself.
```sh
make clobber alt
make clobber alt
```
### Alternate use:
```sh
./jar.1.alt
./jar.1.alt
```
@@ -44,7 +44,7 @@ On many systems the compiler will not allow you to send the object file to
`/dev/tty`. The author suggested:
```sh
cc -c -o /dev/tty jar.1.c
cc -c -o /dev/tty jar.1.c
```
As a last resort the `jar.1.sh` script provided simulates
+6 -7
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Jari_Arkko">Jari Arkko</a><br>
Location: <a href="../../location.html#SE">SE</a> - <em>Kingdom of Sweden</em> (<em>Sweden</em>)
<br><br></li>
Location: <a href="../../location.html#SE">SE</a> - <em>Kingdom of Sweden</em> (<em>Sweden</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -143,22 +142,22 @@ Location: <a href="../../location.html#SE">SE</a> - <em>Kingdom of Sweden</em> (
<h2 id="to-build">To build:</h2>
<p>NOTE: this will run the program itself.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber all</span></code></pre></div>
<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> clobber all</span></code></pre></div>
<p>There is an alternate version with a slight difference that you may wish to try.
See the <a href="#alternate-code">Alternate code</a> section below for more details.</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">./jar.1</span></span></code></pre></div>
<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">./jar.1</span></span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>This alternate code, which prints something slightly different, is provided as well.</p>
<h3 id="alternate-build">Alternate build:</h3>
<p>NOTE: this will run the program itself.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber alt</span></code></pre></div>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> clobber alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</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="ex">./jar.1.alt</span></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="ex">./jar.1.alt</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>On many systems the compiler will not allow you to send the object file to
<code>/dev/tty</code>. The author suggested:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-c</span> <span class="at">-o</span> /dev/tty jar.1.c</span></code></pre></div>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-c</span> <span class="at">-o</span> /dev/tty jar.1.c</span></code></pre></div>
<p>As a last resort the <code>jar.1.sh</code> script provided simulates
writing the raw binary of the .o file to the terminal.</p>
<p>Abuse of the rules winning entry usually result in a change of the rules.
+25 -25
View File
@@ -1,17 +1,17 @@
## To build:
```sh
make all
make all
```
## To use:
```sh
./jar.2
[enter some lisp]
./jar.2
[enter some lisp]
./jar.2 < some_lisp_file
./jar.2 < some_lisp_file
```
NOTE: this entry will likely segfault on invalid input.
@@ -20,11 +20,11 @@ NOTE: this entry will likely segfault on invalid input.
## Try:
```sh
./try.sh
./try.sh
./try.sh chocolate_cake.lisp
./try.sh chocolate_cake.lisp
./try.sh try.txt
./try.sh try.txt
```
@@ -66,24 +66,24 @@ prints out the return values. End execution by typing an end-of-file
character.
```lisp
(+ 2.5 3.1)
(defun fib (n)
(if (< n 2)
1
(+ (fib (- n 2)) (fib (- n 1)))))
(fib 10)
(defun ! (x) (if (equal x 0) 1 (* x (! (- x 1)))))
(! 7)
(defun fn1 (fn) (+ (fn 1 2) (fn 3 4)))
(defun fn2 (a b) (+ a b))
(fn1 (function +))
(fn1 (function fn2))
(fn1 (function (lambda (z1 z2) (+ z1 z2))))
(quote a)
(cons (quote (a b)) (quote (c d e)))
(cons (quote (f)) ())
(car (quote (a b c)))
(cdr (cdr (quote (g h i))))
(+ 2.5 3.1)
(defun fib (n)
(if (< n 2)
1
(+ (fib (- n 2)) (fib (- n 1)))))
(fib 10)
(defun ! (x) (if (equal x 0) 1 (* x (! (- x 1)))))
(! 7)
(defun fn1 (fn) (+ (fn 1 2) (fn 3 4)))
(defun fn2 (a b) (+ a b))
(fn1 (function +))
(fn1 (function fn2))
(fn1 (function (lambda (z1 z2) (+ z1 z2))))
(quote a)
(cons (quote (a b)) (quote (c d e)))
(cons (quote (f)) ())
(car (quote (a b c)))
(cdr (cdr (quote (g h i))))
```
+26 -27
View File
@@ -138,8 +138,7 @@ Location: <a href="../../location.html#FI">FI</a> - <em>Republic of Finland </em
Location: <a href="../../location.html#SE">SE</a> - <em>Kingdom of Sweden</em> (<em>Sweden</em>)
<br><br></li>
<li>Name: <a href="../../authors.html#Ora_Lassila">Ora Lassila</a><br>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
<br><br></li>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -148,19 +147,19 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<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>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./jar.2</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="ex">[enter</span> some lisp]</span>
<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">./jar.2</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">[enter</span> some lisp]</span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./jar.2</span> <span class="op">&lt;</span> some_lisp_file</span></code></pre></div>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a> <span class="ex">./jar.2</span> <span class="op">&lt;</span> some_lisp_file</span></code></pre></div>
<p>NOTE: this entry will likely segfault on invalid input.</p>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span>
<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>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> chocolate_cake.lisp</span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span> chocolate_cake.lisp</span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> try.txt</span></code></pre></div>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span> try.txt</span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This is the most useful program submitted this year. It is a
rather large subset of lisp. It has no error recovery, and
@@ -193,24 +192,24 @@ The program implements a conventional lisp listener, i.e. you type in
lisp expressions (followed by CR), the program evaluates them and
prints out the return values. End execution by typing an end-of-file
character.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode lisp"><code class="sourceCode commonlisp"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>(<span class="op">+</span> <span class="fl">2.5</span> <span class="fl">3.1</span>)</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a>(<span class="kw">defun</span><span class="fu"> fib </span>(n)</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> (<span class="kw">if</span> (<span class="op">&lt;</span> n <span class="dv">2</span>)</span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="dv">1</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> (<span class="op">+</span> (fib (<span class="op">-</span> n <span class="dv">2</span>)) (fib (<span class="op">-</span> n <span class="dv">1</span>)))))</span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a>(fib <span class="dv">10</span>)</span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a>(<span class="kw">defun</span><span class="fu"> </span>! (x) (<span class="kw">if</span> (<span class="kw">equal</span> x <span class="dv">0</span>) <span class="dv">1</span> (<span class="op">*</span> x (! (<span class="op">-</span> x <span class="dv">1</span>)))))</span>
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a>(! <span class="dv">7</span>)</span>
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a>(<span class="kw">defun</span><span class="fu"> fn1 </span>(fn) (<span class="op">+</span> (fn <span class="dv">1</span> <span class="dv">2</span>) (fn <span class="dv">3</span> <span class="dv">4</span>)))</span>
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a>(<span class="kw">defun</span><span class="fu"> fn2 </span>(a b) (<span class="op">+</span> a b))</span>
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a>(fn1 (<span class="kw">function</span> <span class="op">+</span>))</span>
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a>(fn1 (<span class="kw">function</span> fn2))</span>
<span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a>(fn1 (<span class="kw">function</span> (<span class="kw">lambda</span> (z1 z2) (<span class="op">+</span> z1 z2))))</span>
<span id="cb4-14"><a href="#cb4-14" aria-hidden="true" tabindex="-1"></a>(<span class="kw">quote</span> a)</span>
<span id="cb4-15"><a href="#cb4-15" aria-hidden="true" tabindex="-1"></a>(<span class="kw">cons</span> (<span class="kw">quote</span> (a b)) (<span class="kw">quote</span> (c d e)))</span>
<span id="cb4-16"><a href="#cb4-16" aria-hidden="true" tabindex="-1"></a>(<span class="kw">cons</span> (<span class="kw">quote</span> (f)) ())</span>
<span id="cb4-17"><a href="#cb4-17" aria-hidden="true" tabindex="-1"></a>(<span class="kw">car</span> (<span class="kw">quote</span> (a b c)))</span>
<span id="cb4-18"><a href="#cb4-18" aria-hidden="true" tabindex="-1"></a>(<span class="kw">cdr</span> (<span class="kw">cdr</span> (<span class="kw">quote</span> (g h i))))</span></code></pre></div>
<div class="sourceCode" id="cb4"><pre class="sourceCode lisp"><code class="sourceCode commonlisp"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> (<span class="op">+</span> <span class="fl">2.5</span> <span class="fl">3.1</span>)</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> (<span class="kw">defun</span><span class="fu"> fib </span>(n)</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> (<span class="kw">if</span> (<span class="op">&lt;</span> n <span class="dv">2</span>)</span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="dv">1</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> (<span class="op">+</span> (fib (<span class="op">-</span> n <span class="dv">2</span>)) (fib (<span class="op">-</span> n <span class="dv">1</span>)))))</span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a> (fib <span class="dv">10</span>)</span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a> (<span class="kw">defun</span><span class="fu"> </span>! (x) (<span class="kw">if</span> (<span class="kw">equal</span> x <span class="dv">0</span>) <span class="dv">1</span> (<span class="op">*</span> x (! (<span class="op">-</span> x <span class="dv">1</span>)))))</span>
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a> (! <span class="dv">7</span>)</span>
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a> (<span class="kw">defun</span><span class="fu"> fn1 </span>(fn) (<span class="op">+</span> (fn <span class="dv">1</span> <span class="dv">2</span>) (fn <span class="dv">3</span> <span class="dv">4</span>)))</span>
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a> (<span class="kw">defun</span><span class="fu"> fn2 </span>(a b) (<span class="op">+</span> a b))</span>
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a> (fn1 (<span class="kw">function</span> <span class="op">+</span>))</span>
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a> (fn1 (<span class="kw">function</span> fn2))</span>
<span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a> (fn1 (<span class="kw">function</span> (<span class="kw">lambda</span> (z1 z2) (<span class="op">+</span> z1 z2))))</span>
<span id="cb4-14"><a href="#cb4-14" aria-hidden="true" tabindex="-1"></a> (<span class="kw">quote</span> a)</span>
<span id="cb4-15"><a href="#cb4-15" aria-hidden="true" tabindex="-1"></a> (<span class="kw">cons</span> (<span class="kw">quote</span> (a b)) (<span class="kw">quote</span> (c d e)))</span>
<span id="cb4-16"><a href="#cb4-16" aria-hidden="true" tabindex="-1"></a> (<span class="kw">cons</span> (<span class="kw">quote</span> (f)) ())</span>
<span id="cb4-17"><a href="#cb4-17" aria-hidden="true" tabindex="-1"></a> (<span class="kw">car</span> (<span class="kw">quote</span> (a b c)))</span>
<span id="cb4-18"><a href="#cb4-18" aria-hidden="true" tabindex="-1"></a> (<span class="kw">cdr</span> (<span class="kw">cdr</span> (<span class="kw">quote</span> (g h i))))</span></code></pre></div>
<p>Please do not leave any whitespace before the first parenthesis when
you type your input, or any other unnecessary whitespace. Please try to
avoid any undefined variables or functions, wrong number of arguments
+7 -7
View File
@@ -1,7 +1,7 @@
## To build:
```sh
make all
make all
```
To get this to compile with a modern CPP, we had to replace `#D` with `#define`.
@@ -12,7 +12,7 @@ To get this to compile with a modern CPP, we had to replace `#D` with `#define`.
Run the program this way:
```sh
./ovdluhe < textfile
./ovdluhe < textfile
```
The program stops when it reaches the end of the template buffer
@@ -22,7 +22,7 @@ by chance or is killed.
## Try:
```sh
./try.sh ; sleep 2 ; ./try.sh
./try.sh ; sleep 2 ; ./try.sh
```
@@ -35,7 +35,7 @@ it's a `#define` it's easy to set up.
### Alternate build:
```sh
make P=9 clobber alt
make P=9 clobber alt
```
You do not have to define `P` but if you do you can replace the value with
@@ -47,16 +47,16 @@ program to fail and a negative value will cause a compilation error.
### Alternate use:
```sh
./ovdluhe.alt
./ovdluhe.alt
```
### Alternate try:
```sh
./try.alt.sh
./try.alt.sh
P=5 ./try.alt.sh
P=5 ./try.alt.sh
```
NOTE: if you specify too high a value for `P` the program might fail. If you
+8 -9
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Oskar_von_der_Luehe">Oskar von der Luehe</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></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,30 +141,30 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<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>
<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>To get this to compile with a modern CPP, we had to replace <code>#D</code> with <code>#define</code>.</p>
<h2 id="to-use">To use:</h2>
<p>Run the program this way:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./ovdluhe</span> <span class="op">&lt;</span> textfile</span></code></pre></div>
<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">./ovdluhe</span> <span class="op">&lt;</span> textfile</span></code></pre></div>
<p>The program stops when it reaches the end of the template buffer
by chance or is killed.</p>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> <span class="kw">;</span> <span class="fu">sleep</span> 2 <span class="kw">;</span> <span class="ex">./try.sh</span></span></code></pre></div>
<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 class="kw">;</span> <span class="fu">sleep</span> 2 <span class="kw">;</span> <span class="ex">./try.sh</span></span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>The author suggested that one varies the definition of <code>P</code> from 2 through 10. As
it’s a <code>#define</code> it’s easy to set up.</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> P=9 clobber alt</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> P=9 clobber alt</span></code></pre></div>
<p>You do not have to define <code>P</code> but if you do you can replace the value with
whatever you wish, as long as it’s a positive <code>int</code> (or evaluates to a positive
<code>int</code> like the default <code>(A&lt;&lt;AP)</code> does). Too high a value will likely cause the
program to fail and a negative value will cause a compilation error.</p>
<h3 id="alternate-use">Alternate use:</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="ex">./ovdluhe.alt</span></span></code></pre></div>
<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">./ovdluhe.alt</span></span></code></pre></div>
<h3 id="alternate-try">Alternate try:</h3>
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.alt.sh</span></span>
<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">./try.alt.sh</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="va">P</span><span class="op">=</span>5 <span class="ex">./try.alt.sh</span></span></code></pre></div>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="va">P</span><span class="op">=</span>5 <span class="ex">./try.alt.sh</span></span></code></pre></div>
<p>NOTE: if you specify too high a value for <code>P</code> the program might fail. If you
specify a value &lt; 0 it will fail to compile.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
+4 -4
View File
@@ -1,7 +1,7 @@
## To build:
```sh
make all
make all
```
There is an alternate version with a trace routine that the author had commented
@@ -11,7 +11,7 @@ out. See [alternate code](#alternate-code) below for more details.
## Try:
```sh
./paul
./paul
```
@@ -29,14 +29,14 @@ could easily be added.
### Alternate build:
```sh
make alt
make alt
```
### Alternate use:
```sh
./paul.alt
./paul.alt
```
+5 -6
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Paul_E_Black">Paul E. Black</a><br>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
<br><br></li>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,11 +141,11 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<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>
<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 alternate version with a trace routine that the author had commented
out. See <a href="#alternate-code">alternate code</a> below for more details.</p>
<h2 id="try">Try:</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">./paul</span></span></code></pre></div>
<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">./paul</span></span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>This version was described by the author like:</p>
<blockquote>
@@ -157,9 +156,9 @@ and forth as the program runs. A much better debugger or trace
could easily be added.</p>
</blockquote>
<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>
<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>
<h3 id="alternate-use">Alternate use:</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="ex">./paul.alt</span></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="ex">./paul.alt</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The author’s comments is a detailed program explanation and spoiler. If you
want a real challenge, don’t read any further and try to understand the program
+11 -11
View File
@@ -1,7 +1,7 @@
## To build:
```sh
make all
make all
```
@@ -10,7 +10,7 @@ make all
The current status of this entry is:
```
STATUS: INABIAF - please **DO NOT** fix
STATUS: INABIAF - please **DO NOT** fix
```
For more detailed information see [1989 robison bugs](../../bugs.html#1989_robison).
@@ -19,21 +19,21 @@ For more detailed information see [1989 robison bugs](../../bugs.html#1989_robis
## To use:
```sh
./robison
# enter valid expressions
./robison
# enter valid expressions
```
## Try:
```sh
./robison
11x10
# enter other expressions
./robison
11x10
# enter other expressions
./try.sh
./try.sh
echo 100 / 100 | ./robison # <-- what happens here ?
echo 100 / 100 | ./robison # <-- what happens here ?
```
NOTE: This program will very likely crash or break into tiny bits :-) if you
@@ -64,13 +64,13 @@ numerals must be binary. Parentheses may be used for
grouping. For example:
```
101x111-100
101x111-100
```
prints:
```
1111
1111
```
That is `5x(7-4)` is `15`. (APL groups from right to left.)
+12 -13
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Arch_D_Robison">Arch D. Robison</a><br>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
<br><br></li>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,22 +141,22 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<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>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code>STATUS: INABIAF - please **DO NOT** fix</code></pre>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#1989_robison">1989 robison 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">./robison</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="co"># enter valid expressions</span></span></code></pre></div>
<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">./robison</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> <span class="co"># enter valid expressions</span></span></code></pre></div>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./robison</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">11x10</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="co"># enter other expressions</span></span>
<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">./robison</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">11x10</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> <span class="co"># enter other expressions</span></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> 100 / 100 <span class="kw">|</span> <span class="ex">./robison</span> <span class="co"># &lt;-- what happens here ?</span></span></code></pre></div>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a> <span class="bu">echo</span> 100 / 100 <span class="kw">|</span> <span class="ex">./robison</span> <span class="co"># &lt;-- what happens here ?</span></span></code></pre></div>
<p>NOTE: This program will very likely crash or break into tiny bits :-) if you
feed it numbers with non-binary digits. This, as you might notice if you try one
of the above commands, can happen with other input as well. If you wish to
@@ -176,9 +175,9 @@ outputs the evaluation of an
input. Functions are limited to dyadic <code>+</code>,<code>-</code>,<code>x</code>, and unary <code>-</code>;
numerals must be binary. Parentheses may be used for
grouping. For example:</p>
<pre><code>101x111-100</code></pre>
<pre><code> 101x111-100</code></pre>
<p>prints:</p>
<pre><code>1111</code></pre>
<pre><code> 1111</code></pre>
<p>That is <code>5x(7-4)</code> is <code>15</code>. (APL groups from right to left.)
Extending it to the full APL language should be trivial.</p>
<p>The <code>C--</code> language improves the C language by removing superfluous
+2 -2
View File
@@ -1,14 +1,14 @@
## To build:
```sh
make all
make all
```
## Try:
```sh
./roemer
./roemer
```
+3 -4
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Roemer_B_Lievaart">Roemer B. Lievaart</a><br>
Location: <a href="../../location.html#NL">NL</a> - <em>Kingdom of the Netherlands</em> (<em>Netherlands</em>)
<br><br></li>
Location: <a href="../../location.html#NL">NL</a> - <em>Kingdom of the Netherlands</em> (<em>Netherlands</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,9 +141,9 @@ Location: <a href="../../location.html#NL">NL</a> - <em>Kingdom of the Netherlan
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<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>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
<h2 id="try">Try:</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">./roemer</span></span></code></pre></div>
<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">./roemer</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Do you know what this program does? If you do, look again, there is more here
than meets the PI.</p>
+8 -9
View File
@@ -1,23 +1,23 @@
## To build:
```sh
make all
make all
```
## To use:
```sh
./tromp [drops_per_sec [cmd_string]]
./tromp [drops_per_sec [cmd_string]]
```
## Try:
```sh
./tromp 5
./tromp 5
./tromp 10 "hkl jq"
./tromp 10 "hkl jq"
```
The second command, `./tromp 10 "hkl jq"`, will set up the keys kind of like
@@ -30,15 +30,14 @@ vim:
- space - pause (space)
- q - quit (:q)
NOTE: after the game ends a file called `HI` will be in the directory with the
high scores (up to 20 runs saved) so one can see who has the highest score. The
file might look like:
```
330 by luser
136 by loser
100 by winner
330 by luser
136 by loser
100 by winner
```
... or so, where in this case the [luser is the winner, the loser is in second
@@ -55,7 +54,7 @@ the judges' additional remarks in the author's remarks, for more details.
### Alternate build:
```sh
make alt
make alt
```
+9 -10
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#John_Tromp">John Tromp</a><br>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
<br><br></li>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,13 +141,13 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<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>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./tromp</span> [drops_per_sec <span class="pp">[</span><span class="ss">cmd_string</span><span class="pp">]</span>]</span></code></pre></div>
<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">./tromp</span> [drops_per_sec <span class="pp">[</span><span class="ss">cmd_string</span><span class="pp">]</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">./tromp</span> 5</span>
<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">./tromp</span> 5</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./tromp</span> 10 <span class="st">&quot;hkl jq&quot;</span></span></code></pre></div>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./tromp</span> 10 <span class="st">&quot;hkl jq&quot;</span></span></code></pre></div>
<p>The second command, <code>./tromp 10 "hkl jq"</code>, will set up the keys kind of like
vim:</p>
<ul>
@@ -162,9 +161,9 @@ vim:</p>
<p>NOTE: after the game ends a file called <code>HI</code> will be in the directory with the
high scores (up to 20 runs saved) so one can see who has the highest score. The
file might look like:</p>
<pre><code>330 by luser
136 by loser
100 by winner</code></pre>
<pre><code> 330 by luser
136 by loser
100 by winner</code></pre>
<p>… or so, where in this case the <a href="https://web.archive.org/web/20181023221954/https://www.chicagotribune.com/news/ct-xpm-2002-07-31-0207310310-story.html">luser is the winner, the loser is in second
place and the winner is the
loser</a> :-)</p>
@@ -172,7 +171,7 @@ loser</a> :-)</p>
<p>The author provided an alternate version of the code with some improvements. See
the judges’ additional remarks in the author’s remarks, for more details.</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>
<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>tromp.alt</code> as you would <code>tromp</code> above.</p>
<p>NOTE: testing more than one user updating the high score file, one of the
+2 -2
View File
@@ -1,14 +1,14 @@
## To build:
```sh
make all
make all
```
## Try:
```sh
./try.sh
./try.sh
```
+3 -4
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#David_Van_Brackle">David Van Brackle</a><br>
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
<br><br></li>
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,9 +141,9 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<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>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
<h2 id="try">Try:</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">./try.sh</span></span></code></pre></div>
<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">./try.sh</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This program computes all proper subsets of the set of
arguments passed to it. Each subset is printed with one
+14 -14
View File
@@ -1,7 +1,7 @@
## To build:
```sh
make all
make all
```
@@ -10,7 +10,7 @@ make all
The current status of this entry is:
```
STATUS: known bug - please help us fix
STATUS: known bug - please help us fix
```
For more detailed information see [1989 westley bugs](../../bugs.html#1989_westley).
@@ -21,29 +21,29 @@ For more detailed information see [1989 westley bugs](../../bugs.html#1989_westl
Try compiling and running the 4 resulting programs like:
```sh
./compile.sh
./compile.sh
```
If you need to specify an alternate compiler path, say because your default
compiler is clang (or in the case of macOS gcc is clang) you can do so like:
```sh
CC=/opt/local/bin/gcc-mp-12 ./compile.sh
CC=/opt/local/bin/gcc-mp-12 ./compile.sh
```
If you wish to delay the script or remove the delay you can do so like:
```sh
DELAY=2 ./compile.sh
DELAY=2 ./compile.sh
```
Finally try:
```sh
./westley
# input some lines of text, sending EOF (usually ctrl-d) to end
./westley
# input some lines of text, sending EOF (usually ctrl-d) to end
./try.sh # demo of some input
./try.sh # demo of some input
```
@@ -71,7 +71,7 @@ When compiling these versions, one needs to define `trgpune`
in the compile line (which the Makefile now has). Example:
```sh
cc -Dtrgpune=putchar ver3.c -o ver3
cc -Dtrgpune=putchar ver3.c -o ver3
```
`trgpune` is the ROT13 of `getchar()`, so `getchar()` and `putchar()`
@@ -110,13 +110,13 @@ called `vs()` turns into a function called `if()` in the original,
so it can't be done. Therefore, I do:
```c
expr1 && expr2 && (expr3=etc);
expr1 && expr2 && (expr3=etc);
```
which is the same as:
```c
if (expr1 && expr2) expr3=etc;
if (expr1 && expr2) expr3=etc;
```
A/UX on the Macintosh doesn't get this right; it evaluates ALL
@@ -125,7 +125,7 @@ statement. This might warrant a warning, since other compilers
may do this. I found MANY compilers botched:
```c
expr1 && (expr2,expr3);
expr1 && (expr2,expr3);
```
`expr2` was OFTEN evaluated even if `expr1` was false. I removed
@@ -147,7 +147,7 @@ such statements to make it more portable.
Normally (!), a reversible C program is done thus:
```c
/**/ forward code /*/ edoc drawkcab /**/
/**/ forward code /*/ edoc drawkcab /**/
```
If your compiler nests comments, it will get this wrong.
@@ -155,7 +155,7 @@ However, I have made some bits of the code palindromic,
(or different, but reversible) so it is more like:
```c
/**/forward/*//**/ palindromic /**//*/drawkcab/**/
/**/forward/*//**/ palindromic /**//*/drawkcab/**/
```
The code can therefore be interlaced. There are eight
+15 -16
View File
@@ -132,8 +132,7 @@
<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>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,24 +141,24 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<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>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code>STATUS: known bug - please help us fix</code></pre>
<pre><code> STATUS: known bug - please help us fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#1989_westley">1989 westley bugs</a>.</p>
<h2 id="try">Try:</h2>
<p>Try compiling and running the 4 resulting programs like:</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">./compile.sh</span></span></code></pre></div>
<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">./compile.sh</span></span></code></pre></div>
<p>If you need to specify an alternate compiler path, say because your default
compiler is clang (or in the case of macOS gcc is clang) you can do so like:</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="va">CC</span><span class="op">=</span>/opt/local/bin/gcc-mp-12 <span class="ex">./compile.sh</span></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="va">CC</span><span class="op">=</span>/opt/local/bin/gcc-mp-12 <span class="ex">./compile.sh</span></span></code></pre></div>
<p>If you wish to delay the script or remove the delay you can do so like:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="va">DELAY</span><span class="op">=</span>2 <span class="ex">./compile.sh</span></span></code></pre></div>
<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="va">DELAY</span><span class="op">=</span>2 <span class="ex">./compile.sh</span></span></code></pre></div>
<p>Finally try:</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">./westley</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="co"># input some lines of text, sending EOF (usually ctrl-d) to end</span></span>
<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">./westley</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="co"># input some lines of text, sending EOF (usually ctrl-d) to end</span></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> <span class="co"># demo of some input</span></span></code></pre></div>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span> <span class="co"># demo of some input</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>There is a secret way to get ONE of the versions to print out
“<code>Hello, world!\n</code>”. Can you find how to do it?</p>
@@ -176,7 +175,7 @@ different algorithm for each version (hereafter referred to as
(ROT13 and reversed)).</p>
<p>When compiling these versions, one needs to define <code>trgpune</code>
in the compile line (which the Makefile now has). Example:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Dtrgpune</span><span class="op">=</span>putchar ver3.c <span class="at">-o</span> ver3</span></code></pre></div>
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Dtrgpune</span><span class="op">=</span>putchar ver3.c <span class="at">-o</span> ver3</span></code></pre></div>
<p><code>trgpune</code> is the ROT13 of <code>getchar()</code>, so <code>getchar()</code> and <code>putchar()</code>
are exchanged in the ROT13 counterpart. It is easy to see that
this is unavoidable. I must have a <code>#define</code> for a library
@@ -208,14 +207,14 @@ first argument (argc) must be at least one).</p>
function <code>vs()</code> to define in the ROT13 version. But a function
called <code>vs()</code> turns into a function called <code>if()</code> in the original,
so it can’t be done. Therefore, I do:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a>expr1 <span class="op">&amp;&amp;</span> expr2 <span class="op">&amp;&amp;</span> <span class="op">(</span>expr3<span class="op">=</span>etc<span class="op">);</span></span></code></pre></div>
<div class="sourceCode" id="cb8"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a> expr1 <span class="op">&amp;&amp;</span> expr2 <span class="op">&amp;&amp;</span> <span class="op">(</span>expr3<span class="op">=</span>etc<span class="op">);</span></span></code></pre></div>
<p>which is the same as:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="op">(</span>expr1 <span class="op">&amp;&amp;</span> expr2<span class="op">)</span> expr3<span class="op">=</span>etc<span class="op">;</span></span></code></pre></div>
<div class="sourceCode" id="cb9"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span>expr1 <span class="op">&amp;&amp;</span> expr2<span class="op">)</span> expr3<span class="op">=</span>etc<span class="op">;</span></span></code></pre></div>
<p>A/UX on the Macintosh doesn’t get this right; it evaluates ALL
expressions if they aren’t in an assignment or conditional
statement. This might warrant a warning, since other compilers
may do this. I found MANY compilers botched:</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a>expr1 <span class="op">&amp;&amp;</span> <span class="op">(</span>expr2<span class="op">,</span>expr3<span class="op">);</span></span></code></pre></div>
<div class="sourceCode" id="cb10"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a> expr1 <span class="op">&amp;&amp;</span> <span class="op">(</span>expr2<span class="op">,</span>expr3<span class="op">);</span></span></code></pre></div>
<p><code>expr2</code> was OFTEN evaluated even if <code>expr1</code> was false. I removed
such statements to make it more portable.</p>
<h3 id="variable-names-worth-noting">Variable names worth noting</h3>
@@ -225,11 +224,11 @@ such statements to make it more portable.</p>
<p><code>tang</code> and <code>gnat</code> are both ROT13 and palindrome pairs!</p>
<p>–</p>
<p>Normally (!), a reversible C program is done thus:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="co">/**/</span> forward code <span class="co">/*/ edoc drawkcab /**/</span></span></code></pre></div>
<div class="sourceCode" id="cb11"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a> <span class="co">/**/</span> forward code <span class="co">/*/ edoc drawkcab /**/</span></span></code></pre></div>
<p>If your compiler nests comments, it will get this wrong.
However, I have made some bits of the code palindromic,
(or different, but reversible) so it is more like:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="co">/**/</span>forward<span class="co">/*//**/</span> palindromic <span class="co">/**//*/drawkcab/**/</span></span></code></pre></div>
<div class="sourceCode" id="cb12"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a> <span class="co">/**/</span>forward<span class="co">/*//**/</span> palindromic <span class="co">/**//*/drawkcab/**/</span></span></code></pre></div>
<p>The code can therefore be interlaced. There are eight
such palindromic bits. You can find them within the
<code>/*//**/ /**//*/</code> pairs.</p>