add quick-readme2index.sh, improve all-run.sh and readme2index.sh
Improved `all-run.sh` and `readme2index.sh` so that certain command line options (e.g., -p, -P, -u, -U ...) are only passed along to other tools if they are given on the command line. all-run.sh VERSION changed from "1.1.1 2024-01-19" to "1.1.2 2024-01-20", readme2index.sh VERSION changed from "1.1 2024-01-16" to "1.1.1 2024-01-20". Added `quick-readme2index.sh` that only calls `readme2index.sh` if the `index.html` is not a non-empty file, or of either `.winner.json` and/or `README.md` is newer than `index.html`. Updated all `index.html` files because the the file contains a comment that includes the newly modified readme2index.sh VERSION.
This commit is contained in:
1 parent
e14325556c
commit
d414b6d71f
325 files changed
+1352
-497
No files matched your search
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
+16
-18
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
@@ -131,9 +131,7 @@ href="/bugs.md#2001-herrmann1">2001 herrmann1 in bugs.md</a>.</p>
|
||||
compilation stage and as such if you wish to see that part like it was
|
||||
designed you will need an older compiler perhaps gcc 2.95.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./herrmann1.sh</span> <span class="st">'prg=herrmann1.times2'</span></span></code></pre></div>
|
||||
<p>-or-</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">./herrmann1.sh</span> <span class="st">'prg=herrmann1.gcd'</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">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>There are some clear hints in the source code as to the purpose of
|
||||
this program. Perhaps the only way to figure out what is going on is to
|
||||
@@ -172,7 +170,7 @@ terminal!</p></li>
|
||||
<p>The info files <code>herrmann1.turing</code> and <a
|
||||
href="herrmann1.gcd">herrmann1.gcd</a> are sample programs for the
|
||||
Turing machine. For example, type</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">./herrmann1.sh</span> <span class="st">'prg=herrmann1.times2'</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">./herrmann1.sh</span> <span class="st">'prg=herrmann1.times2'</span></span></code></pre></div>
|
||||
<p>and watch the animated Turing machine multiply 8 by two (in unary
|
||||
representation). Here’s a screen shot during compilation:</p>
|
||||
<pre><code>/*
|
||||
@@ -197,7 +195,7 @@ result.)</p>
|
||||
<p>In the previous example, the Turing machine started on the default
|
||||
tape of the program <code>times2.turing</code>. To provide your own
|
||||
tape, type (for example)</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./herrmann1</span> prg=times2.turing tape=<span class="st">"O O O I I I O O O"</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./herrmann1</span> prg=times2.turing tape=<span class="st">"O O O I I I O O O"</span></span></code></pre></div>
|
||||
<p>(The <code>O</code>s and <code>I</code>s are letters, not digits.)
|
||||
You might prefer to provide only a finite portion of the tape, like I
|
||||
did above. In this case, the remainder of the tape is filled with
|
||||
@@ -215,12 +213,12 @@ better. Simply try some out.</p>
|
||||
number in unary representation. (That is, a row of I’s is expected, and
|
||||
one more I is appended to the row.) Let’s call it
|
||||
<code>plus1.turing</code>. Here’s what it could look like:</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">/* Search beginning of number. */</span></span>
|
||||
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#define start_O O</span><span class="op">,</span><span class="pp"> right</span><span class="op">,</span><span class="pp"> start</span></span>
|
||||
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a><span class="co">/* Number found. Move one step to the left. */</span></span>
|
||||
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a><span class="pp">#define start_I I</span><span class="op">,</span><span class="pp"> left</span><span class="op">,</span><span class="pp"> st2</span></span>
|
||||
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a><span class="co">/* Write a I and stop */</span></span>
|
||||
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a><span class="pp">#define st2_O I</span><span class="op">,</span><span class="pp"> left</span><span class="op">,</span><span class="pp"> stop</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><span class="co">/* Search beginning of number. */</span></span>
|
||||
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#define start_O O</span><span class="op">,</span><span class="pp"> right</span><span class="op">,</span><span class="pp"> start</span></span>
|
||||
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a><span class="co">/* Number found. Move one step to the left. */</span></span>
|
||||
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a><span class="pp">#define start_I I</span><span class="op">,</span><span class="pp"> left</span><span class="op">,</span><span class="pp"> st2</span></span>
|
||||
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true" tabindex="-1"></a><span class="co">/* Write a I and stop */</span></span>
|
||||
<span id="cb10-6"><a href="#cb10-6" aria-hidden="true" tabindex="-1"></a><span class="pp">#define st2_O I</span><span class="op">,</span><span class="pp"> left</span><span class="op">,</span><span class="pp"> stop</span></span></code></pre></div>
|
||||
<p>Some explanations: - The tape alphabet is always O and I. - The
|
||||
states can be anything starting with “st”. “start” and “stop” are the
|
||||
start and stop states, respectively. - To define a state, use two lines:
|
||||
@@ -230,22 +228,22 @@ example, the line defining <code>st2_I</code> has been left out.) - The
|
||||
order of the lines is irrelevant. - You may use C-style comments. (Would
|
||||
you have guessed it?)</p>
|
||||
<p>Now, the program can be used with</p>
|
||||
<div class="sourceCode" id="cb12"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./herrmann1.sh</span> <span class="st">'prg=plus1.turing'</span> <span class="st">'tape="I I I"'</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb11"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./herrmann1.sh</span> <span class="st">'prg=plus1.turing'</span> <span class="st">'tape="I I I"'</span></span></code></pre></div>
|
||||
<p>But what happens if no tape is provided? Up to now, the Turing
|
||||
machine would start on an empty tape (that is, a tape filled with
|
||||
<code>O</code>s). For many programs, this doesn’t make much sense (as is
|
||||
the case for <code>plus1.turing</code>). So you might want to provide a
|
||||
default tape by adding a line like</p>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#define tape O O O O O I I I I</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="pp">#define tape O O O O O I I I I</span></span></code></pre></div>
|
||||
<p>to your program.</p>
|
||||
<h3 id="debugging">Debugging</h3>
|
||||
<p>When writing long programs, the most common errors are to forget to
|
||||
define a state or to misspell one. Let’s assume you forgot the line</p>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#define start_I I</span><span class="op">,</span><span class="pp"> left</span><span class="op">,</span><span class="pp"> st2</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#define start_I I</span><span class="op">,</span><span class="pp"> left</span><span class="op">,</span><span class="pp"> st2</span></span></code></pre></div>
|
||||
<p>Remove it and type</p>
|
||||
<div class="sourceCode" id="cb15"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./herrmann1</span> <span class="st">'prg=plus1.turing'</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb14"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./herrmann1</span> <span class="st">'prg=plus1.turing'</span></span></code></pre></div>
|
||||
<p>The output will be</p>
|
||||
<p>Undefined state start.</p>
|
||||
<p>Tape:</p>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
@@ -122,7 +122,7 @@ href="/temp-test-ioccc/location.html#FR">FR</a></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">./ollinger</span> integer</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">./ollinger</span> 1000 <span class="kw">|</span> <span class="fu">cut</span> <span class="at">-c</span> <span class="at">-200</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></code></pre></div>
|
||||
<p>Try the above command in a large window, say 200 chars wide and 100
|
||||
high (200x100) with a tiny font.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- -->
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1.1 2024-01-20 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
|
||||
Reference in new issue
Block a user