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
+366
-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,378 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1992/adrian/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>1992 adrian</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: adrian winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,adrian,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>1992/adrian</title>
|
||||
<meta name="description" content="1992 IOCCC winner adrian">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, adrian">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 adrian</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>1992/adrian</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%2F1992%2Fadrian%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/adrian/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">↑ 1992 ↑</a>
|
||||
<a class="Left" href="../albert/index.html">albert →</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#Adrian_Mariano">Adrian
|
||||
Mariano</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>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: known bug - please help us fix
|
||||
STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#1992-adrian">1992
|
||||
adrian in bugs.md</a>.</p>
|
||||
<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>For the slow minded, 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">./adsleep</span> 32767</span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Once you get past the obfuscation, you have an opportunity to learn
|
||||
about regular expressions and state machines.</p>
|
||||
<p>NOTE: Some compilers have had trouble optimizing this entry.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="adrians-grep-adgrep">ADrian’s GREP (adgrep)</h3>
|
||||
<p>For those confused by the complexity of full-blown
|
||||
<code>egrep(1)</code> style regular expressions, this program offers an
|
||||
alternative. It implements an equivalent search, using a deterministic
|
||||
finite automaton.</p>
|
||||
<p>A deterministic finite automaton consists of a finite set of states,
|
||||
along with transition rules to move from one state to another, an
|
||||
initial state, and a set of accepting states. The automaton takes a
|
||||
string as input and begins in the start state. It reads a character of
|
||||
the string and consults the rules for the current state, moving to the
|
||||
new state indicated by the appropriate rule. This process is repeated
|
||||
until the string is consumed. If the current state at this point is one
|
||||
of the accepting states, then the string is accepted.</p>
|
||||
<p>The deterministic finite automaton is specified as a series of rules
|
||||
for each state:</p>
|
||||
<pre><code><state> chars1 <dest1> chars2 <dest2> ...</code></pre>
|
||||
<p><code>chars1</code> is a list of characters (<em>only the first
|
||||
8</em> are significant) which should trigger a transition to
|
||||
<code><dest1></code>. <code><dest1></code> is another state
|
||||
which should have a similar specification somewhere. A state is
|
||||
accepting if it is specified in square brackets: <code>[final]</code>;
|
||||
state strings are significant to only eight characters like
|
||||
<code>chars1</code>.</p>
|
||||
<h3 id="example-1-matches-abc">Example 1: matches
|
||||
<code>^abc$</code></h3>
|
||||
<pre><code><q0> a <q1> The first state to appear is the start state
|
||||
<q1> b <q2>
|
||||
<q2> c [q3]
|
||||
[q3]</code></pre>
|
||||
<p>Technically, a deterministic finite automaton should have a rule for
|
||||
each possible input character at each state. To simplify descriptions of
|
||||
the automata, if no rule is present, the string will not be accepted.
|
||||
Also, the <code>.</code> character matches any character if it occurs
|
||||
first in the character list.</p>
|
||||
<h3 id="example-2-abc">Example 2: <code>^abc</code></h3>
|
||||
<pre><code><q0> a <q1>
|
||||
<q1> b <q2>
|
||||
<q2> c [q3]
|
||||
[q3] . [q3]</code></pre>
|
||||
<h3 id="example-3-abc">Example 3: <code>abc$</code></h3>
|
||||
<pre><code><q0> a <q1> . <q0>
|
||||
<q1> b <q2> a <q1> . <q0>
|
||||
<q2> c [q3] a <q1> . <q0>
|
||||
[q3] . <q1></code></pre>
|
||||
<h3 id="example-4-abc">Example 4: <code>^(abc)*$</code></h3>
|
||||
<pre><code>[q0] a <q1>
|
||||
<q1> b <q2>
|
||||
<q2> c [q0]</code></pre>
|
||||
<h3 id="example-5-abcdef">Example 5: <code>^[ab][cd][ef]$</code></h3>
|
||||
<pre><code><q0> ab <q1>
|
||||
<q1> cd <q2>
|
||||
<q2> ef [q3]
|
||||
[q3]</code></pre>
|
||||
<h3 id="example-6-abcefg">Example 6: <code>^(abc|efg)$</code></h3>
|
||||
<pre><code><q0> a <q1> e <q3>
|
||||
<q1> b <q2>
|
||||
<q2> c [q5]
|
||||
<q3> f <q4>
|
||||
<q4> g [q5]
|
||||
[q5]</code></pre>
|
||||
<p>With the automaton specification in <code>filename</code>, invoke the
|
||||
program by typing</p>
|
||||
<div class="sourceCode" id="cb12"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./adrian</span> filename</span></code></pre></div>
|
||||
<p>It will read the file and print out all the lines which the automaton
|
||||
accepts. If the file cannot be opened, a system error message will be
|
||||
printed. If the input contains errors, then an error message along with
|
||||
the number of the offending line will be printed to stderr. The number
|
||||
of rules for each state is limited to 17. If more than 17 rules are
|
||||
present, you get the error <code>too_many_rules</code>, and the state
|
||||
that was being processed is printed. Error <code>no_destination</code>
|
||||
occurs if you specify a set of characters, but no destination state, and
|
||||
error <code>too_many_states</code> occurs if your automaton has more
|
||||
than 257 states.</p>
|
||||
<p>Running:</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="ex">./adrian</span> from <span class="op"><</span> your_mailbox</span></code></pre></div>
|
||||
<p>will perform a function similar to that of the unix <code>from</code>
|
||||
command.</p>
|
||||
<p>If no filename is specified on the command line, then
|
||||
<code>__FILE__</code> is used as the specification for the automaton.
|
||||
(Originally this was <code>"adgrep.c"</code> but the file was renamed to
|
||||
<code>adrian.c</code> by the judges and for more portability the arg was
|
||||
changed to <code>__FILE__</code>.) In this case, the program will search
|
||||
for matches to the regular expression:</p>
|
||||
<pre><code>^.[^|C][^w[Q]*(Q|[w[]c).*|^.[C|]$</code></pre>
|
||||
<p>I suggest using <code>adrian.c</code> as input, and storing the
|
||||
output in <code>adwc.c</code>:</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">./adrian</span> <span class="op"><</span> adrian.c <span class="op">></span> adwc.c</span></code></pre></div>
|
||||
<p>Compiling the new file, <code>adwc.c</code>, yields a clone of the
|
||||
unix <code>wc</code> command. It runs on one file, defaulting to
|
||||
<code>"adrian.c"</code> if no file is given (again, this was changed to
|
||||
be <code>__FILE__</code>) and displays the number of lines, words, and
|
||||
bytes in the input file.</p>
|
||||
<p>Another possibly interesting automaton can be created by slightly
|
||||
adjusting the <code>adrian.c</code> file. Change the first line to
|
||||
read</p>
|
||||
<div class="sourceCode" id="cb16"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="co">/* . echo| . */</span></span></code></pre></div>
|
||||
<p>and repeat the process above</p>
|
||||
<div class="sourceCode" id="cb17"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./adrian</span> <span class="op"><</span>adrian.c <span class="op">></span> adecho.c</span></code></pre></div>
|
||||
<p>The new file now contains all lines which match</p>
|
||||
<pre><code>^.[^5|m^]*[m^]([e=p,;]|[^e=+p,;].*)$</code></pre>
|
||||
<p>Compile and run. This is an <code>echo(1)</code> clone. Note the
|
||||
efficient algorithm employed.</p>
|
||||
<p>Two other adjustments to the first line also yield useful results. By
|
||||
changing it to</p>
|
||||
<div class="sourceCode" id="cb19"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="co">/* . head; . */</span></span></code></pre></div>
|
||||
<p>you can search for matches to</p>
|
||||
<pre><code>^.[^W]*W..*$</code></pre>
|
||||
<p>By some freak happenstance, lines of <code>adrian.c</code> which
|
||||
match this regular expression form a unix <code>head(1)</code> command.
|
||||
It prints the first ten lines of the file specified on the command line
|
||||
or <code>adrian.c</code> if no file is specified (again this was changed
|
||||
to <code>__FILE__</code>).</p>
|
||||
<p>By setting the first line to</p>
|
||||
<div class="sourceCode" id="cb21"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="co">/* . basename . */</span></span></code></pre></div>
|
||||
<p>a clone of the unix <code>basename(1)</code> command can be
|
||||
unearthed. The automaton will search for</p>
|
||||
<pre><code>^.[^j]*jr.*$</code></pre>
|
||||
<p>on standard input. And the program which results by running
|
||||
<code>adrian.c</code> through this filter requires two parameters. The
|
||||
first is meant to be a filename, and the second, an extension. All
|
||||
leading pathname components are removed from the filename, and the
|
||||
extension is removed if present. The resulting base name is printed to
|
||||
stdout.</p>
|
||||
<p>Lastly, by setting the first line to</p>
|
||||
<div class="sourceCode" id="cb23"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="co">/* . sleep . */</span></span></code></pre></div>
|
||||
<p>you can search for</p>
|
||||
<pre><code>^.[^(~][^s]*sl.*$</code></pre>
|
||||
<p>Filtering <code>adrian.c</code> through this search yields a clone of
|
||||
the <code>sleep(1)</code> command. Invoke with a single integer
|
||||
parameter, and it will pause for that many seconds.</p>
|
||||
<p>If either <code>adbasename</code> or <code>adsleep</code> is invoked
|
||||
with too few parameters, the program will print the error message:</p>
|
||||
<blockquote>
|
||||
<p>Segmentation fault (core dumped)</p>
|
||||
</blockquote>
|
||||
<p>(The exact text of the above error messages varies from machine to
|
||||
machine.) The four programs which read from stdin require lines shorter
|
||||
than 999 characters.</p>
|
||||
<p>The other info files are <code>adrian.grep.[1-6]</code> which contain
|
||||
the six examples that appear above, and from, which is used to emulate
|
||||
the unix <code>from</code> command. For reasons of clarity, the name
|
||||
<code>"from"</code> should probably not be changed if possible. I
|
||||
wouldn’t want to be accused of confusing people by giving the input
|
||||
files weird names.</p>
|
||||
<p>If you want to change the default input filename (line 80) you must
|
||||
be careful to choose a name that doesn’t match the wrong search
|
||||
patterns, introducing extra lines into one of the programs (again, this
|
||||
was changed to be <code>__FILE__</code>).</p>
|
||||
<p>The program will produce at least one warning and possible several
|
||||
when compiled depending on the compiler.</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-1992adrian"><a name="inventory"></a>Inventory for
|
||||
1992/adrian</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/1992/adrian/adrian.c">adrian.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/adrian.orig.c">adrian.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/adrian.grep.1">adrian.grep.1</a>
|
||||
- agrep script</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/adrian.grep.2">adrian.grep.2</a>
|
||||
- agrep script</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/adrian.grep.3">adrian.grep.3</a>
|
||||
- agrep script</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/adrian.grep.4">adrian.grep.4</a>
|
||||
- agrep script</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/adrian.grep.5">adrian.grep.5</a>
|
||||
- agrep script</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/adrian.grep.from">adrian.grep.from</a>
|
||||
- agrep script</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/adrian.grep.try">adrian.grep.try</a>
|
||||
- agrep script</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1992_adrian.tar.bz2">1992_adrian.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/1992/adrian/.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/1992/adrian/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/adrian/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%2F1992%2Fadrian%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 -->
|
||||
+276
-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,288 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1992/albert/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>1992 albert</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: albert winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,albert,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>1992/albert</title>
|
||||
<meta name="description" content="1992 IOCCC winner albert">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, albert">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 albert</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>1992/albert</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%2F1992%2Falbert%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/albert/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../adrian/index.html">← adrian</a>
|
||||
<a class="Left" href="../index.html">↑ 1992 ↑</a>
|
||||
<a class="Left" href="../ant/index.html">ant →</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#Albert_van_der_Horst">Albert van der
|
||||
Horst</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>
|
||||
<p>An <a href="#alternate-code">alternate version</a> exists that fixes
|
||||
a bug.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: known bug - please help us fix</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#1992-albert">1992
|
||||
albert 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">./albert</span> 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">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>An alternate version of this entry, <a
|
||||
href="albert.alt.c">albert.alt.c</a>, is provided. Leo Broukhis, before
|
||||
he was an IOCCC judge, sent the IOCCC judges this Email message:</p>
|
||||
<pre><code>From: leo _at_ zycad -dot- com (Leo Broukhis)
|
||||
Date: Tue, 30 Jan 96 17:37:51 PST
|
||||
To: judges _at_ toad -dot- com
|
||||
Subject: IOCCC 1992 - a bug
|
||||
|
||||
Dear Judges,
|
||||
|
||||
albert.c (even in its fixed form) still has a bug. Although I don't
|
||||
remember the number that exposed the bug (afair, resulting in coredump)
|
||||
in albert.orig.c that has been fixed in albert.c,
|
||||
|
||||
I've found a number exposing another bug: 10000000001 (that's 9 0's).
|
||||
Both albert and albert.orig loop without printing anything, although
|
||||
the first factor is 101 and is usually found in an instant.</code></pre>
|
||||
<p>The <a href="albert.c">albert.alt.c</a> file is the fixed file,
|
||||
whereas the <a href="albert.c">albert.c</a> is the file before applying
|
||||
Leo Broukhis’ fix.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>To compile this alternate version:</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>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>albert.alt</code> as you would <code>albert</code>
|
||||
above.</p>
|
||||
<h3 id="alternate-try">Alternate try:</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">./try.alt.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>We were impressed with the speed at which it was able to factor
|
||||
arbitrarily large numbers consisting of factors that fit into a
|
||||
long.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>The Obfuscated version of the Horst algorithm.</p>
|
||||
<p>This program will factor unlimited length numbers and print the
|
||||
factors in ascending order. Numbers of one digit (e.g. 8) are rejected
|
||||
without notice.</p>
|
||||
<p>It quits as soon as there is at most one factor left, but that factor
|
||||
will not be shown. It accomplishes this efficiently, without resorting
|
||||
to division or multiplication, until the candidate factor no longer fits
|
||||
in a signed long.</p>
|
||||
<p>The nicest way is to rename the program into e.g. 4294967297 if you
|
||||
want to factor Fermat’s 4th number. Then just run it.</p>
|
||||
<p>Or you may type <code>./albert <some-number></code> A nice one
|
||||
is also (30 ones):</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">./albert</span> 111111111111111111111111111111</span></code></pre></div>
|
||||
<p>Apart from the foregoing there are no special execution
|
||||
instructions.</p>
|
||||
<p>To customize the program into a factorizer of a fixed number, use</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">cc</span> albert.c <span class="at">-o</span> 4294967297</span></code></pre></div>
|
||||
<p>or some such.</p>
|
||||
<p>There are no data files used, and it is not possible to feed input
|
||||
via <code>stdin</code>.</p>
|
||||
<p>I think this program is a nice example of algorithmic obfuscation.
|
||||
Several times two similar algorithms are merged into one. Then you need
|
||||
quite some tricks to get it running, such as long jumps through
|
||||
recursive subroutines. I felt like a sword smith, welding the sword very
|
||||
long, folding it again to the proper length, keep on hammering till it
|
||||
is tight, then fold again. Always keeping it at the proper red hot
|
||||
temperature, but not too hot lest the hardness fades.</p>
|
||||
<p>The strict naming conventions for subroutines did not make things
|
||||
much clearer after all, but it was not supposed to.</p>
|
||||
<p>I would like to draw attention to the robustness of the program with
|
||||
respect to error handling and the nice stopping criterion. The aesthetic
|
||||
appeal of some lines is at the expense of clearness, I apologize.</p>
|
||||
<p>Running the program through the C-beautifier reveals nothing, it will
|
||||
only destroy some of the lay out. Running the program through lint shows
|
||||
the usual remarks for a K&R program. Defeating this through casts
|
||||
does not make a program cleaner in my opinion.</p>
|
||||
<h3 id="hints">Hints</h3>
|
||||
<p>Here are some hints, but they may not be too helpful:</p>
|
||||
<ol type="1">
|
||||
<li>The Horst algorithm is described in the Hobby Computer Club
|
||||
Newsletter, year 82, part 4, a real Dutch treat. Assembly, C and Forth
|
||||
version have been around for some years.</li>
|
||||
<li>Does fractal programming exist after all?</li>
|
||||
<li>You remember the Toom-Cook algorithm in Knuth? It uses iteration
|
||||
instead of recursion and is quite jumpy. This program shares these
|
||||
disadvantages in a modified form.</li>
|
||||
<li>The Conversion is to be found in Knuth, not so the Observation. The
|
||||
Observation: “if it ends in a zero, it is divisible by ten”.</li>
|
||||
</ol>
|
||||
<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-1992albert"><a name="inventory"></a>Inventory for
|
||||
1992/albert</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/1992/albert/albert.c">albert.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/albert/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/albert/albert.alt.c">albert.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/albert/albert.orig.c">albert.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/albert/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/1992/albert/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1992_albert.tar.bz2">1992_albert.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/1992/albert/.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/1992/albert/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/albert/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%2F1992%2Falbert%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 -->
|
||||
+198
-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,210 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1992/ant/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>1992 ant</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: ant winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,ant,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>1992/ant</title>
|
||||
<meta name="description" content="1992 IOCCC winner ant">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, ant">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 ant</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>1992/ant</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%2F1992%2Fant%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/ant/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../albert/index.html">← albert</a>
|
||||
<a class="Left" href="../index.html">↑ 1992 ↑</a>
|
||||
<a class="Left" href="../buzzard.1/index.html">buzzard.1 →</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#Anthony_C_Howe">Anthony C.
|
||||
Howe</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#CA">CA</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">./ant</span> Makefile</span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./ant</span> Makefile rule</span></code></pre></div>
|
||||
<p>where <code>Makefile</code> is a Makefile to use and
|
||||
<code>rule</code> is an optional rule to use.</p>
|
||||
<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>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Like much of POSIX, obfuscation has its place. Your task is to figure
|
||||
out where.</p>
|
||||
<p>This entry comes complete with a POSIX-like command description.
|
||||
Interested POSIX balloters should lobby the IEEE for an obfuscated P1003
|
||||
subcommittee.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>See the file <a href="ant.README">ant.README</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-1992ant"><a name="inventory"></a>Inventory for
|
||||
1992/ant</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/1992/ant/ant.c">ant.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/ant/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/ant/ant.orig.c">ant.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/ant/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/ant/ant.README">ant.README</a>
|
||||
- am man page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/ant/ant.test.mk">ant.test.mk</a>
|
||||
- how to compile</li>
|
||||
<li><a href="1992_ant.tar.bz2">1992_ant.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/1992/ant/.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/1992/ant/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/ant/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%2F1992%2Fant%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 -->
|
||||
+338
-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,350 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1992/buzzard.1/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>1992 buzzard.1</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: buzzard.1 winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,buzzard.1,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>1992/buzzard.1</title>
|
||||
<meta name="description" content="1992 IOCCC winner buzzard.1">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, buzzard.1">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 buzzard.1</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>1992/buzzard.1</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%2F1992%2Fbuzzard.1%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/buzzard.1/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../ant/index.html">← ant</a>
|
||||
<a class="Left" href="../index.html">↑ 1992 ↑</a>
|
||||
<a class="Left" href="../buzzard.2/index.html">buzzard.2 →</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#Sean_Barrett">Sean Barrett</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">./buzzard.1</span> num num</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>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>To see good C Preprocessor buzzard.1, 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="fu">make</span> babble.cppcb</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span> babble.cppcb</span></code></pre></div>
|
||||
<p>Notice how many statements it takes to do anything useful?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>What you shouldn’t think about <code>buzzard.1</code>:</p>
|
||||
<p><code>buzzard.1</code> doesn’t just do a mass of
|
||||
<code>#define</code>s as its obfuscation.</p>
|
||||
<h3 id="what-you-should-be-glad-about">What you should be glad
|
||||
about:</h3>
|
||||
<p>I didn’t just submit the post-C-preprocessed output as an entry.</p>
|
||||
<h4 id="cute-trick-warning">Cute trick warning</h4>
|
||||
<p><code>buzzard.1</code> contains only a numeric
|
||||
<code>printf(3)</code>, yet sometimes it prints out short strings.</p>
|
||||
<h3 id="what-it-does">What it does</h3>
|
||||
<p><code>buzzard.1</code> is a simple mathematical program. It expects
|
||||
two numeric arguments.</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">./buzzard.1</span> 0 <span class="op"><</span>num<span class="op">></span></span></code></pre></div>
|
||||
<p>will print out the factorial of <code><num></code>.</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">./buzzard.1</span> <span class="op"><</span>num1<span class="op">></span> <span class="op"><</span>num2<span class="op">></span></span></code></pre></div>
|
||||
<p>will print out the largest common factor of <code>num1</code> and
|
||||
<code>num2</code>.</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">./buzzard.1</span> 1 <span class="op"><</span>num2<span class="op">></span></span></code></pre></div>
|
||||
<p>will print out a factor of <code>num2</code> if it’s composite, or
|
||||
else it will print a string informing you that <code>num2</code> is
|
||||
prime.</p>
|
||||
<p>If the first argument is less than 0, it prints out an error
|
||||
message.</p>
|
||||
<h3 id="what-it-is">What it is</h3>
|
||||
<p><code>buzzard.1</code> is a translator from a pseudo-assembly
|
||||
language into a subset of C suitable for execution on Charles Babbage’s
|
||||
Analytical Engine. Or rather, the <code>#define</code>s in
|
||||
<code>buzzard.1</code> are that translator. The rest of
|
||||
<code>buzzard.1</code> is a <code>buzzard.1</code> program. If you run
|
||||
the whole mess through CPP and a beautifier, you will see that all you
|
||||
have is a loop that runs until a variable is not 0, and a sequence of
|
||||
assignment statements. The assignment statements are all of the form
|
||||
<code>a op= b</code> or <code>a = b</code>. The Engine actually allowed
|
||||
‘a = b op c’. Only <code>+</code>, <code>-</code>, <code>/</code>, and
|
||||
<code>*</code> are used–no boolean or bitwise operators. The infinite
|
||||
loop could have been simulated on the AE by connecting the
|
||||
already-processed card stack to the input card stack.</p>
|
||||
<h3 id="how-to-try-to-understand-it">How to try to understand it</h3>
|
||||
<p><em>Don’t</em> expand the <code>#define</code>s! Rather, decipher
|
||||
what they do. Some of them are mere obfuscation fodder, put in to
|
||||
encourage you to run it through CPP.</p>
|
||||
<h3 id="what-it-doesnt-do-quite-right-as-an-emulator">What it doesn’t do
|
||||
quite right as an emulator</h3>
|
||||
<p>Because of the definitional constraints, calls to
|
||||
<code>atoi(argv[#])</code> also appear inside the loop. These could be
|
||||
put outside–the initial values of the “registers” on the AE–but the
|
||||
macro conventions being used didn’t lend themselves to it.</p>
|
||||
<h3 id="theoretical-observations">Theoretical observations</h3>
|
||||
<p>The simulated comparison operations only work with a certain range of
|
||||
numbers; numbers that are too large will cause the output code to fail
|
||||
to simulate the input code. This means that this implementation of
|
||||
<code>buzzard.1</code> would not be Turing-complete, even if the AE
|
||||
could process indefinitely-sized numbers. However, this is actually a
|
||||
constraint that no actual computer can meet, either, so we can conclude
|
||||
that if an AE, with card bins connected as suggested above, were hooked
|
||||
up to a memory unit of sufficient size, it would be as Turing complete
|
||||
as any existing machine (or, for those who interpret that excessively
|
||||
critically, i.e. “not at all” for both, we can simply say that the AE
|
||||
could simulate any existing machine–although not quickly). This would be
|
||||
a good place to site some references on the AE, but I don’t have
|
||||
any.</p>
|
||||
<h3
|
||||
id="definition-of-the-input-language-to-buzzard.1-or-what-exactly-do-all-the-macros-do">Definition
|
||||
of the input language to buzzard.1 (OR What Exactly Do All The Macros
|
||||
Do?)</h3>
|
||||
<p>[Don’t read this unless you’re stumped!]</p>
|
||||
<pre><code>
|
||||
MACRO FUNCTION MNEMONIC
|
||||
|
||||
V begin variable declarations Variable
|
||||
C begin program Code
|
||||
|
||||
Q(b,a) let b = a eQuals
|
||||
A(c,a,b) let c = a + b Add
|
||||
S(c,a,b) let c = a - b Subtract
|
||||
D(c,a,b) let c = a / b, where b is a *constant* Divide
|
||||
U(c,a,b) let c = a / b, where b is anything Unknown
|
||||
M(c,a,b) let c = a * b Multiply
|
||||
|
||||
O(c,a,b) let c = a boolean-or b (a,b are 0 or 1) Or
|
||||
B(b, a) let b = boolean value of a Boolean
|
||||
P(b, a) let b = 1 if a>0, else 0. Positive
|
||||
|
||||
l emit next sequential label Label
|
||||
J(x) goto label #x Jump
|
||||
|
||||
Z(a,d) if a is 0 goto d (a is 0 or 1) Zero
|
||||
E(a,d) if a is 1 goto d (a is 0 or 1) Else
|
||||
|
||||
H halt Haly
|
||||
|
||||
K(x) let x = number of cmd line arguments Kount
|
||||
G(x,y) let x = the value if the yth argument Get argument
|
||||
|
||||
T end of code; begin output section Terminate
|
||||
X(y) print out hexadecimal value of y heXadecimal
|
||||
T end of output section and program Terminate</code></pre>
|
||||
<p>You can figure out the other macros yourself. In the sample program,
|
||||
I’ve actually implemented subroutines by saving a return address in a
|
||||
variable and then jumping to a routine– specifically, a routine that
|
||||
converts a number into BCD, so it can be output by the hexadecimal
|
||||
output statement.</p>
|
||||
<h3 id="how-it-works-i.e.-how-to-get-useful-programs-from-a-op-b">How it
|
||||
works, i.e., how to get useful programs from a op= b</h3>
|
||||
<p>The essential statement to be able to make interesting programs is
|
||||
the conditional (given that we have loops). Since all you can do in the
|
||||
given operation output set is assignment, we implement “conditional
|
||||
assignment”:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="op">(</span>x<span class="op">)</span> y <span class="op">=</span> z<span class="op">;</span></span></code></pre></div>
|
||||
<p>To implement this, we constrain <code>x</code> to be either 0 or 1,
|
||||
and simply compute:</p>
|
||||
<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>y <span class="op">=</span> <span class="op">(</span>z <span class="op">*</span> x<span class="op">)</span> <span class="op">+</span> <span class="op">(</span>y <span class="op">*</span> <span class="op">(</span><span class="dv">1</span><span class="op">-</span>x<span class="op">));</span></span></code></pre></div>
|
||||
<p>This is more obscured by factoring out common terms and restricting
|
||||
ourselves to two operand operations:</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>temp <span class="op">=</span> z<span class="op">;</span> <span class="op">(</span>temp <span class="op">==</span> z<span class="op">)</span></span>
|
||||
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a>temp <span class="op">-=</span> y<span class="op">;</span> <span class="op">(</span>temp <span class="op">==</span> z<span class="op">-</span>y<span class="op">)</span></span>
|
||||
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a>temp <span class="op">*=</span> x<span class="op">;</span> <span class="op">(</span>temp <span class="op">==</span> <span class="op">(</span>z<span class="op">-</span>y<span class="op">)*</span>x<span class="op">)</span></span>
|
||||
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a>y <span class="op">+=</span> temp<span class="op">;</span> <span class="op">(</span>y <span class="op">==</span> <span class="op">(</span>z<span class="op">-</span>y<span class="op">)*</span>x <span class="op">+</span> y<span class="op">)</span></span>
|
||||
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a> <span class="op">(</span> <span class="op">==</span> z<span class="op">*</span>x <span class="op">-</span> y<span class="op">*</span>x <span class="op">+</span> y<span class="op">)</span></span>
|
||||
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a> <span class="op">(</span> <span class="op">==</span> z<span class="op">*</span>x <span class="op">+</span> y<span class="op">*(</span><span class="dv">1</span><span class="op">-</span>x<span class="op">))</span></span></code></pre></div>
|
||||
<p>Next we imagine we have a <a
|
||||
href="https://en.wikipedia.org/wiki/Program_counter">pc</a>. “I’m
|
||||
supposed to execute statement pc next”, says our emulator. But suppose
|
||||
we’re not currently coming up on statement pc. To handle this, we simply
|
||||
make every operation conditional on the pc having the correct value:</p>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="op">(</span>pc <span class="op">==</span> some_constant<span class="op">)</span> y <span class="op">=</span> z<span class="op">;</span></span></code></pre></div>
|
||||
<p>To combine this with other operations, we simply multiply by our
|
||||
(<code>pc == some_constant</code>) flag right after the above
|
||||
<code>temp *= x</code>.</p>
|
||||
<p>To evaluate <code>pc == some_constant</code> requires one more trick.
|
||||
We assume that numbers can only be in some limited range. Then we use
|
||||
successive additions and divisions to reduce that number down to
|
||||
<code>-1</code>, <code>0</code>, or <code>1</code>. You could, for
|
||||
instance, do this by using mod by <code>2</code> and div by
|
||||
<code>2</code> to count bits, stopping after, say, <code>32</code>
|
||||
iterations. The number you get is between <code>0..32</code>, so another
|
||||
<code>6</code> iterations on it reduces it to <code>0..6</code>. Three
|
||||
iterations on this produces <code>0..2</code> (<code>3</code> would be
|
||||
<code>7</code>), and then two iterations on this produces 0 or 1.
|
||||
Instead I use a shorter two-divide approach that assumes I’m allowed to
|
||||
use numbers slightly larger than the numbers I’m operating on.</p>
|
||||
<p>A similar approach is used to detect positive numbers.</p>
|
||||
<p>Note that the obvious code to compute <code>y/x</code> will not work
|
||||
correctly, because every value is computed, even if the pc is not set
|
||||
correctly; if <code>x</code> is ever <code>0</code> when the real C code
|
||||
reaches this computation the program will die. (This was discovered the
|
||||
hard way.) The solution is to stick <code>x</code> in a temporary, and
|
||||
if the current code is not about to be executed, set the temporary to
|
||||
<code>1</code>.</p>
|
||||
<p>Thanks to Bill Pugh for bringing the loop-ability of the AE to my
|
||||
attention.</p>
|
||||
<p><code>buzzard.1</code> was originally named ‘cb’, for obvious
|
||||
reasons, and is dedicated to the memory of Charles Barrett.</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-1992buzzard.1"><a name="inventory"></a>Inventory
|
||||
for 1992/buzzard.1</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/1992/buzzard.1/buzzard.1.c">buzzard.1.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.1/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.1/buzzard.1.orig.c">buzzard.1.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.1/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1992_buzzard.1.tar.bz2">1992_buzzard.1.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/1992/buzzard.1/.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/1992/buzzard.1/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.1/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%2F1992%2Fbuzzard.1%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 -->
|
||||
+406
-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,418 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1992/buzzard.2/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>1992 buzzard.2</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: buzzard.2 winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,buzzard.2,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>1992/buzzard.2</title>
|
||||
<meta name="description" content="1992 IOCCC winner buzzard.2">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, buzzard.2">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 buzzard.2</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>1992/buzzard.2</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%2F1992%2Fbuzzard.2%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/buzzard.2/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../buzzard.1/index.html">← buzzard.1</a>
|
||||
<a class="Left" href="../index.html">↑ 1992 ↑</a>
|
||||
<a class="Left" href="../gson/index.html">gson →</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#Sean_Barrett">Sean Barrett</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 of this program. See <a
|
||||
href="#alternate-code">Alternate code</a> below for details.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<p>First, you must make sure that <code>first</code> is made first (even
|
||||
though <code>make all</code> should make first first :-) ):</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> first</span></code></pre></div>
|
||||
<p>Second:</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="co"># get help:</span></span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> help <span class="kw">|</span> <span class="fu">cat</span> third help.th <span class="at">-</span> <span class="kw">|</span> <span class="ex">./first</span></span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="co"># try out a demo:</span></span>
|
||||
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span> third demo5.th <span class="kw">|</span> <span class="ex">./first</span></span></code></pre></div>
|
||||
<p>Third:</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">cat</span> third help.th <span class="at">-</span> <span class="kw">|</span> <span class="ex">./first</span></span></code></pre></div>
|
||||
<p>NOTE: Wait until ‘Ok’ is printed and the type:</p>
|
||||
<pre><code>2 3 + . cr</code></pre>
|
||||
<p>Yes you should really type the 2 letters: <code>cr</code>.</p>
|
||||
<p>Fourth:</p>
|
||||
<pre><code>Sorry, this is third!</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<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">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This alternate version, <a
|
||||
href="buzzard.2.alt.c">buzzard.2.alt.c</a>, does not contain a fix that
|
||||
the author notes in their remarks.</p>
|
||||
<h3 id="alternate-build">Alternate build:</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="fu">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>buzzard.2.alt</code> as you would <code>buzzard.2</code>
|
||||
above.</p>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
<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">./try.alt.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Have fun!</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="what-it-does">What it does</h3>
|
||||
<p><code>first</code> implements a relatively primitive stack machine.
|
||||
How primitive? It supplies 13 visible primitives: 3 arithmetic, 1
|
||||
comparison, 2 memory-access, 2 character I/O, 3 primitives for defining
|
||||
new words, 1 tokenizing, and 1 special stack operation. (There are also
|
||||
three internal operations for the stack machine: ‘push this integer’,
|
||||
‘call this code’, and ‘compile a call to this code’.)</p>
|
||||
<p>It is very difficult to accomplish anything with this set of
|
||||
primitives, but they do have an interesting property.</p>
|
||||
<p>This–what this interesting property is, or in other words what first
|
||||
is good for–is the major obfuscation; there are also minor source
|
||||
obfuscations, as well as some design tricks that are effectively
|
||||
obfuscations. Details on the obfuscations are below, and the interesting
|
||||
property is discussed much further down.</p>
|
||||
<h3 id="how-to-run-it">How to run it</h3>
|
||||
<p><code>first</code> expects you to first enter the names of the 13
|
||||
primitives, separated by whitespace–it doesn’t care what you name them,
|
||||
but if all the names aren’t unique, you won’t be able to use some of
|
||||
them. After this you may type any sequence of valid <code>first</code>
|
||||
input. Valid <code>first</code> input is defined as any sequence of
|
||||
whitespace-delimited tokens which consist of primitives, new words
|
||||
you’ve defined, and integers (as parsed by <code>"%d"</code>). Invalid
|
||||
input behaves unpredictably, but gives no warning messages. A sample
|
||||
program, <code>demo1.1st</code>, is included, but it only works on ASCII
|
||||
systems.</p>
|
||||
<p>Do not expect to be able to do anything interesting with
|
||||
<code>first</code>.</p>
|
||||
<p>To do something interesting, you need to feed <code>first</code> the
|
||||
file <a href="third">third</a> first. In unix, you can do</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">cat</span> third help.th <span class="at">-</span> <span class="kw">|</span> <span class="ex">./first</span></span></code></pre></div>
|
||||
<p>to do this. Hopefully most operating systems will provide a way to do
|
||||
this. It may take some time for this to complete (I seem to remember it
|
||||
taking several minutes on an 8086 PC); <code>THIRD</code> will prompt
|
||||
you when it is finished. The file <a href="third">third</a> has not been
|
||||
obfuscated, due to sheer kindness on the author’s part.</p>
|
||||
<p>For more information on what you can do once you’ve piped <a
|
||||
href="third">third</a> into first, type <code>help</code> and consult <a
|
||||
href="https://en.wikipedia.org/wiki/Forth_(programming_language)">FORTH</a>
|
||||
manuals for further reference. Six sample THIRD programs are included in
|
||||
the files demo[1-6].th. <a
|
||||
href="buzzard.2.README.md">buzzard.2.README.md</a> has more
|
||||
information.</p>
|
||||
<p>Keep in mind that you are still running <code>first</code>, and are
|
||||
for the most part limited by <code>first</code>’s tokenizer (notably,
|
||||
unknown words will attempt to be parsed as integers.) It is possible to
|
||||
build a new parser that parses by hand, reading a single character at a
|
||||
time; however, such a parser cannot easily use the existing dictionary,
|
||||
and so would have to implement its own, thus requiring reimplementing
|
||||
all of <code>first</code> and <code>third</code> a second time–I did not
|
||||
care to tackle this project.</p>
|
||||
<h3 id="compiling">Compiling</h3>
|
||||
<p><code>first</code> is reasonably portable. You may need to adjust the
|
||||
size of the buffers on smaller machines; <code>m[]</code> needs to be at
|
||||
least 2000 long, though.</p>
|
||||
<p>I say <code>first</code> is portable mainly because it uses native
|
||||
types. Unlike
|
||||
[FORTH](https://en.wikipedia.org/wiki/Forth_(programming_language),
|
||||
which traditionally allows byte and multi-byte operations, all
|
||||
operations are performed on C <code>int</code>s. That means
|
||||
<code>first</code> code is only as portable as the same code would be in
|
||||
C. As in C, the result of dividing <code>-1</code> by <code>2</code> is
|
||||
machine (or rather compiler) dependent.</p>
|
||||
<h3 id="how-is-first-obfuscated">How is first obfuscated?</h3>
|
||||
<p><code>first</code> is obfuscated in several ways. Some minor
|
||||
obfuscations like <code>&w[&m[1]][s]</code> for
|
||||
<code>s+m[w+1]</code> were in the original source but are no longer
|
||||
because, apparently, ANSI doesn’t allow it
|
||||
(<code>gcc -ansi -pedantic</code> doesn’t mind it, though.)</p>
|
||||
<p>Other related obfuscations are still present. The top of the stack is
|
||||
cached in a variable, which increases performance massively if the
|
||||
compiler can figure out to keep it in a register; it also obfuscates the
|
||||
code. (Unfortunately, the top of stack is a global variable and neither
|
||||
gcc nor most bundled compilers seem to <code>register</code> allocate
|
||||
it.)</p>
|
||||
<p>More significant are the design obfuscations. <code>m[0]</code> is
|
||||
the “dictionary pointer”, used when compiling words, and
|
||||
<code>m[1]</code> is the return stack index. Both are used as integer
|
||||
offsets into <code>m</code>. Both are kept in <code>m</code>, instead of
|
||||
as separate pointers, because they are then accessible to
|
||||
<code>first</code> programs, which is a crucial property of
|
||||
<code>first</code>. Similarly the way words are stored in the dictionary
|
||||
is not obvious, so it can be difficult to follow exactly what the
|
||||
compiler words are doing.</p>
|
||||
<p>Assuming you’ve waded through all that, you still have to penetrate
|
||||
the most significant obfuscation. Traditionally, the question is whether
|
||||
a reader can answer the question “what will this do when I run it”. A
|
||||
reader who has deciphered <code>first</code> to this point may think
|
||||
they know the answer to this question, but they may not know the answer
|
||||
to the more important question, “what will this program do when given
|
||||
the right input?” <a
|
||||
href="https://en.wikipedia.org/wiki/Forth_(programming_language)">FORTH</a>
|
||||
aficionados, and especially FORTH implementers, may recognize the
|
||||
similarity of the internal compiler format to many FORTH internal
|
||||
representations, and, being aware that FORTH interpreters can often be
|
||||
self-compiling, may be suspicious that this program can compile FORTH,
|
||||
or a significant subset of it, or at least be capable of doing so if fed
|
||||
the right input. Of course, the name “THIRD” should be a dead giveaway,
|
||||
if the name “first” wasn’t. (These numbers were largely chosen because
|
||||
they were five letters long, like “FORTH”, and would not require
|
||||
truncation to five letters, which would be a dead giveaway. Besides,
|
||||
THIRD represents a step backwards, in more ways than one.)</p>
|
||||
<h3 id="what-exactly-is-first-then">What exactly is <code>first</code>,
|
||||
then?</h3>
|
||||
<p><code>first</code> is a tiny interpreter which implements a
|
||||
sufficient pseudo-subset of <a
|
||||
href="https://en.wikipedia.org/wiki/Forth_(programming_language)">FORTH</a>
|
||||
to allow it to bootstrap a relatively complete version of FORTH (based
|
||||
loosely on forth79), which I call THIRD. Complete relative to what, I’m
|
||||
not sure.</p>
|
||||
<p>I believe <code>first</code> is close to the smallest amount of code
|
||||
possible to get this effect <em>using forth-style primitives</em>, and
|
||||
still have some efficiency (it is possible to get by without
|
||||
multiplication if you have addition, obviously). In the design file,
|
||||
design, I give a justification for why each primitive in
|
||||
<code>first</code> was included.</p>
|
||||
<p>THIRD is sorta slow, because <code>first</code> has so few primitives
|
||||
that many things that are primitives in <a
|
||||
href="https://en.wikipedia.org/wiki/Forth_(programming_language)">FORTH</a>
|
||||
(like swap) take a significant amount of time in THIRD.</p>
|
||||
<p>When you get the <code>Ok.</code> message from <code>third</code>,
|
||||
try out some sample <a
|
||||
href="https://en.wikipedia.org/wiki/Forth_(programming_language)">FORTH</a>
|
||||
code (<code>first</code> has no way of knowing if keyboard input is
|
||||
waiting, so it can’t actually prompt you in a normal way. It only prints
|
||||
<code>'Ok.'</code> after you define a word).</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">2</span> 3 + . cr</span></code></pre></div>
|
||||
<p>(which adds 2 and 3, and print the result and a newline.)</p>
|
||||
<p>THIRD responds:</p>
|
||||
<pre><code>5</code></pre>
|
||||
<p>Now try:</p>
|
||||
<pre><code>: test 11 1 do i . loop cr ;
|
||||
test</code></pre>
|
||||
<p>and THIRD responds</p>
|
||||
<pre><code>1 2 3 4 5 6 7 8 9 10</code></pre>
|
||||
<p>When in <code>THIRD</code>, you can see how much space you’re
|
||||
currently using by typing:</p>
|
||||
<pre><code>here .</code></pre>
|
||||
<p>The number THIRD replies with is the number of machine words
|
||||
(<code>int</code>s) that the dictionary (the first code) takes up, plus
|
||||
the 512 <code>int</code>s for the return stack. If you compile the basic
|
||||
THIRD system without the help word (strings take up one <code>int</code>
|
||||
per character in the string!), you should find that you’re using around
|
||||
1000 <code>int</code>s (plus the return stack).</p>
|
||||
<p>Thus THIRD gives you a relatively complete <a
|
||||
href="https://en.wikipedia.org/wiki/Forth_(programming_language)">FORTH</a>
|
||||
system in less than 700 chars of C source + about 1000 <code>int</code>s
|
||||
of memory–and it’s portable too (you could copy over the THIRD memory
|
||||
dump to another machine, in theory). If the above numbers seem to you to
|
||||
be mixing apples and oranges (C source and compiled THIRD code), note
|
||||
that you should in theory be able to stick the compiled THIRD code into
|
||||
the C source.</p>
|
||||
<p>Software Construction Company gets credit for rekindling my interest
|
||||
in FORTH and thus indirectly inspiring me to write this program.</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-1992buzzard.2"><a name="inventory"></a>Inventory
|
||||
for 1992/buzzard.2</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/1992/buzzard.2/buzzard.2.c">buzzard.2.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/buzzard.2.alt.c">buzzard.2.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/buzzard.2.orig.c">buzzard.2.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="buzzard.2.README.html">buzzard.2.README.html</a> - author
|
||||
description of files</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/buzzard.2.design.md">buzzard.2.design.md</a>
|
||||
- about the FORTH language</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/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/1992/buzzard.2/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/demo1.1st">demo1.1st</a>
|
||||
- FORTH source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/demo1.th">demo1.th</a>
|
||||
- FORTH source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/demo2.th">demo2.th</a>
|
||||
- FORTH source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/demo3.th">demo3.th</a>
|
||||
- FORTH source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/demo4.th">demo4.th</a>
|
||||
- FORTH source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/demo5.th">demo5.th</a>
|
||||
- FORTH source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/demo6.th">demo6.th</a>
|
||||
- FORTH source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/help.th">help.th</a>
|
||||
- FORTH source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/third">third</a>
|
||||
- the third source</li>
|
||||
<li><a href="1992_buzzard.2.tar.bz2">1992_buzzard.2.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/1992/buzzard.2/.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/1992/buzzard.2/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/buzzard.2/buzzard.2.README.md">buzzard.2.README.md</a>
|
||||
- markdown source for cannibalism.log.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%2F1992%2Fbuzzard.2%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 -->
|
||||
+373
-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,385 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1992/gson/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>1992 gson</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: gson winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,gson,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>1992/gson</title>
|
||||
<meta name="description" content="1992 IOCCC winner gson">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, gson">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 gson</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>1992/gson</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%2F1992%2Fgson%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/gson/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../buzzard.2/index.html">← buzzard.2</a>
|
||||
<a class="Left" href="../index.html">↑ 1992 ↑</a>
|
||||
<a class="Left" href="../imc/index.html">imc →</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#Andreas_Gustafsson">Andreas
|
||||
Gustafsson</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#FI">FI</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: we DISABLE the optimiser because having it enabled causes some
|
||||
invocations to crash in some systems.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: uses gets() - change to fgets() if possible</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#1992-gson">1992
|
||||
gson 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">./ag</span> word word2 word3 <span class="op"><</span> /path/to/dictionary</span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>Determine where your system dictionary is located. You may find it
|
||||
located in one of the following places:</p>
|
||||
<pre><code>/usr/share/dict/words
|
||||
/usr/share/lib/spell/words
|
||||
/usr/ucblib/dict/words
|
||||
/dev/null # <-- for machines with nothing to say</code></pre>
|
||||
<p>Then using the proper dictionary:</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">./ag</span> free software foundation <span class="op"><</span> /usr/share/dict/words</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> obfuscated c contest <span class="op"><</span> /usr/share/dict/words</span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> unix international <span class="op"><</span> /usr/share/dict/words</span>
|
||||
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> george bush <span class="op"><</span> /usr/share/dict/words</span>
|
||||
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> bill clinton <span class="op"><</span> /usr/share/dict/words</span>
|
||||
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> ross perot <span class="op"><</span> /usr/share/dict/words</span>
|
||||
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> paul e tsongas <span class="op"><</span> /usr/share/dict/words</span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Recently some newspapers printed amusing anagrams of one of the names
|
||||
listed above. Run this program to find the anagrams they weren’t allowed
|
||||
to print!</p>
|
||||
<p>The author provided an obfuscated script that can be used to
|
||||
construct dictionaries which has been put in as <a
|
||||
href="mkdict.sh">mkdict.sh</a>. To use 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="fu">cat</span> README.md <span class="kw">|</span> <span class="ex">./mkdict.sh</span> <span class="op">></span> words</span></code></pre></div>
|
||||
<p>Then try using the program as shown above with the file
|
||||
<code>words</code>.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>The name of the game:</p>
|
||||
<p>AG is short for either Anagram Generator or simply AnaGram. It might
|
||||
also be construed to mean Alphabet Game, and by pure coincidence it
|
||||
happens to be the author’s initials.</p>
|
||||
<h3 id="what-it-does">What it does</h3>
|
||||
<p>AG takes one or more words as arguments, and tries to find anagrams
|
||||
of those words, i.e. words or sentences containing exactly the same
|
||||
letters.</p>
|
||||
<h3 id="how-to-use-it">How to use it</h3>
|
||||
<p>To run AG, you need a dictionary file consisting of distinct words in
|
||||
the natural language of your choice, one word on each line. If your
|
||||
machine doesn’t have one already, you can make your own dictionary by
|
||||
concatenating a few hundred of your favourite Usenet articles and piping
|
||||
them through the following obfuscated shell script:</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="co">#!/bin/sh</span></span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="va">z</span><span class="op">=</span>a-z]<span class="kw">;</span><span class="fu">tr</span> [A-Z<span class="dt">\]</span> <span class="dt">\[</span><span class="va">$z</span><span class="kw">|</span><span class="fu">sed</span> s/[<span class="dt">\^</span><span class="va">$z</span>[<span class="dt">\^</span><span class="va">$z</span><span class="pp">*</span>/_/g<span class="kw">|</span><span class="fu">tr</span> _ <span class="dt">\\</span>012<span class="kw">|</span><span class="fu">grep</span> ..<span class="kw">|</span><span class="fu">sort</span> <span class="at">-u</span></span></code></pre></div>
|
||||
<p>Using articles from alt.folklore.computers is likely to make a more
|
||||
professional-looking dictionary than rec.arts.erotica.</p>
|
||||
<p>AG must be run with the dictionary file as standard input.</p>
|
||||
<p>Because anagrams consisting of just a few words are generally more
|
||||
meaningful than those consisting of dozens of very short words, the
|
||||
number of words in the anagrams is limited to 3 by default. This limit
|
||||
can be changed using a numeric command line option, as in
|
||||
<code>./ag -4 international obfuscated c code contest </usr/dict/words</code>.</p>
|
||||
<h3 id="bugs-and-limitations">Bugs and limitations</h3>
|
||||
<ul>
|
||||
<li>There is no error checking.</li>
|
||||
<li>Standard input must be seekable, so you can’t pipe the dictionary
|
||||
into AG.</li>
|
||||
<li>The input sentence and each line in the dictionary may contain at
|
||||
most 32 distinct letters, and each letter may occur at most 15
|
||||
times.</li>
|
||||
<li>Words in the dictionary may be at most 255 bytes long.</li>
|
||||
<li>AG cannot handle characters that sign-extend to negative
|
||||
values.</li>
|
||||
<li>Although AG works on both 16-bit and 32-bit machines, the size of
|
||||
the problems it can solve is severely limited on machines that limit the
|
||||
stack size to 64k or less.</li>
|
||||
</ul>
|
||||
<h3 id="obfuscatory-notes">Obfuscatory notes</h3>
|
||||
<p>As you can see, AG takes advantage of the new ‘92 whitespace rules’
|
||||
to achieve a clear, readable, self-documenting layout. The identifiers
|
||||
have been chosen in a way appropriate for an alphabet game, and common
|
||||
sources of bugs such as goto statements and malloc/free have been
|
||||
eliminated. As AG also refrains from abusing the preprocessor, it
|
||||
doesn’t really have much to offer in terms of “surface obfuscation”.
|
||||
Instead, it tries to achieve both its speed and its obscurity through a
|
||||
careful choice of algorithms. Some of the finer points of those
|
||||
algorithms are outlined in the spoiler below.</p>
|
||||
<h3 id="how-it-works">How it works:</h3>
|
||||
<p>Here follows a description of some of the data structures and
|
||||
algorithms used by AG. It is by no means complete, but it may help you
|
||||
get an idea about the general principles.</p>
|
||||
<hr />
|
||||
<p>Internally, AG represents words and sentences as arrays of 32 4-bit
|
||||
integer elements. Each element represents the number of times a letter
|
||||
occurs in the word/sentence. There are 32 elements because 32 is a
|
||||
convenient power of two larger than the number of letters in most
|
||||
western alphabets, and the elements are 4 bits each because the same
|
||||
letter is unlikely to occur more than 15 times in a practical anagram
|
||||
generation problem.</p>
|
||||
<p>These <code>32*4</code>-bit arrays are actually stored in memory in a
|
||||
“bit-transposed” format, as arrays of four <code>long</code> values. It
|
||||
is assumed that a <code>long</code> is at least 32 bits. The first 4-bit
|
||||
letter count is formed by the least significant (<code>2^0</code>) bit
|
||||
in each of the four <code>long</code>s, the next one is formed by the
|
||||
<code>2^1</code> bits, etc.</p>
|
||||
<p>This storage format makes it possible to add or subtract two such
|
||||
vectors of 32 4-bit values in parallel by simulating a set of 32 binary
|
||||
full adders in software using bitwise logical operations. E.g., all the
|
||||
LSBs of the result are formed in parallel by taking the exclusive OR of
|
||||
the LSBs in each summand, and 32 carry bits are formed in parallel in a
|
||||
similar way using a logical AND. Thus, 32 independent 4-bit additions
|
||||
can be performed by just four iterations of a loop containing some
|
||||
32-bit bitwise logical operations, but no arithmetic operations other
|
||||
than those implied by array indexing.</p>
|
||||
<p>Subtraction works similarly, and in fact AG only implements
|
||||
subtraction directly, handling addition by means of the identity
|
||||
<code>a+b = a-(0-b)</code>.</p>
|
||||
<p>In addition to this <code>32*4</code>-bit representation, AG also
|
||||
forms a so-called “signature” that is the bitwise OR of the four
|
||||
<code>long</code>s, which is equivalent to saying that the signature of
|
||||
a word contains a logical 1 in the bit positions corresponding to
|
||||
letters occurring at least once in that word.</p>
|
||||
<p>The first thing AG does is to construct a lookup table of 256
|
||||
<code>long</code>s, one for each 8-bit character value. The entry for a
|
||||
character will be zero if that character doesn’t appear in the sentence
|
||||
given on the command line, or it will have a single bit set if the
|
||||
character does appear in the sentence. By adding together the bit masks
|
||||
for all the letters in the input sentence using the transpose addition
|
||||
method described above, AG forms the <code>32*4</code> bit array
|
||||
representation of the input sentence.</p>
|
||||
<p>The next action performed is reading the dictionary. Those words that
|
||||
contain letters not in the input sentence are immediately discarded.
|
||||
Words containing the right letters but in excessive numbers are
|
||||
eliminated in a separate check involving the <code>32*4</code> bit
|
||||
array.</p>
|
||||
<p>The remaining words, which will be referred to as “candidate words”,
|
||||
are stored in <code>32*4</code>-bit representation, together with their
|
||||
signatures and offsets into the dictionary file so that the plain-text
|
||||
version of a word can later be found for printing. This information is
|
||||
kept in a local <code>struct</code> in the dictionary-reading function,
|
||||
and memory is allocated for each candidate word simply by making another
|
||||
recursive call to that function.</p>
|
||||
<p>Each <code>struct</code> so allocated is linked into a fixed-size
|
||||
hash table of 4096 entries indexed by the 12 low bits of the word’s
|
||||
signature. When the dictionary-reading function encounters end-of-file,
|
||||
all the candidate words have been stored in nested activation records on
|
||||
the stack, accessible through the hash table.</p>
|
||||
<p>Generating the anagrams is then done by traversing the hash table and
|
||||
subtracting the letters of each word in the hash table from the “current
|
||||
sentence”, which initially is the sentence given on the command
|
||||
line.</p>
|
||||
<p>The subtraction is performed in parallel on the 4-bit letter counts
|
||||
as described above, and if all 32 results are zero, an anagram has been
|
||||
found. If the result is negative for one or more of the letters (as
|
||||
indicated by one or more <code>1</code>s in a vector of 32 borrow bits
|
||||
returned by the subtraction routine), the word did not match the current
|
||||
sentence and is ignored. Finally, if the result contained only
|
||||
non-negative letter counts, we have found a partial anagram: a word
|
||||
containing some, but not all, of the letters in the current sentence. In
|
||||
this case we recursively try to find an anagram of the remaining
|
||||
letters. The depth of the recursion is limited to the maximum number of
|
||||
words in the anagram, as specified by the user.</p>
|
||||
<p>When the deepest recursion level has been reached, an optimization
|
||||
can be applied: because no further recursion will be done, there is no
|
||||
need to look for partial anagrams, and therefore AG only needs to check
|
||||
for words that contain exactly the same letters as the current sentence.
|
||||
Those words can be found simply by indexing the hash table with the
|
||||
signature of the current sentence.</p>
|
||||
<p>Even when not on the deepest recursion level, AG generally avoids
|
||||
examining all the entries of the hash table. The idea is that we are not
|
||||
interested in hash buckets whose words contain any letters not in the
|
||||
current sentence; these buckets are exactly those whose index has a
|
||||
logical one in a bit position where the signature of the current
|
||||
sentence has a zero. Put another way, we want to loop through only those
|
||||
hash bucket indices <code>i</code> that contain zeroes in all the bit
|
||||
positions where the signature <code>s</code> of the current sentence
|
||||
contains a zero; this can be expressed in C as
|
||||
(<code>i & ~s == 0</code>).</p>
|
||||
<p>It is possible to loop through all such numbers in an efficient way
|
||||
by taking advantage of certain properties of binary arithmetic: by
|
||||
forcing the bits corresponding to zeroes in <code>s</code> to ones, we
|
||||
can make the carries generated in incrementing <code>i</code> propagate
|
||||
straight across those bits that should remain zero. For example, the
|
||||
following program prints all those 16-bit integers that contain zeroes
|
||||
in all even bit positions:</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>main<span class="op">(){</span><span class="dt">int</span> i<span class="op">=</span><span class="dv">0</span><span class="op">,</span>s<span class="op">=</span><span class="bn">0xAAAA</span><span class="op">;</span><span class="cf">do</span><span class="op">{</span>printf<span class="op">(</span><span class="st">"</span><span class="sc">%04x\t</span><span class="st">"</span><span class="op">,</span>i<span class="op">);}</span><span class="cf">while</span><span class="op">(</span>i<span class="op">=((</span>i<span class="op">|~</span>s<span class="op">)+</span><span class="dv">1</span><span class="op">)&</span>s<span class="op">);}</span></span></code></pre></div>
|
||||
<p>AG uses a similar method but works in the opposite direction, finding
|
||||
the next lower value with zeroes in given bit positions by propagating
|
||||
borrows across those bits. Some additional adjustments are made to the
|
||||
hash table index when initiating a recursive search, using similar
|
||||
bit-twiddling techniques.</p>
|
||||
<p>Whenever an anagram has been found, it is printed by traversing a
|
||||
linked list formed by <code>struct</code>s in the activation records of
|
||||
the recursive invocations of the search function, seeking to the
|
||||
beginning of the word matched by that invocation, and copying the
|
||||
characters of the word directly from standard input to standard
|
||||
output.</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-1992gson"><a name="inventory"></a>Inventory for
|
||||
1992/gson</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/1992/gson/gson.c">gson.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/gson.orig.c">gson.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/mkdict.sh">mkdict.sh</a>
|
||||
- tool to make the dictionary</li>
|
||||
<li><a href="1992_gson.tar.bz2">1992_gson.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/1992/gson/.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/1992/gson/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/gson/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%2F1992%2Fgson%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 -->
|
||||
+309
-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,321 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1992/imc/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>1992 imc</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: imc winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,imc,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>1992/imc</title>
|
||||
<meta name="description" content="1992 IOCCC winner imc">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, imc">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 imc</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>1992/imc</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%2F1992%2Fimc%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/imc/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../gson/index.html">← gson</a>
|
||||
<a class="Left" href="../index.html">↑ 1992 ↑</a>
|
||||
<a class="Left" href="../kivinen/index.html">kivinen →</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#Ian_Collier">Ian Collier</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>
|
||||
<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="co"># text mode</span></span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./imc</span> <span class="at">-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="ex">./imc</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>To see a number of options and configurations:</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>
|
||||
<p>The program is more interesting to run on workstations that can make
|
||||
use of a Sun raster file. Others can make use of the -text flag for
|
||||
character oriented output.</p>
|
||||
<p>Of course, the source (layout) is self-documenting! :-)</p>
|
||||
<p>NOTE: The original winning source assumed that <code>exit(3)</code>
|
||||
returned a value which cause problems for some systems where
|
||||
<code>exit(3)</code> returns a void. The file <a href="imc.c">imc.c</a>
|
||||
has been modified to avoid this problem. The original file also declared
|
||||
argc to be a <code>long</code> which was fixed.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="portability">Portability</h3>
|
||||
<p>This program depends upon the ASCII character set, and makes certain
|
||||
assumptions about the architecture. It naughtily declares the first
|
||||
argument to <code>main()</code> as a <code>long</code>, and passes a
|
||||
pointer to <code>long</code> instead of <code>char</code> to
|
||||
<code>fwrite(3)</code>, giving a length value of 32 bytes for an array
|
||||
of 8 <code>long</code>s. I guess that makes this program OK on most
|
||||
flavours of unix, but not on PCs.</p>
|
||||
<h3 id="about-the-program">About the program</h3>
|
||||
<p>This program has several parameters; each of them has a default, so
|
||||
the program runs happily without any parameters. If you supply an
|
||||
incorrect parameter, an obfuscated error message results! :-) Should you
|
||||
want to run the program without knowing what it does, then supplying the
|
||||
single letter <code>t</code> as a parameter is a good move. Otherwise,
|
||||
direct the output into a file. The resulting file is most useful on
|
||||
SunOS, where the <code>file(1)</code> command will tell you what to do
|
||||
with it. For best results with the <code>t</code> option, you may want
|
||||
to change the definition of the <code>I</code> macro :-) Details appear
|
||||
later, though the formatting of the code is a large clue.</p>
|
||||
<p>All the code in this program appears between the <code>;</code> and
|
||||
<code>)</code> in <code>for(;;)</code>. That isn’t because I want to win
|
||||
the best one-liner, but merely because it makes the code so much more
|
||||
impenetrable :-) In fact running a pretty printer on the code hardly
|
||||
improves it at all. This program has the obligatory macros with
|
||||
unmatched parentheses, and the cleverly arranged macro names and
|
||||
parameters to spell out <code>"Ian Colliers Obfuscated C Code"</code>.
|
||||
If you expand macros, bear in mind that the more complex ones are best
|
||||
left as macros, because they have well-defined and nontrivial (IMHO)
|
||||
functions. These macros help to give the program’s parameter format its
|
||||
flexibility. The parameters are sorted out in a unique way (based on an
|
||||
idea by Pete Bevin) which hides very effectively their identities (and I
|
||||
think that using a variable called <code>_</code> adds a nice touch to
|
||||
the illegibility of the code). In this section of the code, the data
|
||||
types of the numbers checked against is varied, and just because you see
|
||||
a <code>,</code> doesn’t mean it has anything to do with commas! So I
|
||||
hope you will agree that this program is more than a little
|
||||
obfuscated…</p>
|
||||
<p>This is a Mandelbrot/Julia drawer. Normally it produces a monochrome
|
||||
Sun-format raster file. The version of <code>xloadimage</code> we have
|
||||
is able to view such files, and so is Sun’s <code>screenload</code>
|
||||
command. [Note: the header contains eight 4-byte integers, the byte
|
||||
order in which depends upon the machine. On Sun workstations they are
|
||||
stored MSB first].</p>
|
||||
<p>The program may be asked to produce text output instead of a raster
|
||||
file. Then the characters defined in the <code>I</code> macro will be
|
||||
used to create up to 16 different shades of grey. Quite a respectable
|
||||
picture can be gained by printing a <code>130x110</code> output on a <a
|
||||
href="https://en.wikipedia.org/wiki/Dot_matrix_printing">dot matrix 132
|
||||
column printer</a> with the linefeed set to 7 points. Text output also
|
||||
gives a good picture when used in an X window with small characters
|
||||
having a square aspect ratio.</p>
|
||||
<p>The options accepted by the program follow. Each option is a single
|
||||
letter; it may be preceded with a minus sign (or any character in
|
||||
<code>[!-/]</code>) and may be followed by other letters, so for
|
||||
example:</p>
|
||||
<ul>
|
||||
<li>m</li>
|
||||
<li>-m</li>
|
||||
<li>mask</li>
|
||||
<li>*mail</li>
|
||||
</ul>
|
||||
<p>all mean the same thing. Most options may be followed by one or two
|
||||
numbers. These numbers may be separated from each other and from the
|
||||
option by a space, or may be joined to each other with a comma, or may
|
||||
be appended to the single-letter option, so</p>
|
||||
<ul>
|
||||
<li>-s100,200</li>
|
||||
<li>size 100,200</li>
|
||||
<li>-size123 100 200</li>
|
||||
<li>s100 200</li>
|
||||
</ul>
|
||||
<p>all mean the same (note that in <code>-size123</code> all characters
|
||||
following the initial <code>s</code> are ignored). Numbers need not be
|
||||
specified, as each has a default value. In all cases except for
|
||||
<code>j</code>, <code>t</code>, and <code>s</code> whenever it appears
|
||||
before <code>t</code>, specifying an option without numbers has no
|
||||
effect. (specifying <code>-s -t</code> has the effect of producing text
|
||||
with the default raster size; not a good idea!).</p>
|
||||
<h3 id="options">Options</h3>
|
||||
<p>The options of this program are:</p>
|
||||
<pre><code>-centre x y (float x,y) Centre the picture at x+iy in the complex
|
||||
plane (default x=0 y=0)
|
||||
|
||||
|
||||
-factor f (float f) Use f pixels per unit of the plane (default
|
||||
f=x/4 where x is the width)
|
||||
|
||||
|
||||
-julia x y (float x,y) Draw a julia set. Use x+iy as the constant
|
||||
to add after squaring (default x=0 y=0)
|
||||
|
||||
-limit l (int l) Use l iterations maximum (default l=128)
|
||||
|
||||
-mask m (int m) Use m as a mask in deciding the colour of each
|
||||
pixel (see below) (default m=1)
|
||||
|
||||
-size x y (int x,y) Produce an x-by-y output (default for raster
|
||||
x=768 y=768; default for text x=63 y=23)
|
||||
|
||||
-text Produce text instead of raster.</code></pre>
|
||||
<p>The colour of each point is determined by taking the bitwise AND of
|
||||
the number of iterations and the mask. For a raster, the point is black
|
||||
(1-bit) if the result is zero, white otherwise. For text, the result of
|
||||
the operation determines the greyness of the character produced, with a
|
||||
blank for zero going up to a star for the maximum value. For a
|
||||
four-colour picture, for example, use a mask with two bits set (e.g. 3),
|
||||
and for a 16-colour picture use a mask with four bits set (e.g. 15). For
|
||||
a picture with coarse detail, use a mask which ends with several zero
|
||||
bits (e.g. 8).</p>
|
||||
<p>While the program is creating your picture, it displays dots on the
|
||||
standard error to indicate its progress (one dot per pixel line).</p>
|
||||
<h3 id="example-pictures-to-try">Example pictures to try</h3>
|
||||
<p>Here are a couple of good pictures to draw:</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">./imc</span> <span class="at">-s</span> 512,512 <span class="at">-f</span> 600000 <span class="at">-l</span> 512 <span class="at">-m</span> 16 <span class="at">-c.00805,.74274</span> <span class="op">></span> screen1.ras</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./imc</span> <span class="at">-s512,512</span> <span class="at">-j-.523,-.535</span> <span class="op">></span> screen2.ras</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-1992imc"><a name="inventory"></a>Inventory for
|
||||
1992/imc</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/1992/imc/imc.c">imc.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/imc/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/imc/imc.orig.c">imc.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/imc/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1992_imc.tar.bz2">1992_imc.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/1992/imc/.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/1992/imc/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/imc/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%2F1992%2Fimc%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 -->
|
||||
+271
-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,283 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1992/kivinen/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>1992 kivinen</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: kivinen winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,kivinen,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>1992/kivinen</title>
|
||||
<meta name="description" content="1992 IOCCC winner kivinen">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, kivinen">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 kivinen</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>1992/kivinen</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%2F1992%2Fkivinen%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/kivinen/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../imc/index.html">← imc</a>
|
||||
<a class="Left" href="../index.html">↑ 1992 ↑</a>
|
||||
<a class="Left" href="../lush/index.html">lush →</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#Tero_Kivinen">Tero Kivinen</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#FI">FI</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>If your machine support the X Window System, Version 11:</p>
|
||||
<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> alt</span></code></pre></div>
|
||||
<p>We recommend that you try the alt version first so you can get a
|
||||
better idea of what this looked like back in 1992. See <a
|
||||
href="#original-code">original code</a> for the original should you wish
|
||||
to see what we mean.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: known bug - please help us fix</code></pre>
|
||||
<p>For more detailed information see <a
|
||||
href="/bugs.md#1992-kivinen">1992 kivinen 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">./kivinen.alt</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">./kivinen.alt</span> a</span>
|
||||
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./kivinen.alt</span> a b</span></code></pre></div>
|
||||
<p>See also the author’s remarks for other variations.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>Also try changing the speed that the game moves. For instance if you
|
||||
wish to change the <code>usleep(3)</code> value to <code>30000</code>
|
||||
from <code>20000</code>, 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="fu">make</span> clobber SLEEP=30000 alt <span class="co"># make it slower</span></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="fu">make</span> clobber SLEEP=10000 alt <span class="co"># make it faster</span></span></code></pre></div>
|
||||
<p>Then use the same syntax as above and described by the author.</p>
|
||||
<h2 id="original-code">Original code:</h2>
|
||||
<p>As noted above, the alt version is recommended because the code goes
|
||||
too fast in modern systems. If you wish to see the original you may do
|
||||
so with the original code.</p>
|
||||
<h3 id="original-build">Original build:</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="fu">make</span> all</span></code></pre></div>
|
||||
<h3 id="original-use">Original use:</h3>
|
||||
<p>Use <code>kivinen</code> as you would <code>kivinen.alt</code>.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The type of entertainment depends on number of arguments you have
|
||||
with the program. :-)</p>
|
||||
<p>NOTE: Some systems do not need (or have)
|
||||
<code>-lsocket -lresolv -lnsl</code>. Such systems should compile using
|
||||
<code>-lX11</code>.</p>
|
||||
<p>NOTE: The original winning source <a
|
||||
href="kivinen.orig.c">kivinen.orig.c</a> assumed that
|
||||
<code>exit(3)</code> returned a value which cause problems for some
|
||||
systems where <code>exit(3)</code> returns <code>void</code>. The file
|
||||
<a href="kivinen.c">kivinen.c</a> avoids this problem.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="x-entertainment-kit">X Entertainment Kit</h3>
|
||||
<p>This kit includes three games from the early era of video games
|
||||
designed for the X Window System Version 11 Release 5. It should work
|
||||
with earlier releases, though.</p>
|
||||
<h4 id="space-invaders">Space Invaders</h4>
|
||||
<p>The classic game of shooting aliens from outer space, trying to
|
||||
exterminate all life on earth. The game ends when the first line of
|
||||
aliens touches the ground, or destroy you. To win the game you must
|
||||
destroy all the aliens. If you evade out from the screen you lose.</p>
|
||||
<h5 id="controls">Controls</h5>
|
||||
<ul>
|
||||
<li>Button 1 = Move left</li>
|
||||
<li>Button 2 = Fire missile</li>
|
||||
<li>Button 3 = Move right</li>
|
||||
</ul>
|
||||
<h4 id="breakout">Breakout</h4>
|
||||
<p>Break all the bricks with the ball, using your paddle. If you miss
|
||||
the ball the game ends.</p>
|
||||
<h5 id="controls-1">Controls</h5>
|
||||
<ul>
|
||||
<li>Button 1 = Move left</li>
|
||||
<li>Button 3 = Move right</li>
|
||||
</ul>
|
||||
<h4 id="dropout">Dropout</h4>
|
||||
<p>Catch all the falling pieces, before they reach the ground. If you
|
||||
miss it, game ends. To win you must catch all 30 pieces.</p>
|
||||
<h5 id="controls-2">Controls</h5>
|
||||
<ul>
|
||||
<li>Button 1 = Move left</li>
|
||||
<li>Button 3 = Move right</li>
|
||||
</ul>
|
||||
<h3 id="starting-a-game">Starting a game</h3>
|
||||
<p>The type of the game is determined by the number of arguments given
|
||||
to the program.</p>
|
||||
<ul>
|
||||
<li>no arguments = Space Invaders</li>
|
||||
<li>1 argument = Breakout</li>
|
||||
<li>2 arguments = Dropout</li>
|
||||
<li>3 arguments = double sized Breakout</li>
|
||||
<li>4 arguments = triple sized Space Invaders</li>
|
||||
<li>5 arguments = triple sized Breakout</li>
|
||||
<li>6 arguments = double sized Dropout</li>
|
||||
<li>7 arguments = quadruple sized Breakout</li>
|
||||
</ul>
|
||||
<p>…and so on…</p>
|
||||
<h3 id="scores">Scores</h3>
|
||||
<p>The exit value of the game is your score. The smaller the score the
|
||||
better it is. The exit value of zero means you have won.</p>
|
||||
<h3 id="features">Features</h3>
|
||||
<p>The game has a cheat system, which can be found after examining the
|
||||
event loop at the end of program. It is not a bug, it’s a feature!</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-1992kivinen"><a name="inventory"></a>Inventory for
|
||||
1992/kivinen</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/1992/kivinen/kivinen.c">kivinen.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/kivinen/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/kivinen/kivinen.alt.c">kivinen.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/kivinen/kivinen.orig.c">kivinen.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1992_kivinen.tar.bz2">1992_kivinen.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/1992/kivinen/.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/1992/kivinen/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/kivinen/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%2F1992%2Fkivinen%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 -->
|
||||
+190
-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,202 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1992/lush/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>1992 lush</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: lush winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,lush,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>1992/lush</title>
|
||||
<meta name="description" content="1992 IOCCC winner lush">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, lush">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 lush</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>1992/lush</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%2F1992%2Flush%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/lush/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../kivinen/index.html">← kivinen</a>
|
||||
<a class="Left" href="../index.html">↑ 1992 ↑</a>
|
||||
<a class="Left" href="../marangon/index.html">marangon →</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#Ed_Luke">Ed Luke</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>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: doesn't work with some compilers - please provide alternative code or fix for more compilers</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#1992-lush">1992
|
||||
lush 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">./lush.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The program uses error messages issued by the C Preprocessor to
|
||||
generate its message to the world. One program’s error is another
|
||||
program’s data!</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program is yet another “Hello World.” program with a twist. The
|
||||
string Hello World has been encoded in the error messages the compiler
|
||||
generates when compiling the source.</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-1992lush"><a name="inventory"></a>Inventory for
|
||||
1992/lush</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/1992/lush/lush.c">lush.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/lush/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/lush/lush.orig.c">lush.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/lush/lush.sh">lush.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1992_lush.tar.bz2">1992_lush.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/1992/lush/.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/1992/lush/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/lush/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%2F1992%2Flush%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 -->
|
||||
+194
-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,206 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1992/marangon/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>1992 marangon</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: marangon winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,marangon,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>1992/marangon</title>
|
||||
<meta name="description" content="1992 IOCCC winner marangon">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, marangon">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 marangon</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>1992/marangon</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%2F1992%2Fmarangon%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/marangon/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../lush/index.html">← lush</a>
|
||||
<a class="Left" href="../index.html">↑ 1992 ↑</a>
|
||||
<a class="Left" href="../nathan/index.html">nathan →</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#Andrea_Marangoni">Andrea
|
||||
Marangoni</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#IT">IT</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">./marangon</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The object is to refill the table with 5’s, by incrementing or
|
||||
decrementing numbers as needed. It is the side effects that get you into
|
||||
trouble. If you are not careful, you may find things “at 6’s and 7’s”.
|
||||
:-)</p>
|
||||
<p>NOTE: Some compilers have had trouble optimizing this entry.</p>
|
||||
<p>NOTE: Some systems need to compile with <code>-ltermcap</code> as
|
||||
well as <code>-lcurses</code>.</p>
|
||||
<p>NOTE: The original winning source <a
|
||||
href="marangon.orig.c">marangon.orig.c</a>, found in the archive
|
||||
directory, assumed that <code>exit(3)</code> returns a value which cause
|
||||
problems for some systems where <code>exit(3)</code> returns a
|
||||
<code>void</code>. The file <a href="marangon.c">marangon.c</a> avoids
|
||||
this problem.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>It starts off by creating a table with number 5 in all places. The
|
||||
CPU melts the numbers and you must return them in original state. When
|
||||
you increase a number, all the other eight numbers next to it decrease
|
||||
and vice-versa.</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-1992marangon"><a name="inventory"></a>Inventory
|
||||
for 1992/marangon</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/1992/marangon/marangon.c">marangon.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/marangon/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/marangon/marangon.orig.c">marangon.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1992_marangon.tar.bz2">1992_marangon.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/1992/marangon/.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/1992/marangon/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/marangon/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%2F1992%2Fmarangon%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 -->
|
||||
+261
-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,273 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1992/nathan/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>1992 nathan</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: nathan winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,nathan,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>1992/nathan</title>
|
||||
<meta name="description" content="1992 IOCCC winner nathan">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, nathan">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 nathan</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>1992/nathan</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%2F1992%2Fnathan%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/nathan/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../marangon/index.html">← marangon</a>
|
||||
<a class="Left" href="../index.html">↑ 1992 ↑</a>
|
||||
<a class="Left" href="../vern/index.html">vern →</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#Nathan_Sidwell">Nathan
|
||||
Sidwell</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>
|
||||
<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">./nathan</span></span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="co"># enter some text</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>To see some other fun uses:</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="warning">WARNING:</h3>
|
||||
<p>The judges make no claim as to the strength or security of this
|
||||
program. It is likely to be nil, or the next best thing to it. Still,
|
||||
you might consider installing it in <code>/usr/games/nathan</code>.
|
||||
:-)</p>
|
||||
<h3 id="note-from-the-judges-about-the-winning-category">Note from the
|
||||
judges about the winning category::</h3>
|
||||
<p>The ‘winning’ category is also open to question. One could say that
|
||||
it is a ‘file obfuscator’. One could also say that it unintentionally
|
||||
abused the intent of rule #7 (that programs should be freely
|
||||
re-distributable). We suspect that the author may not have intended to
|
||||
do this, but that is the way things go sometimes.</p>
|
||||
<p>BTW, ‘abuse of the rules’ entries do not violate the rules. Entries
|
||||
that violate the rules are disqualified. Abuse of the rules entries are
|
||||
ones that tend to ‘stretch’ the limits and take the contest into
|
||||
unexpected territory.</p>
|
||||
<h3 id="historical-notes-from-the-judges-about-this-entry">Historical
|
||||
notes from the judges about this entry:</h3>
|
||||
<p>The US International Traffic in Arms Regulations controls certain
|
||||
exportations going out of the United States. The U.S. Munitions List
|
||||
gives the specific categories of restricted exports. Because this entry
|
||||
at one time appeared to fall under this restricted category, the judges
|
||||
originally were not able to distribute winners outside of the US.</p>
|
||||
<p>Nathan Sidwell stated that he was willing to distribute the winning
|
||||
source. To read HIS instructions of how to obtain his winning program
|
||||
one was able to run:</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">make</span> nathan</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./nathan</span></span></code></pre></div>
|
||||
<p>to learn how to get a copy of the code.</p>
|
||||
<p>See the 1992/nathan.c file in the <a
|
||||
href="/archive/historic/archive-1992.tar.bz2">archive/historic/archive-1992.tar.bz2</a>
|
||||
tarball if you’re interested in this file.</p>
|
||||
<h3 id="personal-note-from-chongo">Personal note from chongo:</h3>
|
||||
<p>I think the situation showed just how ridiculous US crypto
|
||||
regulations really were/are. Certain US federal officials can get away
|
||||
with shipping arms to certain nations in apparent violation of US laws,
|
||||
but I personally can’t re-distribute a program contest winner to the
|
||||
network!</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="program-use">Program use</h3>
|
||||
<p>This program is a hello world text encryptor/decryptor. It uses an
|
||||
enigma (I think) style encryption algorithm, where the encryption key
|
||||
character is modified by a value, determined from the previous
|
||||
character. Non-printable characters (those with ASCII values <
|
||||
<code>' '</code> or > <code>0x7e</code>) are passed unaltered, thus
|
||||
any kind of file may be successfully processed, but if the original is
|
||||
printable, the processed file will be too. The input is read from
|
||||
<code>stdin</code>, and the output presented to <code>stdout</code>. The
|
||||
key, a text string, is presented as a command argument. This is
|
||||
optional, and if omitted, the file is self-{de,en}crypted. To specify
|
||||
decryption, a <code>-</code> should be given before the key. (Actually
|
||||
encryption and decryption proper inverse operations, so you can use
|
||||
decrypt to scramble and encrypt to descramble, if you’re perverse.)</p>
|
||||
<h3 id="portability-a-little-knowledge-is-a-dangerous-thing">Portability
|
||||
(A little knowledge is a dangerous thing)</h3>
|
||||
<p>It’s written in ANSI C, and doesn’t even assume an ASCII character
|
||||
set, (it has an array of the characters to convert), so should be
|
||||
portable across many platforms. It passes
|
||||
<code>gcc -ansi -pedantic -O -Wall</code> with no warnings (You may get
|
||||
assignment in conditional warnings on other platforms though). Because
|
||||
I’ve heard that conditional jumps slow down fast processors, I’ve
|
||||
eliminated all the <code>if</code>s from the code; indeed, as its only
|
||||
one statement, it should compile to one instruction and a suitably
|
||||
designed CISC machine. To speed compilation, there is only one statement
|
||||
in the loop, so that another scoping level does not need to be
|
||||
opened.</p>
|
||||
<p>Being an encryptor/decryptor, you probably want the source code to be
|
||||
obfuscated, to hide the algorithm.</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>In spite of the fact that it looks like a nice friendly hello world
|
||||
program, it isn’t (as documented above). (Short lines have been padded,
|
||||
as you’ll find if you look at an encrypted copy of the source.)</p>
|
||||
<p>I’ve also named some of the macros from commonly used functions, just
|
||||
to keep things muddy. Of course, all the variables are misnamed. The
|
||||
program is kept simply (one for statement), by serious overuse of
|
||||
<code>,</code> and <code>?:</code>. These are really confusing when used
|
||||
together, nested or put in argument lists (is that a comma operator, or
|
||||
argument separator?).</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-1992nathan"><a name="inventory"></a>Inventory for
|
||||
1992/nathan</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/1992/nathan/nathan.c">nathan.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/nathan.orig.c">nathan.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1992_nathan.tar.bz2">1992_nathan.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/1992/nathan/.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/1992/nathan/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/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%2F1992%2Fnathan%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: 1992/vern/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>1992 vern</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: vern winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,vern,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>1992/vern</title>
|
||||
<meta name="description" content="1992 IOCCC winner vern">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, vern">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 vern</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>1992/vern</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%2F1992%2Fvern%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/vern/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../nathan/index.html">← nathan</a>
|
||||
<a class="Left" href="../index.html">↑ 1992 ↑</a>
|
||||
<a class="Left" href="../westley/index.html">westley →</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#Vern_Paxson">Vern Paxson</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>
|
||||
<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#1992-vern">1992
|
||||
vern 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">./vern</span> 3 <span class="co"># <-- default is 2</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>You might start off by giving the following input:</p>
|
||||
<pre><code>63 43
|
||||
76 55
|
||||
71 52
|
||||
67 57 # <-- this may take a while</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The judges assume no responsibility for the obfuscated opening
|
||||
suggested above. :-)</p>
|
||||
<p>For a real quick game 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">./vern</span></span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="ex">65</span> 55</span>
|
||||
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="ex">66</span> 46</span></code></pre></div>
|
||||
<p>NOTE: Move values must be restricted to the range 00 to 77.</p>
|
||||
<p>NOTE: Because some mailers have problems with the original winning
|
||||
source, a slightly modified version with shorter lines has been
|
||||
provided.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program plays chess. You play the white pieces and the program
|
||||
the black pieces. Moves are entered as a two-digit number specifying the
|
||||
coordinates of the piece to be moved followed by another two-digit
|
||||
number specifying the coordinates of where to move it. Rows and columns
|
||||
are numbered starting with <code>(0,0)</code> for the upper-left-hand
|
||||
corner (black’s queen’s rook) and going to <code>(7,7)</code> for the
|
||||
lower-right-hand corner (white’s king’s rook). For example, the
|
||||
<code>PK4</code> opening for white is indicated as
|
||||
<code>"64 44" (without the quotes)</code>. Moves are read using
|
||||
<code>scanf()</code> so care should be taken to not enter the wrong
|
||||
number of fields.</p>
|
||||
<p>If the move you enter is illegal then you are just prompted again to
|
||||
move. If the move is legal then the new position is displayed and the
|
||||
program starts computing its response. For every 64 board positions it
|
||||
examines a “.” is printed. Once it has chosen its move it simply
|
||||
displays the board updated to reflect the move.</p>
|
||||
<p>Your move is prompted for using a string like
|
||||
<code>"1351 9 2 >"</code>. The first number is how many board
|
||||
positions the program examined when computing its previous response. The
|
||||
second number is its anticipated value for the move it just made (with
|
||||
larger numbers meaning an ultimately better board position for it), and
|
||||
the third number is the evaluation it assigns to the your current
|
||||
position (larger numbers meaning better positions for you). A
|
||||
<code>></code> indicates that you are not in check; for check it is
|
||||
changed to <code>!</code>.</p>
|
||||
<p>There are a few limitations on play:</p>
|
||||
<ul>
|
||||
<li>castling can only be done on the king’s side.</li>
|
||||
<li>prohibitions against castling out of or through check are not
|
||||
enforced.</li>
|
||||
<li>prohibitions against castling if the king or rook have moved are not
|
||||
enforced.</li>
|
||||
<li>pawns are always promoted to queens.</li>
|
||||
<li>en passant is not allowed.</li>
|
||||
<li>the board-position-repeated-three-times and fifty-moves stalemates
|
||||
are not recognized.</li>
|
||||
</ul>
|
||||
<p>If you checkmate the computer it prints “Rats!” and exits. If your
|
||||
own checkmate is imminent it prints “Har har.” but doesn’t exit so it
|
||||
can rub your nose in defeat (which may be a move or two away if you’re
|
||||
playing at a high “ply” - see the next paragraph). Stalemates are not
|
||||
recognized per se, but when selecting its move the program assigns a
|
||||
stalemate position a value of 0 so it will try for a stalemate if its
|
||||
other options are worse.</p>
|
||||
<p>The program takes one optional argument indicating the ply
|
||||
(lookahead) it should use. The default is 2, which is enough to keep it
|
||||
from making flaming blunders. The higher the ply, the better the play,
|
||||
and the longer you have to wait. For example, at a ply of 2, a response
|
||||
to the <code>PK4</code> opening takes about 1.8 CPU seconds on a SPARC
|
||||
ELC when compiled <code>-O</code> with Sun <code>cc</code>. A ply of 3
|
||||
takes 13 CPU seconds (and results in a different response to
|
||||
<code>PK4</code>) and a ply of 4 takes a little under 4 CPU minutes (and
|
||||
for <code>PK4</code> comes up with the same response as a ply of 3). A
|
||||
ply of 3 is in general good enough to avoid not only flaming blunders
|
||||
but also immediately stupid moves altogether. A ply of 4 will find all
|
||||
mate-in-two’s.</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>This program is obfuscated in a number of ways. First, it abuses the
|
||||
contest rule regarding ‘;’, ‘{’, and ‘}’ in the source not counting
|
||||
against the non-whitespace character limit if followed by whitespace. As
|
||||
can be seen from the build file, certain combinations of these
|
||||
characters followed by a particular whitespace character are expanded at
|
||||
build time into much-needed text. Without this hack the program wouldn’t
|
||||
pass the character limit. A nice side effect is that the initial source
|
||||
is gloriously difficult to peruse. In particular, the Makefile does:</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">sed</span> <span class="op"><</span>vern.c <span class="st">'s/{ /(/g;s/} /)/g;s/; /#define /'</span> <span class="kw">|</span> <span class="dt">\</span></span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">sed</span> <span class="st">'s/} /=/g;s/{ /i/g'</span> <span class="op">></span>vern.tmp.c</span></code></pre></div>
|
||||
<p>and compiles <code>vern.tmp.c</code>.</p>
|
||||
<p>Second, the rather ho-hum step has been taking of naming each
|
||||
variable with a one or two letter identifier to render it meaningless
|
||||
(and save space). This tactic is rather effective in a complex
|
||||
program.</p>
|
||||
<p>Third, the board is represented not as an array of pieces but rather
|
||||
as an array of function pointers (with a separate array representing
|
||||
whether a piece is white or black). This obfuscates the program’s
|
||||
central data structure. There is one function per type of piece; when
|
||||
called they return 1 if the current move is illegal for that piece and 0
|
||||
if it is legal. The functions also as a side effect set a global
|
||||
indicating the type of the piece (though the type can also be determined
|
||||
by comparing the function pointer with the function itself).</p>
|
||||
<p>Fourth, there are no independent routines for generating potential
|
||||
moves. Instead, the program generates its moves by brute force: for
|
||||
every piece it controls on the board, it attempts to move it to every
|
||||
square on the board. Those moves that are legal it then explores to see
|
||||
their effects (using <a
|
||||
href="https://en.wikipedia.org/wiki/Alpha-beta_pruning">alpha-beta
|
||||
search</a>). This tactic somewhat obfuscates the algorithm used by the
|
||||
program.</p>
|
||||
<p>Finally, there are three key constants that occur throughout the
|
||||
program: <code>64</code>, <code>8</code>, and <code>3</code>
|
||||
(<code>lg 8</code>). Rather than making these available at compile-time,
|
||||
which provides a hint as to what the program is up to, they are computed
|
||||
probabilistically at run-time. An instance of the <a
|
||||
href="https://en.wikipedia.org/wiki/Renewal_theory#Inspection_paradox">“Inspection
|
||||
Paradox”</a> is used which happens to produce a value that on average is
|
||||
close to <code>.64</code>. <code>10000</code> instances of this value
|
||||
are computed, added up, and then divided by <code>100</code>. Sometimes
|
||||
the value produced will be <code>63</code> or <code>65</code> instead of
|
||||
<code>64</code> (but I’ve never observed any other values), so the
|
||||
result is then rounded to the nearest multiple of <code>4</code>, and
|
||||
then the other constants are derived from it.</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-1992vern"><a name="inventory"></a>Inventory for
|
||||
1992/vern</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/1992/vern/vern.c">vern.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/vern/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/vern/vern.orig.c">vern.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1992_vern.tar.bz2">1992_vern.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/1992/vern/.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/1992/vern/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/vern/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%2F1992%2Fvern%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 -->
|
||||
+320
-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,332 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1992/westley/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>1992 westley</title>
|
||||
<meta name="description" content="IOCCC year: 1992 IOCCC winner: westley winner index page">
|
||||
<meta name="keywords" content="IOCCC,1992,westley,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>1992/westley</title>
|
||||
<meta name="description" content="1992 IOCCC winner westley">
|
||||
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC winner, westley">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1992 westley</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>1992/westley</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%2F1992%2Fwestley%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1992/westley/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../vern/index.html">← vern</a>
|
||||
<a class="Left" href="../index.html">↑ 1992 ↑</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#Brian_Westley">Brian Westley</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>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: INABIAF - please **DO NOT** fix
|
||||
STATUS: known bug - please help us fix</code></pre>
|
||||
<p>For more detailed information see <a
|
||||
href="/bugs.md#1992-westley">1992 westley in bugs.md</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<p>If lost:</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">./whereami</span> lat long</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="co"># or, if you don't have curses installed:</span></span>
|
||||
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./westley</span> lat long</span></code></pre></div>
|
||||
<p>Where <code>lat</code> and <code>long</code> correspond to your
|
||||
latitude and longitude.</p>
|
||||
<p>NOTE: you <strong>MUST</strong> have a terminal that is at least 80
|
||||
columns for this to show properly. The <code>whereami</code> and
|
||||
<code>whereami.alt</code> code checks this but it is not prohibitive if
|
||||
it cannot be compiled and linked (it uses curses); instead one should
|
||||
just use the <code>westley</code> and <code>westley.alt</code> programs
|
||||
directly.</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">./whereami</span> 47 <span class="at">-122</span> <span class="co"># </span><span class="al">NOTE</span><span class="co">: - means west of meridian</span></span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./whereami</span> 47 122</span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="co"># or if you don't have curses installed:</span></span>
|
||||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./westley</span> 47 <span class="at">-122</span></span>
|
||||
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a><span class="ex">./westley</span> 47 122</span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>The author provided a version for the US which we added. To
|
||||
build:</p>
|
||||
<h3 id="alternate-build">Alternate build:</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="fu">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</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="ex">./whereami.alt</span> lat long</span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="co"># or if you don't have curses installed:</span></span>
|
||||
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./westley.alt</span> lat long</span></code></pre></div>
|
||||
<p>NOTE: this alternative version also needs a terminal with at least 80
|
||||
columns.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>To find the approximate place where this entry was judged, type:</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">./whereami</span> 37 <span class="at">-122</span> <span class="co"># </span><span class="al">NOTE</span><span class="co">: - means west of meridian</span></span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="co"># or if you don't have curses installed:</span></span>
|
||||
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./westley</span> 37 <span class="at">-122</span> <span class="co"># </span><span class="al">NOTE</span><span class="co">: - means west of meridian</span></span></code></pre></div>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>Run the program with your latitude & longitude as integer
|
||||
arguments; it will produce a map made up of <code>'!'</code> with the
|
||||
given position marked with either a <code>'"'</code> (if the position is
|
||||
over a <code>'!'</code>) or a <code>#</code> (if the position is over a
|
||||
space). Southern latitudes and western longitudes are entered as
|
||||
negative numbers. For example, to find San Francisco, run with
|
||||
<code>./whereami 38 -122</code>. The resolution of the map is five
|
||||
degrees horizontally, ten degrees vertically. The map is a Mercator
|
||||
projection with equal spacing of the latitudes, so the areas near the
|
||||
poles are very distorted. Latitudes near the poles and Antarctica are
|
||||
not shown.</p>
|
||||
<p>The program requires the ASCII character set, <code>putchar()</code>,
|
||||
<code>atoi()</code>, and a display that auto-wraps at 80 characters(!).
|
||||
If your display does not work this way, you will have to massage the
|
||||
output; for example, you can redirect it to a file and edit it with vi,
|
||||
which will do auto-wrap for you.</p>
|
||||
<p>Lint complains that <code>main()</code> returns a random value and
|
||||
I’m not checking the value that <code>putchar()</code> returns.
|
||||
Scandalous!</p>
|
||||
<p>If you run it with fewer than 2 arguments, it will likely give you an
|
||||
exception, as it will access arguments that don’t exist and characters
|
||||
before a string constant.</p>
|
||||
<h3 id="how-it-works">How it works:</h3>
|
||||
<p>The map is printed as one long string of <code>' '</code> and
|
||||
<code>'!'</code> characters, with the auto-wrap used to stack up slices
|
||||
of 80. The map data is a string; the first character is how many
|
||||
<code>!</code>s are printed (<code>'A'</code>=1, <code>'B'</code>=2,
|
||||
etc), the second character is how many <code>' '</code>s, the third is
|
||||
how many <code>!</code>s, etc. ASCII characters less than
|
||||
<code>'A'</code> print no characters but still change the polarity, so
|
||||
any map of <code>' '</code>s and <code>'!'</code>s is possible. This is
|
||||
done in the <code>putchar()</code> argument as <code>33^l&1</code>,
|
||||
where <code>l</code> is the character <code>position+4</code>; if
|
||||
<code>l</code> is odd, <code>' '</code> is printed, if <code>l</code> is
|
||||
even, <code>'!'</code> is printed.</p>
|
||||
<p>The position of latitude & longitude is changed into a single
|
||||
character position within the one long string via the first expression
|
||||
<code>d = latitude/10*80 - longitude/5 - offset</code>. The latitude is
|
||||
divided by ten because the vertical resolution is ten degrees, then
|
||||
multiplied by 80 because of the 80 character wrap (i.e. each ten degrees
|
||||
moves the position up or down one entire row). The longitude is divided
|
||||
by five and added, because five degrees of change moves the location one
|
||||
character. The signs are opposite because latitude is decreasing and
|
||||
longitude is increasing as you go from upper left to lower right. The
|
||||
offset is where the origin (latitude=0, longitude=0) is found.</p>
|
||||
<p>The position counting down to zero changes the <code>putchar()</code>
|
||||
from printing (<code>'!'</code> or <code>' '</code>) to printing
|
||||
(<code>'"'</code> or <code>'#'</code>).</p>
|
||||
<p>The <code>"H E L L O, W O R L D!"</code> string inside the data
|
||||
string prints the line of blanks past <a
|
||||
href="https://en.wikipedia.org/wiki/Tierra_del_Fuego">Tierra del
|
||||
Fuego</a> and the last blank line. It’s just for show, really.</p>
|
||||
<p>Since the resolution is coarse, a few coastal cities are shown to be
|
||||
just off the map; this is an unavoidable artifact. The map is reasonably
|
||||
accurate.</p>
|
||||
<h3 id="here-are-some-cities-you-might-like-to-try">Here are some cities
|
||||
you might like to try:</h3>
|
||||
<ul>
|
||||
<li>New York 41 -74<br />
|
||||
</li>
|
||||
<li>London 52 0<br />
|
||||
</li>
|
||||
<li>Moscow 56 38<br />
|
||||
</li>
|
||||
<li>New Delhi 29 77<br />
|
||||
</li>
|
||||
<li>Sydney -34 151</li>
|
||||
<li>Los Angeles 34 -118</li>
|
||||
<li>Paris 45 2</li>
|
||||
<li>Rio de Janeiro -23 -43</li>
|
||||
<li>Beijing 40 116</li>
|
||||
<li>Tokyo 36 140</li>
|
||||
</ul>
|
||||
<p>For a domestic (US) version with higher resolution, try:</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>main<span class="op">(</span>l<span class="op">,</span>a<span class="op">,</span>n<span class="op">,</span>d<span class="op">)</span><span class="dt">char</span><span class="op">**</span>a<span class="op">;{</span><span class="cf">for</span><span class="op">(</span>d<span class="op">=</span>atoi<span class="op">(</span>a<span class="op">[</span><span class="dv">1</span><span class="op">])/</span><span class="dv">2</span><span class="op">*</span><span class="dv">80</span><span class="op">-</span>atoi<span class="op">(</span>a<span class="op">[</span><span class="dv">2</span><span class="op">])-</span><span class="dv">2043</span><span class="op">;</span></span>
|
||||
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a>n<span class="op">=</span><span class="st">"bnaBCOCXdBBHGYdAP[A M E R I C A].AqandkmavX|ELC}BOCd"</span></span>
|
||||
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="op">[</span>l<span class="op">++-</span><span class="dv">3</span><span class="op">];)</span><span class="cf">for</span><span class="op">(;</span>n<span class="op">--></span><span class="dv">64</span><span class="op">;)</span>putchar<span class="op">(!</span>d<span class="op">+++</span><span class="dv">33</span><span class="op">^</span>l<span class="op">&</span><span class="dv">1</span><span class="op">);}</span></span></code></pre></div>
|
||||
<p>The code will test the 80-column wrap and document itself if it is
|
||||
joined together as one 160-character line and listed. You should
|
||||
see:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>main<span class="op">(</span>l<span class="op">,</span>a<span class="op">,</span>n<span class="op">,</span>d<span class="op">)...</span></span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="op">[</span>A M E R I C A<span class="op">]...</span></span></code></pre></div>
|
||||
<p>…going down the left edge if your terminal auto-wraps at 80
|
||||
characters.</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-1992westley"><a name="inventory"></a>Inventory for
|
||||
1992/westley</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/1992/westley/westley.c">westley.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/westley.alt.c">westley.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/westley.alt.orig.c">westley.alt.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/westley.orig.c">westley.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/whereami.alt.sh">whereami.alt.sh</a>
|
||||
- alternative whereami tool</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/whereami.c">whereami.c</a>
|
||||
- tool to find your location on the map</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/whereami.sh">whereami.sh</a>
|
||||
- whereami tool</li>
|
||||
<li><a href="1992_westley.tar.bz2">1992_westley.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/1992/westley/.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/1992/westley/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/westley/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%2F1992%2Fwestley%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