Format fixes in html files of 2020

This commit is contained in:
Cody Boone Ferguson committed 2024-10-15 12:41:12 -07:00
1 parent cc026c02b6
commit 6bbcebc7bf
12 files changed
+128 -122

No files matched your search

+4 -2
View File
@@ -10,8 +10,9 @@ code](#alternate-code) below.
## To use:
**IMPORTANT for macOS**: run under Terminal.app.
``` <!---sh-->
# IMPORTANT for macOS: run under Terminal.app
./prog
```
@@ -19,8 +20,9 @@ code](#alternate-code) below.
## Try:
**IMPORTANT for macOS**: run under Terminal.app.
``` <!---sh-->
# IMPORTANT for macOS: run under Terminal.app
# Try resizing the terminal window before the first click.
+4 -4
View File
@@ -413,12 +413,12 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em></li>
<p>There is an alternate version provided by the author. See <a href="#alternate-code">Alternate
code</a> below.</p>
<h2 id="to-use">To use:</h2>
<pre><code> # IMPORTANT for macOS: run under Terminal.app
<p><strong>IMPORTANT for macOS</strong>: run under Terminal.app.</p>
<pre><code>
./prog</code></pre>
<h2 id="try">Try:</h2>
<pre><code> # IMPORTANT for macOS: run under Terminal.app
<p><strong>IMPORTANT for macOS</strong>: run under Terminal.app.</p>
<pre><code>
# Try resizing the terminal window before the first click.
# Try resizing the terminal window after the first click.
+11 -7
View File
@@ -872,11 +872,14 @@ seem to both be compared to <code>y</code> but never <code>x</code> (that variab
and not even in this part of the code).</p></li>
<li><p>The function <code>B()</code> ends with a <code>goto</code>. Why? It’s also another place where
there’s at least one negative offset.</p></li>
<li><p>A note on the many <code>#define</code>s in my entry. You say you dislike them:</p>
<pre><code> Doing masses of #defines to obscure the source has become &#39;old&#39;. We
tend to &#39;see thru&#39; masses of #defines due to our pre-processor tests
that we apply. Simply abusing #defines or -Dfoo=bar won&#39;t go as far
as a program that is more well rounded in confusion.</code></pre>
<li><p>A note on the many <code>#define</code>s in my entry. You say you dislike them:</p></li>
</ul>
<blockquote>
<p>Doing masses of #defines to obscure the source has become ‘old’. We tend to
‘see thru’ masses of #defines due to our pre-processor tests that we apply.
Simply abusing #defines or -Dfoo=bar won’t go as far as a program that is more
well rounded in confusion.</p>
</blockquote>
<p>As I have noted though many of these save quite a lot of bytes too. It’s
true that they might aid (but barely) in obfuscation but I think that my
entry is more rounded in confusion; certainly the other techniques I have
@@ -888,7 +891,8 @@ also removed some that saved bytes and in fact I think it makes it more
obscure if in no other way but making it more difficult to look at (for
example I might have been able to save bytes by defining for the array
offsets but I find that it looks much better - which is to say much worse -
the way I have it now).</p></li>
the way I have it now).</p>
<ul>
<li><p>Going back to the curious <code>static char s[]=Z(; +&lt;&gt;^v);</code>: there’s something
magical about the number 7 isn’t there? I do not refer to primes although
certainly one could say that primes have a magic to them. No. I’m instead
@@ -1117,7 +1121,7 @@ the score line is made an empty string it doesn’t matter because it’ll appea
all spaces anyway. Thus I could save another three bytes by changing it to:</p>
<pre><code> !o &amp;&amp; q *U,*V,&#39; &#39;);</code></pre>
<p>Technically it would be a <code>" "</code> (see <a href="HACKING.html">HACKING.html</a>
else for N (not referring to the variable though it might very
for N (not referring to the variable though it might very
well matter here too) movements (i.e. due to sizes) you will at times (e.g.
after eating a bug) see the snake body char at 0,0. I’m not bothered about that
though because the score line is meant to display something, it squeezes a few
+5 -5
View File
@@ -630,10 +630,10 @@ there's at least one negative offset.
- A note on the many `#define`s in my entry. You say you dislike them:
Doing masses of #defines to obscure the source has become 'old'. We
tend to 'see thru' masses of #defines due to our pre-processor tests
that we apply. Simply abusing #defines or -Dfoo=bar won't go as far
as a program that is more well rounded in confusion.
> Doing masses of #defines to obscure the source has become 'old'. We tend to
'see thru' masses of #defines due to our pre-processor tests that we apply.
Simply abusing #defines or -Dfoo=bar won't go as far as a program that is more
well rounded in confusion.
As I have noted though many of these save quite a lot of bytes too. It's
true that they might aid (but barely) in obfuscation but I think that my
@@ -955,7 +955,7 @@ all spaces anyway. Thus I could save another three bytes by changing it to:
```
Technically it would be a `" "` (see [HACKING.html][]
else for N (not referring to the variable though it might very
for N (not referring to the variable though it might very
well matter here too) movements (i.e. due to sizes) you will at times (e.g.
after eating a bug) see the snake body char at 0,0. I'm not bothered about that
though because the score line is meant to display something, it squeezes a few
+19 -16
View File
@@ -530,12 +530,12 @@ messed up. There are numerous things you might try but probably the easiest is
to run the game again without modifying the dimensions (and then just quit) or
even just the <code>reset</code> command.</p>
<p>The Linux man page says:</p>
<pre><code> You might have to run the `reset` tool like:
&lt;LF&gt;reset&lt;LF&gt;
(the line-feed character is normally control-J) to get the terminal
to work, as carriage-return may no longer work in the abnormal state.</code></pre>
<blockquote>
<p>You might have to run the <code>reset</code> tool like:</p>
<p><LF>reset<LF></p>
<p>(the line-feed character is normally control-J) to get the terminal to work,
as carriage-return may no longer work in the abnormal state.</p>
</blockquote>
<p>If you don’t have the reset utility you can try:</p>
<pre><code> echo -e \\033c</code></pre>
<p>Otherwise try <code>clear; stty sane</code> (that will turn on echo also) or if all else
@@ -603,17 +603,20 @@ support in the source code itself.</p>
<h2 id="colour-limitations"><a href="#toc">Colour limitations</a></h2>
</div>
<p>According to X/Open Curses, Issue 7 (pg. 57):</p>
<pre><code> With init_pair() and pair_content(), the value of pair must be in a range
from 0 to and including COLOR_PAIRS-1. (There may be an
implementation-specific upper limit on the valid value of pair, but any such
limit is at least 63.) Valid values for f and b are the range from 0 to and
including COLORS-1.</code></pre>
<blockquote>
<p>With <code>init_pair()</code> and <code>pair_content()</code>, the value of pair must be in a range from
0 to and including <code>COLOR_PAIRS-1</code>. (There may be an implementation-specific upper
limit on the valid value of pair, but any such limit is at least 63.) Valid
values for f and b are the range from 0 to and including <code>COLORS-1</code>.</p>
</blockquote>
<p>The manpage for <code>init_pair()</code> says this:</p>
<pre><code> These limits apply to color values and color pairs. Values outside these limits are not legal, and may result in a runtime error:
[...]
COLOR_PAIRS corresponds to the terminal database&#39;s max_pairs capability, (see terminfo(5)).</code></pre>
<blockquote>
<p>These limits apply to color values and color pairs. Values outside these
limits are not legal, and may result in a runtime error:</p>
<p>[…]</p>
<p><code>COLOR_PAIRS</code> corresponds to the terminal database’s <code>max_pairs</code> capability,
(see <code>terminfo(5)</code>).</p>
</blockquote>
<p>Based on the two as well as the fact that monochrome terminals (I’ve tried under
both Linux and macOS) seem to work fine I believe I am fine here too. And to
confirm this I wrote the following code with the output below:</p>
+17 -22
View File
@@ -191,14 +191,12 @@ even just the `reset` command.
The Linux man page says:
```
You might have to run the `reset` tool like:
<LF>reset<LF>
(the line-feed character is normally control-J) to get the terminal
to work, as carriage-return may no longer work in the abnormal state.
```
> You might have to run the `reset` tool like:
>
> <LF>reset<LF>
>
> (the line-feed character is normally control-J) to get the terminal to work,
as carriage-return may no longer work in the abnormal state.
If you don't have the reset utility you can try:
@@ -305,23 +303,20 @@ support in the source code itself.
According to X/Open Curses, Issue 7 (pg. 57):
```
With init_pair() and pair_content(), the value of pair must be in a range
from 0 to and including COLOR_PAIRS-1. (There may be an
implementation-specific upper limit on the valid value of pair, but any such
limit is at least 63.) Valid values for f and b are the range from 0 to and
including COLORS-1.
```
> With `init_pair()` and `pair_content()`, the value of pair must be in a range from
0 to and including `COLOR_PAIRS-1`. (There may be an implementation-specific upper
limit on the valid value of pair, but any such limit is at least 63.) Valid
values for f and b are the range from 0 to and including `COLORS-1`.
The manpage for `init_pair()` says this:
```
These limits apply to color values and color pairs. Values outside these limits are not legal, and may result in a runtime error:
[...]
COLOR_PAIRS corresponds to the terminal database's max_pairs capability, (see terminfo(5)).
```
> These limits apply to color values and color pairs. Values outside these
limits are not legal, and may result in a runtime error:
>
> [...]
>
> `COLOR_PAIRS` corresponds to the terminal database's `max_pairs` capability,
(see `terminfo(5)`).
Based on the two as well as the fact that monochrome terminals (I've tried under
both Linux and macOS) seem to work fine I believe I am fine here too. And to
+13 -16
View File
@@ -217,21 +217,18 @@ With my entry we can complete the loop!
The author [Nathan Sidwell](../../authors.html#Nathan_Sidwell) of the [1992 Worst
Abuse of the Rules][] had this to say about his program:
```
This program is a hello world text encrypter/decrypter. It uses an
[enigma](https://www.cryptomuseum.com/crypto/enigma/index.htm) (I think) style
encryption algorithm, where the encryption key character is modified by a value,
determined from the previous character. Non-printable characters (those with
ASCII values `< ' '` or `> 0x7e`) are passed unaltered, thus any kind of file
may be successfully processed, but if the original is printable, the processed
file will be too. The input is read from stdin, and the output presented to
stdout. The key, a text string, is presented as a command argument. This is
optional, and if omitted, the file is self-{de,en}crypted. To specify
decryption, a `-` should be given before the key. (Actually encryption and
decryption proper inverse operations, so you can use decrypt to scramble and
encrypt to descramble, if you're perverse.)
```
> This program is a hello world text encrypter/decrypter. It uses an
[enigma](https://www.cryptomuseum.com/crypto/enigma/index.htm) (I think) style
encryption algorithm, where the encryption key character is modified by a value,
determined from the previous character. Non-printable characters (those with
ASCII values `< ' '` or `> 0x7e`) are passed unaltered, thus any kind of file
may be successfully processed, but if the original is printable, the processed
file will be too. The input is read from stdin, and the output presented to
stdout. The key, a text string, is presented as a command argument. This is
optional, and if omitted, the file is self-{de,en}crypted. To specify
decryption, a `-` should be given before the key. (Actually encryption and
decryption proper inverse operations, so you can use decrypt to scramble and
encrypt to descramble, if you're perverse.)
But the Enigma algorithm is more complex than that and my entry can encipher
(and by extension decipher) text in the manner of the Enigma machines of the
@@ -862,7 +859,7 @@ change the rest of the text. If you wish to see how I went about this see
[recode.c]: recode.c
[obfuscation.html]: obfuscation.html
[obfuscation.txt]: obfuscation.txt
[obfuscation.key]: obfuscation.key
[obfuscation.key]: %%REPO_URL%%/2020/ferguson2/obfuscation.key
[Tony Sale's pages on The Enigma cipher machine]: https://web.archive.org/web/20200621180323/http://www.codesandciphers.co.uk/enigma/index.htm
[Technical Details of the Enigma Machine]: https://web.archive.org/web/20200710094303/http://users.telenet.be/d.rijmenants/en/enigmatech.htm
[The German Enigma Cipher Machine]: https://web.archive.org/web/20200710094243/http://users.telenet.be/d.rijmenants/en/enigma.htm
+16 -14
View File
@@ -563,18 +563,20 @@ With my entry we can complete the loop!</p>
</div>
<p>The author <a href="../../authors.html#Nathan_Sidwell">Nathan Sidwell</a> of the <a href="../../1992/nathan/index.html">1992 Worst
Abuse of the Rules</a> had this to say about his program:</p>
<pre><code> This program is a hello world text encrypter/decrypter. It uses an
[enigma](https://www.cryptomuseum.com/crypto/enigma/index.htm) (I think) style
encryption algorithm, where the encryption key character is modified by a value,
determined from the previous character. Non-printable characters (those with
ASCII values `&lt; &#39; &#39;` or `&gt; 0x7e`) are passed unaltered, thus any kind of file
may be successfully processed, but if the original is printable, the processed
file will be too. The input is read from stdin, and the output presented to
stdout. The key, a text string, is presented as a command argument. This is
optional, and if omitted, the file is self-{de,en}crypted. To specify
decryption, a `-` should be given before the key. (Actually encryption and
decryption proper inverse operations, so you can use decrypt to scramble and
encrypt to descramble, if you&#39;re perverse.)</code></pre>
<blockquote>
<p>This program is a hello world text encrypter/decrypter. It uses an
<a href="https://www.cryptomuseum.com/crypto/enigma/index.htm">enigma</a> (I think) style
encryption algorithm, where the encryption key character is modified by a value,
determined from the previous character. Non-printable characters (those with
ASCII values <code>&lt; ' '</code> or <code>&gt; 0x7e</code>) are passed unaltered, thus any kind of file
may be successfully processed, but if the original is printable, the processed
file will be too. The input is read from stdin, and the output presented to
stdout. The key, a text string, is presented as a command argument. This is
optional, and if omitted, the file is self-{de,en}crypted. To specify
decryption, a <code>-</code> should be given before the key. (Actually encryption and
decryption proper inverse operations, so you can use decrypt to scramble and
encrypt to descramble, if you’re perverse.)</p>
</blockquote>
<p>But the Enigma algorithm is more complex than that and my entry can encipher
(and by extension decipher) text in the manner of the Enigma machines of the
<a href="https://en.wikipedia.org/wiki/German_Army_(1935%E2%80%931945)">Heer</a> (army) and <a href="https://en.wikipedia.org/wiki/Luftwaffe">Luftwaffe</a> (air
@@ -810,10 +812,10 @@ has some of the ways I think this entry is obfuscated. To decipher try:</p>
<pre><code> ./recode -Robfuscation.key -fobfuscation.txt | ./prog - 2&gt;/dev/null &gt; obfuscation.md</code></pre>
<p>To encipher:</p>
<pre><code> ./recode -Robfuscation.key -fobfuscation.md | ./prog - 2&gt;/dev/null &gt; obfuscation.txt</code></pre>
<p>The file <a href="obfuscation.key">obfuscation.key</a> is the key to decipher/encipher
<p>The file <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/obfuscation.key">obfuscation.key</a> is the key to decipher/encipher
<a href="obfuscation.txt">obfuscation.txt</a>.</p>
<p>For the lazy <a href="obfuscation.html">obfuscation.html</a> has the deciphered version.</p>
<p>As for the <a href="obfuscation.key">obfuscation.key</a> file if you observe the contents you’ll find the
<p>As for the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/obfuscation.key">obfuscation.key</a> file if you observe the contents you’ll find the
word <code>OBFUSCATION</code>:</p>
<pre><code> 2OB5FU1SC2ATIONCDEFGHJKLMPQRYZ
OB FU SC ATION</code></pre>
+1 -1
View File
@@ -45,7 +45,7 @@ It is interesting how well smeonoe can raed txet wtih lots of tyops in it.
How well can you raed porg.c, C prgoarm that is in the shpae of an SD card (or
is it a pnuch crad)?
BTW: this funny reading of English (which also works with several other
**BTW**: this funny reading of English (which also works with several other
languages) is called
[typoglycemia](https://www.mrc-cbu.cam.ac.uk/personal/matt.davis/Cmabrigde/)
(the article however is incorrect in stating that if the letters were more
+1 -1
View File
@@ -426,7 +426,7 @@ code</a> below.</p>
<p>It is interesting how well smeonoe can raed txet wtih lots of tyops in it.
How well can you raed porg.c, C prgoarm that is in the shpae of an SD card (or
is it a pnuch crad)?</p>
<p>BTW: this funny reading of English (which also works with several other
<p><strong>BTW</strong>: this funny reading of English (which also works with several other
languages) is called
<a href="https://www.mrc-cbu.cam.ac.uk/personal/matt.davis/Cmabrigde/">typoglycemia</a>
(the article however is incorrect in stating that if the letters were more
+22 -23
View File
@@ -21,11 +21,10 @@ context length decreases:
./try.sh
```
```
Performance depends on the number of same hashes found.
Too many identical strings if the context length is small.
-- Author
```
> Performance depends on the number of same hashes found. Too many identical
strings if the context length is small.
>
> -- Author
## Judges' remarks:
@@ -38,30 +37,30 @@ The author wrote in reply:
<hr style="width:10%;text-align:left;margin-left:0">
Wow, amazing! Very fast, but there is a drawback to randomness.
If some string only appears after half the input, the first instance
of this string will have a 50% chance of occurrence.
Example:
```
echo "00000000000000000000 01 02 02 02 02 02 02" > test.txt
./prog test.txt 1000 2 123
# more twos in output
./rand test.txt 1000 2 123
# more ones in output
```
```
But this will happen very rarely on real data.
-- Author
```
> Wow, amazing! Very fast, but there is a drawback to randomness.
> If some string only appears after half the input, the first instance
> of this string will have a 50% chance of occurrence.
> Example:
>
> `echo "00000000000000000000 01 02 02 02 02 02 02" > test.txt`
>
> `./prog test.txt 1000 2 123`
>
> `# more twos in output`
>
> `./rand test.txt 1000 2 123`
>
> `# more ones in output`
>
> But this will happen very rarely on real data.
> -- Author
<hr style="width:10%;text-align:left;margin-left:0">
Try using the same random seed and varying the context size.
BTW: what on Middle-earth is `lámatyávë`? It's Quenya, one of the languages of
**BTW**: what on Middle-earth is `lámatyávë`? It's Quenya, one of the languages of
the Elves in Tolkien's Legendarium. It means sound taste (plural is `lámatyáver`)
and it refers to phonaesthesia - in other words, it refers to the pleasure of
sound and form of words. It's discussed in [Morgoth's
+15 -11
View File
@@ -416,29 +416,33 @@ Location: <a href="../../location.html#RU">RU</a> - <em>Russian Federation</em>
<p>When running this, ask yourself why it gets progressively slower when the
context length decreases:</p>
<pre><code> ./try.sh</code></pre>
<pre><code> Performance depends on the number of same hashes found.
Too many identical strings if the context length is small.
-- Author</code></pre>
<blockquote>
<p>Performance depends on the number of same hashes found. Too many identical
strings if the context length is small.</p>
<p>– Author</p>
</blockquote>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>We were able to <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/kurdyukov4/rand.c">write our own program</a> performing the same trick using
the (still non-standard, for some reason) library function <code>memmem()</code>, but that
way it works too fast regardless of the context length, and it’s much less fun.</p>
<p>The author wrote in reply:</p>
<hr style="width:10%;text-align:left;margin-left:0">
<blockquote>
<p>Wow, amazing! Very fast, but there is a drawback to randomness.
If some string only appears after half the input, the first instance
of this string will have a 50% chance of occurrence.
Example:</p>
<pre><code> echo &quot;00000000000000000000 01 02 02 02 02 02 02&quot; &gt; test.txt
./prog test.txt 1000 2 123
# more twos in output
./rand test.txt 1000 2 123
# more ones in output</code></pre>
<pre><code> But this will happen very rarely on real data.
-- Author</code></pre>
<p><code>echo "00000000000000000000 01 02 02 02 02 02 02" &gt; test.txt</code></p>
<p><code>./prog test.txt 1000 2 123</code></p>
<p><code># more twos in output</code></p>
<p><code>./rand test.txt 1000 2 123</code></p>
<p><code># more ones in output</code></p>
<p>But this will happen very rarely on real data.
– Author</p>
</blockquote>
<hr style="width:10%;text-align:left;margin-left:0">
<p>Try using the same random seed and varying the context size.</p>
<p>BTW: what on Middle-earth is <code>lámatyávë</code>? It’s Quenya, one of the languages of
<p><strong>BTW</strong>: what on Middle-earth is <code>lámatyávë</code>? It’s Quenya, one of the languages of
the Elves in Tolkien’s Legendarium. It means sound taste (plural is <code>lámatyáver</code>)
and it refers to phonaesthesia - in other words, it refers to the pleasure of
sound and form of words. It’s discussed in <a href="https://en.wikipedia.org/wiki/Morgoth%27s_Ring">Morgoth’s