Files
ioccc/1992/nathan/index.html
T
Landon Curt Noll b84c27ce02 set pandoc 8 character tab stops for HTML conversion
We add `--tab-stop=8` to all `pandoc(1)` executions in order to set
a better tab stop indentation, especially for tab intended code blocks.

Changed `bin/pandoc-wrapper.sh` VERSION "1.5.3 2024-03-26"
to "1.6 2024-03-31".

Fixed `1991/brnstnd/sorta.README.md` so that the sorta code
is code blocks.

Removed unneeded paragraph group in copyright in `inc/footer.default.html`.

Performed `make www` to perform the above and test under macOS.
2024-03-31 23:55:08 -07:00

315 lines
16 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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 -->
<!-- END: this line ends content from: inc/top.default.html -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<link rel="stylesheet" href="../../ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>1992/nathan - Worst Abuse of the Rules</title>
<link rel="icon" type="image/x-icon" href="../../favicon.ico">
<meta name="description" content="1992 IOCCC entry nathan - Worst Abuse of the Rules">
<meta name="keywords" content="IOCCC, 1992, IOCCC 1992, IOCCC entry, nathan, Worst Abuse of the Rules">
</head>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- END: this line ends content from: inc/head.default.html -->
<!-- -->
<!-- This web page was formed via the tool: bin/readme2index.sh -->
<!-- The content of main section of this web page came from: 1992/nathan/README.md -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! Do not modify this web page, instead modify the file: 1992/nathan/README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 1992/nathan/README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 1992/nathan/README.md !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- Markdown content was converted into HTML via the tool: bin/md2html.sh -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<div class="header">
<img src="../../png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>1992/nathan - Worst Abuse of the Rules</h2>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.mid.html -->
<div class="topnav">
<a class="Left" href="../marangon/index.html">&larr; marangon</a>
<a class="Left" href="../index.html">&uarr; 1992 &uarr;</a>
<a class="Left" href="../vern/index.html">vern &rarr;</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/1992/nathan/nathan.c">C code</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/1992/nathan/Makefile">Makefile</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="../../index.html">IOCCC Home</a>
<a href="../../years.html">Winning Entries</a>
<a href="../../authors.html">People who have won</a>
<a href="../../location.html">Location of authors</a>
</div>
<hr>
<div class="sidenav">
<a href="../../news.html">IOCCC News</a>
<a href="../../status.html">Contest status</a>
<a href="../../faq.html#submit">How to enter the IOCCC</a>
<a href="../../faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="../../bugs.html">Bugs &amp; (mis)features</a>
<a href="../../faq.html#fix_an_entry">Fixing IOCCC entries</a>
<a href="../../faq.html#fix_web_site">Fixing the web site</a>
<a href="../../faq.html#fix_author">Fixing author info</a>
<a href="../../thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="../../judges.html">The IOCCC Judges</a>
<a href="../../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 for HTML phase 20 by: bin/output-index-author.sh via bin/md2html.sh -->
<!-- START: this line starts content generated by: bin/output-index-author.sh -->
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Nathan_Sidwell">Nathan Sidwell</a><br>
Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great Britain and Northern Ireland</em> (<em>United Kingdom</em>)
<br><br></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
<!-- END: this line ends content for HTML phase 20 by: bin/output-index-author.sh via bin/md2html.sh -->
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./nathan</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="co"># enter some text</span></span></code></pre></div>
<h2 id="try">Try:</h2>
<p>To see some other fun uses:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<h3 id="warning">WARNING:</h3>
<p>The judges make no claim as to the strength or security
of this program. It is likely to be nil, or the next
best thing to it. Still, you might consider installing
it in <code>/usr/games/nathan</code>. :-)</p>
<h3 id="note-from-the-judges-about-the-winning-category">Note from the judges about the winning category::</h3>
<p>The ‘winning’ category is also open to question. One could say
that it is a ‘file obfuscator’. One could also say that it
unintentionally abused the intent of rule #7 (that programs
should be freely re-distributable). We suspect that the author
may not have intended to do this, but that is the way things go
sometimes.</p>
<p>BTW, ‘abuse of the rules’ entries do not violate the rules.
Entries that violate the rules are disqualified. Abuse of the
rules entries are ones that tend to ‘stretch’ the limits and
take the contest into unexpected territory.</p>
<h3 id="historical-notes-from-the-judges-about-this-entry">Historical notes from the judges about this entry:</h3>
<p>The US International Traffic in Arms Regulations controls certain exportations
going out of the United States. The U.S. Munitions List gives the specific
categories of restricted exports. Because this entry at one time appeared to
fall under this restricted category, the judges originally were not able to
distribute some winning entries outside of the US.</p>
<p>Nathan Sidwell stated that he was willing to distribute the winning source. To
read HIS instructions of how to obtain his winning program one was able to run:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> nathan</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./nathan</span></span></code></pre></div>
<p>to learn how to get a copy of the code.</p>
<p>See the 1992/nathan.c file in the
<a href="../../archive/historic/archive-1992.tar.bz2">archive/historic/archive-1992.tar.bz2</a>
tarball if you’re interested in this file.</p>
<h3 id="personal-note-from-chongo">Personal note from chongo:</h3>
<p>I think the situation showed just how ridiculous US crypto regulations really
were/are. Certain US federal officials can get away with shipping arms to
certain nations in apparent violation of US laws, but I personally can’t
re-distribute a program contest entry to the network!</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="program-use">Program use</h3>
<p>This program is a hello world text encryptor/decryptor. It uses an
enigma (I think) style encryption algorithm, where the encryption
key character is modified by a value, determined from the previous
character. Non-printable characters (those with ASCII values &lt; <code>' '</code>
or &gt; <code>0x7e</code>) are passed unaltered, thus any kind of file may be
successfully processed, but if the original is printable, the
processed file will be too. The input is read from <code>stdin</code>, and the
output presented to <code>stdout</code>. The key, a text string, is presented as
a command argument. This is optional, and if omitted, the file is
self-{de,en}crypted. To specify decryption, a <code>-</code> should be given
before the key. (Actually encryption and decryption proper inverse
operations, so you can use decrypt to scramble and encrypt to
descramble, if you’re perverse.)</p>
<h3 id="portability-a-little-knowledge-is-a-dangerous-thing">Portability (A little knowledge is a dangerous thing)</h3>
<p>It’s written in ANSI C, and doesn’t even assume an ASCII character
set, (it has an array of the characters to convert), so should be
portable across many platforms. It passes <code>gcc -ansi -pedantic -O -Wall</code> with no warnings (You may get assignment in conditional
warnings on other platforms though). Because I’ve heard that
conditional jumps slow down fast processors, I’ve eliminated all
the <code>if</code>s from the code; indeed, as its only one statement, it should
compile to one instruction and a suitably designed CISC machine. To
speed compilation, there is only one statement in the loop, so that
another scoping level does not need to be opened.</p>
<p>Being an encryptor/decryptor, you probably want the source code to
be obfuscated, to hide the algorithm.</p>
<h3 id="obfuscation">Obfuscation</h3>
<p>In spite of the fact that it looks like a nice friendly hello world
program, it isn’t (as documented above). (Short lines have been padded,
as you’ll find if you look at an encrypted copy of the source.)</p>
<p>I’ve also named some of the macros from commonly used functions, just to keep
things muddy. Of course, all the variables are misnamed. The program is kept
simply (one for statement), by serious overuse of <code>,</code> and <code>?:</code>. These are really
confusing when used together, nested or put in argument lists (is that a comma
operator, or argument separator?).</p>
<!--
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
-->
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.sh -->
<!-- START: this line starts content generated by: bin/output-index-inventory.sh -->
<h1 id="inventory-for-1992nathan"><a name="inventory"></a>Inventory for 1992/nathan</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/nathan.c">nathan.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/nathan.orig.c">nathan.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/try.sh">try.sh</a> - how to run</li>
<li><a href="1992_nathan.tar.bz2">1992_nathan.tar.bz2</a> - download entry</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/README.md">README.md</a> - markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1992/nathan/.gitignore">.gitignore</a> - list of files that should not be committed under git</li>
<li><a href=".path">.path</a> - directory path from top directory</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
<!-- END: this line ends content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.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 -->
<!--
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
-->
<div class="footer">
<h2>Copyright and CC BY-SA 4.0 License</h2>
<p>This file and web page is:</p>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
<blockquote><a
href="https://creativecommons.org/licenses/by-sa/4.0/">https://creativecommons.org/licenses/by-sa/4.0/</a></blockquote>
<h2>Coda</h2>
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1992%2Fnathan%2Findex.html">Nu HTML check this web page</a></p>
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
</div>
<!-- END: this line ends content from: inc/footer.default.html -->
<!-- START: this line starts content from: inc/bottom.default.html -->
</body>
</html>
<!-- END: this line ends content from: inc/bottom.default.html -->