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="<!---sh-->"><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:
1 parent
a672335d2d
commit
518a6336d0
734 files changed
+7919
-4119
No files matched your search
@@ -275,7 +275,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_birken.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
+13
-12
@@ -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,12 +142,12 @@ 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="<!---sh-->"><code> make alt</code></pre>
|
||||
<pre><code> make alt</code></pre>
|
||||
<p>We recommend that you use the alt version first to see what this entry looked
|
||||
like back in 2013 (with a configurable speed). If you wish to use the original
|
||||
version see the <a href="#original-code">original code</a> section below.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./birken.alt < 17_columns_wide_paint_by_numbers_file</code></pre>
|
||||
<pre><code> ./birken.alt < 17_columns_wide_paint_by_numbers_file</code></pre>
|
||||
<p>NOTE: if your terminal is messed up after running this (perhaps from exiting
|
||||
before it finishes) try using <code>reset</code> to restore the terminal. This will clear
|
||||
the screen.</p>
|
||||
@@ -157,7 +158,7 @@ be problematic for some people, can be configured to different speeds by way of
|
||||
the value used in <code>usleep(3)</code>. The default is <code>13500</code> but you can reconfigure
|
||||
it should you wish (see below).</p>
|
||||
<p>To see the program run on each text file, try:</p>
|
||||
<pre class="<!---sh-->"><code> ./try.alt.sh</code></pre>
|
||||
<pre><code> ./try.alt.sh</code></pre>
|
||||
<p>If you have perl installed it will also try a random run.</p>
|
||||
<p>Finding the ‘right’ default value was a fine line; the default, 15000
|
||||
microseconds (0.015 seconds), will take quite a while to finish but it allows
|
||||
@@ -165,29 +166,29 @@ one to more easily see what is going on. Even easier to see would be 25000 but
|
||||
these values make it quite slow and one could easily lose interest. Like some
|
||||
other entries where this was made an alternate version it is configurable at
|
||||
compile time. If you wish to speed it up by 100% you can instead do:</p>
|
||||
<pre class="<!---sh-->"><code> make clobber SLEEP=7500 alt</code></pre>
|
||||
<pre><code> make clobber SLEEP=7500 alt</code></pre>
|
||||
<p>and then try <code>birken.alt</code> as above.</p>
|
||||
<p>If you wish to speed that up 200% (300% total) you can use instead try
|
||||
<code>SLEEP=3750</code>. Doing this you might find the right value to your liking; use
|
||||
ctrl-c to terminate the program early but note that the terminal is likely to be
|
||||
messed up. In that case try:</p>
|
||||
<pre class="<!---sh-->"><code> reset</code></pre>
|
||||
<pre><code> reset</code></pre>
|
||||
<p>to make it sane again (running to completion will do that for you).</p>
|
||||
<h2 id="original-code">Original code:</h2>
|
||||
<p>The original code will run faster with modern systems which is likely to make it
|
||||
hard to see the art of the entry but you may do so if you wish.</p>
|
||||
<h3 id="original-build">Original build:</h3>
|
||||
<pre class="<!---sh-->"><code> make all</code></pre>
|
||||
<pre><code> make all</code></pre>
|
||||
<h3 id="original-use">Original use:</h3>
|
||||
<p>Use <code>birken</code> as you would <code>birken.alt</code> above.</p>
|
||||
<h3 id="original-try">Original try:</h3>
|
||||
<p>To use the demo script with the original code, try:</p>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>PLEASE be careful if you are sensitive to flashing colours!</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This program also wins the “Most amusing abuse of the iocccsize tool” award;
|
||||
although not the absolute best: it is possible to achieve 0 by writing:</p>
|
||||
<pre class="<!---c-->"><code> /* *\
|
||||
<pre><code> /* *\
|
||||
/....</code></pre>
|
||||
<p>The game of Tetris had been used in many endeavors, from studying <a href="http://arxiv.org/abs/cs/0210020">algorithmic
|
||||
complexity</a> to <a href="http://www.livescience.com/19894-tetris-treat-ptsd-flashbacks.html">treating
|
||||
@@ -346,11 +347,11 @@ call to <code>fflush(3)</code> (N.B: see <a href="birken.alt.c">birken.alt.c</a>
|
||||
<code>2013-07-30-v17</code>. The first line of the program is reproduced below.</p>
|
||||
<p>char<em>_ = “’”“/</em>”;</p>
|
||||
<p>If that line is added to the top of any program, the tool will report a size of 8.</p>
|
||||
<pre class="<!---sh-->"><code> $ ./iocccsize -i < prog.c
|
||||
<pre><code> $ ./iocccsize -i < prog.c
|
||||
8</code></pre>
|
||||
<p>When that line is deleted from this program, the tool properly reports the
|
||||
secondary size limit of the program as 2048.</p>
|
||||
<pre class="<!---sh-->"><code> $ ./iocccsize -i < birken.c
|
||||
<pre><code> $ ./iocccsize -i < birken.c
|
||||
2048</code></pre>
|
||||
<p>Although this bug provides an easy means of circumventing contest rule 2, as
|
||||
demonstrated from the size value, this entry is not necessarily striving for a
|
||||
@@ -371,7 +372,7 @@ Pajitnov</a>’s original 1984
|
||||
<p>Carefully selected variable names also yielded wonderful expressions like <code>l=0</code>,
|
||||
<code>O=0</code>, <code>O=1</code> and <code>while(O)</code>. <code>"Tetris"</code> also makes a second appearance of
|
||||
sorts:</p>
|
||||
<pre class="<!---c-->"><code> [T][e][t]--; while(R+i) { s</code></pre>
|
||||
<pre><code> [T][e][t]--; while(R+i) { s</code></pre>
|
||||
<p>The source is formatted to resemble the
|
||||
<a href="https://en.wikipedia.org/wiki/Tetris">Tetris</a> play-field mid-game. It is also
|
||||
an homage to all the <a href="../../years.html">past IOCCC entries</a> formatted as a compact
|
||||
@@ -578,10 +579,10 @@ Brothers 2, Nintendo, 1987.</p></li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/toad.txt">toad.txt</a> - sprites in this textual format</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/birken/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/2013/birken/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2013_birken.tar.bz2">2013_birken.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_birken.tar.bz2">2013_birken.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/2013/birken/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/2013/birken/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_cable1.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
+11
-10
@@ -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,28 +142,28 @@ 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="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./cable1 name group1 group2</code></pre>
|
||||
<pre><code> ./cable1 name group1 group2</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Partisan may be defined as a strong supporter of a cause, party or person.
|
||||
We need not limit ourselves to the two major political parties in the US today.</p>
|
||||
<p>Let us consider:</p>
|
||||
<pre class="<!---sh-->"><code> ./cable1 Cooper Mac PC</code></pre>
|
||||
<pre><code> ./cable1 Cooper Mac PC</code></pre>
|
||||
<p>Simon works for Apple, so you would expect Mac. :-)
|
||||
Landon is a long time Mac user:</p>
|
||||
<pre class="<!---sh-->"><code> ./cable1 Noll Mac PC</code></pre>
|
||||
<pre><code> ./cable1 Noll Mac PC</code></pre>
|
||||
<p>That works too! Now Leo brings PCs to the IOCCC judging for cross-platform
|
||||
testing:</p>
|
||||
<pre class="<!---sh-->"><code> ./cable1 Broukhis Mac PC</code></pre>
|
||||
<pre><code> ./cable1 Broukhis Mac PC</code></pre>
|
||||
<p>We can test other people. The late Steve Jobs:</p>
|
||||
<pre class="<!---sh-->"><code> ./cable1 Jobs Mac PC</code></pre>
|
||||
<pre><code> ./cable1 Jobs Mac PC</code></pre>
|
||||
<p>That works! How about Bill?</p>
|
||||
<pre class="<!---sh-->"><code> ./cable1 Gates Mac PC</code></pre>
|
||||
<pre><code> ./cable1 Gates Mac PC</code></pre>
|
||||
<p>A PC guy as expected. What about that other Steve?</p>
|
||||
<pre class="<!---sh-->"><code> ./cable1 Ballmer Mac PC</code></pre>
|
||||
<pre><code> ./cable1 Ballmer Mac PC</code></pre>
|
||||
<p>Humm .. maybe there is a hidden reason he is leaving the late Micro$oft? :-)
|
||||
Why late? Because:</p>
|
||||
<figure>
|
||||
@@ -231,10 +232,10 @@ function declarations are invalid in C99 (but still accepts them).</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/cable1.orig.c">cable1.orig.c</a> - original source</li>
|
||||
<li><a href="dead-ms-tweet.jpg">dead-ms-tweet.jpg</a> - tweet image</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable1/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2013_cable1.tar.bz2">2013_cable1.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_cable1.tar.bz2">2013_cable1.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/2013/cable1/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/2013/cable1/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_cable2.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
@@ -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#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="<!---sh-->"><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#2013_cable2">2013 cable2 bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./cable2 file.bmp [color]</code></pre>
|
||||
<pre><code> ./cable2 file.bmp [color]</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>For different OCR examples:</p>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>We can confirm that this is the first time the IOCCC has been used
|
||||
to peer-review a new research. We had quite a bit of fun with a sharpie and a
|
||||
@@ -277,10 +278,10 @@ obfuscations.</p>
|
||||
<li><a href="mixed_sizes.bmp">mixed_sizes.bmp</a> - PC bitmap image</li>
|
||||
<li><a href="multi_color.bmp">multi_color.bmp</a> - PC bitmap image</li>
|
||||
<li><a href="typeset.bmp">typeset.bmp</a> - PC bitmap image</li>
|
||||
<li><a href="2013_cable2.tar.bz2">2013_cable2.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_cable2.tar.bz2">2013_cable2.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/2013/cable2/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/2013/cable2/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_cable3.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
+12
-11
@@ -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="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<p>An alternate version that should compile in Windows/MS Visual Studio is
|
||||
available. See the <a href="#alternate-code">Alternate code</a> section below.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./cable3 bios-image-file floppy-image-file [harddisk-image-file]</code></pre>
|
||||
<pre><code> ./cable3 bios-image-file floppy-image-file [harddisk-image-file]</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./cable3.sh</code></pre>
|
||||
<pre><code> ./cable3.sh</code></pre>
|
||||
<p>NOTE: to quit the program type <code>QUITEMU</code>. You might have to be at the top level
|
||||
directory of the drive, <code>A:</code> or <code>C:</code>.</p>
|
||||
<p>To send an <code>Alt+XXX</code> key combination, press (<code>^A</code> / <code>Ctrl+A</code>) then the key, so
|
||||
@@ -162,7 +163,7 @@ combinations are left for the discovery of the user.</p>
|
||||
<p>An alternate version, which should compile in Windows, is provided.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>Assuming <code>make</code> is available and will function:</p>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<pre><code> make alt</code></pre>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>cable3.alt</code> as you would <code>cable3</code> above.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
@@ -264,7 +265,7 @@ has no <code>stty</code>. Therefore the Makefile includes a <code>-D</code> opti
|
||||
non-UNIX platforms. For example, for Windows/MS Visual Studio, instead of the
|
||||
Makefile definition of KB, use something slightly different - add the following
|
||||
entry to the Preprocessor Definitions list in the Project Properties page:</p>
|
||||
<pre class="<!---c-->"><code> KB=(kb=H(8),kbhit())&&(r[1190]=getch(),H(7))</code></pre>
|
||||
<pre><code> KB=(kb=H(8),kbhit())&&(r[1190]=getch(),H(7))</code></pre>
|
||||
<p>NOTE: this is done in the <a href="#alternate-code">Alternate code</a>.</p>
|
||||
<h3 id="posix-portability-note">POSIX portability note</h3>
|
||||
<p>The code as supplied uses implicit function declarations for POSIX file I/O and
|
||||
@@ -273,14 +274,14 @@ architecture. For some systems (e.g. 32-bit Mac OS X, which uses 64-bit file
|
||||
offsets) this is not the case, and to run successfully on these systems, you
|
||||
will need to explicitly declare these functions by adding the appropriate
|
||||
include to the top of the source:</p>
|
||||
<pre class="<!---c-->"><code> #include <unistd.h></code></pre>
|
||||
<pre><code> #include <unistd.h></code></pre>
|
||||
<p>NOTE: this has been done in <a href="cable3.c">cable3.c</a>.</p>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<pre class="<!---sh-->"><code> ./cable3 bios-image-file floppy-image-file [harddisk-image-file]</code></pre>
|
||||
<pre><code> ./cable3 bios-image-file floppy-image-file [harddisk-image-file]</code></pre>
|
||||
<p>PLEASE NOTE that under Unices the keyboard must be in raw mode for the emulator
|
||||
to work properly. Therefore the emulator is best run from a shell script that
|
||||
looks something like:</p>
|
||||
<pre class="<!---sh-->"><code> stty cbreak raw -echo min 0
|
||||
<pre><code> stty cbreak raw -echo min 0
|
||||
./cable3 bios floppy.img harddisk.img
|
||||
stty cooked echo</code></pre>
|
||||
<p>See the <a href="cable3.sh">cable3.sh</a> script.</p>
|
||||
@@ -291,7 +292,7 @@ the <code>fd.img</code> provided, which is a FreeDOS boot disk.</p>
|
||||
put the keyboard into raw mode (and afterwards it needs to be put back to
|
||||
cooked). So, run the emulator using something like this script (provided as
|
||||
<a href="cable3.sh">cable3.sh</a>):</p>
|
||||
<pre class="<!---sh-->"><code> stty cbreak raw -echo min 0
|
||||
<pre><code> stty cbreak raw -echo min 0
|
||||
./cable3 bios fd.img
|
||||
stty cooked echo</code></pre>
|
||||
<h2 id="to-use-the-emulator---floppy-hd-mode">To use the emulator - floppy + HD mode</h2>
|
||||
@@ -299,7 +300,7 @@ cooked). So, run the emulator using something like this script (provided as
|
||||
whole bunch of software which is in the included file <code>hd.img</code>.</p>
|
||||
<p>For the more adventurous, you can start off with (for example) a blank 40MB
|
||||
image file called hd.img made using e.g. Makefile. Then use:</p>
|
||||
<pre class="<!---sh-->"><code> stty cbreak raw -echo min 0
|
||||
<pre><code> stty cbreak raw -echo min 0
|
||||
./cable3 bios fd.img hd.img
|
||||
stty cooked echo</code></pre>
|
||||
<p>Preparing the hard disk for use in the emulator is done just like a real PC.
|
||||
@@ -525,10 +526,10 @@ the source size down. Other compilers are likely to produce similar warnings.</p
|
||||
<li><a href="screenshot_win3_on_macosx.png">screenshot_win3_on_macosx.png</a> - Screenshots of some applications running on macOS</li>
|
||||
<li><a href="sc-ioccc.terminal">sc-ioccc.terminal</a> - configuration file will correctly display console apps</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/cable3/bios.asm">bios.asm</a> - BIOS source in assembly</li>
|
||||
<li><a href="2013_cable3.tar.bz2">2013_cable3.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_cable3.tar.bz2">2013_cable3.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/2013/cable3/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="bios">bios</a> - custom BIOS</li>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_dlowe.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
+11
-10
@@ -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,30 +142,30 @@ 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="<!---sh-->"><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#2013_dlowe">2013 dlowe bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./dlowe [number...]</code></pre>
|
||||
<pre><code> ./dlowe [number...]</code></pre>
|
||||
<p>where <code>[number...]</code> is one or more number, space separated.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>What is different about the above if you do something like:</p>
|
||||
<pre class="<!---sh-->"><code> echo 'IOCCC winning entry 2013/dlowe' > ioccc.txt
|
||||
<pre><code> echo 'IOCCC winning entry 2013/dlowe' > ioccc.txt
|
||||
./try.sh
|
||||
rm -f ioccc.txt</code></pre>
|
||||
<p>?</p>
|
||||
<p>To make it simpler to see try showing just the different line like:</p>
|
||||
<pre class="<!---sh-->"><code> ./diff.sh</code></pre>
|
||||
<pre><code> ./diff.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>We liked how this entry used Unicode, specifically UTF-8, in a somewhat
|
||||
obfuscated way.</p>
|
||||
<p>Also, why doesn’t it crash but instead produces a correct output when called
|
||||
with one argument or when all arguments are equal?</p>
|
||||
<p>For extra fun, compile and run <a href="fun.c">fun.c</a>:</p>
|
||||
<pre class="<!---c-->"><code> #include <stdio.h>
|
||||
<pre><code> #include <stdio.h>
|
||||
int main() {
|
||||
printf("%d %d %d\n", (int)(-1.0/0.0), (int)(0.0/0.0), (int)(1.0/0.0));
|
||||
}</code></pre>
|
||||
@@ -178,19 +179,19 @@ with one argument or when all arguments are equal?</p>
|
||||
<p>Which one is correct? :)</p>
|
||||
<p>NOTE: <code>make all</code> will compile <a href="fun.c">fun.c</a> but to provide a different compiler
|
||||
you can do something like:</p>
|
||||
<pre class="<!---sh-->"><code> make CC=clang fun</code></pre>
|
||||
<pre><code> make CC=clang fun</code></pre>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="sparkl">sparkl</h3>
|
||||
<p>A tiny implementation of command-line
|
||||
<a href="https://en.wikipedia.org/wiki/Sparkline">sparkline</a> data visualization.</p>
|
||||
<h3 id="synopsis">Synopsis</h3>
|
||||
<pre class="<!---sh-->"><code> $ ./sparkl 0 1 2 3 4 5 6 7
|
||||
<pre><code> $ ./sparkl 0 1 2 3 4 5 6 7
|
||||
▁▂▃▄▅▆▇▉
|
||||
|
||||
$ echo "sparkline of file lengths: $(wc -c * | awk '{print $1}' | xargs ./sparkl)"
|
||||
sparkline of file sizes: ▁▁▁▃▃▂▁▂▁▁▉</code></pre>
|
||||
<p>NOTE: this has been provided in <a href="slflen.sh">slflen.sh</a> so you can try:</p>
|
||||
<pre class="<!---sh-->"><code> ./slflen.sh</code></pre>
|
||||
<pre><code> ./slflen.sh</code></pre>
|
||||
<p>instead (which <a href="try.sh">try.sh</a> also uses).</p>
|
||||
<h3 id="description">Description</h3>
|
||||
<p>This is a handy little tool for visualizing numeric series from the
|
||||
@@ -249,10 +250,10 @@ implementation is completely independent.)</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/fun.c">fun.c</a> - compile and run for extra run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/slflen.sh">slflen.sh</a> - generate sparkline of file lengths</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/dlowe/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2013_dlowe.tar.bz2">2013_dlowe.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_dlowe.tar.bz2">2013_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/2013/dlowe/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/2013/dlowe/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_endoh1.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
+13
-12
@@ -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#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="<!---sh-->"><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#2013_endoh1">2013 endoh1 bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./endoh1 [file.lazy]</code></pre>
|
||||
<pre><code> ./endoh1 [file.lazy]</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>You might also enjoy running:</p>
|
||||
<pre class="<!---sh-->"><code> cc -E endoh1.c | less</code></pre>
|
||||
<pre><code> cc -E endoh1.c | less</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>We liked this entry because it can serve as a standalone program as well as an
|
||||
include file; and, as usual, because its input data is at least as obfuscated as
|
||||
@@ -160,7 +161,7 @@ the program itself.</p>
|
||||
4x longer to compile it with -O3 than without, compared to clang’s 2x.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="remarks">Remarks</h3>
|
||||
<pre class="<!---sh-->"><code> less endoh1.c
|
||||
<pre><code> less endoh1.c
|
||||
gcc -o endoh1 endoh1.c
|
||||
./endoh1</code></pre>
|
||||
<p>… Isn’t there any more to it?</p>
|
||||
@@ -169,12 +170,12 @@ the program itself.</p>
|
||||
especially, <a href="https://tromp.github.io/cl/lazy-k.html">Lazy K</a>.</p>
|
||||
<p>This program will shine when it is used as a library. For example,
|
||||
<a href="hello.lazy">hello.lazy</a> is a “Hello world” program written in Lazy K.</p>
|
||||
<pre class="<!---sh-->"><code> $ lazy hello.lazy
|
||||
<pre><code> $ lazy hello.lazy
|
||||
Hello, world!</code></pre>
|
||||
<p>where <code>lazy</code> is <a href="https://github.com/irori/lazyk">a reference implementation of Lazy K</a>. At the same time,
|
||||
<a href="hello.lazy">hello.lazy</a> is <em>a valid C program</em> that uses <a href="endoh1.c">endoh1.c</a>
|
||||
as a library.</p>
|
||||
<pre class="<!---sh-->"><code> $ gcc -o hello -xc hello.lazy
|
||||
<pre><code> $ gcc -o hello -xc hello.lazy
|
||||
$ ./hello
|
||||
Hello, world!</code></pre>
|
||||
<p>In other words, this program is a kind of <a href="http://en.wikipedia.org/wiki/Polyglot_%28computing%29">polyglot</a>.</p>
|
||||
@@ -210,7 +211,7 @@ section</a>.</p>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<p>Recent compilers with <code>-Wall -W -Wextra -pedantic</code> say nothing.</p>
|
||||
<pre class="<!---sh-->"><code> gcc -Wall -W -Wextra -pedantic prog.c
|
||||
<pre><code> gcc -Wall -W -Wextra -pedantic prog.c
|
||||
clang -Wall -W -Wextra -pedantic prog.c
|
||||
tcc -Wall -W -Wextra -pedantic prog.c</code></pre>
|
||||
<p>I think it will work on almost all platforms. I confirmed:</p>
|
||||
@@ -235,11 +236,11 @@ evaluates it.</p>
|
||||
combinator calculus. The rewriting rules are shown in the shape of the code.</p>
|
||||
<h4 id="abuse-of-function-pointers">Abuse of function pointers</h4>
|
||||
<p>Consider a sequence of function applications in C:</p>
|
||||
<pre class="<!---c-->"><code> s(x)(x)(x)(x)...</code></pre>
|
||||
<pre><code> s(x)(x)(x)(x)...</code></pre>
|
||||
<p>What type should <code>s</code> have? Unfortunately, C does <em>not</em> provide a “recursive
|
||||
type”, such as <code>typedef f (*f)();</code>.</p>
|
||||
<p>So, I used a heavily nested function pointer type:</p>
|
||||
<pre class="<!---c-->"><code> typedef void *(*(*(*...(*(f))()...)())())</code></pre>
|
||||
<pre><code> typedef void *(*(*(*...(*(f))()...)())())</code></pre>
|
||||
<p>This limits how many arguments one function can be consecutively applied to.
|
||||
But you can increase the number by tweaking the definition of macro <code>p</code>.</p>
|
||||
<h4 id="code-duplication-by-macros">Code duplication by macros</h4>
|
||||
@@ -255,7 +256,7 @@ environment which is a reference to non-local variable.</p>
|
||||
(It is feasible by dynamic code generation, but it is far from portable.)</p>
|
||||
<p>So, I addressed this issue by generating many function definitions
|
||||
statically by (ab)using macros:</p>
|
||||
<pre class="<!---c-->"><code> void *x1; void f1(void *y) { return apply(x1, y); }
|
||||
<pre><code> void *x1; void f1(void *y) { return apply(x1, y); }
|
||||
void *x2; void f2(void *y) { return apply(x2, y); }
|
||||
void *x3; void f3(void *y) { return apply(x3, y); }
|
||||
...
|
||||
@@ -301,10 +302,10 @@ solver</a>.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/hello.lazy">hello.lazy</a> - lazy input</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/rot13.ed">rot13.ed</a> - ed script</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh1/tac.lazy">tac.lazy</a> - lazy input</li>
|
||||
<li><a href="2013_endoh1.tar.bz2">2013_endoh1.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_endoh1.tar.bz2">2013_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/2013/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/2013/endoh1/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_endoh2.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
@@ -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,9 +142,9 @@ 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="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> make check</code></pre>
|
||||
<pre><code> make check</code></pre>
|
||||
<p>You’ll need to have both <a href="https://www.ruby-lang.org">Ruby</a> and
|
||||
<a href="https://imagemagick.org/">ImageMagick</a> installed to run all the automated
|
||||
checks.</p>
|
||||
@@ -152,7 +153,7 @@ section to enjoy the entry. The <a href="Makefile">Makefile</a> <code>check</cod
|
||||
you have both and if either is not found it will report it and tell you where to
|
||||
download one or both before exiting.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> less jpeg.c</code></pre>
|
||||
<pre><code> less jpeg.c</code></pre>
|
||||
<p>Next look at <code>jpeg.jpg</code> in an image viewer program.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This is a program which, when fed its own source, generates a program that
|
||||
@@ -232,10 +233,10 @@ which is distributed in MIT License:</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/endoh2.orig.c">endoh2.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh2/ocr.rb">ocr.rb</a> - test suite support file</li>
|
||||
<li><a href="2013_endoh2.tar.bz2">2013_endoh2.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_endoh2.tar.bz2">2013_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/2013/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/2013/endoh2/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_endoh3.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
+12
-11
@@ -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="<!---sh-->"><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#2013_endoh3">2013 endoh3 bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./endoh3</code></pre>
|
||||
<pre><code> ./endoh3</code></pre>
|
||||
<p>This program plays sound. See <a href="../../faq.html#sox">FAQ 3.10 - How do I compile and use an IOCCC
|
||||
entry that requires sound?</a> if you do not know how to set your
|
||||
system up for this or if you want to verify that everything is oky.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh
|
||||
<pre><code> ./try.sh
|
||||
|
||||
./try.sh ABC
|
||||
|
||||
@@ -180,20 +181,20 @@ will remain the same for historical purposes.</p>
|
||||
<p>This is a sound synthesizer for a subset of <a href="http://en.wikipedia.org/wiki/ABC_notation">ABC music
|
||||
notation</a>.</p>
|
||||
<p>Try:</p>
|
||||
<pre class="<!---sh-->"><code> cc -o endoh3 endoh3.c
|
||||
<pre><code> cc -o endoh3 endoh3.c
|
||||
echo "CDEFGABc" | ./endoh3 > /dev/dsp</code></pre>
|
||||
<p>If <code>/dev/dsp</code> is not available on your system, use an OSS sound wrapper such
|
||||
as <code>padsp</code> or <code>aoss</code>:</p>
|
||||
<pre class="<!---sh-->"><code> echo "CDEFGABc" | ./endoh3 | padsp tee /dev/dsp > /dev/null</code></pre>
|
||||
<pre><code> echo "CDEFGABc" | ./endoh3 | padsp tee /dev/dsp > /dev/null</code></pre>
|
||||
<p>If you are using Mac OS X, try <a href="http://sox.sourceforge.net/">sox</a> like so:</p>
|
||||
<pre class="<!---sh-->"><code> echo "CDEFGABc" | ./endoh3 | sox -q -traw -r8000 -b8 -e unsigned-integer - -tcoreaudio</code></pre>
|
||||
<pre><code> echo "CDEFGABc" | ./endoh3 | sox -q -traw -r8000 -b8 -e unsigned-integer - -tcoreaudio</code></pre>
|
||||
<p>If that does not work, use the attached script to convert the output into a wave
|
||||
file format:</p>
|
||||
<pre class="<!---sh-->"><code> echo "CDEFGABc" | ./endoh3 | ruby wavify.rb > cde.wav</code></pre>
|
||||
<pre><code> echo "CDEFGABc" | ./endoh3 | ruby wavify.rb > cde.wav</code></pre>
|
||||
<p>and play <code>cde.wav</code>.</p>
|
||||
<p>You can also enjoy some music scores that I attached. With <code>/dev/dsp</code> you can
|
||||
do so like:</p>
|
||||
<pre class="<!---sh-->"><code> cat twinkle.abc | ./endoh3 > /dev/dsp
|
||||
<pre><code> cat twinkle.abc | ./endoh3 > /dev/dsp
|
||||
cat menuet.abc | ./endoh3 > /dev/dsp</code></pre>
|
||||
<p>but you should be able to modify it a way to meet your system requirements as
|
||||
described above.</p>
|
||||
@@ -257,7 +258,7 @@ But I do not attach it to protect you from W****r.</p>
|
||||
You know, it is <a href="http://en.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3">“the famous song”</a>.</p>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<p>Here is a magical expression which I found by brute-force:</p>
|
||||
<pre class="<!---c-->"><code> (c % 32 + 5) * 9 / 5 % 13 + n / 32 * 12 - 22</code></pre>
|
||||
<pre><code> (c % 32 + 5) * 9 / 5 % 13 + n / 32 * 12 - 22</code></pre>
|
||||
<p>Interestingly, it converts an ASCII number of ABC notes
|
||||
to the corresponding tone number.</p>
|
||||
<pre><code> 'C' (ASCII 67) => 3
|
||||
@@ -287,7 +288,7 @@ found this approximation by using the <a href="http://en.wikipedia.org/wiki/Ster
|
||||
tree</a>.) We can gain the
|
||||
frequency by multiplying the value by <code>n</code> times.</p>
|
||||
<p>Finally, the following code generates a saw wave:</p>
|
||||
<pre class="<!---c-->"><code> for(c = 0; c < len; c++) putchar(a = n * D);</code></pre>
|
||||
<pre><code> for(c = 0; c < len; c++) putchar(a = n * D);</code></pre>
|
||||
<p>where <code>D</code> is a frequency and <code>a</code> is a variable whose type is <code>char</code>. By
|
||||
assigning <code>float</code> to <code>char</code> variable, the implicit type conversion is performed
|
||||
from <code>float</code> to <code>char</code> (modulo 256).</p>
|
||||
@@ -328,10 +329,10 @@ squashing them into just one <code>for</code>-loop.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/twinkle.abc">twinkle.abc</a> - sample input</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/wavify.rb">wavify.rb</a> - post process output to form a WAV sound file</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/yankee.abc">yankee.abc</a> - sample input</li>
|
||||
<li><a href="2013_endoh3.tar.bz2">2013_endoh3.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_endoh3.tar.bz2">2013_endoh3.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/2013/endoh3/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/2013/endoh3/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -1227,7 +1227,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_endoh4.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
+13
-12
@@ -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,10 +142,10 @@ 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="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<p>If you wish to change the size (see the <a href="#authors-remarks">Author’s remarks</a>
|
||||
below) you can do so with the <code>SIZE</code> variable. For instance you can do:</p>
|
||||
<pre class="<!---sh-->"><code> make clobber SIZE=50,50 all</code></pre>
|
||||
<pre><code> make clobber SIZE=50,50 all</code></pre>
|
||||
<p>but you can also do this directly with the <a href="endoh4.sh">endoh4.sh</a> script as
|
||||
described below.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
@@ -152,22 +153,22 @@ described below.</p>
|
||||
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2013_endoh4">2013 endoh4 bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./endoh4 < file
|
||||
<pre><code> ./endoh4 < file
|
||||
./endoh4.sh file</code></pre>
|
||||
<p>The second form is preferable as it will temporarily make the cursor invisible
|
||||
as recommended by the author. If no file is specified in the <code>./endoh4.sh</code> command
|
||||
line it will feed to the program <a href="endoh4.c">endoh4.c</a>.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./endoh4.sh cube.txt</code></pre>
|
||||
<pre><code> ./endoh4.sh cube.txt</code></pre>
|
||||
<p>Hit ctrl-c to end the program.</p>
|
||||
<p>The author recommends the use of xterm.</p>
|
||||
<p>For an example, if you are a football/soccer fan, try:</p>
|
||||
<pre class="<!---sh-->"><code> ./endoh4.sh solids/archimedian-solid/a11-truncated-icosahedron.txt</code></pre>
|
||||
<pre><code> ./endoh4.sh solids/archimedian-solid/a11-truncated-icosahedron.txt</code></pre>
|
||||
<p>You can provide more than one file:</p>
|
||||
<pre class="<!---sh-->"><code> ./endoh4.sh solids/archimedian-solid/a11-truncated-icosahedron.txt cube.txt</code></pre>
|
||||
<pre><code> ./endoh4.sh solids/archimedian-solid/a11-truncated-icosahedron.txt cube.txt</code></pre>
|
||||
<p>Hit ctrl-c/intr to go to the next file.</p>
|
||||
<p>If you wish to change the size to <code>50,50</code> without passing any arg:</p>
|
||||
<pre class="<!---sh-->"><code> SIZE=50,50 ./endoh4.sh</code></pre>
|
||||
<pre><code> SIZE=50,50 ./endoh4.sh</code></pre>
|
||||
<p>Not specifying a file feeds <a href="endoh4.c">endoh4.c</a> to the program.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This program is formatted as the net for a tetrahedron (hint: try feeding the
|
||||
@@ -203,17 +204,17 @@ triangulated)</li>
|
||||
clang, and tcc. It should not trigger warnings with <code>-pedantic</code> and <code>-Wextra</code>.</p>
|
||||
<h3 id="tips">Tips</h3>
|
||||
<p>You may want to use <code>tput</code> to hide the terminal cursor.</p>
|
||||
<pre class="<!---sh-->"><code> tput civis
|
||||
<pre><code> tput civis
|
||||
./endoh4 < cube.txt
|
||||
tput cnorm</code></pre>
|
||||
<p>or</p>
|
||||
<pre class="<!---sh-->"><code> ./endoh4.sh cube.txt</code></pre>
|
||||
<pre><code> ./endoh4.sh cube.txt</code></pre>
|
||||
<h3 id="bonuses">Bonuses</h3>
|
||||
<p>You can change the screen size. Let the aspect ratio be about 3:1.</p>
|
||||
<pre class="<!---sh-->"><code> cc -DS=120,40 -o endoh4 endoh4.c</code></pre>
|
||||
<pre><code> cc -DS=120,40 -o endoh4 endoh4.c</code></pre>
|
||||
<p>The shape of this code is the geometric net of a regular tetrahedron.
|
||||
So, try:</p>
|
||||
<pre class="<!---sh-->"><code> ./endoh4 < endoh4.c # or ./endoh4.sh</code></pre>
|
||||
<pre><code> ./endoh4 < endoh4.c # or ./endoh4.sh</code></pre>
|
||||
<p>The <a href="solids/">solids/</a> directory includes various solid data:</p>
|
||||
<ul>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Platonic_solid">Platonic solids</a></li>
|
||||
@@ -403,10 +404,10 @@ They are copyrighted in CC BY-SA 3.0 by “User:Cyp” and “User:AndrewKepert
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t06-hexagonal-trapezohedron.txt">solids/trapezohedron/t06-hexagonal-trapezohedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t08-octagonal-trapezohedron.txt">solids/trapezohedron/t08-octagonal-trapezohedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/trapezohedron/t10-decagonal-trapezohedron.txt">solids/trapezohedron/t10-decagonal-trapezohedron.txt</a> - 3D object coordinates</li>
|
||||
<li><a href="2013_endoh4.tar.bz2">2013_endoh4.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_endoh4.tar.bz2">2013_endoh4.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/2013/endoh4/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/2013/endoh4/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_hou.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
@@ -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>
|
||||
|
||||
+7
-6
@@ -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#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="<!---sh-->"><code> make all</code></pre>
|
||||
<pre><code> make all</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#2013_hou">2013 hou bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./hou [scene-file-name] [options]</code></pre>
|
||||
<pre><code> ./hou [scene-file-name] [options]</code></pre>
|
||||
<p>Follow the instructions in <code>stdout</code>, preferably with an auto-refreshing PPM
|
||||
image viewer ready. Refresh the image every time the output refreshes, all
|
||||
effects should be more or less recognizable when you see 16.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>Try opening the file noted by the program then let the program run a while and
|
||||
every so often reopen the file, to see how it changes. The author suggests that
|
||||
you leave the program running overnight to see what happens. If however you do
|
||||
@@ -181,7 +182,7 @@ program.</p>
|
||||
<a href="https://en.wikipedia.org/wiki/Ray_tracing_(graphics)">raytraced</a> image.</p>
|
||||
<p>NOTE: the author refers to <a href="a.c">a.c</a>, placed in a gzipped file <code>a.c.gz</code>. We do not
|
||||
include it but it can be generated like:</p>
|
||||
<pre class="<!---sh-->"><code> cc -Wall hou.c -o hou -lm
|
||||
<pre><code> cc -Wall hou.c -o hou -lm
|
||||
./hou > a.c</code></pre>
|
||||
<p>but there is no need to do this as the Makefile takes care of it without even
|
||||
needing to create a temporary file.</p>
|
||||
@@ -189,7 +190,7 @@ needing to create a temporary file.</p>
|
||||
<h3 id="using-hou">Using hou</h3>
|
||||
<p>This program is a programmable rendering engine with a built-in default scene.
|
||||
The standard command line is:</p>
|
||||
<pre class="<!---sh-->"><code> ./hou [scene-file-name] [options]</code></pre>
|
||||
<pre><code> ./hou [scene-file-name] [options]</code></pre>
|
||||
<p>As <code>hou</code> runs, it writes a progressively refining image to a ppm file specified
|
||||
in the scene. The initialization may take a while, but once it’s done, a rough
|
||||
preview should be available in seconds. Leave <code>hou</code> running for the night, and you
|
||||
@@ -363,10 +364,10 @@ frequently found in other <code>PPM</code> implementations.</p></li>
|
||||
<li><a href="luna.jpg">luna.jpg</a> - sample image data</li>
|
||||
<li><a href="old_default.jpg">old_default.jpg</a> - sample image data</li>
|
||||
<li><a href="otherroom.jpg">otherroom.jpg</a> - sample image data</li>
|
||||
<li><a href="2013_hou.tar.bz2">2013_hou.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_hou.tar.bz2">2013_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/2013/hou/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="doc/camera.png">doc/camera.png</a> - documentation support image</li>
|
||||
|
||||
+3
-2
@@ -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>
|
||||
@@ -155,9 +156,9 @@ authors submitted very different styles of entries.</p>
|
||||
had to print a value 2053 or less when the <code>-i</code> flag was used.</p>
|
||||
<p>Several people discovered an undocumented feature in that
|
||||
certain comments such as:</p>
|
||||
<pre class="<!---c-->"><code> ///*</code></pre>
|
||||
<pre><code> ///*</code></pre>
|
||||
<p>or:</p>
|
||||
<pre class="<!---c-->"><code> *\
|
||||
<pre><code> *\
|
||||
/</code></pre>
|
||||
<p>were not correctly parsed by the tool. The guidelines stated:</p>
|
||||
<pre><code> In cases where the above summary and the algorithm implemented by
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_mills.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
@@ -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="<!---sh-->"><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#2013_mills">2013 mills bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./mills</code></pre>
|
||||
<pre><code> ./mills</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./mills &</code></pre>
|
||||
<pre><code> ./mills &</code></pre>
|
||||
<p>While that is running, point your favorite browser at:
|
||||
<a href="http://localhost:8224">http://localhost:8224</a>.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
@@ -170,7 +171,7 @@ doing so. For details as to why this is necessary, feel free to Google
|
||||
<code>"TIME_WAIT"</code>, <code>"SO_REUSEADDR"</code> and <code>"SO_REUSEPORT"</code> (with the quotes). And
|
||||
while you are there, click on an ad. They could use the money.</p>
|
||||
<p>It would be possible to fix this by adding</p>
|
||||
<pre class="<!---c-->"><code> n=1,setsockopt(s,SOL_SOCKET,SO_REUSEADDR,&n,sizeof n),</code></pre>
|
||||
<pre><code> n=1,setsockopt(s,SOL_SOCKET,SO_REUSEADDR,&n,sizeof n),</code></pre>
|
||||
<p>at an appropriate spot in the code (an exercise left to the reader). However,
|
||||
as this limitation is documented, it is not technically a bug.</p>
|
||||
<h3 id="details-of-operation">Details of Operation</h3>
|
||||
@@ -252,10 +253,10 @@ curious impressionable youth trying to learn about sockets on the Internet.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/mills/mills.c">mills.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/mills/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/mills/mills.orig.c">mills.orig.c</a> - original source</li>
|
||||
<li><a href="2013_mills.tar.bz2">2013_mills.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_mills.tar.bz2">2013_mills.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/2013/mills/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/2013/mills/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_misaka.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
+17
-16
@@ -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,19 +142,19 @@ 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="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<p>This will build a bunch of versions of the code. See the author’s details for
|
||||
information on all of these builds.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./horizontal_cat [files...] > [output]
|
||||
<pre><code> ./horizontal_cat [files...] > [output]
|
||||
./vertical_cat [files...] > [output]</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>To understand the various intermediate source files that are built, try:</p>
|
||||
<pre class="<!---sh-->"><code> make understanding</code></pre>
|
||||
<pre><code> make understanding</code></pre>
|
||||
<p>Also try:</p>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>NOTE: Use - for standard input. For example:</p>
|
||||
<pre class="<!---sh-->"><code> ./vertical_cat - -</code></pre>
|
||||
<pre><code> ./vertical_cat - -</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>There is more to cat than <a href="http://cheezburger.com/1680494336">mere cats</a>. Be
|
||||
they tall, fat, long or squat, this source code is sure to amuse.</p>
|
||||
@@ -176,7 +177,7 @@ judging this entry.</p>
|
||||
<h3 id="overview">Overview</h3>
|
||||
<p><code>Misaka</code> is a file concatenation utility, with at least two modes of
|
||||
operation:</p>
|
||||
<pre class="<!---sh-->"><code> cc misaka.c -o horizontal_cat
|
||||
<pre><code> cc misaka.c -o horizontal_cat
|
||||
./horizontal_cat [files...] > [output]
|
||||
|
||||
./horizontal_cat misaka.c misaka.c > misaka2.c
|
||||
@@ -192,7 +193,7 @@ concatenating files, that function only seem to work if I wanted to concatenate
|
||||
files vertically.</p>
|
||||
<p>I thought the lack of horizontal concatenation must have been an oversight,
|
||||
so I implemented this utility:</p>
|
||||
<pre class="<!---sh-->"><code> cc misaka.c -o horizontal_cat
|
||||
<pre><code> cc misaka.c -o horizontal_cat
|
||||
./horizontal_cat files...</code></pre>
|
||||
<p><code>horizontal_cat</code> concatenates files horizontally and write the output to
|
||||
<code>stdout</code>. Each input file is padded with spaces on the right so that the
|
||||
@@ -202,7 +203,7 @@ Unlike <code>cat</code>, <code>horizontal_cat</code> loads all input to memory f
|
||||
can specify <code>-</code> multiple times to get <code>stdin</code> multiplied horizontally. For
|
||||
example, if you have <code>seq(1)</code> in your shell, you can add line numbers to both
|
||||
sides of <a href="misaka.c">misaka.c</a> like this:</p>
|
||||
<pre class="<!---sh-->"><code> seq -f ' %.0f ' 45 | ./horizontal_cat - misaka.c -</code></pre>
|
||||
<pre><code> seq -f ' %.0f ' 45 | ./horizontal_cat - misaka.c -</code></pre>
|
||||
<h3 id="vertical-cat">Vertical cat</h3>
|
||||
<p>Because <code>horizontal_cat</code> must know the maximum width of all files before
|
||||
writing any output, all files must be processed at least twice. To support
|
||||
@@ -212,24 +213,24 @@ writing any output, all files must be processed at least twice. To support
|
||||
files vertically, so I included a vertical mode. But supporting vertical
|
||||
mode with command line options would be no fun. Instead, vertical mode is
|
||||
enabled by concatenating the source code horizontally:</p>
|
||||
<pre class="<!---sh-->"><code> ./horizontal_cat misaka.c misaka.c > misaka2.c
|
||||
<pre><code> ./horizontal_cat misaka.c misaka.c > misaka2.c
|
||||
gcc misaka2.c -o vertical_cat
|
||||
./vertical_cat files...</code></pre>
|
||||
<p><code>vertical_cat</code> works more or less like <code>cat</code>, except you can use
|
||||
<code>vertical_cat</code> to duplicate <code>stdin</code>:</p>
|
||||
<pre class="<!---sh-->"><code> ./vertical_cat - -</code></pre>
|
||||
<pre><code> ./vertical_cat - -</code></pre>
|
||||
<h3 id="long-cat">Long cat</h3>
|
||||
<p>After <code>horizontal_cat</code> and <code>vertical_cat</code>, I thought, maybe all I really wanted
|
||||
was just more <a href="https://rationalwiki.org/wiki/Fun:Cat">cats</a>. So I implemented
|
||||
one more mode, this one is enabled by concatenating <a href="misaka.c">misaka.c</a>
|
||||
vertically:</p>
|
||||
<pre class="<!---sh-->"><code> ./vertical_cat misaka.c misaka.c > misaka3.c
|
||||
<pre><code> ./vertical_cat misaka.c misaka.c > misaka3.c
|
||||
gcc misaka3.c -o long_cat
|
||||
./long_cat</code></pre>
|
||||
<p><code>long_cat</code> outputs ASCII art of a cat to <code>stdout</code>. You can make this cat
|
||||
exponentially longer by concatenating more files vertically (up to 31 levels
|
||||
high, depending on <code>sizeof(int)</code> for your compiler):</p>
|
||||
<pre class="<!---sh-->"><code> ./vertical_cat misaka.c misaka.c misaka.c > misaka4.c
|
||||
<pre><code> ./vertical_cat misaka.c misaka.c misaka.c > misaka4.c
|
||||
gcc misaka4.c -o loong_cat
|
||||
|
||||
./vertical_cat misaka.c misaka.c misaka.c misaka.c > misaka5.c
|
||||
@@ -239,20 +240,20 @@ high, depending on <code>sizeof(int)</code> for your compiler):</p>
|
||||
gcc misaka6.c -o loooooooong_cat</code></pre>
|
||||
<p>If your terminal has really thin fonts, you can also make this output fatter
|
||||
by concatenating files horizontally:</p>
|
||||
<pre class="<!---sh-->"><code> ./vertical_cat misaka.c misaka.c | ./horizontal_cat - - > misaka7.c
|
||||
<pre><code> ./vertical_cat misaka.c misaka.c | ./horizontal_cat - - > misaka7.c
|
||||
gcc misaka7.c -o long_fat_cat
|
||||
|
||||
./vertical_cat misaka.c misaka.c | ./horizontal_cat - - - > misaka8.c
|
||||
gcc misaka8.c -o long_faat_cat</code></pre>
|
||||
<p>Output width is determined by the first level of stacked programs, so a
|
||||
triangle like the following will not have horizontally expanded output:</p>
|
||||
<pre class="<!---sh-->"><code> ./horizontal_cat misaka.c misaka.c | ./vertical_cat misaka.c - > misaka9.c
|
||||
<pre><code> ./horizontal_cat misaka.c misaka.c | ./vertical_cat misaka.c - > misaka9.c
|
||||
gcc misaka9.c -o same_as_long_cat</code></pre>
|
||||
<p>Finally, if you lost track of how many <a href="misaka.c">misaka.c</a> you have stacked
|
||||
together, you can feed the source to a
|
||||
<a href="https://en.wikipedia.org/wiki/Brainfuck">brainfuck</a> interpreter to get an
|
||||
overview of how the programs are stacked. Example:</p>
|
||||
<pre class="<!---sh-->"><code> perl bf.pl misaka9.c</code></pre>
|
||||
<pre><code> perl bf.pl misaka9.c</code></pre>
|
||||
<p>This outputs:</p>
|
||||
<pre><code> MISAKA
|
||||
MISAKA MISAKA</code></pre>
|
||||
@@ -339,10 +340,10 @@ stackable figure:</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/bf.pl">bf.pl</a> - BF interpreter</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/misaka/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="spoiler.html">spoiler.html</a> - SPOILER WARNING</li>
|
||||
<li><a href="2013_misaka.tar.bz2">2013_misaka.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_misaka.tar.bz2">2013_misaka.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/2013/misaka/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/2013/misaka/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_morgan1.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
@@ -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,9 +142,9 @@ 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="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> echo "YYYY/MM/DD" | ./morgan1</code></pre>
|
||||
<pre><code> echo "YYYY/MM/DD" | ./morgan1</code></pre>
|
||||
<p>where <code>YYYY</code> is the four digit year, <code>MM</code> is the two digit month and <code>DD</code> is two
|
||||
digit day of the month. The arrow keys control the shifting of the date as
|
||||
follows:</p>
|
||||
@@ -154,7 +155,7 @@ follows:</p>
|
||||
<li>Down : go backwards 20 days.</li>
|
||||
</ul>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>Use the same keys as described above to change the dates each time the program
|
||||
window is in focus.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
@@ -260,10 +261,10 @@ unnecessary.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/morgan1.orig.c">morgan1.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2013_morgan1.tar.bz2">2013_morgan1.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_morgan1.tar.bz2">2013_morgan1.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/2013/morgan1/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/2013/morgan1/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_morgan2.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
@@ -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,12 +142,12 @@ 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="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<p>For the console version (ncurses):</p>
|
||||
<pre class="<!---sh-->"><code> ./morgan2</code></pre>
|
||||
<pre><code> ./morgan2</code></pre>
|
||||
<p>For the graphical version (X11):</p>
|
||||
<pre class="<!---sh-->"><code> ./morgan2 X</code></pre>
|
||||
<pre><code> ./morgan2 X</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The judges enjoyed playing the game almost to completion; if we remember
|
||||
correctly, we managed to place 59 or 60 dominoes. We wonder, what would be
|
||||
@@ -257,10 +258,10 @@ use.</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan2/morgan2.c">morgan2.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan2/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan2/morgan2.orig.c">morgan2.orig.c</a> - original source</li>
|
||||
<li><a href="2013_morgan2.tar.bz2">2013_morgan2.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_morgan2.tar.bz2">2013_morgan2.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/2013/morgan2/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/2013/morgan2/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2013_robison.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
@@ -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,14 +142,14 @@ 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="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./robison
|
||||
<pre><code> ./robison
|
||||
# enter an expression
|
||||
|
||||
echo expression | ./robison</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Of integers this prog does a lot,<br />
|
||||
plus minus, div times (and what not).</p>
|
||||
@@ -239,10 +240,10 @@ With the C lib for strings, you can hack with a flair.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/robison.orig.c">robison.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/robison/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2013_robison.tar.bz2">2013_robison.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2013_robison.tar.bz2">2013_robison.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/2013/robison/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/2013/robison/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
Reference in new issue
Block a user