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
@@ -59,7 +59,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_anonymous.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,7 +142,7 @@ 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="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<p>The programs that this program is supposed to act on,
|
||||
<a href="anonymous.ten.c">anonymous.ten.c</a> and <a href="anonymous.bed.c">anonymous.bed.c</a>,
|
||||
compiled with <code>make</code>, MUST be compiled as 32-bit ELF binaries. In the case that
|
||||
@@ -155,9 +156,9 @@ whatever your system will compile them as).</p>
|
||||
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2001_anonymous">2001 anonymous bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./anonymous x86_program</code></pre>
|
||||
<pre><code> ./anonymous x86_program</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh
|
||||
<pre><code> ./try.sh
|
||||
|
||||
./anonymous anonymous.bed # if able to compile as a 32-bit (-m32) ELF binary</code></pre>
|
||||
<p>NOTE: if the 32-bit version cannot be compiled the script will at least compile
|
||||
@@ -176,9 +177,9 @@ program or do something terribly wrong like slaughtering all the
|
||||
<a href="https://www.glyphweb.com/arda/i/imladris.php">Imladris</a>! :-) so please don’t do
|
||||
that :-(</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<pre><code> make alt</code></pre>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<pre class="<!---sh-->"><code> ./anonymous.ten.alt
|
||||
<pre><code> ./anonymous.ten.alt
|
||||
|
||||
./anonymous.bed.alt</code></pre>
|
||||
<h3 id="a-2023-note-about-the-warning-from-the-author">A 2023 note about the warning from the author:</h3>
|
||||
@@ -327,10 +328,10 @@ just C programs that generate C code as their output.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/anonymous/anonymous.bed.c">anonymous.bed.c</a> - roll over song C source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/anonymous/anonymous.ten.c">anonymous.ten.c</a> - green bottles song C source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/anonymous/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2001_anonymous.tar.bz2">2001_anonymous.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_anonymous.tar.bz2">2001_anonymous.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/2001/anonymous/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/2001/anonymous/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_bellard.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#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>
|
||||
<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
|
||||
STATUS: doesn't work with some platforms - please help us fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2001_bellard">2001 bellard bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./bellard file</code></pre>
|
||||
<pre><code> ./bellard file</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./bellard bellard.otccex.c</code></pre>
|
||||
<pre><code> ./bellard bellard.otccex.c</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p><code><JUDGES_COMMENTS></code> :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
@@ -161,7 +162,7 @@ compilable by a standard ANSI C compiler. <code>OTCC</code> compiles,
|
||||
assembles, links and runs C code without the need of any other
|
||||
program.</p>
|
||||
<p>You can use it by typing:</p>
|
||||
<pre class="<!---sh-->"><code> ./bellard bellard.c [args]...</code></pre>
|
||||
<pre><code> ./bellard bellard.c [args]...</code></pre>
|
||||
<p>or by giving the C source to its standard input.</p>
|
||||
<p><code>args</code> are given to the <code>main()</code> function of <code>bellard.c</code> (<code>argv[0]</code> is
|
||||
<a href="bellard.c">bellard.c</a>).</p>
|
||||
@@ -169,15 +170,15 @@ program.</p>
|
||||
<ul>
|
||||
<li>Sample compilation and execution:</li>
|
||||
</ul>
|
||||
<pre class="<!---sh-->"><code> ./bellard bellard.otccex.c 10</code></pre>
|
||||
<pre><code> ./bellard bellard.otccex.c 10</code></pre>
|
||||
<ul>
|
||||
<li>Self compilation:</li>
|
||||
</ul>
|
||||
<pre class="<!---sh-->"><code> ./bellard bellard.c bellard.otccex.c 10</code></pre>
|
||||
<pre><code> ./bellard bellard.c bellard.otccex.c 10</code></pre>
|
||||
<ul>
|
||||
<li>Self compilation iterated…</li>
|
||||
</ul>
|
||||
<pre class="<!---sh-->"><code> ./bellard bellard.c bellard.c bellard.otccex.c 10</code></pre>
|
||||
<pre><code> ./bellard bellard.c bellard.c bellard.otccex.c 10</code></pre>
|
||||
<p>An alternate syntax is to use it as a script interpreter: you can
|
||||
put <code>#!/usr/local/bin/otcc</code> at the beginning of your C source if
|
||||
you installed <code>otcc</code> at this place.</p>
|
||||
@@ -271,10 +272,10 @@ be used when you compile and link it.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard/bellard.orig.c">bellard.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard/bellard.otccex.c">bellard.otccex.c</a> - example otcc source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard/otccelf.c">otccelf.c</a> - another example otcc source</li>
|
||||
<li><a href="2001_bellard.tar.bz2">2001_bellard.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_bellard.tar.bz2">2001_bellard.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/2001/bellard/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/2001/bellard/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_cheong.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,11 +142,11 @@ 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> ./cheong digits</code></pre>
|
||||
<pre><code> ./cheong digits</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>Be sure to give an even number of digits in the argument. Add a
|
||||
leading 0 if needed.</p>
|
||||
@@ -156,7 +157,7 @@ as all good programs should be! :-)</p>
|
||||
<p>Compile normally and run with one argument, an integer with 2n digits.
|
||||
Program will return the integer part of its square root (n-digits).
|
||||
For example,</p>
|
||||
<pre class="<!---sh-->"><code> $ cc -o cheong cheong.c
|
||||
<pre><code> $ cc -o cheong cheong.c
|
||||
$ ./cheong 1234567890
|
||||
35136
|
||||
$ ./cheong 0200000000000000000000000000
|
||||
@@ -165,7 +166,7 @@ For example,</p>
|
||||
<h3 id="portability">Portability</h3>
|
||||
<p>This program runs normally on any ANSI C compiler and is ASCII dependent.</p>
|
||||
<p>Strict compiling gives just one unavoidable warning:</p>
|
||||
<pre class="<!---sh-->"><code> gcc -ansi -Wall cheong.c
|
||||
<pre><code> gcc -ansi -Wall cheong.c
|
||||
cheong.c:3: warning: third argument of `main' should probably be `char **'</code></pre>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>The main obfuscation is the algorithm used to calculate square roots,
|
||||
@@ -225,10 +226,10 @@ the program.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/cheong/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/cheong/cheong.orig.c">cheong.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/cheong/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2001_cheong.tar.bz2">2001_cheong.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_cheong.tar.bz2">2001_cheong.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/2001/cheong/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/2001/cheong/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_coupard.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,11 +142,11 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
|
||||
<!-- 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> ./coupard</code></pre>
|
||||
<pre><code> ./coupard</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>You may need to run this a few times to understand exactly what is
|
||||
being said. You might even need to look somewhere on your desktop,
|
||||
@@ -170,7 +171,7 @@ fixed-format audio interface that is supported by the majority of Unices
|
||||
that can do sound, as a lowest-denominator sound I/O interface.</p>
|
||||
<h3 id="program-usage">Program usage</h3>
|
||||
<p>To listen to what the program says directly, invoke</p>
|
||||
<pre class="<!---sh-->"><code> ./coupard > /dev/audio</code></pre>
|
||||
<pre><code> ./coupard > /dev/audio</code></pre>
|
||||
<p>The program then speaks out something like</p>
|
||||
<blockquote>
|
||||
<p>The time is HH hours MM minutes SS seconds</p>
|
||||
@@ -181,7 +182,7 @@ the speakers connected … :-)</p>
|
||||
<p>If you want to convert the audio output of the program into another audio
|
||||
format, you can pipe it to <a href="https://en.wikipedia.org/wiki/SoX">SoX</a> for example
|
||||
(<code>sox</code> is the Swiss army knife of Unix audio tools). The command:</p>
|
||||
<pre class="<!---sh-->"><code> ./coupard | sox -c1 -r8000 -tub - -c2 -r44100 -twav test.wav</code></pre>
|
||||
<pre><code> ./coupard | sox -c1 -r8000 -tub - -c2 -r44100 -twav test.wav</code></pre>
|
||||
<p>converts the output of the program into a 44.1KHz stereo .WAV
|
||||
file and saves it into <code>test.wav</code>.</p>
|
||||
<p>The output format of the program is 8KHz, unsigned 8-bit samples.</p>
|
||||
@@ -265,10 +266,10 @@ the size of the source code.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/coupard.orig.c">coupard.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2001_coupard.tar.bz2">2001_coupard.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_coupard.tar.bz2">2001_coupard.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/2001/coupard/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/2001/coupard/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_ctk.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
+6
-5
@@ -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#ZZ">ZZ</a> - <em>Unknown location</em></l
|
||||
<!-- 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>There is an alternate version with vi(m) key movements. See <a href="#alternate%20code">alternate
|
||||
code</a> below.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./ctk</code></pre>
|
||||
<pre><code> ./ctk</code></pre>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This alternate version adds to the movement keys <code>l</code> for right, <code>h</code> for left and
|
||||
<code>k</code> for straight.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<pre><code> make alt</code></pre>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<pre class="<!---sh-->"><code> ./ctk.alt</code></pre>
|
||||
<pre><code> ./ctk.alt</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>No matter how careful you are, this guy eventually crashes. Most people
|
||||
can make at least one successful road trip without crashing.</p>
|
||||
@@ -198,10 +199,10 @@ font and the window maximized vertically!).</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/ctk/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/ctk/ctk.alt.c">ctk.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/ctk/ctk.orig.c">ctk.orig.c</a> - original source</li>
|
||||
<li><a href="2001_ctk.tar.bz2">2001_ctk.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_ctk.tar.bz2">2001_ctk.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/2001/ctk/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/2001/ctk/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_dgbeards.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,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="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<p>There is an alternate version based on the author’s remarks. See <a href="#alternate-code">alternate
|
||||
code</a> below for more details.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
@@ -149,16 +150,16 @@ code</a> below for more details.</p>
|
||||
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2001_dgbeards">2001 dgbeards bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./dgbeards</code></pre>
|
||||
<pre><code> ./dgbeards</code></pre>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>The author provided a way to speed it up a bit and also how to make it so it
|
||||
doesn’t crash on losing. The idea that it crashes on losing was too good to
|
||||
lose but this alternate version has the former change. If you wish to remove
|
||||
this you can look at the author’s remarks and make the change.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<pre><code> make alt</code></pre>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<pre class="<!---sh-->"><code> ./dgbeards.alt</code></pre>
|
||||
<pre><code> ./dgbeards.alt</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>See if you can figure out how to make the computer always lose (‘win’ :-) ).
|
||||
It’s a very simple thing to do. Read the author’s remarks for clues.</p>
|
||||
@@ -346,10 +347,10 @@ the <code>></code> to a <code>>=</code> and the bug will be gone.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/dgbeards/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/dgbeards/dgbeards.alt.c">dgbeards.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/dgbeards/dgbeards.orig.c">dgbeards.orig.c</a> - original source</li>
|
||||
<li><a href="2001_dgbeards.tar.bz2">2001_dgbeards.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_dgbeards.tar.bz2">2001_dgbeards.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/2001/dgbeards/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/2001/dgbeards/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_herrmann1.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,19 +142,19 @@ Location: <a href="../../location.html#DE">DE</a> - <em>Federal Republic of Germ
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<pre class="<!---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: missing files - please provide them
|
||||
STATUS: known bug - please help us fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2001_herrmann1">2001 herrmann1 bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./herrmann1.sh 'prg=file'</code></pre>
|
||||
<pre><code> ./herrmann1.sh 'prg=file'</code></pre>
|
||||
<p>NOTE: this entry seems to rely on older versions of gcc for the compilation
|
||||
stage and as such if you wish to see that part like it was designed you will
|
||||
need an older compiler perhaps gcc 2.95.</p>
|
||||
<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>There are some clear hints in the source code as to the
|
||||
purpose of this program. Perhaps the only way to figure out what is
|
||||
@@ -192,7 +193,7 @@ terminal!</p></li>
|
||||
<h4 id="for-the-impatient">For the impatient</h4>
|
||||
<p>The info files <code>herrmann1.turing</code> and <a href="herrmann1.gcd">herrmann1.gcd</a> are sample
|
||||
programs for the Turing machine. For example, type</p>
|
||||
<pre class="<!---sh-->"><code> ./herrmann1.sh 'prg=herrmann1.times2'</code></pre>
|
||||
<pre><code> ./herrmann1.sh 'prg=herrmann1.times2'</code></pre>
|
||||
<p>and watch the animated Turing machine multiply 8 by two (in
|
||||
unary representation). Here’s a screen shot during compilation:</p>
|
||||
<pre><code> /*
|
||||
@@ -217,7 +218,7 @@ result.)</p>
|
||||
<p>In the previous example, the Turing machine started on the default
|
||||
tape of the program <code>times2.turing</code>. To provide your own tape, type
|
||||
(for example)</p>
|
||||
<pre class="<!---sh-->"><code> ./herrmann1 prg=times2.turing tape="O O O I I I O O O"</code></pre>
|
||||
<pre><code> ./herrmann1 prg=times2.turing tape="O O O I I I O O O"</code></pre>
|
||||
<p>(The <code>O</code>s and <code>I</code>s are letters, not digits.) You might prefer to
|
||||
provide only a finite portion of the tape, like I did above. In
|
||||
this case, the remainder of the tape is filled with <code>O</code>s. ;-)</p>
|
||||
@@ -234,7 +235,7 @@ better. Simply try some out.</p>
|
||||
number in unary representation. (That is, a row of I’s is
|
||||
expected, and one more I is appended to the row.) Let’s call it
|
||||
<code>plus1.turing</code>. Here’s what it could look like:</p>
|
||||
<pre class="<!---c-->"><code> /* Search beginning of number. */
|
||||
<pre><code> /* Search beginning of number. */
|
||||
#define start_O O, right, start
|
||||
/* Number found. Move one step to the left. */
|
||||
#define start_I I, left, st2
|
||||
@@ -251,21 +252,21 @@ line defining <code>st2_I</code> has been left out.)
|
||||
- The order of the lines is irrelevant.
|
||||
- You may use C-style comments. (Would you have guessed it?)</p>
|
||||
<p>Now, the program can be used with</p>
|
||||
<pre class="<!---sh-->"><code> ./herrmann1.sh 'prg=plus1.turing' 'tape="I I I"'</code></pre>
|
||||
<pre><code> ./herrmann1.sh 'prg=plus1.turing' 'tape="I I I"'</code></pre>
|
||||
<p>But what happens if no tape is provided? Up to now, the Turing
|
||||
machine would start on an empty tape (that is, a tape filled with
|
||||
<code>O</code>s). For many programs, this doesn’t make much sense (as is
|
||||
the case for <code>plus1.turing</code>). So you might want to provide a
|
||||
default tape by adding a line like</p>
|
||||
<pre class="<!---c-->"><code> #define tape O O O O O I I I I</code></pre>
|
||||
<pre><code> #define tape O O O O O I I I I</code></pre>
|
||||
<p>to your program.</p>
|
||||
<h3 id="debugging">Debugging</h3>
|
||||
<p>When writing long programs, the most common errors are to forget
|
||||
to define a state or to misspell one. Let’s assume you forgot the
|
||||
line</p>
|
||||
<pre class="<!---c-->"><code> #define start_I I, left, st2</code></pre>
|
||||
<pre><code> #define start_I I, left, st2</code></pre>
|
||||
<p>Remove it and type</p>
|
||||
<pre class="<!---sh-->"><code> ./herrmann1 'prg=plus1.turing'</code></pre>
|
||||
<pre><code> ./herrmann1 'prg=plus1.turing'</code></pre>
|
||||
<p>The output will be</p>
|
||||
<p>Undefined state start.</p>
|
||||
<p>Tape:</p>
|
||||
@@ -432,10 +433,10 @@ script.</p></li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann1/herrmann1.times2">herrmann1.times2</a> - turning program as c defines</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann1/plus1.turing">plus1.turing</a> - turning program as c defines</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann1/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2001_herrmann1.tar.bz2">2001_herrmann1.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_herrmann1.tar.bz2">2001_herrmann1.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/2001/herrmann1/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/2001/herrmann1/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_herrmann2.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,11 +142,11 @@ Location: <a href="../../location.html#DE">DE</a> - <em>Federal Republic of Germ
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./herrmann2</code></pre>
|
||||
<pre><code> ./herrmann2</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>If you use vi(m) you can see a pattern in <a href="herrmann2.cup">herrmann2.cup</a> and
|
||||
[herrmann2.ioccc][(herrmann2.ioccc]) by say:</p>
|
||||
<pre><code> /[pon]\</code></pre>
|
||||
@@ -177,7 +178,7 @@ to about 9k.</p></li>
|
||||
3D picture, constructed of random characters (with ASCII code between
|
||||
32 and 126). For example, type</p></li>
|
||||
</ol>
|
||||
<pre class="<!---sh-->"><code> ./herrmann2 < herrmann2.ioccc</code></pre>
|
||||
<pre><code> ./herrmann2 < herrmann2.ioccc</code></pre>
|
||||
<ol start="3" type="1">
|
||||
<li>If you want to control the characters used in the output (for
|
||||
example if your picture is to consist only of digits), pass them
|
||||
@@ -186,7 +187,7 @@ new random character, it will take the next one from the
|
||||
argument. When it arrives at the end of the argument, it will
|
||||
start over at the beginning. Example:</li>
|
||||
</ol>
|
||||
<pre class="<!---sh-->"><code> ./herrmann2 "234 84 045 5 6765 7487 65190 84 656 254 12 43931 818 0 6542 \
|
||||
<pre><code> ./herrmann2 "234 84 045 5 6765 7487 65190 84 656 254 12 43931 818 0 6542 \
|
||||
341 45 567 76967 7244 606 976567 895 81898 095 68678 1843 4650547 \
|
||||
565980691 389 04974" < herrmann2.ioccc</code></pre>
|
||||
<h3 id="some-hints-to-get-better-results">Some hints to get better results</h3>
|
||||
@@ -216,7 +217,7 @@ get it (if you lost it or if you don’t have it already) is to use
|
||||
the program itself on the right picture and with the right
|
||||
argument:</p></li>
|
||||
</ul>
|
||||
<pre class="<!---sh-->"><code> ./herrmann2 \
|
||||
<pre><code> ./herrmann2 \
|
||||
'char*d,A[9876];e;b;*ad,a,c; tw,ndr,T; wri; ;*h; _,ar ;on;'\
|
||||
' ;l ;i(V)man,n {-!har ; =Aadre(0,&e,o||n -- +,o4,=9,l=b=8,'\
|
||||
'!( te-*Aim)|(0~l),srand (l),,!A,d=,b))&&+((A + te-A(&(*)=+ +95>'\
|
||||
@@ -267,7 +268,7 @@ only needs a logarithmic recursion depth! (Find out how this
|
||||
works.)</p></li>
|
||||
<li><p>When still in doubt about how to judge this program, type</p></li>
|
||||
</ul>
|
||||
<pre class="<!---sh-->"><code> ./herrmann2 < herrmann2.cup</code></pre>
|
||||
<pre><code> ./herrmann2 < herrmann2.cup</code></pre>
|
||||
<p>and let the result inspire you. ;-)</p>
|
||||
<h3 id="requirements-to-the-compiler-compatibility">Requirements to the compiler / Compatibility</h3>
|
||||
<ul>
|
||||
@@ -324,10 +325,10 @@ adapted.</p></li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann2/herrmann2.cup">herrmann2.cup</a> - sample input</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann2/herrmann2.ioccc">herrmann2.ioccc</a> - sample input</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/herrmann2/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2001_herrmann2.tar.bz2">2001_herrmann2.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_herrmann2.tar.bz2">2001_herrmann2.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/2001/herrmann2/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/2001/herrmann2/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_jason.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#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> ./jason</code></pre>
|
||||
<pre><code> ./jason</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>You are in a maze of twisty little passages, all alike.</p>
|
||||
<p>The really amazing part of this is that it’s a text adventure, and there’s
|
||||
@@ -160,7 +161,7 @@ cause problems. Go ahead, try it! :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>TED Shroyer came up with the idea that made it possible to hide all
|
||||
the text. Thanks, TED. You won. :)</p>
|
||||
<pre class="<!---sh-->"><code> cc -o jason jason.c
|
||||
<pre><code> cc -o jason jason.c
|
||||
./jason
|
||||
you are in a maze of twisty little passages
|
||||
caves lead: left forward back
|
||||
@@ -250,10 +251,10 @@ mapping.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/jason/jason.c">jason.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/jason/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/jason/jason.orig.c">jason.orig.c</a> - original source</li>
|
||||
<li><a href="2001_jason.tar.bz2">2001_jason.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_jason.tar.bz2">2001_jason.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/2001/jason/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/2001/jason/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_kev.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
+16
-15
@@ -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#AU">AU</a> - <em>Commonwealth of Australi
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<p>There is another version which lets you use the arrow keys rather than the more
|
||||
awkward <code>,</code> and <code>.</code> keys. See <a href="#alternate-code">alternate code</a> below.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
@@ -149,35 +150,35 @@ awkward <code>,</code> and <code>.</code> keys. See <a href="#alternate-code">al
|
||||
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2001_kev">2001 kev bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./kev # in one terminal
|
||||
<pre><code> ./kev # in one terminal
|
||||
|
||||
./kev hostname # in another terminal</code></pre>
|
||||
<p>NOTE: each player’s paddle is at the bottom and the opponent at the top.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./kev # in one terminal
|
||||
<pre><code> ./kev # in one terminal
|
||||
|
||||
./kev localhost # in another terminal on the same host</code></pre>
|
||||
<p>If you need to change the speed you can reconfigure it like (say
|
||||
for over a network and not the same host):</p>
|
||||
<pre class="<!---sh-->"><code> make clobber SPEED=50 all # original default value which is very fast</code></pre>
|
||||
<pre><code> make clobber SPEED=50 all # original default value which is very fast</code></pre>
|
||||
<p>If you wish to change the port you can do so like:</p>
|
||||
<pre class="<!---sh-->"><code> make clobber PORT=3773 all</code></pre>
|
||||
<pre><code> make clobber PORT=3773 all</code></pre>
|
||||
<p>Of course if you want a port < 1024 you’ll need to be root so don’t do that.</p>
|
||||
<p>And if you know what you’re doing you can redefine the call to the <code>socket(2)</code>
|
||||
syscall with the <code>l_</code> macro, changing the <code>L</code> variable like one would <code>PORT</code>. Of
|
||||
course you can do more than one at the same time. For instance to change the
|
||||
speed and port:</p>
|
||||
<pre class="<!---sh-->"><code> make clobber SPEED=512 PORT=3773 all</code></pre>
|
||||
<pre><code> make clobber SPEED=512 PORT=3773 all</code></pre>
|
||||
<p>If you have <code>xterm</code> try on one system:</p>
|
||||
<pre class="<!---sh-->"><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev &</code></pre>
|
||||
<pre><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev &</code></pre>
|
||||
<p>and then the other, the client system:</p>
|
||||
<pre class="<!---sh-->"><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev localhost&</code></pre>
|
||||
<pre><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev localhost&</code></pre>
|
||||
<p>This might look nicer than just the terminal itself.</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This version allows you to use arrow keys on the keyboard rather than the more
|
||||
awkward <code>,</code> and <code>.</code> keys to move your paddle.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<pre><code> make alt</code></pre>
|
||||
<p>You can reconfigure the macros described above in the same way.</p>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>kev.alt</code> as you would <code>kev</code>.</p>
|
||||
@@ -185,9 +186,9 @@ awkward <code>,</code> and <code>.</code> keys to move your paddle.</p>
|
||||
terminal?</p>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
<p>If you have <code>xterm</code> try on one system:</p>
|
||||
<pre class="<!---sh-->"><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev.alt &</code></pre>
|
||||
<pre><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev.alt &</code></pre>
|
||||
<p>and then the other, the client system:</p>
|
||||
<pre class="<!---sh-->"><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev.alt localhost&</code></pre>
|
||||
<pre><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev.alt localhost&</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Continuing with this year’s “retro game” theme, this is another old game;
|
||||
arguably, one of the oldest. Requires a functioning network, and curses.</p>
|
||||
@@ -212,16 +213,16 @@ speeds. Each player has a paddle to hit the ball, and you get points for
|
||||
getting the ball past your opponent’s paddle. It’s pretty fun! :)</p>
|
||||
<h3 id="running">RUNNING</h3>
|
||||
<p>Run the server first without any command line arguments, i.e.</p>
|
||||
<pre class="<!---sh-->"><code> ./kev</code></pre>
|
||||
<pre><code> ./kev</code></pre>
|
||||
<p>Then run the client with a single command line argument which is
|
||||
the name of the machine running the server, e.g.</p>
|
||||
<pre class="<!---sh-->"><code> ./kev localhost</code></pre>
|
||||
<pre><code> ./kev localhost</code></pre>
|
||||
<p>Make sure that the terminals on both ends are the same size. Also, the TCP port
|
||||
number (by default 5455) specified in the <a href="Makefile">Makefile</a> mustn’t be
|
||||
blocked by a firewall.</p>
|
||||
<p>Here’s a good quick example to see it in action on your own
|
||||
machine, assuming you have <code>Xwindows</code>:</p>
|
||||
<pre class="<!---sh-->"><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev &
|
||||
<pre><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev &
|
||||
xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev localhost&</code></pre>
|
||||
<h3 id="playing">PLAYING</h3>
|
||||
<p>Your paddle is the one at the bottom of the screen, your opponent
|
||||
@@ -326,10 +327,10 @@ though.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/kev/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/kev/kev.alt.c">kev.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/kev/kev.orig.c">kev.orig.c</a> - original source</li>
|
||||
<li><a href="2001_kev.tar.bz2">2001_kev.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_kev.tar.bz2">2001_kev.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/2001/kev/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/2001/kev/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_ollinger.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,11 +142,11 @@ 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> ./ollinger integer</code></pre>
|
||||
<pre><code> ./ollinger integer</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>Try the above command in a large window, say 200 chars wide and 100
|
||||
high (200x100) with a tiny font.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
@@ -238,10 +239,10 @@ guarantee a constant time.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/ollinger/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/ollinger/ollinger.orig.c">ollinger.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/ollinger/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2001_ollinger.tar.bz2">2001_ollinger.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_ollinger.tar.bz2">2001_ollinger.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/2001/ollinger/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/2001/ollinger/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_rosten.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,21 +142,21 @@ 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="<!---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: missing files - please provide them</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2001_rosten">2001 rosten bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./rosten [number]</code></pre>
|
||||
<pre><code> ./rosten [number]</code></pre>
|
||||
<p>WARNING: this will mess with your mouse and can make it hard to quit the
|
||||
program. Use at your own risk.</p>
|
||||
<p>NOTE: number is floating point.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./rosten 1.03
|
||||
<pre><code> ./rosten 1.03
|
||||
./rosten 1.00</code></pre>
|
||||
<p>For some abuse, try:</p>
|
||||
<pre class="<!---sh-->"><code> ./rosten 0.99</code></pre>
|
||||
<pre><code> ./rosten 0.99</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Friction can be your friend if it does not rub you (or your mouse
|
||||
cursor) in the wrong way. :-)</p>
|
||||
@@ -163,7 +164,7 @@ cursor) in the wrong way. :-)</p>
|
||||
<h3 id="name">NAME</h3>
|
||||
<p><code>rosten</code> - make the mouse act as if it has been greased</p>
|
||||
<h3 id="synopsis">SYNOPSIS</h3>
|
||||
<pre class="<!---sh-->"><code> ./rosten [greasiness]</code></pre>
|
||||
<pre><code> ./rosten [greasiness]</code></pre>
|
||||
<h3 id="description">DESCRIPTION</h3>
|
||||
<p>This program is designed primarily to make your X windows interface more
|
||||
obfuscated. Try doing something mouse driven (such as using a mouse
|
||||
@@ -183,7 +184,7 @@ required is a large desk and some good grease.</p>
|
||||
portable, but compile with almost no warnings on most of the compilers
|
||||
tested. It’s a kind of shame that none of the compilers do anything
|
||||
like this:</p>
|
||||
<pre class="<!---sh-->"><code> $ make greasymouse
|
||||
<pre><code> $ make greasymouse
|
||||
cc greasymouse.c -o greasymouse -lX11
|
||||
greasymouse.c:30: This macro should have more text and spaces in it
|
||||
greasymouse.c:32: This is a really stupid way to perform this operation
|
||||
@@ -213,7 +214,7 @@ would never do a thing like that: I just haven’t used them in
|
||||
the way it’s used to.</p>
|
||||
<p>The MIPS compiler suggests an <code>==</code> instead of an <code>=</code> in expressions
|
||||
such as:</p>
|
||||
<pre class="<!---c-->"><code> &&(a=b)</code></pre>
|
||||
<pre><code> &&(a=b)</code></pre>
|
||||
<p>but its suggestions would break my program. It also reckons
|
||||
that <code>r()</code> has no prototype.</p>
|
||||
<p>Giving the <code>-pedantic</code> option to the MIPS compiler causes it to generate
|
||||
@@ -251,10 +252,10 @@ beginning of the line wrecks the layout but makes it compile.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/rosten/rosten.c">rosten.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/rosten/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/rosten/rosten.orig.c">rosten.orig.c</a> - original source</li>
|
||||
<li><a href="2001_rosten.tar.bz2">2001_rosten.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_rosten.tar.bz2">2001_rosten.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/2001/rosten/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/2001/rosten/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_schweikh.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,13 +142,13 @@ Location: <a href="../../location.html#DE">DE</a> - <em>Federal Republic of Germ
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<pre class="<!---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#2001_schweikh">2001 schweikh bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./schweikh string string2</code></pre>
|
||||
<pre><code> ./schweikh string string2</code></pre>
|
||||
<p>This program will very likely crash or do something else if you do not give it
|
||||
two args.</p>
|
||||
<p>Note also that the glob pattern must match the whole string. See the author’s
|
||||
@@ -157,7 +158,7 @@ comments for details and a workaround.</p>
|
||||
<a href="http://catb.org/jargon/html/F/feature.html">The Jargon File</a>:</p>
|
||||
<pre><code> That's not a bug, that's a feature.</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>Do you get the pattern here?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
@@ -170,7 +171,7 @@ the whole string, so you may want to use <code>*</code> at the beginning and end
|
||||
pattern if you are looking for something in the middle.</p>
|
||||
<p>You can use it for your shell scripting needs similar to a silent grep
|
||||
(and without <code>stdout</code> redirected to <code>/dev/null</code>):</p>
|
||||
<pre class="<!---sh-->"><code> if prog "${VARIABLE}" '<glob>'; then
|
||||
<pre><code> if prog "${VARIABLE}" '<glob>'; then
|
||||
echo VARIABLE matches
|
||||
else
|
||||
echo no match
|
||||
@@ -229,10 +230,10 @@ try again. For extra credit implement character classes like <code>[a-z]</code>.
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/schweikh/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/schweikh/schweikh.orig.c">schweikh.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/schweikh/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2001_schweikh.tar.bz2">2001_schweikh.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_schweikh.tar.bz2">2001_schweikh.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/2001/schweikh/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/2001/schweikh/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_westley.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,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="<!---sh-->"><code> make</code></pre>
|
||||
<pre><code> make</code></pre>
|
||||
<p>There are two additional programs based on the author’s remarks and the original
|
||||
version, provided as alternate code as it might be less portable. See <a href="#sorted-code">sorted
|
||||
code</a>, <a href="#punch-card-code">punch card code</a> and <a href="#alternate-code">alternate
|
||||
@@ -153,14 +154,14 @@ code</a> below.</p>
|
||||
STATUS: main() has only one arg - try and make it have 2 or 3</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2001_westley">2001 westley bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./westley 2>/dev/null
|
||||
<pre><code> ./westley 2>/dev/null
|
||||
# enter some input, terminate with EOF
|
||||
|
||||
echo foo | ./westley 2>/dev/null
|
||||
|
||||
./westley < westley.c 2>/dev/null</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<h2 id="sorted-code">Sorted code:</h2>
|
||||
<p>The author stated that one can sort (ignoring leading blanks i.e. <code>sort -b</code>) the
|
||||
code by line and it will always sort the order of the input.</p>
|
||||
@@ -171,12 +172,12 @@ code by line and it will always sort the order of the input.</p>
|
||||
<a href="westley.punch.c">westley.punch.c</a> code is specifically so that Westley can punch
|
||||
everyone in the face! :-) This is also compiled by default.</p>
|
||||
<h3 id="punch-card-try">Punch card try:</h3>
|
||||
<pre class="<!---sh-->"><code> echo 'Brian Westley does it again!' | ./westley.punch 2>/dev/null</code></pre>
|
||||
<pre><code> echo 'Brian Westley does it again!' | ./westley.punch 2>/dev/null</code></pre>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>An alternate version of this entry, <a href="westley.alt.c">westley.alt.c</a>, is provided.
|
||||
This alternate code might be less portable.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<pre><code> make alt</code></pre>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>westley.alt</code> as you would <code>westley</code> above.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
@@ -195,7 +196,7 @@ were becoming obsolete just as C was becoming more popular*; this is rather
|
||||
unfortunate, because C has an advantage over many other languages when it comes
|
||||
to punch cards - C programs can be written to be “drop proof”.</p>
|
||||
<p>Consider the following C program:</p>
|
||||
<pre class="<!---c-->"><code> main(){a();b();c();}
|
||||
<pre><code> main(){a();b();c();}
|
||||
a(){printf("A");}
|
||||
b(){printf("B");}
|
||||
c(){printf("C");}</code></pre>
|
||||
@@ -204,13 +205,13 @@ lines are in. If you punch it on cards (one line of code per
|
||||
card, naturally) and drop them, you don’t need to put them in
|
||||
any particular order**; it will always produce <code>ABC</code> as output.</p>
|
||||
<p>You can also use global variables:</p>
|
||||
<pre class="<!---c-->"><code> char *greet = "Hello, world!";
|
||||
<pre><code> char *greet = "Hello, world!";
|
||||
char *greet; main(){puts(greet);}</code></pre>
|
||||
<p>It would be trivial to write an entire C program that is
|
||||
“drop proof” using the above techniques; surprisingly, it’s
|
||||
possible to write a program that will always compile but
|
||||
behave differently depending on the line order:</p>
|
||||
<pre class="<!---c-->"><code> test(a,b){return a;}
|
||||
<pre><code> test(a,b){return a;}
|
||||
#define test(a,b) test(b,a)
|
||||
main(){if (test(0,1)) printf("T"); else printf("F");}</code></pre>
|
||||
<p>This program will print out <code>T</code> if the <code>#define</code> statement
|
||||
@@ -218,7 +219,7 @@ falls between the declaration of <code>test()</code> and its use in
|
||||
<code>main()</code>, otherwise it will print out <code>F</code>. Furthermore,
|
||||
you can use the same call to <code>test()</code> repeatedly in
|
||||
different lines to return different values:</p>
|
||||
<pre class="<!---c-->"><code> #define test(x,y) test(y,x)
|
||||
<pre><code> #define test(x,y) test(y,x)
|
||||
main(){int i=0;a(&i);b(&i);c(&i);d(&i);printf("%d\n",i);}
|
||||
a(i)int*i;{if (test(0,1)) *i += 1;}
|
||||
b(i)int*i;{if (test(0,1)) *i += 2;}
|
||||
@@ -314,10 +315,10 @@ all legal C.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/westley/westley.alt.c">westley.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/westley/westley.orig.c">westley.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/westley/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2001_westley.tar.bz2">2001_westley.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_westley.tar.bz2">2001_westley.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/2001/westley/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/2001/westley/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "2001_williams.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,13 +142,13 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
|
||||
<!-- 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: known bug - please help us fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2001_williams">2001 williams bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./williams</code></pre>
|
||||
<pre><code> ./williams</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p><a href="https://en.wikipedia.org/wiki/WarGames">A strange game. The only winning move is not to
|
||||
play</a>. No, really; you can’t
|
||||
@@ -202,10 +203,10 @@ The purpose of <code>A/(x|1)</code> is probably obvious, but what does <code>(x|
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/williams/williams.c">williams.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/williams/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/williams/williams.orig.c">williams.orig.c</a> - original source</li>
|
||||
<li><a href="2001_williams.tar.bz2">2001_williams.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="2001_williams.tar.bz2">2001_williams.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/2001/williams/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/2001/williams/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
Reference in new issue
Block a user