Files
ioccc/1993/schnitzi/index.html
T
Landon Curt Noll cbc022d864 improve Copyright and CC
The inc/footer.default.html now has a common Copyright and CC BY-SA
4.0 License section for all generated HTML files.

All markdown files have a similar Copyright and CC
at the bottom in the form of an HTML comment.
2024-03-20 00:19:52 -07:00

312 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: 1993/schnitzi/README.md -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! Do not modify this web page, instead modify the file: 1993/schnitzi/README.md -->
<!-- !!! Do not modify this web page, instead modify the file: 1993/schnitzi/README.md -->
<!-- !!! Do not modify this web page, instead modify the file: 1993/schnitzi/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>1993/schnitzi - Obfuscated Intelligence Award</title>
<meta name="description" content="1993 IOCCC entry schnitzi - Obfuscated Intelligence Award">
<meta name="keywords" content="IOCCC, 1993, IOCCC 1993, IOCCC entry, schnitzi, Obfuscated Intelligence Award">
</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>1993/schnitzi - Obfuscated Intelligence Award</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="../rince/index.html">&larr; rince</a>
<a class="Left" href="../index.html">&uarr; 1993 &uarr;</a>
<a class="Left" href="../vanb/index.html">vanb &rarr;</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/1993/schnitzi/schnitzi.c">C code</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/1993/schnitzi/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#Mark_Schnitzius">Mark Schnitzius</a><br>
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</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>
<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.html#1993_schnitzi">1993 schnitzi bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schnitzi</span> file</span></code></pre></div>
<p>where</p>
<p><code>file</code> is a file containing some text.</p>
<p>Certain input will cause the program to fail as described
in <a href="../../bugs.html#1993_schnitzi">1993 schnitzi bugs</a>.</p>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schnitzi</span> schnitzi.info</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="co"># ask some questions suggested by the author, noted below</span></span></code></pre></div>
<p>We also suggest you ask the program the following questions:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">Who</span> is Mark Schnitzus<span class="pp">?</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="ex">Who</span> was Jack the Ripper <span class="pp">?</span></span></code></pre></div>
<p>Notice how it still manages to answer the first question despite there being an
intentional spelling error there.</p>
<p>Try feeding the program source to the program and ask both:</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">What</span> is cat <span class="pp">?</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="ex">What</span> is cat<span class="pp">?</span></span></code></pre></div>
<p>What happens if you ask it other questions with and without a space before the
<code>?</code>?</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>After this program prints the contents of ‘file’, ask it
some questions related to the text.</p>
<p>The author suggests the following questions when using
<a href="schnitzi.info">schnitzi.info</a>:</p>
<ul>
<li>Who is Mark Schnitzius?</li>
<li>What exactly does this program do?</li>
<li>What language is it written in?</li>
<li>Has the Loch Ness monster really been captured?</li>
<li>Who was Hitler?</li>
<li>Were the NASA Moon landings faked?</li>
<li>Is it true that Elvis is alive?</li>
<li>Do colorless green ideas sleep furiously?</li>
</ul>
<p>We suggest you try using the body (minus the header and signature line)
of a Usenet article. You might want to try something from alt.flame. :-)</p>
<p>NOTE: If you have certain <code>'</code> in the question this entry might fail.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>I wanted to write a program that would read in a text file in
natural language (such as English) and answer questions about that
text file. I thought this might be a complicated task, and I was
right – it took me over 800 bytes. Of course, it doesn’t always
work, but that’s AI for you.</p>
<p>This program accepts the name of a text file as the first parameter. For
example, to run it on the supplied data file called ‘schnitzi.info’ you would
type <code>./schnitzi schnitzi.info</code>. It echoes the file, then gives you a prompt
where you may type in questions about that text. The more words you use which
are actually present in the text file, the better results you get. You’ll need
to hit <code>ctrl-c</code> to break out of the program. Just hitting <code>return</code> at the
prompt will reprint the paragraph.</p>
<p>If you’re curious as to how it works, I guess you could feed in the
source as the input file and ask “How does this work?” at the prompt,
but I’m not guaranteeing any results…</p>
<h3 id="compilation-notes">Compilation notes</h3>
<ul>
<li><p>The use of <code>strcasecmp(3)</code> may be non-standard. <code>strcmp(3)</code> can be substituted for
it, with a slight performance penalty.</p></li>
<li><p>This program depends on the first command-line parameter, typically called
<code>argv[0]</code>, to hold the name of the executable. It is my understanding that this
property of <code>argv[0]</code> is not guaranteed on some systems.</p></li>
</ul>
<h3 id="obfuscation">Obfuscation</h3>
<ul>
<li><p>It uses a hidden string to test for punctuation.</p></li>
<li><p>The layout, variable names, and expression format have been chosen in such a
way as to cause visual confusion.</p></li>
<li><p>It uses uses external <code>system(3)</code> calls to echo the text file and break up the
question into individual words with a recursive call.</p></li>
<li><p>It uses a clever hack to simulate artificial intelligence.</p></li>
</ul>
<p>The text for the info file, by the way, consists largely of headlines
from the Weekly World News.</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-1993schnitzi"><a name="inventory"></a>Inventory for 1993/schnitzi</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/1993/schnitzi/schnitzi.c">schnitzi.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/schnitzi.orig.c">schnitzi.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/schnitzi.info">schnitzi.info</a> - some interesting statements</li>
<li><a href="1993_schnitzi.tar.bz2">1993_schnitzi.tar.bz2</a> - download entry source</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/1993/schnitzi/README.md">README.md</a> - markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/.gitignore">.gitignore</a> - list of files that should not be committed under git</li>
<li><a href=".path">.path</a> - directory path from top directory</li>
</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%2F1993%2Fschnitzi%2Findex.html">Nu HTML check this web page</a></p>
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
</div>
<!-- END: this line ends content from: inc/footer.default.html -->
<!-- START: this line starts content from: inc/bottom.default.html -->
</body>
</html>
<!-- END: this line ends content from: inc/bottom.default.html -->