build index.html for all winners
Updated manifest as per recent file changes. Updated winner `.winner.json` to reflect the manifest changes. Added [bin/all_run.sh](bin/all_run.sh) tool to run a command over all winning entries. These tools had slight improvements in the help usage message: * bin/gen-author.sh VERSION="1.3.1 2024-01-16" * bin/gen-inventory.sh VERSION="1.0.1 2024-01-16" * bin/pandoc_wrapper.sh VERSION="1.3.1 2024-01-16" * bin/subst.default.sh VERSION="1.1.1 2024-01-16" * bin/subst.winner-index.sh VERSION="1.1.1 2024-01-16" The `bin/readme2index.sh` tool was improved so that if the `index.html` file exists and the tool forms the exact same content, then the file `index.html` file is NOT touched. * bin/readme2index.sh VERSION="1.1 2024-01-16" We used the following command to generate `index.html` files for all winning entries: ```sh bin/all_run.sh -v 3 bin/readme2index.sh ``` NOTE: We have not (yet) built HTML files above the winner directory level (e.g., no year level nor top level HTML), nor have be built non-index HTML files for winners. NOTE: By default we are running `pandoc(1)` with: ``` --fail-if-warnings=true ``` This means that any problems with markdown to HTML generates an error. This is done to be sure that the HTML conversion is clean. We had to fix the following `README.md` files: * `2000/rince/README.md` The reference [^2] was never used. We made a guess that [^2] applies to the same spot as [^1]. Perhaps there is a better spot where [^2] applies? NOTE: For every reference, there MUST be some place where that reference is used. * 2012/vik/README.md The string "$...$" is assumed to be a TeX encoded string. NOTE: Every "$..$" needs to be backslashed as in "\$..\$". * 2018/burton1/README.md The reference [2] was duplicated. We changed the second [2] to [3]. NOTE: Every reference needs to have a unique number. * 2020/carlini/README.md The string "$...$" is assumed to be a TeX encoded string. NOTE: Every "$..$" needs to be backslashed as in "\$..\$". We also found 2 errors in the `author/author_handle.json` file set: * author/Anonymous_2001.json The `author/Anonymous_2001.json` file was missing. * author/Jari_Arkko.json The winner ID for `1989_jar.1` had a typo.
This commit is contained in:
1 parent
893cd915b6
commit
c1466f5165
350 files changed
+95242
-4217
No files matched your search
+404
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,416 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/banks/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 banks</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: banks winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,banks,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/banks</title>
|
||||
<meta name="description" content="1998 IOCCC winner banks">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, banks">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 banks</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/banks</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.first.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fbanks%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/banks/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left Disabled" href="#">first entry</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../bas1/index.html">bas1 →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.first.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Carl_Banks">Carl Banks</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#US">US</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<p>You may redefine all the keys and the time step with predefined
|
||||
macros. The author provided the following able:</p>
|
||||
<pre><code>Control Description Default Key
|
||||
------- ------------------------- -----------
|
||||
IT Increase throttle XK_Page_Up
|
||||
DT Decrease throttle XK_Page_Down
|
||||
FD Move stick forward XK_Up
|
||||
BK Move stick back XK_Down
|
||||
LT Move stick left XK_Left
|
||||
RT Move stick right XK_Right
|
||||
CS Center stick XK_Enter</code></pre>
|
||||
<p>There is another macro, <code>dt</code>, which is the time step. See
|
||||
some important points on this in the author’s comments in the <a
|
||||
href="#alternate-build-instructions">Alternate Build Instructions</a>
|
||||
section.</p>
|
||||
<p>If however you wish to change the above controls, see the header file
|
||||
<a href="keysym.h">keysym.h</a> for the definitions of other characters
|
||||
that you might wish 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>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber IT=XK_u DT=XK_d all</span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#define XK_d </span><span class="bn">0x0064</span><span class="pp"> </span><span class="co">/* U+0064 LATIN SMALL LETTER D */</span></span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#define XK_u </span><span class="bn">0x0075</span><span class="pp"> </span><span class="co">/* U+0075 LATIN SMALL LETTER U */</span></span></code></pre></div>
|
||||
<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>
|
||||
<p>The upper case letters would be <code>XK_U</code> and
|
||||
<code>XK_D</code> and you can search the header file for ‘LATIN CAPITAL
|
||||
D’, for example.</p>
|
||||
<p>For those who do not have a Page Up or Page Down key, see <a
|
||||
href="#alternate-code">alternate code</a> below. The difference from the
|
||||
alt build and the original entry is that the page up and page down keys
|
||||
are defined to a default but they are hard coded as doing otherwise
|
||||
would necessarily complicate the build 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>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span> horizon.sc pittsburgh.sc <span class="kw">|</span> <span class="ex">./banks</span></span></code></pre></div>
|
||||
<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>
|
||||
<p>For a fun time after running the above command, hold down the up
|
||||
arrow and left arrow for about 10 seconds and see what happens. Or, if
|
||||
you wish to really use it in a non-silly way, see the author’s remarks
|
||||
for the real controls. Perhaps you can regain control?</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>If you do not have access to a page up or page down key, for instance
|
||||
you’re using a Mac, you can use the alt code (though it actually uses
|
||||
the same code) that will redefine the keys to increase throttle and
|
||||
decrease throttle. This same method can be used with the original code
|
||||
but this sets up predefined keys in place of Page Up and Page Down.</p>
|
||||
<p>The keys were somewhat arbitrarily selected but it was decided to
|
||||
make them both on the left side of a QWERTY keyboard as one might have a
|
||||
harder time using the arrows at the same time as typing on the right
|
||||
side.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>As the Makefile allows you to configure the keys to use you may
|
||||
redefine the keys but with the alt build you cannot, as described
|
||||
earlier, redefine the page up and page down replacement keys. If you
|
||||
want to do that you should use the original entry as described in the to
|
||||
build section above.</p>
|
||||
<p>In the alt build it is <code>f</code> and <code>d</code> respectively
|
||||
as these are 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>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<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>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>banks.alt</code> as you would <code>banks</code> but for
|
||||
use the different keys as configured at compilation.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>What can we say? It’s a flight sim done in 1536 bytes of real code.
|
||||
This one is a real marvel. When people say the size limits are too
|
||||
tight, well, we can just point them at this one. This program really
|
||||
pushes the envelope!</p>
|
||||
<p>The provided Makefile should work; you will need an X-ish system, and
|
||||
a <code>select(2)</code> system call. More on building in the author
|
||||
remarks.</p>
|
||||
<p>Carl Banks linked to (on his old website) an interesting article
|
||||
about this entry, a flight simulator in just 1536 bytes, which can be
|
||||
found at <a
|
||||
href="https://web.archive.org/web/20040201120708/http://www.idg.co.nz/magazine/pcworld/oct99/code.htm"
|
||||
class="uri">https://web.archive.org/web/20040201120708/http://www.idg.co.nz/magazine/pcworld/oct99/code.htm</a>.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>You have just stepped out of the real world and into the virtual. You
|
||||
are now sitting in the cockpit of a Piper Cherokee airplane, heading
|
||||
north, flying 1000 feet above ground level.</p>
|
||||
<p>Use the keyboard to fly the airplane. The arrow keys represent the
|
||||
control stick. Press the Up Arrow key to push the stick forward. Press
|
||||
the left arrow key to move the stick left, and so on. Press Enter to
|
||||
re-center the stick. Use Page Up and Page Down to increase and decrease
|
||||
the throttle, respectively. (The rudder is automatically coordinated
|
||||
with the turn rate, so rudder pedals are not represented.)</p>
|
||||
<p>On your display, you will see on the bottom left corner three
|
||||
instruments. The first is the airspeed indicator; it tells you how fast
|
||||
you’re going in knots. The second is the heading indicator, or compass.
|
||||
0 is north, 90 is east, 180 is south, 270 is west. The third instrument
|
||||
is the altimeter, which measures your height above ground level in
|
||||
feet.</p>
|
||||
<h3 id="features">Features</h3>
|
||||
<ul>
|
||||
<li><p>Simulator models a <a
|
||||
href="https://en.wikipedia.org/wiki/Piper_PA-28_Cherokee">Piper
|
||||
Cherokee</a>, which is a light, single-engine propeller driven
|
||||
airplane.</p></li>
|
||||
<li><p>The airplane is modeled as a six degree-of-freedom rigid body,
|
||||
accurately reflecting its dynamics (for normal flight conditions, at
|
||||
least).</p></li>
|
||||
<li><p>Fly through a virtual 3D world, while sitting at your X
|
||||
console.</p></li>
|
||||
<li><p>Loadable scenery files.</p></li>
|
||||
<li><p>Head-up display contains three instruments: a true airspeed
|
||||
indicator, a heading indicator (compass), and an altimeter.</p></li>
|
||||
<li><p>Flight controls may be mapped to any keys at compile time by
|
||||
redefining the macros in the Makefile. Nice if your keyboard doesn’t
|
||||
have arrow keys. (Or if you still use vi. :-)</p></li>
|
||||
<li><p>Time step size can be set at compile time. This is useful to
|
||||
reduce flicker on network X connections. (But be careful: step sizes
|
||||
longer than about 0.03 seconds tend to have numerical stability
|
||||
problems.)</p></li>
|
||||
<li><p>Airplane never stalls!</p></li>
|
||||
<li><p>Airplane never runs out of fuel!</p></li>
|
||||
<li><p>Fly underground!</p></li>
|
||||
<li><p>Fly through buildings!</p></li>
|
||||
</ul>
|
||||
<h3 id="scenery">Scenery</h3>
|
||||
<p>Each of the <code>*.sc</code> files is a scenery file. The simulator
|
||||
program reads in the scenery from standard input on startup. You may
|
||||
input more than one scenery file, as long as there are less than 1000
|
||||
total lines of input.</p>
|
||||
<p>Here is a brief description of the scenery files:</p>
|
||||
<ul>
|
||||
<li><p><a href="horizon.sc">horizon.sc</a></p>
|
||||
<p>A horizon, nothing more. You will probably always want to input this
|
||||
piece of scenery.</p></li>
|
||||
<li><p><a href="mountains.sc">mountains.sc</a></p>
|
||||
<p>An alternate horizon; a little more mountainous.</p></li>
|
||||
<li><p><a href="%5Bpittsburgh.sc%5D">pittsburgh.sc</a></p>
|
||||
<p>Scenery of downtown Pittsburgh. The downtown area is initially
|
||||
located to your right.</p></li>
|
||||
<li><p><a href="bb.sc">bb.sc</a></p>
|
||||
<p>Simple obstacle course. Try to fly over the buildings and under the
|
||||
bridges.</p></li>
|
||||
<li><p><a href="pyramids.sc">pyramids.sc</a></p>
|
||||
<p>Fly over the tombs of the ancient Pharaohs, in this (fictitious)
|
||||
Egyptian landscape.</p></li>
|
||||
<li><p><a href="river.sc">river.sc</a></p>
|
||||
<p>Follow a flowing river from the sky.</p></li>
|
||||
</ul>
|
||||
<p>A few examples of how to input scenery:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span> horizon.sc pittsburgh.sc <span class="kw">|</span> <span class="ex">./banks</span></span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span> mountains.sc bb.sc <span class="kw">|</span> <span class="ex">./banks</span></span>
|
||||
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span> mountains.sc river.sc pyramids.sc <span class="kw">|</span> <span class="ex">./banks</span></span></code></pre></div>
|
||||
<p>You can simulate flying through a cloud bank as well:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./banks</span> <span class="op"><</span> /dev/null</span></code></pre></div>
|
||||
<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 segments
|
||||
from point to point as listed in the scenery file. <code>0 0 0</code> is
|
||||
used to end a series of consecutive line segments. Note that in the
|
||||
coordinate system used, <em>the third coordinate represents
|
||||
<strong>altitude</strong> in a negative sense: negative numbers are
|
||||
positive altitudes</em>.</p>
|
||||
<p>I’m sure you’ll be making your own scenery files very soon!!!</p>
|
||||
<h3 id="alternate-build-instructions">Alternate Build Instructions</h3>
|
||||
<p>Several options must be passed to the compiler to make the build
|
||||
work. The provided <a href="Makefile">Makefile</a> has the appropriate
|
||||
options set to default values. Use this section if you want to compile
|
||||
with different options.</p>
|
||||
<p>To map a key to a control, you must pass an option to the compiler in
|
||||
the format <code>-Dcontrol=key</code> or if you use the Makefile you can
|
||||
do <code>make control=key</code>.</p>
|
||||
<p>The possible controls you can map are described in the table
|
||||
below:</p>
|
||||
<pre><code>Control Description Default Key
|
||||
------- ------------------------- -----------
|
||||
IT Increase throttle XK_Page_Up
|
||||
DT Decrease throttle XK_Page_Down
|
||||
FD Move stick forward XK_Up
|
||||
BK Move stick back XK_Down
|
||||
LT Move stick left XK_Left
|
||||
RT Move stick right XK_Right
|
||||
CS Center stick XK_Enter</code></pre>
|
||||
<p>Values for the possible keys can be found in the X Windows header
|
||||
file <code><X11/keysym.h></code>. This file is most likely a
|
||||
cross-reference to another header,
|
||||
<code><X11/keysymdef.h></code>.</p>
|
||||
<p>For example, to map Center Stick to the space-bar, the compile option
|
||||
would be <code>-DCS=XK_space</code> or
|
||||
<code>make CS=XK_space</code>.</p>
|
||||
<p>To set the time step size, you must pass the following option to the
|
||||
compiler: <code>-Ddt=duration</code>, where <code>dt</code> is literal,
|
||||
and where <code>duration</code> is the time in seconds you want the time
|
||||
step to be. Alternatively, if you use the provided Makefile, you may
|
||||
just do <code>make dt=time</code>.</p>
|
||||
<p>Two things to keep in mind when selecting a time step. Time steps
|
||||
that are too large (more than about <code>0.03</code>) will cause
|
||||
numerical stability problems and should be avoided. Setting the time
|
||||
step to be smaller than your clock resolution will slow down the
|
||||
simulator, because the system pauses for more time than the simulator
|
||||
expects.</p>
|
||||
<p>The best advice is to set time step size to your system timer
|
||||
resolution. Try a longer period if you’re getting too much flicker.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998banks"><a name="inventory"></a>Inventory for
|
||||
1998/banks</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/banks.c">banks.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/banks.orig.c">banks.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/keysym.h">keysym.h</a>
|
||||
- included header file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/bb.sc">bb.sc</a>
|
||||
- scenery file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/horizon.sc">horizon.sc</a>
|
||||
- scenery file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/mountains.sc">mountains.sc</a>
|
||||
- scenery file</li>
|
||||
<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
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/banks/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fbanks%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+223
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,235 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/bas1/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 bas1</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: bas1 winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,bas1,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/bas1</title>
|
||||
<meta name="description" content="1998 IOCCC winner bas1">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, bas1">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 bas1</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/bas1</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fbas1%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/bas1/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../banks/index.html">← banks</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../bas2/index.html">bas2 →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Bas_de_Bakker">Bas de Bakker</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#NL">NL</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<p>If <code>lpr</code> on your system can print PostScript:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./bemazing</span> <span class="kw">|</span> <span class="fu">gunzip</span> <span class="kw">|</span> <span class="fu">lpr</span></span></code></pre></div>
|
||||
<p>else, while in X Window System,</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./bemazing</span> <span class="kw">|</span> <span class="fu">gunzip</span> <span class="kw">|</span> <span class="ex">gv</span> <span class="at">-</span></span></code></pre></div>
|
||||
<p>or:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./bemazing</span> <span class="kw">|</span> <span class="fu">gunzip</span> <span class="kw">|</span> <span class="fu">gs</span> <span class="at">-sDEVICE</span><span class="op">=</span>pgmraw <span class="at">-sOutputFile</span><span class="op">=</span><span class="st">'|xv -'</span> <span class="at">-</span></span></code></pre></div>
|
||||
<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 Escher’s</a>
|
||||
<a href="https://mcescher.com/gallery/">works</a>, you’ll know what
|
||||
we’re talking about.</p>
|
||||
<p>When trying to run the program with command line arguments, be
|
||||
generous.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="bemazing">BEMAZING</h3>
|
||||
<p>“You’re in a twisty little maze of beams, all different.”</p>
|
||||
<p><code>Bemazing</code> is “amazing” taken one step (letter) further.
|
||||
<code>Bemazing</code> creates a 3D maze of beams. Try to go from the
|
||||
entrance (the unfinished beam in one corner) to the exit (the unfinished
|
||||
beam in the opposite corner) or vice versa.</p>
|
||||
<p>For maximum portability, <code>Bemazing</code> is not tied to any
|
||||
window system, but creates postscript output. The picture it makes will
|
||||
fit on either A4 or letter size paper.</p>
|
||||
<p>In addition, because postscript is rather verbose,
|
||||
<code>Bemazing</code> creates the postscript in <code>gzip(1)</code>
|
||||
format, in order to save precious bits on your hard disk for the latest
|
||||
version of <a href="https://www.gnu.org/software/emacs/">GNU Emacs</a>
|
||||
(after all, you wouldn’t want to use an editor without a
|
||||
psychoanalyze-pinhead function, now would you). Again for maximum
|
||||
portability, <code>Bemazing</code> will take special care that the
|
||||
binary output will not contain any newline or return characters that may
|
||||
get weird treatment on systems that do not use the One True Line
|
||||
Separator.</p>
|
||||
<h3 id="notes">NOTES</h3>
|
||||
<p>Be sure to view the source with something that can display characters
|
||||
<code>\240-\377</code>. Use <code>LESSCHARSET=latin1</code>,
|
||||
<code>M-x</code> <code>standard-display-european</code> in GNU Emacs
|
||||
etc. The source does not use characters in the range
|
||||
<code>\200-\237</code> (we are not an unnamed word processor that tends
|
||||
to create HTML containing these control characters).</p>
|
||||
<p>Because this is not the obfuscated postscript contest, the postscript
|
||||
does not contain any <code>for</code>, <code>if</code> or other control
|
||||
structures. All the logic is in the C code. There are only a few
|
||||
straightforward <code>def</code>s, because otherwise the output would
|
||||
become much larger.</p>
|
||||
<p>Try running <code>Bemazing</code> with command line arguments and see
|
||||
what happens. (But note that the program only guarantees that there
|
||||
actually is a route from entrance to exit if you run it without command
|
||||
line arguments.)</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998bas1"><a name="inventory"></a>Inventory for
|
||||
1998/bas1</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/bas1.c">bas1.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/Makefile">Makefile</a>
|
||||
- winner 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="1998_bas1.tar.bz2">1998_bas1.tar.bz2</a> - download winning
|
||||
source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas1/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fbas1%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+204
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,216 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/bas2/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 bas2</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: bas2 winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,bas2,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/bas2</title>
|
||||
<meta name="description" content="1998 IOCCC winner bas2">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, bas2">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 bas2</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/bas2</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fbas2%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/bas2/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../bas1/index.html">← bas1</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../chaos/index.html">chaos →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Bas_de_Bakker">Bas de Bakker</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#NL">NL</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./bas2</span> <span class="op"><</span> file</span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> text <span class="kw">|</span> <span class="ex">./bas2</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> <span class="st">"foo bar"</span> <span class="st">"baz"</span> <span class="st">"IOCCC 1998/bas2"</span> README.md</span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<h3 id="questions-to-ponder">Questions to ponder:</h3>
|
||||
<p>Can you determine the relationship between the input and the
|
||||
resulting numeric output?</p>
|
||||
<p>The program was not designed to process files with a certain octet
|
||||
value, what value is that?</p>
|
||||
<h3 id="hint-and-extra-credit">Hint and Extra Credit:</h3>
|
||||
<p>This entry points out a minor flaw in the IOCCC rules that has been
|
||||
around since 1992. It processes a certain octet value in a way that
|
||||
differs from a strict reading of one of the official IOCCC rules. What
|
||||
is the rule and what is the octet value?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>The main obfuscation is the way characters are recognized, which is
|
||||
done by matching the bit patterns. Minor obfuscations are:</p>
|
||||
<ul>
|
||||
<li><p>Useless layout.</p></li>
|
||||
<li><p>Useless variable names.</p></li>
|
||||
<li><p>Recursive <code>main()</code> instead of 2 loops (over input
|
||||
characters and over bits in the character).</p></li>
|
||||
<li><p><code>?:</code> and <code>||</code> instead of if
|
||||
statements.</p></li>
|
||||
</ul>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998bas2"><a name="inventory"></a>Inventory for
|
||||
1998/bas2</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas2/bas2.c">bas2.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas2/Makefile">Makefile</a>
|
||||
- winner 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 winning
|
||||
source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas2/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas2/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/bas2/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fbas2%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+231
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,243 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/chaos/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 chaos</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: chaos winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,chaos,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/chaos</title>
|
||||
<meta name="description" content="1998 IOCCC winner chaos">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, chaos">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 chaos</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/chaos</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fchaos%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/chaos/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../bas2/index.html">← bas2</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../df/index.html">df →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Alan_De_Smet">Alan De Smet</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#US">US</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> chaos</span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> chaos_nohalf</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./chaos</span></span></code></pre></div>
|
||||
<h2 id="judges-comments">Judge’s Comments:</h2>
|
||||
<p>This is the author’s first IOCCC entry. We thought the entry was a
|
||||
nice example of a compact collection of obfuscations.</p>
|
||||
<p>Can you figure out why, in some cases, it wants to read itself?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<p>The executable takes a single argument for the data file to use. If
|
||||
no argument is given, it will find a data file by itself, don’t worry
|
||||
about it…</p>
|
||||
<h3 id="summary">Summary</h3>
|
||||
<p>This is a simple ncurses 3D object viewer. The keys <code>y</code>,
|
||||
<code>u</code>, <code>i</code>, <code>h</code>, <code>j</code>, and
|
||||
<code>k</code> rotate. <code>a</code> and <code>z</code> zoom in and
|
||||
out. <code>q</code> quits. Given about 3 seconds of no input, it will
|
||||
start rotating until interrupted by user input.</p>
|
||||
<h3 id="features-aka-bugs">Features (aka Bugs):</h3>
|
||||
<p>Memory <code>malloc(3)</code>ed is never freed. This shouldn’t be a
|
||||
big deal, since only one block is ever allocated, and the OS should
|
||||
recover it.</p>
|
||||
<p>My local flavor of lint doesn’t seem to like the fact that I never
|
||||
<code>return</code> from <code>main()</code>. Feh, what does it know?
|
||||
Otherwise, ignoring lint’s over protectiveness (“Of course I’m not using
|
||||
all of the functions defined in <code>curses.h</code>!”), it’s lint
|
||||
clean.</p>
|
||||
<p>If the compiler happens to generate the byte sequence “AlWuzEre” in
|
||||
the executable by chance, the program may be unable to locate the
|
||||
embedded string. As a result, running the program without an external
|
||||
data file may act in undefined ways.</p>
|
||||
<p>If the compiler doesn’t store <code>char * P</code>’s data in a nice
|
||||
contiguous stream, it would be bad. As above, it would break running the
|
||||
program without an external data file.</p>
|
||||
<p>If the incoming data is corrupt, the results are undefined. (Although
|
||||
dumping core is a popular result.)</p>
|
||||
<p>When a point passes behind the camera, it is still plotted. The
|
||||
object will “bounce” off the camera, but the result (some points in
|
||||
front, some reflected from the rear) looks really odd. And it sometimes
|
||||
hangs. So just don’t fly through objects. You’ll be happier.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998chaos"><a name="inventory"></a>Inventory for
|
||||
1998/chaos</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/chaos.c">chaos.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/chaos.orig.c">chaos.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/cube.data">cube.data</a>
|
||||
- data file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/desk.data">desk.data</a>
|
||||
- data file</li>
|
||||
<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
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/chaos/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fchaos%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+291
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,303 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/df/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 df</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: df winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,df,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/df</title>
|
||||
<meta name="description" content="1998 IOCCC winner df">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, df">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 df</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/df</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fdf%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/df/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../chaos/index.html">← chaos</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../dlowe/index.html">dlowe →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Daniel_Fischer">Daniel
|
||||
Fischer</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#null">unknown</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./df</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks;</h2>
|
||||
<p>Everyone talks about how data hiding can produce clearer code; I am
|
||||
pleased to offer this charming refutation.</p>
|
||||
<p>The program is a simple game. A bit of observation reveals that the
|
||||
game has some data - but where? It’s unclear which of the contents of
|
||||
the program are used.</p>
|
||||
<p>Curiously, the program only works if its source is in the directory
|
||||
it’s run in. More curiously, the program would fail if the program’s
|
||||
name’s second letter wasn’t <code>r</code> (the source has been changed
|
||||
for your convenience and this restriction no longer exist).</p>
|
||||
<p>Modern design has come a long way since the unreadable,
|
||||
tightly-coupled systems we used to have.</p>
|
||||
<p>Extra credit questions:</p>
|
||||
<ul>
|
||||
<li>Where are the words stored?</li>
|
||||
<li>How many words does this entry use?</li>
|
||||
<li>Can you add more words to the program and still make it work?</li>
|
||||
</ul>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program lets you guess English words. It displays an underscore
|
||||
for each letter in the word; guessing a letter that actually is in the
|
||||
word replaces the corresponding underscores with the letter itself. You
|
||||
can guess a letter simply by typing it in. If your C implementation
|
||||
requires it, you may have to hit Return before it is recognized. In this
|
||||
case, you can also type multiple guesses on the same line (completely
|
||||
solve it by entering <code>abcdefghijklmnopqrstuvwxyz</code>). Execution
|
||||
stops when all underscores have been replaced.</p>
|
||||
<p>The program offers a number of different words to guess,
|
||||
<code>time()</code> is used to pick one at random. All words are eight
|
||||
characters long.</p>
|
||||
<p>The source should compile with any ANSI C compiler (I used
|
||||
CodeWarrior w/ ANSI strict). Using non-ANSI compilers that implement the
|
||||
ANSI features it uses will not work (unless they defined
|
||||
<code>__STDC__ 1</code> which they shouldn’t). Due to space
|
||||
restrictions, I did not use any trigraph sequences. It does not require
|
||||
any special <code>-D</code> defines.</p>
|
||||
<p>The source passes lint without any complaint (if invoked with
|
||||
<code>>/dev/null</code>). (My lclint is unable to recover from some
|
||||
parts of it.)</p>
|
||||
<p>Actually, the code not only is compliant with the ANSI
|
||||
specifications, but uses a near minimum subset of them. C keywords that
|
||||
were not used have been re(de)fined to avoid unnecessary introduction of
|
||||
new, unknown character patterns. The source also includes all ANSI
|
||||
headers it needs (after most of the functions have been used), and the
|
||||
declaration of <code>main()</code> follows the guidelines (but the
|
||||
return type has a different meaning and the arguments are either misused
|
||||
or unused). There also may be some compiler warnings. These are not
|
||||
bugs, but features. The more warnings, the better the compiler. There
|
||||
wouldn’t be any if I had been allowed to use some extra space for
|
||||
prototypes etc.</p>
|
||||
<p>Multiple defines are used (but not all of them define), and
|
||||
<code>#define y define</code> is used with <code>#y</code> but the code
|
||||
doesn’t assume <code>#y</code> to expand to <code>#define</code>. I have
|
||||
also included comments in the code, and vital code in the comments. And
|
||||
of course there is code that doesn’t do anything but will crash the
|
||||
program if it is removed (just like those comments I mentioned above).
|
||||
Additionally, since you said you’d be preprocessing entries ignoring
|
||||
<code>#include</code>s I figured I should use some more of them instead
|
||||
of other obfuscation methods. Did I mention that preprocessed or
|
||||
beautified sources will crash or hang your system? The program will also
|
||||
crash on non-ASCII machines.</p>
|
||||
<p>The executable needs its source file present in the current directory
|
||||
or, depending on your system, in your path. The name of the source file
|
||||
is not hard-coded, <code>__FILE__</code> is used instead.</p>
|
||||
<p>In the original version which was sent in to the contest, there were
|
||||
some restrictions on the file name:</p>
|
||||
<ul>
|
||||
<li>The second letter had to be a lowercase <code>r</code>.</li>
|
||||
<li>The third letter could never be a <code>+</code> or a
|
||||
<code>b</code>.</li>
|
||||
</ul>
|
||||
<p>Valid names would have been <code>pr4.c</code>, <code>pr.c</code>,
|
||||
<code>prog.c</code>, <code>brownie.c</code> etc. My first private
|
||||
version would only run when compiled on a Friday. I decided it would be
|
||||
better this way… These restrictions have been removed for your
|
||||
convenience.</p>
|
||||
<p>The following lines describe how this program works; if you don’t
|
||||
want to know it at this time, please skip them. If this entry would by
|
||||
some mistake win the contest, please do not rot13 this - I hate rot13
|
||||
spoilers since it is somewhat complicated on a Mac to reverse them.
|
||||
Anyone out there should have enough discipline and rot13 shouldn’t be
|
||||
required, really. After all, we are not children anymore :-)</p>
|
||||
<hr />
|
||||
<p>This paragraph is not part of the author’s remarks, but is a helpful
|
||||
gift from the judges; if you read too fast to stop yourself, this should
|
||||
give you enough time to stop, which you really need to do RIGHT NOW if
|
||||
you don’t want to read the spoilers, which really do spoil everything,
|
||||
we mean it.</p>
|
||||
<hr />
|
||||
<p>The source file needs to be present because the words are read from
|
||||
it. The wordlist is encoded within the source using a 24 entry sliding
|
||||
dictionary where lowercase letters are offsets into the dictionary,
|
||||
uppercase letters are new letters not yet in the dictionary, and all
|
||||
other characters are ignored. The words are spread over six lines in the
|
||||
source; decoding starts on a line after a tab and a whitespace have been
|
||||
found, and stops on a newline. The grin after the “Demonic Smiley”
|
||||
actually is one encoded letter while the string is completely ignored;
|
||||
and the <code>cut</code> in “cut here” is required while
|
||||
<code>here</code> is not.</p>
|
||||
<p>“For extra credit”, explain why the words are sorted alphabetically
|
||||
(because I extracted them from a dictionary :-) )</p>
|
||||
<p>The file name had to fulfill the restrictions mentioned above because
|
||||
<code>__FILE__+1</code> was used as a second parameter to
|
||||
<code>fopen()</code>. (It essentially was
|
||||
<code>fopen(__FILE__,__FILE__+1)</code> ). This was an extra joke that
|
||||
doesn’t exist in the released version.</p>
|
||||
<p>You probably discovered that the <code>while(FILE)</code> in
|
||||
<code>main()</code> is not a while loop but the statement that opens the
|
||||
file and initializes the dictionary. Similarly, <code>int</code> and
|
||||
<code>signed</code> have been redefined (to save space, of course).</p>
|
||||
<p>The main function (the guessing part) is between the last
|
||||
<code>#else..#endif</code>, but still is declared before
|
||||
<code>main()</code>. The <code>5[O]()</code> in <code>main()</code>
|
||||
calls this function. Similarly, most indexing operations have been
|
||||
changed to this form and I tried to write each such operation
|
||||
different.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998df"><a name="inventory"></a>Inventory for
|
||||
1998/df</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/df/df.c">df.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/df/Makefile">Makefile</a>
|
||||
- winner 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="1998_df.tar.bz2">1998_df.tar.bz2</a> - download winning
|
||||
source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/df/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/df/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/df/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fdf%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+281
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,293 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/dlowe/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 dlowe</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: dlowe winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,dlowe,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/dlowe</title>
|
||||
<meta name="description" content="1998 IOCCC winner dlowe">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, dlowe">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 dlowe</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/dlowe</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fdlowe%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/dlowe/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../df/index.html">← df</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../dloweneil/index.html">dloweneil →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#J_David_Lowe">J. David Lowe</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#US">US</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./dlowe</span> <span class="op"><</span> anyfile <span class="op">></span> pootfile</span></code></pre></div>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: missing or dead link - please provide them</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#1998-dlowe">1998
|
||||
dlowe in bugs.md</a>.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./dlowe</span> <span class="op"><</span> README.md</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./dlowe</span> <span class="op"><</span> README.md <span class="op">></span> README.poot.md</span></code></pre></div>
|
||||
<p>Why is there different output?</p>
|
||||
<p>Also try:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<pre><code>./dlowe.alt < anyfile > pootfile</code></pre>
|
||||
<p>What’s the difference between this and <code>dlowe</code>?</p>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.alt.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Why could this this entry be considered a utility? Well because it is
|
||||
able to convert content-free web pages into useful web pages.</p>
|
||||
<p>To see why, try using an online version, modified for use as a CGI
|
||||
program: <a
|
||||
href="https://web.archive.org/web/20001025182142/http://pootpoot.com/poot/pootify?URL=http://www.microsoft.com"
|
||||
class="uri">https://web.archive.org/web/20001025182142/http://pootpoot.com/poot/pootify?URL=http://www.microsoft.com</a></p>
|
||||
<p>We are sure that you will find that new web page to make a much more
|
||||
consistent level of quality. :-)</p>
|
||||
<h3 id="historical-remarks">Historical remarks:</h3>
|
||||
<p>A CGI script such as:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="co">#!/bin/sh</span></span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="co"># pootify - a sample CGI pootifier</span></span>
|
||||
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="co">#</span></span>
|
||||
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a><span class="va">POOT</span><span class="op">=</span><span class="st">"/usr/local/bin/dlowe"</span></span>
|
||||
<span id="cb9-5"><a href="#cb9-5" aria-hidden="true" tabindex="-1"></a><span class="va">LYNX</span><span class="op">=</span><span class="st">"/usr/local/bin/lynx"</span></span>
|
||||
<span id="cb9-6"><a href="#cb9-6" aria-hidden="true" tabindex="-1"></a><span class="va">ECHO</span><span class="op">=</span><span class="st">"/usr/bin/echo"</span></span>
|
||||
<span id="cb9-7"><a href="#cb9-7" aria-hidden="true" tabindex="-1"></a><span class="va">EXPR</span><span class="op">=</span><span class="st">"/usr/bin/expr"</span></span>
|
||||
<span id="cb9-8"><a href="#cb9-8" aria-hidden="true" tabindex="-1"></a><span class="va">${ECHO}</span> <span class="st">"Content-type: text/html"</span></span>
|
||||
<span id="cb9-9"><a href="#cb9-9" aria-hidden="true" tabindex="-1"></a><span class="va">${ECHO}</span></span>
|
||||
<span id="cb9-10"><a href="#cb9-10" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="bu">[</span> <span class="ot">-z</span> <span class="st">"</span><span class="va">${QUERY_STRING}</span><span class="st">"</span> <span class="bu">]</span><span class="kw">;</span> <span class="cf">then</span></span>
|
||||
<span id="cb9-11"><a href="#cb9-11" aria-hidden="true" tabindex="-1"></a> <span class="va">${ECHO}</span> <span class="st">"QUERY_STRING not found"</span></span>
|
||||
<span id="cb9-12"><a href="#cb9-12" aria-hidden="true" tabindex="-1"></a><span class="cf">else</span></span>
|
||||
<span id="cb9-13"><a href="#cb9-13" aria-hidden="true" tabindex="-1"></a> <span class="va">URL</span><span class="op">=</span><span class="kw">`</span><span class="va">${EXPR}</span> <span class="st">"</span><span class="va">$QUERY_STRING</span><span class="st">"</span> : <span class="st">'[Uu][Rr][Ll]=\(.*\)'</span><span class="kw">`</span></span>
|
||||
<span id="cb9-14"><a href="#cb9-14" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="bu">[</span> <span class="ot">-z</span> <span class="st">"</span><span class="va">${URL}</span><span class="st">"</span> <span class="bu">]</span><span class="kw">;</span> <span class="cf">then</span></span>
|
||||
<span id="cb9-15"><a href="#cb9-15" aria-hidden="true" tabindex="-1"></a> <span class="va">${ECHO}</span> <span class="st">"No URL given in QUERY_STRING"</span></span>
|
||||
<span id="cb9-16"><a href="#cb9-16" aria-hidden="true" tabindex="-1"></a> <span class="cf">elif</span> <span class="bu">[</span> X<span class="kw">`</span><span class="va">${EXPR}</span> <span class="st">"</span><span class="va">${URL}</span><span class="st">"</span> : <span class="st">'[Ff][Ii][Ll][Ee]:'</span><span class="kw">`</span> <span class="ot">!=</span> X0 <span class="bu">]</span><span class="kw">;</span> <span class="cf">then</span></span>
|
||||
<span id="cb9-17"><a href="#cb9-17" aria-hidden="true" tabindex="-1"></a> <span class="va">${ECHO}</span> <span class="st">"file: based URLs are not allowed"</span></span>
|
||||
<span id="cb9-18"><a href="#cb9-18" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span></span>
|
||||
<span id="cb9-19"><a href="#cb9-19" aria-hidden="true" tabindex="-1"></a> <span class="va">${LYNX}</span> <span class="at">-restrictions</span><span class="op">=</span>all <span class="at">-source</span> <span class="st">"</span><span class="va">${URL}</span><span class="st">"</span> <span class="kw">|</span> <span class="va">${POOT}</span></span>
|
||||
<span id="cb9-20"><a href="#cb9-20" aria-hidden="true" tabindex="-1"></a> <span class="cf">fi</span></span>
|
||||
<span id="cb9-21"><a href="#cb9-21" aria-hidden="true" tabindex="-1"></a><span class="cf">fi</span></span></code></pre></div>
|
||||
<p>can be used to pootify web pages. This has been added as <a
|
||||
href="pootify.cgi.sh">pootify.cgi.sh</a> which forbids
|
||||
<code>file://</code> based URLs and which uses <code>lynx(1)</code> with
|
||||
the option referred to above. This will not, of course, render it as
|
||||
html but rather show the modified html. Nevertheless, this has
|
||||
<strong>NOT</strong> been tested as a CGI script with a webserver to
|
||||
display a pootified web page.</p>
|
||||
<p>The <a href="pootify.sh">pootify.sh</a> script has also been added
|
||||
which is a modification to the above script which can be used to render
|
||||
html files locally with the added bonus that one can use
|
||||
<code>file://</code> URLs. If one wants a CGI script they 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>
|
||||
<div class="sourceCode" id="cb10"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./pootify.sh</span> URL=https://microsoft.com <span class="kw">|</span> <span class="fu">less</span></span>
|
||||
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./pootify.sh</span> <span class="at">-r</span> URL=https://microsoft.com <span class="op">></span> ms.html</span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb11"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="ex">https://web.archive.org/web/20040326083431/http://www.pootpoot.com/poot/pootify/?URL=http%3A%2F%2Fwww.ioccc.org</span></span></code></pre></div>
|
||||
<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>
|
||||
<p>It is obfuscated in that the code is painful to look at and its
|
||||
purpose and mode of operation are not terribly obvious. More
|
||||
importantly, it is a tool for further obfuscation, in that it can take
|
||||
any text and render it unintelligible.</p>
|
||||
<p>Suggested uses: add to your <code>MANROFFSEQ</code> environment
|
||||
variable for man page enjoyment; use it to turn the GPL into the
|
||||
<code>PPL</code>; see what happens when you run <code>perl4</code>
|
||||
programs after they’ve been run through it; “encrypt” sensitive (but
|
||||
unnecessary) documents…</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998dlowe"><a name="inventory"></a>Inventory for
|
||||
1998/dlowe</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/dlowe.c">dlowe.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/dlowe.alt.c">dlowe.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/dlowe.orig.c">dlowe.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/pootify.cgi.sh">pootify.cgi.sh</a>
|
||||
- pootify CGI</li>
|
||||
<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
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dlowe/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fdlowe%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+299
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,311 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/dloweneil/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 dloweneil</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: dloweneil winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,dloweneil,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/dloweneil</title>
|
||||
<meta name="description" content="1998 IOCCC winner dloweneil">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, dloweneil">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 dloweneil</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/dloweneil</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fdloweneil%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/dloweneil/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../dlowe/index.html">← dlowe</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../dorssel/index.html">dorssel →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Authors:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#J_David_Lowe">J. David Lowe</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#US">US</a>
|
||||
<br><br>Name: <a href="/temp-test-ioccc/winners.html#Neil_Mix">Neil
|
||||
Mix</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#null">unknown</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<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>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: missing or dead link - please provide them</code></pre>
|
||||
<p>For more detailed information see <a
|
||||
href="/bugs.md#1998-dloweneil">1998 dloweneil in bugs.md</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./pootris</span> [X size of board] [Y size of board]</span></code></pre></div>
|
||||
<p>Pressing <code>a</code> moves the current letter position
|
||||
counterclockwise around the border of the playing field.</p>
|
||||
<p>Pressing <code>s</code> moves the current letter one position
|
||||
clockwise around the border of the playing field.</p>
|
||||
<p>Pressing <code>d</code> drops the current letter onto the board.</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This version has it so that where in addition to <code>a</code>
|
||||
moving you anticlockwise/counterclockwise <code>h</code> does as well;
|
||||
and in addition to <code>s</code> moving 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>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./pootris.alt</span> [X size of board] [Y size of board]</span></code></pre></div>
|
||||
<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>
|
||||
<pre><code>Originally, I didn't appreciate the game. Then I actually read the
|
||||
description of the controls. I started playing. I struggled.
|
||||
I spelled my first "poot". I was hooked ...</code></pre>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./pootris</span> [X size of board] [Y size of board]</span></code></pre></div>
|
||||
<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 chosen from the set ‘P’, ‘O’, and ‘T’) and you get to
|
||||
move it freely around the border of the playing board, and decide when
|
||||
and where to drop it into the board. Sound easy? Of course, there’s a
|
||||
catch…</p>
|
||||
<h3 id="controls">Controls</h3>
|
||||
<p>Only three controls:</p>
|
||||
<p><code>a</code>: moves the current letter one position
|
||||
counterclockwise around the border of the playing field.</p>
|
||||
<p><code>s</code>: moves the current letter one position clockwise
|
||||
around the border of the playing field.</p>
|
||||
<p><code>d</code>: drops the current letter onto the board.</p>
|
||||
<p>To quit, send a fatal signal to the process.</p>
|
||||
<h3 id="rules-of-motion">Rules of motion</h3>
|
||||
<p>The different letters move in different directions once dropped onto
|
||||
the board:</p>
|
||||
<p><code>P</code> moves diagonally, at a 45 degree angle and in a
|
||||
clockwise direction around the board once dropped.</p>
|
||||
<p><code>O</code> moves in a straight line perpendicular to the border
|
||||
from which it is dropped.</p>
|
||||
<p><code>T</code> moves diagonally, at a 45 degree angle and in a
|
||||
counterclockwise direction around the board once dropped.</p>
|
||||
<p>The letters bounce off the top and sides of the board. They bounce in
|
||||
a ‘natural’ way, with the exception that <code>O</code>s will fall
|
||||
straight down if they hit a side wall.</p>
|
||||
<p>The letters stop when they hit another letter or the bottom of the
|
||||
board.</p>
|
||||
<h3 id="rules-of-spelling">Rules of spelling</h3>
|
||||
<ul>
|
||||
<li><p>When you spell <code>POOT</code> on the board, in any direction,
|
||||
the letters comprising the word will disappear, and any letters which
|
||||
may have accumulated above the disappeared letters will ‘fall’.</p></li>
|
||||
<li><p>Letters can be used in multiple spellings of
|
||||
<code>POOT</code>.</p></li>
|
||||
<li><p>Chain reactions are possible.</p></li>
|
||||
</ul>
|
||||
<h3 id="rules-of-scoring">Rules of scoring</h3>
|
||||
<ul>
|
||||
<li><p>You get one (1) point for each letter you drop onto the
|
||||
board.</p></li>
|
||||
<li><p>You get a bunch of points for spelling <code>POOT</code>. More if
|
||||
you spell it in more than one way simultaneously.</p></li>
|
||||
</ul>
|
||||
<h3 id="some-of-the-obfuscations">Some of the obfuscations</h3>
|
||||
<ul>
|
||||
<li><p>Several different coordinate systems are used. There’s the “real”
|
||||
X by Y system used for curses, the “inside the box” X by Y system used
|
||||
for moving things around and finding instances of <code>POOT</code>
|
||||
inside the box, and the position of the current letter, which is a
|
||||
single value from <code>0</code> to
|
||||
<code>2 * xsize + 2 * ysize - 1</code>.</p></li>
|
||||
<li><p>The fact that <code>x%3</code> is a perfect hash function for
|
||||
<code>x</code> values <code>P</code>, <code>O</code> and <code>T</code>
|
||||
is used.</p></li>
|
||||
<li><p>Of course, the code is as hideous as possible, and spells
|
||||
<code>poot</code> for fun (It’s also exactly 3217 bytes in length, with
|
||||
exactly 1536 counted characters for purposes of this contest..</p></li>
|
||||
<li><p>Love that modulus operator! Mmmm…</p></li>
|
||||
<li><p>There are some equations used which are really unnecessarily
|
||||
ugly, which served the dual purposes of compacting the code and making
|
||||
it trickier to understand. I’m thinking of the equations used to convert
|
||||
between coordinate systems when dropping pieces into the game
|
||||
board.</p></li>
|
||||
<li><p>Simple and silly ones: short, meaningless (and sometimes
|
||||
misleading (see <code>x</code>)) variable names; hard-coded ASCII
|
||||
numeric values used for character constants; using <code>goto</code> for
|
||||
fun and profit; reusing and re-purposing variables in different
|
||||
places.</p></li>
|
||||
<li><p>The game itself is simple, but still weird and quite
|
||||
difficult.</p></li>
|
||||
</ul>
|
||||
<h3
|
||||
id="some-things-i-wish-i-could-have-fit-into-this-but-didnt-have-the-space">Some
|
||||
things I wish I could have fit into this, but didn’t have the
|
||||
space:</h3>
|
||||
<ul>
|
||||
<li><p>Seeding the random number generator (doh!).</p></li>
|
||||
<li><p>Something to detect when the game is over.</p></li>
|
||||
<li><p>Some kind of scoreboard.</p></li>
|
||||
<li><p>Sound.</p></li>
|
||||
<li><p>Some way of quitting gracefully.</p></li>
|
||||
</ul>
|
||||
<p>Good Luck!</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998dloweneil"><a name="inventory"></a>Inventory
|
||||
for 1998/dloweneil</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dloweneil/dloweneil.c">dloweneil.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dloweneil/Makefile">Makefile</a>
|
||||
- winner 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 winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dloweneil/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dloweneil/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dloweneil/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fdloweneil%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+260
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,272 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/dorssel/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 dorssel</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: dorssel winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,dorssel,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/dorssel</title>
|
||||
<meta name="description" content="1998 IOCCC winner dorssel">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, dorssel">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 dorssel</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/dorssel</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fdorssel%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/dorssel/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../dloweneil/index.html">← dloweneil</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../fanf/index.html">fanf →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Frans_van_Dorsselaer">Frans van
|
||||
Dorsselaer</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#null">unknown</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./dorssel</span></span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="co"># input some text</span></span>
|
||||
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> text <span class="kw">|</span> <span class="ex">./dorssel</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<p>Also try:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./dorssel</span> <span class="op"><</span> dorssel.md</span></code></pre></div>
|
||||
<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 C
|
||||
language feature.)</p>
|
||||
<p>The author suggests that you try to answer the following
|
||||
questions:</p>
|
||||
<ul>
|
||||
<li><p>Which character in the initializing string is totally
|
||||
irrelevant?</p></li>
|
||||
<li><p>Which two relevant characters in the initializing string may be
|
||||
exchanged without altering the behavior?</p></li>
|
||||
<li><p>Which characters in the initializing string are somewhat
|
||||
irrelevant, and to what values may they be changed without altering the
|
||||
behavior?</p></li>
|
||||
<li><p>Which characters may be used to enlarge the initializing string
|
||||
by one without altering the behavior ?</p></li>
|
||||
</ul>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">". -..- . .-. -.-. .. ... .</span></span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="st">-.-. .... .- -. --. . - .... . .--. .-. --- --. .-. .- -- ... --- .. - -.. --- . ... -. --- - ... .... --- ..- -"</span> <span class="kw">|</span> <span class="ex">./dorssel</span></span></code></pre></div>
|
||||
<p>and make the necessary adjustments.</p>
|
||||
<p>You might also want to read the <a href="dorssel.md">dorssel.md</a>
|
||||
file.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<p>This program converts ASCII to <a
|
||||
href="https://en.wikipedia.org/wiki/Morse_code">Morse code</a>, and vice
|
||||
versa.</p>
|
||||
<p>The program reads in lines from standard input and writes its result
|
||||
to standard output. The direction of conversion is determined on a per
|
||||
line basis. Each line must consist of a maximum of 952 characters
|
||||
followed by a new line character and they must not contain any NUL
|
||||
characters. Otherwise, some characters may be lost in the
|
||||
conversion.</p>
|
||||
<ul>
|
||||
<li><p>Encoding to Morse code: The program knows the Morse codes for all
|
||||
Latin letters (a-z, case insensitive) and decimal digits (0-9). Any
|
||||
other characters are replaced by an ASCII space, <code>' '</code>. Morse
|
||||
code per converted character is written as a sequence of <code>.</code>
|
||||
and <code>-</code> characters, each sequence followed by a
|
||||
space.</p></li>
|
||||
<li><p>Decoding from Morse code: Morse code should be typed as sequences
|
||||
of <code>.</code> and <code>-</code> characters, separated by a space.
|
||||
Extra spaces will be echoed back (to separate words). Unknown sequences
|
||||
will be converted to a <code>?</code> character.</p></li>
|
||||
</ul>
|
||||
<h3 id="notes">Notes</h3>
|
||||
<p>The program assumes both source and execution character sets to be
|
||||
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>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./dorssel</span> <span class="op"><</span> dorssel.c <span class="kw">|</span> <span class="ex">./dorssel</span></span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./dorssel</span> <span class="op"><</span> dorssel.c <span class="kw">|</span> <span class="ex">./dorssel</span> <span class="kw">|</span> <span class="ex">./dorssel</span> <span class="kw">|</span> <span class="ex">./dorssel</span></span></code></pre></div>
|
||||
<p>is the same as</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./dorssel</span> <span class="op"><</span> dorssel.c <span class="kw">|</span> <span class="ex">./dorssel</span></span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./dorssel</span> <span class="op"><</span> dorssel.md</span></code></pre></div>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998dorssel"><a name="inventory"></a>Inventory for
|
||||
1998/dorssel</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/dorssel.c">dorssel.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/Makefile">Makefile</a>
|
||||
- winner Makefile</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
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/README.md">README.md</a>
|
||||
- markdown source for index.html</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>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fdorssel%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+487
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,499 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/fanf/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 fanf</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: fanf winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,fanf,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/fanf</title>
|
||||
<meta name="description" content="1998 IOCCC winner fanf">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, fanf">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 fanf</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/fanf</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Ffanf%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/fanf/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../dorssel/index.html">← dorssel</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../schnitzi/index.html">schnitzi →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Tony_Finch">Tony Finch</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#GB">GB</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./fanf</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>Enter an expression on standard input. To try some we have
|
||||
selected:</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<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> but to get this to compile in modern
|
||||
systems it had to be translated to what you now see. The intermediate
|
||||
steps can still be performed but they might be different from the past.
|
||||
This should be kept in mind as you read the below remarks.</p>
|
||||
<p>This program translates lambda expressions into combinator
|
||||
expressions. But you do not need to know Lambda Calculus to be impressed
|
||||
by this program!</p>
|
||||
<p>See the file <a href="fanf.lambda">fanf.lambda</a> for more examples
|
||||
of lambda calculus source.</p>
|
||||
<p>Notice how large the code grows from the <a href="fanf.c">fanf.c</a>
|
||||
into the final <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>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> fanf.c <span class="at">-E</span> <span class="op">></span> fanftmp1.c</span></code></pre></div>
|
||||
<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 will expand into over 342 times
|
||||
the original code (ignoring <code>#include</code> headers) to produce
|
||||
<code>fanftmp2.c</code>. That program in turn, when compiled translates
|
||||
a single lambda expression on standard input into combinator expressions
|
||||
on standard output.</p>
|
||||
<h3 id="extra-credit-question">Extra credit question:</h3>
|
||||
<p>What do you have to do to make this program work with an old non-ANSI
|
||||
C preprocessor?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>My program is a demonstration of some practical applications of
|
||||
theoretical computer science. The application it implements is a program
|
||||
for translating lambda expressions into combinator expressions.</p>
|
||||
<h3 id="what-the-program-does">What the program does</h3>
|
||||
<p>The syntax of lambda expressions recognised by the program is as
|
||||
follows: The basic atoms are variables which are single characters other
|
||||
than backslash or parentheses, e.g. <code>a</code> or <code>b</code> or
|
||||
<code>@</code>. Variables are combined by function application which is
|
||||
written as e.g. <code>(f a)</code> which is the function <code>f</code>
|
||||
applied to the argument <code>a</code>. Application groups to the left,
|
||||
so <code>(f a b c)</code> is equivalent to <code>(((f a) b) c)</code>.
|
||||
Functions are created from lambda terms which are written in the form
|
||||
<code>\a(expr)</code> which is the function taking argument
|
||||
<code>a</code> and having value <code>expr</code>. Lambda is spelt
|
||||
<code>\</code> because ASCII isn’t good enough. Lambda binds tightly, so
|
||||
<code>\a\bcd</code> is equivalent to <code>((\a(\b(c))) d)</code>.
|
||||
Whitespace is ignored.</p>
|
||||
<p>For example, the identity function, called <code>I</code>, is written
|
||||
<code>\x(x)</code>. A simple expression is <code>(I a)</code> which is
|
||||
equivalent to <code>(\x(x) a)</code>, which has the value
|
||||
<code>a</code>. Another function called <code>K</code> is defined as
|
||||
<code>\x\y(x)</code> and it evaluates as follows:</p>
|
||||
<pre><code> K p q
|
||||
-> \x\y(x) p q
|
||||
-> \y(p) q
|
||||
-> p</code></pre>
|
||||
<p>Another function of interest is <code>S</code>, defined as
|
||||
<code>\f\g\x((f x) (g x))</code>. My program demonstrates the fact that
|
||||
any lambda expression can be translated into an equivalent “combinator
|
||||
expression” which involves only <code>S</code>, <code>K</code>,
|
||||
<code>I</code> (the combinators), and application, with no variables or
|
||||
lambda abstractions. In fact, even <code>I</code> is unnecessary, since
|
||||
it is equivalent to <code>S K K</code>:</p>
|
||||
<pre><code> I z
|
||||
-> \a(a) z
|
||||
-> z
|
||||
|
||||
S K K z
|
||||
-> \f\g\x((f x) (g x)) K K z
|
||||
-> (K z) (K z)
|
||||
-> \x\y(x) z (K z)
|
||||
-> z</code></pre>
|
||||
<p>The algorithm for translating lambda expressions into combinator
|
||||
expressions works as follows. There are three forms of lambda expression
|
||||
to consider: variables, applications, and abstractions.</p>
|
||||
<pre><code>trans v -> v (variable)
|
||||
trans a b -> (trans a) (trans b ) (application)
|
||||
trans \ab -> abs a (trans b) (abstraction)</code></pre>
|
||||
<p>There are a further three cases to consider for the body of lambda
|
||||
expressions, where we need to do the magic that transforms away the
|
||||
variables.</p>
|
||||
<pre><code>abs a f x -> S (abs a f) (abs a x)
|
||||
abs a b -> K b (b != a)
|
||||
abs a a -> I</code></pre>
|
||||
<p>E.g. suppose we had combinator expressions for <code>+</code> and
|
||||
<code>3</code> and we wanted to see what the combinator expression for
|
||||
doubling 3 looked like:</p>
|
||||
<pre><code> trans \x(+ x x) 3
|
||||
-> (trans \x(+ x x)) (trans 3)
|
||||
-> (abs x (trans + x x)) 3
|
||||
-> (abs x + x x) 3
|
||||
-> S (abs x + x) (abs x x) 3
|
||||
-> S (S (abs x +) (abs x x)) I 3
|
||||
-> S (S (K +) I) I 3
|
||||
-> S (S (K +) I) I 3</code></pre>
|
||||
<p>We can then check that this evaluates to the expected result:</p>
|
||||
<pre><code> S (S (K +) I) I 3
|
||||
-> S (K +) I 3 (I 3)
|
||||
-> K + 3 (I 3) (I 3)
|
||||
-> + (I 3) (I 3)
|
||||
-> + 3 3</code></pre>
|
||||
<p>It is possible to perform a slightly more compact translation with a
|
||||
couple of simple optimisations. For example, note that
|
||||
<code>K (a b)</code> is the same as <code>S (K a) (K b)</code>,
|
||||
because</p>
|
||||
<pre><code> K (a b) x
|
||||
-> a b</code></pre>
|
||||
<p>and</p>
|
||||
<pre><code> S (K a) (K b) x
|
||||
-> K a x (K b x)
|
||||
-> a b</code></pre>
|
||||
<p>Also, <code>S (K a) I</code> is the same as just <code>a</code>
|
||||
because</p>
|
||||
<pre><code> S (K a) I x
|
||||
-> K a x (I x)
|
||||
-> a x</code></pre>
|
||||
<p>The program simply reads a lambda expression from the standard input,
|
||||
translates it into a combinator expression using the transformation and
|
||||
optimisations described above, and prints out the result.</p>
|
||||
<h3 id="why-this-is-a-practical-application">Why this is a practical
|
||||
application</h3>
|
||||
<p>Combinator expressions are easier to evaluate than lambda expressions
|
||||
because there are no problems with variables. For example, if I naively
|
||||
evaluated the expression <code>\x\y(x y) y</code> I might get
|
||||
<code>\y(y y)</code> which is not the same as the correct result because
|
||||
the first <code>y</code> in the body should refer to a global
|
||||
<code>y</code> rather than the local one. David Turner was the first
|
||||
person to realise that because of this fact, SK combinators provide a
|
||||
simple way to implement non-strict functional programming languages,
|
||||
either in software or directly in hardware.</p>
|
||||
<p>My program demonstrates this by being based on a combinator
|
||||
evaluation engine which is used to implement a language called
|
||||
<code>OFL</code> (pronounced like “offal” and short for “Obfuscated
|
||||
Functional Language”). I then used <code>OFL</code> to implement all the
|
||||
high-level functionality described above. This contributes a lot to the
|
||||
obfuscation because even small amounts of <code>OFL</code> are quite
|
||||
unpalatable, and large expressions are completely incomprehensible.</p>
|
||||
<p>It is fairly well known that the lambda calculus (and hence SK
|
||||
combinators) can compute anything, but mere computation is no use if you
|
||||
cannot communicate with the world. This is why <code>OFL</code> includes
|
||||
a few concessions to reality: a combinator <code>E</code> for
|
||||
representing characters and testing them for equality, two I/O
|
||||
combinators, <code>G</code> and <code>P</code>, for reading and writing
|
||||
characters respectively, and a combinator <code>J</code> for
|
||||
representing <code>false</code>. I also implemented the <code>Y</code>
|
||||
combinator directly rather than in terms of the primitive combinators,
|
||||
since it only required five characters to do so
|
||||
(viz. <code>Y W q Q g</code>). However this code is not enabled because
|
||||
the definition of <code>Y</code> in terms of other combinators is more
|
||||
cute.</p>
|
||||
<p>The <code>E</code> combinator comes in a large number of forms, one
|
||||
for each character and one for end of file. It is written
|
||||
<code>E(c)</code> for the variant of <code>E</code> corresponding to the
|
||||
character <code>c</code>. An expression of the form <code>E(c) x</code>
|
||||
is evaluated by first evaluating <code>x</code>. If <code>x</code>
|
||||
doesn’t evaluate to some form of <code>E</code>, then evaluation of the
|
||||
expression terminates. If <code>x</code> evaluates to <code>E(c)</code>,
|
||||
then the expression evaluates to <code>K</code>. If <code>x</code>
|
||||
evaluates to <code>E(d)</code> (where <code>d</code> is a different
|
||||
character to <code>c</code>), then the expression evaluates to
|
||||
<code>J</code>.</p>
|
||||
<p><code>K</code> and <code>J</code> are used to represent
|
||||
<code>true</code> and <code>false</code> respectively; they correspond
|
||||
exactly to the standard lambda calculus representations of
|
||||
<code>true</code> and <code>false</code>, viz. <code>\t\f(t)</code> and
|
||||
<code>\t\f(f)</code> respectively. In this way a conditional expression
|
||||
can just be written <code>cond then else</code>, which is even more
|
||||
terse than C <code>cond ? then : else</code>. An expression that
|
||||
compares a character with <code>a</code>, say, can be written in the
|
||||
rather obfuscated form <code>E('a') char then else</code>.</p>
|
||||
<p>The <code>P</code> combinator, like the <code>E</code> combinator,
|
||||
starts off by evaluating its first argument and checking that it is some
|
||||
form of <code>E</code>. It then writes that character on
|
||||
<code>stdout</code>, and finally it calls its second argument as a
|
||||
function with the argument <code>I</code>, i.e.</p>
|
||||
<pre><code>P x f -> f I</code></pre>
|
||||
<p>with a side-effect.</p>
|
||||
<p>The <code>G</code> combinator just reads a character from
|
||||
<code>stdin</code> then calls its argument as a function with the
|
||||
appropriate <code>E</code> combinator as an argument, i.e.</p>
|
||||
<pre><code>G f -> f E(c)</code></pre>
|
||||
<p>with a side-effect.</p>
|
||||
<p>One of the problems with non-strict languages is that it is hard to
|
||||
predict in advance in which order side-effects will occur. In my program
|
||||
I used a monadic I/O structure like that used by the programming
|
||||
language Haskell; this allows one to write programs that manipulate
|
||||
external state in a manner remarkably similar to imperative programming
|
||||
languages like C. An examination of my program should provide an
|
||||
illustration of how well this technique works in practice. (In
|
||||
particular, I used the CPS form of the I/O monad from page 6 of
|
||||
“Imperative Functional Programming”.)</p>
|
||||
<p>The <code>Y</code> combinator is used for implementing recursive
|
||||
functions. It has the evaluation rule</p>
|
||||
<pre><code>Y f -> f (Y f)</code></pre>
|
||||
<p>so that it can be used to call a function with itself as an argument.
|
||||
For example, if I had the appropriate arithmetic operators defined, I
|
||||
could write a factorial function in the lambda calculus like this:</p>
|
||||
<pre><code>Y \f\n((= n 0) 1 (* n (f (- n 1))))</code></pre>
|
||||
<p><code>OFL</code> provides a facility for naming expressions so that
|
||||
they can be used more than once without writing them in full. A
|
||||
definition must be written on one line in the form
|
||||
<code>l name b expression</code> where <code>l</code> is short for “let”
|
||||
and <code>b</code> is short for “be”. Names must be more than one
|
||||
character long. A complete <code>OFL</code> program starts off by
|
||||
defining the primitives it will use with likes of the form
|
||||
<code>p (S)</code> etc., then goes on to define the names it will use,
|
||||
and finishes off with the main expression followed by a single
|
||||
<code>e</code> short for “end”. <code>OFL</code> expressions must use
|
||||
the minimum number of brackets needed to be unambiguous, except that the
|
||||
whole expression must be surrounded by brackets.</p>
|
||||
<p><code>OFL</code> has a standard library which adds another five
|
||||
combinators to the basic eight. These combinators provide greater scope
|
||||
for optimisation when translating an expression from the lambda calculus
|
||||
to combinators, and therefore more compact programs. Their evaluation
|
||||
rules are:</p>
|
||||
<pre><code>B f g x -> f (g x)
|
||||
C f g x -> (f x) g
|
||||
BB c f g x -> c (f (g x))
|
||||
CC c f g x -> c (f x) g
|
||||
SS c f g x -> c (f x) (g x)</code></pre>
|
||||
<p>I used them to help fit my program into the required space;
|
||||
unfortunately I couldn’t fit the version that fully optimises the lambda
|
||||
expressions it reads into the required space. The complete optimisation
|
||||
rules including the ones it doesn’t use are:</p>
|
||||
<pre><code>S (K p) I -> p
|
||||
S (K p) (K r) -> K ( p r )
|
||||
S (K p) (B r s) -> BB p r s
|
||||
S (K p) r -> B p r
|
||||
S (B p q) (K r) -> CC p q r
|
||||
S p (K r) -> C p r
|
||||
S (B p q) r -> SS p q r
|
||||
S p r -> S p r</code></pre>
|
||||
<h3 id="the-implementation-of-ofl">The implementation of
|
||||
<code>OFL</code></h3>
|
||||
<p>Although <code>OFL</code> has completely different syntax and
|
||||
semantics to C, all you need to compile <code>OFL</code> programs is a C
|
||||
compiler and a header file (which in my entry to the competition has
|
||||
been included in-line). The header file implements a two-pass optimising
|
||||
compiler which produces a representation of the program that is then
|
||||
interpreted.</p>
|
||||
<p>The first pass of the compiler is implemented via the C preprocessor.
|
||||
It implements one optimisation, namely function in-lining.
|
||||
Unfortunately, this optimisation always increases object code size and
|
||||
execution time. The opposite optimisation, common sub-expression
|
||||
elimination (which would offer improvements in code size and execution
|
||||
time), has not been implemented. The output of this pass is a C program
|
||||
that may be compiled by a normal C compiler.</p>
|
||||
<p>The second pass is performed by the initialisation phase of the C
|
||||
program. It builds a data structure representing the abstract syntax
|
||||
tree of the program.</p>
|
||||
<p>The program is then executed by an interpreter. This operates by
|
||||
performing manipulations on the AST that correspond to the evaluation
|
||||
rules of the combinators that I described above.</p>
|
||||
<p>The first 54 lines of the program are mostly the interpreter; the
|
||||
next 8 lines are pass one of the compiler; the next nine declare the
|
||||
<code>OFL</code> primitives; the next five define the <code>OFL</code>
|
||||
standard library; and the rest implement the application described in
|
||||
the first part of this document. This part of the program is transformed
|
||||
into the second pass of the compiler by the first pass of the
|
||||
compiler.</p>
|
||||
<p>The first pass of the compiler relies on some magic macros that
|
||||
expand in a mutually-overlapping and almost recursive way in order to
|
||||
perpetrate a complete change of syntax. Interestingly enough, if I
|
||||
hadn’t used the same identifier for more than one thing in various
|
||||
places in the program this transformation would work with old-style cpp
|
||||
as well and ANSI cpp. It expands the program from about 2.2KB to about
|
||||
740KB. The resulting code does some tricky stuff to build a data
|
||||
structure of the same form as the code itself.</p>
|
||||
<p>The interpreter is written in fairly straightforward C, although it
|
||||
is highly compressed. The C itself is written in a fairly functional
|
||||
style, in that every function consists of a single expression. In the
|
||||
tradition of functional programming languages it assumes that memory is
|
||||
infinite and so never frees anything. It also assumes that the C
|
||||
compiler implements the tail recursion optimisation, which is probably
|
||||
not true.</p>
|
||||
<h3 id="references">References</h3>
|
||||
<p>I used these references in the course of writing this program and
|
||||
they explain some of the ideas behind it in more detail. Arthur Norman
|
||||
(one of the authors of the first paper) did a lot to enthuse me about
|
||||
this topic.</p>
|
||||
<p>Clarke, T. J. W., et al., 1980. SKIM - the S, K, I Reduction Machine.
|
||||
Proceedings of the 1980 ACM LISP Conference, pp. 128-135.</p>
|
||||
<p>Curry, H. B. and Feys, R., 1958. Combinatory Logic, Vol. 1.
|
||||
North-Holland.</p>
|
||||
<p>Gordon, M. J. C., 1988. Programming Language Theory and its
|
||||
Implementation. Prentice-Hall.</p>
|
||||
<p>Peterson, J, et al., 1997. Report on the Programming Language
|
||||
Haskell, version 1.4.</p>
|
||||
<p>Peyton Jones, S. L., 1987. The implementation of Functional
|
||||
Programming Languages, Chapters 2, 11, 12, 16. Prentice-Hall.</p>
|
||||
<p>Peyton Jones, S. L., and Wadler, P., 1992. Imperative Functional
|
||||
Programming. Proceedings of the ACM Symposium on the Principles of
|
||||
Programming Languages 1993, pp. 71-84.</p>
|
||||
<p>Turner, D. A., 1979. A new implementation technique for applicative
|
||||
languages. Software- Practice and Experience. Vol. 9, pp. 31-49.</p>
|
||||
<p>Turner, D. A., 1979. Another algorithm for bracket abstraction.
|
||||
Journal of Symbolic Logic. Vol. 44, no. 2, pp. 67-270.</p>
|
||||
<p>Wadler, P., 1990. Comprehending Monads. Proceedings of the ACM
|
||||
conference on Lisp and Functional Programming, 1990.</p>
|
||||
<p>Wadler, P., 1995. How to Declare an Imperative. Proceedings of the
|
||||
ACM International Logic Programming Symposium, 1995.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998fanf"><a name="inventory"></a>Inventory for
|
||||
1998/fanf</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/fanf/fanf.c">fanf.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/fanf/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<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 winning
|
||||
source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/fanf/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/fanf/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/fanf/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Ffanf%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+258
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,270 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/schnitzi/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 schnitzi</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: schnitzi winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,schnitzi,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/schnitzi</title>
|
||||
<meta name="description" content="1998 IOCCC winner schnitzi">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, schnitzi">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 schnitzi</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/schnitzi</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fschnitzi%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/schnitzi/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../fanf/index.html">← fanf</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../schweikh1/index.html">schweikh1 →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Mark_Schnitzius">Mark
|
||||
Schnitzius</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#null">unknown</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<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.md#1998-schnitzi">1998 schnitzi in bugs.md</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schnitzi</span> n <span class="op">></span> sort.c</span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> sort</span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./sort</span></span>
|
||||
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="co"># enter three numbers, space separated</span></span>
|
||||
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> x y z <span class="kw">|</span> <span class="ex">./sort</span></span></code></pre></div>
|
||||
<p>where <code>n</code> and <code>x</code>, <code>y</code> and
|
||||
<code>z</code> are numbers.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<p>What happens if at the command line you don’t specify <code>n</code>
|
||||
numbers that the program expects? For instance try:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schnitzi</span> 5 <span class="op">></span> sort.c</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> sort</span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="co"># try running the next command four or five times:</span></span>
|
||||
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> 2 5 3 1 <span class="kw">|</span> <span class="ex">./sort</span></span></code></pre></div>
|
||||
<p>Why does this happen?</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This is a beautiful program. How can a program with no conditional
|
||||
(except for the fixes for modern systems) behavior at all have output
|
||||
which depends on anything?</p>
|
||||
<p>For hints on deciphering this, see below past the Author’s remarks;
|
||||
they’re a nice summary, but they leave the mystery intact.</p>
|
||||
<p>BTW: the author notes an incredible lipogram story called <a
|
||||
href="https://www.gutenberg.org/cache/epub/47342/pg47342.txt">Gadsby</a>
|
||||
which has no letter E in the story. He did not note this but it has over
|
||||
50000 (50 thousand) (!!) words without the letter E which is one of the
|
||||
most common letters!</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>In literary circles, there is a poetic form called a “lipogram”,
|
||||
which is a poem in which a specific letter has been distinctly avoided.
|
||||
This principle can be applied in other ways. For instance, in this
|
||||
paragraph, the vowel which immediately follows <code>t</code> in the
|
||||
alphabet is nowhere to be seen. There is even an entire novel (E. V.
|
||||
Wright’s “Gadsby”) in which no word contains the letter
|
||||
<code>e</code>.</p>
|
||||
<p>The IOCCC has been no stranger to this concept. Several winning
|
||||
entries from years past have accomplished interesting feats while
|
||||
completely avoiding the use of certain C constructs thought to be
|
||||
essential (e.g. <a href="/1988/robison/robison.c">1988/robison.c</a>).
|
||||
If you have to ask why they would do it this way, then this contest just
|
||||
isn’t for you.</p>
|
||||
<p>In continuing with this fine tradition, this program suggests to the
|
||||
ANSI committee some new practical simplifications for the C language.
|
||||
For instance, it appears that CONDITIONAL BRANCHING isn’t really
|
||||
necessary. So, we can do away with <code>while</code>,
|
||||
<code>do...while</code>, <code>for</code>,
|
||||
<code>if</code>/<code>else</code>, <code>switch</code>, <code>?:</code>,
|
||||
or anything else that might cause any kind of non-deterministic jump in
|
||||
the code. There’s too much uncertainty in the world anyway.</p>
|
||||
<p>Function parameters and return types just confuse people anyway, so
|
||||
get rid of them. Same with local variables. In fact, all you really need
|
||||
are assignment statements, and maybe one <code>printf(3)</code> and one
|
||||
<code>goto</code>.</p>
|
||||
<p>This style of programming is also ideal for systems with limited
|
||||
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>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schnitzi</span> 5</span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schnitzi</span> 4 <span class="op">></span> sort.c</span></code></pre></div>
|
||||
<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
|
||||
functions ought to be; a bit of research may allow you to guess at a few
|
||||
crucial ones.</p>
|
||||
<p>The only function ever called is <code>O</code>, but <code>O</code>
|
||||
is just set to point to other functions all the time. Or, almost all the
|
||||
time.</p>
|
||||
<p>So how does <code>h</code> get set, and what to?</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998schnitzi"><a name="inventory"></a>Inventory
|
||||
for 1998/schnitzi</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schnitzi/schnitzi.c">schnitzi.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schnitzi/Makefile">Makefile</a>
|
||||
- winner 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
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schnitzi/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schnitzi/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schnitzi/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fschnitzi%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+398
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,410 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/schweikh1/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 schweikh1</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: schweikh1 winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,schweikh1,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/schweikh1</title>
|
||||
<meta name="description" content="1998 IOCCC winner schweikh1">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, schweikh1">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 schweikh1</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/schweikh1</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fschweikh1%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/schweikh1/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../schnitzi/index.html">← schnitzi</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../schweikh2/index.html">schweikh2 →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Jens_Schweikhardt">Jens
|
||||
Schweikhardt</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#DE">DE</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schweikh1</span></span></code></pre></div>
|
||||
<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 (the details of which are relevant to the original entry
|
||||
that no longer works as well as the fixed version but are described in
|
||||
the context of the macOS adjustments). For details of what had to
|
||||
change, see <a href="macos.md">macos.md</a>. 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>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<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>
|
||||
<p>Bonus exercise: modify the code to provide a different compiler.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>What does it do? It seems to print a list of system headers, perhaps
|
||||
with words after them. Curiously, if you look at the list of words
|
||||
defined in a given standard header, they are never printed directly
|
||||
after that header’s name. Aha! It’s a conformance test for the standard
|
||||
headers.</p>
|
||||
<p>This code is a wonder; it’s a wonder that it compiles. I wonder
|
||||
whether or not it should. The innovative realization that you can use
|
||||
special characters, such as <code>'\n'</code>, in <code>#file</code>
|
||||
directives alone merits some recognition.</p>
|
||||
<p>I’ve included most of the author’s remarks; they’re fairly thorough.
|
||||
Do not read them if you want to figure this out yourself. “Amendment
|
||||
One” refers to “NA1”, the add-on to C89 which added some fairly crufty
|
||||
internationalization support.</p>
|
||||
<h4 id="historical-note">Historical note:</h4>
|
||||
<p>Some non-gcc compilers that were not fully ANSI standard did not
|
||||
compile this entry correctly. Using cc by default was not helpful most
|
||||
of the time on this entry, because the program had a hardcoded gcc
|
||||
invocation anyway. Anyone who uses egcs and has no plain gcc will need
|
||||
to frob the source anyway and can be expected to do the right thing with
|
||||
<code>${CC}</code>. This limitation was removed in 2023 but in the past
|
||||
one should have used gcc.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>Important! This program, if it compiles at all, is mis-compiled by
|
||||
many compilers due to compiler bugs. It could be the “least likely to
|
||||
compile and execute” in conjunction with preprocessor abuse. When run,
|
||||
it is likely to uncover bugs in your system headers.</p>
|
||||
<p>The program is run without arguments. If your compiler is buggy, the
|
||||
most likely result is no output and/or an exit status of 1.</p>
|
||||
<p>If Amendment One headers are missing you will see something like:</p>
|
||||
<pre><code><iso646.h>:
|
||||
gcc: /usr/include/iso646.h: No such file or directory
|
||||
gcc: No input files specified
|
||||
<wctype.h>:
|
||||
gcc: /usr/include/wctype.h: No such file or directory
|
||||
gcc: No input files specified
|
||||
<wchar.h>:
|
||||
gcc: /usr/include/wchar.h: No such file or directory
|
||||
gcc: No input files specified</code></pre>
|
||||
<p>Bug your vendor for an upgrade.</p>
|
||||
<p>The format of the info file is straightforward and described in the
|
||||
file itself. Just load it in your favorite editor.</p>
|
||||
<h3 id="requirements">Requirements</h3>
|
||||
<p><code>gcc</code> (the GNU C compiler) must be available at runtime.
|
||||
It is assumed that your C implementation keeps headers as files in the
|
||||
<code>/usr/include</code> directory. The <a href="info">info</a> file
|
||||
must be readable and reside in the current working directory. The
|
||||
current working directory must be writable in order to create a
|
||||
temporary file (which is removed upon program termination). In case you
|
||||
don’t have gcc at runtime, not all is lost if your compiler or
|
||||
preprocessor can produce a list of defined macros in the format output
|
||||
by <code>gcc -dM</code>, i.e. lines of the form
|
||||
<code>#define MACRO value</code>.</p>
|
||||
<p>Edit the source at line 55 in this case.</p>
|
||||
<h3 id="background">Background</h3>
|
||||
<p>ISO C has a very strict idea of visibility of identifiers. All
|
||||
possible 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>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><assert.h></span></span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><stdio.h></span><span class="pp"> </span><span class="co">/* <- or where the bogus macro is defined */</span></span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><string.h></span></span>
|
||||
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="pp">#define STR</span><span class="op">(</span><span class="pp">x</span><span class="op">)</span><span class="pp"> </span><span class="op">#</span><span class="pp">x</span></span>
|
||||
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="pp">#define XSTR</span><span class="op">(</span><span class="pp">x</span><span class="op">)</span><span class="pp"> STR</span><span class="op">(</span><span class="pp">x</span><span class="op">)</span></span>
|
||||
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> main <span class="op">(</span><span class="dt">void</span><span class="op">)</span></span>
|
||||
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
|
||||
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a> <span class="dt">int</span> PIPE_BUF <span class="op">=</span> <span class="dv">0</span><span class="op">;</span></span>
|
||||
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a> assert <span class="op">(</span>strcmp <span class="op">(</span><span class="st">"PIPE_BUF"</span><span class="op">,</span> XSTR <span class="op">(</span>PIPE_BUF<span class="op">))</span> <span class="op">==</span> <span class="dv">0</span><span class="op">);</span></span>
|
||||
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="dv">0</span><span class="op">;</span></span>
|
||||
<span id="cb5-11"><a href="#cb5-11" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
|
||||
<p>is expected to compile and meet the assertion. If it does not, your
|
||||
compiler compiles some other language than ISO C.</p>
|
||||
<h3 id="why-i-think-my-program-is-obfuscated">Why I think my program is
|
||||
obfuscated</h3>
|
||||
<p>Not only is the program’s purpose a thorough standard conformance
|
||||
test, the source itself is a beast and has uncovered bugs in many C
|
||||
compilers.</p>
|
||||
<ol type="1">
|
||||
<li>The token sequence after <code>#include</code> can consist of
|
||||
pp-tokens and “are processed just as in normal text.” [ISO 6.8.2] The
|
||||
result must resemble one of the canonical forms, <code>"foo.h"</code> or
|
||||
<code><bar.h></code>. This lets us write things like</li>
|
||||
</ol>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#define HEADER </span><span class="st">"foo.h"</span></span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#include HEADER</span></span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#define H</span><span class="op">(</span><span class="pp">x</span><span class="op">)</span><span class="pp"> </span><span class="op"><</span><span class="pp">st</span><span class="op">##</span><span class="pp">x</span><span class="op">##.</span><span class="pp">h</span><span class="op">></span></span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#include H(dio) </span><span class="co">/* expands to <stdio.h> */</span></span></code></pre></div>
|
||||
<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>
|
||||
<p>To be honest, I don’t know if the rules for pp-tokens and token
|
||||
pasting don’t forbid what I do (and thus tcc is correct in rejecting
|
||||
it). In this case, all other compilers I tried are buggy, or the
|
||||
Standard itself :-)</p>
|
||||
<ol start="2" type="1">
|
||||
<li>The <code>#line</code> directive allows to set a line number, and
|
||||
optionally a file name, i.e. modify <code>__LINE__</code> and
|
||||
<code>__FILE__</code>. Strange things happen if the file name contains a
|
||||
NUL byte – which the Standard allows: in <code>#line num "file"</code>
|
||||
the <code>"file"</code> is an s-char-sequence per 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>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><stdio.h></span></span>
|
||||
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#line 42 "foo\0bar"</span></span>
|
||||
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> main <span class="op">(</span><span class="dt">void</span><span class="op">)</span> <span class="op">{</span></span>
|
||||
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a> printf <span class="op">(</span><span class="st">"</span><span class="sc">%s</span><span class="st"> </span><span class="sc">%d\n</span><span class="st">"</span><span class="op">,</span> __FILE__<span class="op">,</span> <span class="op">(</span><span class="dt">int</span><span class="op">)</span><span class="kw">sizeof</span> __FILE__<span class="op">);</span></span>
|
||||
<span id="cb8-5"><a href="#cb8-5" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="dv">0</span><span class="op">;</span></span>
|
||||
<span id="cb8-6"><a href="#cb8-6" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
|
||||
<p>This is supposed to output <code>'foo 8'</code>. Here’s what happens
|
||||
in RL:</p>
|
||||
<pre><code>foo 4 gcc 2.7.2.1, lcc
|
||||
foo\0bar 9 tcc 4.1.2, Sunsoft cc turn "\0" into "\\0", ugh!</code></pre>
|
||||
<p>(I have written a bug report for gcc. Newer versions and egcs are
|
||||
ok.)</p>
|
||||
<ol start="3" type="1">
|
||||
<li><p>The <code>%:</code> and <code>%:%:</code> digraphs test for
|
||||
conformance to Amendment One.</p>
|
||||
<p>Ask your local guru if C allows the same case label in the same
|
||||
switch statement to appear more than once. Ask him/her to think real
|
||||
hard. The answer will be “no”. The true guru will cite a constraint in
|
||||
ISO 6.6.4.2. Then make fun of the guru’s answer by waving
|
||||
<code>case __LINE__:</code> 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>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a> <span class="cf">case</span> <span class="op"><</span>some_token<span class="op">>:</span></span>
|
||||
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">case</span> <span class="op"><</span>some_token<span class="op">>:</span></span></code></pre></div>
|
||||
<pre><code>in the same switch? (Note that you need the [invisible] newline. You
|
||||
can generously allow the additional constraint that no `#undef`s or
|
||||
`#define`s are allowed between the two cases.)</code></pre>
|
||||
<p>Lots of integer constants and string literals come into the source
|
||||
via <code>__LINE__</code> and <code>__FILE__</code> which are redefined
|
||||
at various places. Sometimes the <code>__FILE__</code> contains
|
||||
<code>\0</code> bytes; different strings or characters are then accessed
|
||||
with offsets, say <code>10+__FILE__</code> or
|
||||
<code>__LINE__+__FILE__</code> or <code>2[__FILE__]</code>. One integral
|
||||
constant in octal. This makes the source and header input depend on
|
||||
ASCII.</p>
|
||||
<p>A few old obfuscations, like one character identifiers, not too many
|
||||
macros, a <code>goto O</code>, “needless” assignments to satisfy lint
|
||||
with its “function value ignored” warnings. My lint has nothing to
|
||||
complain about.</p>
|
||||
<p>There’s more whitespace in the Standard than just space, tab and
|
||||
newline. In particular, there are vertical tab and form-feed that can be
|
||||
used in certain places (outside of preprocessing directives, i.e. they
|
||||
are not allowed from just after the <code>#</code> up to the final
|
||||
newline. See 6.8 for details.) On many implementations these appear as
|
||||
<code>^L</code> and <code>^K</code>. My source starts with an extremely
|
||||
uncommon 32bit word consisting of <code>^L</code>, <code>^K</code>,
|
||||
<code>%</code> and <code>:</code>. I have grepped old winning entries
|
||||
for ^K, none of them contains one, so this is something new – after 14
|
||||
years of IOCCC. Be sure to have enough paper in your printer when you
|
||||
make a hard copy of the source…</p>
|
||||
<p>While I’m at it, the rules state that only space, tab and newline are
|
||||
ignored for the count (plus ‘<code>{</code>’, ‘<code>}</code>’,
|
||||
‘<code>;</code>’ followed by whitespace). The <a
|
||||
href="../mkentry.c">mkentry.c</a> program, however, uses
|
||||
<code>isspace(3)</code> which returns nonzero for <code>\v</code> and
|
||||
<code>\f</code> and other characters as well. I could have used a lot
|
||||
more <code>^K</code> and <code>^L</code> probably undetected by your
|
||||
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>
|
||||
<div class="sourceCode" id="cb12"><pre
|
||||
class="sourceCode perl"><code class="sourceCode perl"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="kw">#!/usr/bin/perl -w</span></span>
|
||||
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a><span class="wa">$/</span> = <span class="ot">"</span><span class="st">\0</span><span class="ot">"</span>;</span>
|
||||
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a><span class="wa">$_</span> = <>;</span>
|
||||
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a><span class="ot">s/</span><span class="ch">[</span><span class="bn">;{}</span><span class="ch">][</span><span class="bn"> \t\n</span><span class="ch">]</span><span class="ot">/</span><span class="ch">\n</span><span class="ot">/g</span>;</span>
|
||||
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a><span class="ot">s/</span><span class="ch">[</span><span class="bn"> \t\n</span><span class="ch">]+</span><span class="ot">//g</span>;</span>
|
||||
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a><span class="fu">print</span> <span class="fu">length</span> (<span class="wa">$_</span>),<span class="ot">"</span><span class="ch">\n</span><span class="ot">"</span>;</span></code></pre></div>
|
||||
<p>To use, try:</p>
|
||||
<div class="sourceCode" id="cb13"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="fu">perl</span> ./charcount.pl schweikh1.c</span></code></pre></div>
|
||||
<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 use
|
||||
<code>indent</code> on the source. The code is extremely fragile because
|
||||
of the myriads of <code>__LINE__</code> macros – indenting is a sure way
|
||||
to break the program. Don’t even think of maintaining that beast; I’ve
|
||||
had my share of core dumps during development :-) A test suite was used
|
||||
after every minor change to find out if the program still does what it
|
||||
should.</p>
|
||||
<p>From the goals: “To stress C compilers with unusual code.” That
|
||||
describes exactly my modest attempts…</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998schweikh1"><a name="inventory"></a>Inventory
|
||||
for 1998/schweikh1</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/schweikh1.c">schweikh1.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/schweikh1.alt.c">schweikh1.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/schweikh1.orig.c">schweikh1.orig.c</a>
|
||||
- original source</li>
|
||||
<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 winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh1/macos.md">macos.md</a>
|
||||
- work with macOS</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fschweikh1%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+347
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,359 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/schweikh2/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 schweikh2</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: schweikh2 winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,schweikh2,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/schweikh2</title>
|
||||
<meta name="description" content="1998 IOCCC winner schweikh2">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, schweikh2">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 schweikh2</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/schweikh2</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fschweikh2%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/schweikh2/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../schweikh1/index.html">← schweikh1</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../schweikh3/index.html">schweikh3 →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Jens_Schweikhardt">Jens
|
||||
Schweikhardt</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#DE">DE</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./yarng</span></span></code></pre></div>
|
||||
<p>or</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./yarng</span> integer_number</span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./yarng</span> 5</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./yarng</span></span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="co"># watch what it does</span></span></code></pre></div>
|
||||
<p>What is the difference there?</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Run the program with a small argument, like 5 or 10, several times.
|
||||
Are the results different? Why?</p>
|
||||
<h3 id="historical-remarks">Historical remarks:</h3>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> schweikh2</span></code></pre></div>
|
||||
<p>often produced an error of the form:</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="at">-ansi</span> schweikh2.alt.c <span class="at">-o</span> schweikh2.alt</span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="ex">as:</span> Error: cca00NzV.s, line 58: Missing <span class="st">" at end of string</span></span>
|
||||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="st"> "</span></span>
|
||||
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="ex">as:</span> Error: cca00NzV.s, line 58: malformed statement</span>
|
||||
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="ex">***</span> Error code 1 <span class="er">(</span><span class="ex">bu21</span><span class="kw">)</span></span></code></pre></div>
|
||||
<p>because the line:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#line 10 ONE(O(1,1,2,6,0,6))</span></span></code></pre></div>
|
||||
<p>turned into the line:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="pp"># 9 "01\012"</span></span></code></pre></div>
|
||||
<p>(note, though, how that line is on line 11) which caused gcc to give
|
||||
to the assembler the following two lines:</p>
|
||||
<div class="sourceCode" id="cb9"><pre
|
||||
class="sourceCode asm"><code class="sourceCode fasm"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>.stabs <span class="st">"schweikh2.c</span></span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a>",132,0,0,Ltext1</span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb10"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> schweikh2 CFLAGS=-g</span></code></pre></div>
|
||||
<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>
|
||||
<h4 id="for-extra-fun-and-credit">For extra fun and credit:</h4>
|
||||
<p>If your compiler had this bug, you could transform the line in the C
|
||||
program to inject assembly instructions in such a way that the program
|
||||
would compile.</p>
|
||||
<p>If you were able to do that, you could have tried adding assembly
|
||||
instructions so that it will compile, execute and do something
|
||||
interesting (or uninteresting, for that matter :-) ).</p>
|
||||
<p>If you succeeded in doing that (especially on FreeBSD, Linux or
|
||||
SunOS/Solaris), 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>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#line 10 "01\015"</span></span></code></pre></div>
|
||||
<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>
|
||||
<pre><code>:10:16: warning: type defaults to 'int' in declaration of 'zero' [-Wimplicit-int]
|
||||
: In function 'main':
|
||||
:12:1: warning: missing terminating " character
|
||||
:12:19: internal compiler error: invalid built-in macro "__FILE__"</code></pre>
|
||||
<p>so the line:</p>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#line 10 "01\015"</span></span></code></pre></div>
|
||||
<p>was changed to:</p>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#line 10 ONE(O(1,1,2,6,0,6))</span></span></code></pre></div>
|
||||
<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>
|
||||
<p>My entry is a <code>yarng</code>, which stands for, you guessed it,
|
||||
yet another random number generator, and is pronounced ‘yawn’ due to its
|
||||
incredible speed. Seriously, it exploits the randomness of quantum
|
||||
mechanical events that build up the hardware as well as some other
|
||||
non-deterministic factors. Here’s how it works:</p>
|
||||
<ol type="1">
|
||||
<li>an alarm is scheduled to be delivered in a second</li>
|
||||
<li>an infinite loop is entered that just increments a counter</li>
|
||||
<li>on delivery of the alarm signal, the counter’s LSB is printed.</li>
|
||||
<li>while some other counter is not zero, go to step (1)</li>
|
||||
<li>exit</li>
|
||||
</ol>
|
||||
<p>The <code>yarng</code> therefore produces output at a rate of 1 baud.
|
||||
The number of 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>
|
||||
<div class="sourceCode" id="cb15"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./yarng 32</span>
|
||||
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a><span class="ex">10111001010101110110010101001111</span></span>
|
||||
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./yarng 5</span>
|
||||
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a><span class="ex">10011</span></span></code></pre></div>
|
||||
<h3 id="why-i-think-this-is-obfuscated">Why I think this is
|
||||
obfuscated</h3>
|
||||
<ul>
|
||||
<li><p>Ever seen a ‘do for … while’ loop?</p></li>
|
||||
<li><p>I avoided <code>int</code> like the plague. Instead I used
|
||||
storage class specifiers (<code>register</code>, <code>auto</code>) to
|
||||
get implicit <code>int</code>. The Standard allows implicit
|
||||
<code>int</code> even in casts as you can see in
|
||||
<code>(void(*)(register))main</code>. Where implicit <code>int</code> is
|
||||
impossible, like in the <code>int main</code> declaration I have
|
||||
<code>int</code> split across two lines. All indent programs I use
|
||||
insert space at the beginning of the continuation line and thereby
|
||||
introduce a syntax error.</p></li>
|
||||
<li><p><code>main()</code> (ab)used as a signal handler. Shocking. Yeah,
|
||||
this leads to undefined behaviour. I have yet to see a system where it
|
||||
does not work. If it doesn’t work for you, I’d appreciate if you mail me
|
||||
about it. Uh-oh, Schweikh did it, uttered “Works for me”. Don’t quote me
|
||||
on that!</p></li>
|
||||
<li><p>Even if you know how the program works, you just can’t predict
|
||||
the output.</p></li>
|
||||
<li><p>Chained use of token pasting operators <code>##</code> with
|
||||
shuffled arguments.</p></li>
|
||||
<li><p>So you think you can’t assign to <code>__LINE__</code> and
|
||||
<code>__FILE__</code>? Not so. The <code>#line</code> preprocessor
|
||||
directive does the trick. But saying <code>#line 10 "01\n"</code> is a
|
||||
little lame and I came up with
|
||||
<code>??=line 10 ONE(O(1,1,2,6,0,6))</code>.</p></li>
|
||||
<li><p><code>__LINE__</code> is used as the signal number argument to
|
||||
<code>signal()</code>. If indenting or other editing changes the number
|
||||
of lines the program is likely to be killed after one second… Thanks to
|
||||
POSIX for specifying <code>SIGALRM</code> as <code>14</code>. You’re SOL
|
||||
if your system does not conform. Get a real OS.</p></li>
|
||||
<li><p>All strings (or characters) needed are crammed into
|
||||
<code>__FILE__</code> using octal notation and then extracted using
|
||||
pointer + offset notation.</p></li>
|
||||
<li><p>Use of a <code>#</code> (null) preprocessor directive (hidden as
|
||||
a <code>%:</code> digraph) Delete this line and prepare for a core
|
||||
dump.</p></li>
|
||||
<li><p>Identifiers reused with different capitalization:
|
||||
<code>one</code>, <code>One</code>, <code>ONE</code>, <code>zero</code>,
|
||||
<code>Zero</code>. <code>ONE</code> is particularly nasty because it
|
||||
appears as a macro taking an arg and as a plain identifier in
|
||||
<code>main</code>’s parameters. The rule is that whenever
|
||||
<code>ONE</code> is followed by <code>(</code> it must be the
|
||||
macro.</p></li>
|
||||
<li><p>A quote from Kernighan and Plauger, <em>The Elements of
|
||||
Programming Style</em>, 2nd Ed., page 21:
|
||||
<code>"A useful way to decide if some piece of code is clear or not is the 'telephone test.' If someone could understand your code when read aloud over the telephone, it's clear enough. If not then it needs rewriting."</code>
|
||||
Now try the telephone test for ‘one = zero = atoi
|
||||
(ONE[zero-1])’.</p></li>
|
||||
<li><p>Don’t you love the aesthetics of symmetry:
|
||||
<code>write (1, 1+__FILE__+1, 1)</code> (telephone test this as well; is
|
||||
it 1, One, ONE, one? Maybe won?).</p></li>
|
||||
</ul>
|
||||
<h3 id="where-does-the-randomness-come-from">Where does the randomness
|
||||
come from?</h3>
|
||||
<p>Each bit obviously depends on the number of times the loop body is
|
||||
executed between two calls of the signal handler. But what determines
|
||||
this number?</p>
|
||||
<ul>
|
||||
<li>The accuracy of the clock driving the CPU.</li>
|
||||
<li>The accuracy of the clock driving the timer responsible for alarm
|
||||
signals.</li>
|
||||
<li>On multitasking OSes: The total time the process is scheduled to run
|
||||
between successive invocations of the signal handler.</li>
|
||||
</ul>
|
||||
<p>How about the randomness of the <code>yarng</code>? To measure these
|
||||
properties I counted the number of bit sequences and compared them to
|
||||
what I would expect from a generator with uniform distribution (all
|
||||
sequences equally likely to occur).</p>
|
||||
<p>It is interesting to note that <code>yarng</code>’s maximum
|
||||
deviations are less than or equal to <code>rand(3)</code>’s. Randomness
|
||||
however tends to degrade under high load averages on my system (Linux).
|
||||
This could be avoided by allowing the process one second of execution
|
||||
time instead of wall clock time (using the <code>SIGVTALRM</code> sent
|
||||
by the virtual timer instead of <code>SIGALRM</code>).</p>
|
||||
<p>I’m not surprised. <code>Yarng</code> in the end depends on
|
||||
fluctuations of the electrical field and the heat distribution in the
|
||||
oscillators, the implementation and state of the scheduling algorithm,
|
||||
the system load, number and temporal distribution of asynchronous events
|
||||
and last but not least the phase of the moon. God <em>does</em> play
|
||||
dice. Type <code>yarng</code> and watch Him roll.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998schweikh2"><a name="inventory"></a>Inventory
|
||||
for 1998/schweikh2</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh2/schweikh2.c">schweikh2.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh2/Makefile">Makefile</a>
|
||||
- winner 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="1998_schweikh2.tar.bz2">1998_schweikh2.tar.bz2</a> -
|
||||
download winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh2/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh2/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh2/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fschweikh2%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+348
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,360 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/schweikh3/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 schweikh3</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: schweikh3 winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,schweikh3,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/schweikh3</title>
|
||||
<meta name="description" content="1998 IOCCC winner schweikh3">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, schweikh3">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 schweikh3</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/schweikh3</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fschweikh3%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/schweikh3/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../schweikh2/index.html">← schweikh2</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left" href="../tomtorfs/index.html">tomtorfs →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Jens_Schweikhardt">Jens
|
||||
Schweikhardt</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#DE">DE</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<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
|
||||
`sizeof (char *) == 8`), increase the manifest constant 32767 on line
|
||||
31.</code></pre>
|
||||
<p>An alternate version allows one to fix this; see <a
|
||||
href="#alternate-code">alternate code</a> below.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">find</span> dir <span class="at">-type</span> f <span class="at">-print</span> <span class="kw">|</span> <span class="ex">./samefile</span></span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<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 the size as described; this was done with the <code>SZ</code>
|
||||
macro defined in the Makefile 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>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber SIZE=55555 alt</span></code></pre></div>
|
||||
<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 picture but with different compression levels. On the other
|
||||
hand compression can make a thing look/sound/feel different so these
|
||||
probably aren’t duplicates anyway. :-)</p>
|
||||
<p>Some time after this entry won, the Internet Systems Consortium (ISC)
|
||||
added the samefile utility to its treasure of software gems! See the
|
||||
author’s page about the tool as well at <a
|
||||
href="http://www.schweikhardt.net/samefile"
|
||||
class="uri">http://www.schweikhardt.net/samefile</a>.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>The source is expected to conform to IEEE Std 1003.1-1990 (“POSIX”).
|
||||
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>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="kw">`</span><span class="fu">man</span> ./samefile.1</span></code></pre></div>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./samefile</span></span></code></pre></div>
|
||||
<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
|
||||
contents, a line consisting of six tab separated fields is output: The
|
||||
size in bytes, two file names, the character <code>=</code> if the two
|
||||
files are on the same device, <code>X</code> otherwise, and the link
|
||||
counts of the two files. The output is sorted in reverse order by
|
||||
size.</p>
|
||||
<p><code>samefile</code> uses two stages to give optimum
|
||||
performance.</p>
|
||||
<p>In the first stage, all non-plain files are silently ignored
|
||||
(directories, devices, FIFOs, sockets, symbolic links) as well as files
|
||||
for which <code>stat(2)</code> or <code>open(2)</code> fails. The result
|
||||
of the first stage (the file names) is written into a binary tree with
|
||||
one node for every file size. Each node is in turn a linked list of file
|
||||
names along with inode and device information. It is also at this first
|
||||
stage where checks for hard links are done. For any inode only one
|
||||
filename will be added to the binary tree.</p>
|
||||
<p>In the second stage all files having the same size are compared
|
||||
against each other. The rules of mathematical logic are applied to
|
||||
reduce work and output noise: if files <code>A</code>, <code>B</code>,
|
||||
and <code>C</code> have the same size and samefile finds that
|
||||
<code>A = B</code> and <code>A = C</code> then it will not compare
|
||||
<code>B</code> against <code>C</code> (and will not output a line for
|
||||
<code>B</code> and <code>C</code>) but only for <code>A = B</code> and
|
||||
<code>A = C</code>. The algorithm will detect equality across
|
||||
arbitrarily long chains. Note however, that because only the first
|
||||
filename per inode gets into the first stage, 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>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ls <span class="at">-i</span> <span class="co"># output edited for readability:</span></span>
|
||||
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">10</span> file1 20 file4 30 file6</span>
|
||||
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">10</span> file2 20 file5</span>
|
||||
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a> <span class="ex">10</span> file3</span>
|
||||
<span id="cb8-5"><a href="#cb8-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ls <span class="kw">|</span> <span class="ex">./samefile</span></span>
|
||||
<span id="cb8-6"><a href="#cb8-6" aria-hidden="true" tabindex="-1"></a><span class="ex">100</span> file1 file4 = 3 2</span>
|
||||
<span id="cb8-7"><a href="#cb8-7" aria-hidden="true" tabindex="-1"></a><span class="ex">100</span> file1 file6 = 3 1</span></code></pre></div>
|
||||
<p>The sum of the sizes in the first column is the amount of disk space
|
||||
you could gain by making all 6 files links to only one file or remove
|
||||
all but one of the files. To be precise, disk space is allocated in
|
||||
blocks - you will probably gain two blocks here, rather than 200 bytes.
|
||||
Note that it is not enough to just remove <code>file4</code> and
|
||||
<code>file6</code> (you would gain only 100 bytes because
|
||||
<code>file5</code> still exists.)</p>
|
||||
<h4 id="limitations">LIMITATIONS</h4>
|
||||
<p><code>samefile</code> was written with no limits in mind. The number
|
||||
of input lines is unlimited. The size of the actual files is only
|
||||
limited by available virtual memory needed to compare one pair of files.
|
||||
The only hard limit is the constraint that there should not be more than
|
||||
about <code>8192</code> files having the same size. Experience has shown
|
||||
that there are rarely 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>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="fu">find</span> <span class="va">$HOME</span> <span class="kw">|</span> <span class="ex">./samefile</span></span></code></pre></div>
|
||||
<p>For the sysadmin folks:</p>
|
||||
<p>Report all duplicate files under /usr larger than 16k:</p>
|
||||
<div class="sourceCode" id="cb10"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="fu">find</span> /usr <span class="at">-size</span> +16384c <span class="at">-a</span> <span class="at">-type</span> f <span class="kw">|</span> <span class="ex">./samefile</span></span></code></pre></div>
|
||||
<p>For the ftp and WWW admins: How much space is wasted below our site’s
|
||||
/pub directory?</p>
|
||||
<div class="sourceCode" id="cb11"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">find</span> /pub <span class="at">-type</span> f <span class="kw">|</span> <span class="ex">samefile</span> <span class="kw">|</span> <span class="fu">awk</span> <span class="st">'{sum += $1} END {print sum}'</span></span></code></pre></div>
|
||||
<h4 id="exit-status">EXIT STATUS</h4>
|
||||
<p>If <code>samefile</code> runs out of memory the exit status is 1,
|
||||
zero otherwise.</p>
|
||||
<h4 id="see-also">SEE ALSO</h4>
|
||||
<p><code>find(1)</code>, <code>ln(1)</code>, <code>rm(1)</code></p>
|
||||
<h3 id="why-i-think-it-is-obfuscated">Why I think it is obfuscated</h3>
|
||||
<ul>
|
||||
<li>The code is commented but this gives only an <em>extremely</em>
|
||||
faint clue.</li>
|
||||
<li>The layout does not reflect the program structure, or does it?</li>
|
||||
<li>The data structure the program builds is an ordered binary tree
|
||||
where each node consists of a linked list. This is probably too heavy to
|
||||
comprehend for N percent of all programmers ;-)</li>
|
||||
<li>The tree is built and traversed by recursive function calls.</li>
|
||||
<li>Why does this program look at <code>dev_t</code> and
|
||||
<code>ino_t</code>? Heavy wizardry.</li>
|
||||
<li>Can you find out how the algorithm works that detects identity of
|
||||
files across arbitrarily long chains? In my private unobfuscated source
|
||||
there are 17 lines describing just that. A classical case for the well
|
||||
known <code>/* You're not supposed to understand this */</code>
|
||||
comment.</li>
|
||||
<li>Would Dijkstra consider this <code>goto</code> harmful?</li>
|
||||
<li>The only string literal is split in more than a dozen
|
||||
substrings.</li>
|
||||
<li>For the task at hand the code is pretty terse. Some dynamic memory
|
||||
is even freed as soon as it’s no longer needed. I have tried to make the
|
||||
preprocessor directives as short as possible. This means no spaces after
|
||||
<code>#include</code> and no spaces after some of the macro names.</li>
|
||||
</ul>
|
||||
<p>Are you an algorithms guru? If so you should know why the output
|
||||
appears sorted without any use of <code>qsort(3)</code> or
|
||||
<code>system("sort")</code>.</p>
|
||||
<p>Rewrite (hah!) the program to use memory mapping of files instead of
|
||||
<code>read(2)</code>. Does this affect performance noticeably?</p>
|
||||
<p>It’s easy to write a script that takes <code>samefile</code>’s output
|
||||
and hard links (or symlinks) identical files. Writing such a script is
|
||||
left as an exercise for the deobfuscator.</p>
|
||||
<p>When you run <code>samefile</code> on some directory tree, try to
|
||||
estimate how much you think it will find. Is the actual result anywhere
|
||||
near your estimate? How many copies of the GPL <code>COPYING</code> file
|
||||
are there on your filesystems? :-)</p>
|
||||
<p>In the remote event that the input has more than <code>8192</code>
|
||||
files with the same size (on systems where
|
||||
<code>sizeof (char *) == 4</code>, or <code>4096</code> when
|
||||
<code>sizeof (char *) == 8</code>), increase the manifest constant 32767
|
||||
on line 31.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998schweikh3"><a name="inventory"></a>Inventory
|
||||
for 1998/schweikh3</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/schweikh3.c">schweikh3.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/schweikh3.alt.c">schweikh3.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/schweikh3.orig.c">schweikh3.orig.c</a>
|
||||
- original source</li>
|
||||
<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 winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/schweikh3/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Fschweikh3%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+256
-13
@@ -1,4 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- START: two lines up starts content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
@@ -6,27 +8,268 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1998/tomtorfs/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1998 tomtorfs</title>
|
||||
<meta name="description" content="IOCCC year: 1998 IOCCC winner: tomtorfs winner index page">
|
||||
<meta name="keywords" content="IOCCC,1998,tomtorfs,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1998/tomtorfs</title>
|
||||
<meta name="description" content="1998 IOCCC winner tomtorfs">
|
||||
<meta name="keywords" content="IOCCC, 1998, IOCCC 1998, IOCCC winner, tomtorfs">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1998 tomtorfs</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1998/tomtorfs</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.last.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Ftomtorfs%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1998/tomtorfs/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../schweikh3/index.html">← schweikh3</a>
|
||||
<a class="Left" href="../index.html">↑ 1998 ↑</a>
|
||||
<a class="Left Disabled" href="#">last entry</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.last.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Tom_Torfs">Tom Torfs</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#null">unknown</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./tomtorfs</span> filename bitwidth polynom reflected init xor</span></code></pre></div>
|
||||
<p>where:</p>
|
||||
<pre><code>filename : file to calculate the CRC of
|
||||
bitwidth : width of the CRC in bits (decimal)
|
||||
polynom : polynomial used for the CRC (hexadecimal)
|
||||
reflected : 0 if the CRC is not reflected, 1 if it is
|
||||
init : initial value for the CRC (hexadecimal)
|
||||
xor : value to xor the final CRC with (hexadecimal)</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<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 archiver that uses the CRC-32 algorithm.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<pre><code>Usage:
|
||||
./tomtorfs filename bitwidth polynom reflected init xor
|
||||
|
||||
filename : file to calculate the CRC of
|
||||
bitwidth : width of the CRC in bits (decimal)
|
||||
polynom : polynomial used for the CRC (hexadecimal)
|
||||
reflected : 0 if the CRC is not reflected, 1 if it is
|
||||
init : initial value for the CRC (hexadecimal)
|
||||
xor : value to xor the final CRC with (hexadecimal)</code></pre>
|
||||
<h3 id="examples">Examples</h3>
|
||||
<h4 id="crc-16">CRC-16:</h4>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./tomtorfs</span> filename 16 1021 0 FFFF 0000</span></code></pre></div>
|
||||
<h4 id="crc-32">CRC-32:</h4>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./tomtorfs</span> filename 32 04C11DB7 1 FFFFFFFF FFFFFFFF</span></code></pre></div>
|
||||
<h4 id="xmodem">XMODEM:</h4>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./tomtorfs</span> filename 16 8408 1 0000 0000</span></code></pre></div>
|
||||
<h4 id="arc">ARC:</h4>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./tomtorfs</span> filename 16 8005 1 0000 0000</span></code></pre></div>
|
||||
<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. <code>EXIT_FAILURE</code> if the assumptions are false). Otherwise
|
||||
ANSI/ISO C.</p>
|
||||
<p>No special build options required.</p>
|
||||
<h3 id="special-notes">Special notes</h3>
|
||||
<p>Count the number of non-whitespace characters in the source file to
|
||||
find out what dark force drove me to write this ;-).</p>
|
||||
<h3 id="spoiler">Spoiler</h3>
|
||||
<p>First of all, if you run a C beautifier on the program (thereby of
|
||||
course losing the nice code shape I worked so hard on ;-) ) the code
|
||||
will become a bit more readable.</p>
|
||||
<p>The variable names are not very descriptive. They have the following
|
||||
meanings:</p>
|
||||
<pre><code>a = argc
|
||||
A = argv
|
||||
|
||||
b = array of unsigned long variables
|
||||
b[0] = bit-width of the CRC (argv[2])
|
||||
b[1] = CRC polynomial (argv[3])
|
||||
b[2] = nonzero if CRC is reflected (argv[4])
|
||||
b[3] = initial value of CRC (argv[5])
|
||||
b[4] = value final CRC is XORed with (argv[6])
|
||||
b[5] = CRC value
|
||||
b[6] = byte from file
|
||||
b[7] = counter
|
||||
|
||||
B = FILE * through which the file argv[1] is opened
|
||||
|
||||
C = typedef for unsigned long</code></pre>
|
||||
<p>The first <code>for</code> loop simply reads the command-line
|
||||
arguments in the <code>b[]</code> array. The third parameter to
|
||||
<code>strtoul(3)</code> causes all arguments to be in base-16 (hex)
|
||||
except the first one, which will be in base-10 (decimal).</p>
|
||||
<p>The rest of the program “simply” calculates the CRC in
|
||||
<code>b[5]</code> and then prints it to <code>stdout</code>. The bit
|
||||
reflection loops may appear a bit tricky at first, but if you have a
|
||||
good look at them they should become obvious also.</p>
|
||||
<h3 id="acknowledgments">Acknowledgments:</h3>
|
||||
<p>Ross N. Williams, whose CRC guide was very useful to me for writing
|
||||
this. You can find it in <a href="crc.txt">crc.txt</a>.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1998tomtorfs"><a name="inventory"></a>Inventory
|
||||
for 1998/tomtorfs</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/tomtorfs/tomtorfs.c">tomtorfs.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/tomtorfs/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<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
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/tomtorfs/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/tomtorfs/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/tomtorfs/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1998%2Ftomtorfs%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
Reference in new issue
Block a user