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 Please use [Bourne-family shells](https://en.wikipedia.org/wiki/Bourne_shell) to
run this entry. run this entry.
... but in 2023 we changed the backticks to be the bash `$(..)` construct. This ... but in 2023 we changed the backticks to be the bash `$(..)` construct.
is not done in the author's remarks, however.
## Author's remarks: ## 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. format](https://en.wikipedia.org/wiki/Netpbm) images.
``` <!---sh--> ``` <!---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: If you have macOS you can open the image like:
@@ -72,7 +71,7 @@ normally open an image.
``` <!---sh--> ``` <!---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: 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 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) 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 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, 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. 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>. 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 Please use <a href="https://en.wikipedia.org/wiki/Bourne_shell">Bourne-family shells</a> to
run this entry.</p> run this entry.</p>
<p>… but in 2023 we changed the backticks to be the bash <code>$(..)</code> construct. This <p>… but in 2023 we changed the backticks to be the bash <code>$(..)</code> construct.</p>
is not done in the author’s remarks, however.</p>
<h2 id="authors-remarks">Author’s remarks:</h2> <h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="example-use">Example use</h3> <h3 id="example-use">Example use</h3>
<p>You need the source code and example input (either one of the example files, or <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 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> 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> <p>If you have macOS you can open the image like:</p>
<pre><code> open greensleeves.pbm</code></pre> <pre><code> open greensleeves.pbm</code></pre>
<p>… otherwise, you’ll have to open it in your viewer of choice how you would <p>… otherwise, you’ll have to open it in your viewer of choice how you would
normally open an image.</p> 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> <p>If you have macOS you can open the image like:</p>
<pre><code> open short_bass.pbm</code></pre> <pre><code> open short_bass.pbm</code></pre>
<p>… otherwise, you’ll have to open it in your viewer of choice how you would <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 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) 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 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, <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. 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 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 ./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 see what this looks like not going so fast then you might wish to try the
[Alternate code](#alternate-code) instead. [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> provided by the author as well. See the <a href="#alternate-code">Alternate code</a>
section below for more details.</p> section below for more details.</p>
<pre><code> ./endoh1 &lt; file</code></pre> <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 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> <a href="#alternate-code">Alternate code</a> instead.</p>
<h2 id="try">Try:</h2> <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="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> <h3 id="information-2012blakelyindex.html">Information: <a href="2012/blakely/index.html">2012/blakely/index.html</a></h3>
<p>The author stated:</p> <p>The author stated:</p>
<pre><code> If there is a division by zero, square-root of a negative number, or similar <blockquote>
operation, then the results are undefined.</code></pre> <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"> <div id="2012_deckmyn">
<h2 id="deckmyn">2012/deckmyn</h2> <h2 id="deckmyn">2012/deckmyn</h2>
</div> </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="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> <h3 id="information-2012deckmynindex.html">Information: <a href="2012/deckmyn/index.html">2012/deckmyn/index.html</a></h3>
<p>The author stated:</p> <p>The author stated:</p>
<pre><code> The memory locations of `argv` are used for various purposes. Therefore, the <blockquote>
program name (default `deckmyn`) must be *at least 4 characters long*, including <p>The memory locations of <code>argv</code> are used for various purposes. Therefore, the
possibly the path. This, along with the ending `&#39;\0&#39;`, gives a minimum 5 bytes of program name (default <code>deckmyn</code>) must be <em>at least 4 characters long</em>, including
useful memory space. Otherwise, the program may attempt to write outside the possibly the path. This, along with the ending <code>'\0'</code>, gives a minimum 5 bytes
string. of useful memory space. Otherwise, the program may attempt to write outside the
string.</p>
The code is quite sensitive. Errors in the input can lead to strange results. <p>The code is quite sensitive. Errors in the input can lead to strange
The code does not read beyond the end of the music input, but that is about the results. The code does not read beyond the end of the music input, but that is
only error checking available. Any input that is not according to the rules in about the only error checking available. Any input that is not according to the
the deckmyn.html, may cause errors. rules in the deckmyn.html, may cause errors.</p>
<p>The program has no special hardware limitations or requirements, other than
The program has no special hardware limitations or requirements, other than 8bit 8bit <code>char</code> (<code>signed</code> or <code>unsigned</code>) and two’s complement negatives.</p>
`char` (`signed` or `unsigned`) and two&#39;s complement negatives. <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>
The limitations of using `char` as counters for e.g. the number of music staves <p>The file layout must be exactly the same as deckmyn.c though, only the
are minor. 127 staves to a page is rather a lot. 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.
The file layout must be exactly the same as deckmyn.c though, only the locations Any violation of this will result in the rest of the music being interpreted in
of space (`&quot; &quot;`) may differ. 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
Every element in the music is given by a string of *exactly* 3 characters. Any musical element of a line is only 2 characters!</p>
violation of this will result in the rest of the music being interpreted in some </blockquote>
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>
<p>The manual referred to is <a href="2012/deckmyn/deckmyn.html">here</a>.</p> <p>The manual referred to is <a href="2012/deckmyn/deckmyn.html">here</a>.</p>
<div id="2012_dlowe"> <div id="2012_dlowe">
<h2 id="dlowe-3">2012/dlowe</h2> <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="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> <h3 id="information-2012trompindex.html">Information: <a href="2012/tromp/index.html">2012/tromp/index.html</a></h3>
<p>The author stated:</p> <p>The author stated:</p>
<pre><code> If the input doesn&#39;t start with a valid program, that is, <blockquote>
if the interpreter reaches end-of-file during program parsing, <p>If the input doesn’t start with a valid program, that is, if the interpreter
it will crash in some way. E.g. the following might dump core: reaches end-of-file during program parsing, it will crash in some way. E.g. the
following might dump core:</p>
echo -n &quot;U&quot; | ./tromp <p><code>echo -n "U" | ./tromp</code></p>
<p>Furthermore, the interpreter requires the initial encoded lambda term to be
Furthermore, the interpreter requires the initial encoded lambda term to be closed, closed, that is, variable n can only appear within at least ‘n’ enclosing
that is, variable n can only appear within at least &#39;n&#39; enclosing lambdas. lambdas. For instance, here the term <code>'\ 5'</code> is not closed, causing the
For instance, here the term &#39;\ 5&#39; is not closed, causing the interpreter to crash when interpreter to crash when looking into a null-pointer environment:</p>
looking into a null-pointer environment: <p><code>echo "&gt;Hello, world" | ./tromp</code></p>
<p>will likely dump core.</p>
echo &quot;&gt;Hello, world&quot; | ./tromp </blockquote>
will likely dump core.</code></pre>
<div id="2012_vik"> <div id="2012_vik">
<h2 id="vik-1">2012/vik</h2> <h2 id="vik-1">2012/vik</h2>
</div> </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: The author stated:
``` > If there is a division by zero, square-root of a negative number, or similar
If there is a division by zero, square-root of a negative number, or similar operation, then the results are undefined.
operation, then the results are undefined.
```
<div id="2012_deckmyn"> <div id="2012_deckmyn">
@@ -3381,34 +3379,31 @@ The author stated:
The author stated: The author stated:
``` > The memory locations of `argv` are used for various purposes. Therefore, the
The memory locations of `argv` are used for various purposes. Therefore, the program name (default `deckmyn`) must be *at least 4 characters long*, including
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
possibly the path. This, along with the ending `'\0'`, gives a minimum 5 bytes of of useful memory space. Otherwise, the program may attempt to write outside the
useful memory space. Otherwise, the program may attempt to write outside the string.
string. >
> The code is quite sensitive. Errors in the input can lead to strange
The code is quite sensitive. Errors in the input can lead to strange results. results. The code does not read beyond the end of the music input, but that is
The code does not read beyond the end of the music input, but that is about the about the only error checking available. Any input that is not according to the
only error checking available. Any input that is not according to the rules in rules in the deckmyn.html, may cause errors.
the deckmyn.html, may cause errors. >
> The program has no special hardware limitations or requirements, other than
The program has no special hardware limitations or requirements, other than 8bit 8bit `char` (`signed` or `unsigned`) and two's complement negatives.
`char` (`signed` or `unsigned`) and two's complement negatives. >
> The limitations of using `char` as counters for e.g. the number of music
The limitations of using `char` as counters for e.g. the number of music staves staves are minor. 127 staves to a page is rather a lot.
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
The file layout must be exactly the same as deckmyn.c though, only the locations locations of space (`" "`) may differ.
of space (`" "`) may differ. >
> Every element in the music is given by a string of *exactly* 3 characters.
Every element in the music is given by a string of *exactly* 3 characters. Any Any violation of this will result in the rest of the music being interpreted in
violation of this will result in the rest of the music being interpreted in some some randomly wrong way. Notice that in a file, the newline is also a character!
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
Therefore, when preparing music in a file, care should be taken that the last musical element of a line is only 2 characters!
musical element of a line is only 2 characters!
```
The manual referred to is [here](2012/deckmyn/deckmyn.html). The manual referred to is [here](2012/deckmyn/deckmyn.html).
@@ -3441,22 +3436,20 @@ The author stated:
The author stated: The author stated:
``` > If the input doesn't start with a valid program, that is, if the interpreter
If the input doesn't start with a valid program, that is, reaches end-of-file during program parsing, it will crash in some way. E.g. the
if the interpreter reaches end-of-file during program parsing, following might dump core:
it will crash in some way. E.g. the following might dump core: >
> `echo -n "U" | ./tromp`
echo -n "U" | ./tromp >
> Furthermore, the interpreter requires the initial encoded lambda term to be
Furthermore, the interpreter requires the initial encoded lambda term to be closed, closed, that is, variable n can only appear within at least 'n' enclosing
that is, variable n can only appear within at least 'n' enclosing lambdas. lambdas. For instance, here the term `'\ 5'` is not closed, causing the
For instance, here the term '\ 5' is not closed, causing the interpreter to crash when interpreter to crash when looking into a null-pointer environment:
looking into a null-pointer environment: >
> `echo ">Hello, world" | ./tromp`
echo ">Hello, world" | ./tromp >
> will likely dump core.
will likely dump core.
```
<div id="2012_vik"> <div id="2012_vik">