add rules, guidelines, fix HTML code, move compressed tarball in inventory

By changing the _inventory_order_ of the compressed tarball from
**100000** to **1415926535**, the compressed tarball will land at
the top of the secondary file list and remain still easy to find.

Updated the `manifest.numbers` spreadsheet and rebuilt
the `.entry.json` files.

Added `next/` directory to hold the next IOCCC rules and guidelines.
Added `next/README.md` that `bin/gen-top-html.sh` uses to form
the `next/index.html` file.

Added _Rules and Guidelines_ link to the sidenav bar to link to the
`next/index.html` file.

Added _IOCCC Rules_ as `next/rules.md` that `bin/gen-top-html.sh`
uses to form the `next/rules.html` file.

Added _IOCCC Guidelines_ as `next/guidelines.md` that `bin/gen-top-html.sh`
uses to form the `next/guidelines.html` file.

Changed `bin/gen-top-html.sh` VERSION from "1.2.4 2024-04-13"
to "1.3 2024-04-14".

Prevent `pandoc(1)` from interpreting the commented out language
of a markdown code block as a code class.  So a markdown such as:

````
``` <!---sh-->
...
```
````

that produced HTML of the form:

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

will now produce HTML of the form:

```html
<pre><code>...</code></pre>
```

NOTE: Before when the language of a markdown code block
was not commented, the HTML produced by `pandoc(1)` was
oddly indented with extra whitespace on the first line
of the code block.  While commenting out the language
of the code block removed some of the odd intending,
it left a weird class in the HTML pre block that
surrounded the HTML code block.  This hack prevents
`pandoc(1)` from assigning a class to the HTML pre block.

Changed `in/md2html.sh` VERSION from "1.2.1 2024-04-13"
to "1.3 2024-04-14".

Added `make gen_sitemap` to end of both `make www` and `make
quick_www` in top level Makefile.

Ram `make www` to test under macOS and to perform the above.

**IMPORTANT NOTE**: The current `next/rules.md` and `next/guidelines.md`
are simply the 2020 IOCCC Rules and Guidelines converted into
markdown form.  There are **NOT** the Rules and Guidelines that
will be used the IOCCC MOCK, nor the next IOCCC.

TODO: Improve the `bin/gen-status.sh` tool to modify the top of the
      `next/rules.md` and `next/guidelines.md` files to keep them
      in sync with the _contest_status_ as found in `status.json`.

TODO: Improve the look and feel of the `next/rules.md` and
      `next/guidelines.md` markdown files.
This commit is contained in:
Landon Curt Noll committed 2024-04-14 16:54:24 -07:00
1 parent a672335d2d
commit 518a6336d0
734 files changed
+7919 -4119

No files matched your search

+13 -12
View File
@@ -83,6 +83,7 @@
<div class="sidenav">
<a href="../../news.html">IOCCC News</a>
<a href="../../status.html">Contest status</a>
<a href="../../next/index.html">Rules and Guidelines</a>
<a href="../../faq.html#submit">How to enter the IOCCC</a>
<a href="../../faq.html">FAQ</a>
</div>
@@ -140,9 +141,9 @@ there is an aesthetic appeal to my eyes too).</p></li>
Y&lt;:19:&gt;&lt;:27:&gt; but it’s not the only example. Here the compound literal of 13
ints:</p></li>
</ul>
<pre class="&lt;!---c--&gt;"><code> int *z=(int[13]) { 0 } , *e, *g;</code></pre>
<pre><code> int *z=(int[13]) { 0 } , *e, *g;</code></pre>
<p>Then in main:</p>
<pre class="&lt;!---c--&gt;"><code> e = z + 10;
<pre><code> e = z + 10;
g = e + 1;
for (j=-3; j &lt; 0; ++j)
@@ -152,12 +153,12 @@ expect to start out with index &lt; 0 but to then compare that that index &lt; 0
and increment until 0 along with setting the value of the array to j + 3 is
more confusing still. There are at least two other ways that are much easier
to read that could accomplish the same thing. It continues on:</p>
<pre class="&lt;!---c--&gt;"><code> /* ... */
<pre><code> /* ... */
e&lt;:i-3:&gt; = (j &lt; 1 ? 1 : (j &gt; 5 ? 5 : j))-1;</code></pre>
<ul>
<li>Observe these two functions:</li>
</ul>
<pre class="&lt;!---c--&gt;"><code> void w(char *s, int k, int v)
<pre><code> void w(char *s, int k, int v)
{
for(e&lt;:2:&gt; = 0; s&lt;:*P:&gt;; ++e&lt;:2:&gt;)
{
@@ -200,7 +201,7 @@ temporary variable instead of a regular int in the function (so make it global);
and (2) I didn’t want to risk changing all the offsets: thus I just made that
address <code>e[1]</code>. Thus I also have:</li>
</ul>
<pre class="&lt;!---c--&gt;"><code> for (*g = 0 ; *g &lt; 10; ++*g)
<pre><code> for (*g = 0 ; *g &lt; 10; ++*g)
{
r&lt;:-2:&gt; = Y&lt;:14:&gt;&lt;:*(e+1):&gt;; r&lt;:-3:&gt; = Y&lt;:15:&gt;&lt;:1&lt;:e:&gt;:&gt;;
if (r&lt;:-3:&gt; &amp;&amp; r&lt;:-2:&gt; == r&lt;:-1:&gt;)
@@ -218,7 +219,7 @@ which I use as the two chars to compare (this is the plugboard function).</p>
<li>The above function Z() takes a <code>char x</code> but you won’t notice it being used
at all. Why? In fact I call it like so:</li>
</ul>
<pre class="&lt;!---c--&gt;"><code> k = Z(r&lt;:-1:&gt;=k);</code></pre>
<pre><code> k = Z(r&lt;:-1:&gt;=k);</code></pre>
<p>The char is just used as a way to be able to call the function and assign to
the proper variable at the same time: in the function Z I don’t care about x
because it’s the same value as r[-1] (which I do care about). Why is it
@@ -230,7 +231,7 @@ again negative offsets to cause more confusion.</p>
refer to the same variable in more than one way (or in some cases maybe more
correct to say ‘same location’). In the Z() function for example:</li>
</ul>
<pre class="&lt;!---c--&gt;"><code> r&lt;:-2:&gt; = Y&lt;:14:&gt;&lt;:*(e+1):&gt;; r&lt;:-3:&gt; = Y&lt;:15:&gt;&lt;:1&lt;:e:&gt;:&gt;;</code></pre>
<pre><code> r&lt;:-2:&gt; = Y&lt;:14:&gt;&lt;:*(e+1):&gt;; r&lt;:-3:&gt; = Y&lt;:15:&gt;&lt;:1&lt;:e:&gt;:&gt;;</code></pre>
<p>I refer to e[1] as both: *(e+1) and 1[e].</p>
<ul>
<li><p>Replacing a number of <code>if ..</code>s with <code>... &amp;&amp; (...)</code>s (in one case at least
@@ -245,7 +246,7 @@ index (sort of).</p></li>
<li><p>Another set of char arrays in one: the five rotors as well as the two
reflectors in one <code>char [][27]</code>. This makes for some fun code like:</p></li>
</ul>
<pre class="&lt;!---c--&gt;"><code> (Y&lt;:e&lt;:-10:&gt;+5:&gt;&lt;:k-&#39;A&#39;:&gt;) &amp;&amp; (k = Y&lt;:e&lt;:-10:&gt;+5:&gt;&lt;:k-&#39;A&#39;:&gt;);</code></pre>
<pre><code> (Y&lt;:e&lt;:-10:&gt;+5:&gt;&lt;:k-&#39;A&#39;:&gt;) &amp;&amp; (k = Y&lt;:e&lt;:-10:&gt;+5:&gt;&lt;:k-&#39;A&#39;:&gt;);</code></pre>
<p>(Of course this also removes an if statement by joining with a &amp;&amp;).</p>
<ul>
<li><p>In fact I decided that the above two arrays in arrays needed to be merged
@@ -275,18 +276,18 @@ enough because as they rightly point out they can just use the C preprocessor
itself. But although I have quite a few cpp directives I am not using them for
obfuscation but rather to save bytes. For examples:</p></li>
</ul>
<pre class="&lt;!---c--&gt;"><code> %:define J(x) do(*x)=getchar(); while((*x)==&#39;\n&#39;)</code></pre>
<pre><code> %:define J(x) do(*x)=getchar(); while((*x)==&#39;\n&#39;)</code></pre>
<p>Is used quite a number of times and although it could be a function that
takes a pointer to an int it was more convenient this way (I believe it used
more bytes but I no longer know that). There are many others and they all
save bytes (or at least most of them do if not all). There is one in
particular I want to bring up though because I think it’s a curious one and
it ties in to another point above:</p>
<pre class="&lt;!---c--&gt;"><code> %:define A(y) *(&amp;Y&lt;:7:&gt;&lt;:1:&gt;+(y))</code></pre>
<pre><code> %:define A(y) *(&amp;Y&lt;:7:&gt;&lt;:1:&gt;+(y))</code></pre>
<p>What is special about this one: Above I noted how I sort of refer directly
to the notch settings (I think it was the notch settings anyway). Now I
could have done say</p>
<pre class="&lt;!---c--&gt;"><code> char a = Y[7][1], b = Y[7][3], c = Y[7][5];</code></pre>
<pre><code> char a = Y[7][1], b = Y[7][3], c = Y[7][5];</code></pre>
<p>But I felt that doing instead the pointer arithmetic was worth doing.
However it used significantly more bytes even as a macro: 17 if I recall
right. That’s with the macro. If I were to include it three times by itself
@@ -314,7 +315,7 @@ differently (and separated) so that one cannot easily replace the <code>char</co
variables in recode.c, move them to prog.c, compile and expect it to work right.</p></li>
<li><p>Also what is this about ?</p></li>
</ul>
<pre class="&lt;!---c--&gt;"><code> /\
<pre><code> /\
/ This is *not* what you think:
void D(char*x){ /* ... */ }</code></pre>
<p>Is that valid and if so how does it function? Yes it’s valid but I’ll leave