Fix html files for 2012

This commit is contained in:
Cody Boone Ferguson committed 2024-10-13 17:56:59 -07:00
1 parent 1dffd99226
commit b13b36b46a
6 files changed
+89 -101

No files matched your search

+4 -5
View File
@@ -45,8 +45,7 @@ command line is an abuse of [C Shell](https://en.wikipedia.org/wiki/C_shell).
Please use [Bourne-family shells](https://en.wikipedia.org/wiki/Bourne_shell) to
run this entry.
... but in 2023 we changed the backticks to be the bash `$(..)` construct. This
is not done in the author's remarks, however.
... but in 2023 we changed the backticks to be the bash `$(..)` construct.
## Author's remarks:
@@ -58,7 +57,7 @@ manual input as below) ready and a program capable of showing [.pbm bitmap
format](https://en.wikipedia.org/wiki/Netpbm) images.
``` <!---sh-->
./deckmyn "`cat deckmyn.c`" "`cat example_greensleeves`" > greensleeves.pbm
./deckmyn "$(cat deckmyn.c)" "$(cat example_greensleeves)" > greensleeves.pbm
```
If you have macOS you can open the image like:
@@ -72,7 +71,7 @@ normally open an image.
``` <!---sh-->
./deckmyn "`cat deckmyn.c`" "KF m44c4 c4 g4 g4 : a4 a4 g2 :; " > short_bass.pbm
./deckmyn "$(cat deckmyn.c)" "KF m44c4 c4 g4 g4 : a4 a4 g2 :; " > short_bass.pbm
```
If you have macOS you can open the image like:
@@ -101,7 +100,7 @@ The program expects *two command line arguments*. The first is a (very long)
string that contains the complete music font. Note that it should *not* be given
as a file name! The default music font is encoded in the (whitespace of the)
source code [deckmyn.c](%%REPO_URL%%/2012/deckmyn/deckmyn.c) itself. Therefore, the first argument should
be `"`` ` ``cat deckmyn.c`` ` ``"`.
be `"$(cat deckmyn.c)"`.
The second command line argument is the music itself. This is, again, a string,
not a file name. All music signs are entered as tokens of exactly 3 characters.
+4 -5
View File
@@ -431,19 +431,18 @@ chip</a> (a sound processor?).</p>
command line is an abuse of <a href="https://en.wikipedia.org/wiki/C_shell">C Shell</a>.
Please use <a href="https://en.wikipedia.org/wiki/Bourne_shell">Bourne-family shells</a> to
run this entry.</p>
<p>… but in 2023 we changed the backticks to be the bash <code>$(..)</code> construct. This
is not done in the author’s remarks, however.</p>
<p>… but in 2023 we changed the backticks to be the bash <code>$(..)</code> construct.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="example-use">Example use</h3>
<p>You need the source code and example input (either one of the example files, or
manual input as below) ready and a program capable of showing <a href="https://en.wikipedia.org/wiki/Netpbm">.pbm bitmap
format</a> images.</p>
<pre><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;`cat example_greensleeves`&quot; &gt; greensleeves.pbm</code></pre>
<pre><code> ./deckmyn &quot;$(cat deckmyn.c)&quot; &quot;$(cat example_greensleeves)&quot; &gt; greensleeves.pbm</code></pre>
<p>If you have macOS you can open the image like:</p>
<pre><code> open greensleeves.pbm</code></pre>
<p>… otherwise, you’ll have to open it in your viewer of choice how you would
normally open an image.</p>
<pre><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;KF m44c4 c4 g4 g4 : a4 a4 g2 :; &quot; &gt; short_bass.pbm</code></pre>
<pre><code> ./deckmyn &quot;$(cat deckmyn.c)&quot; &quot;KF m44c4 c4 g4 g4 : a4 a4 g2 :; &quot; &gt; short_bass.pbm</code></pre>
<p>If you have macOS you can open the image like:</p>
<pre><code> open short_bass.pbm</code></pre>
<p>… otherwise, you’ll have to open it in your viewer of choice how you would
@@ -461,7 +460,7 @@ etc.</p>
string that contains the complete music font. Note that it should <em>not</em> be given
as a file name! The default music font is encoded in the (whitespace of the)
source code <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/deckmyn/deckmyn.c">deckmyn.c</a> itself. Therefore, the first argument should
be <code>"``</code> <code>cat deckmyn.c</code> <code>``"</code>.</p>
be <code>"$(cat deckmyn.c)"</code>.</p>
<p>The second command line argument is the music itself. This is, again, a string,
not a file name. All music signs are entered as tokens of exactly 3 characters.
The code is very sensitive to bad spacing! So for instance, if you use a file to
+1 -1
View File
@@ -16,7 +16,7 @@ section below for more details.
./endoh1 < file
```
WARNING: if you're sensitive to/don't like flashing colours/text or just want to
**WARNING**: if you're sensitive to/don't like flashing colours/text or just want to
see what this looks like not going so fast then you might wish to try the
[Alternate code](#alternate-code) instead.
+1 -1
View File
@@ -418,7 +418,7 @@ judges at the time of the contest). Another version is the deobfuscated version
provided by the author as well. See the <a href="#alternate-code">Alternate code</a>
section below for more details.</p>
<pre><code> ./endoh1 &lt; file</code></pre>
<p>WARNING: if you’re sensitive to/don’t like flashing colours/text or just want to
<p><strong>WARNING</strong>: if you’re sensitive to/don’t like flashing colours/text or just want to
see what this looks like not going so fast then you might wish to try the
<a href="#alternate-code">Alternate code</a> instead.</p>
<h2 id="try">Try:</h2>
+38 -41
View File
@@ -2715,8 +2715,10 @@ fire</a> :-)</p>
<h3 id="source-code-2012blakelyblakely.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/blakely.c">2012/blakely/blakely.c</a></h3>
<h3 id="information-2012blakelyindex.html">Information: <a href="2012/blakely/index.html">2012/blakely/index.html</a></h3>
<p>The author stated:</p>
<pre><code> If there is a division by zero, square-root of a negative number, or similar
operation, then the results are undefined.</code></pre>
<blockquote>
<p>If there is a division by zero, square-root of a negative number, or similar
operation, then the results are undefined.</p>
</blockquote>
<div id="2012_deckmyn">
<h2 id="deckmyn">2012/deckmyn</h2>
</div>
@@ -2724,31 +2726,28 @@ fire</a> :-)</p>
<h3 id="source-code-2012deckmyndeckmyn.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/deckmyn/deckmyn.c">2012/deckmyn/deckmyn.c</a></h3>
<h3 id="information-2012deckmynindex.html">Information: <a href="2012/deckmyn/index.html">2012/deckmyn/index.html</a></h3>
<p>The author stated:</p>
<pre><code> The memory locations of `argv` are used for various purposes. Therefore, the
program name (default `deckmyn`) must be *at least 4 characters long*, including
possibly the path. This, along with the ending `&#39;\0&#39;`, gives a minimum 5 bytes of
useful memory space. Otherwise, the program may attempt to write outside the
string.
The code is quite sensitive. Errors in the input can lead to strange results.
The code does not read beyond the end of the music input, but that is about the
only error checking available. Any input that is not according to the rules in
the deckmyn.html, may cause errors.
The program has no special hardware limitations or requirements, other than 8bit
`char` (`signed` or `unsigned`) and two&#39;s complement negatives.
The limitations of using `char` as counters for e.g. the number of music staves
are minor. 127 staves to a page is rather a lot.
The file layout must be exactly the same as deckmyn.c though, only the locations
of space (`&quot; &quot;`) may differ.
Every element in the music is given by a string of *exactly* 3 characters. Any
violation of this will result in the rest of the music being interpreted in some
randomly wrong way. Notice that in a file, the newline is also a character!
Therefore, when preparing music in a file, care should be taken that the last
musical element of a line is only 2 characters!</code></pre>
<blockquote>
<p>The memory locations of <code>argv</code> are used for various purposes. Therefore, the
program name (default <code>deckmyn</code>) must be <em>at least 4 characters long</em>, including
possibly the path. This, along with the ending <code>'\0'</code>, gives a minimum 5 bytes
of useful memory space. Otherwise, the program may attempt to write outside the
string.</p>
<p>The code is quite sensitive. Errors in the input can lead to strange
results. The code does not read beyond the end of the music input, but that is
about the only error checking available. Any input that is not according to the
rules in the deckmyn.html, may cause errors.</p>
<p>The program has no special hardware limitations or requirements, other than
8bit <code>char</code> (<code>signed</code> or <code>unsigned</code>) and two’s complement negatives.</p>
<p>The limitations of using <code>char</code> as counters for e.g. the number of music
staves are minor. 127 staves to a page is rather a lot.</p>
<p>The file layout must be exactly the same as deckmyn.c though, only the
locations of space (<code>" "</code>) may differ.</p>
<p>Every element in the music is given by a string of <em>exactly</em> 3 characters.
Any violation of this will result in the rest of the music being interpreted in
some randomly wrong way. Notice that in a file, the newline is also a character!
Therefore, when preparing music in a file, care should be taken that the last
musical element of a line is only 2 characters!</p>
</blockquote>
<p>The manual referred to is <a href="2012/deckmyn/deckmyn.html">here</a>.</p>
<div id="2012_dlowe">
<h2 id="dlowe-3">2012/dlowe</h2>
@@ -2771,20 +2770,18 @@ doesn’t make it possible to lock drawing to the display refresh rate.)</li>
<h3 id="source-code-2012tromptromp.c">Source code: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/tromp/tromp.c">2012/tromp/tromp.c</a></h3>
<h3 id="information-2012trompindex.html">Information: <a href="2012/tromp/index.html">2012/tromp/index.html</a></h3>
<p>The author stated:</p>
<pre><code> If the input doesn&#39;t start with a valid program, that is,
if the interpreter reaches end-of-file during program parsing,
it will crash in some way. E.g. the following might dump core:
echo -n &quot;U&quot; | ./tromp
Furthermore, the interpreter requires the initial encoded lambda term to be closed,
that is, variable n can only appear within at least &#39;n&#39; enclosing lambdas.
For instance, here the term &#39;\ 5&#39; is not closed, causing the interpreter to crash when
looking into a null-pointer environment:
echo &quot;&gt;Hello, world&quot; | ./tromp
will likely dump core.</code></pre>
<blockquote>
<p>If the input doesn’t start with a valid program, that is, if the interpreter
reaches end-of-file during program parsing, it will crash in some way. E.g. the
following might dump core:</p>
<p><code>echo -n "U" | ./tromp</code></p>
<p>Furthermore, the interpreter requires the initial encoded lambda term to be
closed, that is, variable n can only appear within at least ‘n’ enclosing
lambdas. For instance, here the term <code>'\ 5'</code> is not closed, causing the
interpreter to crash when looking into a null-pointer environment:</p>
<p><code>echo "&gt;Hello, world" | ./tromp</code></p>
<p>will likely dump core.</p>
</blockquote>
<div id="2012_vik">
<h2 id="vik-1">2012/vik</h2>
</div>
+41 -48
View File
@@ -3365,10 +3365,8 @@ fire](https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_&lpar;computing&rpar;) :
The author stated:
```
If there is a division by zero, square-root of a negative number, or similar
operation, then the results are undefined.
```
> If there is a division by zero, square-root of a negative number, or similar
operation, then the results are undefined.
<div id="2012_deckmyn">
@@ -3381,34 +3379,31 @@ The author stated:
The author stated:
```
The memory locations of `argv` are used for various purposes. Therefore, the
program name (default `deckmyn`) must be *at least 4 characters long*, including
possibly the path. This, along with the ending `'\0'`, gives a minimum 5 bytes of
useful memory space. Otherwise, the program may attempt to write outside the
string.
The code is quite sensitive. Errors in the input can lead to strange results.
The code does not read beyond the end of the music input, but that is about the
only error checking available. Any input that is not according to the rules in
the deckmyn.html, may cause errors.
The program has no special hardware limitations or requirements, other than 8bit
`char` (`signed` or `unsigned`) and two's complement negatives.
The limitations of using `char` as counters for e.g. the number of music staves
are minor. 127 staves to a page is rather a lot.
The file layout must be exactly the same as deckmyn.c though, only the locations
of space (`" "`) may differ.
Every element in the music is given by a string of *exactly* 3 characters. Any
violation of this will result in the rest of the music being interpreted in some
randomly wrong way. Notice that in a file, the newline is also a character!
Therefore, when preparing music in a file, care should be taken that the last
musical element of a line is only 2 characters!
```
> The memory locations of `argv` are used for various purposes. Therefore, the
program name (default `deckmyn`) must be *at least 4 characters long*, including
possibly the path. This, along with the ending `'\0'`, gives a minimum 5 bytes
of useful memory space. Otherwise, the program may attempt to write outside the
string.
>
> The code is quite sensitive. Errors in the input can lead to strange
results. The code does not read beyond the end of the music input, but that is
about the only error checking available. Any input that is not according to the
rules in the deckmyn.html, may cause errors.
>
> The program has no special hardware limitations or requirements, other than
8bit `char` (`signed` or `unsigned`) and two's complement negatives.
>
> The limitations of using `char` as counters for e.g. the number of music
staves are minor. 127 staves to a page is rather a lot.
>
> The file layout must be exactly the same as deckmyn.c though, only the
locations of space (`" "`) may differ.
>
> Every element in the music is given by a string of *exactly* 3 characters.
Any violation of this will result in the rest of the music being interpreted in
some randomly wrong way. Notice that in a file, the newline is also a character!
Therefore, when preparing music in a file, care should be taken that the last
musical element of a line is only 2 characters!
The manual referred to is [here](2012/deckmyn/deckmyn.html).
@@ -3441,22 +3436,20 @@ The author stated:
The author stated:
```
If the input doesn't start with a valid program, that is,
if the interpreter reaches end-of-file during program parsing,
it will crash in some way. E.g. the following might dump core:
echo -n "U" | ./tromp
Furthermore, the interpreter requires the initial encoded lambda term to be closed,
that is, variable n can only appear within at least 'n' enclosing lambdas.
For instance, here the term '\ 5' is not closed, causing the interpreter to crash when
looking into a null-pointer environment:
echo ">Hello, world" | ./tromp
will likely dump core.
```
> If the input doesn't start with a valid program, that is, if the interpreter
reaches end-of-file during program parsing, it will crash in some way. E.g. the
following might dump core:
>
> `echo -n "U" | ./tromp`
>
> Furthermore, the interpreter requires the initial encoded lambda term to be
closed, that is, variable n can only appear within at least 'n' enclosing
lambdas. For instance, here the term `'\ 5'` is not closed, causing the
interpreter to crash when looking into a null-pointer environment:
>
> `echo ">Hello, world" | ./tromp`
>
> will likely dump core.
<div id="2012_vik">