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.
This commit is contained in:
1 parent
7141a1b808
commit
b84c27ce02
402 files changed
+2414
-2396
No files matched your search
@@ -151,9 +151,9 @@ compile and use an IOCCC entry that requires sound?</a>.</p>
|
||||
<pre><code>STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2018_algmyr">2018 algmyr 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">./prog</span> <span class="op"><</span> prog.c <span class="co"># Print garbage: might mess up your terminal</span></span>
|
||||
<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">./prog</span> <span class="op"><</span> prog.c <span class="co"># Print garbage: might mess up your terminal</span></span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="op"><</span>file1<span class="op">></span> <span class="op"><</span>file2<span class="op">></span> <span class="op">></span> out.raw</span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="at">-d</span> 2 0 out.raw <span class="co"># Decode the first (0th) channel out of two</span></span></code></pre></div>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="at">-d</span> 2 0 out.raw <span class="co"># Decode the first (0th) channel out of two</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></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
@@ -262,11 +262,11 @@ myself. :(</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -330,7 +330,7 @@ myself. :(</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -200,11 +200,11 @@ secondarily to obfuscate.</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -269,7 +269,7 @@ secondarily to obfuscate.</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -216,11 +216,11 @@ the output.</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -288,7 +288,7 @@ the output.</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -332,11 +332,11 @@ the expression within the ternary remains too complex.</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -401,7 +401,7 @@ the expression within the ternary remains too complex.</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -124,77 +124,76 @@
|
||||
|
||||
<p>The values below are the field-by-field difference <code>iocccsize - ioc</code>.
|
||||
(<code>>0</code> means <code>iocccsize</code> counted more than <code>ioc</code>, <code><0</code> <code>ioc</code> counted more)</p>
|
||||
<pre><code>cl: lines, cw: words, cc: chars, ci: rule2, ts: saved, kw: keywords, ks: kw_saved
|
||||
|
||||
cl 0 cw -4 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1986/pawka.c
|
||||
cl -45 cw -55 cc -617 ci -463 ts -85 kw -26 ks -69 src/obc/1990/theorem/theorem.c</code></pre>
|
||||
<p>cl: lines, cw: words, cc: chars, ci: rule2, ts: saved, kw: keywords, ks: kw_saved</p>
|
||||
<p>cl 0 cw -4 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1986/pawka.c
|
||||
cl -45 cw -55 cc -617 ci -463 ts -85 kw -26 ks -69 src/obc/1990/theorem/theorem.c</p>
|
||||
<p><code>ioc</code> is correct; cl is correct even in compat (91) due to comments eating newlines
|
||||
<code>iocccsize</code> fails at <code>z;/*/</code>, eating everything until the following <code>/**/main(</code>
|
||||
looks to be due to mis-identification of a comment closing block as opening block</p>
|
||||
<pre><code>cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1991/westley/westley.c
|
||||
cl 0 cw -3 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1992/gmariano/gmariano.c
|
||||
cl 0 cw -3 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1992/gmariano/gmariano.orig.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1994/shapiro/shapiro.c
|
||||
cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1996/gandalf/gandalf.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1996/schweikh1/schweikh1.c
|
||||
cl 0 cw -2 cc 0 ci -2 ts 0 kw 1 ks 2 src/obc/1998/df/df.c</code></pre>
|
||||
<p>cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1991/westley/westley.c
|
||||
cl 0 cw -3 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1992/gmariano/gmariano.c
|
||||
cl 0 cw -3 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1992/gmariano/gmariano.orig.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1994/shapiro/shapiro.c
|
||||
cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1996/gandalf/gandalf.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/1996/schweikh1/schweikh1.c
|
||||
cl 0 cw -2 cc 0 ci -2 ts 0 kw 1 ks 2 src/obc/1998/df/df.c</p>
|
||||
<p><code>iocccsize</code> counts as keyword <code>__##int##__</code>, and saving two characters but int
|
||||
is not a plausible keyword</p>
|
||||
<pre><code>cl 0 cw -1 cc 3 ci 2 ts 1 kw 0 ks 0 src/obc/2001/herrmann1/herrmann1.c</code></pre>
|
||||
<p>cl 0 cw -1 cc 3 ci 2 ts 1 kw 0 ks 0 src/obc/2001/herrmann1/herrmann1.c</p>
|
||||
<p>the text:</p>
|
||||
<pre><code> d M Y(O)/* state to */
|
||||
d</code></pre>
|
||||
<pre><code> d M Y(O)/* state to */
|
||||
d</code></pre>
|
||||
<p>counts as cw 3 in iocccsize, but this is clearly 4
|
||||
and the cc,ci,ts is due entirely to:</p>
|
||||
<pre><code> /*/*/*/*/*/ /*/*/
|
||||
<pre><code> /*/*/*/*/*/ /*/*/
|
||||
E E /*/*/*/*/*/,/) F</code></pre>
|
||||
<p>which reduces to:</p>
|
||||
<pre><code> * E E * ,/) F</code></pre>
|
||||
<p>but iocccsize counts this as <code>* E E *,/) F</code>, whereas ANSI C says comments are
|
||||
replaced with a single space equivalent (non-portable token-paste with comments)</p>
|
||||
<pre><code>cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2004/arachnid/arachnid.c
|
||||
cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2004/arachnid/arachnid.orig.c
|
||||
cl 0 cw 0 cc 0 ci -4 ts 0 kw 2 ks 4 src/obc/2004/hoyle/hoyle.c
|
||||
cl 0 cw 0 cc 0 ci -4 ts 0 kw 2 ks 4 src/obc/2004/hoyle/hoyle.orig.c</code></pre>
|
||||
<p>cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2004/arachnid/arachnid.c
|
||||
cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2004/arachnid/arachnid.orig.c
|
||||
cl 0 cw 0 cc 0 ci -4 ts 0 kw 2 ks 4 src/obc/2004/hoyle/hoyle.c
|
||||
cl 0 cw 0 cc 0 ci -4 ts 0 kw 2 ks 4 src/obc/2004/hoyle/hoyle.orig.c</p>
|
||||
<p><code>iocccsize</code> counts as two keywords the token-pasted <code>int##if</code>(e.g int1)
|
||||
thus the <code>kw 2</code>, and another bug in <code>iocccsize</code> counts <code>#if</code> as a keyword to 1
|
||||
thus saving 2 bytes on int, and 2 more on <code>#if</code>, when neither is a plausible keyword</p>
|
||||
<pre><code>cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2004/omoikane/omoikane.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2005/chia/chia.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2005/mikeash/mikeash.c
|
||||
cl 0 cw 0 cc 0 ci 1 ts 1 kw 0 ks 0 src/obc/2005/toledo/toledo.c
|
||||
cl 0 cw 0 cc 0 ci 1 ts 1 kw 0 ks 0 src/obc/2005/toledo/toledo2.c
|
||||
cl 0 cw 0 cc 0 ci 1 ts 1 kw 0 ks 0 src/obc/2005/toledo/toledo3.c</code></pre>
|
||||
<p>cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2004/omoikane/omoikane.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2005/chia/chia.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2005/mikeash/mikeash.c
|
||||
cl 0 cw 0 cc 0 ci 1 ts 1 kw 0 ks 0 src/obc/2005/toledo/toledo.c
|
||||
cl 0 cw 0 cc 0 ci 1 ts 1 kw 0 ks 0 src/obc/2005/toledo/toledo2.c
|
||||
cl 0 cw 0 cc 0 ci 1 ts 1 kw 0 ks 0 src/obc/2005/toledo/toledo3.c</p>
|
||||
<p>these three discrepancies are due to backslash-newline of <code>longjm\p</code> –
|
||||
at exactly the 521 byte line length boundary (which is arbitrary)
|
||||
<code>ioc</code> is correct, because it has no line length limit</p>
|
||||
<pre><code>cl 0 cw -4 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2011/akari/akari.c
|
||||
cl 0 cw -7 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2011/hamaji/hamaji.c
|
||||
cl 0 cw -4 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2012/endoh1/endoh1.c
|
||||
cl 0 cw -3 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2012/endoh1/endoh1_color.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2012/endoh1/endoh1_deobfuscate.c
|
||||
cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2012/omoikane/nyaruko.c
|
||||
cl 0 cw 0 cc 0 ci -3 ts 0 kw 1 ks 3 src/obc/2013/cable2/cable2.c</code></pre>
|
||||
<p>cl 0 cw -4 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2011/akari/akari.c
|
||||
cl 0 cw -7 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2011/hamaji/hamaji.c
|
||||
cl 0 cw -4 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2012/endoh1/endoh1.c
|
||||
cl 0 cw -3 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2012/endoh1/endoh1_color.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2012/endoh1/endoh1_deobfuscate.c
|
||||
cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2012/omoikane/nyaruko.c
|
||||
cl 0 cw 0 cc 0 ci -3 ts 0 kw 1 ks 3 src/obc/2013/cable2/cable2.c</p>
|
||||
<p>this is due to token-pasting of <code>_##char</code>; <code>iocccsize</code> counts this as a keyword
|
||||
but it is a pre-processor token-pasted string of the arg to <code>Y()</code> and char
|
||||
rendering this not a keyword, even in disguise</p>
|
||||
<pre><code>cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2013/endoh4/endoh4.c
|
||||
cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2013/misaka/misaka.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2014/endoh2/prog.c
|
||||
cl 0 cw -4 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2014/maffiodo1/prog.c
|
||||
cl 0 cw -4 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2014/maffiodo1/prog.orig.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2014/sinon/prog.c</code></pre>
|
||||
<p>cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2013/endoh4/endoh4.c
|
||||
cl 0 cw -2 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2013/misaka/misaka.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2014/endoh2/prog.c
|
||||
cl 0 cw -4 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2014/maffiodo1/prog.c
|
||||
cl 0 cw -4 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2014/maffiodo1/prog.orig.c
|
||||
cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2014/sinon/prog.c</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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -231,7 +230,7 @@ cl 0 cw -1 cc 0 ci 0 ts 0 kw 0 ks 0 src/obc/2014/sinon/prog.c</co
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
+22
-22
@@ -239,7 +239,7 @@ counting words correctly absent <code>-k</code>.</p>
|
||||
<p>The discrepancies found are documented and explained in the file
|
||||
<a href="discrepancies.html">discrepancies.html</a>.</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">find</span> ~/src/obc <span class="at">-type</span> f <span class="at">-a</span> <span class="at">-name</span> <span class="st">"*.c"</span> <span class="kw">|</span> <span class="fu">xargs</span> ./spotcheck.sh ./prog <span class="kw">|</span> <span class="ex">./spotdiff.sh</span> <span class="kw">|</span></span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">grep</span> <span class="at">-v</span> keep <span class="kw">|</span> <span class="fu">diff</span> <span class="at">-bw</span> <span class="at">-</span> discrep<span class="pp">*</span> <span class="kw">|</span> <span class="fu">grep</span> <span class="st">"[<>] cl "</span></span></code></pre></div>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">grep</span> <span class="at">-v</span> keep <span class="kw">|</span> <span class="fu">diff</span> <span class="at">-bw</span> <span class="at">-</span> discrep<span class="pp">*</span> <span class="kw">|</span> <span class="fu">grep</span> <span class="st">"[<>] cl "</span></span></code></pre></div>
|
||||
<p>In summary, there are only 6 unique entries out of 366 that have any variation
|
||||
in Rule 2 counts; in all cases, the differences are due to bugs within
|
||||
<code>iocccsize</code>, described in detail in the file
|
||||
@@ -303,32 +303,32 @@ language</em>. It really is this easy with <code>tac</code>:</p>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="co">#!/usr/bin/env bash</span></span>
|
||||
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a><span class="va">script</span><span class="op">=</span><span class="st">'</span></span>
|
||||
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a><span class="st">BEGIN {</span></span>
|
||||
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a><span class="st"> last=nl="\n";</span></span>
|
||||
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a><span class="st"> f="c11"; while(getline <f > 0) kw[$0]++; close(f);</span></span>
|
||||
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a><span class="st"> last=nl="\n";</span></span>
|
||||
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a><span class="st"> f="c11"; while(getline <f > 0) kw[$0]++; close(f);</span></span>
|
||||
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a><span class="st">}</span></span>
|
||||
<span id="cb11-7"><a href="#cb11-7" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb11-8"><a href="#cb11-8" aria-hidden="true" tabindex="-1"></a><span class="st">function iskw(a) { return a in kw }</span></span>
|
||||
<span id="cb11-9"><a href="#cb11-9" aria-hidden="true" tabindex="-1"></a><span class="st">function indent(a) { return sprintf("%*s", n*3, " ") }</span></span>
|
||||
<span id="cb11-10"><a href="#cb11-10" aria-hidden="true" tabindex="-1"></a><span class="st">function newline() { if (!infor && last != nl) printf last=nl; }</span></span>
|
||||
<span id="cb11-11"><a href="#cb11-11" aria-hidden="true" tabindex="-1"></a><span class="st">function show(a) {</span></span>
|
||||
<span id="cb11-12"><a href="#cb11-12" aria-hidden="true" tabindex="-1"></a><span class="st"> if (last==nl) printf "%s", indent()</span></span>
|
||||
<span id="cb11-13"><a href="#cb11-13" aria-hidden="true" tabindex="-1"></a><span class="st"> printf "%s%s", space(), a</span></span>
|
||||
<span id="cb11-14"><a href="#cb11-14" aria-hidden="true" tabindex="-1"></a><span class="st"> last=a</span></span>
|
||||
<span id="cb11-12"><a href="#cb11-12" aria-hidden="true" tabindex="-1"></a><span class="st"> if (last==nl) printf "%s", indent()</span></span>
|
||||
<span id="cb11-13"><a href="#cb11-13" aria-hidden="true" tabindex="-1"></a><span class="st"> printf "%s%s", space(), a</span></span>
|
||||
<span id="cb11-14"><a href="#cb11-14" aria-hidden="true" tabindex="-1"></a><span class="st"> last=a</span></span>
|
||||
<span id="cb11-15"><a href="#cb11-15" aria-hidden="true" tabindex="-1"></a><span class="st">}</span></span>
|
||||
<span id="cb11-16"><a href="#cb11-16" aria-hidden="true" tabindex="-1"></a><span class="st">function space() {</span></span>
|
||||
<span id="cb11-17"><a href="#cb11-17" aria-hidden="true" tabindex="-1"></a><span class="st"> return iskw(last) ||</span></span>
|
||||
<span id="cb11-18"><a href="#cb11-18" aria-hidden="true" tabindex="-1"></a><span class="st"> (last ~ /[A-Za-z0-9_+-\/%^[&\]\)=:<>;]$/ && $0 !~ /[:;()\[\],]/) ? " " : ""</span></span>
|
||||
<span id="cb11-17"><a href="#cb11-17" aria-hidden="true" tabindex="-1"></a><span class="st"> return iskw(last) ||</span></span>
|
||||
<span id="cb11-18"><a href="#cb11-18" aria-hidden="true" tabindex="-1"></a><span class="st"> (last ~ /[A-Za-z0-9_+-\/%^[&\]\)=:<>;]$/ && $0 !~ /[:;()\[\],]/) ? " " : ""</span></span>
|
||||
<span id="cb11-19"><a href="#cb11-19" aria-hidden="true" tabindex="-1"></a><span class="st">}</span></span>
|
||||
<span id="cb11-20"><a href="#cb11-20" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb11-21"><a href="#cb11-21" aria-hidden="true" tabindex="-1"></a><span class="st">/^\(/ { ++paren }</span></span>
|
||||
<span id="cb11-22"><a href="#cb11-22" aria-hidden="true" tabindex="-1"></a><span class="st">/^\)/ { --paren }</span></span>
|
||||
<span id="cb11-23"><a href="#cb11-23" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb11-24"><a href="#cb11-24" aria-hidden="true" tabindex="-1"></a><span class="st">/^for/ { newline(); infor=1 }</span></span>
|
||||
<span id="cb11-24"><a href="#cb11-24" aria-hidden="true" tabindex="-1"></a><span class="st">/^for/ { newline(); infor=1 }</span></span>
|
||||
<span id="cb11-25"><a href="#cb11-25" aria-hidden="true" tabindex="-1"></a><span class="st">infor && /^;/ { ++infor; show($0 " "); next }</span></span>
|
||||
<span id="cb11-26"><a href="#cb11-26" aria-hidden="true" tabindex="-1"></a><span class="st">infor==1 && /^:/ { ++infor }</span></span>
|
||||
<span id="cb11-27"><a href="#cb11-27" aria-hidden="true" tabindex="-1"></a><span class="st">infor>1 && paren==0 { infor=0 }</span></span>
|
||||
<span id="cb11-28"><a href="#cb11-28" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb11-29"><a href="#cb11-29" aria-hidden="true" tabindex="-1"></a><span class="st">/^\?/ { tern++; n++; newline(); show($0 " "); next }</span></span>
|
||||
<span id="cb11-29"><a href="#cb11-29" aria-hidden="true" tabindex="-1"></a><span class="st">/^\?/ { tern++; n++; newline(); show($0 " "); next }</span></span>
|
||||
<span id="cb11-30"><a href="#cb11-30" aria-hidden="true" tabindex="-1"></a><span class="st">tern && /^:/ { newline(); show($0); --tern; --n; next }</span></span>
|
||||
<span id="cb11-31"><a href="#cb11-31" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb11-32"><a href="#cb11-32" aria-hidden="true" tabindex="-1"></a><span class="st">/^#/ { newline(); show($0); newline(); next }</span></span>
|
||||
@@ -359,7 +359,7 @@ Clang gets quite irate</em>.</p></li>
|
||||
… | wc</p></li>
|
||||
</ul>
|
||||
<p>Which numbers are most often used?</p>
|
||||
<pre><code> ... | sort -k2nr | sed 5q</code></pre></li>
|
||||
<p>… | sort -k2nr | sed 5q</p></li>
|
||||
<li><p>The code describes its function by careful arrangement of variables up front…</p></li>
|
||||
<li><p>…coupled with a description of the typical IOCCC contestant, or at least the author</p></li>
|
||||
<li><p>Why shouldn’t trigraph parsing be written in trigraph?</p></li>
|
||||
@@ -402,7 +402,7 @@ the IOJCC trash can.</p>
|
||||
which is neither complete (<code>#define</code>, <code>#ifndef</code>, <code>#undef</code> are missing
|
||||
– yes, Virginia knows about <code>#define</code> omitted on purpose),
|
||||
nor correct (many more are added: <code>I</code>, <code>true</code>, <code>bool</code>, <code>compl</code>, …):</p>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="kw">(</span><span class="fu">sed</span> <span class="at">-n</span> <span class="st">'1p'</span> c11<span class="kw">;</span> <span class="fu">sed</span> <span class="at">-n</span> <span class="st">'2,$p'</span> ioccc.kw.freq <span class="kw">|</span> <span class="fu">sort</span><span class="kw">)</span> <span class="kw">|</span> <span class="fu">comm</span> <span class="at">-3</span> <span class="at">-</span> c11</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="kw">(</span><span class="fu">sed</span> <span class="at">-n</span> <span class="st">'1p'</span> c11<span class="kw">;</span> <span class="fu">sed</span> <span class="at">-n</span> <span class="st">'2,$p'</span> ioccc.kw.freq <span class="kw">|</span> <span class="fu">sort</span><span class="kw">)</span> <span class="kw">|</span> <span class="fu">comm</span> <span class="at">-3</span> <span class="at">-</span> c11</span></code></pre></div>
|
||||
<p>That is an obfuscated way to say “diff”. But it also more clearly shows the, um, diffs.</p>
|
||||
<p>The usage string is similarly externalized, providing a better usability string than
|
||||
the limits would otherwise allow. If this is considered bending the rules too far,
|
||||
@@ -430,7 +430,7 @@ for obfuscation. Thus <code>-trigraphs -Wno-trigraphs</code> (which is also humo
|
||||
<p>The code uses <code>unsigned char</code>s, but C strings are <code>signed</code>. Thus <code>-Wno-pointer-sign</code>.
|
||||
NB: This is <em>not</em> a portability concern, the one string holds only printable ASCII characters.</p>
|
||||
<p>Thus:</p>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-ansi</span> <span class="at">-Wall</span> <span class="at">-trigraphs</span> <span class="at">-Wno-trigraphs</span> <span class="at">-Wno-parentheses</span> <span class="at">-Wno-empty-body</span> <span class="at">-Wno-char-subscripts</span> <span class="at">-Wno-pointer-sign</span> <span class="at">-DU</span><span class="op">=</span>O <span class="at">-DW</span><span class="op">=</span><span class="dt">\"</span>keywords<span class="dt">\"</span> <span class="at">-o</span> prog prog.c</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-ansi</span> <span class="at">-Wall</span> <span class="at">-trigraphs</span> <span class="at">-Wno-trigraphs</span> <span class="at">-Wno-parentheses</span> <span class="at">-Wno-empty-body</span> <span class="at">-Wno-char-subscripts</span> <span class="at">-Wno-pointer-sign</span> <span class="at">-DU</span><span class="op">=</span>O <span class="at">-DW</span><span class="op">=</span><span class="dt">\"</span>keywords<span class="dt">\"</span> <span class="at">-o</span> prog prog.c</span></code></pre></div>
|
||||
<h3 id="coda">Coda:</h3>
|
||||
<p><a href="../../authors.html#Cody_Boone_Ferguson">Cody Boone Ferguson</a> was relentless in his pursuit of bugs.
|
||||
Thanks to his reports, the version of <a href="unob.sh">unob.sh</a> is stronger,
|
||||
@@ -443,12 +443,12 @@ works well on most inputs, but tends to need some raw nroff for more fancy
|
||||
constructions, such as combined arguments (e.g. the <code>-r</code> and <code>-s</code> arguments to tac
|
||||
are not recognised when written as <code>-rs</code> in prose).</p>
|
||||
<p>Try:</p>
|
||||
<div class="sourceCode" id="cb15"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./manpage.sh</span> tac</span>
|
||||
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./manpage.sh</span> <span class="at">-h</span></span>
|
||||
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./manpage.sh</span> <span class="at">-h</span> <span class="kw">|</span> <span class="ex">./manpage.sh</span></span>
|
||||
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./manpage.sh</span> <span class="at">-h</span> <span class="kw">|</span> <span class="ex">./manpage.sh</span> <span class="at">-R</span> <span class="kw">|</span> <span class="fu">less</span></span>
|
||||
<span id="cb15-6"><a href="#cb15-6" aria-hidden="true" tabindex="-1"></a><span class="ex">./manpage.sh</span> <span class="at">-h</span> <span class="kw">|</span> <span class="ex">./manpage.sh</span> <span class="at">-P</span> <span class="kw">|</span> <span class="fu">lpr</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./manpage.sh</span> tac</span>
|
||||
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./manpage.sh</span> <span class="at">-h</span></span>
|
||||
<span id="cb14-4"><a href="#cb14-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./manpage.sh</span> <span class="at">-h</span> <span class="kw">|</span> <span class="ex">./manpage.sh</span></span>
|
||||
<span id="cb14-5"><a href="#cb14-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./manpage.sh</span> <span class="at">-h</span> <span class="kw">|</span> <span class="ex">./manpage.sh</span> <span class="at">-R</span> <span class="kw">|</span> <span class="fu">less</span></span>
|
||||
<span id="cb14-6"><a href="#cb14-6" aria-hidden="true" tabindex="-1"></a><span class="ex">./manpage.sh</span> <span class="at">-h</span> <span class="kw">|</span> <span class="ex">./manpage.sh</span> <span class="at">-P</span> <span class="kw">|</span> <span class="fu">lpr</span></span></code></pre></div>
|
||||
<p>NOTE: in 2023 the <code>tac.man</code> was updated to proper man format and renamed
|
||||
<a href="tac.1">tac.1</a>.</p>
|
||||
<!--
|
||||
@@ -457,11 +457,11 @@ are not recognised when written as <code>-rs</code> in prose).</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -575,7 +575,7 @@ are not recognised when written as <code>-rs</code> in prose).</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -363,11 +363,11 @@ to <code>CSILENCE</code>.</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -433,7 +433,7 @@ to <code>CSILENCE</code>.</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -175,11 +175,11 @@ letters that leave the mark and ones that do not?</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -245,7 +245,7 @@ letters that leave the mark and ones that do not?</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -200,11 +200,11 @@ is also used in the opening.</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -270,7 +270,7 @@ is also used in the opening.</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
+48
-48
@@ -741,8 +741,8 @@ as well as some C keywords.</p></li>
|
||||
<div class="sourceCode" id="cb37"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="co">/* Special C main() handler (encapsulation): */</span></span>
|
||||
<span id="cb37-2"><a href="#cb37-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#define r</span><span class="op">(</span><span class="pp">main</span><span class="op">)</span><span class="pp"> main</span></span>
|
||||
<span id="cb37-3"><a href="#cb37-3" aria-hidden="true" tabindex="-1"></a>r<span class="op">(</span>k main<span class="op">(</span>k a<span class="op">,</span> E <span class="op">**</span>V<span class="op">))</span> <span class="op">{</span></span></code></pre></div>
|
||||
<pre><code>It appears to be recursively defined but is it? And is it truly</code></pre>
|
||||
<p>encapsulation? And is it executing code of any kind? It mightn’t seem like it
|
||||
<p>It appears to be recursively defined but is it? And is it truly
|
||||
encapsulation? And is it executing code of any kind? It mightn’t seem like it
|
||||
isn’t encapsulation and also isn’t executing code but assuming it’s
|
||||
encapsulation and executing code is it actually nothing? And if it’s nothing why
|
||||
is it there? If it is something what is it doing? Could it be both? Or maybe it
|
||||
@@ -814,7 +814,7 @@ won’t spoil; yes this ironically and amusingly means I’ve left a rotten egg
|
||||
somewhere!).</p>
|
||||
<p>The Makefile simplifies how to reconfigure this value with the variable
|
||||
<code>MAX_SIZE</code>:</p>
|
||||
<div class="sourceCode" id="cb39"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber MAX_SIZE=55 all</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb38"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber MAX_SIZE=55 all</span></code></pre></div>
|
||||
<p>The next macro that can be reconfigured, <code>M</code> (or <code>MAX_ATTEMPTS</code> in the
|
||||
Makefile), is the maximum attempts before giving up. This was added as another
|
||||
feature in 2024 but it was not made an alt version because there already is an
|
||||
@@ -822,7 +822,7 @@ alt version. This macro allows for seeing what happens when reaching the maximum
|
||||
number attempts without waiting for a very long time.</p>
|
||||
<p>The Makefile simplifies how to reconfigure this value with the variable
|
||||
<code>MAX_ATTEMPTS</code>:</p>
|
||||
<div class="sourceCode" id="cb40"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber MAX_ATTEMPTS=100 all</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb39"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber MAX_ATTEMPTS=100 all</span></code></pre></div>
|
||||
<p>The final macro, <code>N</code> (or <code>OFFSPRING</code> in the Makefile), is the number of offspring
|
||||
per generation.</p>
|
||||
<p>Anything less than 4 will be set to 3 (that’s not a typo!) and this is part of
|
||||
@@ -832,23 +832,23 @@ both individually and together the program will use varying amounts of memory
|
||||
and the larger the values the more memory it’ll require.</p>
|
||||
<p>The Makefile simplifies how to reconfigure this value with the variable
|
||||
<code>OFFSPRING</code>:</p>
|
||||
<div class="sourceCode" id="cb41"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber OFFSPRING=55 all</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb40"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber OFFSPRING=55 all</span></code></pre></div>
|
||||
<h3 id="compilation"><a name="compiling">Compilation</a></h3>
|
||||
<p>Skip to <a href="#portability">Portability</a>.</p>
|
||||
<p>The following options <strong>must always be passed to the compiler:</strong></p>
|
||||
<div class="sourceCode" id="cb42"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a><span class="ex">-DQ=</span><span class="st">'typedef'</span> <span class="at">-D</span><span class="st">'g(o)'</span><span class="op">=</span><span class="st">'goto o;'</span> <span class="at">-D</span><span class="st">'w(x)'</span><span class="op">=</span><span class="st">"x:"</span> <span class="at">-D</span><span class="st">'H(main)'</span><span class="op">=</span><span class="st">'r(main)'</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb41"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true" tabindex="-1"></a><span class="ex">-DQ=</span><span class="st">'typedef'</span> <span class="at">-D</span><span class="st">'g(o)'</span><span class="op">=</span><span class="st">'goto o;'</span> <span class="at">-D</span><span class="st">'w(x)'</span><span class="op">=</span><span class="st">"x:"</span> <span class="at">-D</span><span class="st">'H(main)'</span><span class="op">=</span><span class="st">'r(main)'</span></span></code></pre></div>
|
||||
<p>which running <code>make</code> will always do.</p>
|
||||
<p>If you want to increase the number of offspring to <code>50</code> (<code>N</code>) and the size of the
|
||||
chromosome to <code>75</code> (<code>S</code>) you would do:</p>
|
||||
<div class="sourceCode" id="cb43"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber OFFSPRING=50 MAX_SIZE=75 everything</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb42"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber OFFSPRING=50 MAX_SIZE=75 everything</span></code></pre></div>
|
||||
<p>If you wanted to change <code>N</code> to <code>3</code>:</p>
|
||||
<div class="sourceCode" id="cb44"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb44-1"><a href="#cb44-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber OFFSPRING=3 everything</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb43"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber OFFSPRING=3 everything</span></code></pre></div>
|
||||
<p>Remember that it cannot be less than <code>3</code>; <em>more correctly if it’s less than
|
||||
4 it’s redefined to 3</em> so you could have passed in <code>-DN=2</code> (or <code>MAX_SIZE=2</code>) and have the same
|
||||
result. Remember too that <code>S</code> (<code>MAX_SIZE</code>) cannot be less than <code>38</code>. Both <code>S</code> and
|
||||
<code>N</code> are capped at <code>SIZE_MAX - 1</code> or whatever <code>M</code> (<code>MAX_ATTEMPTS</code>) is set to.</p>
|
||||
<p>If you wanted to change the maximum number attempts to 100 you could do:</p>
|
||||
<div class="sourceCode" id="cb45"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb45-1"><a href="#cb45-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber MAX_ATTEMPTS=100 everything</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb44"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb44-1"><a href="#cb44-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber MAX_ATTEMPTS=100 everything</span></code></pre></div>
|
||||
<h3 id="portability"><a name="portability">Portability</a></h3>
|
||||
<p>Skip to <a href="#bugs">An aside on bugs</a>.</p>
|
||||
<p>This entry requires at least C99 even if you translate digraphs. The program
|
||||
@@ -858,43 +858,43 @@ smaller and this I believe includes <code>SIZE_MAX</code>). I don’t think Wind
|
||||
ports would have many issues (if any) either but I have no way to test this.
|
||||
Originally I tested it on the below systems.</p>
|
||||
<h4 id="fedora-26">Fedora 26:</h4>
|
||||
<div class="sourceCode" id="cb46"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> clang <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
|
||||
<span id="cb46-2"><a href="#cb46-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> version 4.0.1 <span class="er">(</span><span class="ex">tags/RELEASE_401/final</span><span class="kw">)</span></span>
|
||||
<span id="cb46-3"><a href="#cb46-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
|
||||
<span id="cb46-4"><a href="#cb46-4" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="er">(</span><span class="ex">GCC</span><span class="kw">)</span> <span class="ex">7.3.1</span> 20180130 <span class="er">(</span><span class="ex">Red</span> Hat 7.3.1-2<span class="kw">)</span></span>
|
||||
<span id="cb46-5"><a href="#cb46-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> /lib64/libc-2.25.so <span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span><span class="kw">|</span><span class="fu">cut</span> <span class="at">-d</span><span class="st">','</span> <span class="at">-f1-1</span></span>
|
||||
<span id="cb46-6"><a href="#cb46-6" aria-hidden="true" tabindex="-1"></a><span class="ex">GNU</span> C Library <span class="er">(</span><span class="ex">GNU</span> libc<span class="kw">)</span> <span class="ex">stable</span> release version 2.25</span>
|
||||
<span id="cb46-7"><a href="#cb46-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> lscpu <span class="kw">|</span><span class="fu">grep</span> Endian</span>
|
||||
<span id="cb46-8"><a href="#cb46-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Byte</span> Order: Little Endian</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb45"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb45-1"><a href="#cb45-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> clang <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
|
||||
<span id="cb45-2"><a href="#cb45-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> version 4.0.1 <span class="er">(</span><span class="ex">tags/RELEASE_401/final</span><span class="kw">)</span></span>
|
||||
<span id="cb45-3"><a href="#cb45-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
|
||||
<span id="cb45-4"><a href="#cb45-4" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="er">(</span><span class="ex">GCC</span><span class="kw">)</span> <span class="ex">7.3.1</span> 20180130 <span class="er">(</span><span class="ex">Red</span> Hat 7.3.1-2<span class="kw">)</span></span>
|
||||
<span id="cb45-5"><a href="#cb45-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> /lib64/libc-2.25.so <span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span><span class="kw">|</span><span class="fu">cut</span> <span class="at">-d</span><span class="st">','</span> <span class="at">-f1-1</span></span>
|
||||
<span id="cb45-6"><a href="#cb45-6" aria-hidden="true" tabindex="-1"></a><span class="ex">GNU</span> C Library <span class="er">(</span><span class="ex">GNU</span> libc<span class="kw">)</span> <span class="ex">stable</span> release version 2.25</span>
|
||||
<span id="cb45-7"><a href="#cb45-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> lscpu <span class="kw">|</span><span class="fu">grep</span> Endian</span>
|
||||
<span id="cb45-8"><a href="#cb45-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Byte</span> Order: Little Endian</span></code></pre></div>
|
||||
<h4 id="centos-linux-release-7.4.1708-core">CentOS Linux release 7.4.1708 (Core)</h4>
|
||||
<div class="sourceCode" id="cb47"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb47-1"><a href="#cb47-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> clang <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
|
||||
<span id="cb47-2"><a href="#cb47-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> version 3.4.2 <span class="er">(</span><span class="ex">tags/RELEASE_34/dot2-final</span><span class="kw">)</span></span>
|
||||
<span id="cb47-3"><a href="#cb47-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
|
||||
<span id="cb47-4"><a href="#cb47-4" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="er">(</span><span class="ex">GCC</span><span class="kw">)</span> <span class="ex">4.8.5</span> 20150623 <span class="er">(</span><span class="ex">Red</span> Hat 4.8.5-16<span class="kw">)</span></span>
|
||||
<span id="cb47-5"><a href="#cb47-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> /lib64/libc-2.17.so <span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span> <span class="kw">|</span><span class="fu">cut</span> <span class="at">-d,</span> <span class="at">-f1-1</span></span>
|
||||
<span id="cb47-6"><a href="#cb47-6" aria-hidden="true" tabindex="-1"></a><span class="ex">GNU</span> C Library <span class="er">(</span><span class="ex">GNU</span> libc<span class="kw">)</span> <span class="ex">stable</span> release version 2.17</span>
|
||||
<span id="cb47-7"><a href="#cb47-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> lscpu <span class="kw">|</span><span class="fu">grep</span> Endian</span>
|
||||
<span id="cb47-8"><a href="#cb47-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Byte</span> Order: Little Endian</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb46"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> clang <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
|
||||
<span id="cb46-2"><a href="#cb46-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> version 3.4.2 <span class="er">(</span><span class="ex">tags/RELEASE_34/dot2-final</span><span class="kw">)</span></span>
|
||||
<span id="cb46-3"><a href="#cb46-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
|
||||
<span id="cb46-4"><a href="#cb46-4" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="er">(</span><span class="ex">GCC</span><span class="kw">)</span> <span class="ex">4.8.5</span> 20150623 <span class="er">(</span><span class="ex">Red</span> Hat 4.8.5-16<span class="kw">)</span></span>
|
||||
<span id="cb46-5"><a href="#cb46-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> /lib64/libc-2.17.so <span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span> <span class="kw">|</span><span class="fu">cut</span> <span class="at">-d,</span> <span class="at">-f1-1</span></span>
|
||||
<span id="cb46-6"><a href="#cb46-6" aria-hidden="true" tabindex="-1"></a><span class="ex">GNU</span> C Library <span class="er">(</span><span class="ex">GNU</span> libc<span class="kw">)</span> <span class="ex">stable</span> release version 2.17</span>
|
||||
<span id="cb46-7"><a href="#cb46-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> lscpu <span class="kw">|</span><span class="fu">grep</span> Endian</span>
|
||||
<span id="cb46-8"><a href="#cb46-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Byte</span> Order: Little Endian</span></code></pre></div>
|
||||
<h4 id="fedora-27">Fedora 27:</h4>
|
||||
<div class="sourceCode" id="cb48"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb48-1"><a href="#cb48-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> clang <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
|
||||
<span id="cb48-2"><a href="#cb48-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> version 5.0.1 <span class="er">(</span><span class="ex">tags/RELEASE_501/final</span><span class="kw">)</span></span>
|
||||
<span id="cb48-3"><a href="#cb48-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
|
||||
<span id="cb48-4"><a href="#cb48-4" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="er">(</span><span class="ex">GCC</span><span class="kw">)</span> <span class="ex">7.3.1</span> 20180303 <span class="er">(</span><span class="ex">Red</span> Hat 7.3.1-5<span class="kw">)</span></span>
|
||||
<span id="cb48-5"><a href="#cb48-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> /lib64/libc-2.26.so <span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span><span class="kw">|</span><span class="fu">cut</span> <span class="at">-d,</span> <span class="at">-f1-1</span></span>
|
||||
<span id="cb48-6"><a href="#cb48-6" aria-hidden="true" tabindex="-1"></a><span class="ex">GNU</span> C Library <span class="er">(</span><span class="ex">GNU</span> libc<span class="kw">)</span> <span class="ex">stable</span> release version 2.26</span>
|
||||
<span id="cb48-7"><a href="#cb48-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> lscpu <span class="kw">|</span><span class="fu">grep</span> Endian</span>
|
||||
<span id="cb48-8"><a href="#cb48-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Byte</span> Order: Little Endian</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb47"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb47-1"><a href="#cb47-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> clang <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
|
||||
<span id="cb47-2"><a href="#cb47-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> version 5.0.1 <span class="er">(</span><span class="ex">tags/RELEASE_501/final</span><span class="kw">)</span></span>
|
||||
<span id="cb47-3"><a href="#cb47-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
|
||||
<span id="cb47-4"><a href="#cb47-4" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="er">(</span><span class="ex">GCC</span><span class="kw">)</span> <span class="ex">7.3.1</span> 20180303 <span class="er">(</span><span class="ex">Red</span> Hat 7.3.1-5<span class="kw">)</span></span>
|
||||
<span id="cb47-5"><a href="#cb47-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> /lib64/libc-2.26.so <span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span><span class="kw">|</span><span class="fu">cut</span> <span class="at">-d,</span> <span class="at">-f1-1</span></span>
|
||||
<span id="cb47-6"><a href="#cb47-6" aria-hidden="true" tabindex="-1"></a><span class="ex">GNU</span> C Library <span class="er">(</span><span class="ex">GNU</span> libc<span class="kw">)</span> <span class="ex">stable</span> release version 2.26</span>
|
||||
<span id="cb47-7"><a href="#cb47-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> lscpu <span class="kw">|</span><span class="fu">grep</span> Endian</span>
|
||||
<span id="cb47-8"><a href="#cb47-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Byte</span> Order: Little Endian</span></code></pre></div>
|
||||
<h4 id="macos">macOS:</h4>
|
||||
<p>System Version: macOS 10.13.4 (17E199)
|
||||
Kernel Version: Darwin 17.5.0</p>
|
||||
<div class="sourceCode" id="cb49"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb49-1"><a href="#cb49-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">-v</span></span>
|
||||
<span id="cb49-2"><a href="#cb49-2" aria-hidden="true" tabindex="-1"></a><span class="ex">Configured</span> with: <span class="at">--prefix</span><span class="op">=</span>/Library/Developer/CommandLineTools/usr <span class="at">--with-gxx-include-dir</span><span class="op">=</span>/usr/include/c++/4.2.1</span>
|
||||
<span id="cb49-3"><a href="#cb49-3" aria-hidden="true" tabindex="-1"></a><span class="ex">Apple</span> LLVM version 9.1.0 <span class="er">(</span><span class="ex">clang-902.0.39.1</span><span class="kw">)</span></span>
|
||||
<span id="cb49-4"><a href="#cb49-4" aria-hidden="true" tabindex="-1"></a><span class="ex">Target:</span> x86_64-apple-darwin17.5.0</span>
|
||||
<span id="cb49-5"><a href="#cb49-5" aria-hidden="true" tabindex="-1"></a><span class="ex">Thread</span> model: posix</span>
|
||||
<span id="cb49-6"><a href="#cb49-6" aria-hidden="true" tabindex="-1"></a><span class="ex">InstalledDir:</span> /Library/Developer/CommandLineTools/usr/bin</span>
|
||||
<span id="cb49-7"><a href="#cb49-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> uname <span class="at">-srmv</span></span>
|
||||
<span id="cb49-8"><a href="#cb49-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Darwin</span> 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018<span class="kw">;</span> <span class="ex">root:xnu-4570.51.1~1/RELEASE_X86_64</span> x86_64</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb48"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb48-1"><a href="#cb48-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">-v</span></span>
|
||||
<span id="cb48-2"><a href="#cb48-2" aria-hidden="true" tabindex="-1"></a><span class="ex">Configured</span> with: <span class="at">--prefix</span><span class="op">=</span>/Library/Developer/CommandLineTools/usr <span class="at">--with-gxx-include-dir</span><span class="op">=</span>/usr/include/c++/4.2.1</span>
|
||||
<span id="cb48-3"><a href="#cb48-3" aria-hidden="true" tabindex="-1"></a><span class="ex">Apple</span> LLVM version 9.1.0 <span class="er">(</span><span class="ex">clang-902.0.39.1</span><span class="kw">)</span></span>
|
||||
<span id="cb48-4"><a href="#cb48-4" aria-hidden="true" tabindex="-1"></a><span class="ex">Target:</span> x86_64-apple-darwin17.5.0</span>
|
||||
<span id="cb48-5"><a href="#cb48-5" aria-hidden="true" tabindex="-1"></a><span class="ex">Thread</span> model: posix</span>
|
||||
<span id="cb48-6"><a href="#cb48-6" aria-hidden="true" tabindex="-1"></a><span class="ex">InstalledDir:</span> /Library/Developer/CommandLineTools/usr/bin</span>
|
||||
<span id="cb48-7"><a href="#cb48-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> uname <span class="at">-srmv</span></span>
|
||||
<span id="cb48-8"><a href="#cb48-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Darwin</span> 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018<span class="kw">;</span> <span class="ex">root:xnu-4570.51.1~1/RELEASE_X86_64</span> x86_64</span></code></pre></div>
|
||||
<h4 id="an-aside"><a name="bugs">An aside</a></h4>
|
||||
<p>Skip to <a href="#rpm">Installing</a>.</p>
|
||||
<p>Any undocumented bugs are the result of insolent monkeys tampering with any
|
||||
@@ -1013,8 +1013,8 @@ When we found others were actually trying to programs with A, we quickly added
|
||||
additional cryptic features and evolved into B, BCPL, and finally C. We stopped
|
||||
when we got a clean compile on the following syntax:</p>
|
||||
</blockquote>
|
||||
<div class="sourceCode" id="cb50"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb50-1"><a href="#cb50-1" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span><span class="op">(;</span>P<span class="op">(</span><span class="st">"</span><span class="sc">\n</span><span class="st">"</span><span class="op">),</span>R<span class="op">=;</span>P<span class="op">(</span><span class="st">"|"</span><span class="op">))</span><span class="cf">for</span><span class="op">(</span>e<span class="op">=</span>C<span class="op">;</span>e<span class="op">=</span>P<span class="op">(</span><span class="st">"_"</span><span class="op">+(*</span>u<span class="op">++/</span></span>
|
||||
<span id="cb50-2"><a href="#cb50-2" aria-hidden="true" tabindex="-1"></a><span class="dv">8</span><span class="op">)%</span><span class="dv">2</span><span class="op">))</span>P<span class="op">(</span><span class="st">"|"</span><span class="op">+(*</span>u<span class="op">/</span><span class="dv">4</span><span class="op">)%</span><span class="dv">2</span><span class="op">);</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb49"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb49-1"><a href="#cb49-1" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span><span class="op">(;</span>P<span class="op">(</span><span class="st">"</span><span class="sc">\n</span><span class="st">"</span><span class="op">),</span>R<span class="op">=;</span>P<span class="op">(</span><span class="st">"|"</span><span class="op">))</span><span class="cf">for</span><span class="op">(</span>e<span class="op">=</span>C<span class="op">;</span>e<span class="op">=</span>P<span class="op">(</span><span class="st">"_"</span><span class="op">+(*</span>u<span class="op">++/</span></span>
|
||||
<span id="cb49-2"><a href="#cb49-2" aria-hidden="true" tabindex="-1"></a><span class="dv">8</span><span class="op">)%</span><span class="dv">2</span><span class="op">))</span>P<span class="op">(</span><span class="st">"|"</span><span class="op">+(*</span>u<span class="op">/</span><span class="dv">4</span><span class="op">)%</span><span class="dv">2</span><span class="op">);</span></span></code></pre></div>
|
||||
<blockquote>
|
||||
<p>“To think that modern programmers would try to use a language that allowed
|
||||
such a statement was beyond our comprehension! We actually thought of selling
|
||||
@@ -1055,8 +1055,8 @@ person to talk about it with is more than welcome!</em>). Ken suggested that the
|
||||
is a lack of common sense but since he was part of its creation I don’t think
|
||||
it’s a bad thing; <strong>on the contrary it makes all of us C programmers even more
|
||||
talented! :)</strong> I do wonder if he tested that bit of C code though:</p>
|
||||
<div class="sourceCode" id="cb51"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb51-1"><a href="#cb51-1" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span><span class="op">(;</span>P<span class="op">(</span><span class="st">"</span><span class="sc">\n</span><span class="st">"</span><span class="op">),</span>R<span class="op">=;</span>P<span class="op">(</span><span class="st">"|"</span><span class="op">))</span><span class="cf">for</span><span class="op">(</span>e<span class="op">=</span>C<span class="op">;</span>e<span class="op">=</span>P<span class="op">(</span><span class="st">"_"</span><span class="op">+(*</span>u<span class="op">++/</span></span>
|
||||
<span id="cb51-2"><a href="#cb51-2" aria-hidden="true" tabindex="-1"></a><span class="dv">8</span><span class="op">)%</span><span class="dv">2</span><span class="op">))</span>P<span class="op">(</span><span class="st">"|"</span><span class="op">+(*</span>u<span class="op">/</span><span class="dv">4</span><span class="op">)%</span><span class="dv">2</span><span class="op">);</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb50"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb50-1"><a href="#cb50-1" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span><span class="op">(;</span>P<span class="op">(</span><span class="st">"</span><span class="sc">\n</span><span class="st">"</span><span class="op">),</span>R<span class="op">=;</span>P<span class="op">(</span><span class="st">"|"</span><span class="op">))</span><span class="cf">for</span><span class="op">(</span>e<span class="op">=</span>C<span class="op">;</span>e<span class="op">=</span>P<span class="op">(</span><span class="st">"_"</span><span class="op">+(*</span>u<span class="op">++/</span></span>
|
||||
<span id="cb50-2"><a href="#cb50-2" aria-hidden="true" tabindex="-1"></a><span class="dv">8</span><span class="op">)%</span><span class="dv">2</span><span class="op">))</span>P<span class="op">(</span><span class="st">"|"</span><span class="op">+(*</span>u<span class="op">/</span><span class="dv">4</span><span class="op">)%</span><span class="dv">2</span><span class="op">);</span></span></code></pre></div>
|
||||
<p><br />
|
||||
How is <code>R=;</code> valid? Since I don’t have the context maybe there is something
|
||||
I’m missing but either way it’s a funny piece. It could also be for irony itself
|
||||
@@ -1124,11 +1124,11 @@ email but I’m more likely to respond to mastodon messages.</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -1205,7 +1205,7 @@ email but I’m more likely to respond to mastodon messages.</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -163,11 +163,11 @@ further. Nevertheless more information on my entry can be found at
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -204,7 +204,7 @@ further. Nevertheless more information on my entry can be found at
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -190,11 +190,11 @@ so that they are short and easily confused with each other.</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -259,7 +259,7 @@ so that they are short and easily confused with each other.</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
+3
-3
@@ -181,11 +181,11 @@ page is already generated?</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -249,7 +249,7 @@ page is already generated?</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
+3
-3
@@ -198,11 +198,11 @@ See also <a href="../faq.html">the IOCCC FAQ</a> for additional information on t
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -267,7 +267,7 @@ See also <a href="../faq.html">the IOCCC FAQ</a> for additional information on t
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -759,11 +759,11 @@ time…</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -829,7 +829,7 @@ time…</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -242,8 +242,8 @@ questions:</p>
|
||||
<p>Because the rot13 is too easy to decode with the plain eyes, I decided to use
|
||||
the <a href="https://en.wikipedia.org/wiki/Caesar_cipher">Caesar cipher</a> with the key
|
||||
18:</p>
|
||||
<pre><code>Lzw xajkl tsffwj ak wfugvwv mkafy AWWW 754 xdgslk gf dafw 47. Al ak hjaflwv
|
||||
gfdq gf dalldw-wfvasf esuzafwk.</code></pre>
|
||||
<p>Lzw xajkl tsffwj ak wfugvwv mkafy AWWW 754 xdgslk gf dafw 47. Al ak hjaflwv
|
||||
gfdq gf dalldw-wfvasf esuzafwk.</p>
|
||||
<p>If you want to or must know and don’t know how to decipher this, you might look
|
||||
at the <a href="https://www.dcode.fr/caesar-cipher">Caesar cipher decoder</a>. Find the
|
||||
text that says:</p>
|
||||
@@ -256,11 +256,11 @@ Shift/Key (number)</code></pre>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -325,7 +325,7 @@ Shift/Key (number)</code></pre>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -312,11 +312,11 @@ this program has nothing to do with a hand.</p></li>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -383,7 +383,7 @@ this program has nothing to do with a hand.</p></li>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
@@ -255,11 +255,11 @@ will look weird after rotation, for example.</p>
|
||||
|
||||
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)
|
||||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
|
||||
For more information, see:
|
||||
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-->
|
||||
|
||||
@@ -323,7 +323,7 @@ will look weird after rotation, for example.</p>
|
||||
<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>
|
||||
<blockquote><b>Copyright © 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>
|
||||
|
||||
Reference in new issue
Block a user