Files
ioccc/2000/tomx/index.html
T
Cody Boone Ferguson 3783349379 Manifest updates
Typo fixes and change 'download entry source' to 'download entry' as
it's the tarball, not the source itself.

Rebuilt .entry.json and index.html files for all entries.
2024-03-29 08:02:01 -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 -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! 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/top.default.html -->
<!-- -->
<!-- This web page was formed via the tool: bin/readme2index.sh -->
<!-- -->
<!-- The content of main section of this web page came from: 2000/tomx/README.md -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2000/tomx/README.md -->
<!-- !!! Do not modify this web page, instead modify the file: 2000/tomx/README.md -->
<!-- !!! Do not modify this web page, instead modify the file: 2000/tomx/README.md -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- Markdown content was converted into HTML via the tool: bin/md2html.sh -->
<!-- -->
<!-- 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>2000/tomx - Most Complete Program</title>
<meta name="description" content="2000 IOCCC entry tomx - Most Complete Program">
<meta name="keywords" content="IOCCC, 2000, IOCCC 2000, IOCCC entry, tomx, Most Complete Program">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- 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>2000/tomx - Most Complete Program</h2>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.last.html -->
<div class="topnav">
<a class="Left" href="../thadgavin/index.html">&larr; thadgavin</a>
<a class="Left" href="../index.html">&uarr; 2000 &uarr;</a>
<a class="Left Disabled" href="#">last entry</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/2000/tomx/tomx.c">C code</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/2000/tomx/Makefile">Makefile</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="../../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#Thomas_P_John">Thomas P John</a><br>
Location: <a href="../../location.html#NL">NL</a> - <em>Kingdom of the Netherlands</em> (<em>Netherlands</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></span></code></pre></div>
<p>There is an alternate version that compiles <a href="mkentry.c">mkentry.c</a>. See
<a href="#alternate-code">alternate code</a>.</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">./tomx</span></span></code></pre></div>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>This alternate code is based on the author’s remarks with a slight fix so that
it will do what it once did, compile and run <a href="mkentry.c">mkentry.c</a>. You can use
it in a similar way as <a href="tomx.c">tomx.c</a>, both executing the source file and
using it as a Makefile and running the code ends up running <code>mkentry</code>.</p>
<h3 id="alternate-build">Alternate build:</h3>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
<h3 id="alternate-try">Alternate try:</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">./try.alt.sh</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Polyglots have come and gone, but this was the first one we’d seen
where one language <em>used</em> another to perform its tasks. An interesting
approach. Admittedly, it’s not all that obfuscated - but there’s more
to it than you might think, since you have to make sure that your
changes don’t change the shell code or the Makefile.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="summary">Summary</h3>
<p>This program works as a C source file, a Makefile and also as a shell
(<code>/bin/sh</code>) script. But unlike some other multi-language programs, this one is
NOT meant to print <code>Hello, world</code> in all 3 cases (At least in the true sense
;-)). The C, Makefile and shell code build upon each other to create a C program (?)
which when executed as a shell script will compile itself through the C compiler
using a Makefile! - Pretty useful, Eh?</p>
<p>Probably, this is the first entry ever to fully satisfy Rule #1 (“Your entry
must be a complete program”) in the strictest sense;-)</p>
<h3 id="top-5-reasons-imho-why-this-code-is-an-entry-for-ioccc">Top 5 reasons (IMHO) why this code is an entry for IOCCC</h3>
<ol type="1">
<li><p>A glance at the source itself will tell you that most of the
Obfuscation is NOT in the C code per se, but in the comments
to the C code. (But sadly, I could not find an “International
Obfuscated C COMMENT contest”. So I HAD to send this entry
here to the IOCCC itself).</p></li>
<li><p>Of the 3 languages in the source, the least obfuscated is
C (But again, there was NO obfuscated make/shscript contest)
(Does this hint for a rule in IOCCC-2001 that the major
obfuscation should be in C and not elsewhere???. Mmmmm…).</p></li>
<li><p>Extending Argument #2… Obfuscation done in the C code
(comments?) creates obfuscated code for the other 2 languages.
This opens new possibilities to be explored in depth in future
<code>IOCCC</code>s.</p></li>
<li><p>LOOKS like a Makefile, WORKS like a shell script and COMPILES
like a C program.</p></li>
<li><p>Does something useful (See Notes #1 and #2 below).</p></li>
</ol>
<h3 id="notes">Notes</h3>
<ol type="1">
<li>The program could have been something other than the simple “Hello, world”
program that it is. It is possible to do <code>#include "prog2.c"</code> in the place of
the <code>main()</code>, leaving the complexities of the C file elsewhere and making this
source still acceptable to <code>make</code> and <code>sh</code>. The following modification to the
last few lines will compile the IOCCC’s famous <a href="mkentry.c">mkentry.c</a>.</li>
</ol>
<pre><code>.PHONY: /* true clean */
#undef true
#include &quot;mkentry.c&quot;</code></pre>
<p>Ain’t that useful?</p>
<ol start="2" type="1">
<li><p>By extending this program’s idea, It is possible to do some
very interesting things like generating C code on execution
by adding additional code in make/sh (open up a loop????).
This opens the possibilities of generating &amp; compiling some
(obfuscated?) C code. (Maybe should try this if this program
fails at IOCCC 2000)</p></li>
<li><p>Changing the <code>%:%.c</code> dependency to a <code>$(PROG):$(PROG).c</code> form
can compile this program with some other <code>make</code>s (I got it to
work in Windows using nmake and Gnuwin32’s sh ;-) )</p></li>
<li><p>Interesting things to do: try <code>./tomx.c clean</code>. This will
do the same as <code>make clean</code> :-)). Also: <code>./tomx.c all</code></p></li>
<li><p>Be careful about the tabs in the source code. Removing them
or converting tabs to spaces can be disastrous.</p></li>
</ol>
<!--
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-2000tomx"><a name="inventory"></a>Inventory for 2000/tomx</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/2000/tomx/tomx.c">tomx.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/tomx.alt.c">tomx.alt.c</a> - alternative source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/tomx.orig.c">tomx.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/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/2000/tomx/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/mkentry.c">mkentry.c</a> - IOCCC mkentry source from 1998</li>
<li><a href="2000_tomx.tar.bz2">2000_tomx.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/2000/tomx/README.md">README.md</a> - markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/.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></p></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%2F2000%2Ftomx%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 -->