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

+1 -1
View File
@@ -67,7 +67,7 @@
},
{
"file_path" : "1998_schweikh1.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+12 -11
View File
@@ -88,6 +88,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>
@@ -141,13 +142,13 @@ 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>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<pre><code> make all</code></pre>
<p>There is an alternate version of this entry that will work with macOS. See the
<a href="#alternate-code">Alternate code</a> section below. We recommend you look at it
even if you don’t have a Mac, unless you want to figure it out yourself, as it
includes some interesting details about the entry.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./schweikh1</code></pre>
<pre><code> ./schweikh1</code></pre>
<h2 id="alternate-code">Alternate code:</h2>
<p>As noted above this entry will not work as it stands for macOS and there are
some important notes as well as a description of how the fixed version works
@@ -157,7 +158,7 @@ adjustments). For details of what had to change, see <a href="macos.html">macos.
Unless you wish to figure it out yourself, we recommend that you read this even
if you don’t have a Mac as it has some interesting details about the entry.</p>
<h3 id="alternate-build">Alternate build:</h3>
<pre class="&lt;!---sh--&gt;"><code> make alt</code></pre>
<pre><code> make alt</code></pre>
<h3 id="alternate-build-1">Alternate build:</h3>
<p>Use <code>schweikh1.alt</code> as you would <code>schweikh1</code> above.</p>
<h3 id="alternate-try">Alternate try:</h3>
@@ -220,7 +221,7 @@ macros are explicitly enumerated. In a compliant implementation no other
macros can be defined, because you could write strictly conforming
programs that may fail to compile due to syntax errors: supposing that
<code>&lt;stdio.h&gt;</code> defines <code>PIPE_BUF</code>, then the conforming</p>
<pre class="&lt;!---c--&gt;"><code> #include &lt;assert.h&gt;
<pre><code> #include &lt;assert.h&gt;
#include &lt;stdio.h&gt; /* &lt;- or where the bogus macro is defined */
#include &lt;string.h&gt;
#define STR(x) #x
@@ -243,12 +244,12 @@ C compilers.</p>
must resemble one of the canonical forms, <code>"foo.h"</code> or <code>&lt;bar.h&gt;</code>.
This lets us write things like</li>
</ol>
<pre class="&lt;!---c--&gt;"><code> #define HEADER &quot;foo.h&quot;
<pre><code> #define HEADER &quot;foo.h&quot;
#include HEADER</code></pre>
<p>I could not find a compiler rejecting this. However, if we’re
torturing the preprocessor a little more, by using token pasting,
at least one compiler falls over.</p>
<pre class="&lt;!---c--&gt;"><code> #define H(x) &lt;st##x##.h&gt;
<pre><code> #define H(x) &lt;st##x##.h&gt;
#include H(dio) /* expands to &lt;stdio.h&gt; */</code></pre>
<p>is rejected by tcc version 4.1.2, the TenDRA compiler:
<code>"t.c", line 3: Error:\ [ISO 6.8.3.3]: Invalid result for '##' operator in macro 'H'.</code></p>
@@ -264,7 +265,7 @@ allows: in <code>#line num "file"</code> the <code>"file"</code> is an s-char-se
ISO 6.8.4. ISO 6.1.4 defines string literals as s-char-sequences,
which may include octal escape sequences. Let’s look at</li>
</ol>
<pre class="&lt;!---c--&gt;"><code> #include &lt;stdio.h&gt;
<pre><code> #include &lt;stdio.h&gt;
#line 42 &quot;foo\0bar&quot;
int main (void) {
printf (&quot;%s %d\n&quot;, __FILE__, (int)sizeof __FILE__);
@@ -283,7 +284,7 @@ ISO 6.6.4.2. Then make fun of the guru’s answer by waving <code>case __LINE__:
under his/her nose. Easy money from a bet! Make sure your guru has
no chance to use Standardese weasel words as an escape: can I have</p></li>
</ol>
<pre class="&lt;!---c--&gt;"><code> case &lt;some_token&gt;:
<pre><code> case &lt;some_token&gt;:
case &lt;some_token&gt;:</code></pre>
<p>in the same switch? (Note that you need the [invisible] newline. You
can generously allow the additional constraint that no <code>#undef</code>s or
@@ -315,14 +316,14 @@ I could have used a lot more <code>^K</code> and <code>^L</code> probably undete
counter but decided to err on the side of safety. I use a perl
script to compute the character count according to the rules.
The advantages of an independent clean room approach…</p>
<pre class="&lt;!---perl--&gt;"><code> #!/usr/bin/perl -w
<pre><code> #!/usr/bin/perl -w
$/ = &quot;\0&quot;;
$_ = &lt;&gt;;
s/[;{}][ \t\n]/\n/g;
s/[ \t\n]+//g;
print length ($_),&quot;\n&quot;;</code></pre>
<p>To use, try:</p>
<pre class="&lt;!---sh--&gt;"><code> perl ./charcount.pl schweikh1.c</code></pre>
<pre><code> perl ./charcount.pl schweikh1.c</code></pre>
<p>I have tried, as suggested in the guidelines, to let the code look
like ordinary C code. Apart from a few long lines I think I left
the indentation like I would in RL. You should however not try to
@@ -364,10 +365,10 @@ That describes exactly my modest attempts…</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/charcount.pl">charcount.pl</a> - character counter</li>
<li><a href="macos.html">macos.html</a> - work with macOS</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/info">info</a> - standards compliance</li>
<li><a href="1998_schweikh1.tar.bz2">1998_schweikh1.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="1998_schweikh1.tar.bz2">1998_schweikh1.tar.bz2</a> - download entry tarball</li>
<li><a href="index.html">index.html</a> - this web page</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/README.md">README.md</a> - markdown source for this web page</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/.entry.json">.entry.json</a> - description of entry in JSON</li>
+3 -2
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>
@@ -138,7 +139,7 @@ a file was not found (this limitation was removed in both versions in 2023). see
<p>However, as noted, macOS does <strong>not</strong> have <code>/usr/include</code> so this would never
work for macOS without some changes, described next. For macOS you will need the
command line tools installed which can be done like:</p>
<pre class="&lt;!---sh--&gt;"><code> sudo xcode-select --install</code></pre>
<pre><code> sudo xcode-select --install</code></pre>
<p>An important point is that the original version hard-coded <code>gcc</code> but just like
the entry, the alternate version has also removed this limitation despite <code>gcc</code>
existing (though it’s <code>clang</code>) in macOS.</p>
@@ -154,7 +155,7 @@ the command is:</p>
<p>which has been changed to be:</p>
<pre><code>&quot;0cc -ansi -E -dM -undef %s /usr/include/%s&gt;r\0 (&quot;</code></pre>
<p>Shortly below that you will see, as noted above, the numbers:</p>
<pre class="&lt;!---c--&gt;"><code> if ((H = fopen (__FILE__+43, 43+__FILE__)))
<pre><code> if ((H = fopen (__FILE__+43, 43+__FILE__)))
while ((fgets (L, (int)sizeof L, H)) != 0) {
I[strcspn (I, 45+__FILE__)] = O = 0;</code></pre>
<p>The first number in the above C means the length starting from 0 up through the