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
@@ -91,7 +91,7 @@
},
{
"file_path" : "2019_adamovsky.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+9 -8
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,15 +142,15 @@ Location: <a href="../../location.html#CZ">CZ</a> - <em>Czech Republic</em> (<em
<!-- 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</code></pre>
<pre><code> make</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2019_adamovsky">2019 adamovsky bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog file.unl</code></pre>
<pre><code> ./prog file.unl</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Even after pre-processing and indenting, the C code of this entry it
is about as understandable as the Unlambda code.</p>
@@ -159,7 +160,7 @@ bytes which crashed it:</p>
<pre><code> ````.0`.0`.0`c.0``sssss</code></pre>
<p>Functional programming is not a panacea against core dumps, after all.</p>
<p>This can be demonstrated by:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog crash.unl</code></pre>
<pre><code> ./prog crash.unl</code></pre>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="a-highly-structured-state-state-machine">A highly structured state state machine</h3>
<h3 id="purpose">Purpose:</h3>
@@ -181,11 +182,11 @@ actually a <code>one-liner</code>. It certainly was for me. I like to think the
by the sheer length of the dividing line and totally overlooks the rest of the program.</p>
<h3 id="usage">Usage:</h3>
<p>When built directly using</p>
<pre class="&lt;!---sh--&gt;"><code> make</code></pre>
<pre><code> make</code></pre>
<p>the program (<code>prog</code>) accepts a single parameter with the name of an Unlambda program. You can
download the <a href="https://github.com/irori/advent-unlambda" title="Adventure">Colossal Cave Adventure</a> (the <a href="advent.unl">advent.unl</a> file)
and run it like this:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog advent.unl</code></pre>
<pre><code> ./prog advent.unl</code></pre>
<blockquote>
<p>NOTE: the file was added to the entry so there is no need to download it.</p>
</blockquote>
@@ -194,7 +195,7 @@ and run it like this:</p>
entries from <a href="http://www.madore.org/~david/programs/unlambda/#quine" title="Unlambda quine contest">quine contest</a>.</p>
<p>There is an alternative build path that requires the 2018 IOCCC size tool to complete. Put the tool
source <a href="iocccsize_2018.c">iocccsize_2018.c</a> in the project directory and call</p>
<pre class="&lt;!---sh--&gt;"><code> make identify</code></pre>
<pre><code> make identify</code></pre>
<p>It will build the tool and use it to build an alternative program <code>prog2</code>, which in turn will
produce an Unlambda program <code>identify.unl</code>. <code>make identify</code> runs this program to identify
itself.</p>
@@ -366,10 +367,10 @@ be applied.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/adamovsky/progSpoiler.c">progSpoiler.c</a> - SPOILER WARNING</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/adamovsky/sierpinski.unl">sierpinski.unl</a> - unlambda code</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/adamovsky/spam.unl">spam.unl</a> - unlambda code</li>
<li><a href="2019_adamovsky.tar.bz2">2019_adamovsky.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_adamovsky.tar.bz2">2019_adamovsky.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/2019/adamovsky/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/2019/adamovsky/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -75,7 +75,7 @@
},
{
"file_path" : "2019_burton.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+8 -7
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,17 +142,17 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- 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</code></pre>
<pre><code> make</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2019_burton">2019 burton bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog &lt; file
<pre><code> ./prog &lt; file
./cow file</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>A tiny, but punctually correct way of POSIX counting for text files. This one
line, one word, 127 character beauty continues to expand the number of classic
@@ -163,14 +164,14 @@ interesting.</p>
<p>Feed it anything on <code>stdin</code>.
The output should look familiar.</p>
<p>Compiles cleanly with:</p>
<pre class="&lt;!---sh--&gt;"><code> WARN=&quot;-Wno-implicit-int -Wno-missing-variable-declarations -Wno-parentheses&quot;
<pre><code> WARN=&quot;-Wno-implicit-int -Wno-missing-variable-declarations -Wno-parentheses&quot;
cc -Wall -Wextra -Weverything -pedantic $WARN -include stdio.h -o prog prog.c</code></pre>
<h3 id="description">Description:</h3>
<p>Included is a test script, useful for the corner cases. As in all good Unix
programs, it is silent upon success; any output demonstrates an error. Instead
of checking correctness, the <a href="check.sh">check.sh</a> script can simply output the
results: (The Makefile contains the spoiler):</p>
<pre class="&lt;!---sh--&gt;"><code> out=cat ./check.sh ./prog</code></pre>
<pre><code> out=cat ./check.sh ./prog</code></pre>
<p>Interestingly, and a spoiler here: macOS and FreeBSD implement the common
utility “correctly”. CentOS and Ubuntu both share a “flawed” utility that
changes output format based upon input redirection or pipeline(!). As well, the
@@ -189,7 +190,7 @@ All your base belong to us, but the constants seem a bit … off?</p>
<p>The script <a href="cow.sh">cow.sh</a> provides a closer analog, and perhaps a more useful
interface.</p>
<p>Included is a version without compilation warnings:</p>
<pre class="&lt;!---sh--&gt;"><code> cc -Wall -Wextra -Weverything -pedantic -include stdio.h -o prog.clean prog.clean.c</code></pre>
<pre><code> cc -Wall -Wextra -Weverything -pedantic -include stdio.h -o prog.clean prog.clean.c</code></pre>
<h3 id="bugs">Bugs</h3>
<p>The flags are not supported. Although they could easily be added into <code>cow.sh</code>.
This exercise left to the reader.</p>
@@ -224,10 +225,10 @@ This exercise left to the reader.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/burton/on.one.liners.txt">on.one.liners.txt</a> - on writing an IOCCC one-liner</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/burton/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/burton/prog.clean.c">prog.clean.c</a> - version of source without compilation warnings</li>
<li><a href="2019_burton.tar.bz2">2019_burton.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_burton.tar.bz2">2019_burton.tar.bz2</a> - download entry tarball</li>
<li><a href="index.html">index.html</a> - this web page</li>
<li><a href="256">256</a> - test suite data</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/burton/README.md">README.md</a> - markdown source for this web page</li>
+1 -1
View File
@@ -179,7 +179,7 @@
},
{
"file_path" : "2019_ciura.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+8 -7
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,7 +142,7 @@ Location: <a href="../../location.html#PL">PL</a> - <em>Republic of Poland</em>
<!-- 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</code></pre>
<pre><code> make</code></pre>
<p>There is an alternate version available. See <a href="#alternate-code">Alternate code</a>
below.</p>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
@@ -149,18 +150,18 @@ below.</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2019_ciura">2019 ciura bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./getwords.sh en | grep .. | ./prog string</code></pre>
<pre><code> ./getwords.sh en | grep .. | ./prog string</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<h2 id="alternate-code">Alternate code:</h2>
<p>There is an alternate version of this code that flushes <code>stdout</code> after writing a
newline. See the Author’s remarks for more information.</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-use">Alternate use:</h3>
<p>Use <code>prog.alt</code> as you would <code>prog</code> above.</p>
<h3 id="alternate-try">Alternate try:</h3>
<pre class="&lt;!---sh--&gt;"><code> ./try.alt.sh</code></pre>
<pre><code> ./try.alt.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>A few letters, one at a time, with no repeats. How many different ways can this
be done?</p>
@@ -176,7 +177,7 @@ written with an alphabet and outputs perfect pangrams composed of these
words. A perfect pangram is a series of words that contains every letter
of the alphabet exactly once.</p>
<h4 id="example-execution">Example execution:</h4>
<pre class="&lt;!---sh--&gt;"><code> $ grep .. /usr/share/dict/words | ./prog abcdefghijklmnopqrstuvwxyz
<pre><code> $ grep .. /usr/share/dict/words | ./prog abcdefghijklmnopqrstuvwxyz
qualm fjord wiz pyx vs beg kc nth
quartz jinx vs fed kc womb glyph
quid jamb fez vs pyx kc growl nth
@@ -313,10 +314,10 @@ compilation with <code>gcc -std=c90</code>, add <code>-Wno-format</code> to
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/ciura/pl.sh">pl.sh</a> - run with Polish data</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/ciura/ru.sh">ru.sh</a> - run with Russian data</li>
<li><a href="fasc5c.pdf">fasc5c.pdf</a> - The Art of Computer Programming vol 4 draft</li>
<li><a href="2019_ciura.tar.bz2">2019_ciura.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_ciura.tar.bz2">2019_ciura.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/2019/ciura/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/2019/ciura/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -59,7 +59,7 @@
},
{
"file_path" : "2019_diels-grabsch1.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+8 -7
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,11 +142,11 @@ 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</code></pre>
<pre><code> make</code></pre>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog &lt; file &gt; file.Z</code></pre>
<pre><code> ./prog &lt; file &gt; file.Z</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Finally, IOCCC now has its own text compression program, and it is short enough
to qualify for the Best Short Program award! That said, can you compress it down
@@ -157,11 +158,11 @@ compresses differently? The judges know. :)</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="a-tiny-compress-tool">A tiny “compress” tool:</h3>
<h4 id="usage">Usage:</h4>
<pre class="&lt;!---sh--&gt;"><code> ./prog &lt; input.txt &gt; input.txt.Z</code></pre>
<pre><code> ./prog &lt; input.txt &gt; input.txt.Z</code></pre>
<h4 id="example">Example:</h4>
<pre class="&lt;!---sh--&gt;"><code> ./prog &lt; guidelines.txt &gt; guidelines.txt.Z</code></pre>
<pre><code> ./prog &lt; guidelines.txt &gt; guidelines.txt.Z</code></pre>
<h4 id="check-for-correctness">Check for correctness:</h4>
<pre class="&lt;!---sh--&gt;"><code> zcat guidelines.txt.Z &gt; guidelines2.txt
<pre><code> zcat guidelines.txt.Z &gt; guidelines2.txt
diff -s guidelines.txt guidelines2.txt</code></pre>
<p>Of course you can also use <a href="../../2015/mills2/mills2.c">2015/mills2</a> instead of
<code>zcat</code> to verify the output file. The achieved compression ratio roughly matches
@@ -203,10 +204,10 @@ goes.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/diels-grabsch1/guidelines.txt">guidelines.txt</a> - input data from 2018 IOCCC guidelines</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/diels-grabsch1/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/diels-grabsch1/Shakespeare.txt">Shakespeare.txt</a> - Coriolanus by Shakespeare</li>
<li><a href="2019_diels-grabsch1.tar.bz2">2019_diels-grabsch1.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_diels-grabsch1.tar.bz2">2019_diels-grabsch1.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/2019/diels-grabsch1/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/2019/diels-grabsch1/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -43,7 +43,7 @@
},
{
"file_path" : "2019_diels-grabsch2.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+6 -5
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,11 +142,11 @@ 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</code></pre>
<pre><code> make</code></pre>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog</code></pre>
<pre><code> ./prog</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Before running this one, stay calm. Chill out, have a cup of tea. Is this bad?</p>
<p>To understand what is going on here, please check if you are dreaming, or are you dreaming
@@ -153,7 +154,7 @@ that you are dreaming? Or is it, wake up from the simulation?</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="almost-a-hash-collision">Almost a hash collision:</h3>
<p>This program prints its own SHA-512 hash. To verify, run:</p>
<pre class="&lt;!---sh--&gt;"><code> $ sha512sum prog.c; ./prog
<pre><code> $ sha512sum prog.c; ./prog
43bd0c4381a5078d2850fca9ae5e0647596bcc03cd67d8d973ad02ff35c316c728e7b347ca70abe6c74e745e63646cc7643cb0cffcd3d9a969cbf31a7ce5bf68 prog.c
43bd0c4381a5078d2850fca9ae5e0647596bcc03cd67d8d973ad02ff35c316c728e7b347ca70abe6c74e745e63646cc7643cb0cffcd3d9a969cbf31a7ce5bf68</code></pre>
<p>It started as a complicated “hello world” program that prints some random hex
@@ -304,10 +305,10 @@ doesn’t have to mean anything.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/diels-grabsch2/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/diels-grabsch2/prog.orig.c">prog.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/diels-grabsch2/try.sh">try.sh</a> - how to run</li>
<li><a href="2019_diels-grabsch2.tar.bz2">2019_diels-grabsch2.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_diels-grabsch2.tar.bz2">2019_diels-grabsch2.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/2019/diels-grabsch2/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/2019/diels-grabsch2/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -147,7 +147,7 @@
},
{
"file_path" : "2019_dogon.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+6 -5
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,15 +142,15 @@ Location: <a href="../../location.html#IL">IL</a> - <em>State of Israel</em> (<e
<!-- 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</code></pre>
<pre><code> make</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code> STATUS: uses gets() - change to fgets() if possible</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2019_dogon">2019 dogon bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog &lt; pattern.mc</code></pre>
<pre><code> ./prog &lt; pattern.mc</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<p>Make sure that you keep focus of windows in mind when going back and forth to
the program and the script.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
@@ -321,7 +322,7 @@ master, who reviewed some earlier versions of the entry and freely shared some
of his vast knowledge regarding GOL programming and hashlife. As a free bonus,
Tom has allowed me to show his code which is probably the most efficient yet
most obfuscated way of calculating the GOL function on a 64 bits <code>8*8</code> leaf:</p>
<pre class="&lt;!---c--&gt;"><code> unsigned long life8x8(long a) { unsigned long aw = a &lt;&lt; 1, ae = a &gt;&gt; 1, s0 = aw
<pre><code> unsigned long life8x8(long a) { unsigned long aw = a &lt;&lt; 1, ae = a &gt;&gt; 1, s0 = aw
^ ae, s1 = aw &amp; ae, hs0 = s0 ^ a, hs1 = (s0 &amp; a) | s1, hs0w8 = hs0 &gt;&gt; 8, hs0e8 =
hs0 &lt;&lt; 8, hs1w8 = hs1 &gt;&gt; 8, hs1e8 = hs1 &lt;&lt; 8, ts0 = hs0w8 ^ hs0e8, ts1 = (hs0w8
&amp; hs0e8) | (ts0 &amp; s0); return (hs1w8 ^ hs1e8 ^ ts1 ^ s1) &amp; ((hs1w8 | hs1e8) ^
@@ -368,10 +369,10 @@ next generation bits of the input 8x8 !</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/unlimited-novelty.mc">unlimited-novelty.mc</a> - Golly macrocell input file</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/dogon/apholife.c">apholife.c</a> - partially obfuscated source</li>
<li><a href="2019_dogon.tar.bz2">2019_dogon.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_dogon.tar.bz2">2019_dogon.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/2019/dogon/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/2019/dogon/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -59,7 +59,7 @@
},
{
"file_path" : "2019_duble.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,7 +142,7 @@ Location: <a href="../../location.html#FR">FR</a> - <em>French Republic</em> (<e
<!-- 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</code></pre>
<pre><code> make</code></pre>
<p>There is an alternate version, the original, which does not work well in macOS.
See <a href="#alternate-code">Alternate code</a> below if you are curious.</p>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
@@ -149,16 +150,16 @@ See <a href="#alternate-code">Alternate code</a> below if you are curious.</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2019_duble">2019 duble bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog file</code></pre>
<pre><code> ./prog file</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog /tmp/drawing</code></pre>
<pre><code> ./prog /tmp/drawing</code></pre>
<p>Open another window / terminal.</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog /tmp/drawing</code></pre>
<pre><code> ./prog /tmp/drawing</code></pre>
<p>Open more terminals and repeat…</p>
<p>You might also wish to try a full screen size. For this try:</p>
<pre class="&lt;!---sh--&gt;"><code> make clobber fullscreen</code></pre>
<pre><code> make clobber fullscreen</code></pre>
<p>Alternatively, if you want to change the size, do something like:</p>
<pre class="&lt;!---sh--&gt;"><code> make clobber LINES=20 COLUMNS=20 all</code></pre>
<pre><code> make clobber LINES=20 COLUMNS=20 all</code></pre>
<p>The author provided us with the following table for use:</p>
<hr />
<ul>
@@ -173,7 +174,7 @@ to the <em>move</em> mode).</li>
<p>The mode and current color is indicated at the bottom left corner of
the editor.</p>
<p>After editing the file and quitting, try:</p>
<pre class="&lt;!---sh--&gt;"><code> /tmp/drawing</code></pre>
<pre><code> /tmp/drawing</code></pre>
<p>i.e. execute the file.</p>
<hr />
<p>WARNING: if the file is deleted it might lock any session still in use. These
@@ -188,7 +189,7 @@ directory which you’ll have to delete manually. This is also discussed in
<p>An alternate version of this entry, <a href="prog.alt.c">prog.alt.c</a>, is provided. This
alternate code might not work as well in macOS.</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-use">Alternate use:</h3>
<p>Use <code>prog.alt</code> as you would <code>prog</code> above.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
@@ -204,7 +205,7 @@ of someone else by just opening the same file!</p>
See section <a href="#limits-portability">Limits, Portability</a> for more info.</p>
<p>To build, type <code>make</code> (assuming gcc) or <code>make CC=clang</code>.</p>
<p>Then you can start the program. It expects a file path as its first argument:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog /tmp/drawing</code></pre>
<pre><code> ./prog /tmp/drawing</code></pre>
<p>(If not started this way, with a file, <code>prog</code> will refuse to start.)</p>
<p>If the file does not exist, you will start with a blank drawing.</p>
<p>If someone else (or another <em>instance of yourself</em>, maybe?) is already
@@ -264,7 +265,7 @@ inverse video mode, and movement escape codes, e.g. <code>xterm</code>, <code>g
<h4 id="the-drawing-area-size-is-set-at-compilation-time">The drawing area size is set at compilation time:</h4>
<p>The default size is the one of my xterm (see top of Makefile).
You may set it to the full size of your terminal window by typing:</p>
<pre class="&lt;!---sh--&gt;"><code> make clobber fullscreen</code></pre>
<pre><code> make clobber fullscreen</code></pre>
<p>IMPORTANT NOTES:</p>
<ul>
<li><strong>The program compiled with a given size will fail to reload a drawing file
@@ -319,10 +320,10 @@ size limit with this little change.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/duble/prog.orig.c">prog.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/duble/check-os.sh">check-os.sh</a> - check the operating system for compatibility</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/duble/fullscreen.sh">fullscreen.sh</a> - determine full screen size for make fullscreen</li>
<li><a href="2019_duble.tar.bz2">2019_duble.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_duble.tar.bz2">2019_duble.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/2019/duble/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/2019/duble/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -51,7 +51,7 @@
},
{
"file_path" : "2019_endoh.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+10 -9
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,7 +142,7 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em></li>
<!-- 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</code></pre>
<pre><code> make</code></pre>
<p>NOTE: the use of the C compiler optimiser was disabled and <code>-g</code> was enabled for
this entry because it is SUPPOSED to crash and it needs debugging symbols.</p>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
@@ -149,27 +150,27 @@ this entry because it is SUPPOSED to crash and it needs debugging symbols.</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2019_endoh">2019 endoh bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog</code></pre>
<pre><code> ./prog</code></pre>
<h2 id="try">Try:</h2>
<p>If you have <code>gdb(1)</code> installed:</p>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<p>Note that in macOS installing <code>gdb(1)</code> takes multiple steps - it’s not just a
matter of installing <code>gdb(1)</code> and that’s that. The <a href="try.sh">try.sh</a> script has
only been tested with linux.</p>
<p>You might also wish to try:</p>
<pre class="&lt;!---sh--&gt;"><code> gdb ./prog || lldb ./prog</code></pre>
<pre><code> gdb ./prog || lldb ./prog</code></pre>
<p>and then type in <code>r</code> (to run program) and then <code>bt</code> (for backtrace).</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The purpose of this program is to crash. You’ll want to have memorized <code>man 7 ascii</code> when debugging it to reveal its purpose.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="backtrace-quine">backtrace quine:</h3>
<p>Compile prog.c with no optimization.</p>
<pre class="&lt;!---sh--&gt;"><code> cc -g -O0 -o prog prog.c</code></pre>
<pre><code> cc -g -O0 -o prog prog.c</code></pre>
<p>Then, run it. You will see a segmentation fault.</p>
<pre class="&lt;!---sh--&gt;"><code> $ ./prog
<pre><code> $ ./prog
Segmentation fault (core dumped)</code></pre>
<p>Let’s debug. As usual, run it under gdb.</p>
<pre class="&lt;!---sh--&gt;"><code> $ gdb ./prog
<pre><code> $ gdb ./prog
(gdb) run
Starting program: /home/.../prog
@@ -212,7 +213,7 @@ only been tested with linux.</p>
#7 0x0000555555555747 in x65 () at prog.c:101
...</code></pre>
<p>By using this, you can confirm that it is actually a quine.</p>
<pre class="&lt;!---sh--&gt;"><code> gdb -q -x prog.c ./prog | sed -n -r &#39;s/#.*:([0-9]+)/\1/p&#39; | awk &#39;{printf &quot;%c&quot;,$1}&#39; &gt; prog2.c
<pre><code> gdb -q -x prog.c ./prog | sed -n -r &#39;s/#.*:([0-9]+)/\1/p&#39; | awk &#39;{printf &quot;%c&quot;,$1}&#39; &gt; prog2.c
diff prog.c prog2.c</code></pre>
<!--
@@ -242,10 +243,10 @@ only been tested with linux.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/endoh/prog.orig.c">prog.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/endoh/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/endoh/ascii.c">ascii.c</a> - shows character value of ASCII</li>
<li><a href="2019_endoh.tar.bz2">2019_endoh.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_endoh.tar.bz2">2019_endoh.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/2019/endoh/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/2019/endoh/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -59,7 +59,7 @@
},
{
"file_path" : "2019_giles.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+7 -6
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,11 +142,11 @@ Location: <a href="../../location.html#AU">AU</a> - <em>Commonwealth of Australi
<!-- 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</code></pre>
<pre><code> make</code></pre>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog infile.wav outfile.wav</code></pre>
<pre><code> ./prog infile.wav outfile.wav</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<p>NOTE: <code>play</code>, which <a href="try.sh">try.sh</a> uses, comes from SoX, the Swiss Army Knife
of sound processing programs. If you don’t have this installed, see <a href="../../faq.html#sox">FAQ 3.10:
How do I compile and use an IOCCC entry that requires sound</a>.</p>
@@ -175,7 +176,7 @@ the latter reports warnings about loss of information when converting <code>floa
and that <code>void (*)()</code> and <code>void (*)(void)</code> are not the same thing.</p>
<p>Interesting fact: The size of the program from <code>./iocccsize -i</code> is 2019.</p>
<h4 id="how-to-use">How to use:</h4>
<pre class="&lt;!---sh--&gt;"><code> ./prog input [output [size [dry [wet [damping]]]]]
<pre><code> ./prog input [output [size [dry [wet [damping]]]]]
prog.exe input [output [size [dry [wet [damping]]]]]</code></pre>
<ul>
<li><code>input</code>: The path to the input file. Required.</li>
@@ -196,7 +197,7 @@ decimal numbers (e.g. 0.35) or as percentages (e.g. 35%).</p>
<p>The default settings are designed to make the effect obvious rather than subtle,
so it may be a good idea to adjust the ratio of “dry” to “wet”, to give a more
pleasant result:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog in.wav out.wav 1.8 80% 15%</code></pre>
<pre><code> ./prog in.wav out.wav 1.8 80% 15%</code></pre>
<p>The program only supports WAV files, and only mostly. Other audio formats, such
as MP3, are not supported because they are difficult to decode, but there are
free programs such as <code>ffmpeg</code> that can perform the conversion. Some of the
@@ -356,10 +357,10 @@ where the data ends up. For example:</p>
<li><a href="BlockDiagram.png">BlockDiagram.png</a> - reverb algorithm block-diagram of internal structure</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/giles/try.sh">try.sh</a> - how to run</li>
<li><a href="MonodyVocals.wav">MonodyVocals.wav</a> - Monody by TheFatRat featuring Laura Brehm</li>
<li><a href="2019_giles.tar.bz2">2019_giles.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_giles.tar.bz2">2019_giles.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/2019/giles/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/2019/giles/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1
View File
@@ -86,6 +86,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>
+1 -1
View File
@@ -51,7 +51,7 @@
},
{
"file_path" : "2019_karns.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+10 -9
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,7 +142,7 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- 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</code></pre>
<pre><code> make</code></pre>
<p>NOTE: we disable the optimiser because this program has problems with it
enabled.</p>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
@@ -149,14 +150,14 @@ enabled.</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2019_karns">2019 karns bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog &lt; textfile_that_fits_on_the_screen</code></pre>
<pre><code> ./prog &lt; textfile_that_fits_on_the_screen</code></pre>
<p>You might want to type:</p>
<pre class="&lt;!---sh--&gt;"><code> reset</code></pre>
<pre><code> reset</code></pre>
<p>after running the program to restore the terminal to its previous state.</p>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<p>If you have more time you might want to try:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog &lt; README.md</code></pre>
<pre><code> ./prog &lt; README.md</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>If you typically get lost in mazes, watching this program run might – or might
not, YMMV – teach you how to find your way in a maze. The algorithm is
@@ -179,12 +180,12 @@ adjacent nodes that are also spaces. Nodes that aren’t spaces are not
connected with anything.</p>
<h3 id="compiling-and-running">Compiling and Running:</h3>
<p>This program usually compiles under both GCC and clang. Build with:</p>
<pre class="&lt;!---sh--&gt;"><code> $(CC) -std=c99 -o tbfs prog.c</code></pre>
<pre><code> $(CC) -std=c99 -o tbfs prog.c</code></pre>
<p>where <code>$(CC)</code> is cc, gcc, clang, or some other C compiler.</p>
<p>You can then run it with:</p>
<pre class="&lt;!---sh--&gt;"><code> cat &lt;input file&gt; | ./tbfs</code></pre>
<pre><code> cat &lt;input file&gt; | ./tbfs</code></pre>
<p>Examples:</p>
<pre class="&lt;!---sh--&gt;"><code> ./tbfs &lt; maze
<pre><code> ./tbfs &lt; maze
./tbfs &lt; prog.c</code></pre>
<h3 id="issues">Issues</h3>
<ul>
@@ -231,10 +232,10 @@ not encountered this myself).</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/karns/prog.orig.c">prog.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/karns/maze">maze</a> - input maze map</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/karns/try.sh">try.sh</a> - how to run</li>
<li><a href="2019_karns.tar.bz2">2019_karns.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_karns.tar.bz2">2019_karns.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/2019/karns/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/2019/karns/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -115,7 +115,7 @@
},
{
"file_path" : "2019_lynn.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+13 -12
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,15 +142,15 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- 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</code></pre>
<pre><code> make</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2019_lynn">2019 lynn bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog</code></pre>
<pre><code> ./prog</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>A fully functional compiler. The example prints out the 30th <a href="https://en.wikipedia.org/wiki/Fibonacci_sequence">Fibonacci
number</a>.</p>
@@ -171,21 +172,21 @@ trace of those scary <code>unsafeThisAndThat</code> functions. All functions mus
</ul>
<h3 id="building">Building:</h3>
<p>Build the compiler:</p>
<pre class="&lt;!---sh--&gt;"><code> cc -o prog prog.c</code></pre>
<pre><code> cc -o prog prog.c</code></pre>
<h3 id="demos">Demos:</h3>
<h4 id="fibonacci-numbers">Fibonacci numbers:</h4>
<p>Test the compiler on <a href="fib.hs">fib.hs</a>:</p>
<pre class="&lt;!---sh--&gt;"><code> (./prog &lt; fib.hs ; cat prog.c) &gt; fib.c</code></pre>
<pre><code> (./prog &lt; fib.hs ; cat prog.c) &gt; fib.c</code></pre>
<p>Compiling the output produces a binary that prints the 30th Fibonacci number.</p>
<p>The file <a href="ghcfib.hs">ghcfib.hs</a> includes <a href="fib.hs">fib.hs</a> with some glue code,
and shows GHC also accepts our subset of Haskell:</p>
<pre class="&lt;!---sh--&gt;"><code> ghc ghcfib.hs</code></pre>
<pre><code> ghc ghcfib.hs</code></pre>
<h4 id="self-hosting-compiler">Self-hosting compiler:</h4>
<p>To avoid spoiling this entry by revealing the original Haskell source, we
instead provide <a href="hint.hs">hint.hs</a>, the output of a certain stage of the
compiler when run on itself. This intermediate output is hopefully difficult to
understand, yet is accepted by our compiler:</p>
<pre class="&lt;!---sh--&gt;"><code> (./prog &lt; hint.hs ; cat prog.c) &gt; hint.c
<pre><code> (./prog &lt; hint.hs ; cat prog.c) &gt; hint.c
make hint
./hint</code></pre>
<p>The output program behaves like the compiler itself.</p>
@@ -200,19 +201,19 @@ it to work.</p>
languages”</a>. We exercise it by
showing the first entries of the length-ordered list of all strings consisting
of the characters <code>a</code> and <code>b</code> that contain an even number of <code>a</code>s.</p>
<pre class="&lt;!---sh--&gt;"><code> (./prog &lt; lol.hs ; cat prog.c) &gt; lol.c
<pre><code> (./prog &lt; lol.hs ; cat prog.c) &gt; lol.c
make lol
./lol</code></pre>
<p>A GHC wrapper is provided:</p>
<pre class="&lt;!---sh--&gt;"><code> ghc ghclol.hs</code></pre>
<pre><code> ghc ghclol.hs</code></pre>
<h3 id="strongly-connected-components">Strongly-connected components:</h3>
<p>See <a href="scc.hs">scc.hs</a> (and its GHC wrapper <a href="ghcscc.hs">ghcscc.hs</a>) for an elegant
way to print the strongly-connected components of a graph in reverse topological
order.</p>
<pre class="&lt;!---sh--&gt;"><code> (./prog &lt; scc.hs ; cat prog.c) &gt; scc.c</code></pre>
<pre><code> (./prog &lt; scc.hs ; cat prog.c) &gt; scc.c</code></pre>
<p>It expects the input to be in a similar format as a previous entry
(2018 vokes). For example:</p>
<pre class="&lt;!---sh--&gt;"><code> make scc
<pre><code> make scc
./scc &lt; example-1.txt
./scc &lt; example-2.txt</code></pre>
<p>The output should agree, though our program omits line numbers and does not
@@ -372,10 +373,10 @@ works</a>.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/lol.hs">lol.hs</a> - compiler macros</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/scc.hs">scc.hs</a> - compiler macros</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/lynn/hint.hs">hint.hs</a> - spoiler for compiler macros</li>
<li><a href="2019_lynn.tar.bz2">2019_lynn.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_lynn.tar.bz2">2019_lynn.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/2019/lynn/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/2019/lynn/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -43,7 +43,7 @@
},
{
"file_path" : "2019_mills.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+24 -23
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,17 +142,17 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- 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</code></pre>
<pre><code> make</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2019_mills">2019 mills bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> make cpclean
<pre><code> make cpclean
# Let this run for about about an hour and then kill it:
./prog Shakespeare.txt</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<p>However, as the binary model files used to produce the output are in an
implementation-specific format, your mileage may vary.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
@@ -200,11 +201,11 @@ training, but you can have even more fun by downloading some larger datasets:</p
</ul>
<p>For your first OMLET experiment, we will try training a simple single-level
RNN to write some <a href="https://en.wikipedia.org/wiki/William_Shakespeare">Shakespeare</a> plays. Start by typing</p>
<pre class="&lt;!---sh--&gt;"><code> make</code></pre>
<pre><code> make</code></pre>
<p>After it builds, train it using</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog Shakespere.txt</code></pre>
<pre><code> ./prog Shakespere.txt</code></pre>
<p>This will immediately start outputting gibberish to the output, e.g.</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog Shakespere.txt</code></pre>
<pre><code> ./prog Shakespere.txt</code></pre>
<p>produces:</p>
<pre><code> sins ohennAu
T-teooclelp tiThoWy
@@ -331,7 +332,7 @@ helpful if you need to stop and restart training. You can stop training by
doing <code>Control-C</code>.</p>
<p>You can continue training from a previous checkpoint by providing the
checkpoint file name as the second parameter, for example:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog Shakespeare.txt cp01_1.970</code></pre>
<pre><code> ./prog Shakespeare.txt cp01_1.970</code></pre>
<p>After the validation cycle finishes, OMLET begins the next epoch by restarting
training at the beginning of the training set. Training continues forever,
until you quit it with <code>Control-C</code>. You should monitor the checkpoints to
@@ -342,7 +343,7 @@ OMLET to run the network in inference mode which uses the frozen checkpoint
parameters to generate data. Inference mode takes the checkpoint file as
<em>standard input</em> (not on the command line) and hence must be run with a
command like</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog &lt; cp55_1.807</code></pre>
<pre><code> ./prog &lt; cp55_1.807</code></pre>
<p>Running it produces an infinite amount of generated output, until you hit
<code>Control-C</code> to stop it.</p>
<p>Note that if you decide to change networks or use a different input file, you
@@ -353,7 +354,7 @@ cause a crash.</p>
<p>The default network for OMLET (the one you get if you type <code>make</code> with the
executable name <code>prog</code>) is the simplest recurrent neural network. It looks
like</p>
<pre class="&lt;!---c--&gt;"><code> h = tanh(Wxh * x + Whh * h&#39; + Bh)
<pre><code> h = tanh(Wxh * x + Whh * h&#39; + Bh)
y = Why * h + By</code></pre>
<p>where</p>
<ul>
@@ -371,14 +372,14 @@ the loss of the network across the training set.</p>
<p>It is the presence of the hidden state vector that allows the RNN to
“remember” the past. We can see what would happen if we removed this hidden
state. If you type</p>
<pre class="&lt;!---sh--&gt;"><code> make lin1</code></pre>
<pre><code> make lin1</code></pre>
<p>OMLET will create an <a href="https://en.wikipedia.org/wiki/ADALINE">ADALINE</a> network that does</p>
<pre class="&lt;!---c--&gt;"><code> y = Wxy * x + By</code></pre>
<pre><code> y = Wxy * x + By</code></pre>
<p>This is a simple <a href="https://en.wikipedia.org/wiki/Linear_map">linear</a> <a href="https://en.wikipedia.org/wiki/Feedforward_neural_network">feed-forward network</a>. You can run it with</p>
<pre class="&lt;!---sh--&gt;"><code> ./lin1 Shakespeare.txt</code></pre>
<pre><code> ./lin1 Shakespeare.txt</code></pre>
<p>The linear network won’t be able to get past the gibberish stage, because it
lacks history:</p>
<pre class="&lt;!---sh--&gt;"><code> ./lin1 Shakespeare.txt</code></pre>
<pre><code> ./lin1 Shakespeare.txt</code></pre>
<p>produces:</p>
<pre><code> UERond w,
@@ -418,7 +419,7 @@ the language but <code>per</code> with the digit 1).</p>
<h3 id="going-deeper">Going deeper:</h3>
<p>We can try to improve the RNN’s performance by stacking RNN modules atop each
other:</p>
<pre class="&lt;!---c--&gt;"><code> h1 = RNN(h1&#39;, x)
<pre><code> h1 = RNN(h1&#39;, x)
h2 = RNN(h2&#39;, h1)
y = Why * h2 + By</code></pre>
<p>with <code>RNN(h, x)</code> defined as above. Each RNN module has its own set of
@@ -436,9 +437,9 @@ the hard limit with <code>limit -h stacksize</code> and set it with
<code>limit stacksize 65532</code> (replacing <code>65532</code> with the actual hard limit).</p>
<hr />
<p>You can try the deeper network by doing</p>
<pre class="&lt;!---sh--&gt;"><code> make rnn2</code></pre>
<pre><code> make rnn2</code></pre>
<p>(or even <code>make rnn3</code> if you want a three-layer RNN) and train it with</p>
<pre class="&lt;!---sh--&gt;"><code> ./rnn2 Shakespeare.txt</code></pre>
<pre><code> ./rnn2 Shakespeare.txt</code></pre>
<p>The additional depth should allow the network to make better predictions (it
can represent more complicated history), but it may take a long time to train
-- both because the network (being larger) now requires more time to train and
@@ -454,9 +455,9 @@ gradient, worsening the exploding and vanishing gradient problem.</p>
<p><a href="https://en.wikipedia.org/wiki/Long_short-term_memory">Long Short Term Memory</a> networks (also called LSTMs) were developed to
solve this problem. Christopher Olah gives a good description of them
at his <a href="http://colah.github.io/posts/2015-08-Understanding-LSTMs/">blog posting</a>. You can build a two-level LSTM by doing</p>
<pre class="&lt;!---sh--&gt;"><code> make lstm2</code></pre>
<pre><code> make lstm2</code></pre>
<p>and train with it with</p>
<pre class="&lt;!---sh--&gt;"><code> ./lstm2 Shakespeare.txt</code></pre>
<pre><code> ./lstm2 Shakespeare.txt</code></pre>
<p>The LSTM is much easier to train because it explicitly decides how to update
its hidden state via “gates”. These gates are called</p>
<ul>
@@ -466,7 +467,7 @@ its hidden state via “gates”. These gates are called</p>
produce the output</li>
</ul>
<p>The basic LSTM equations are</p>
<pre class="&lt;!---c--&gt;"><code> f = sigmoid(Wxf * x + Whf * h&#39; + Bf)
<pre><code> f = sigmoid(Wxf * x + Whf * h&#39; + Bf)
i = sigmoid(Wxi * x + Whi * h&#39; + Bi)
o = sigmoid(Wxo * x + Who * h&#39; + Bo)
c = f * c&#39; + i * tanh(Wxc * x + Whc * h&#39; + Bc)
@@ -494,7 +495,7 @@ examples). One important one is the <a href="https://en.wikipedia.org/wiki/Gated
simplified versions of an LSTM which combine the gates together, meaning they
require fewer learned parameters. This allows them to train faster than a
generic LSTM. You can build a two-layer GRU with</p>
<pre class="&lt;!---sh--&gt;"><code> make gru2</code></pre>
<pre><code> make gru2</code></pre>
<h3 id="building-your-own-networks">Building your own networks</h3>
<p>The OMLET <code>Makefile</code> comes with one-, two- and three-layer RNNs, LSTMs and
GRUs, along with simpler feed-forward networks like multi-layer perceptrons and
@@ -503,7 +504,7 @@ own networks by modifying the <code>Makefile</code>. Networks are passed in on t
compiler’s command-line by using <code>-D</code> directives. The network is defined by
a <code>-DNW='...'</code> command which consists of a series of comma-separated
assignments. For example, the simple one-layer RNN could be defined like</p>
<pre class="&lt;!---make--&gt;"><code> -DNW=&#39; x = I(n), hp = I(128), \
<pre><code> -DNW=&#39; x = I(n), hp = I(128), \
h = C(hp, T(A(L(128, x), L(128, hp)))), \
y = L(n, h)&#39;</code></pre>
<p>The network declares <code>x</code> as an input vector (there must be a declaration for
@@ -538,7 +539,7 @@ inference mode, this is used to select the next character to emit. In
training mode, this is used to generate the loss which is backpropagated.</p>
<p>As an example of a more complicated network, we can look at a two-layer
GRU network:</p>
<pre class="&lt;!---make--&gt;"><code> -DHS=128, \
<pre><code> -DHS=128, \
-DNW=&#39; x = I(n), \
y = L(n, MD(MD(x)))&#39; \
-DBK=&#39; hp = I(HS), \
@@ -649,10 +650,10 @@ the current directory.</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/mills/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/mills/prog.orig.c">prog.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/mills/try.sh">try.sh</a> - how to run</li>
<li><a href="2019_mills.tar.bz2">2019_mills.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_mills.tar.bz2">2019_mills.tar.bz2</a> - download entry tarball</li>
<li><a href="index.html">index.html</a> - this web page</li>
<li><a href="Eugene_Onegin.cp11_1.188">Eugene_Onegin.cp11_1.188</a> - training data from Eugene Onegin poetry</li>
<li><a href="Eugene_Onegin.txt.gz">Eugene_Onegin.txt.gz</a> - compressed Eugene Onegin poetry</li>
+1 -1
View File
@@ -67,7 +67,7 @@
},
{
"file_path" : "2019_poikola.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,7 +142,7 @@ Location: <a href="../../location.html#FI">FI</a> - <em>Republic of Finland </em
<!-- 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</code></pre>
<pre><code> make</code></pre>
<p>There is an alternate version of this program which changes the way the output
is displayed. See <a href="#alternate-code">Alternate code</a> below.</p>
<p>NOTE: we disable the optimiser because the author stated that for GCC optimiser
@@ -153,7 +154,7 @@ forcing <code>-std=gnu11</code>.</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2019_poikola">2019 poikola bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog 512 ./prog
<pre><code> ./prog 512 ./prog
sleep 86400; make clobber prog
./prog 512 ./prog
@@ -161,22 +162,22 @@ forcing <code>-std=gnu11</code>.</p>
sleep 86400; make clobber prog
./prog 512 ./prog</code></pre>
<p>If you wish for some documentation:</p>
<pre class="&lt;!---sh--&gt;"><code> make docs</code></pre>
<pre><code> make docs</code></pre>
<p>This will create the file <code>poikola.pdf</code> for your enjoyment.</p>
<h2 id="try">Try:</h2>
<p>If you don’t have a few days, try:</p>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<p>As the <a href="../../bugs.html#2019_poikola">2019 poikola bugs</a> says, this program will not validate
input so it might get stuck or fail if invoked erroneously.</p>
<h2 id="alternate-code">Alternate code:</h2>
<p>This version prints a newline after each number for parsing in other ways than
what can be done with the original 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-use">Alternate use:</h3>
<p>Use <code>prog.alt</code> as you would <code>prog</code> above.</p>
<h3 id="alternate-try">Alternate try:</h3>
<pre class="&lt;!---sh--&gt;"><code> ./try.alt.sh</code></pre>
<pre><code> ./try.alt.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Do you have the time to see what this program does? Think again, come back and
try again.</p>
@@ -191,11 +192,11 @@ accomplishments of <a href="https://en.wikipedia.org/wiki/Matti_Nyk%C3%A4nen">Ma
Nykänen</a>.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="how-to-build">How to build:</h3>
<pre class="&lt;!---sh--&gt;"><code> gcc -O0 -o prog prog.c</code></pre>
<pre><code> gcc -O0 -o prog prog.c</code></pre>
<p>or</p>
<pre class="&lt;!---sh--&gt;"><code> clang -O[0123s] -o prog prog.c</code></pre>
<pre><code> clang -O[0123s] -o prog prog.c</code></pre>
<p>e.g.:</p>
<pre class="&lt;!---sh--&gt;"><code> clang -O1 -o prog prog.c</code></pre>
<pre><code> clang -O1 -o prog prog.c</code></pre>
<h3 id="poster">Poster:</h3>
<p>You can generate an A3 sized poster by <code>make docs</code>. This command creates a pdf
file <code>poikola.pdf</code>. This requires the
@@ -231,7 +232,7 @@ three consecutive days.</p>
<p>As this is a contest for obfuscated code, the program does not perform
unnecessary checks, but either fails or gets stuck if invoked erroneously. The
program is invoked in this way:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog &lt;integer&gt; &lt;file&gt;</code></pre>
<pre><code> ./prog &lt;integer&gt; &lt;file&gt;</code></pre>
<p>where <code>&lt;integer&gt;</code> is 224, 256, 384, 512 or even 1024. Yes, I know 1024 is not a
supported length of output, but as I said, the program does not validate its
input in any way. These same parameters should be given in calculating a
@@ -345,10 +346,10 @@ interruptions during the coding phase.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/poikola/poikola.tex">poikola.tex</a> - supplied documentation</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/poikola/try.alt.sh">try.alt.sh</a> - how to run alternative code</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/poikola/try.sh">try.sh</a> - how to run</li>
<li><a href="2019_poikola.tar.bz2">2019_poikola.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_poikola.tar.bz2">2019_poikola.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/2019/poikola/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/2019/poikola/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -75,7 +75,7 @@
},
{
"file_path" : "2019_yang.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+17 -16
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#US">US</a> - <em>United States of America
<!-- 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</code></pre>
<pre><code> make</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2019_yang">2019 yang bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./prog sample_input.txt a b c d
<pre><code> ./prog sample_input.txt a b c d
cat a
@@ -159,34 +160,34 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
cat a b c d | ./prog</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Do you understand how this program works? You may have to go over and over the
output again.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="summary">Summary:</h3>
<p>Scramble/unscramble to single file:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog original.txt &gt; scrambled.txt
<pre><code> ./prog original.txt &gt; scrambled.txt
./prog &lt; scrambled.txt &gt; unscrambled.txt</code></pre>
<p>Scramble/unscramble to multiple files:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog input.txt output1.txt output2.txt ...
<pre><code> ./prog input.txt output1.txt output2.txt ...
cat output1.txt output2.txt ... | ./prog &gt; unscrambled.txt</code></pre>
<p>Re-scramble:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog original.txt | ./prog - &gt; scrambled1.txt
<pre><code> ./prog original.txt | ./prog - &gt; scrambled1.txt
./prog original.txt | ./prog - | ./prog - &gt; scrambled2.txt
./prog original.txt | ./prog - | ./prog - | ... &gt; scrambled3.txt</code></pre>
<p>Scramble slowly:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog input.txt | ruby prog.c</code></pre>
<pre><code> ./prog input.txt | ruby prog.c</code></pre>
<p>Input must be in UTF-8 encoding.</p>
<h3 id="details">Details:</h3>
<p>This is a text scrambling utility. To scramble text, specify input file name as
the first argument:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog input.txt &gt; output.txt</code></pre>
<pre><code> ./prog input.txt &gt; output.txt</code></pre>
<p>If original input file was small enough to fit in your terminal, you
can simply use <code>cat</code> to unscramble the output text.</p>
<pre class="&lt;!---sh--&gt;"><code> cat output.txt</code></pre>
<pre><code> cat output.txt</code></pre>
<p>It might seem like nothing was scrambled, but you can try passing the output
through <code>strings(1)</code> and see that most of the original strings are gone. What
happened is that the original text has been shuffled with ANSI cursor
@@ -194,14 +195,14 @@ positioning codes inserted in such a way that characters are printed in random
order. This effect is more visible if there is a delay after each character is
printed. For convenience, a utility is included in the source to output
characters slowly:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog input.txt | ruby prog.c</code></pre>
<pre><code> ./prog input.txt | ruby prog.c</code></pre>
<p>Scrambling order is deterministic, but you can reshuffle the output by
piping it through the same utility again, by specifying <code>-</code> as the
first argument:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog input.txt | ./prog - | ./prog - | ...</code></pre>
<pre><code> ./prog input.txt | ./prog - | ./prog - | ...</code></pre>
<p>You can also split the input to multiple files, each getting a subset
of the original input characters:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog input.txt output1.txt output2.txt ...
<pre><code> ./prog input.txt output1.txt output2.txt ...
cat output1.txt output2.txt ... &gt; unscrambled.txt</code></pre>
<p>You can only unscramble files with <code>cat</code> if the input fits in a single
terminal screen. If you don’t know what will be the terminal size of
@@ -213,11 +214,11 @@ sufficient for unscrambling because any scrolling causes the character
positions to be misaligned. But fear not, this utility also includes
unscrambling functionality. If no argument is specified, input will
be read through <code>stdin</code> and unscrambled to <code>stdout</code>:</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog &lt; scrambled.txt &gt; unscrambled.txt</code></pre>
<pre><code> ./prog &lt; scrambled.txt &gt; unscrambled.txt</code></pre>
<p>Where this is useful is that if you scramble the input to multiple
files and unscramble each output file individually, those output
files can be printed on transparencies and distributed separately.</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog input.txt output1.txt output2.txt output3.txt
<pre><code> ./prog input.txt output1.txt output2.txt output3.txt
./prog &lt; output1.txt &gt; layer1.txt
./prog &lt; output2.txt &gt; layer2.txt
./prog &lt; output3.txt &gt; layer3.txt</code></pre>
@@ -225,7 +226,7 @@ files can be printed on transparencies and distributed separately.</p>
<a href="https://en.wikipedia.org/wiki/Visual_cryptography">visual cryptography</a>.</p>
<p>This utility can also be used just for removing trailing whitespaces
and expanding tabs to 8 spaces.</p>
<pre class="&lt;!---sh--&gt;"><code> ./prog input.txt | ./prog</code></pre>
<pre><code> ./prog input.txt | ./prog</code></pre>
<h3 id="features">Features:</h3>
<h4 id="utf-8-support">UTF-8 support:</h4>
<p>A simple text scrambling utility might not have required a screenful
@@ -295,10 +296,10 @@ the same name, the character who is highly skilled in writing letters.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/yang/violet.c">violet.c</a> - source formatter as ASCII Violet Evergarden</li>
<li><a href="spoiler.html">spoiler.html</a> - SPOILER WARNING</li>
<li><a href="2019_yang.tar.bz2">2019_yang.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2019_yang.tar.bz2">2019_yang.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/2019/yang/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/2019/yang/.entry.json">.entry.json</a> - description of entry in JSON</li>