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
@@ -43,7 +43,7 @@
},
{
"file_path" : "2012_blakely.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,15 +142,15 @@ Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great
<!-- 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#2012_blakely">2012 blakely bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./blakely &quot;RPN formula&quot; resolution &gt; output.gif</code></pre>
<pre><code> ./blakely &quot;RPN formula&quot; resolution &gt; output.gif</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>Several IOCCC themes (<a href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">RPN
calculator</a>, animated
@@ -169,7 +170,7 @@ resolution, and an animated GIF showing a fly-around of the resulting surface is
output to <code>stdout</code>.</p>
<h3 id="usage">Usage</h3>
<p>The program should be run as:</p>
<pre class="&lt;!---sh--&gt;"><code> ./blakely xy* 32 &gt; pic.gif</code></pre>
<pre><code> ./blakely xy* 32 &gt; pic.gif</code></pre>
<p>where the first parameter is a
<a href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">RPN</a> expression, and the
second is the width of the required <a href="https://en.wikipedia.org/wiki/GIF">GIF</a>, up
@@ -201,7 +202,7 @@ and more complex expressions take longer to compute. For example, increasing the
resolution of <code>ripple.gif</code>
to 250 took ~35 minutes to render on an <a href="https://en.wikipedia.org/wiki/Intel_Core#Core_i7">i7
processor</a>.</p>
<pre class="&lt;!---sh--&gt;"><code> ./blakely xy* 32 &gt; saddle.gif
<pre><code> ./blakely xy* 32 &gt; saddle.gif
./blakely xx*yy*1++d5*ct/ 64 &gt; ripple.gif</code></pre>
<h3 id="algorithm">Algorithm</h3>
@@ -263,10 +264,10 @@ questions.)</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/blakely.orig.c">blakely.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/try.sh">try.sh</a> - how to run</li>
<li><a href="2012_blakely.tar.bz2">2012_blakely.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_blakely.tar.bz2">2012_blakely.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/2012/blakely/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/2012/blakely/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -67,7 +67,7 @@
},
{
"file_path" : "2012_deckmyn.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+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>
@@ -124,7 +125,7 @@
<h1 id="user-manual">USER MANUAL</h1>
<h2 id="calling-the-program">Calling the program</h2>
<pre class="&lt;!---sh--&gt;"><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;`cat musicfile`&quot; &gt; output.pbm</code></pre>
<pre><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;`cat musicfile`&quot; &gt; output.pbm</code></pre>
<p>Then display <code>output.pbm</code>.</p>
<p>This minimalistic music notator expects two command line arguments. The first is
the font description embedded in the source code. Notice that you don’t pass the
@@ -186,7 +187,7 @@ clef. <code>"K"</code> followed by any other letter will just default to a stand
</ol>
<h2 id="examples">Examples</h2>
<p>Blank music paper (with G clef):</p>
<pre class="&lt;!---sh--&gt;"><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;sz sa x s1 x s1 x s1 x s1 x s1 &quot;&gt; blank.pbm</code></pre>
<pre><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;sz sa x s1 x s1 x s1 x s1 x s1 &quot;&gt; blank.pbm</code></pre>
<p>With an F clef:</p>
<pre><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;KF sz sa x s1 x s1 x s1 x s1 x s1 &quot;&gt; blank.pbm</code></pre>
<p>Notice how only the first staff (or any staff) needs to have the full length.</p>
+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#BE">BE</a> - <em>Kingdom of Belgium</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#2012_deckmyn">2012 deckmyn bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./deckmyn &quot;$(cat deckmyn.c)&quot; &quot;$(cat musicfile.txt)&quot; &gt; sheetmusic.pbm</code></pre>
<pre><code> ./deckmyn &quot;$(cat deckmyn.c)&quot; &quot;$(cat musicfile.txt)&quot; &gt; sheetmusic.pbm</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>The C of this entry is definitely sharp. The program cleverly uses its own
source at runtime to define the notes, time signature and accidental bitmaps.</p>
@@ -168,14 +169,14 @@ is not done in the author’s remarks, however.</p>
<p>You need the source code and example input (either one of the example files, or
manual input as below) ready and a program capable of showing <a href="https://en.wikipedia.org/wiki/Netpbm">.pbm bitmap
format</a> images.</p>
<pre class="&lt;!---sh--&gt;"><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;`cat example_greensleeves`&quot; &gt; greensleeves.pbm</code></pre>
<pre><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;`cat example_greensleeves`&quot; &gt; greensleeves.pbm</code></pre>
<p>If you have macOS you can open the image like:</p>
<pre class="&lt;!---sh--&gt;"><code> open greensleeves.pbm</code></pre>
<pre><code> open greensleeves.pbm</code></pre>
<p>… otherwise, you’ll have to open it in your viewer of choice how you would
normally open an image.</p>
<pre class="&lt;!---sh--&gt;"><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;KF m44c4 c4 g4 g4 : a4 a4 g2 :; &quot; &gt; short_bass.pbm</code></pre>
<pre><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;KF m44c4 c4 g4 g4 : a4 a4 g2 :; &quot; &gt; short_bass.pbm</code></pre>
<p>If you have macOS you can open the image like:</p>
<pre class="&lt;!---sh--&gt;"><code> open short_bass.pbm</code></pre>
<pre><code> open short_bass.pbm</code></pre>
<p>… otherwise, you’ll have to open it in your viewer of choice how you would
normally open an image.</p>
<h3 id="description">Description</h3>
@@ -276,10 +277,10 @@ character nested conditional expression.</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/deckmyn/example_beethoven">example_beethoven</a> - music notation</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/deckmyn/example_greensleeves">example_greensleeves</a> - music notation</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/deckmyn/try.sh">try.sh</a> - how to run</li>
<li><a href="2012_deckmyn.tar.bz2">2012_deckmyn.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_deckmyn.tar.bz2">2012_deckmyn.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/2012/deckmyn/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/2012/deckmyn/deckmyn.md">deckmyn.md</a> - markdown source for deckmyn.html</li>
+1 -1
View File
@@ -35,7 +35,7 @@
},
{
"file_path" : "2012_dlowe.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+5 -4
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#2012_dlowe">2012 dlowe bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./dlowe</code></pre>
<pre><code> ./dlowe</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./dlowe</code></pre>
<pre><code> ./dlowe</code></pre>
<p>Watch for a while if you like, then press a key within the window.</p>
<p>Use up and down keys to escape death.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
@@ -234,10 +235,10 @@ abuse of the arithmetic properties of magic numbers.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/dlowe/dlowe.c">dlowe.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/dlowe/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/dlowe/dlowe.orig.c">dlowe.orig.c</a> - original source</li>
<li><a href="2012_dlowe.tar.bz2">2012_dlowe.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_dlowe.tar.bz2">2012_dlowe.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/2012/dlowe/README.md">README.md</a> - markdown source for this web page</li>
<li><a href="dead.d">dead.d</a> - data file</li>
+1 -1
View File
@@ -235,7 +235,7 @@
},
{
"file_path" : "2012_endoh1.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>
@@ -140,7 +141,7 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em></li>
<!-- END: this line ends content for HTML phase 20 by: bin/output-index-author.sh via bin/md2html.sh -->
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<pre class="&lt;!---sh--&gt;"><code> make</code></pre>
<pre><code> make</code></pre>
<p>There are two alt versions that let you control the compile time variables that
control the fluid behaviour and the added variables to speed up or slow down the
fluid as well as setting a timeout (if not 0): one for the original black and
@@ -149,12 +150,12 @@ judges at the time of the contest). Another version is the deobfuscated version
provided by the author as well. See the <a href="#alternate-code">Alternate code</a>
section below for more details.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./endoh1 &lt; file</code></pre>
<pre><code> ./endoh1 &lt; file</code></pre>
<p>WARNING: if you’re sensitive to/don’t like flashing colours/text or just want to
see what this looks like not going so fast then you might wish to try the
<a href="#alternate-code">Alternate code</a> instead.</p>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.bw.sh endoh1.c
<pre><code> ./try.bw.sh endoh1.c
./try.sh endoh1.c
./try.bw.sh pour-out.txt
@@ -170,39 +171,39 @@ the fluid and change the behaviour of the fluid. The file
<a href="endoh1.alt.c">endoh1.alt2.c</a> is deobfuscated and was provided by the author.</p>
<h3 id="alternate-build">Alternate build:</h3>
<p>For the default values, try:</p>
<pre class="&lt;!---sh--&gt;"><code> make alt</code></pre>
<pre><code> make alt</code></pre>
<p>In the <code>alt</code> versions a default time of 10 seconds is set as an alarm so that
one can more easily go through the list of files to see them all in succession,
for fun. That is controlled by the variable <code>TIMER</code> at compilation.
For instance if you wish to change the value to 5:</p>
<pre class="&lt;!---sh--&gt;"><code> make clobber TIMER=5 alt</code></pre>
<pre><code> make clobber TIMER=5 alt</code></pre>
<p>If you want to disable the alarm time, set it to 0:</p>
<pre class="&lt;!---sh--&gt;"><code> make clobber TIMER=0 alt</code></pre>
<pre><code> make clobber TIMER=0 alt</code></pre>
<p>It cannot be &lt; 0 or &gt; 60 (arbitrarily selected).</p>
<p>The <code>SLEEP</code> variable is to delay the time between updates to make it easier to
see and to not flash too quickly. The code protects against a value &lt; 0 and
defaults to 12321 but you can change it to. For instance to slow it down you
could increase the sleep time from <code>12321</code> to <code>50000</code>:</p>
<pre class="&lt;!---sh--&gt;"><code> make clobber SLEEP=50000 alt</code></pre>
<pre><code> make clobber SLEEP=50000 alt</code></pre>
<p>If you wish to speed it up you might decrease the sleep time from <code>12321</code> to
<code>9999</code>:</p>
<pre class="&lt;!---sh--&gt;"><code> make clobber SLEEP=9999 alt</code></pre>
<pre><code> make clobber SLEEP=9999 alt</code></pre>
<p>WARNING: the lower the value the faster it will flash so be careful if you’re
sensitive to this.</p>
<p>If you wish to change the gravity factor, pressure factor and/or
viscosity factor, you should redefine the values <code>GRAVITY</code>, <code>PRESSURE</code> and/or
<code>VISCOSITY</code> macros, respectively. For instance if you wish to change the
viscosity and pressure factors but leave the other values alone:</p>
<pre class="&lt;!---sh--&gt;"><code> make clobber VISCOSITY=X PRESSURE=Y alt</code></pre>
<pre><code> make clobber VISCOSITY=X PRESSURE=Y alt</code></pre>
<p>where <code>X</code> and <code>Y</code> are numbers or the letter <code>I</code> and which are, respectively, the
viscosity and pressure factors. There is no attempt to check the value or type
because doing so prevents the macros from being defined to <code>I</code> which would
prevent the author’s remarks about it from being done.</p>
<p>You might also wish to try redefining the macros <code>G</code>, <code>P</code> and/or <code>V</code>. For
instance:</p>
<pre class="&lt;!---sh--&gt;"><code> make clobber GRAVITY=5 PRESSURE=5 VISCOSITY=5 alt</code></pre>
<pre><code> make clobber GRAVITY=5 PRESSURE=5 VISCOSITY=5 alt</code></pre>
<p>You might try even:</p>
<pre class="&lt;!---sh--&gt;"><code> make clobber GRAVITY=I alt</code></pre>
<pre><code> make clobber GRAVITY=I alt</code></pre>
<p>See the author’s remarks for details on these macros where:</p>
<pre><code> G = GRAVITY
P = PRESSURE
@@ -213,10 +214,10 @@ and <code>endoh1_color</code> above.</p>
<h3 id="alternate-try">Alternate try:</h3>
<p>To see two different ways run on the source file and each of the text files,
try:</p>
<pre class="&lt;!---sh--&gt;"><code> ./try.alt.sh</code></pre>
<pre><code> ./try.alt.sh</code></pre>
<p>The second run of each will be with the gravity factor set to <code>I</code>.</p>
<p>To see the same thing but in the original uncoloured version, try:</p>
<pre class="&lt;!---sh--&gt;"><code> ./try.alt.bw.sh</code></pre>
<pre><code> ./try.alt.bw.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Let’s play <a href="https://en.wikipedia.org/wiki/Jeopardy!">Jeopardy!</a></p>
<p>A: An obfuscated program that deals with complex numbers and produces animated ASCII graphics.
@@ -231,7 +232,7 @@ entry</a>.</p>
<h3 id="synopsis">Synopsis</h3>
<p><strong>DO NOT FORGET</strong> <code>-DG=1 -DP=4 -DV=8</code> and make your terminal window larger
than 80 x 25.</p>
<pre class="&lt;!---sh--&gt;"><code> cc endoh1.c -DG=1 -DP=4 -DV=8 -D_BSD_SOURCE -o endoh1 -lm
<pre><code> cc endoh1.c -DG=1 -DP=4 -DV=8 -D_BSD_SOURCE -o endoh1 -lm
./endoh1 &lt; endoh1.c
./endoh1 &lt; logo.txt
./endoh1 &lt; column.txt
@@ -284,7 +285,7 @@ comments. It also uses <code>usleep(3)</code>, which may require <code>-D_BSD_SO
to build with no warning. Under these conditions, it should be portable.
At least, recent compilers with <code>-std=c99 -Wall -W -Wextra -pedantic</code> say
nothing.</p>
<pre class="&lt;!---sh--&gt;"><code> gcc -DG=1 -DP=4 -DV=8 -D_BSD_SOURCE -std=c99 -Wall -W -Wextra -pedantic endoh1.c
<pre><code> gcc -DG=1 -DP=4 -DV=8 -D_BSD_SOURCE -std=c99 -Wall -W -Wextra -pedantic endoh1.c
clang -DG=1 -DP=4 -DV=8 -D_BSD_SOURCE -std=c99 -Wall -W -Wextra -pedantic endoh1.c</code></pre>
<p>I expect it to work in any Unix-like environment. VTxxx/ANSI sequences are
@@ -376,10 +377,10 @@ provided many configuration files.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/try.bw.sh">try.bw.sh</a> - try.alt.bw.sh</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/try.sh">try.sh</a> - how to run in color</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh1/endoh1_color.c">endoh1_color.c</a> - alternative source using terminal 256 colors</li>
<li><a href="2012_endoh1.tar.bz2">2012_endoh1.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_endoh1.tar.bz2">2012_endoh1.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/2012/endoh1/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/2012/endoh1/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -51,7 +51,7 @@
},
{
"file_path" : "2012_endoh2.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,18 +142,18 @@ 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>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./endoh2 &gt; pi.c
<pre><code> ./endoh2 &gt; pi.c
gcc -o pi pi.c
./pi &gt; 314.c</code></pre>
<p>and:</p>
<pre class="&lt;!---sh--&gt;"><code> ./endoh2 e &gt; e.c\
<pre><code> ./endoh2 e &gt; e.c\
gcc -o e e.c
./e &gt; 271.c</code></pre>
<p>…</p>
<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
<a href="https://en.wikipedia.org/wiki/Pi">pi</a>/<a href="https://en.wikipedia.org/wiki/E_(mathematical_constant)">e</a>
@@ -213,12 +214,12 @@ willy-nilly.</p>
warning, it requires two C99 features: allow string literal to be more than 509
characters and not requiring a return in <code>main()</code>. In fact, recent compilers
with <code>-std=c99 -Wall -W -Wextra -pedantic</code> would say nothing.</p>
<pre class="&lt;!---sh--&gt;"><code> gcc -std=c99 -Wall -W -Wextra -pedantic spigot.c
<pre><code> gcc -std=c99 -Wall -W -Wextra -pedantic spigot.c
clang -std=c99 -Wall -W -Wextra -pedantic spigot.c</code></pre>
<p>I’ve tested with gcc-4.6.3 and clang-3.0 on Linux (Ubuntu 12.04)
and gcc-4.5.3 and clang-3.1 on Cygwin.</p>
<h3 id="synopsis">Synopsis</h3>
<pre class="&lt;!---sh--&gt;"><code> cc endoh2.c -o endoh2
<pre><code> cc endoh2.c -o endoh2
./endoh2 &gt; pi.c
cat pi.c
@@ -270,10 +271,10 @@ unless <code>-std=c99</code> option is given.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh2/endoh2.orig.c">endoh2.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh2/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/endoh2/find-font-table.rb">find-font-table.rb</a> - tool used to find the magic string</li>
<li><a href="2012_endoh2.tar.bz2">2012_endoh2.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_endoh2.tar.bz2">2012_endoh2.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/2012/endoh2/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/2012/endoh2/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -52,7 +52,7 @@
},
{
"file_path" : "2012_grothe.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>
@@ -144,16 +145,16 @@ 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>
<h2 id="to-use">To use:</h2>
<p>To create a shared secret shared among <code>M</code> people with <code>N+1</code> needed to reconstruct:</p>
<pre class="&lt;!---sh--&gt;"><code> ./grothe -secret 1-/dev/urandom 2-/dev/urandom ... \
<pre><code> ./grothe -secret 1-/dev/urandom 2-/dev/urandom ... \
N-/dev/urandom 1+shared1 2+shared2 ... M+sharedM</code></pre>
<p>To reconstruct the original (an arbitrary combination of <code>N+1</code> or
more shared files with their proper numbers):</p>
<pre class="&lt;!---sh--&gt;"><code> ./grothe I-sharedI J-sharedJ K-sharedK ... +reconstructed</code></pre>
<pre><code> ./grothe I-sharedI J-sharedJ K-sharedK ... +reconstructed</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>Also known as ‘Best abuse of the judging process’.</p>
<p>The IOCCC 2012 submission page didn’t enforce the 2048 meaningful character
@@ -184,12 +185,12 @@ into 3 parts and require two of them be available to extract the original recipe
<h3 id="example-usage">Example usage</h3>
<p>To split a secret into 4 pieces of which at least 3 will be needed to get it (in
this case the cookie recipe) back:</p>
<pre class="&lt;!---sh--&gt;"><code> ./grothe \
<pre><code> ./grothe \
-cookie_recipe.txt\
1-/dev/urandom 2-/dev/urandom\
1+cookie_piece1.dat 2+cookie_piece2.dat 3+cookie_piece3.dat 4+cookie_piece4.dat</code></pre>
<p>To put the recipe back together using the first, second and fourth pieces:</p>
<pre class="&lt;!---sh--&gt;"><code> ./grothe \
<pre><code> ./grothe \
1-cookie_piece1.dat 2-cookie_piece2.dat 4-cookie_piece4.dat
+cookie_recipe_restore.txt</code></pre>
<h3 id="limitations">Limitations</h3>
@@ -253,10 +254,10 @@ need to be so trying to figure it out can be a bit tough.</p></li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/grothe/grothe.orig.c">grothe.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/grothe/cookie_recipe.txt">cookie_recipe.txt</a> - cookie recipe</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/grothe/try.sh">try.sh</a> - how to run</li>
<li><a href="2012_grothe.tar.bz2">2012_grothe.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_grothe.tar.bz2">2012_grothe.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/2012/grothe/README.md">README.md</a> - markdown source for this web page</li>
<li><a href="cookie_piece1.dat">cookie_piece1.dat</a> - binary support file</li>
+1 -1
View File
@@ -43,7 +43,7 @@
},
{
"file_path" : "2012_hamano.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#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>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./hamano &lt; textfile &gt; output.pdf</code></pre>
<pre><code> ./hamano &lt; textfile &gt; output.pdf</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<p>The script will generate a number of PDF files and it will suggest you look at
them as well. You can read <code>hint.pdf</code> with a PDF reader like <code>acroread hint.pdf</code>
or <code>evince hint.pdf</code>. With macOS you can do <code>open hint.pdf</code> which by default
@@ -155,13 +156,13 @@ directly instead.</p>
the PDF file will then be compiled as C (itself!) and executed so that it shows
README.md!</p>
<p>That procedure looks like:</p>
<pre class="&lt;!---sh--&gt;"><code> ./hamano &lt; README.md &gt; hint.pdf
<pre><code> ./hamano &lt; README.md &gt; hint.pdf
cc -xc hint.pdf -o hint
./hint</code></pre>
<p>Another PDF generated is an obfuscated <code>Hello World!</code> program (obfuscated inside
the PDF). Once this is done it will compile the PDF as if it was C (itself!). It
will look like:</p>
<pre class="&lt;!---sh--&gt;"><code> echo &#39;int main(){puts(&quot;Hello World!&quot;);}&#39; | ./hamano &gt; hello.pdf
<pre><code> echo &#39;int main(){puts(&quot;Hello World!&quot;);}&#39; | ./hamano &gt; hello.pdf
cc -xc hello.pdf -o hello
./hello | cc -Wno-implicit-function-declaration -xc - -o ./hello2
@@ -232,10 +233,10 @@ embedded font in the fragmented glyph?</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/hamano/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/hamano/hamano.orig.c">hamano.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/hamano/try.sh">try.sh</a> - how to run</li>
<li><a href="2012_hamano.tar.bz2">2012_hamano.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_hamano.tar.bz2">2012_hamano.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/2012/hamano/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/2012/hamano/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -107,7 +107,7 @@
},
{
"file_path" : "2012_hou.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+5 -4
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>
@@ -124,9 +125,9 @@
<h2 id="judges-comments">Judges’ comments:</h2>
<h3 id="to-build">To build:</h3>
<pre class="&lt;!---sh--&gt;"><code> make hou</code></pre>
<pre><code> make hou</code></pre>
<h3 id="to-run">To run:</h3>
<pre class="&lt;!---sh--&gt;"><code> ./hou syntax-file file-to-process</code></pre>
<pre><code> ./hou syntax-file file-to-process</code></pre>
<h3 id="try-unix">Try (Unix):</h3>
<p>The results are best viewed in a 80x25 console with ANSI colors.</p>
<pre><code> less hou.c
@@ -170,11 +171,11 @@ in the regular expression by escaping it with [] or ““.</p>
<p>The following regular expression operators are supported:</p>
<pre><code> () [] * + ? | &quot;&quot;</code></pre>
<p>For example, one can use the following expression to match a certain declaration statement in hou.c:</p>
<pre class="&lt;!---c--&gt;"><code> &quot;char&quot;[ *]*[a-zA-Z_][0-9a-zA-Z_]*[ ]*((=[0-9a-zA-Z_ ]+)|(\[[0-9a-zA-Z_ ]*\]))?[ ]*(,[ *]*[a-zA-Z_][0-9a-zA-Z_]*[ ]*((=[0-9a-zA-Z_ ]+)|(\[[0-9a-zA-Z_ ]*\]))?[ ]*)*;</code></pre>
<pre><code> &quot;char&quot;[ *]*[a-zA-Z_][0-9a-zA-Z_]*[ ]*((=[0-9a-zA-Z_ ]+)|(\[[0-9a-zA-Z_ ]*\]))?[ ]*(,[ *]*[a-zA-Z_][0-9a-zA-Z_]*[ ]*((=[0-9a-zA-Z_ ]+)|(\[[0-9a-zA-Z_ ]*\]))?[ ]*)*;</code></pre>
<p>The regex engine is also algorithmically efficient. To illustrate the point,
ansi.txt contains a pathological expression [2] that guarantees a hang for the
competing Perl engine while matching itself. Try to compare these two engines:</p>
<pre class="&lt;!---sh--&gt;"><code> ./hou ansi.txt ansi.txt
<pre><code> ./hou ansi.txt ansi.txt
perl patho.pl &lt; ansi.txt</code></pre>
<p>Finally, there are a few limitations…</p>
<ul>
+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#CN">CN</a> - <em>People’s Republic of C
<!-- 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> ./hou syntax-file file-to-process</code></pre>
<pre><code> ./hou syntax-file file-to-process</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<p>View the <code>remarks.htm</code> file in your web browser.</p>
<p>The result is best viewed in a 80x25 console with ANSI colors.</p>
<h2 id="try-windows">Try (Windows):</h2>
@@ -183,12 +184,12 @@ in the regular expression by escaping it with <code>[]</code> or <code>""</code>
<pre><code> () [] * + ? | &quot;&quot;</code></pre>
<p>For example, one can use the following expression to match a certain declaration
statement in <a href="hou.c">hou.c</a>:</p>
<pre class="&lt;!---re--&gt;"><code> &quot;char&quot;[ *]*[a-zA-Z_][0-9a-zA-Z_]*[ ]*((=[0-9a-zA-Z_ ]+)|(\[[0-9a-zA-Z_ ]*\]))?[ ]*(,[ *]*[a-zA-Z_][0-9a-zA-Z_]*[ ]*((=[0-9a-zA-Z_ ]+)|(\[[0-9a-zA-Z_ ]*\]))?[ ]*)*;</code></pre>
<pre><code> &quot;char&quot;[ *]*[a-zA-Z_][0-9a-zA-Z_]*[ ]*((=[0-9a-zA-Z_ ]+)|(\[[0-9a-zA-Z_ ]*\]))?[ ]*(,[ *]*[a-zA-Z_][0-9a-zA-Z_]*[ ]*((=[0-9a-zA-Z_ ]+)|(\[[0-9a-zA-Z_ ]*\]))?[ ]*)*;</code></pre>
<p>The regex engine is also algorithmically efficient. To illustrate the point,
<a href="ansi.txt">ansi.txt</a> contains a pathological expression <a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> that guarantees a
hang for the competing Perl engine while matching itself. Try to compare these
two engines:</p>
<pre class="&lt;!---sh--&gt;"><code> ./hou ansi.txt ansi.txt
<pre><code> ./hou ansi.txt ansi.txt
perl patho.pl &lt; ansi.txt</code></pre>
<h3 id="limitations">Limitations</h3>
<p>Finally, there are a few limitations…</p>
@@ -260,10 +261,10 @@ amount of spaghetti branches and virtual thread creations. Finally, the VM in
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/hou/try.sh">try.sh</a> - how to run</li>
<li><a href="header.htm">header.htm</a> - HTML header</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/hou/perl-notes.txt">perl-notes.txt</a> - notes about patho.pl</li>
<li><a href="2012_hou.tar.bz2">2012_hou.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_hou.tar.bz2">2012_hou.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/2012/hou/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/2012/hou/.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
@@ -91,7 +91,7 @@
},
{
"file_path" : "2012_kang.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,13 +142,13 @@ Location: <a href="../../location.html#KR">KR</a> - <em>Republic of Korea</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 alternate code which fixes some German at the expense of other German.
See <a href="#alternate-code">Alternate code</a> below for the (fun) rationale here.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> echo &quot;full spelling of an English cardinal numeral less than a quadrillion&quot; | ./kang</code></pre>
<pre><code> echo &quot;full spelling of an English cardinal numeral less than a quadrillion&quot; | ./kang</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh # try various languages
<pre><code> ./try.sh # try various languages
./en.sh # English 0 through 13
@@ -164,15 +165,15 @@ deal with it :-) It also breaks other words too and this happens only for one
letter change. With this one should hopefully be able to really appreciate the
subtlety of this entry even more.</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>
<pre class="&lt;!---sh--&gt;"><code> echo &quot;full spelling of an English cardinal numeral less than a quadrillion&quot; | ./kang.alt
<pre><code> echo &quot;full spelling of an English cardinal numeral less than a quadrillion&quot; | ./kang.alt
echo vier | ./kang.alt
echo uno | ./kang.alt</code></pre>
<h3 id="alternate-try">Alternate try:</h3>
<pre class="&lt;!---sh--&gt;"><code> ./try.alt.sh # try various languages
<pre><code> ./try.alt.sh # try various languages
./en.alt.sh # English 0 through 13
@@ -188,9 +189,9 @@ German, Italian, Russian, and Spanish numerals.</p>
colloquial year numbers of the last millennium.</p>
<p>We’ve added a linefeed to the print format for convenience.</p>
<p>Can you explain why:</p>
<pre class="&lt;!---sh--&gt;"><code> echo f hundr|./kang</code></pre>
<pre><code> echo f hundr|./kang</code></pre>
<p>correctly reports 500 but:</p>
<pre class="&lt;!---sh--&gt;"><code> echo hundr|./kang</code></pre>
<pre><code> echo hundr|./kang</code></pre>
<p>does not report 100, instead printing 0?</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="synopsis">Synopsis</h3>
@@ -325,10 +326,10 @@ proof-reading remarks.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/kang/en.sh">en.sh</a> - English words for 1 through 13</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/kang/try.alt.sh">try.alt.sh</a> - how to run alternate code</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/kang/try.sh">try.sh</a> - how to run</li>
<li><a href="2012_kang.tar.bz2">2012_kang.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_kang.tar.bz2">2012_kang.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/2012/kang/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/2012/kang/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -51,7 +51,7 @@
},
{
"file_path" : "2012_konno.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,13 +142,13 @@ 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>There is an unobfuscated version of this entry. See <a href="#alternate-code">Alternate
code</a> below.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./konno N</code></pre>
<pre><code> ./konno N</code></pre>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh
<pre><code> ./try.sh
# you can also specify numbers to try before the random and preselected ones:
./try.sh 111 222 333 444 555 666 777 888 999</code></pre>
@@ -157,7 +158,7 @@ selects ten numbers to try.</p>
<p>An alternate version of this entry, <a href="konno.alt.c">konno.alt.c</a>, is provided.
This alternate code is an unobfuscated version of the winning code.</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>konno.alt</code> as you would <code>konno</code> above.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
@@ -170,7 +171,7 @@ This alternate code is an unobfuscated version of the winning code.</p>
automaton</a>
patterns.</p>
<p>Try:</p>
<pre class="&lt;!---sh--&gt;"><code> ./konno 30
<pre><code> ./konno 30
./konno 90
./konno 102
./konno 109
@@ -178,9 +179,9 @@ patterns.</p>
<p>There are 256 (from 0 through 255) possible rules.</p>
<h3 id="obfuscation">Obfuscation</h3>
<p>This program uses bit operations. I think</p>
<pre class="&lt;!---c--&gt;"><code> 7&amp;O&lt;&lt;!o&gt;&gt;!o+29</code></pre>
<pre><code> 7&amp;O&lt;&lt;!o&gt;&gt;!o+29</code></pre>
<p>is an interesting operation. This isn’t equal to</p>
<pre class="&lt;!---c--&gt;"><code> 7&amp;O&gt;&gt;29</code></pre>
<pre><code> 7&amp;O&gt;&gt;29</code></pre>
<p>operation. What is the operation doing?</p>
<h3 id="limitation">Limitation</h3>
<p>This program assumes that the size of <code>int</code> is 4.</p>
@@ -212,10 +213,10 @@ patterns.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/konno/konno.alt.c">konno.alt.c</a> - alternative source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/konno/konno.orig.c">konno.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/konno/try.sh">try.sh</a> - how to run</li>
<li><a href="2012_konno.tar.bz2">2012_konno.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_konno.tar.bz2">2012_konno.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/2012/konno/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/2012/konno/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -75,7 +75,7 @@
},
{
"file_path" : "2012_omoikane.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#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>There is an alternate version that will read from the compiled file itself, in
case you don’t have a <code>/dev/urandom</code> file. There is also a version that should
theoretically work with Windows which distinguishes binary and text. See
<a href="#alternate-code">alternate code</a> below.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./nyaruko [seed.txt] &lt; original.bin &gt; output.c
<pre><code> ./nyaruko [seed.txt] &lt; original.bin &gt; output.c
bash output.c &gt; key.c
perl output.c &gt; data.c
@@ -159,7 +160,7 @@ theoretically work with Windows which distinguishes binary and text. See
file or use the <a href="#alternate-code">alternate version</a> which reads in the compiled
binary itself.</p>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<pre><code> ./try.sh</code></pre>
<p>The script <a href="try.sh">try.sh</a> will check if you have perl before trying to use the
perl parts of the script.</p>
<h2 id="alternate-code">Alternate code:</h2>
@@ -171,14 +172,14 @@ is like the first except it also should theoretically work with Windows, setting
binary mode on <code>stdin</code> and <code>stdout</code>.</p>
<h3 id="alternate-build">Alternate build:</h3>
<p>For the first version:</p>
<pre class="&lt;!---sh--&gt;"><code> make alt</code></pre>
<pre><code> make alt</code></pre>
<p>For the second version:</p>
<pre class="&lt;!---sh--&gt;"><code> make alt2</code></pre>
<pre><code> make alt2</code></pre>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>nyaruko.alt</code> or <code>nyaruko.alt2</code> as you would <code>nyaruko</code> above.</p>
<h3 id="alternate-try">Alternate try:</h3>
<p>For the first alternate version:</p>
<pre class="&lt;!---sh--&gt;"><code> ./try.alt.sh</code></pre>
<pre><code> ./try.alt.sh</code></pre>
<p>We have no way to test the second version, sorry (tm Canada :-) )!</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The judges have nothing to add that has not already been written about in the
@@ -187,24 +188,24 @@ binary mode on <code>stdin</code> and <code>stdout</code>.</p>
<h3 id="usage">Usage</h3>
<p><code>Nyaruko</code> is a binary to text filter. Given some input on <code>stdin</code>,
<code>Nyaruko</code> will produce C code that reproduces this input on <code>stdout</code>:</p>
<pre class="&lt;!---sh--&gt;"><code> ./nyaruko &lt; original.bin &gt; output.c
<pre><code> ./nyaruko &lt; original.bin &gt; output.c
gcc output.c -o output
./output &gt; regenerated.bin</code></pre>
<p>Output is encrypted, but both key and data are included in the output.
To separate the key from the data, run these commands:</p>
<pre class="&lt;!---sh--&gt;"><code> bash output.c &gt; key.c
<pre><code> bash output.c &gt; key.c
perl output.c &gt; data.c</code></pre>
<p>The key-less <code>data.c</code> still compiles, but produces a different message
on <code>stdout</code> instead of the original input. This message is a hint to
why the code is formatted the way it is.</p>
<p>To combine the key and data, concatenate them together in either
order:</p>
<pre class="&lt;!---sh--&gt;"><code> cat key.c data.c &gt; output.c
<pre><code> cat key.c data.c &gt; output.c
cat data.c key.c &gt; output.c</code></pre>
<p>By default, <code>Nyaruko</code> generates a unique random key for every message,
using <code>/dev/urandom</code> as the seed. If given an extra command line
argument, <code>Nyaruko</code> will seed using that file instead of <code>/dev/urandom</code>:</p>
<pre class="&lt;!---sh--&gt;"><code> ./nyaruko seed.txt &lt; input.bin &gt; output.c</code></pre>
<pre><code> ./nyaruko seed.txt &lt; input.bin &gt; output.c</code></pre>
<p>This makes the output key deterministic, allowing the same key to be shared
across different files. On operating systems that do not have <code>/dev/urandom</code>,
users should always specify this extra seed argument to avoid indeterministic
@@ -297,10 +298,10 @@ JavaScript.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/omoikane/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/2012/omoikane/try.sh">try.sh</a> - how to run</li>
<li><a href="spoiler.html">spoiler.html</a> - SPOILER WARNING</li>
<li><a href="2012_omoikane.tar.bz2">2012_omoikane.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_omoikane.tar.bz2">2012_omoikane.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/2012/omoikane/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/2012/omoikane/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -67,7 +67,7 @@
},
{
"file_path" : "2012_tromp.tar.bz2",
"inventory_order" : 100000,
"inventory_order" : 1415926535,
"OK_to_edit" : false,
"display_as" : "tbz2",
"display_via_github" : false,
+1
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>
+21 -20
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 all # On a 64-bit machine (default)
<pre><code> make all # On a 64-bit machine (default)
make tromp32 # On a 32-bit machine</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
@@ -149,13 +150,13 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2012_tromp">2012 tromp bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./tromp [-b]</code></pre>
<pre><code> ./tromp [-b]</code></pre>
<p>Use <code>./tromp32</code> as you would <code>./tromp</code> if on a 32-bit machine.</p>
<h2 id="to-use-1">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> cat ascii-prog.blc data | ./tromp -b
<pre><code> cat ascii-prog.blc data | ./tromp -b
cat binary-prog.Blc data | ./tromp</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>The judges dare to say that the data files this entry is processing
are more obfuscated than the entry itself.</p>
@@ -206,23 +207,23 @@ notation</a>) which is the
identity function. When its encoding <code>0010</code> is fed into the universal machine,
it will simply copy the input to the output (well, not that simply, since each
byte is smashed to bits and rebuilt from scratch). Voila: a half byte cat:</p>
<pre class="&lt;!---sh--&gt;"><code> $ echo &quot; Hello, world&quot; | ./tromp
<pre><code> $ echo &quot; Hello, world&quot; | ./tromp
Hello, world</code></pre>
<p>Since the least significant 4 bits of the first byte are just arbitrary padding
that is ignored by the program, any character from ASCII 32 (space) through 47
(<code>/</code>) will do, e.g.:</p>
<pre class="&lt;!---sh--&gt;"><code> $ echo &quot;*Hello, world&quot; | ./tromp
<pre><code> $ echo &quot;*Hello, world&quot; | ./tromp
Hello, world</code></pre>
<h3 id="bad-programs">Bad programs</h3>
<p>If the input doesn’t start with a valid program, that is,
if the interpreter reaches end-of-file during program parsing,
it will crash in some way. E.g. the following might dump core:</p>
<pre class="&lt;!---sh--&gt;"><code> echo -n &quot;U&quot; | ./tromp</code></pre>
<pre><code> echo -n &quot;U&quot; | ./tromp</code></pre>
<p>Furthermore, the interpreter requires the initial encoded lambda term to be
closed, that is, variable <code>n</code> can only appear within at least <code>n</code> enclosing
lambdas. For instance, here the term <code>\ 5</code> is not closed, causing the
interpreter to crash when looking into a null-pointer environment:</p>
<pre class="&lt;!---sh--&gt;"><code> echo &quot;&gt;Hello, world&quot; | ./tromp</code></pre>
<pre><code> echo &quot;&gt;Hello, world&quot; | ./tromp</code></pre>
<p>will likely dump core.</p>
<p>Since these properties can be checked when creating
<a href="https://tromp.github.io/cl/Binary_lambda_calculus.html">BLC</a> programs,
@@ -265,7 +266,7 @@ as a self interpreter in BLC it is downright minuscule at 232 bits (29 bytes):</
0b7fb 00cf6
7bb03 91a1a
</code></pre>
<pre class="&lt;!---sh--&gt;"><code> $ (cat uni8.Blc; echo &quot; Ni hao&quot;) | ./tromp
<pre><code> $ (cat uni8.Blc; echo &quot; Ni hao&quot;) | ./tromp
Ni hao</code></pre>
<h3 id="a-prime-number-sieve">A prime number sieve</h3>
<p>Even shorter than the self-interpreter is this prime number sieve in 167 bits
@@ -281,7 +282,7 @@ as a self interpreter in BLC it is downright minuscule at 232 bits (29 bytes):</
0000110110
</code></pre>
<p>The <code>n</code>th bit in the output indicates whether n is prime:</p>
<pre class="&lt;!---sh--&gt;"><code> $ cat primes.blc | ./tromp -b | head -c 70
<pre><code> $ cat primes.blc | ./tromp -b | head -c 70
0011010100010100010100010000010100000100010100010000010000010100000100</code></pre>
<p>For those who prefer to digest their primes in decimal, there is <code>oddindices.Blc</code>,
which will print the indices of all odd characters (with
@@ -308,7 +309,7 @@ separated by a given character:</p>
60 8191a00167fb cbcfdf65f7c0 a20</code></pre>
<p>It expects <code>n</code> arbitrary characters of input, and draws a space filling <a href="https://en.wikipedia.org/wiki/Hilbert_curve">Hilbert
curve</a> of order <code>n</code>:</p>
<pre class="&lt;!---sh--&gt;"><code> $ (cat hilbert.Blc; echo -n &quot;1&quot;) | ./tromp
<pre><code> $ (cat hilbert.Blc; echo -n &quot;1&quot;) | ./tromp
_
| |
@@ -370,7 +371,7 @@ followed by a <code>]</code>, followed by the input for the Brainfuck program.</
<h3 id="a-blc-assembler">A BLC assembler</h3>
<p>Writing BLC programs can be made slightly less painful with this parser that
translates single-letter-variable lambda calculus into BLC:</p>
<pre class="&lt;!---sh--&gt;"><code> $ echo &quot;\f\x f (f (f x))&quot; &gt; three
<pre><code> $ echo &quot;\f\x f (f (f x))&quot; &gt; three
$ cat parse.Blc three | ./tromp
000001110011100111010</code></pre>
<h3 id="converting-between-bits-and-bytes">Converting between bits and bytes</h3>
@@ -378,21 +379,21 @@ translates single-letter-variable lambda calculus into BLC:</p>
BLC and BLC8. If you assemble a byte oriented program, you’ll need to compact it
into BLC8:</p>
<p>So we could assemble an input reversing program as</p>
<pre class="&lt;!---sh--&gt;"><code> echo &quot;\a a ((\b b b) (\b \c \d \e d (b b) (\f f c e))) (\b \c c)&quot; &gt; reverse
<pre><code> echo &quot;\a a ((\b b b) (\b \c \d \e d (b b) (\f f c e))) (\b \c c)&quot; &gt; reverse
cat parse.Blc reverse | ./tromp &gt; reverse.blc</code></pre>
<p>and change it to BLC8 with</p>
<pre class="&lt;!---sh--&gt;"><code> $ cat deflate.Blc reverse.blc | ./tromp &gt; rev.Blc
<pre><code> $ cat deflate.Blc reverse.blc | ./tromp &gt; rev.Blc
$ wc rev.Blc
0 1 9 rev.Blc</code></pre>
<p>and then try it out with:</p>
<pre class="&lt;!---sh--&gt;"><code> $ cat rev.Blc - | ./tromp
<pre><code> $ cat rev.Blc - | ./tromp
Hello, world!
^D
!dlrow ,olleH</code></pre>
<h3 id="symbolic-lambda-calculus-reduction">Symbolic Lambda Calculus reduction</h3>
<p>BLC8 program <code>symbolic.Blc</code> shows individual reduction steps on symbolic lambda terms.
Here it is used to show the calculation of 2^3 in Church numerals:</p>
<pre class="&lt;!---sh--&gt;"><code> $ echo &quot;(\f\x f (f (f x))) (\f\x f (f x))&quot; &gt; threetwo
<pre><code> $ echo &quot;(\f\x f (f (f x))) (\f\x f (f x))&quot; &gt; threetwo
$ cat parse.Blc threetwo | ./tromp &gt; threetwo.blc
$ cat symbolic.Blc threetwo.blc | ./tromp
(\a \b a (a (a b))) (\a \b a (a b))
@@ -415,11 +416,11 @@ numeral</a> 8.</p>
<p>Taking only the first line of output gives us a sort of BLC disassembler, an
exact inverse of the above assembler. The prime number sieve disassembles as
follows:</p>
<pre class="&lt;!---sh--&gt;"><code> $ cat symbolic.Blc primes.blc | ./tromp | head -1
<pre><code> $ cat symbolic.Blc primes.blc | ./tromp | head -1
\a (\b b (b ((\c c c) (\c \d \e e (\f \g g) ((\f c c f ((\g g g) (\g f (g g)))) (\f \g \h \i i g (h (d f))))) (\c \d \e b (e c))))) (\b \c c (\d \e d) b)</code></pre>
<p>Hardly any less obfuscated…</p>
<p>The last line of</p>
<pre class="&lt;!---sh--&gt;"><code> cat symbolic.Blc primes.blc | ./tromp | head -16</code></pre>
<pre><code> cat symbolic.Blc primes.blc | ./tromp | head -16</code></pre>
<p>starts out as</p>
<pre><code> \a \b b (\c \d c) (\c c (\d \e d) (\d d (\e \f f) (\e e (\f \g g) ((\f (\g \h \i</code></pre>
<p>The <code>\a</code> is for ignoring the rest of the input (to which the universal machine
@@ -444,7 +445,7 @@ Syntax</a> which relies on the highly optimized
Haskell runtime system for evaluation. Of course individual BLC programs running
under the interpreter perform much worse than that same program written in Haskell.</p>
<p>Our interpreter copes well with extra levels of interpretation:</p>
<pre class="&lt;!---sh--&gt;"><code> $ time cat primes.blc | ./tromp -b | head -c 210 &gt; /dev/null
<pre><code> $ time cat primes.blc | ./tromp -b | head -c 210 &gt; /dev/null
real 0m0.043s
$ time cat uni.blc primes.blc | ./tromp -b | head -c 210 &gt; /dev/null
real 0m0.191s
@@ -527,10 +528,10 @@ Higher Order Symbol. Comput. 20, 3 (September 2007), 199-207.
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/tromp/primes.pl">primes.pl</a> - post process tromp output to print primes</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/tromp/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/tromp/hw.bf">hw.bf</a> - bf source code</li>
<li><a href="2012_tromp.tar.bz2">2012_tromp.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_tromp.tar.bz2">2012_tromp.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/2012/tromp/README.md">README.md</a> - markdown source for this web page</li>
<li><a href="bf.Blc">bf.Blc</a> - sample input</li>
+1 -1
View File
@@ -67,7 +67,7 @@
},
{
"file_path" : "2012_vik.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,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>This entry requires <a href="https://www.zlib.net">Zlib</a>.</p>
<p>There is an alternate version which might work for Windows. See <a href="#alternate-code">Alternate
code</a> section below.</p>
@@ -151,21 +152,21 @@ code</a> section below.</p>
<p>For more detailed information see <a href="../../bugs.html#2012_vik">2012 vik bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<p>To embed text (from file or command line):</p>
<pre class="&lt;!---sh--&gt;"><code> ./vik e base.png filename &gt; encodedimg.png</code></pre>
<pre><code> ./vik e base.png filename &gt; encodedimg.png</code></pre>
<p>or</p>
<pre class="&lt;!---sh--&gt;"><code> ./vik e base.png SomeRandomText &gt; encodedimg.png</code></pre>
<pre><code> ./vik e base.png SomeRandomText &gt; encodedimg.png</code></pre>
<p>To extract the embedded text:</p>
<pre class="&lt;!---sh--&gt;"><code> ./vik d encodedimg.png</code></pre>
<pre><code> ./vik d encodedimg.png</code></pre>
<p>To embed a PNG into another:</p>
<pre class="&lt;!---sh--&gt;"><code> ./vik e base.png source.png &gt; encodedimg.png</code></pre>
<pre><code> ./vik e base.png source.png &gt; encodedimg.png</code></pre>
<p>To extract the embedded PNG:</p>
<pre class="&lt;!---sh--&gt;"><code> ./vik d encodedimg.png &gt; restored.png</code></pre>
<pre><code> ./vik d encodedimg.png &gt; restored.png</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>For those few who might use Windows this alternate code might work.</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>vik.alt</code> as you would <code>vik</code> above.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
@@ -196,12 +197,12 @@ into another image and extracted, the bitmap data is also a valid
possible to get the bitmap data from the extracted image, and run it through any
of the previous winning brainfuck interpreters, but I thought it would be easier
to include an interpreter in the program to avoid the hassle:</p>
<pre class="&lt;!---sh--&gt;"><code> ./vik e ioccc.png chocolate.png &gt; encodedimg.png
<pre><code> ./vik e ioccc.png chocolate.png &gt; encodedimg.png
./vik b encodedimg.png</code></pre>
<p>It is of course also possible to embed a
<a href="https://en.wikipedia.org/wiki/Brainfuck">brainfuck</a> program as a text file
(as explained above) and decode it, e.g.:</p>
<pre class="&lt;!---sh--&gt;"><code> ./vik e ioccc.png .+[.+] &gt; encodedimg.png
<pre><code> ./vik e ioccc.png .+[.+] &gt; encodedimg.png
./vik b encodedimg.png</code></pre>
<h3 id="obfuscation">Obfuscation</h3>
<p>I really wanted to keep the program simple, so instead of adding multiple macros
@@ -221,7 +222,7 @@ binary data to <code>stdout</code>.</p>
compile the program on this platform, the following line can be added after
the variable declarations in the main declaration in order to run
correctly:</p>
<pre class="&lt;!---c--&gt;"><code> _setmode(_fileno(stdout), 0x8000);</code></pre>
<pre><code> _setmode(_fileno(stdout), 0x8000);</code></pre>
<p>NOTE: this is what the <a href="#alternate-code">Alternate code</a> does.</p>
<h3 id="limitations">Limitations</h3>
<p>The program doesn’t have many error checks so passing in invalid arguments
@@ -275,10 +276,10 @@ pretty good) design of the code.</p>
<li><a href="chocolate.png">chocolate.png</a> - encoding image</li>
<li><a href="ioccc.png">ioccc.png</a> - encoding image</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/vik/try.sh">try.sh</a> - how to run</li>
<li><a href="2012_vik.tar.bz2">2012_vik.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_vik.tar.bz2">2012_vik.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/2012/vik/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/2012/vik/.entry.json">.entry.json</a> - description of entry in JSON</li>
+1 -1
View File
@@ -147,7 +147,7 @@
},
{
"file_path" : "2012_zeitak.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,16 +142,16 @@ 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>
<p>There is an alternate version that is slightly deobfuscated. See <a href="#alternate-code">alternate
code</a> below.</p>
<h2 id="to-use">To use:</h2>
<pre class="&lt;!---sh--&gt;"><code> ./zeitak &lt; file</code></pre>
<pre><code> ./zeitak &lt; file</code></pre>
<p>where <code>file</code> is the file to be checked for nesting errors. For example, you may
try <a href="incorrect.c">incorrect.c</a> and the program itself. You may also run it on
text files that are not code.</p>
<h2 id="try">Try:</h2>
<pre class="&lt;!---sh--&gt;"><code> make test</code></pre>
<pre><code> make test</code></pre>
<p>NOTE: the program prints an error and exits on the first nesting error so it
will not detect multiple issues.</p>
<h2 id="alternate-code">Alternate code:</h2>
@@ -158,7 +159,7 @@ will not detect multiple issues.</p>
deobfuscated by the author. You may find reading it helpful in your attempt to
understand this extremely subtle 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>zeitak.alt</code> as you would <code>zeitak</code> above.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
@@ -188,7 +189,7 @@ around it’s position.</p>
<li>Ignores parenthesis inside strings or character constants, so no errors
will be detected in the following line:</li>
</ul>
<pre class="&lt;!---c--&gt;"><code> printf(&quot;)&quot;);</code></pre>
<pre><code> printf(&quot;)&quot;);</code></pre>
<ul>
<li>Doesn’t get confused by the <a href="../../1984/anonymous/index.html">1984/anonymous</a> entry!</li>
</ul>
@@ -197,7 +198,7 @@ will be detected in the following line:</li>
<li>Escapes (e.g. <code>\"</code>) are ignored, so the following line will produce
an error:</li>
</ul>
<pre class="&lt;!---c--&gt;"><code> printf(&quot;\&quot;&quot;);</code></pre>
<pre><code> printf(&quot;\&quot;&quot;);</code></pre>
<h4 id="obfuscation">Obfuscation</h4>
<p><a href="../../years.html">IOCCC entries</a> already contain entries without digits, control-flow
keywords and certain operators in their source. This entry has an
@@ -273,10 +274,10 @@ at least two bytes long.</p></li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/zeitak/incorrect.quote-esc.c">incorrect.quote-esc.c</a> - example source with incorrect quote escape</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/zeitak/incorrect.single.quote.c">incorrect.single.quote.c</a> - example source with incorrect single quote</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/zeitak/incorrect.txt">incorrect.txt</a> - example source with incorrect text</li>
<li><a href="2012_zeitak.tar.bz2">2012_zeitak.tar.bz2</a> - download entry tarball</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2012_zeitak.tar.bz2">2012_zeitak.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/2012/zeitak/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/2012/zeitak/.entry.json">.entry.json</a> - description of entry in JSON</li>