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
@@ -91,7 +91,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_banks.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 all</code></pre>
|
||||
<pre><code> make all</code></pre>
|
||||
<p>If you do not have a page up or page down key you might wish to see the
|
||||
<a href="#alternate-code">Alternate code</a> section below. You may redefine all the keys
|
||||
and the time step with predefined macros, however, so one lacking page up / page
|
||||
@@ -164,10 +165,10 @@ Instructions</a> section.</p>
|
||||
to use. The name of the macro in the header file is what you need to set the
|
||||
macros to, depending on what controls you wish to redefine. For instance, to set
|
||||
the throttle up and down to <code>u</code> and <code>d</code>:</p>
|
||||
<pre class="<!---sh-->"><code> make clobber IT=XK_u DT=XK_d all</code></pre>
|
||||
<pre><code> make clobber IT=XK_u DT=XK_d all</code></pre>
|
||||
<p>because in the header file you can see that <code>XK_u</code> corresponds to <code>u</code> and <code>XK_d</code>
|
||||
corresponds to <code>d</code>:</p>
|
||||
<pre class="<!---c-->"><code> #define XK_d 0x0064 /* U+0064 LATIN SMALL LETTER D */
|
||||
<pre><code> #define XK_d 0x0064 /* U+0064 LATIN SMALL LETTER D */
|
||||
#define XK_u 0x0075 /* U+0075 LATIN SMALL LETTER U */</code></pre>
|
||||
<p>Note that the <a href="keysym.h">keysym.h</a> file is not complete from X11; it’s just the
|
||||
more likely candidates (and some that are probably unlikely :-) ).</p>
|
||||
@@ -181,7 +182,7 @@ instructions. Since you can use the original entry to redefine these this is not
|
||||
a problem and is purely a convenience .. if only for those who are okay with the
|
||||
preselected alternative keys.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> cat horizon.sc pittsburgh.sc | ./banks</code></pre>
|
||||
<pre><code> cat horizon.sc pittsburgh.sc | ./banks</code></pre>
|
||||
<p>See the author’s remarks in <a href="#scenery">scenery</a> for more details on the scenery
|
||||
files.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
@@ -208,7 +209,7 @@ you should use the original entry as described in the to build section above.</p
|
||||
letters on the left side of the keyboard which is easier to use if one is using
|
||||
the right side for movement. These are hard coded, as noted.</p>
|
||||
<p>To use the default settings for the alternate build:</p>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<pre><code> make alt</code></pre>
|
||||
<p>You may change the other keys as described in the build instructions, above, but
|
||||
this alt code can be seen as an alternative for those who don’t have or don’t
|
||||
want to use page up and page down.</p>
|
||||
@@ -289,11 +290,11 @@ landscape.</p></li>
|
||||
<p>Follow a flowing river from the sky.</p></li>
|
||||
</ul>
|
||||
<p>A few examples of how to input scenery:</p>
|
||||
<pre class="<!---sh-->"><code> cat horizon.sc pittsburgh.sc | ./banks
|
||||
<pre><code> cat horizon.sc pittsburgh.sc | ./banks
|
||||
cat mountains.sc bb.sc | ./banks
|
||||
cat mountains.sc river.sc pyramids.sc | ./banks</code></pre>
|
||||
<p>You can simulate flying through a cloud bank as well:</p>
|
||||
<pre class="<!---sh-->"><code> ./banks < /dev/null</code></pre>
|
||||
<pre><code> ./banks < /dev/null</code></pre>
|
||||
<p>You will usually want at least a horizon, though.</p>
|
||||
<p>The format of scenery files is simple, by the way. They’re just
|
||||
a list of 3D coordinates, and the simulator simply draws line
|
||||
@@ -371,10 +372,10 @@ flicker.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/pittsburgh.sc">pittsburgh.sc</a> - scenery file</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/pyramids.sc">pyramids.sc</a> - scenery file</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/river.sc">river.sc</a> - scenery file</li>
|
||||
<li><a href="1998_banks.tar.bz2">1998_banks.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_banks.tar.bz2">1998_banks.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_bas1.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#NL">NL</a> - <em>Kingdom of the Netherlan
|
||||
<!-- 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>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./bas1.sh</code></pre>
|
||||
<pre><code> ./bas1.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The output is supposed to be a 3D maze, but it is somewhat more
|
||||
than that. If you’ve seen any of the <a href="https://en.wikipedia.org/wiki/M._C._Escher">Maurits
|
||||
@@ -210,10 +211,10 @@ command line arguments.)</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/bas1.orig.c">bas1.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/bas1.sh">bas1.sh</a> - how to run bas1</li>
|
||||
<li><a href="1998_bas1.tar.bz2">1998_bas1.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_bas1.tar.bz2">1998_bas1.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_bas2.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#NL">NL</a> - <em>Kingdom of the Netherlan
|
||||
<!-- 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>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./bas2 < file
|
||||
<pre><code> ./bas2 < file
|
||||
echo text | ./bas2</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh
|
||||
<pre><code> ./try.sh
|
||||
|
||||
./try.sh "foo bar" "baz" "IOCCC 1998/bas2" README.md
|
||||
|
||||
@@ -200,10 +201,10 @@ the character).</p></li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas2/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas2/bas2.orig.c">bas2.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas2/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="1998_bas2.tar.bz2">1998_bas2.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_bas2.tar.bz2">1998_bas2.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas2/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas2/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_chaos.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 chaos</code></pre>
|
||||
<pre><code> make chaos</code></pre>
|
||||
<p>NOTE: Some systems do not implement <code>halfdelay()</code> in their <code>libcurses</code>.
|
||||
You might try compiling with -lncurses if you have that library.
|
||||
Or you can build this entry without the <code>halfdelay()</code> call by:</p>
|
||||
<pre class="<!---sh-->"><code> make chaos_nohalf</code></pre>
|
||||
<pre><code> make chaos_nohalf</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./chaos</code></pre>
|
||||
<pre><code> ./chaos</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>This script will run the program on each data file. To quit the program hit <code>q</code>.
|
||||
If not all files have been used it will go to the next one; otherwise the script
|
||||
will be finished. To end the script early send intr/ctrl-c.</p>
|
||||
@@ -222,10 +223,10 @@ happier.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/ioccc.data">ioccc.data</a> - data file</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/pyramid.data">pyramid.data</a> - data file</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/xwing.data">xwing.data</a> - data file</li>
|
||||
<li><a href="1998_chaos.tar.bz2">1998_chaos.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_chaos.tar.bz2">1998_chaos.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_df.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
+5
-4
@@ -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 all</code></pre>
|
||||
<pre><code> make all</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./df</code></pre>
|
||||
<pre><code> ./df</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>This will run the program in a loop until you exit (<code>q</code> when prompted or
|
||||
ctrl-c/intr).</p>
|
||||
<p>Can you figure out a very simple pipeline to cheat?</p>
|
||||
@@ -284,10 +285,10 @@ different.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/df/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/df/df.orig.c">df.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/df/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="1998_df.tar.bz2">1998_df.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_df.tar.bz2">1998_df.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/df/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/df/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_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,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 all</code></pre>
|
||||
<pre><code> make all</code></pre>
|
||||
<p>There is an alternate version available. See <a href="#alternate-code">Alternate code</a>
|
||||
below for more details.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./dlowe < file > pootfile
|
||||
<pre><code> ./dlowe < file > pootfile
|
||||
|
||||
./dlowe < file</code></pre>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
@@ -153,22 +154,22 @@ below for more details.</p>
|
||||
<pre><code> STATUS: missing or dead link - please provide them</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1998_dlowe">1998 dlowe bugs</a>.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./dlowe < README.md
|
||||
<pre><code> ./dlowe < README.md
|
||||
./dlowe < README.md > README.poot.md</code></pre>
|
||||
<p>Why is there different output?</p>
|
||||
<p>Also try:</p>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>Did you spot the Easter egg there?</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>The original entry was just a text based pootifier. This alternate version is
|
||||
that program.</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><code> ./dlowe.alt < file > pootfile</code></pre>
|
||||
<p>What’s the difference between this and <code>dlowe</code>?</p>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
<pre class="<!---sh-->"><code> ./try.alt.sh</code></pre>
|
||||
<pre><code> ./try.alt.sh</code></pre>
|
||||
<p>Did you spot the Easter egg there?</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Why could this this entry be considered a utility? Well because it
|
||||
@@ -179,7 +180,7 @@ a CGI program: <a href="https://web.archive.org/web/20001025182142/http://pootpo
|
||||
more consistent level of quality. :-)</p>
|
||||
<h3 id="historical-remarks">Historical remarks:</h3>
|
||||
<p>A CGI script such as:</p>
|
||||
<pre class="<!---sh-->"><code> #!/bin/sh
|
||||
<pre><code> #!/bin/sh
|
||||
# pootify - a sample CGI pootifier
|
||||
#
|
||||
POOT="/usr/local/bin/dlowe"
|
||||
@@ -212,14 +213,14 @@ added bonus that one can use <code>file://</code> URLs. If one wants a CGI scrip
|
||||
should use the above one instead. You can use the script
|
||||
<a href="pootify.sh">pootify.sh</a>, however, to download and generate html files that you
|
||||
can look at locally in a browser or pipe through <code>less(1)</code>. For instance:</p>
|
||||
<pre class="<!---sh-->"><code> ./pootify.sh URL=https://microsoft.com | less
|
||||
<pre><code> ./pootify.sh URL=https://microsoft.com | less
|
||||
|
||||
./pootify.sh -r URL=https://microsoft.com > ms.html</code></pre>
|
||||
<p>where the first one would show the text as rendered but without links, images
|
||||
etc. and the second one would write the html to <code>ms.html</code> so that you could open
|
||||
it in a browser.</p>
|
||||
<p>For an old example of it working as a CGI script see:</p>
|
||||
<pre class="<!---sh-->"><code> https://web.archive.org/web/20040326083431/http://www.pootpoot.com/poot/pootify/?URL=http%3A%2F%2Fwww.ioccc.org</code></pre>
|
||||
<pre><code> https://web.archive.org/web/20040326083431/http://www.pootpoot.com/poot/pootify/?URL=http%3A%2F%2Fwww.ioccc.org</code></pre>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program is a text filter, it reads <code>stdin</code> and outputs the
|
||||
“corrected” text to <code>stdout</code>.</p>
|
||||
@@ -262,10 +263,10 @@ run <code>perl4</code> programs after they’ve been run through it; “encrypt
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/pootify.sh">pootify.sh</a> - pootify tool</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/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/1998/dlowe/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="1998_dlowe.tar.bz2">1998_dlowe.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_dlowe.tar.bz2">1998_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/1998/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/1998/dlowe/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_dloweneil.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>
|
||||
@@ -144,7 +145,7 @@ 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 all</code></pre>
|
||||
<pre><code> make all</code></pre>
|
||||
<p>There is an alternate version available that has a key configuration that will
|
||||
be more familiar to vi(m) users and also allows one to quit. See <a href="#alternate-code">alternate
|
||||
code</a> below.</p>
|
||||
@@ -153,7 +154,7 @@ code</a> below.</p>
|
||||
<pre><code> STATUS: missing or dead link - please provide them</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1998_dloweneil">1998 dloweneil bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./pootris [X size of board] [Y size of board]</code></pre>
|
||||
<pre><code> ./pootris [X size of board] [Y size of board]</code></pre>
|
||||
<p>Pressing <code>a</code> moves the current letter position counterclockwise/anticlockwise
|
||||
(a)round the border of the playing field.</p>
|
||||
<p>Pressing <code>s</code> moves the current letter one position clockwise around the border
|
||||
@@ -165,9 +166,9 @@ counterclockwise/anticlockwise <code>h</code> does as well; and in addition to <
|
||||
clockwise <code>l</code> does as well. Instead of using <code>d</code> to drop the letter you can do
|
||||
<code>j</code> or space. Finally to quit this version you can press <code>q</code>.</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> ./pootris.alt [X size of board] [Y size of board]</code></pre>
|
||||
<pre><code> ./pootris.alt [X size of board] [Y size of board]</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Read the authors’ remarks below to find out how to play. We believe that your
|
||||
experience may mirror one of our experiences:</p>
|
||||
@@ -176,7 +177,7 @@ experience may mirror one of our experiences:</p>
|
||||
I spelled my first "poot". I was hooked ...</code></pre>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<pre class="<!---sh-->"><code> ./pootris [X size of board] [Y size of board]</code></pre>
|
||||
<pre><code> ./pootris [X size of board] [Y size of board]</code></pre>
|
||||
<h3 id="synopsis">Synopsis</h3>
|
||||
<p>The object of this game is to spell <code>POOT</code> as much as possible. There
|
||||
is no time pressure. You’re given one letter at a time (sort of randomly
|
||||
@@ -276,10 +277,10 @@ places.</p></li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dloweneil/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dloweneil/dloweneil.alt.c">dloweneil.alt.c</a> - alternative source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dloweneil/dloweneil.orig.c">dloweneil.orig.c</a> - original source</li>
|
||||
<li><a href="1998_dloweneil.tar.bz2">1998_dloweneil.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_dloweneil.tar.bz2">1998_dloweneil.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dloweneil/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dloweneil/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_dorssel.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>
|
||||
@@ -150,7 +151,7 @@ two bits would suffice, e.g.</p>
|
||||
<p>That means bits 6 and 5 set to 00 is length 1, set to 01 is length 2, etc.
|
||||
But this would mean that we would have to extract the length into a
|
||||
counter before shifting out each symbol, such as</p>
|
||||
<pre class="<!---c-->"><code> length = (encoding & 96) >> 5;
|
||||
<pre><code> length = (encoding & 96) >> 5;
|
||||
do {
|
||||
putchar(encoding & 1 ? '-' : '.');
|
||||
encoding >>= 1;
|
||||
@@ -162,7 +163,7 @@ counter before shifting out each symbol, such as</p>
|
||||
length 4: 00.1xxxx Z > 00.11100
|
||||
length 5: 0.1xxxxx 3 > 0.100111</code></pre>
|
||||
<p>with 1 bit still to be chosen freely (let’s assume it is 0). Now we can do</p>
|
||||
<pre class="<!---c-->"><code> do {
|
||||
<pre><code> do {
|
||||
putchar(encoding & 1 ? '-' : '.');
|
||||
encoding >>= 1;
|
||||
while (encoding > 1);</code></pre>
|
||||
@@ -179,7 +180,7 @@ following</p>
|
||||
<p>Notice these encodings in the initialization string. Only the coding for
|
||||
<code>5</code> needs an escape (<code>5 = ..... > 01111111 = '\177'</code>). The way the length
|
||||
is encoded still allows the encoding to be its own counter:</p>
|
||||
<pre class="<!---c-->"><code> do {
|
||||
<pre><code> do {
|
||||
putchar(encoding & 1 ? '-' : '.');
|
||||
encoding = (encoding + 32) >> 1;
|
||||
} while (encoding > 35);</code></pre>
|
||||
@@ -188,12 +189,12 @@ Note that the calculation for the next value of <code>encoding</code> is done at
|
||||
precision, so that the actual value of the <code>char</code> remains <code><= 127</code>.</p>
|
||||
<p>The character <code>'-'</code> (ASCII 45) and <code>'.'</code> (ASCII 46) are conveniently in
|
||||
sequence, so the putchar can simply be</p>
|
||||
<pre class="<!---c-->"><code> putchar(45 + encoding % 2);</code></pre>
|
||||
<pre><code> putchar(45 + encoding % 2);</code></pre>
|
||||
<p>I used the modulo operator this time, because <code>+</code> takes precedence over <code>&</code>.
|
||||
The assignment can be incorporated into the <code>while</code> control test, and a
|
||||
<code>do-while</code> loop with a body of a single expression statement can be written
|
||||
as a <code>while</code> loop with a comma operator in the test:</p>
|
||||
<pre class="<!---c-->"><code> while(putchar(45 + encoding % 2), encoding = encoding + 32 >> 1);</code></pre>
|
||||
<pre><code> while(putchar(45 + encoding % 2), encoding = encoding + 32 >> 1);</code></pre>
|
||||
<p>Voila.</p>
|
||||
<p>Now, the decoding of Morse codes is just the reverse. We shift in <code>0</code>s
|
||||
and <code>1</code>s as we scan the line. But: we have to scan from back to front
|
||||
|
||||
+10
-9
@@ -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#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 all</code></pre>
|
||||
<pre><code> make all</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./dorssel
|
||||
<pre><code> ./dorssel
|
||||
# input some text
|
||||
|
||||
echo text | ./dorssel</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>How does the program decide which way to convert?</p>
|
||||
<p>What obsolescent feature are we talking about? (No, it’s not a
|
||||
@@ -166,7 +167,7 @@ altering the behavior ?</p></li>
|
||||
<h3 id="extra-credit">Extra credit:</h3>
|
||||
<p>Try doing what the last part of the last command in <a href="try.sh">try.sh</a> suggests.
|
||||
As in, do the following:</p>
|
||||
<pre class="<!---sh-->"><code> echo ". -..- . .-. -.-. .. ... .
|
||||
<pre><code> echo ". -..- . .-. -.-. .. ... .
|
||||
-.-. .... .- -. --. . - .... . .--. .-. --- --. .-. .- -- ... --- .. - -.. --- . ... -. --- - ... .... --- ..- -" | ./dorssel</code></pre>
|
||||
<p>and make the necessary adjustments.</p>
|
||||
<p>You might also want to read the <a href="dorssel.html">dorssel.html</a> file.</p>
|
||||
@@ -195,21 +196,21 @@ ASCII. As far as I can tell, the program is conforming and does not
|
||||
invoke undefined behavior.</p>
|
||||
<h3 id="hints">Hints</h3>
|
||||
<p>Try:</p>
|
||||
<pre class="<!---sh-->"><code> ./dorssel < dorssel.c | ./dorssel</code></pre>
|
||||
<pre><code> ./dorssel < dorssel.c | ./dorssel</code></pre>
|
||||
<p>to see what variables, numbers, and functions are used. (Does a
|
||||
better job than most C beautifiers).</p>
|
||||
<ul>
|
||||
<li>Filter your text twice (as in the previous sample) to obtain a version of your
|
||||
text that can be reversibly Morsified, i.e.</li>
|
||||
</ul>
|
||||
<pre class="<!---sh-->"><code> ./dorssel < dorssel.c | ./dorssel | ./dorssel | ./dorssel</code></pre>
|
||||
<pre><code> ./dorssel < dorssel.c | ./dorssel | ./dorssel | ./dorssel</code></pre>
|
||||
<p>is the same as</p>
|
||||
<pre class="<!---sh-->"><code> ./dorssel < dorssel.c | ./dorssel</code></pre>
|
||||
<pre><code> ./dorssel < dorssel.c | ./dorssel</code></pre>
|
||||
<ul>
|
||||
<li>The file <a href="dorssel.md">dorssel.md</a> contains all the information needed to
|
||||
understand this program. For an obfuscated spoiler, try</li>
|
||||
</ul>
|
||||
<pre class="<!---sh-->"><code> ./dorssel < dorssel.md</code></pre>
|
||||
<pre><code> ./dorssel < dorssel.md</code></pre>
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
@@ -238,10 +239,10 @@ understand this program. For an obfuscated spoiler, try</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/dorssel.orig.c">dorssel.orig.c</a> - original source</li>
|
||||
<li><a href="dorssel.html">dorssel.html</a> - author description of entry</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="1998_dorssel.tar.bz2">1998_dorssel.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_dorssel.tar.bz2">1998_dorssel.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/dorssel.md">dorssel.md</a> - markdown source for dorssel.html</li>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_fanf.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#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 all</code></pre>
|
||||
<pre><code> make all</code></pre>
|
||||
<p>NOTE: this may take a while. Some systems may have problems building
|
||||
this entry because of the system resources it requires.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./fanf</code></pre>
|
||||
<pre><code> ./fanf</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>Enter an expression on standard input. To try some we have selected:</p>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<h3 id="historical-aside">Historical aside:</h3>
|
||||
<p>At a time the code in <a href="fanf.c">fanf.c</a> was that of <a href="fanf.orig.c">fanf.orig.c</a>
|
||||
@@ -165,7 +166,7 @@ source.</p>
|
||||
<code>fanftmp2.c</code> C program. Take a look at that final C program again,
|
||||
can you begin to understand what it is doing?</p>
|
||||
<p>Look at the first stage of the C pre-processing which was done like:</p>
|
||||
<pre class="<!---sh-->"><code> cc fanf.c -E > fanftmp1.c</code></pre>
|
||||
<pre><code> cc fanf.c -E > fanftmp1.c</code></pre>
|
||||
<p>Skip to the bottom of <code>fanftmp1.c</code> (after all of the C pre-processor header
|
||||
stuff … look for a line of the form: <code># 38 "fanf.c"</code> near the bottom)
|
||||
and look at the resulting code. This code, when C pre-processed
|
||||
@@ -451,10 +452,10 @@ International Logic Programming Symposium, 1995.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/fanf/fanf.orig.c">fanf.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/fanf/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/fanf/fanf.lambda">fanf.lambda</a> - lambda expressions</li>
|
||||
<li><a href="1998_fanf.tar.bz2">1998_fanf.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_fanf.tar.bz2">1998_fanf.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/fanf/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/fanf/.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>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_schnitzi.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 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#1998_schnitzi">1998 schnitzi bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./schnitzi n > sort.c
|
||||
<pre><code> ./schnitzi n > sort.c
|
||||
make sort
|
||||
./sort
|
||||
# enter three numbers, space separated
|
||||
@@ -155,10 +156,10 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
|
||||
echo x y z | ./sort</code></pre>
|
||||
<p>where <code>n</code> and <code>x</code>, <code>y</code> and <code>z</code> are numbers.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>What happens if at the command line you don’t specify <code>n</code> numbers that the
|
||||
program expects? For instance try:</p>
|
||||
<pre class="<!---sh-->"><code> ./schnitzi 5 > sort.c
|
||||
<pre><code> ./schnitzi 5 > sort.c
|
||||
make sort
|
||||
|
||||
# try running the next command four or five times:
|
||||
@@ -201,13 +202,13 @@ memory capacity, since the function call stack never goes beyond
|
||||
a depth of one.</p>
|
||||
<p>So what does it do? Give it an integer <code>(1 < n < 27)</code> on the command
|
||||
line, such as</p>
|
||||
<pre class="<!---sh-->"><code> ./schnitzi 5</code></pre>
|
||||
<pre><code> ./schnitzi 5</code></pre>
|
||||
<p>The output will itself be a lipographic program, one which expects input of
|
||||
(in this case) five numbers and prints them out sorted. It sorts
|
||||
them, however, using only <code>if/else</code> statements, without arrays or
|
||||
looping. To see the resulting program run, redirect the output from
|
||||
<code>schnitzi</code> into another file, like this</p>
|
||||
<pre class="<!---sh-->"><code> ./schnitzi 4 > sort.c</code></pre>
|
||||
<pre><code> ./schnitzi 4 > sort.c</code></pre>
|
||||
<p>and then compile it.</p>
|
||||
<h3 id="spoilers-and-hints">Spoilers And Hints:</h3>
|
||||
<p>The big key to this program is figuring out what the names of the
|
||||
@@ -243,10 +244,10 @@ other functions all the time. Or, almost all the time.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schnitzi/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schnitzi/schnitzi.orig.c">schnitzi.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schnitzi/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="1998_schnitzi.tar.bz2">1998_schnitzi.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_schnitzi.tar.bz2">1998_schnitzi.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schnitzi/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schnitzi/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_schweikh1.tar.bz2",
|
||||
"inventory_order" : 100000,
|
||||
"inventory_order" : 1415926535,
|
||||
"OK_to_edit" : false,
|
||||
"display_as" : "tbz2",
|
||||
"display_via_github" : false,
|
||||
|
||||
+12
-11
@@ -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 all</code></pre>
|
||||
<pre><code> make all</code></pre>
|
||||
<p>There is an alternate version of this entry that will work with macOS. See the
|
||||
<a href="#alternate-code">Alternate code</a> section below. We recommend you look at it
|
||||
even if you don’t have a Mac, unless you want to figure it out yourself, as it
|
||||
includes some interesting details about the entry.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./schweikh1</code></pre>
|
||||
<pre><code> ./schweikh1</code></pre>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>As noted above this entry will not work as it stands for macOS and there are
|
||||
some important notes as well as a description of how the fixed version works
|
||||
@@ -157,7 +158,7 @@ adjustments). For details of what had to change, see <a href="macos.html">macos.
|
||||
Unless you wish to figure it out yourself, we recommend that you read this even
|
||||
if you don’t have a Mac as it has some interesting details about the entry.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<pre><code> make alt</code></pre>
|
||||
<h3 id="alternate-build-1">Alternate build:</h3>
|
||||
<p>Use <code>schweikh1.alt</code> as you would <code>schweikh1</code> above.</p>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
@@ -220,7 +221,7 @@ macros are explicitly enumerated. In a compliant implementation no other
|
||||
macros can be defined, because you could write strictly conforming
|
||||
programs that may fail to compile due to syntax errors: supposing that
|
||||
<code><stdio.h></code> defines <code>PIPE_BUF</code>, then the conforming</p>
|
||||
<pre class="<!---c-->"><code> #include <assert.h>
|
||||
<pre><code> #include <assert.h>
|
||||
#include <stdio.h> /* <- or where the bogus macro is defined */
|
||||
#include <string.h>
|
||||
#define STR(x) #x
|
||||
@@ -243,12 +244,12 @@ C compilers.</p>
|
||||
must resemble one of the canonical forms, <code>"foo.h"</code> or <code><bar.h></code>.
|
||||
This lets us write things like</li>
|
||||
</ol>
|
||||
<pre class="<!---c-->"><code> #define HEADER "foo.h"
|
||||
<pre><code> #define HEADER "foo.h"
|
||||
#include HEADER</code></pre>
|
||||
<p>I could not find a compiler rejecting this. However, if we’re
|
||||
torturing the preprocessor a little more, by using token pasting,
|
||||
at least one compiler falls over.</p>
|
||||
<pre class="<!---c-->"><code> #define H(x) <st##x##.h>
|
||||
<pre><code> #define H(x) <st##x##.h>
|
||||
#include H(dio) /* expands to <stdio.h> */</code></pre>
|
||||
<p>is rejected by tcc version 4.1.2, the TenDRA compiler:
|
||||
<code>"t.c", line 3: Error:\ [ISO 6.8.3.3]: Invalid result for '##' operator in macro 'H'.</code></p>
|
||||
@@ -264,7 +265,7 @@ allows: in <code>#line num "file"</code> the <code>"file"</code> is an s-char-se
|
||||
ISO 6.8.4. ISO 6.1.4 defines string literals as s-char-sequences,
|
||||
which may include octal escape sequences. Let’s look at</li>
|
||||
</ol>
|
||||
<pre class="<!---c-->"><code> #include <stdio.h>
|
||||
<pre><code> #include <stdio.h>
|
||||
#line 42 "foo\0bar"
|
||||
int main (void) {
|
||||
printf ("%s %d\n", __FILE__, (int)sizeof __FILE__);
|
||||
@@ -283,7 +284,7 @@ ISO 6.6.4.2. Then make fun of the guru’s answer by waving <code>case __LINE__:
|
||||
under his/her nose. Easy money from a bet! Make sure your guru has
|
||||
no chance to use Standardese weasel words as an escape: can I have</p></li>
|
||||
</ol>
|
||||
<pre class="<!---c-->"><code> case <some_token>:
|
||||
<pre><code> case <some_token>:
|
||||
case <some_token>:</code></pre>
|
||||
<p>in the same switch? (Note that you need the [invisible] newline. You
|
||||
can generously allow the additional constraint that no <code>#undef</code>s or
|
||||
@@ -315,14 +316,14 @@ I could have used a lot more <code>^K</code> and <code>^L</code> probably undete
|
||||
counter but decided to err on the side of safety. I use a perl
|
||||
script to compute the character count according to the rules.
|
||||
The advantages of an independent clean room approach…</p>
|
||||
<pre class="<!---perl-->"><code> #!/usr/bin/perl -w
|
||||
<pre><code> #!/usr/bin/perl -w
|
||||
$/ = "\0";
|
||||
$_ = <>;
|
||||
s/[;{}][ \t\n]/\n/g;
|
||||
s/[ \t\n]+//g;
|
||||
print length ($_),"\n";</code></pre>
|
||||
<p>To use, try:</p>
|
||||
<pre class="<!---sh-->"><code> perl ./charcount.pl schweikh1.c</code></pre>
|
||||
<pre><code> perl ./charcount.pl schweikh1.c</code></pre>
|
||||
<p>I have tried, as suggested in the guidelines, to let the code look
|
||||
like ordinary C code. Apart from a few long lines I think I left
|
||||
the indentation like I would in RL. You should however not try to
|
||||
@@ -364,10 +365,10 @@ That describes exactly my modest attempts…</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/charcount.pl">charcount.pl</a> - character counter</li>
|
||||
<li><a href="macos.html">macos.html</a> - work with macOS</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/info">info</a> - standards compliance</li>
|
||||
<li><a href="1998_schweikh1.tar.bz2">1998_schweikh1.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_schweikh1.tar.bz2">1998_schweikh1.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
<div class="sidenav">
|
||||
<a href="../../news.html">IOCCC News</a>
|
||||
<a href="../../status.html">Contest status</a>
|
||||
<a href="../../next/index.html">Rules and Guidelines</a>
|
||||
<a href="../../faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="../../faq.html">FAQ</a>
|
||||
</div>
|
||||
@@ -138,7 +139,7 @@ a file was not found (this limitation was removed in both versions in 2023). see
|
||||
<p>However, as noted, macOS does <strong>not</strong> have <code>/usr/include</code> so this would never
|
||||
work for macOS without some changes, described next. For macOS you will need the
|
||||
command line tools installed which can be done like:</p>
|
||||
<pre class="<!---sh-->"><code> sudo xcode-select --install</code></pre>
|
||||
<pre><code> sudo xcode-select --install</code></pre>
|
||||
<p>An important point is that the original version hard-coded <code>gcc</code> but just like
|
||||
the entry, the alternate version has also removed this limitation despite <code>gcc</code>
|
||||
existing (though it’s <code>clang</code>) in macOS.</p>
|
||||
@@ -154,7 +155,7 @@ the command is:</p>
|
||||
<p>which has been changed to be:</p>
|
||||
<pre><code>"0cc -ansi -E -dM -undef %s /usr/include/%s>r\0 ("</code></pre>
|
||||
<p>Shortly below that you will see, as noted above, the numbers:</p>
|
||||
<pre class="<!---c-->"><code> if ((H = fopen (__FILE__+43, 43+__FILE__)))
|
||||
<pre><code> if ((H = fopen (__FILE__+43, 43+__FILE__)))
|
||||
while ((fgets (L, (int)sizeof L, H)) != 0) {
|
||||
I[strcspn (I, 45+__FILE__)] = O = 0;</code></pre>
|
||||
<p>The first number in the above C means the length starting from 0 up through the
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_schweikh2.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,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 all</code></pre>
|
||||
<pre><code> make all</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./yarng</code></pre>
|
||||
<pre><code> ./yarng</code></pre>
|
||||
<p>or</p>
|
||||
<pre class="<!---sh-->"><code> ./yarng integer_number</code></pre>
|
||||
<pre><code> ./yarng integer_number</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre class="<!---sh-->"><code> ./try.sh
|
||||
<pre><code> ./try.sh
|
||||
|
||||
./yarng
|
||||
# watch what it does</code></pre>
|
||||
@@ -160,24 +161,24 @@ results different? Why?</p>
|
||||
<p>At the time of judging, some non-gcc compilers that were not fully ANSI standard
|
||||
did not compile this entry correctly. Also at that time, some gcc and egcs
|
||||
implementations ran into a problem when building the entry. Doing:</p>
|
||||
<pre class="<!---sh-->"><code> make schweikh2</code></pre>
|
||||
<pre><code> make schweikh2</code></pre>
|
||||
<p>often produced an error of the form:</p>
|
||||
<pre class="<!---sh-->"><code> gcc -ansi schweikh2.alt.c -o schweikh2.alt
|
||||
<pre><code> gcc -ansi schweikh2.alt.c -o schweikh2.alt
|
||||
as: Error: cca00NzV.s, line 58: Missing " at end of string
|
||||
"
|
||||
as: Error: cca00NzV.s, line 58: malformed statement
|
||||
*** Error code 1 (bu21)</code></pre>
|
||||
<p>because the line:</p>
|
||||
<pre class="<!---c-->"><code> #line 10 ONE(O(1,1,2,6,0,6))</code></pre>
|
||||
<pre><code> #line 10 ONE(O(1,1,2,6,0,6))</code></pre>
|
||||
<p>turned into the line:</p>
|
||||
<pre class="<!---c-->"><code> # 9 "01\012"</code></pre>
|
||||
<pre><code> # 9 "01\012"</code></pre>
|
||||
<p>(note, though, how that line is on line 11) which caused gcc to give to the
|
||||
assembler the following two lines:</p>
|
||||
<pre class="<!---asm-->"><code> .stabs "schweikh2.c
|
||||
<pre><code> .stabs "schweikh2.c
|
||||
",132,0,0,Ltext1</code></pre>
|
||||
<p>and the lone <code>"</code> after the <code>#.file</code> line resulted in an assembly syntax error.</p>
|
||||
<p>In some cases one had to compile using <code>gcc -g</code>:</p>
|
||||
<pre class="<!---sh-->"><code> make schweikh2 CFLAGS=-g</code></pre>
|
||||
<pre><code> make schweikh2 CFLAGS=-g</code></pre>
|
||||
<p>to trigger this error.</p>
|
||||
<p>With the proper text beyond the <code>\012</code>, it was even possible to have all kinds
|
||||
of fun adding inline assembly via <code>#line</code> directives. :-)</p>
|
||||
@@ -191,7 +192,7 @@ for that matter :-) ).</p>
|
||||
you could have emailed the author for a free pat on the back (and maybe you
|
||||
still can :-) ).</p>
|
||||
<p>Because of this bug, the code was changed to be instead:</p>
|
||||
<pre class="<!---c-->"><code> #line 10 "01\015"</code></pre>
|
||||
<pre><code> #line 10 "01\015"</code></pre>
|
||||
<p>However in 2023 it was observed that <em>it is gcc</em> (at least some versions?) that
|
||||
has a problem with the compilation of the <em>modified</em> program, giving an internal
|
||||
compiler error:</p>
|
||||
@@ -200,9 +201,9 @@ compiler error:</p>
|
||||
:12:1: warning: missing terminating " character
|
||||
:12:19: internal compiler error: invalid built-in macro "__FILE__"</code></pre>
|
||||
<p>so the line:</p>
|
||||
<pre class="<!---c-->"><code> #line 10 "01\015"</code></pre>
|
||||
<pre><code> #line 10 "01\015"</code></pre>
|
||||
<p>was changed to:</p>
|
||||
<pre class="<!---c-->"><code> #line 10 ONE(O(1,1,2,6,0,6))</code></pre>
|
||||
<pre><code> #line 10 ONE(O(1,1,2,6,0,6))</code></pre>
|
||||
<p>and now it works with both clang and gcc.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="what-this-program-does">What this program does</h3>
|
||||
@@ -223,7 +224,7 @@ bits may be specified by an argument and defaults either to <code>UINT_MAX</code
|
||||
(least likely) or <code>UINT_MAX+1</code> (most likely). Extra credit: why the
|
||||
different values? How long would you need for an empirical test?</p>
|
||||
<p>For example:</p>
|
||||
<pre class="<!---sh-->"><code> $ ./yarng 32
|
||||
<pre><code> $ ./yarng 32
|
||||
10111001010101110110010101001111
|
||||
$ ./yarng 5
|
||||
10011</code></pre>
|
||||
@@ -316,10 +317,10 @@ Type <code>yarng</code> and watch Him roll.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh2/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh2/schweikh2.orig.c">schweikh2.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh2/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="1998_schweikh2.tar.bz2">1998_schweikh2.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_schweikh2.tar.bz2">1998_schweikh2.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh2/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh2/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_schweikh3.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,7 +142,7 @@ 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 all</code></pre>
|
||||
<pre><code> make all</code></pre>
|
||||
<p>The author stated:</p>
|
||||
<pre><code> In the remote event that the input has more than `8192` files with
|
||||
the same size (on systems where `sizeof (char *) == 4`, or `4096` when
|
||||
@@ -153,11 +154,11 @@ code</a> below.</p>
|
||||
<p>If <code>dir</code> is the directory (or a directory tree) where you keep
|
||||
all your favorite pictures off the Internet or from
|
||||
<code>alt.binaries.pictures.*</code>, do</p>
|
||||
<pre class="<!---sh-->"><code> find dir -type f -print | ./samefile</code></pre>
|
||||
<pre><code> find dir -type f -print | ./samefile</code></pre>
|
||||
<p>Maybe you will not need to buy another 10 GB disk to store them. :-)</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>If you’re in this winning entry’s directory:</p>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>Notice that the tool finds some files that are duplicates.</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>If you run into the problem that the author described (above) you can redefine
|
||||
@@ -165,7 +166,7 @@ the size as described; this was done with the <code>SZ</code> macro defined in t
|
||||
which if (in the code) is unset will be set to the default, 32767.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>If you wish to change the size to say, 55555:</p>
|
||||
<pre class="<!---sh-->"><code> make clobber SIZE=55555 alt</code></pre>
|
||||
<pre><code> make clobber SIZE=55555 alt</code></pre>
|
||||
<p>or whatever you wish to redefine it to.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This program is not as smart as to detect identity of JPEG files with the same
|
||||
@@ -181,13 +182,13 @@ Thank God the IEEE does not standardize a coding style…</p>
|
||||
<h3 id="what-this-program-does">What this program does</h3>
|
||||
<p>This is best explained in the man page. The troff source for this
|
||||
man page can be found in the file <a href="samefile.1">samefile.1</a>. To render try:</p>
|
||||
<pre class="<!---sh-->"><code> `man ./samefile.1</code></pre>
|
||||
<pre><code> `man ./samefile.1</code></pre>
|
||||
<p>Otherwise:</p>
|
||||
<h3 id="samefile1-user-manuals-samefile1">SAMEFILE(1) User Manuals SAMEFILE(1)</h3>
|
||||
<h4 id="name">NAME</h4>
|
||||
<p><code>samefile</code> - find identical files</p>
|
||||
<h4 id="synopsis">SYNOPSIS</h4>
|
||||
<pre class="<!---sh-->"><code> ./samefile</code></pre>
|
||||
<pre><code> ./samefile</code></pre>
|
||||
<h4 id="description">DESCRIPTION</h4>
|
||||
<p><code>samefile</code> reads a list of file names (one file name per
|
||||
line) from <code>stdin</code>. For each file name pair with identical
|
||||
@@ -219,7 +220,7 @@ the output for a group of identical files with different
|
||||
inode numbers is also minimized. Suppose you have six
|
||||
identical files of size 100 in an inode group consisting
|
||||
of the three inodes with numbers 10, 20 and 30:</p>
|
||||
<pre class="<!---sh-->"><code> $ ls -i # output edited for readability:
|
||||
<pre><code> $ ls -i # output edited for readability:
|
||||
10 file1 20 file4 30 file6
|
||||
10 file2 20 file5
|
||||
10 file3
|
||||
@@ -245,13 +246,13 @@ more than a couple dozen files of the same size.</p>
|
||||
<h4 id="examples">EXAMPLES</h4>
|
||||
<p>For everybody:</p>
|
||||
<p>What are the duplicates under my home directory?</p>
|
||||
<pre class="<!---sh-->"><code> find $HOME | ./samefile</code></pre>
|
||||
<pre><code> find $HOME | ./samefile</code></pre>
|
||||
<p>For the sysadmin folks:</p>
|
||||
<p>Report all duplicate files under /usr larger than 16k:</p>
|
||||
<pre class="<!---sh-->"><code> find /usr -size +16384c -a -type f | ./samefile</code></pre>
|
||||
<pre><code> find /usr -size +16384c -a -type f | ./samefile</code></pre>
|
||||
<p>For the ftp and WWW admins:
|
||||
How much space is wasted below our site’s /pub directory?</p>
|
||||
<pre class="<!---sh-->"><code> find /pub -type f | samefile | awk '{sum += $1} END {print sum}'</code></pre>
|
||||
<pre><code> find /pub -type f | samefile | awk '{sum += $1} END {print sum}'</code></pre>
|
||||
<h4 id="exit-status">EXIT STATUS</h4>
|
||||
<p>If <code>samefile</code> runs out of memory the exit status is 1, zero
|
||||
otherwise.</p>
|
||||
@@ -323,10 +324,10 @@ the same size (on systems where <code>sizeof (char *) == 4</code>, or <code>4096
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/samefile.1.dupe">samefile.1.dupe</a> - samefile man page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/samefile.1">samefile.1</a> - samefile man page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="1998_schweikh3.tar.bz2">1998_schweikh3.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_schweikh3.tar.bz2">1998_schweikh3.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
},
|
||||
{
|
||||
"file_path" : "1998_tomtorfs.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#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 all</code></pre>
|
||||
<pre><code> make all</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre class="<!---sh-->"><code> ./tomtorfs filename bitwidth polynom reflected init xor</code></pre>
|
||||
<pre><code> ./tomtorfs filename bitwidth polynom reflected init xor</code></pre>
|
||||
<p>where:</p>
|
||||
<pre><code> filename : file to calculate the CRC of
|
||||
bitwidth : width of the CRC in bits (decimal)
|
||||
@@ -152,7 +153,7 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
|
||||
init : initial value for the CRC (hexadecimal)
|
||||
xor : value to xor the final CRC with (hexadecimal)</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>If you don’t believe the program is correct, try and compare the output
|
||||
of the program with the value of CRCs computed by PKZIP or any other
|
||||
@@ -169,13 +170,13 @@ archiver that uses the CRC-32 algorithm.</p>
|
||||
xor : value to xor the final CRC with (hexadecimal)</code></pre>
|
||||
<h3 id="examples">Examples</h3>
|
||||
<h4 id="crc-16">CRC-16:</h4>
|
||||
<pre class="<!---sh-->"><code> ./tomtorfs filename 16 1021 0 FFFF 0000</code></pre>
|
||||
<pre><code> ./tomtorfs filename 16 1021 0 FFFF 0000</code></pre>
|
||||
<h4 id="crc-32">CRC-32:</h4>
|
||||
<pre class="<!---sh-->"><code> ./tomtorfs filename 32 04C11DB7 1 FFFFFFFF FFFFFFFF</code></pre>
|
||||
<pre><code> ./tomtorfs filename 32 04C11DB7 1 FFFFFFFF FFFFFFFF</code></pre>
|
||||
<h4 id="xmodem">XMODEM:</h4>
|
||||
<pre class="<!---sh-->"><code> ./tomtorfs filename 16 8408 1 0000 0000</code></pre>
|
||||
<pre><code> ./tomtorfs filename 16 8408 1 0000 0000</code></pre>
|
||||
<h4 id="arc">ARC:</h4>
|
||||
<pre class="<!---sh-->"><code> ./tomtorfs filename 16 8005 1 0000 0000</code></pre>
|
||||
<pre><code> ./tomtorfs filename 16 8005 1 0000 0000</code></pre>
|
||||
<h3 id="portability-notes">Portability notes</h3>
|
||||
<p>The program assumes <code>CHAR_BIT==8</code>. Results are undefined if <code>bitwidth > sizeof(unsigned long) * 8</code>. It is also assumed that <code>EOF</code> is <code>-1</code> and <code>1</code> is a
|
||||
valid exit value to indicate failure (replace them with <code>EOF</code> resp.
|
||||
@@ -245,10 +246,10 @@ for writing this. You can find it in <a href="crc.txt">crc.txt</a>.</p>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/tomtorfs/tomtorfs.orig.c">tomtorfs.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/tomtorfs/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/tomtorfs/crc.txt">crc.txt</a> - painless guide to CRC algorithms</li>
|
||||
<li><a href="1998_tomtorfs.tar.bz2">1998_tomtorfs.tar.bz2</a> - download entry tarball</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="1998_tomtorfs.tar.bz2">1998_tomtorfs.tar.bz2</a> - download entry tarball</li>
|
||||
<li><a href="index.html">index.html</a> - this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/tomtorfs/README.md">README.md</a> - markdown source for this web page</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/tomtorfs/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
|
||||
Reference in new issue
Block a user