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
+209
-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,221 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1989/fubar/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>1989 fubar</title>
|
||||
<meta name="description" content="IOCCC year: 1989 IOCCC winner: fubar winner index page">
|
||||
<meta name="keywords" content="IOCCC,1989,fubar,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>1989/fubar</title>
|
||||
<meta name="description" content="1989 IOCCC winner fubar">
|
||||
<meta name="keywords" content="IOCCC, 1989, IOCCC 1989, IOCCC winner, fubar">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1989 fubar</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>1989/fubar</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%2F1989%2Ffubar%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1989/fubar/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">↑ 1989 ↑</a>
|
||||
<a class="Left" href="../jar.1/index.html">jar.1 →</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#Jay_Vosburgh">Jay Vosburgh</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</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#1989-fubar">1989
|
||||
fubar 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">./fubar</span> <span class="op"><</span>number<span class="op">></span></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 class="co"># run on 1 - 7 </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="ex">./fubar.sh</span> 2 <span class="co"># run via script</span></span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./fubar</span> 2 <span class="co"># run directly</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Run this with a single digit argument (or wait a long time and risk
|
||||
an infinite loop as described in the <a
|
||||
href="/bugs.md#1989-fubar">bugs.md</a> file).</p>
|
||||
<p>The blank line at the beginning of the source is mandatory. Do you
|
||||
know why?</p>
|
||||
<p>NOTE: the file <code>ouroboros.c</code> is created by the program
|
||||
itself so this is why it is not in the repository.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>In a nutshell, this is probably the slowest and most obnoxious
|
||||
factorial program ever written. Unfortunately, the name of the C source
|
||||
must be <code>ouroboros.c</code>; the name is hard-coded into the
|
||||
program.</p>
|
||||
<p>The source is a legal shell script and a legal C program. The shell
|
||||
script compiles itself, and then executes the resulting binary, giving
|
||||
the source as input. The program works by successively modifying #define
|
||||
lines each pass through.</p>
|
||||
<p>Both <code>indent</code> and <code>cb</code> will damage the program,
|
||||
<code>indent</code> much more so.</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-1989fubar"><a name="inventory"></a>Inventory for
|
||||
1989/fubar</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/1989/fubar/fubar.c">fubar.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/fubar/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/fubar/fubar.orig.c">fubar.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/fubar/fubar.sh">fubar.sh</a>
|
||||
- how to run fubar</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/fubar/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1989_fubar.tar.bz2">1989_fubar.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/1989/fubar/.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/1989/fubar/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/fubar/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%2F1989%2Ffubar%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 -->
|
||||
+233
-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,245 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1989/jar.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>1989 jar.1</title>
|
||||
<meta name="description" content="IOCCC year: 1989 IOCCC winner: jar.1 winner index page">
|
||||
<meta name="keywords" content="IOCCC,1989,jar.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>1989/jar.1</title>
|
||||
<meta name="description" content="1989 IOCCC winner jar.1">
|
||||
<meta name="keywords" content="IOCCC, 1989, IOCCC 1989, IOCCC winner, jar.1">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1989 jar.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>1989/jar.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%2F1989%2Fjar.1%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1989/jar.1/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../fubar/index.html">← fubar</a>
|
||||
<a class="Left" href="../index.html">↑ 1989 ↑</a>
|
||||
<a class="Left" href="../jar.2/index.html">jar.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#Jari_Arkko">Jari Arkko</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#SE">SE</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>NOTE: this will run the program itself.</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> clobber all</span></code></pre></div>
|
||||
<p>There is an alternate version with a slight difference that you may
|
||||
wish to try. See the <a href="#alternate-code">Alternate code</a>
|
||||
section below for more details.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./jar.1</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This alternate code, which prints something slightly different, is
|
||||
provided as well.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>NOTE: this will run the program itself.</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./jar.1.alt</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>On many systems the compiler will not allow you to send the object
|
||||
file to <code>/dev/tty</code>. The author suggested:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-c</span> <span class="at">-o</span> /dev/tty jar.1.c</span></code></pre></div>
|
||||
<p>As a last resort the <code>jar.1.sh</code> script provided simulates
|
||||
writing the raw binary of the .o file to the terminal.</p>
|
||||
<p>Abuse of the rules winners usually result in a change of the rules.
|
||||
Starting in 1990, compiling entries must result an regular file which
|
||||
can be executed.</p>
|
||||
<p>Under certain conditions that are dependent on such diverse things
|
||||
such as:</p>
|
||||
<ul>
|
||||
<li>compiler type</li>
|
||||
<li>compiler version</li>
|
||||
<li>libc</li>
|
||||
<li>crt0.o</li>
|
||||
<li>operating system</li>
|
||||
<li>terminal application</li>
|
||||
<li>terminal driver</li>
|
||||
<li>various bugs and misfeatures :-)</li>
|
||||
</ul>
|
||||
<p>the output of raw binary to a terminal can produce various effects
|
||||
from the mildly annoying beeps to missing seeing the important output,
|
||||
to various “ill effects” such as the crashing of the terminal
|
||||
application. Instead we have opted to pipe raw binary thru the strings
|
||||
utility before writing to standard output instead of
|
||||
<code>/dev/tty</code>.</p>
|
||||
<p>As a historical note, the Makefile does echo the original command to
|
||||
standard output, the original shell command that once wrote raw binary
|
||||
to the <code>/dev/tty</code> special file.</p>
|
||||
<p>The use of piping raw binary thru stings makes the original 1989
|
||||
output more apparent, as was the case when using dumb CRT terminals
|
||||
(some do dumb that they couldn’t even process simple ANSI escape
|
||||
sequences) were more common.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program is (supposedly) the smallest C program able to print
|
||||
“Hello world.”. The compilation itself produces the desired printout and
|
||||
the program need not be actually run.</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-1989jar.1"><a name="inventory"></a>Inventory for
|
||||
1989/jar.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/1989/jar.1/jar.1.c">jar.1.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.1/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.1/jar.1.alt.c">jar.1.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.1/jar.1.orig.c">jar.1.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.1/jar.1.alt.sh">jar.1.alt.sh</a>
|
||||
- a method to compile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.1/jar.1.sh">jar.1.sh</a>
|
||||
- a method to compile the alternative source</li>
|
||||
<li><a href="1989_jar.1.tar.bz2">1989_jar.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/1989/jar.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/1989/jar.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/1989/jar.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%2F1989%2Fjar.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 -->
|
||||
+264
-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,276 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1989/jar.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>1989 jar.2</title>
|
||||
<meta name="description" content="IOCCC year: 1989 IOCCC winner: jar.2 winner index page">
|
||||
<meta name="keywords" content="IOCCC,1989,jar.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>1989/jar.2</title>
|
||||
<meta name="description" content="1989 IOCCC winner jar.2">
|
||||
<meta name="keywords" content="IOCCC, 1989, IOCCC 1989, IOCCC winner, jar.2">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1989 jar.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>1989/jar.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%2F1989%2Fjar.2%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1989/jar.2/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../jar.1/index.html">← jar.1</a>
|
||||
<a class="Left" href="../index.html">↑ 1989 ↑</a>
|
||||
<a class="Left" href="../ovdluhe/index.html">ovdluhe →</a>
|
||||
<a class="Right" href="#inventory">Inventory</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/topnav.mid.html -->
|
||||
<!-- START: this line starts content from: inc/begin-row.default.html -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
|
||||
|
||||
<div class="leftcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/sidenav.default.html -->
|
||||
|
||||
<div class="sidenav">
|
||||
<a href="#content">Jump to contents</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
|
||||
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
|
||||
<a href="/temp-test-ioccc/winners.html">People who have won</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
|
||||
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
|
||||
<a href="/temp-test-ioccc/faq.html">FAQ</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/bugs.html">Bugs & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Authors:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Esko_Nuutila">Esko Nuutila</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#FI">FI</a>
|
||||
<br><br>Name: <a href="/temp-test-ioccc/winners.html#Jari_Arkko">Jari
|
||||
Arkko</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#SE">SE</a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Ora_Lassila">Ora Lassila</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>
|
||||
<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">./jar.2</span></span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="ex">[enter</span> some lisp]</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">./jar.2</span> <span class="op"><</span> some_lisp_file</span></code></pre></div>
|
||||
<p>NOTE: this entry will likely segfault on invalid input.</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>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> chocolate_cake.lisp</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">./try.sh</span> try.txt</span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This is the most useful program submitted this year. It is a rather
|
||||
large subset of lisp. It has no error recovery, and performs rather
|
||||
poorly in a number of cases. Even so, placing all this functionality in
|
||||
such a small, densely packed program, is impressive enough to win the
|
||||
Best of show award.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program implements a Lisp interpreter in 1465 bytes of source.
|
||||
Some sophisticated features supported, e.g. functionals and recursion.
|
||||
The special-forms/functions/variables implemented are:</p>
|
||||
<ul>
|
||||
<li>+</li>
|
||||
<li>-</li>
|
||||
<li>*</li>
|
||||
<li><</li>
|
||||
<li>()</li>
|
||||
<li>car</li>
|
||||
<li>cdr</li>
|
||||
<li>cons</li>
|
||||
<li>defun</li>
|
||||
<li>equal</li>
|
||||
<li>function</li>
|
||||
<li>if</li>
|
||||
<li>lambda</li>
|
||||
<li>quote</li>
|
||||
<li>t</li>
|
||||
</ul>
|
||||
<p>Below are sample lisp expressions you might choose to try as input.
|
||||
The program implements a conventional lisp listener, i.e. you type in
|
||||
lisp expressions (followed by CR), the program evaluates them and prints
|
||||
out the return values. End execution by typing an end-of-file
|
||||
character.</p>
|
||||
<div class="sourceCode" id="cb4"><pre
|
||||
class="sourceCode lisp"><code class="sourceCode commonlisp"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>(<span class="op">+</span> <span class="fl">2.5</span> <span class="fl">3.1</span>)</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a>(<span class="kw">defun</span><span class="fu"> fib </span>(n)</span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> (<span class="kw">if</span> (<span class="op"><</span> n <span class="dv">2</span>)</span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="dv">1</span></span>
|
||||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> (<span class="op">+</span> (fib (<span class="op">-</span> n <span class="dv">2</span>)) (fib (<span class="op">-</span> n <span class="dv">1</span>)))))</span>
|
||||
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a>(fib <span class="dv">10</span>)</span>
|
||||
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a>(<span class="kw">defun</span><span class="fu"> </span>! (x) (<span class="kw">if</span> (<span class="kw">equal</span> x <span class="dv">0</span>) <span class="dv">1</span> (<span class="op">*</span> x (! (<span class="op">-</span> x <span class="dv">1</span>)))))</span>
|
||||
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a>(! <span class="dv">7</span>)</span>
|
||||
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a>(<span class="kw">defun</span><span class="fu"> fn1 </span>(fn) (<span class="op">+</span> (fn <span class="dv">1</span> <span class="dv">2</span>) (fn <span class="dv">3</span> <span class="dv">4</span>)))</span>
|
||||
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a>(<span class="kw">defun</span><span class="fu"> fn2 </span>(a b) (<span class="op">+</span> a b))</span>
|
||||
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a>(fn1 (<span class="kw">function</span> <span class="op">+</span>))</span>
|
||||
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a>(fn1 (<span class="kw">function</span> fn2))</span>
|
||||
<span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a>(fn1 (<span class="kw">function</span> (<span class="kw">lambda</span> (z1 z2) (<span class="op">+</span> z1 z2))))</span>
|
||||
<span id="cb4-14"><a href="#cb4-14" aria-hidden="true" tabindex="-1"></a>(<span class="kw">quote</span> a)</span>
|
||||
<span id="cb4-15"><a href="#cb4-15" aria-hidden="true" tabindex="-1"></a>(<span class="kw">cons</span> (<span class="kw">quote</span> (a b)) (<span class="kw">quote</span> (c d e)))</span>
|
||||
<span id="cb4-16"><a href="#cb4-16" aria-hidden="true" tabindex="-1"></a>(<span class="kw">cons</span> (<span class="kw">quote</span> (f)) ())</span>
|
||||
<span id="cb4-17"><a href="#cb4-17" aria-hidden="true" tabindex="-1"></a>(<span class="kw">car</span> (<span class="kw">quote</span> (a b c)))</span>
|
||||
<span id="cb4-18"><a href="#cb4-18" aria-hidden="true" tabindex="-1"></a>(<span class="kw">cdr</span> (<span class="kw">cdr</span> (<span class="kw">quote</span> (g h i))))</span></code></pre></div>
|
||||
<p>Please do not leave any whitespace before the first parenthesis when
|
||||
you type your input, or any other unnecessary whitespace. Please try to
|
||||
avoid any undefined variables or functions, wrong number of arguments
|
||||
etc. All these errors are likely to dump core (i.e. there are no error
|
||||
checks in the program).</p>
|
||||
<p>Traditional Lisp implementations use cons cells as the main data
|
||||
structure. Lists are organized of pointer chains of these cells. In this
|
||||
program, an alternate representation was chosen: <code>char*'</code>s.
|
||||
All list operations, including the ones in the interpreter, are made
|
||||
using string representations of the lists. These operations must count
|
||||
parentheses and skip whitespace. This leads to extremely poor
|
||||
performance!</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-1989jar.2"><a name="inventory"></a>Inventory for
|
||||
1989/jar.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/1989/jar.2/jar.2.c">jar.2.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.2/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.2/jar.2.orig.c">jar.2.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.2/chocolate_cake.lisp">chocolate_cake.lisp</a>
|
||||
- input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.2/fib.lisp">fib.lisp</a>
|
||||
- input file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.2/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/jar.2/try.txt">try.txt</a>
|
||||
- input file</li>
|
||||
<li><a href="1989_jar.2.tar.bz2">1989_jar.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/1989/jar.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/1989/jar.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/1989/jar.2/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%2F1989%2Fjar.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 -->
|
||||
+230
-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,242 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1989/ovdluhe/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>1989 ovdluhe</title>
|
||||
<meta name="description" content="IOCCC year: 1989 IOCCC winner: ovdluhe winner index page">
|
||||
<meta name="keywords" content="IOCCC,1989,ovdluhe,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>1989/ovdluhe</title>
|
||||
<meta name="description" content="1989 IOCCC winner ovdluhe">
|
||||
<meta name="keywords" content="IOCCC, 1989, IOCCC 1989, IOCCC winner, ovdluhe">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1989 ovdluhe</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>1989/ovdluhe</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%2F1989%2Fovdluhe%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1989/ovdluhe/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../jar.2/index.html">← jar.2</a>
|
||||
<a class="Left" href="../index.html">↑ 1989 ↑</a>
|
||||
<a class="Left" href="../paul/index.html">paul →</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#Oskar_von_der_Luehe">Oskar von der
|
||||
Luehe</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>To get this to compile with a modern CPP, we had to replace
|
||||
<code>#D</code> with <code>#define</code>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<p>Run the program this way:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./ovdluhe</span> <span class="op"><</span> textfile</span></code></pre></div>
|
||||
<p>The program stops when it reaches the end of the template buffer by
|
||||
chance or is killed.</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 class="kw">;</span> <span class="fu">sleep</span> 2 <span class="kw">;</span> <span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>The author suggested that one varies the definition of <code>P</code>
|
||||
from 2 through 10. As it’s a <code>#define</code> it’s easy to set
|
||||
up.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> P=9 clobber alt</span></code></pre></div>
|
||||
<p>You do not have to define <code>P</code> but if you do you can
|
||||
replace the value with whatever you wish, as long as it’s a positive
|
||||
<code>int</code> (or evaluates to a positive <code>int</code> like the
|
||||
default <code>(A<<AP)</code> does). Too high a value will likely
|
||||
cause the program to fail and a negative value will cause a compilation
|
||||
error.</p>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./ovdluhe.alt</span></span></code></pre></div>
|
||||
<h3 id="alternate-try">Alternate try:</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">./try.alt.sh</span></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="va">P</span><span class="op">=</span>5 <span class="ex">./try.alt.sh</span></span></code></pre></div>
|
||||
<p>NOTE: if you specify too high a value for <code>P</code> the program
|
||||
might fail. If you specify a value < 0 it will fail to compile.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Run this program using your favorite text file as input. Files such
|
||||
as mailboxes, man pages and usenet articles are especially recommended.
|
||||
You will get different output each time you run it.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program implements an “Eddington ape” - it generates random text
|
||||
from a supplied template. The template text file is read through stdin.
|
||||
The larger the template, the better the result. A maximum of
|
||||
<code>2**12</code> chars are used. From the template, the program
|
||||
calculates the statistics of chars that immediately follow a given
|
||||
string (correlator string) of a certain length (currently 4 - can be
|
||||
varied by changing the definition for P accordingly). A character is
|
||||
randomly chosen, weighted by its probability to occur after the
|
||||
correlator string. That character is printed to stdout and placed at the
|
||||
end of the correlator string, whose first character is discarded.
|
||||
Meaningful words are therefore usually preserved, the effect on
|
||||
sentences can be dramatically random.</p>
|
||||
<p>You might want to vary the definition of P between 2 and 10 and
|
||||
observe the result.</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-1989ovdluhe"><a name="inventory"></a>Inventory for
|
||||
1989/ovdluhe</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/1989/ovdluhe/ovdluhe.c">ovdluhe.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/ovdluhe/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/ovdluhe/ovdluhe.alt.c">ovdluhe.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/ovdluhe/ovdluhe.orig.c">ovdluhe.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/ovdluhe/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/1989/ovdluhe/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1989_ovdluhe.tar.bz2">1989_ovdluhe.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/1989/ovdluhe/.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/1989/ovdluhe/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/ovdluhe/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%2F1989%2Fovdluhe%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 -->
|
||||
+275
-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,287 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1989/paul/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>1989 paul</title>
|
||||
<meta name="description" content="IOCCC year: 1989 IOCCC winner: paul winner index page">
|
||||
<meta name="keywords" content="IOCCC,1989,paul,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>1989/paul</title>
|
||||
<meta name="description" content="1989 IOCCC winner paul">
|
||||
<meta name="keywords" content="IOCCC, 1989, IOCCC 1989, IOCCC winner, paul">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1989 paul</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>1989/paul</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%2F1989%2Fpaul%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1989/paul/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../ovdluhe/index.html">← ovdluhe</a>
|
||||
<a class="Left" href="../index.html">↑ 1989 ↑</a>
|
||||
<a class="Left" href="../robison/index.html">robison →</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#Paul_E_Black">Paul E. Black</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#US">US</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<p>There is an alternate version with a trace routine that the author
|
||||
had commented out. See <a href="#alternate-code">alternate code</a>
|
||||
below for more details.</p>
|
||||
<h2 id="try">Try:</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">./paul</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This version was described by the author like:</p>
|
||||
<blockquote>
|
||||
<p>I could have squeezed the program under 1024 bytes without the trace
|
||||
subroutine, but I felt it was important for understanding the program.
|
||||
Besides it is fun to watch the tape zooming back and forth as the
|
||||
program runs. A much better debugger or trace could easily be added.</p>
|
||||
</blockquote>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./paul.alt</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The author’s comments is a detailed program explanation and spoiler.
|
||||
If you want a real challenge, don’t read any further and try to
|
||||
understand the program via the source.</p>
|
||||
<h3 id="historical-note">Historical note:</h3>
|
||||
<p>The original source contained a long line which caused many mailers
|
||||
to barf. The original file may be re-constructed by removing the
|
||||
trailing <code>\</code> on line 12 and joining lines 12 and 13 together
|
||||
without a space.</p>
|
||||
<p>However as this is no longer a problem the trailing <code>\</code>
|
||||
has been restored in all versions, both the original and the fixed for
|
||||
modern systems version.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This programs computes and prints Fibonacci numbers by simulating a
|
||||
Turing machine with the proper program. Understanding the C program,
|
||||
i.e., a Turing machine simulator, is only the first and simplest step.
|
||||
The Turing machine program must be understood, too! (it is trivial,
|
||||
perhaps even natural to write incredibly obscure Turing programs.)</p>
|
||||
<p>If the program is invoked with an operand, the operand is used as the
|
||||
Turing program. It includes a “trace” facility, subroutine
|
||||
<code>r</code> (commented out for obscurity), to help write and debug
|
||||
Turing programs. Just the thing for some fun in a Theory of Computation
|
||||
class.</p>
|
||||
<p>The Turing machine tape is represented as a doubly linked list of
|
||||
pointers. The forward and backward links are <code>XOR</code>ed together
|
||||
and stored in one pointer. If we always keep one of the links on hand,
|
||||
we can recover the other link at any time. The variable <code>q</code>
|
||||
is the scan head (and a pointer at some tape cell), and <code>p</code>
|
||||
is a “previous” link. The state of the tape is stored in the low order
|
||||
bit of the pointer. Since we always allocate an even number of bytes,
|
||||
the low order bit carries no information (see <a
|
||||
href="#portability">portability</a> below.) Memory representing a tape
|
||||
cell is allocated when the cell is first scanned. Thus the simulation
|
||||
begins with a tape effectively the size of virtual memory set to all
|
||||
zeros. Since a header can be added to any Turing program to write
|
||||
initial data and position the scan head, this is little loss of
|
||||
generality.</p>
|
||||
<p>The simulated Turing machine has a single tape with either a
|
||||
<code>1</code> or a <code>0</code> in each cell. The Turing machine
|
||||
language format is a string of three bytes. The first byte is the
|
||||
current state. The second byte is the next state. (The last bit of
|
||||
states is ignored, i.e., <code>B</code> and <code>C</code> are the same
|
||||
state, in an attempt to be able to have interesting words in the
|
||||
program.) The third byte is composed of bits. Bit <code>1</code>
|
||||
(<code>2&byte</code>) is the symbol scanned, i.e. an instruction is
|
||||
selected for state and for a match with the symbol under the scan head.
|
||||
Bit <code>2</code> (<code>4&byte</code>) is the new symbol to be
|
||||
written to the cell. Bit <code>3</code> (<code>8&byte</code>) is the
|
||||
direction to move the scan head: <code>0</code> for left and
|
||||
<code>1</code> for right. If bit <code>4</code>
|
||||
(<code>16&byte</code>) is true, the next character is sent to
|
||||
<code>stdout</code>. (I added this feature so programs could print
|
||||
results.)</p>
|
||||
<p>The Turing machine has next state <code>j</code> when it begins. The
|
||||
cycle is (1) exit if the state is <code>x</code>, (2) find the next
|
||||
instruction (given the state and the character under the scan head).
|
||||
(The program string is searched forward for the next matching
|
||||
instruction. If the end of the string is reached, the search begins
|
||||
again at the first of the string. Thus states can be used as local
|
||||
labels in different places.) (3) change to the next state, (4) print a
|
||||
character if indicated, (5) write the tape symbol, and (6) move the scan
|
||||
head. The cycle then repeats with step 1. A call to the trace routine is
|
||||
just before step 2, but is commented out.</p>
|
||||
<h3 id="quick-outline-of-the-turing-program">Quick outline of the Turing
|
||||
program:</h3>
|
||||
<p>The previous and current Fibonacci numbers are kept in base 1 form
|
||||
with the current on the right. The first three steps set up the first
|
||||
two numbers, <code>1</code> and <code>1</code>. Then [beginning with
|
||||
<code>@ (</code>] a marker of <code>III</code> is created and the
|
||||
current number is copied to the right of the marker. Then (beginning
|
||||
with <code>OV</code>) the number is converted to binary by repeatedly
|
||||
dividing by 2 leaving I for remainder <code>1</code>, and II for
|
||||
remainder <code>0</code>. Next (beginning with <code>WV</code>) the
|
||||
binary representation is printed and its symbols and the marker are
|
||||
erased. Finally (beginning with <code>EEn</code>) the two numbers are
|
||||
added and the current number copied to the left to become the previous.
|
||||
Then the cycle repeats.</p>
|
||||
<h3 id="portability">Portability</h3>
|
||||
<p>The program requires that the lowest bit of a pointer to be 0.</p>
|
||||
<p>I could have squeezed the program under 1024 bytes without the trace
|
||||
subroutine, but I felt it was important for understanding the program.
|
||||
Besides it is fun to watch the tape zooming back and forth as the
|
||||
program runs. A much better debugger or trace could easily be added.</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-1989paul"><a name="inventory"></a>Inventory for
|
||||
1989/paul</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/1989/paul/paul.c">paul.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/paul/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/paul/paul.alt.c">paul.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/paul/paul.orig.c">paul.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1989_paul.tar.bz2">1989_paul.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/1989/paul/.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/1989/paul/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/paul/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%2F1989%2Fpaul%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 -->
|
||||
+230
-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,242 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1989/robison/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>1989 robison</title>
|
||||
<meta name="description" content="IOCCC year: 1989 IOCCC winner: robison winner index page">
|
||||
<meta name="keywords" content="IOCCC,1989,robison,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>1989/robison</title>
|
||||
<meta name="description" content="1989 IOCCC winner robison">
|
||||
<meta name="keywords" content="IOCCC, 1989, IOCCC 1989, IOCCC winner, robison">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1989 robison</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>1989/robison</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%2F1989%2Frobison%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1989/robison/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../paul/index.html">← paul</a>
|
||||
<a class="Left" href="../index.html">↑ 1989 ↑</a>
|
||||
<a class="Left" href="../roemer/index.html">roemer →</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#Arch_D_Robison">Arch D.
|
||||
Robison</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#1989-robison">1989 robison 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">./robison</span></span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="co"># enter valid expressions</span></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">./robison</span></span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">11x10</span></span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="co"># enter other expressions</span></span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span>
|
||||
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> 100 / 100 <span class="kw">|</span> <span class="ex">./robison</span> <span class="co"># <-- what happens here ?</span></span></code></pre></div>
|
||||
<p>NOTE: This program will very likely crash or break into tiny bits :-)
|
||||
if you feed it numbers with non-binary digits. This, as you might notice
|
||||
if you try one of the above commands, can happen with other input as
|
||||
well. If you wish to understand why this happens check the source
|
||||
code.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Sites with punch card facilities will be happy to note that the
|
||||
source deck can be re-collated with an ASCII sort.</p>
|
||||
<p>Note that this program uses only a small subset of the constructs
|
||||
that the C language supports.</p>
|
||||
<p>For an interesting document on APL, see <a
|
||||
href="https://computerhistory.org/blog/the-apl-programming-language-source-code/"
|
||||
class="uri">https://computerhistory.org/blog/the-apl-programming-language-source-code/</a>.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program is a handy picoAPL interpreter written in
|
||||
<code>C--</code>. It outputs the evaluation of an <a
|
||||
href="https://en.wikipedia.org/wiki/APL_(programming_language)">APL</a>
|
||||
expression from standard input. Functions are limited to dyadic
|
||||
<code>+</code>,<code>-</code>,<code>x</code>, and unary <code>-</code>;
|
||||
numerals must be binary. Parentheses may be used for grouping. For
|
||||
example:</p>
|
||||
<pre><code>101x111-100</code></pre>
|
||||
<p>prints:</p>
|
||||
<pre><code>1111</code></pre>
|
||||
<p>That is <code>5x(7-4)</code> is <code>15</code>. (APL groups from
|
||||
right to left.) Extending it to the full APL language should be
|
||||
trivial.</p>
|
||||
<p>The <code>C--</code> language improves the C language by removing
|
||||
superfluous and confusing features: arithmetic, logical operations,
|
||||
shifts, relational operators, address-of, and flow control. In fact, the
|
||||
only expressions retained are function calls, indirection, array
|
||||
assignments, the ‘,’ operator, and <code>sizeof</code>. Despite these
|
||||
restrictions, the <code>C--</code> program does arithmetic on
|
||||
arbitrarily large binary numbers.</p>
|
||||
<p>To obtain a <code>C--</code> reference, simply rip out the irrelevant
|
||||
pages from your K&R C manual. To obtain a <code>C--</code> compiler,
|
||||
simply rip out the irrelevant bytes from your <code>cc</code>
|
||||
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-1989robison"><a name="inventory"></a>Inventory for
|
||||
1989/robison</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/1989/robison/robison.c">robison.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/robison/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/robison/robison.orig.c">robison.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/robison/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1989_robison.tar.bz2">1989_robison.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/1989/robison/.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/1989/robison/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/robison/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%2F1989%2Frobison%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 -->
|
||||
+186
-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,198 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1989/roemer/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>1989 roemer</title>
|
||||
<meta name="description" content="IOCCC year: 1989 IOCCC winner: roemer winner index page">
|
||||
<meta name="keywords" content="IOCCC,1989,roemer,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>1989/roemer</title>
|
||||
<meta name="description" content="1989 IOCCC winner roemer">
|
||||
<meta name="keywords" content="IOCCC, 1989, IOCCC 1989, IOCCC winner, roemer">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1989 roemer</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>1989/roemer</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%2F1989%2Froemer%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1989/roemer/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../robison/index.html">← robison</a>
|
||||
<a class="Left" href="../index.html">↑ 1989 ↑</a>
|
||||
<a class="Left" href="../tromp/index.html">tromp →</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#Roemer_B_Lievaart">Roemer B.
|
||||
Lievaart</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#NL">NL</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h2 id="try">Try:</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">./roemer</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Do you know what this program does? If you do, look again, there is
|
||||
more here than meets the PI.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>Passes lint, but not with the strictest options, for it contains some
|
||||
“null-statements”, as well two identifiers which are, if compilers only
|
||||
take 6 characters, the same. It also uses <code>write(2)</code>, so not
|
||||
totally system independent.</p>
|
||||
<p>You are very much invited to pass this program through a C-beautifier
|
||||
(first strip newlines and tabs, if your <code>cb</code> can’t do
|
||||
that).</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-1989roemer"><a name="inventory"></a>Inventory for
|
||||
1989/roemer</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/1989/roemer/roemer.c">roemer.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/roemer/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/roemer/roemer.orig.c">roemer.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1989_roemer.tar.bz2">1989_roemer.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/1989/roemer/.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/1989/roemer/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/roemer/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%2F1989%2Froemer%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 -->
|
||||
+292
-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,304 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1989/tromp/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>1989 tromp</title>
|
||||
<meta name="description" content="IOCCC year: 1989 IOCCC winner: tromp winner index page">
|
||||
<meta name="keywords" content="IOCCC,1989,tromp,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>1989/tromp</title>
|
||||
<meta name="description" content="1989 IOCCC winner tromp">
|
||||
<meta name="keywords" content="IOCCC, 1989, IOCCC 1989, IOCCC winner, tromp">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1989 tromp</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>1989/tromp</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%2F1989%2Ftromp%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1989/tromp/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../roemer/index.html">← roemer</a>
|
||||
<a class="Left" href="../index.html">↑ 1989 ↑</a>
|
||||
<a class="Left" href="../vanb/index.html">vanb →</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#John_Tromp">John Tromp</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>
|
||||
<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">./tromp</span> [drops_per_sec <span class="pp">[</span><span class="ss">cmd_string</span><span class="pp">]</span>]</span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./tromp</span> 5</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">./tromp</span> 10 <span class="st">"hkl jq"</span></span></code></pre></div>
|
||||
<p>The second command, <code>./tromp 10 "hkl jq"</code>, will set up the
|
||||
keys kind of like vim:</p>
|
||||
<ul>
|
||||
<li>h - left (left)</li>
|
||||
<li>k - rotate (up)</li>
|
||||
<li>l - right (right)</li>
|
||||
<li>j - drop (down)</li>
|
||||
<li>space - pause (space)</li>
|
||||
<li>q - quit (:q)</li>
|
||||
</ul>
|
||||
<p>NOTE: after the game ends a file called <code>HI</code> will be in
|
||||
the directory with the high scores (up to 20 runs saved) so one can see
|
||||
who has the highest score. The file might look like:</p>
|
||||
<pre><code>330 by luser
|
||||
136 by loser
|
||||
100 by winner</code></pre>
|
||||
<p>… or so, where in this case the <a
|
||||
href="https://web.archive.org/web/20181023221954/https://www.chicagotribune.com/news/ct-xpm-2002-07-31-0207310310-story.html">luser
|
||||
is the winner, the loser is in second place and the winner is the
|
||||
loser</a> :-)</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>The author provided an alternate version of the code with some
|
||||
improvements. See the judges’ additional remarks in the author’s
|
||||
remarks, for more details.</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>
|
||||
<p>Use <code>tromp.alt</code> as you would <code>tromp</code> above.</p>
|
||||
<p>NOTE: testing more than one user updating the high score file, one of
|
||||
the benefits of the alt version, has not been done.</p>
|
||||
<p>The original unmodified alternate code, which will no longer work
|
||||
right if it even compiles, is provided later in the author’s
|
||||
remarks.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This is a character terminal version of the <code>TETRIS</code> game.
|
||||
It runs on a VT100 compatible terminal or emulator. It is best used at
|
||||
4800 baud or more.</p>
|
||||
<p>By default, <code>drops_per_sec</code>, the number of times a
|
||||
tetrimino will drop in a second, is 2. The default
|
||||
<code>cmd_string</code> is <code>jkl pq</code>. The first 6 characters
|
||||
of <code>cmd_string</code> relate to the following 6 game commands:</p>
|
||||
<ul>
|
||||
<li>j - left</li>
|
||||
<li>k - rotate</li>
|
||||
<li>l - right</li>
|
||||
<li>space - drop</li>
|
||||
<li>p - pause</li>
|
||||
<li>q - quit</li>
|
||||
</ul>
|
||||
<p>Specifying <code>cmd_string</code> allows one to redefine the
|
||||
commands. The pause command pauses the game, clears the screen and
|
||||
prints the current score. To resume, type the pause character again,
|
||||
which by default is <code>p</code>.</p>
|
||||
<p>As was stated last year, we are likely to be more strict about
|
||||
portability in the future. [ We mean it this time :-) ]</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program plays the familiar game of <code>TETRIS</code> with the
|
||||
following features:</p>
|
||||
<ul>
|
||||
<li><p>outputs vt100-like escape-sequences for cursor positioning and
|
||||
normal/reverse video in curses like fashion (minimal output for screen
|
||||
updates)</p></li>
|
||||
<li><p>continuously increasing speed (except in pause)</p></li>
|
||||
<li><p>start speed selectable by giving <code>n</code> as first
|
||||
argument, where <code>n</code> is the number of drops per second
|
||||
(default=2).</p></li>
|
||||
<li><p>controls also selectable by giving as the second argument a
|
||||
string of 6 characters. By default they are
|
||||
<code>jkl pq</code>.</p></li>
|
||||
<li><p>screen is blanked during the pause and the score is
|
||||
shown</p></li>
|
||||
<li><p>maintains a high-score table</p></li>
|
||||
</ul>
|
||||
<p>Giving a full path name for the table will result in a system-wide
|
||||
high-score allowing a competition between users.</p>
|
||||
<h3 id="additional-remarks-from-the-judges">Additional remarks from the
|
||||
judges:</h3>
|
||||
<p>The author provided us with the following notes and new version of
|
||||
the program:</p>
|
||||
<p>Here is a somewhat improved version of my tetris entry. All the
|
||||
changes are in the <code>popen()</code> at the end. Formerly a move was
|
||||
done to the HI score file which is not permitted for other users. Now
|
||||
other users can change the <code>HI</code> score file. The extra option
|
||||
<code>-m</code> is passed to sort, so that it knows that its input files
|
||||
are already sorted. The <code>-o</code> output option of sort is used
|
||||
instead of a temporary file.</p>
|
||||
<p>You may also want to consider giving just the raw option to
|
||||
<code>stty</code> at the start and <code>-raw</code> at the end. This
|
||||
further reduces the size of the program, but has the possible
|
||||
disadvantage that the program can only by stopped by ‘q’ or by the `kill
|
||||
-9’ command.</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="dt">long</span> h<span class="op">[</span><span class="dv">4</span><span class="op">];</span>t<span class="op">(){</span>h<span class="op">[</span><span class="dv">3</span><span class="op">]-=</span>h<span class="op">[</span><span class="dv">3</span><span class="op">]/</span><span class="dv">3000</span><span class="op">;</span>setitimer<span class="op">(</span><span class="dv">0</span><span class="op">,</span>h<span class="op">,</span><span class="dv">0</span><span class="op">);}</span>c<span class="op">,</span>d<span class="op">,</span>l<span class="op">,</span>v<span class="op">[]={(</span><span class="dt">int</span><span class="op">)</span>t<span class="op">,</span><span class="dv">0</span><span class="op">,</span><span class="dv">2</span><span class="op">},</span>w<span class="op">,</span>s<span class="op">,</span>I<span class="op">,</span>K</span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="op">=</span><span class="dv">0</span><span class="op">,</span>i<span class="op">=</span><span class="dv">276</span><span class="op">,</span>j<span class="op">,</span>k<span class="op">,</span>q<span class="op">[</span><span class="dv">276</span><span class="op">],</span>Q<span class="op">[</span><span class="dv">276</span><span class="op">],*</span>n<span class="op">=</span>q<span class="op">,*</span>m<span class="op">,</span>x<span class="op">=</span><span class="dv">17</span><span class="op">,</span>f<span class="op">[]={</span><span class="dv">7</span><span class="op">,-</span><span class="dv">13</span><span class="op">,-</span><span class="dv">12</span><span class="op">,</span><span class="dv">1</span><span class="op">,</span><span class="dv">8</span><span class="op">,-</span><span class="dv">11</span><span class="op">,-</span><span class="dv">12</span><span class="op">,-</span><span class="dv">1</span><span class="op">,</span><span class="dv">9</span><span class="op">,-</span><span class="dv">1</span><span class="op">,</span><span class="dv">1</span><span class="op">,</span></span>
|
||||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="dv">12</span><span class="op">,</span><span class="dv">3</span><span class="op">,-</span><span class="dv">13</span><span class="op">,-</span><span class="dv">12</span><span class="op">,-</span><span class="dv">1</span><span class="op">,</span><span class="dv">12</span><span class="op">,-</span><span class="dv">1</span><span class="op">,</span><span class="dv">11</span><span class="op">,</span><span class="dv">1</span><span class="op">,</span><span class="dv">15</span><span class="op">,-</span><span class="dv">1</span><span class="op">,</span><span class="dv">13</span><span class="op">,</span><span class="dv">1</span><span class="op">,</span><span class="dv">18</span><span class="op">,-</span><span class="dv">1</span><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">0</span><span class="op">,-</span><span class="dv">12</span><span class="op">,-</span><span class="dv">1</span><span class="op">,</span><span class="dv">11</span><span class="op">,</span><span class="dv">1</span><span class="op">,-</span><span class="dv">12</span><span class="op">,</span><span class="dv">1</span><span class="op">,</span><span class="dv">13</span><span class="op">,</span><span class="dv">10</span><span class="op">,-</span><span class="dv">12</span><span class="op">,</span></span>
|
||||
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> <span class="dv">1</span><span class="op">,</span><span class="dv">12</span><span class="op">,</span><span class="dv">11</span><span class="op">,-</span><span class="dv">12</span><span class="op">,-</span><span class="dv">1</span><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">12</span><span class="op">,-</span><span class="dv">1</span><span class="op">,</span><span class="dv">12</span><span class="op">,</span><span class="dv">13</span><span class="op">,-</span><span class="dv">12</span><span class="op">,</span><span class="dv">12</span><span class="op">,</span><span class="dv">13</span><span class="op">,</span><span class="dv">14</span><span class="op">,-</span><span class="dv">11</span><span class="op">,-</span><span class="dv">1</span><span class="op">,</span><span class="dv">1</span><span class="op">,</span><span class="dv">4</span><span class="op">,-</span><span class="dv">13</span><span class="op">,-</span><span class="dv">12</span><span class="op">,</span><span class="dv">12</span><span class="op">,</span><span class="dv">16</span><span class="op">,-</span><span class="dv">11</span><span class="op">,-</span><span class="dv">12</span><span class="op">,</span></span>
|
||||
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> <span class="dv">12</span><span class="op">,</span><span class="dv">17</span><span class="op">,-</span><span class="dv">13</span><span class="op">,</span><span class="dv">1</span><span class="op">,-</span><span class="dv">1</span><span class="op">,</span><span class="dv">5</span><span class="op">,-</span><span class="dv">12</span><span class="op">,</span><span class="dv">12</span><span class="op">,</span><span class="dv">11</span><span class="op">,</span><span class="dv">6</span><span class="op">,-</span><span class="dv">12</span><span class="op">,</span><span class="dv">12</span><span class="op">,</span><span class="dv">24</span><span class="op">};</span>u<span class="op">(){</span><span class="cf">for</span><span class="op">(</span>i<span class="op">=</span><span class="dv">11</span><span class="op">;++</span>i<span class="op"><</span><span class="dv">264</span><span class="op">;)</span><span class="cf">if</span><span class="op">((</span>k<span class="op">=</span>q<span class="op">[</span>i<span class="op">])-</span>Q<span class="op">[</span>i<span class="op">]</span></span>
|
||||
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a> <span class="op">){</span>Q<span class="op">[</span>i<span class="op">]=</span>k<span class="op">;</span><span class="cf">if</span><span class="op">(</span>i<span class="op">-++</span>I<span class="op">||</span>i<span class="op">%</span><span class="dv">12</span><span class="op"><</span><span class="dv">1</span><span class="op">)</span>printf<span class="op">(</span><span class="st">"</span><span class="sc">\033</span><span class="st">[</span><span class="sc">%d</span><span class="st">;</span><span class="sc">%d</span><span class="st">H"</span><span class="op">,(</span>I<span class="op">=</span>i<span class="op">)/</span><span class="dv">12</span><span class="op">,</span>i<span class="op">%</span><span class="dv">12</span><span class="op">*</span><span class="dv">2</span><span class="op">+</span><span class="dv">28</span><span class="op">);</span>printf<span class="op">(</span></span>
|
||||
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a> <span class="st">"</span><span class="sc">\033</span><span class="st">[</span><span class="sc">%d</span><span class="st">m "</span><span class="op">+(</span>K<span class="op">-</span>k<span class="op">?</span><span class="dv">0</span><span class="op">:</span><span class="dv">5</span><span class="op">),</span>k<span class="op">);</span>K<span class="op">=</span>k<span class="op">;}</span>Q<span class="op">[</span><span class="dv">263</span><span class="op">]=</span>c<span class="op">=</span>getchar<span class="op">();}</span>G<span class="op">(</span>b<span class="op">){</span><span class="cf">for</span><span class="op">(</span>i<span class="op">=</span><span class="dv">4</span><span class="op">;</span>i<span class="op">--;)</span><span class="cf">if</span><span class="op">(</span>q<span class="op">[</span>i<span class="op">?</span>b<span class="op">+</span></span>
|
||||
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a> n<span class="op">[</span>i<span class="op">]:</span>b<span class="op">])</span><span class="cf">return</span> <span class="dv">0</span><span class="op">;</span><span class="cf">return</span> <span class="dv">1</span><span class="op">;}</span>g<span class="op">(</span>b<span class="op">){</span><span class="cf">for</span><span class="op">(</span>i<span class="op">=</span><span class="dv">4</span><span class="op">;</span>i<span class="op">--;</span>q<span class="op">[</span>i<span class="op">?</span>x<span class="op">+</span>n<span class="op">[</span>i<span class="op">]:</span>x<span class="op">]=</span>b<span class="op">);}</span>main<span class="op">(</span>C<span class="op">,</span>V<span class="op">,</span>a<span class="op">)</span><span class="dt">char</span><span class="op">*</span></span>
|
||||
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a> <span class="op">*</span>V<span class="op">,*</span>a<span class="op">;{</span>h<span class="op">[</span><span class="dv">3</span><span class="op">]=</span><span class="dv">1000000</span><span class="op">/(</span>l<span class="op">=</span>C<span class="op">></span><span class="dv">1</span><span class="op">?</span>atoi<span class="op">(</span>V<span class="op">[</span><span class="dv">1</span><span class="op">]):</span><span class="dv">2</span><span class="op">);</span><span class="cf">for</span><span class="op">(</span>a<span class="op">=</span>C<span class="op">></span><span class="dv">2</span><span class="op">?</span>V<span class="op">[</span><span class="dv">2</span><span class="op">]:</span><span class="st">"jkl pq"</span><span class="op">;</span>i<span class="op">;</span>i<span class="op">--)*</span>n<span class="op">++=</span>i<span class="op"><</span></span>
|
||||
<span id="cb6-10"><a href="#cb6-10" aria-hidden="true" tabindex="-1"></a> <span class="dv">25</span><span class="op">||</span>i<span class="op">%</span><span class="dv">12</span><span class="op"><</span><span class="dv">2</span><span class="op">?</span><span class="dv">7</span><span class="op">:</span><span class="dv">0</span><span class="op">;</span>srand<span class="op">(</span>getpid<span class="op">());</span>system<span class="op">(</span><span class="st">"stty cbreak -echo stop u"</span><span class="op">);</span>sigvec<span class="op">(</span><span class="dv">14</span><span class="op">,</span>v<span class="op">,</span></span>
|
||||
<span id="cb6-11"><a href="#cb6-11" aria-hidden="true" tabindex="-1"></a> <span class="dv">0</span><span class="op">);</span>t<span class="op">();</span>puts<span class="op">(</span><span class="st">"</span><span class="sc">\033</span><span class="st">[H</span><span class="sc">\033</span><span class="st">[J"</span><span class="op">);</span><span class="cf">for</span><span class="op">(</span>n<span class="op">=</span>f<span class="op">+</span>rand<span class="op">()%</span><span class="dv">7</span><span class="op">*</span><span class="dv">4</span><span class="op">;;</span>g<span class="op">(</span><span class="dv">7</span><span class="op">),</span>u<span class="op">(),</span>g<span class="op">(</span><span class="dv">0</span><span class="op">)){</span><span class="cf">if</span><span class="op">(</span>c<span class="op"><</span><span class="dv">0</span><span class="op">){</span><span class="cf">if</span><span class="op">(</span>G<span class="op">(</span>x<span class="op">+</span></span>
|
||||
<span id="cb6-12"><a href="#cb6-12" aria-hidden="true" tabindex="-1"></a> <span class="dv">12</span><span class="op">))</span>x<span class="op">+=</span><span class="dv">12</span><span class="op">;</span><span class="cf">else</span><span class="op">{</span>g<span class="op">(</span><span class="dv">7</span><span class="op">);++</span>w<span class="op">;</span><span class="cf">for</span><span class="op">(</span>j<span class="op">=</span><span class="dv">0</span><span class="op">;</span>j<span class="op"><</span><span class="dv">252</span><span class="op">;</span>j<span class="op">=</span><span class="dv">12</span><span class="op">*(</span>j<span class="op">/</span><span class="dv">12</span><span class="op">+</span><span class="dv">1</span><span class="op">))</span><span class="cf">for</span><span class="op">(;</span>q<span class="op">[++</span>j<span class="op">];)</span><span class="cf">if</span><span class="op">(</span>j<span class="op">%</span><span class="dv">12</span><span class="op">==</span><span class="dv">10</span><span class="op">){</span></span>
|
||||
<span id="cb6-13"><a href="#cb6-13" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span><span class="op">(;</span>j<span class="op">%</span><span class="dv">12</span><span class="op">;</span>q<span class="op">[</span>j<span class="op">--]=</span><span class="dv">0</span><span class="op">);</span>u<span class="op">();</span><span class="cf">for</span><span class="op">(;--</span>j<span class="op">;</span>q<span class="op">[</span>j<span class="op">+</span><span class="dv">12</span><span class="op">]=</span>q<span class="op">[</span>j<span class="op">]);</span>u<span class="op">();}</span>n<span class="op">=</span>f<span class="op">+</span>rand<span class="op">()%</span><span class="dv">7</span><span class="op">*</span><span class="dv">4</span><span class="op">;</span>G<span class="op">(</span>x<span class="op">=</span><span class="dv">17</span><span class="op">)||(</span>c</span>
|
||||
<span id="cb6-14"><a href="#cb6-14" aria-hidden="true" tabindex="-1"></a> <span class="op">=</span>a<span class="op">[</span><span class="dv">5</span><span class="op">]);}}</span><span class="cf">if</span><span class="op">(</span>c<span class="op">==*</span>a<span class="op">)</span>G<span class="op">(--</span>x<span class="op">)||++</span>x<span class="op">;</span><span class="cf">if</span><span class="op">(</span>c<span class="op">==</span>a<span class="op">[</span><span class="dv">1</span><span class="op">])</span>n<span class="op">=</span>f<span class="op">+</span><span class="dv">4</span><span class="op">**(</span>m<span class="op">=</span>n<span class="op">),</span>G<span class="op">(</span>x<span class="op">)||(</span>n<span class="op">=</span>m<span class="op">);</span><span class="cf">if</span><span class="op">(</span>c<span class="op">==</span>a<span class="op">[</span><span class="dv">2</span><span class="op">])</span>G</span>
|
||||
<span id="cb6-15"><a href="#cb6-15" aria-hidden="true" tabindex="-1"></a> <span class="op">(++</span>x<span class="op">)||--</span>x<span class="op">;</span><span class="cf">if</span><span class="op">(</span>c<span class="op">==</span>a<span class="op">[</span><span class="dv">3</span><span class="op">])</span><span class="cf">for</span><span class="op">(;</span>G<span class="op">(</span>x<span class="op">+</span><span class="dv">12</span><span class="op">);++</span>w<span class="op">)</span>x<span class="op">+=</span><span class="dv">12</span><span class="op">;</span><span class="cf">if</span><span class="op">(</span>c<span class="op">==</span>a<span class="op">[</span><span class="dv">4</span><span class="op">]||</span>c<span class="op">==</span>a<span class="op">[</span><span class="dv">5</span><span class="op">]){</span>s<span class="op">=</span>sigblock<span class="op">(</span></span>
|
||||
<span id="cb6-16"><a href="#cb6-16" aria-hidden="true" tabindex="-1"></a> <span class="dv">8192</span><span class="op">);</span>printf<span class="op">(</span><span class="st">"</span><span class="sc">\033</span><span class="st">[H</span><span class="sc">\033</span><span class="st">[J</span><span class="sc">\033</span><span class="st">[0m</span><span class="sc">%d\n</span><span class="st">"</span><span class="op">,</span>w<span class="op">);</span><span class="cf">if</span><span class="op">(</span>c<span class="op">==</span>a<span class="op">[</span><span class="dv">5</span><span class="op">])</span><span class="cf">break</span><span class="op">;</span><span class="cf">for</span><span class="op">(</span>j<span class="op">=</span><span class="dv">264</span><span class="op">;</span>j<span class="op">--;</span>Q<span class="op">[</span>j<span class="op">]=</span></span>
|
||||
<span id="cb6-17"><a href="#cb6-17" aria-hidden="true" tabindex="-1"></a> <span class="dv">0</span><span class="op">);</span><span class="cf">while</span><span class="op">(</span>getchar<span class="op">()-</span>a<span class="op">[</span><span class="dv">4</span><span class="op">]);</span>puts<span class="op">(</span><span class="st">"</span><span class="sc">\033</span><span class="st">[H</span><span class="sc">\033</span><span class="st">[J</span><span class="sc">\033</span><span class="st">[7m"</span><span class="op">);</span>sigsetmask<span class="op">(</span>s<span class="op">);}}</span>d<span class="op">=</span>popen<span class="op">(</span></span>
|
||||
<span id="cb6-18"><a href="#cb6-18" aria-hidden="true" tabindex="-1"></a> <span class="st">"stty -cbreak echo stop </span><span class="sc">\023</span><span class="st">;sort -mnr -o HI - HI;cat HI"</span><span class="op">,</span><span class="st">"w"</span><span class="op">);</span>fprintf<span class="op">(</span>d<span class="op">,</span></span>
|
||||
<span id="cb6-19"><a href="#cb6-19" aria-hidden="true" tabindex="-1"></a> <span class="st">"</span><span class="sc">%4d</span><span class="st"> from level </span><span class="sc">%1d</span><span class="st"> by </span><span class="sc">%s\n</span><span class="st">"</span><span class="op">,</span>w<span class="op">,</span>l<span class="op">,</span>getlogin<span class="op">());</span>pclose<span class="op">(</span>d<span class="op">);}</span></span></code></pre></div>
|
||||
<p>NOTE: the alternate version was fixed for modern systems in 2023.</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-1989tromp"><a name="inventory"></a>Inventory for
|
||||
1989/tromp</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/1989/tromp/tromp.c">tromp.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/tromp/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/tromp/tromp.alt.c">tromp.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/tromp/tromp.orig.c">tromp.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1989_tromp.tar.bz2">1989_tromp.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/1989/tromp/.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/1989/tromp/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/tromp/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%2F1989%2Ftromp%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 -->
|
||||
+193
-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,205 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1989/vanb/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>1989 vanb</title>
|
||||
<meta name="description" content="IOCCC year: 1989 IOCCC winner: vanb winner index page">
|
||||
<meta name="keywords" content="IOCCC,1989,vanb,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>1989/vanb</title>
|
||||
<meta name="description" content="1989 IOCCC winner vanb">
|
||||
<meta name="keywords" content="IOCCC, 1989, IOCCC 1989, IOCCC winner, vanb">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1989 vanb</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>1989/vanb</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%2F1989%2Fvanb%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1989/vanb/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../tromp/index.html">← tromp</a>
|
||||
<a class="Left" href="../index.html">↑ 1989 ↑</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#David_Van_Brackle">David Van
|
||||
Brackle</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="try">Try:</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">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This program computes all proper subsets of the set of arguments
|
||||
passed to it. Each subset is printed with one element on each line,
|
||||
followed by a line of ten dashes.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>The program has the following charming and possibly non-portable
|
||||
features:</p>
|
||||
<ul>
|
||||
<li><p>It has no local or global variables, only the command-line
|
||||
parameters.</p></li>
|
||||
<li><p>It calls <code>main()</code> recursively.</p></li>
|
||||
<li><p>It alters the command-line parameters.</p></li>
|
||||
<li><p>It uses the fact that if the high bit is set in a character
|
||||
variable, the value is negative.</p></li>
|
||||
</ul>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1989vanb"><a name="inventory"></a>Inventory for
|
||||
1989/vanb</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/1989/vanb/vanb.c">vanb.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/vanb/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/vanb/vanb.orig.c">vanb.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/vanb/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1989_vanb.tar.bz2">1989_vanb.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/1989/vanb/.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/1989/vanb/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/vanb/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%2F1989%2Fvanb%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 -->
|
||||
+288
-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,300 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1989/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>1989 westley</title>
|
||||
<meta name="description" content="IOCCC year: 1989 IOCCC winner: westley winner index page">
|
||||
<meta name="keywords" content="IOCCC,1989,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>1989/westley</title>
|
||||
<meta name="description" content="1989 IOCCC winner westley">
|
||||
<meta name="keywords" content="IOCCC, 1989, IOCCC 1989, 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>1989 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>1989/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%2F1989%2Fwestley%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1989/westley/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../vanb/index.html">← vanb</a>
|
||||
<a class="Left" href="../index.html">↑ 1989 ↑</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: known bug - please help us fix</code></pre>
|
||||
<p>For more detailed information see <a
|
||||
href="/bugs.md#1989-westley">1989 westley in bugs.md</a>.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>Try compiling and running the 4 resulting programs like:</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">./compile.sh</span></span></code></pre></div>
|
||||
<p>If you need to specify an alternate compiler path, say because your
|
||||
default compiler is clang (or in the case of macOS gcc is clang) you can
|
||||
do so like:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="va">CC</span><span class="op">=</span>/opt/local/bin/gcc-mp-12 <span class="ex">./compile.sh</span></span></code></pre></div>
|
||||
<p>If you wish to delay the script or remove the delay you can do so
|
||||
like:</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="va">DELAY</span><span class="op">=</span>2 <span class="ex">./compile.sh</span></span></code></pre></div>
|
||||
<p>Finally try:</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./westley</span></span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="co"># input some lines of text, sending EOF (usually ctrl-d) to end</span></span>
|
||||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> <span class="co"># demo of some input</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>There is a secret way to get ONE of the versions to print out
|
||||
“<code>Hello, world!\n</code>”. Can you find how to do it?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This is a filter. If it is run with no arguments, it copies
|
||||
<code>stdin</code> to <code>stdout</code>. With one argument, it ROT13’s
|
||||
<code>stdin</code> to <code>stdout</code>. With two arguments, it
|
||||
reverses <code>stdin</code> to <code>stdout</code>. With three
|
||||
arguments, it does both. It requires the ASCII character set, with all
|
||||
characters being in <code>0..255</code>, and <code>EOF</code> must be
|
||||
<code>-1</code>. Also requires two’s complement (I think).</p>
|
||||
<p>The source code will run if ROT13’ed and/or reversed, using a
|
||||
different algorithm for each version (hereafter referred to as
|
||||
<code>ver0</code> (original), <code>ver1</code> (ROT13),
|
||||
<code>ver2</code> (reversed), and <code>ver3</code> (ROT13 and
|
||||
reversed)).</p>
|
||||
<p>When compiling these versions, one needs to define
|
||||
<code>trgpune</code> in the compile line (which the Makefile now has).
|
||||
Example:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Dtrgpune</span><span class="op">=</span>putchar ver3.c <span class="at">-o</span> ver3</span></code></pre></div>
|
||||
<p><code>trgpune</code> is the ROT13 of <code>getchar()</code>, so
|
||||
<code>getchar()</code> and <code>putchar()</code> are exchanged in the
|
||||
ROT13 counterpart. It is easy to see that this is unavoidable. I must
|
||||
have a <code>#define</code> for a library function; otherwise I would
|
||||
have an unidentified extern for the ROT13 version. If I then define this
|
||||
function, it won’t link in the library version for the ORIGINAL code,
|
||||
since my definition will supersede the library function. Hence, the
|
||||
compiler option gives me <code>putchar()</code>, and allows me to use
|
||||
<code>getchar()</code>. I pass a dummy argument to
|
||||
<code>getchar()</code> to eliminate “variable number of args” from lint
|
||||
(unless it checks against the library). Otherwise, all versions of lint
|
||||
complain that <code>main()</code> returns random value & constant in
|
||||
conditional context (when I check for ROT13 version).</p>
|
||||
<p><code>ver0</code> and <code>ver1</code> use a range check and a
|
||||
calculation to do ROT13, while <code>ver2</code> and <code>ver3</code>
|
||||
use table lookup. All versions contain <code>main()</code> and its ROT13
|
||||
function, <code>znva()</code>. <code>ver0</code>/<code>ver1</code>
|
||||
(<code>ver2</code>/<code>ver3</code>) are (of course) syntactically
|
||||
identical, since the syntax is in the non-alphabetic characters.
|
||||
However, since one program starts at <code>main()</code> while it’s
|
||||
ROT13 counterpart starts at <code>znva()</code>, <code>znva()</code>
|
||||
calls main (<code>znva()</code> is also used for output).</p>
|
||||
<p>All versions use recursion to work. If the program is NOT reversing
|
||||
it’s output, it prints out the (possibly ROT13’d) character before
|
||||
recursing, otherwise it prints it out afterward (or doesn’t recurse at
|
||||
all when <code>EOF</code> is reached). Since most of this code is
|
||||
identical, it is put into <code>znva()</code> and called with a first
|
||||
parameter of 0 as a flag (as <code>main()</code>, it’s first argument
|
||||
(argc) must be at least one).</p>
|
||||
<p>I can’t use any flow control. If I used <code>if()</code>, I would
|
||||
have a function <code>vs()</code> to define in the ROT13 version. But a
|
||||
function called <code>vs()</code> turns into a function called
|
||||
<code>if()</code> in the original, so it can’t be done. Therefore, I
|
||||
do:</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>expr1 <span class="op">&&</span> expr2 <span class="op">&&</span> <span class="op">(</span>expr3<span class="op">=</span>etc<span class="op">);</span></span></code></pre></div>
|
||||
<p>which is the same as:</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>expr1 <span class="op">&&</span> expr2<span class="op">)</span> expr3<span class="op">=</span>etc<span class="op">;</span></span></code></pre></div>
|
||||
<p>A/UX on the Macintosh doesn’t get this right; it evaluates ALL
|
||||
expressions if they aren’t in an assignment or conditional statement.
|
||||
This might warrant a warning, since other compilers may do this. I found
|
||||
MANY compilers botched:</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>expr1 <span class="op">&&</span> <span class="op">(</span>expr2<span class="op">,</span>expr3<span class="op">);</span></span></code></pre></div>
|
||||
<p><code>expr2</code> was OFTEN evaluated even if <code>expr1</code> was
|
||||
false. I removed such statements to make it more portable.</p>
|
||||
<h3 id="variable-names-worth-noting">Variable names worth noting</h3>
|
||||
<p><code>irk</code> and <code>vex</code> are ROT13 pairs and are
|
||||
synonyms.</p>
|
||||
<p><code>Near</code> and <code>Arne</code> are ROT13 pairs and are
|
||||
anagrams.</p>
|
||||
<p><code>NOON</code> and <code>ABBA</code> are ROT13 pairs and are
|
||||
palindromes.</p>
|
||||
<p><code>tang</code> and <code>gnat</code> are both ROT13 and palindrome
|
||||
pairs!</p>
|
||||
<p>–</p>
|
||||
<p>Normally (!), a reversible C program is done thus:</p>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="co">/**/</span> forward code <span class="co">/*/ edoc drawkcab /**/</span></span></code></pre></div>
|
||||
<p>If your compiler nests comments, it will get this wrong. However, I
|
||||
have made some bits of the code palindromic, (or different, but
|
||||
reversible) so it is more like:</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="co">/**/</span>forward<span class="co">/*//**/</span> palindromic <span class="co">/**//*/drawkcab/**/</span></span></code></pre></div>
|
||||
<p>The code can therefore be interlaced. There are eight such
|
||||
palindromic bits. You can find them within the
|
||||
<code>/*//**/ /**//*/</code> pairs.</p>
|
||||
<p>The body of the code of <code>ver0</code> and <code>ver1</code> is a
|
||||
large lumpy <code>K</code> (for Kernighan); the code of
|
||||
<code>ver2</code> and <code>ver3</code> is a flat-topped and lumpier
|
||||
<code>R</code> (for Ritchie). Judicious use of spaces and tabs helped
|
||||
here. It barely fits on an 80x24 screen. Squint. Note that the code must
|
||||
start with a blank line, or the reversed version will lack a terminating
|
||||
newline.</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-1989westley"><a name="inventory"></a>Inventory for
|
||||
1989/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/1989/westley/westley.c">westley.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/westley/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/westley/westley.orig.c">westley.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/westley/compile.sh">compile.sh</a>
|
||||
- generate and compile versions</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1989/westley/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1989_westley.tar.bz2">1989_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/1989/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/1989/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/1989/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%2F1989%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