311 lines
18 KiB
HTML
311 lines
18 KiB
HTML
<!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>2011/akari - Best of Show - Most Shrinkable</title>
|
||
<link rel="icon" type="image/x-icon" href="../../favicon.ico">
|
||
<meta name="description" content="2011 IOCCC entry akari - Best of Show - Most Shrinkable">
|
||
<meta name="keywords" content="IOCCC, 2011, IOCCC 2011, IOCCC entry, akari, Best of Show - Most Shrinkable">
|
||
</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: 2011/akari/README.md -->
|
||
<!-- -->
|
||
|
||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||
<!-- !!! Do not modify this web page, instead modify the file: 2011/akari/README.md !!! -->
|
||
<!-- !!! Do not modify this web page, instead modify the file: 2011/akari/README.md !!! -->
|
||
<!-- !!! Do not modify this web page, instead modify the file: 2011/akari/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>2011/akari - Best of Show - Most Shrinkable</h2>
|
||
</div>
|
||
|
||
<!-- END: this line ends content from: inc/header.default.html -->
|
||
<!-- START: this line starts content from: inc/topnav.first.html -->
|
||
|
||
<div class="topnav">
|
||
<a class="Left Disabled" href="#">first entry</a>
|
||
<a class="Left" href="../index.html">↑ 2011 ↑</a>
|
||
<a class="Left" href="../blakely/index.html">blakely →</a>
|
||
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/2011/akari/akari.c">C code</a>
|
||
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/2011/akari/Makefile">Makefile</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="../../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 & (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#Don_Yang">Don Yang</a><br>
|
||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</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>
|
||
<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">./akari</span> [ input_file <span class="kw">|</span> <span class="ex">-</span> ] [ output_file <span class="kw">|</span> <span class="ex">-</span> ] <span class="pp">[</span><span class="ss">even</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">./try.sh</span></span></code></pre></div>
|
||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||
<p><code>Akari</code> is an image downsampling utility that accepts 3 input formats:</p>
|
||
<ul>
|
||
<li><p><a href="https://netpbm.sourceforge.net/doc/pgm.html">PGM</a>
|
||
(<a href="https://netpbm.sourceforge.net/doc/">netpbm</a> <a href="https://en.wikipedia.org/wiki/Grayscale">greyscale
|
||
image</a>. <code>Akari</code> only accepts <code>PGM</code>
|
||
files with the header: <code>P5 <width> <height> 255</code>. Images with extra comments
|
||
<em>such as the ones produced by <a href="https://www.gimp.org">GIMP</a> will <strong>not be parsed
|
||
properly</strong></em>.</p></li>
|
||
<li><p><a href="https://netpbm.sourceforge.net/doc/ppm.html">PPM</a> (netpbm RGB image). Only
|
||
<code>PPM</code> files with the header <code>P6 <width> <height> 255</code> are accepted.</p></li>
|
||
<li><p><a href="https://en.wikipedia.org/wiki/ASCII_art">ASCII art</a> (with <a href="https://en.wikipedia.org/wiki/Newline">end of
|
||
lines</a> in LF bytes only, <em><strong>not</strong> CR-LF</em>!)</p></li>
|
||
</ul>
|
||
<p>Anything that is not parsable as <code>PGM</code> or <code>PPM</code> will be downsampled as ASCII art.</p>
|
||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||
<p><code>Akari</code> is an image downsampling utility. She accepts up to 3 arguments:</p>
|
||
<p>The first argument is the input image. If it’s <code>-</code> or unspecified, <code>Akari</code>
|
||
will read from <code>stdin</code>.</p>
|
||
<p>The second argument is the output image. If it’s <code>-</code> or unspecified,
|
||
<code>Akari</code> will write to <code>stdout</code>.</p>
|
||
<p>The third argument, if specified, causes <code>Akari</code> to keep even pixels on even
|
||
<a href="https://en.wikipedia.org/wiki/Scan_line">scanlines</a>. By default <code>Akari</code> will
|
||
keep odd pixels on odd <a href="https://en.wikipedia.org/wiki/Scan_line">scanlines</a>.</p>
|
||
<h3 id="examples">Examples:</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">gcc</span> akari.c <span class="at">-o</span> akari</span>
|
||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> <span class="op"><</span> example.ppm <span class="op">></span> odd_output.ppm</span>
|
||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> <span class="at">-</span> <span class="at">-</span> even <span class="op"><</span> example.ppm <span class="op">></span> even_output.ppm</span>
|
||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> example.ppm odd_output.ppm</span></code></pre></div>
|
||
<p><code>Akari</code> accepts 3 input formats:</p>
|
||
<ul>
|
||
<li><a href="https://netpbm.sourceforge.net/doc/pgm.html">PGM</a>
|
||
(<a href="https://netpbm.sourceforge.net/doc/">netpbm</a> <a href="https://en.wikipedia.org/wiki/Grayscale">greyscale
|
||
image</a>. <code>Akari</code> only accepts <code>PGM</code>
|
||
files with the header: <code>P5 <width> <height> 255</code>. Images with extra comments
|
||
such as the ones produced by <a href="https://www.gimp.org">GIMP</a> will not be parsed
|
||
properly.
|
||
<a href="https://netpbm.sourceforge.net/doc/ppm.html">PPM</a> (netpbm RGB image). Only
|
||
<code>PPM</code> files with the header <code>P6 <width> <height> 255</code> are accepted.</li>
|
||
<li>ASCII art (with end of lines in LF bytes only, not CR-LF)</li>
|
||
</ul>
|
||
<p>This is useful for decoding some curiously interlaced images, such as
|
||
the included <a href="example.ppm">example.ppm</a>.</p>
|
||
<p>Anything that is not parsable as <code>PGM</code> or <code>PPM</code> will be downsampled as
|
||
ASCII art. Since the source code is formatted as ASCII art, it’s only
|
||
natural to try:</p>
|
||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> akari.c akari2.c</span></code></pre></div>
|
||
<p><code>akari2.c</code> is also a valid C program, and accepts up to 1 argument.
|
||
By default, this second program reads text from <code>stdin</code> and writes
|
||
expanded output to <code>stdout</code>. If the extra argument is specified, the
|
||
output text will also pass through a rot13 filter.</p>
|
||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> akari2.c <span class="at">-o</span> akari2</span>
|
||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari2</span> <span class="op"><</span> input.txt <span class="op">></span> expanded_output.txt</span>
|
||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari2</span> rot13 <span class="op"><</span> input.txt <span class="op">></span> expanded_and_rot13_output.txt</span></code></pre></div>
|
||
<p>You can combine the two programs together to have just a regular rot13
|
||
filter:</p>
|
||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari2</span> rot13 <span class="op"><</span> input.txt <span class="kw">|</span> <span class="ex">./akari</span> <span class="op">></span> rot13.txt</span></code></pre></div>
|
||
<p>Of course, we wouldn’t stop with just 2 programs, you can downsample
|
||
the source <em>again</em> and get yet another C program:</p>
|
||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> <span class="op"><</span> akari.c <span class="kw">|</span> <span class="ex">./akari</span> <span class="op">></span> akari3.c</span></code></pre></div>
|
||
<p>We must go deeper:</p>
|
||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./akari</span> <span class="op"><</span> akari.c <span class="kw">|</span> <span class="ex">./akari</span> <span class="kw">|</span> <span class="ex">./akari</span> <span class="op">></span> akari4.c</span></code></pre></div>
|
||
<p><code>akari3.c</code> and <code>akari4.c</code> are still (mostly valid) C programs.
|
||
<code>gcc -Wall</code> will output a few warnings, but still produce output
|
||
executables. The output executables each print a message to <code>stdout</code>.</p>
|
||
<p>It takes quite a bit of skill and obfuscation to interleave a
|
||
C program 4 levels deep, it’s much easier to interleave something like
|
||
a <code>brainf#$%</code> program in a C program, for example. For comparison, a
|
||
<code>brainf#$%</code> program is embedded inside <a href="akari.c">akari.c</a>.</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-2011akari"><a name="inventory"></a>Inventory for 2011/akari</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/2011/akari/akari.c">akari.c</a> - entry source</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/akari/Makefile">Makefile</a> - entry Makefile</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/akari/akari.orig.c">akari.orig.c</a> - original source</li>
|
||
<li><a href="example.ppm">example.ppm</a> - input image</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/akari/try.sh">try.sh</a> - how to run</li>
|
||
<li><a href="2011_akari.tar.bz2">2011_akari.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/2011/akari/README.md">README.md</a> - markdown source for index.html</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/akari/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2011/akari/.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><p><b>Copyright © 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%2F2011%2Fakari%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 -->
|