add hack-a-round for language specified markdown code blocks

When language is specified in a markdown code block such as:

````
```c
    printf("Hello, world!\n");
```
````

is used, the resulting HTML as produced by `pandoc(1)` combined
with our revised `ioccc.css` is not intent the code block well.

A temporary "_hack-a-round_" is to turn the "markdown code language
specifier" into an HTML comment.  For example:

````
```<!---c-->
    printf("Hello, world!\n");
```
````

This commits turns off existing markdown code language specifiers
for now, while preserving our ability to restore them in the future
when a better  "_hack-a-round_" to the "markdown code language
specifier" problem is found.

The HTML impact if this "_hack-a-round_" is to produce HTML that
looks like this:

```
<pre class="&lt;!---c--&gt;"><code> .. </code></pre>
```

We might be able to create a complex set of classes for each markdown
code language (there won't be very many) in `ioccc.css`, or we might
find a more general CSS (or maybe `pandoc(1)`?) solution.

For now, this hack-a-round will have to do.
This commit is contained in:
Landon Curt Noll committed 2024-04-04 14:50:38 -07:00
1 parent 3919df50fb
commit b66c79254a
700 files changed
+7052 -7056

No files matched your search

+6 -6
View File
@@ -4,7 +4,7 @@ We recommend that you try the alternate version first so you can see what this
entry looked like back in 1995 (with a configurable speed). See the [original
code](#original-code) section below for the original entry.
```sh
```<!---sh-->
make alt
```
@@ -28,14 +28,14 @@ For more detailed information see [1995 cdua bugs](../../bugs.html#1995_cdua).
## To use:
```sh
```<!---sh-->
./cdua.alt
```
## Try:
```sh
```<!---sh-->
make SLEEP=1500 clobber alt
./cdua.alt # press enter and watch it go much faster!
@@ -43,7 +43,7 @@ For more detailed information see [1995 cdua bugs](../../bugs.html#1995_cdua).
You might also like to try:
```sh
```<!---sh-->
make SLEEP=65000 clobber alt
./cdua.alt # press enter and watch it go much slower!
@@ -66,14 +66,14 @@ fast your computer is :-) or use both to see the difference, you can do so.
### Original build:
```sh
```<!---sh-->
make all
```
### Original use:
```sh
```<!---sh-->
./cdua
```
+10 -10
View File
@@ -144,7 +144,7 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
<p>We recommend that you try the alternate version first so you can see what this
entry looked like back in 1995 (with a configurable speed). See the <a href="#original-code">original
code</a> section below for the original entry.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> alt</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make alt</code></pre>
<p>The alternate version uses <code>usleep(3)</code> with <code>SLEEP</code> (defined in the Makefile,
default <code>3000</code>) microseconds to make it easier to see the maze being solved in
real time. You can redefine <code>SLEEP</code> at compile time to reconfigure it in case
@@ -155,15 +155,15 @@ making it 100000 (which is actually fun :-) ).</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#1995_cdua">1995 cdua 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">./cdua.alt</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./cdua.alt</code></pre>
<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="fu">make</span> SLEEP=1500 clobber alt</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">./cdua.alt</span> <span class="co"># press enter and watch it go much faster!</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make SLEEP=1500 clobber alt
./cdua.alt # press enter and watch it go much faster!</code></pre>
<p>You might also like to try:</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> SLEEP=65000 clobber alt</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./cdua.alt</span> <span class="co"># press enter and watch it go much slower!</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make SLEEP=65000 clobber alt
./cdua.alt # press enter and watch it go much slower!</code></pre>
<p>Do you see anything strange in this version when <code>SLEEP</code> is a high value like
<code>65000</code>? What happens if you use <code>100000</code>? Is this strange output still there?
Why?</p>
@@ -174,9 +174,9 @@ actually see it being solved in real time rather than have it go by in a flash.<
<p>If you wish to use the original version, for instance if you wish to see how
fast your computer is :-) or use both to see the difference, you can do so.</p>
<h3 id="original-build">Original build:</h3>
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<h3 id="original-use">Original use:</h3>
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./cdua</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./cdua</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This could be used as the basis of an a-maze-ing screen exerciser.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
+4 -4
View File
@@ -1,20 +1,20 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./dodsond1 < text_file
```
## Try:
```sh
```<!---sh-->
./dodsond1 < README.md
```
@@ -32,7 +32,7 @@ You might consider giving the following input:
... which can be done like:
```c
```<!---c-->
./try.sh
```
+4 -4
View File
@@ -141,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>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<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">./dodsond1</span> <span class="op">&lt;</span> text_file</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./dodsond1 &lt; text_file</code></pre>
<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">./dodsond1</span> <span class="op">&lt;</span> README.md</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./dodsond1 &lt; README.md</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>You might consider giving the following input:</p>
<pre><code> ... a male (who) gets very, very frustrated sitting in a chair all
@@ -153,7 +153,7 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
giraffes.
-- Adjunct Professor Newt Gingrich, Reinhardt College, 1/7/95</code></pre>
<p>… which can be done like:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="op">./</span>try<span class="op">.</span>sh</span></code></pre></div>
<pre class="&lt;!---c--&gt;"><code> ./try.sh</code></pre>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>Istha ogrampra akesta Englishwa extta aswa inputwa andwa
anslatestra itwa intowa Igpa Atinla.</p>
+2 -2
View File
@@ -1,13 +1,13 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./dodsond2
```
+2 -2
View File
@@ -141,9 +141,9 @@ 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>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<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">./dodsond2</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./dodsond2</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>An amazing entry!</p>
<p>The official chef enjoyed solving the maze, which she did on the first
+3 -3
View File
@@ -1,13 +1,13 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./esde data-file word
```
@@ -16,7 +16,7 @@ where data-file contains lines of < 255 chars in length.
## Try:
```sh
```<!---sh-->
./try.sh
```
+3 -3
View File
@@ -141,12 +141,12 @@ Location: <a href="../../location.html#PL">PL</a> - <em>Republic of Poland</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>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<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">./esde</span> data-file word</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./esde data-file word</code></pre>
<p>where data-file contains lines of &lt; 255 chars in length.</p>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>When reading the source be careful to distinguish between variable
names and library functions.</p>
+9 -9
View File
@@ -1,20 +1,20 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./garry <input_file >output_file
```
## Try:
```sh
```<!---sh-->
./try.sh
```
@@ -29,21 +29,21 @@ left intact) looked very much like a rat "dropping core". See
### Alternate build:
```sh
```<!---sh-->
make alt
```
### Alternate use:
```sh
```<!---sh-->
./garry.alt <input_file >output_file
```
### Alternate try:
```sh
```<!---sh-->
./try.alt.sh
```
@@ -63,13 +63,13 @@ environment variables.
The calling syntax is pretty simple, just use it with `stdio`-redirection
or inside pipelines, e.g.:
```sh
```<!---sh-->
./garry <file_to_convert >converted_file
```
or
```sh
```<!---sh-->
cat all_my_files/* | ./garry | lp
```
@@ -87,7 +87,7 @@ Unknown Env-variables or malformed expressions are ignored and kept intact.
Additionally, the filter replaces escaped octal values in the environment
variables by their binary representation, e.g.:
```sh
```<!---sh-->
$ TEST="\110\145\154\154\157"
$ export TEST
$ echo '$TEST$' | ./garry
+12 -12
View File
@@ -141,22 +141,22 @@ Location: <a href="../../location.html#DE">DE</a> - <em>Federal Republic of Germ
<!-- 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>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<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">./garry</span> <span class="op">&lt;</span>input_file <span class="op">&gt;</span>output_file</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./garry &lt;input_file &gt;output_file</code></pre>
<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>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<h2 id="alternate-code">Alternate code:</h2>
<p>While it may not have been the intention of the author, the
judges noted that the C pre-processed version (with the <code>#include</code>s
left intact) looked very much like a rat “dropping core”. See
<a href="garry.alt.c">garry.alt.c</a> and judge for yourself!</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>
<pre class="&lt;!---sh--&gt;"><code> make alt</code></pre>
<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">./garry.alt</span> <span class="op">&lt;</span>input_file <span class="op">&gt;</span>output_file</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./garry.alt &lt;input_file &gt;output_file</code></pre>
<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></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.alt.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The author was kind enough to provide a less obfuscated version of
the source called <a href="garry.fmt.c">garry.fmt.c</a>.</p>
@@ -166,9 +166,9 @@ incorporating the ability to create binary from escaped data in the
environment variables.</p>
<p>The calling syntax is pretty simple, just use it with <code>stdio</code>-redirection
or inside pipelines, e.g.:</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">./garry</span> <span class="op">&lt;</span>file_to_convert <span class="op">&gt;</span>converted_file</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./garry &lt;file_to_convert &gt;converted_file</code></pre>
<p>or</p>
<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="fu">cat</span> all_my_files/<span class="pp">*</span> <span class="kw">|</span> <span class="ex">./garry</span> <span class="kw">|</span> <span class="fu">lp</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> cat all_my_files/* | ./garry | lp</code></pre>
<p>The syntax of the conversion of the input file is as follows: To include the
value of an environment variable in the output file, place the name of the
variable between <code>$</code>-signs in the input, e.g.:</p>
@@ -177,10 +177,10 @@ variable between <code>$</code>-signs in the input, e.g.:</p>
<p>Unknown Env-variables or malformed expressions are ignored and kept intact.</p>
<p>Additionally, the filter replaces escaped octal values in the environment
variables by their binary representation, e.g.:</p>
<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="ex">$</span> TEST=<span class="st">&quot;\110\145\154\154\157&quot;</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">$</span> export TEST</span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">$</span> echo <span class="st">&#39;$TEST$&#39;</span> <span class="kw">|</span> <span class="ex">./garry</span></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a> <span class="ex">Hello</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> $ TEST=&quot;\110\145\154\154\157&quot;
$ export TEST
$ echo &#39;$TEST$&#39; | ./garry
Hello</code></pre>
<!--
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
+3 -3
View File
@@ -1,13 +1,13 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./heathbar num num
```
@@ -16,7 +16,7 @@ where num is a non-negative number.
## Try:
```sh
```<!---sh-->
./try.sh
```
+3 -3
View File
@@ -144,12 +144,12 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
<!-- 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>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<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">./heathbar</span> num num</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./heathbar num num</code></pre>
<p>where num is a non-negative number.</p>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The main reason we liked this entry was mainly because the main
effect of the source was self documenting! :-)</p>
+9 -9
View File
@@ -1,6 +1,6 @@
## To build:
```sh
```<!---sh-->
make all
```
@@ -18,7 +18,7 @@ For more detailed information see [1995 leo bugs](../../bugs.html#1995_leo).
## To use:
```sh
```<!---sh-->
./leo [ deep ] [ right ] [ Variable ] [ cycle [ freq ] ]
```
@@ -27,7 +27,7 @@ See the author's information below on these details.
## Try:
```sh
```<!---sh-->
./try.sh
```
@@ -52,7 +52,7 @@ characters on the command line - anything that's not a number is a candidate.)
The usage is:
```sh
```<!---sh-->
./leo [ deep ] [ right ] [ Variable ] [ cycle [ freq ] ]
```
@@ -68,7 +68,7 @@ to be present if you want to enter `freq` (and you usually do).
Some options to try (besides the obvious):
```sh
```<!---sh-->
./leo 1 | cat - /dev/tty | gs -
```
@@ -191,19 +191,19 @@ the opening for step 1 is not a single line but a cross:
To watch it repeatedly (as a screen saver), use:
```sh
```<!---sh-->
./leo 2 | cat - /dev/tty | gs -
```
The command line:
```sh
```<!---sh-->
./leo Variable 1 | cat - /dev/tty | gs -
```
draws the same as above. Try:
```sh
```<!---sh-->
./leo Variable 1 1 | cat - /dev/tty | gs -
```
@@ -228,7 +228,7 @@ If `Variable` is used, the actual value of `cycle` doesn't matter,
as far as it is > 1. To figure out what difference
`cycle` makes when `Variable` is not used, try
```sh
```<!---sh-->
./leo Variable 37 80 | cat - /dev/tty | gs -
```
+9 -9
View File
@@ -141,16 +141,16 @@ 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>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code> STATUS: known bug - please help us fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#1995_leo">1995 leo 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">./leo</span> [ deep ] [ right ] [ Variable ] [ cycle [ freq ] ]</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./leo [ deep ] [ right ] [ Variable ] [ cycle [ freq ] ]</code></pre>
<p>See the author’s information below on these details.</p>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Press return after each image is drawn.</p>
<p>The variable names are element-ary. If you find this confusing,
@@ -163,7 +163,7 @@ the secret switches that the author doesn’t divulge ! (All switches are single
characters on the command line - anything that’s not a number is a candidate.)</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>The usage is:</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">./leo</span> [ deep ] [ right ] [ Variable ] [ cycle [ freq ] ]</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./leo [ deep ] [ right ] [ Variable ] [ cycle [ freq ] ]</code></pre>
<p>where the first three are literal words, <code>cycle</code> is a positive integer (0 is
ignored), and <code>freq</code> is an integer (default = 0) that’s supposed to be in the
range <code>0..100</code> (bigger values are allowed, however). Invalid parameters and
@@ -173,7 +173,7 @@ equivalent to <code>./leo 0 0 0 1 Variable 70 right</code>, etc.</p>
<p>If <code>Variable</code> is used, <code>cycle</code> is almost ignored (see below) but has
to be present if you want to enter <code>freq</code> (and you usually do).</p>
<p>Some options to try (besides the obvious):</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">./leo</span> 1 <span class="kw">|</span> <span class="fu">cat</span> <span class="at">-</span> /dev/tty <span class="kw">|</span> <span class="fu">gs</span> <span class="at">-</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./leo 1 | cat - /dev/tty | gs -</code></pre>
<p>This draws the basic pattern I invented in high school:</p>
<p>You take a big sheet of “arithmetic” paper and draw a line
of length 1 (between 2 crossings) at the center of the sheet:</p>
@@ -253,11 +253,11 @@ the opening for step 1 is not a single line but a cross:</p>
<pre><code> \./
/ \</code></pre>
<p>To watch it repeatedly (as a screen saver), use:</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">./leo</span> 2 <span class="kw">|</span> <span class="fu">cat</span> <span class="at">-</span> /dev/tty <span class="kw">|</span> <span class="fu">gs</span> <span class="at">-</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./leo 2 | cat - /dev/tty | gs -</code></pre>
<p>The command line:</p>
<div class="sourceCode" id="cb16"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./leo</span> Variable 1 <span class="kw">|</span> <span class="fu">cat</span> <span class="at">-</span> /dev/tty <span class="kw">|</span> <span class="fu">gs</span> <span class="at">-</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./leo Variable 1 | cat - /dev/tty | gs -</code></pre>
<p>draws the same as above. Try:</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./leo</span> Variable 1 1 <span class="kw">|</span> <span class="fu">cat</span> <span class="at">-</span> /dev/tty <span class="kw">|</span> <span class="fu">gs</span> <span class="at">-</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./leo Variable 1 1 | cat - /dev/tty | gs -</code></pre>
<p>What happened to the picture? Increase <code>freq</code> and watch the changes.</p>
<p>If <code>cycle</code> is more than 1, the program loops, allowing the user to
enjoy randomly changing patterns (the delay is 3 seconds),
@@ -272,7 +272,7 @@ if you want to pipe the output to a printer.</p>
<p>If <code>Variable</code> is used, the actual value of <code>cycle</code> doesn’t matter,
as far as it is &gt; 1. To figure out what difference
<code>cycle</code> makes when <code>Variable</code> is not used, try</p>
<div class="sourceCode" id="cb19"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./leo</span> Variable 37 80 <span class="kw">|</span> <span class="fu">cat</span> <span class="at">-</span> /dev/tty <span class="kw">|</span> <span class="fu">gs</span> <span class="at">-</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./leo Variable 37 80 | cat - /dev/tty | gs -</code></pre>
<p>and other values of <code>cycle</code>; smaller values usually require
smaller values of <code>freq</code> for the patterns to be non-trivial.</p>
<p>The options <code>deep</code> and <code>right</code> make the patterns to be drawn in different
+2 -2
View File
@@ -1,13 +1,13 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./makarios
```
+2 -2
View File
@@ -144,9 +144,9 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
<!-- 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>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<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">./makarios</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./makarios</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The judges were impressed that such a small program could do so much!
Can you figure out how it does it?</p>
+3 -3
View File
@@ -1,6 +1,6 @@
## To build:
```sh
```<!---sh-->
make all
```
@@ -18,7 +18,7 @@ For more detailed information see [1995 savastio bugs](../../bugs.html#1995_sava
## To use:
```sh
```<!---sh-->
./savastio
# enter a POSITIVE number such as 100
```
@@ -29,7 +29,7 @@ what happens if you give a non-number?
## Try:
```sh
```<!---sh-->
./try.sh
```
+4 -4
View File
@@ -141,18 +141,18 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
<!-- 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>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<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#1995_savastio">1995 savastio 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">./savastio</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> <span class="co"># enter a POSITIVE number such as 100</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./savastio
# enter a POSITIVE number such as 100</code></pre>
<p>NOTE: if you specify a negative number it will get stuck, showing no output. But
what happens if you give a non-number?</p>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>I know an l when I see a 1.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
+3 -3
View File
@@ -1,20 +1,20 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./schnitzi num
```
## Try:
```sh
```<!---sh-->
./try.sh
```
+3 -3
View File
@@ -141,11 +141,11 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
<!-- 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>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<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">./schnitzi</span> num</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./schnitzi num</code></pre>
<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>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<p>WARNING: the author warns to not use too high a number! If you wish to ignore
the warning it is an exercise to determine how high is too high. :-)</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
+2 -2
View File
@@ -1,13 +1,13 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./spinellis < spinellis.c
```
+2 -2
View File
@@ -141,9 +141,9 @@ Location: <a href="../../location.html#GR">GR</a> - <em>Hellenic Republic</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>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<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">./spinellis</span> <span class="op">&lt;</span> spinellis.c</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./spinellis &lt; spinellis.c</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>While the code does not abuse the rules, its output surely does!</p>
<p>P.S. Does the source have any spelling errors?</p>
+6 -6
View File
@@ -1,6 +1,6 @@
## To build:
```sh
```<!---sh-->
make all
```
@@ -21,14 +21,14 @@ For more detailed information see [1995 vanschnitz bugs](../../bugs.html#1995_va
## To use:
```sh
```<!---sh-->
./vanschnitz
```
## Try:
```sh
```<!---sh-->
./try.sh
```
@@ -43,7 +43,7 @@ to first try and figure out the program without the spoiler.
### Alternate build:
```sh
```<!---sh-->
make alt
```
@@ -84,7 +84,7 @@ line. For instance, to cause the compiler to solve the Towers
of Hanoi problem with four disks, you would compile the program
like this:
```sh
```<!---sh-->
gcc hanoi.c -o hanoi -Dn=4
```
@@ -111,7 +111,7 @@ concatenated; a version that does not use this feature has been
included for people who can only run K&R). A good way to see
the resulting program (on a Unix system) is to do the command
```sh
```<!---sh-->
gcc hanoi.c -E -Dn=5 | grep -v \# | grep -v ^\$
```
+6 -6
View File
@@ -144,7 +144,7 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
<!-- 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>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<p>The authors provided a spoiler version, originally uuencoded but uudecoded by us
in 2023. See <a href="#alternate-code">Alternate code</a> below.</p>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
@@ -152,16 +152,16 @@ in 2023. See <a href="#alternate-code">Alternate code</a> below.</p>
<pre><code> STATUS: missing file - please provide it</code></pre>
<p>For more detailed information see <a href="../../bugs.html#1995_vanschnitz">1995 vanschnitz 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">./vanschnitz</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./vanschnitz</code></pre>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<h2 id="alternate-code">Alternate code:</h2>
<p>The authors provided a spoiler version of the program. Originally uuencoded we
have decoded it for the wider audience in <a href="vanschnitz.alt.c">vanschnitz.alt.c</a>. The
<code>uuencode</code>d blob is still available in their remarks below. They encourage you
to first try and figure out the program without the spoiler.</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>
<pre class="&lt;!---sh--&gt;"><code> make alt</code></pre>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>vanschnitz.alt</code> as you would <code>vanschnitz</code> above.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
@@ -187,7 +187,7 @@ for. This is done by defining the symbol <code>n</code> on the compile
line. For instance, to cause the compiler to solve the Towers
of Hanoi problem with four disks, you would compile the program
like this:</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">gcc</span> hanoi.c <span class="at">-o</span> hanoi <span class="at">-Dn</span><span class="op">=</span>4</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> gcc hanoi.c -o hanoi -Dn=4</code></pre>
<p>A default value of <code>5</code> will be used for <code>n</code> if you do not define
it on the command line. The value of <code>n</code> cannot be greater than
fifteen (the compiler we used to test has a limit on the <code>#include</code>
@@ -208,7 +208,7 @@ ANSI C feature in which adjacent character strings are
concatenated; a version that does not use this feature has been
included for people who can only run K&amp;R). A good way to see
the resulting program (on a Unix system) is to do the command</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">gcc</span> hanoi.c <span class="at">-E</span> <span class="at">-Dn</span><span class="op">=</span>5 <span class="kw">|</span> <span class="fu">grep</span> <span class="at">-v</span> <span class="dt">\#</span> <span class="kw">|</span> <span class="fu">grep</span> <span class="at">-v</span> ^<span class="dt">\$</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> gcc hanoi.c -E -Dn=5 | grep -v \# | grep -v ^\$</code></pre>
<p>For an odd number of disks, the program will provide a
solution wherein the disks end up on peg 2; for an even
number of disks, they will end on peg 3. This should