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:
Landon Curt Noll committed 2024-03-31 23:55:08 -07:00
1 parent 7141a1b808
commit b84c27ce02
402 files changed
+2414 -2396

No files matched your search

+3 -3
View File
@@ -200,11 +200,11 @@ ends in a smily face: <code>;}</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/
-->
@@ -268,7 +268,7 @@ ends in a smily face: <code>;}</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -182,11 +182,11 @@ fixed version has instead:</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 @@ fixed version has instead:</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -148,11 +148,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/
-->
@@ -206,7 +206,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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+7 -7
View File
@@ -157,11 +157,11 @@ like:</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Some new compilers (in 1984) dislike lines 6 and 10 of the source, so we changed
them from:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="op">;++</span>f<span class="op">)</span>a<span class="op">[</span> b<span class="op">&lt;&lt;</span><span class="dv">5</span><span class="op">|</span>c<span class="op">]</span> <span class="op">=</span>d<span class="op">++,</span>b<span class="op">+</span> <span class="op">=</span>e<span class="op">;</span><span class="cf">for</span><span class="op">(</span> f<span class="op">=</span><span class="dv">0</span><span class="op">;</span>f<span class="op">&lt;</span>O</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="op">&lt;&lt;</span><span class="dv">5</span><span class="op">|</span>c<span class="op">]^</span> <span class="op">=</span>a<span class="op">[</span>b<span class="op">&lt;&lt;</span><span class="dv">5</span> <span class="op">|</span>c<span class="op">]^=</span>a<span class="op">[</span> <span class="op">(</span>k<span class="op">-(</span>b<span class="op">+</span><span class="dv">1</span> <span class="op">))&lt;&lt;</span><span class="dv">5</span><span class="op">|</span>c<span class="op">]</span></span></code></pre></div>
<div class="sourceCode" id="cb4"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="op">;++</span>f<span class="op">)</span>a<span class="op">[</span> b<span class="op">&lt;&lt;</span><span class="dv">5</span><span class="op">|</span>c<span class="op">]</span> <span class="op">=</span>d<span class="op">++,</span>b<span class="op">+</span> <span class="op">=</span>e<span class="op">;</span><span class="cf">for</span><span class="op">(</span> f<span class="op">=</span><span class="dv">0</span><span class="op">;</span>f<span class="op">&lt;</span>O</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="op">&lt;&lt;</span><span class="dv">5</span><span class="op">|</span>c<span class="op">]^</span> <span class="op">=</span>a<span class="op">[</span>b<span class="op">&lt;&lt;</span><span class="dv">5</span> <span class="op">|</span>c<span class="op">]^=</span>a<span class="op">[</span> <span class="op">(</span>k<span class="op">-(</span>b<span class="op">+</span><span class="dv">1</span> <span class="op">))&lt;&lt;</span><span class="dv">5</span><span class="op">|</span>c<span class="op">]</span></span></code></pre></div>
<p>to:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="op">;++</span>f<span class="op">)</span>a<span class="op">[</span> b<span class="op">&lt;&lt;</span><span class="dv">5</span><span class="op">|</span>c<span class="op">]</span> <span class="op">=</span>d<span class="op">++,</span>b<span class="op">+=</span> e<span class="op">;</span><span class="cf">for</span><span class="op">(</span> f<span class="op">=</span><span class="dv">0</span><span class="op">;</span>f<span class="op">&lt;</span>O</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="op">&lt;&lt;</span><span class="dv">5</span><span class="op">|</span>c<span class="op">]^=</span> a<span class="op">[</span>b<span class="op">&lt;&lt;</span><span class="dv">5</span> <span class="op">|</span>c<span class="op">]^=</span>a<span class="op">[</span> <span class="op">(</span>k<span class="op">-(</span>b<span class="op">+</span><span class="dv">1</span> <span class="op">))&lt;&lt;</span><span class="dv">5</span><span class="op">|</span>c<span class="op">]</span></span></code></pre></div>
<div class="sourceCode" id="cb5"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="op">;++</span>f<span class="op">)</span>a<span class="op">[</span> b<span class="op">&lt;&lt;</span><span class="dv">5</span><span class="op">|</span>c<span class="op">]</span> <span class="op">=</span>d<span class="op">++,</span>b<span class="op">+=</span> e<span class="op">;</span><span class="cf">for</span><span class="op">(</span> f<span class="op">=</span><span class="dv">0</span><span class="op">;</span>f<span class="op">&lt;</span>O</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="op">&lt;&lt;</span><span class="dv">5</span><span class="op">|</span>c<span class="op">]^=</span> a<span class="op">[</span>b<span class="op">&lt;&lt;</span><span class="dv">5</span> <span class="op">|</span>c<span class="op">]^=</span>a<span class="op">[</span> <span class="op">(</span>k<span class="op">-(</span>b<span class="op">+</span><span class="dv">1</span> <span class="op">))&lt;&lt;</span><span class="dv">5</span><span class="op">|</span>c<span class="op">]</span></span></code></pre></div>
<p>I hope you have a C beautifier!</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>No remarks were provided by the author.</p>
@@ -171,11 +171,11 @@ them from:</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/
-->
@@ -238,7 +238,7 @@ them from:</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+34 -34
View File
@@ -314,8 +314,8 @@ separate.</p>
<p>The <a href="https://en.wikipedia.org/wiki/Programmed_Data_Processor">PDP</a> and
<a href="https://en.wikipedia.org/wiki/VAX">VAX</a> codes implement the same algorithm:</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> <span class="op">(;;)</span> <span class="op">{</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a> write<span class="op">(</span><span class="dv">1</span><span class="op">,</span> <span class="st">&quot; :-)</span><span class="sc">\b\b\b\b</span><span class="st">&quot;</span><span class="op">,</span> <span class="dv">9</span><span class="op">);</span></span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a> delay<span class="op">();</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a> write<span class="op">(</span><span class="dv">1</span><span class="op">,</span> <span class="st">&quot; :-)</span><span class="sc">\b\b\b\b</span><span class="st">&quot;</span><span class="op">,</span> <span class="dv">9</span><span class="op">);</span></span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a> delay<span class="op">();</span></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span></code></pre></div>
<p>The result is that the symbols <code>:-)</code> move across the screen. <code>delay</code> is
implemented differently on the
@@ -436,48 +436,48 @@ compiled in modern systems.</p>
<span id="cb13-7"><a href="#cb13-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">register</span> <span class="dt">short</span> pos <span class="op">=</span> <span class="dv">0</span><span class="op">,</span> c<span class="op">,</span> n<span class="op">;</span></span>
<span id="cb13-8"><a href="#cb13-8" aria-hidden="true" tabindex="-1"></a> <span class="dt">register</span> <span class="dt">char</span> <span class="op">*</span>fmt<span class="op">;</span></span>
<span id="cb13-9"><a href="#cb13-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span>argc <span class="op">!=</span> <span class="dv">2</span><span class="op">)</span> <span class="op">{</span></span>
<span id="cb13-10"><a href="#cb13-10" aria-hidden="true" tabindex="-1"></a> fprintf <span class="op">(</span>stderr<span class="op">,</span> <span class="st">&quot;Usage: </span><span class="sc">%s</span><span class="st"> file</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">,</span> argv<span class="op">[</span><span class="dv">0</span><span class="op">]);</span></span>
<span id="cb13-11"><a href="#cb13-11" aria-hidden="true" tabindex="-1"></a> exit <span class="op">(</span><span class="dv">1</span><span class="op">);</span></span>
<span id="cb13-10"><a href="#cb13-10" aria-hidden="true" tabindex="-1"></a> fprintf <span class="op">(</span>stderr<span class="op">,</span> <span class="st">&quot;Usage: </span><span class="sc">%s</span><span class="st"> file</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">,</span> argv<span class="op">[</span><span class="dv">0</span><span class="op">]);</span></span>
<span id="cb13-11"><a href="#cb13-11" aria-hidden="true" tabindex="-1"></a> exit <span class="op">(</span><span class="dv">1</span><span class="op">);</span></span>
<span id="cb13-12"><a href="#cb13-12" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb13-13"><a href="#cb13-13" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb13-14"><a href="#cb13-14" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">((</span>fp <span class="op">=</span> fopen<span class="op">(</span>argv<span class="op">[</span><span class="dv">1</span><span class="op">],</span> <span class="st">&quot;r&quot;</span><span class="op">))</span> <span class="op">==</span> NULL<span class="op">)</span> <span class="op">{</span></span>
<span id="cb13-15"><a href="#cb13-15" aria-hidden="true" tabindex="-1"></a> fprintf<span class="op">(</span>stderr<span class="op">,</span> <span class="st">&quot;</span><span class="sc">%s</span><span class="st">: can&#39;t open </span><span class="sc">%s\n</span><span class="st">&quot;</span><span class="op">,</span> argv<span class="op">[</span><span class="dv">0</span><span class="op">],</span> argv<span class="op">[</span><span class="dv">1</span><span class="op">]);</span></span>
<span id="cb13-16"><a href="#cb13-16" aria-hidden="true" tabindex="-1"></a> exit<span class="op">(</span><span class="dv">2</span><span class="op">);</span></span>
<span id="cb13-15"><a href="#cb13-15" aria-hidden="true" tabindex="-1"></a> fprintf<span class="op">(</span>stderr<span class="op">,</span> <span class="st">&quot;</span><span class="sc">%s</span><span class="st">: can&#39;t open </span><span class="sc">%s\n</span><span class="st">&quot;</span><span class="op">,</span> argv<span class="op">[</span><span class="dv">0</span><span class="op">],</span> argv<span class="op">[</span><span class="dv">1</span><span class="op">]);</span></span>
<span id="cb13-16"><a href="#cb13-16" aria-hidden="true" tabindex="-1"></a> exit<span class="op">(</span><span class="dv">2</span><span class="op">);</span></span>
<span id="cb13-17"><a href="#cb13-17" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb13-18"><a href="#cb13-18" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb13-19"><a href="#cb13-19" aria-hidden="true" tabindex="-1"></a> fseek <span class="op">(</span>fp<span class="op">,</span> <span class="op">(</span><span class="dt">long</span><span class="op">)</span> <span class="kw">sizeof</span> <span class="op">(</span><span class="kw">struct</span> exec<span class="op">),</span> <span class="dv">0</span><span class="op">);</span></span>
<span id="cb13-20"><a href="#cb13-20" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">&quot;/* portable between VAX and PDP11 */</span><span class="sc">\n\n</span><span class="st">&quot;</span><span class="op">);</span></span>
<span id="cb13-21"><a href="#cb13-21" aria-hidden="true" tabindex="-1"></a> printf <span class="op">(</span><span class="st">&quot;short main[] = {</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">);</span></span>
<span id="cb13-22"><a href="#cb13-22" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> <span class="op">(;;)</span> <span class="op">{</span></span>
<span id="cb13-23"><a href="#cb13-23" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span>pos <span class="op">==</span> <span class="dv">0</span><span class="op">)</span></span>
<span id="cb13-24"><a href="#cb13-24" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">&quot;</span><span class="sc">\t</span><span class="st">&quot;</span><span class="op">);</span></span>
<span id="cb13-23"><a href="#cb13-23" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span>pos <span class="op">==</span> <span class="dv">0</span><span class="op">)</span></span>
<span id="cb13-24"><a href="#cb13-24" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">&quot;</span><span class="sc">\t</span><span class="st">&quot;</span><span class="op">);</span></span>
<span id="cb13-25"><a href="#cb13-25" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb13-26"><a href="#cb13-26" aria-hidden="true" tabindex="-1"></a> c<span class="op">=</span>getc<span class="op">(</span>fp<span class="op">)</span> <span class="op">&amp;</span> <span class="bn">0377</span><span class="op">;</span></span>
<span id="cb13-27"><a href="#cb13-27" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span>feof<span class="op">(</span>fp<span class="op">))</span> <span class="cf">break</span><span class="op">;</span></span>
<span id="cb13-28"><a href="#cb13-28" aria-hidden="true" tabindex="-1"></a> n <span class="op">=</span> getc<span class="op">(</span>fp<span class="op">)</span> <span class="op">&lt;&lt;</span> <span class="dv">8</span><span class="op">|</span>c<span class="op">;</span></span>
<span id="cb13-26"><a href="#cb13-26" aria-hidden="true" tabindex="-1"></a> c<span class="op">=</span>getc<span class="op">(</span>fp<span class="op">)</span> <span class="op">&amp;</span> <span class="bn">0377</span><span class="op">;</span></span>
<span id="cb13-27"><a href="#cb13-27" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span>feof<span class="op">(</span>fp<span class="op">))</span> <span class="cf">break</span><span class="op">;</span></span>
<span id="cb13-28"><a href="#cb13-28" aria-hidden="true" tabindex="-1"></a> n <span class="op">=</span> getc<span class="op">(</span>fp<span class="op">)</span> <span class="op">&lt;&lt;</span> <span class="dv">8</span><span class="op">|</span>c<span class="op">;</span></span>
<span id="cb13-29"><a href="#cb13-29" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb13-30"><a href="#cb13-30" aria-hidden="true" tabindex="-1"></a> <span class="cf">switch</span> <span class="op">(</span>rand<span class="op">()</span> <span class="op">%</span> <span class="dv">5</span><span class="op">)</span> <span class="op">{</span></span>
<span id="cb13-31"><a href="#cb13-31" aria-hidden="true" tabindex="-1"></a> <span class="cf">case</span> <span class="dv">0</span><span class="op">:</span></span>
<span id="cb13-32"><a href="#cb13-32" aria-hidden="true" tabindex="-1"></a> <span class="cf">case</span> <span class="dv">1</span><span class="op">:</span></span>
<span id="cb13-33"><a href="#cb13-33" aria-hidden="true" tabindex="-1"></a> fmt <span class="op">=</span> <span class="st">&quot;</span><span class="sc">%d</span><span class="st">&quot;</span><span class="op">;</span> <span class="cf">break</span><span class="op">;</span></span>
<span id="cb13-34"><a href="#cb13-34" aria-hidden="true" tabindex="-1"></a> <span class="cf">case</span> <span class="dv">2</span><span class="op">:</span></span>
<span id="cb13-35"><a href="#cb13-35" aria-hidden="true" tabindex="-1"></a> fmt <span class="op">=</span> <span class="st">&quot;</span><span class="sc">%u</span><span class="st">&quot;</span><span class="op">;</span> <span class="cf">break</span><span class="op">;</span></span>
<span id="cb13-36"><a href="#cb13-36" aria-hidden="true" tabindex="-1"></a> <span class="cf">case</span> <span class="dv">3</span><span class="op">:</span></span>
<span id="cb13-37"><a href="#cb13-37" aria-hidden="true" tabindex="-1"></a> fmt <span class="op">=</span> <span class="st">&quot;0</span><span class="sc">%o</span><span class="st">&quot;</span><span class="op">;</span> <span class="cf">break</span><span class="op">;</span></span>
<span id="cb13-38"><a href="#cb13-38" aria-hidden="true" tabindex="-1"></a> <span class="cf">case</span> <span class="dv">4</span><span class="op">:</span></span>
<span id="cb13-39"><a href="#cb13-39" aria-hidden="true" tabindex="-1"></a> fmt <span class="op">=</span> <span class="st">&quot;0x</span><span class="sc">%x</span><span class="st">&quot;</span><span class="op">;</span> <span class="cf">break</span><span class="op">;</span></span>
<span id="cb13-40"><a href="#cb13-40" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb13-30"><a href="#cb13-30" aria-hidden="true" tabindex="-1"></a> <span class="cf">switch</span> <span class="op">(</span>rand<span class="op">()</span> <span class="op">%</span> <span class="dv">5</span><span class="op">)</span> <span class="op">{</span></span>
<span id="cb13-31"><a href="#cb13-31" aria-hidden="true" tabindex="-1"></a> <span class="cf">case</span> <span class="dv">0</span><span class="op">:</span></span>
<span id="cb13-32"><a href="#cb13-32" aria-hidden="true" tabindex="-1"></a> <span class="cf">case</span> <span class="dv">1</span><span class="op">:</span></span>
<span id="cb13-33"><a href="#cb13-33" aria-hidden="true" tabindex="-1"></a> fmt <span class="op">=</span> <span class="st">&quot;</span><span class="sc">%d</span><span class="st">&quot;</span><span class="op">;</span> <span class="cf">break</span><span class="op">;</span></span>
<span id="cb13-34"><a href="#cb13-34" aria-hidden="true" tabindex="-1"></a> <span class="cf">case</span> <span class="dv">2</span><span class="op">:</span></span>
<span id="cb13-35"><a href="#cb13-35" aria-hidden="true" tabindex="-1"></a> fmt <span class="op">=</span> <span class="st">&quot;</span><span class="sc">%u</span><span class="st">&quot;</span><span class="op">;</span> <span class="cf">break</span><span class="op">;</span></span>
<span id="cb13-36"><a href="#cb13-36" aria-hidden="true" tabindex="-1"></a> <span class="cf">case</span> <span class="dv">3</span><span class="op">:</span></span>
<span id="cb13-37"><a href="#cb13-37" aria-hidden="true" tabindex="-1"></a> fmt <span class="op">=</span> <span class="st">&quot;0</span><span class="sc">%o</span><span class="st">&quot;</span><span class="op">;</span> <span class="cf">break</span><span class="op">;</span></span>
<span id="cb13-38"><a href="#cb13-38" aria-hidden="true" tabindex="-1"></a> <span class="cf">case</span> <span class="dv">4</span><span class="op">:</span></span>
<span id="cb13-39"><a href="#cb13-39" aria-hidden="true" tabindex="-1"></a> fmt <span class="op">=</span> <span class="st">&quot;0x</span><span class="sc">%x</span><span class="st">&quot;</span><span class="op">;</span> <span class="cf">break</span><span class="op">;</span></span>
<span id="cb13-40"><a href="#cb13-40" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb13-41"><a href="#cb13-41" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb13-42"><a href="#cb13-42" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span><span class="dv">32</span> <span class="op">&lt;=</span> n <span class="op">&amp;&amp;</span> n <span class="op">&lt;</span> <span class="dv">127</span> <span class="op">&amp;&amp;</span> <span class="op">(</span>rand<span class="op">()</span> <span class="op">%</span> <span class="dv">4</span><span class="op">))</span> fmt <span class="op">=</span> <span class="st">&quot;&#39;</span><span class="sc">%c</span><span class="st">&#39;&quot;</span><span class="op">;</span></span>
<span id="cb13-43"><a href="#cb13-43" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span>n <span class="op">&lt;</span> <span class="dv">8</span> <span class="op">?</span> <span class="st">&quot;</span><span class="sc">%d</span><span class="st">&quot;</span> <span class="op">:</span> fmt<span class="op">,</span> n<span class="op">);</span></span>
<span id="cb13-44"><a href="#cb13-44" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">&quot;,&quot;</span><span class="op">);</span></span>
<span id="cb13-45"><a href="#cb13-45" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span>pos<span class="op">++</span> <span class="op">==</span> <span class="dv">8</span><span class="op">)</span> <span class="op">{</span></span>
<span id="cb13-46"><a href="#cb13-46" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">&quot;</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">);</span></span>
<span id="cb13-47"><a href="#cb13-47" aria-hidden="true" tabindex="-1"></a> pos <span class="op">=</span> <span class="dv">0</span><span class="op">;</span></span>
<span id="cb13-48"><a href="#cb13-48" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb13-49"><a href="#cb13-49" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> printf<span class="op">(</span><span class="st">&quot; &quot;</span><span class="op">);</span></span>
<span id="cb13-42"><a href="#cb13-42" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span><span class="dv">32</span> <span class="op">&lt;=</span> n <span class="op">&amp;&amp;</span> n <span class="op">&lt;</span> <span class="dv">127</span> <span class="op">&amp;&amp;</span> <span class="op">(</span>rand<span class="op">()</span> <span class="op">%</span> <span class="dv">4</span><span class="op">))</span> fmt <span class="op">=</span> <span class="st">&quot;&#39;</span><span class="sc">%c</span><span class="st">&#39;&quot;</span><span class="op">;</span></span>
<span id="cb13-43"><a href="#cb13-43" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span>n <span class="op">&lt;</span> <span class="dv">8</span> <span class="op">?</span> <span class="st">&quot;</span><span class="sc">%d</span><span class="st">&quot;</span> <span class="op">:</span> fmt<span class="op">,</span> n<span class="op">);</span></span>
<span id="cb13-44"><a href="#cb13-44" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">&quot;,&quot;</span><span class="op">);</span></span>
<span id="cb13-45"><a href="#cb13-45" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span>pos<span class="op">++</span> <span class="op">==</span> <span class="dv">8</span><span class="op">)</span> <span class="op">{</span></span>
<span id="cb13-46"><a href="#cb13-46" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">&quot;</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">);</span></span>
<span id="cb13-47"><a href="#cb13-47" aria-hidden="true" tabindex="-1"></a> pos <span class="op">=</span> <span class="dv">0</span><span class="op">;</span></span>
<span id="cb13-48"><a href="#cb13-48" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb13-49"><a href="#cb13-49" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> printf<span class="op">(</span><span class="st">&quot; &quot;</span><span class="op">);</span></span>
<span id="cb13-50"><a href="#cb13-50" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb13-51"><a href="#cb13-51" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">&quot;};</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">);</span></span>
<span id="cb13-51"><a href="#cb13-51" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">&quot;};</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">);</span></span>
<span id="cb13-52"><a href="#cb13-52" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb13-53"><a href="#cb13-53" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<p>As can be seen, there is a slight preference for decimal, and also a character
@@ -498,11 +498,11 @@ So we changed the word <code>and</code> in the comment to <code>&amp;&amp;</code
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/
-->
@@ -567,7 +567,7 @@ So we changed the word <code>and</code> in the comment to <code>&amp;&amp;</code
<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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -159,11 +159,11 @@ certainly takes its time saying hello.</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/
-->
@@ -225,7 +225,7 @@ certainly takes its time saying hello.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -172,11 +172,11 @@ anything funny going on with 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/
-->
@@ -240,7 +240,7 @@ anything funny going on with 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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -147,11 +147,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/
-->
@@ -206,7 +206,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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -181,11 +181,11 @@ The program itself looks like tty noise.</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 @@ The program itself looks like tty noise.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -178,11 +178,11 @@ arguments and notice 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/
-->
@@ -246,7 +246,7 @@ arguments and notice 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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -193,11 +193,11 @@ does, then you don’t, so read it again! Explain why:</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/
-->
@@ -262,7 +262,7 @@ does, then you don’t, so read it again! Explain why:</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -159,11 +159,11 @@ compilers as well as executable by the Bourne shell!</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/
-->
@@ -225,7 +225,7 @@ compilers as well as executable by the Bourne shell!</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -164,11 +164,11 @@ enough to try and parse it correctly.</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/
-->
@@ -230,7 +230,7 @@ enough to try and parse it correctly.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -161,11 +161,11 @@ maintain the Bourne shell! :-}</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/
-->
@@ -228,7 +228,7 @@ maintain the Bourne shell! :-}</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -168,11 +168,11 @@ credit, what Morse message does the program spell out?</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/
-->
@@ -236,7 +236,7 @@ credit, what Morse message does the program spell out?</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -158,11 +158,11 @@ this version as the first C program!</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/
-->
@@ -224,7 +224,7 @@ this version as the first C program!</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -157,11 +157,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/
-->
@@ -220,7 +220,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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -190,11 +190,11 @@ eventually could?</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/
-->
@@ -231,7 +231,7 @@ eventually could?</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -180,11 +180,11 @@ from printing a program!</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 @@ from printing a program!</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -157,11 +157,11 @@ is obfuscated, of all things!</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/
-->
@@ -223,7 +223,7 @@ is obfuscated, of all things!</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -163,11 +163,11 @@ In time, you will figure out what it does. :-)</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/
-->
@@ -230,7 +230,7 @@ In time, you will figure out what it does. :-)</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -163,11 +163,11 @@ compiler documents the program.</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/
-->
@@ -229,7 +229,7 @@ compiler documents the program.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -173,11 +173,11 @@ an infinite loop by this entry.</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/
-->
@@ -240,7 +240,7 @@ an infinite loop by this entry.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -168,11 +168,11 @@ been added to the contest tool chest.</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/
-->
@@ -235,7 +235,7 @@ been added to the contest tool chest.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -163,11 +163,11 @@ See the Communications of the ACM, March 1987, Page 195-196.</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/
-->
@@ -232,7 +232,7 @@ See the Communications of the ACM, March 1987, Page 195-196.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -156,11 +156,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/
-->
@@ -217,7 +217,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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -184,11 +184,11 @@ greatly inspired this contest.</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/
-->
@@ -250,7 +250,7 @@ greatly inspired this contest.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -178,11 +178,11 @@ logic and displays the board after each move! See above for how to use this.</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 @@ logic and displays the board after each move! See above for how to use this.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -178,11 +178,11 @@ why this is being done and how it is being exploited?</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 @@ why this is being done and how it is being exploited?</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -158,11 +158,11 @@ of if it as a C ink blot. :-)</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/
-->
@@ -224,7 +224,7 @@ of if it as a C ink blot. :-)</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -185,11 +185,11 @@ Clearly the GNU C preprocessor is faster.</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/
-->
@@ -252,7 +252,7 @@ Clearly the GNU C preprocessor is faster.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -169,11 +169,11 @@ system calls.</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/
-->
@@ -236,7 +236,7 @@ system calls.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -152,11 +152,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/
-->
@@ -215,7 +215,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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -187,11 +187,11 @@ file: isaak.encode. To read this file do.</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/
-->
@@ -255,7 +255,7 @@ file: isaak.encode. To read this file do.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+4 -4
View File
@@ -161,7 +161,7 @@ a file.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Note the unusual structure:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="cf">while</span> <span class="op">(&lt;</span>condition<span class="op">&gt;)</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="op">;</span></span></code></pre></div>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="op">;</span></span></code></pre></div>
<p>Did you notice that the body is empty?</p>
<p>Furthermore, it’s interesting to note that only two variables are
used to achieve everything.</p>
@@ -182,11 +182,11 @@ variables like:</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 @@ variables like:</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -157,11 +157,11 @@ by pounding on the keys of an old typewriter at random.</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/
-->
@@ -223,7 +223,7 @@ by pounding on the keys of an old typewriter at random.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -161,11 +161,11 @@ in such little space.</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/
-->
@@ -227,7 +227,7 @@ in such little space.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -169,11 +169,11 @@ ANSI committee should look into this practical simplification of C.</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/
-->
@@ -235,7 +235,7 @@ ANSI committee should look into this practical simplification of C.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -178,11 +178,11 @@ skills.</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/
-->
@@ -247,7 +247,7 @@ skills.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -181,11 +181,11 @@ code is the original.</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 @@ code is the original.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -178,11 +178,11 @@ much more so.</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/
-->
@@ -246,7 +246,7 @@ much more so.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -156,11 +156,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/
-->
@@ -220,7 +220,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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -198,11 +198,11 @@ need not be actually run.</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/
-->
@@ -267,7 +267,7 @@ need not be actually run.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -229,11 +229,11 @@ poor performance!</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/
-->
@@ -299,7 +299,7 @@ poor performance!</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -194,11 +194,11 @@ observe the result.</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/
-->
@@ -263,7 +263,7 @@ observe the result.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -248,11 +248,11 @@ could easily be added.</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/
-->
@@ -315,7 +315,7 @@ could easily be added.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -197,11 +197,11 @@ out the irrelevant bytes from your <code>cc</code> compiler.</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/
-->
@@ -264,7 +264,7 @@ out the irrelevant bytes from your <code>cc</code> compiler.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -161,11 +161,11 @@ strip newlines and tabs, if your <code>cb</code> can’t do that).</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/
-->
@@ -227,7 +227,7 @@ strip newlines and tabs, if your <code>cb</code> can’t do that).</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -258,11 +258,11 @@ can only by stopped by ‘q’ or by the `kill -9’ command.</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/
-->
@@ -325,7 +325,7 @@ can only by stopped by ‘q’ or by the `kill -9’ command.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -165,11 +165,11 @@ value is negative.</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/
-->
@@ -232,7 +232,7 @@ value is negative.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -245,11 +245,11 @@ will lack a terminating newline.</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/
-->
@@ -313,7 +313,7 @@ will lack a terminating newline.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -206,11 +206,11 @@ to replace the <code>" #Q"</code> string with <code>" \261\2"</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/
-->
@@ -274,7 +274,7 @@ to replace the <code>" #Q"</code> string with <code>" \261\2"</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -175,11 +175,11 @@ times, and it will show all hands as they are played.</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/
-->
@@ -241,7 +241,7 @@ times, and it will show all hands as they are played.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -236,11 +236,11 @@ fits in an <code>80*25</code> screen).</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/
-->
@@ -303,7 +303,7 @@ fits in an <code>80*25</code> screen).</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -177,11 +177,11 @@ with <code>16</code> to translate, and output, otherwise pass it unchanged.</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/
-->
@@ -244,7 +244,7 @@ with <code>16</code> to translate, and output, otherwise pass it unchanged.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -153,11 +153,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/
-->
@@ -218,7 +218,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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -307,11 +307,11 @@ Dan Bernstein’s high-compression ‘squeeze’.</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/
-->
@@ -376,7 +376,7 @@ Dan Bernstein’s high-compression ‘squeeze’.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -189,11 +189,11 @@ to the reader to find out what it is.</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/
-->
@@ -256,7 +256,7 @@ to the reader to find out what it is.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -179,11 +179,11 @@ would allow for sequence numbers to be punched in columns 73-80 :-).</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/
-->
@@ -246,7 +246,7 @@ would allow for sequence numbers to be punched in columns 73-80 :-).</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -172,11 +172,11 @@ K&amp;R support nested comments when properly implemented, but what the heck.</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/
-->
@@ -239,7 +239,7 @@ K&amp;R support nested comments when properly implemented, but what the heck.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -261,11 +261,11 @@ all <code>ed(1)</code> does too.</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/
-->
@@ -328,7 +328,7 @@ all <code>ed(1)</code> does too.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+4 -4
View File
@@ -165,7 +165,7 @@ numerically solves the equation <code>y'=f(x,y)</code>, with a step size of <cod
usage), over the interval <code>x=[x1,x2]</code>, with the initial condition of <code>y(x1)=y1</code>.</p>
<p>The ‘expression’ <code>f(x,y)</code> is any function of <code>x</code> and <code>y</code> with the
operators:</p>
<pre><code>+ - * / ^</code></pre>
<pre><code>+ - * / ^</code></pre>
<p>The symbol <code>^</code> is the power operator. Note that it only supports
integer powers. Also note that all expressions are evaluated strictly
left to right. (i.e., parenthesis aren’t supported).</p>
@@ -213,11 +213,11 @@ lines, each less than 99 characters long.</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/
-->
@@ -280,7 +280,7 @@ lines, each less than 99 characters long.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+7 -7
View File
@@ -161,10 +161,10 @@ the program as needed. :-)</p>
<p>Read each block of code as if it were a piece of correspondence.
For example, the first block of code would read:</p>
<pre><code>charlie,
doubletime me, OXFACE!
not interested, get out
mainly die, charly, *die*
signed charlotte</code></pre>
doubletime me, OXFACE!
not interested, get out
mainly die, charly, *die*
signed charlotte</code></pre>
<p>The original source had control-L’s after each code block. To
make it easier on news readers, we converted each control-L to
a blank line.</p>
@@ -185,11 +185,11 @@ on some systems. My personal favorite lint complaint is</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/
-->
@@ -253,7 +253,7 @@ on some systems. My personal favorite lint complaint is</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -248,11 +248,11 @@ ISBN 0-13-822305-X, chapter 5</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/
-->
@@ -315,7 +315,7 @@ ISBN 0-13-822305-X, chapter 5</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -290,11 +290,11 @@ the size limit, unfortunately.</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/
-->
@@ -373,7 +373,7 @@ the size limit, unfortunately.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+66 -66
View File
@@ -124,47 +124,47 @@
<p>The <code>sorta</code> scripts described below can sorta be found in this directory.</p>
<h1 id="sorta.i22"><a href="sorta.i2+2">sorta.i2+2</a></h1>
<pre><code>2 2+#` [ about as basic as you can get ]ld</code></pre>
<pre><code> 2 2+#` [ about as basic as you can get ]ld</code></pre>
<p>This script takes 2, adds 2 to it, and prints the result (with a
newline). I get 5 on the hand-held Sinclair under ZYNIX. Let me know if
your machine produces a different result so that I can send you patches.</p>
<h1 id="sorta.iarg0"><a href="sorta.iarg0">sorta.iarg0</a></h1>
<pre><code>0A` [ take arg 0, print it ]</code></pre>
<pre><code> 0A` [ take arg 0, print it ]</code></pre>
<p>This is self-explanatory.</p>
<h1 id="sorta.icalc"><a href="sorta.icalc">sorta.icalc</a></h1>
<pre><code>[D2sD3s]:Dld [ input m n, output m n m n ]ld
<pre><code> [D2sD3s]:Dld [ input m n, output m n m n ]ld
[2*1=d]:cld [ aux routine for :d recursion ]ld
[1=D1s&gt;1Ds_+=c]:dld [ input m n, as long as n &lt;= m double it, output m n ]ld
[2*1=d]:cld [ aux routine for :d recursion ]ld
[1=D1s&gt;1Ds_+=c]:dld [ input m n, as long as n &lt;= m double it, output m n ]ld
[D2s1s_+1s]:-ld [ input m n, output m-n n ]ld
[1=D1s&gt;1Ds_+#T=-2/D=1]:1ld [ aux routine for :@ ]ld
[1D=d2/1=1ddd1 ]:!ld
[&quot;0&quot;Td]:0ld
[DD=!1_+=0]:@ld [ input m, m assumed nonnegative, append
binary representation of m to top of s stack ]ld
[D2s1s_+1s]:-ld [ input m n, output m-n n ]ld
[1=D1s&gt;1Ds_+#T=-2/D=1]:1ld [ aux routine for :@ ]ld
[1D=d2/1=1ddd1 ]:!ld
[&quot;0&quot;Td]:0ld
[DD=!1_+=0]:@ld [ input m, m assumed nonnegative, append
binary representation of m to top of s stack ]ld
[&quot;-&quot;T_]:+ld
[D0 1s&gt;=+1=@]:2ld [ input m, append - to top of s stack if m is negative,
then append binary representation of abs(m) to
top of s stack ]ld
[&quot;-&quot;T_]:+ld
[D0 1s&gt;=+1=@]:2ld [ input m, append - to top of s stack if m is negative,
then append binary representation of abs(m) to
top of s stack ]ld
[d1A:A2=A]:A 27182 a1&gt;=A
[d2A:A1=A]:A 3145 a2&gt;=A
[d1A:A2=A]:A 27182 a1&gt;=A
[d2A:A1=A]:A 3145 a2&gt;=A
D # &quot; in binary is &quot;T 1=2 `ld
1=Dd # &quot; in binary is &quot;T 1=2 `ld
D # &quot; in binary is &quot;T 1=2 `ld
1=Dd # &quot; in binary is &quot;T 1=2 `ld
1=D 1s# &quot; + &quot;T 1s#T &quot; is &quot;T + #Td `ld
1=D 1s# &quot; - &quot;T 1s#T &quot; is &quot;T _+ #Td `ld
1=D 1s# &quot; * &quot;T 1s#T &quot; is &quot;T * #Td `ld
1=D 1s# &quot; / &quot;T 1s#T &quot; is &quot;T / #Td `ld
1=D 1s# &quot; % &quot;T 1s#T &quot; is &quot;T 1=D/*_+ #Td `ld
1=D 1s# &quot; + &quot;T 1s#T &quot; is &quot;T + #Td `ld
1=D 1s# &quot; - &quot;T 1s#T &quot; is &quot;T _+ #Td `ld
1=D 1s# &quot; * &quot;T 1s#T &quot; is &quot;T * #Td `ld
1=D 1s# &quot; / &quot;T 1s#T &quot; is &quot;T / #Td `ld
1=D 1s# &quot; % &quot;T 1s#T &quot; is &quot;T 1=D/*_+ #Td `ld
1=D d &quot;~ &quot; #T &quot; is &quot;T D&amp; #T$ld &quot; (&quot; 1=2 &quot;)&quot;T `ld
1=D 1s# &quot; &amp; &quot;T 1s#T &quot; is &quot;T &amp;D&amp; #T$ld &quot; (&quot; 1=2 &quot;)&quot;T `ld
1=D 1s# &quot; | &quot;T 1s#T &quot; is &quot;T D&amp;1sD&amp;&amp; #T$ld &quot; (&quot; 1=2 &quot;)&quot;T `ld
1=D 1s# &quot; ^ &quot;T 1s#T &quot; is &quot;T 1=D&amp;2sD&amp;1sD&amp;&amp;&amp;D&amp; #T$ld &quot; (&quot; 1=2 &quot;)&quot;T `ld</code></pre>
1=D d &quot;~ &quot; #T &quot; is &quot;T D&amp; #T$ld &quot; (&quot; 1=2 &quot;)&quot;T `ld
1=D 1s# &quot; &amp; &quot;T 1s#T &quot; is &quot;T &amp;D&amp; #T$ld &quot; (&quot; 1=2 &quot;)&quot;T `ld
1=D 1s# &quot; | &quot;T 1s#T &quot; is &quot;T D&amp;1sD&amp;&amp; #T$ld &quot; (&quot; 1=2 &quot;)&quot;T `ld
1=D 1s# &quot; ^ &quot;T 1s#T &quot; is &quot;T 1=D&amp;2sD&amp;1sD&amp;&amp;&amp;D&amp; #T$ld &quot; (&quot; 1=2 &quot;)&quot;T `ld</code></pre>
<p><code>icalc</code> shows off <code>SORTA</code>’s understanding of integer arithmetic. You can run
it with up to two arguments; the arguments have default values of 27182
and 3145. Notice that <code>SORTA</code> doesn’t have a language primitive for
@@ -174,51 +174,51 @@ Look at program A.) <code>icalc</code> also provides a useful binary output rout
and if you can’t remember offhand that <code>D2sD3s&amp;2sD&amp;1sD&amp;&amp;&amp;D&amp;</code> means XOR,
you can just look it up here.</p>
<h1 id="sorta.idup"><a href="sorta.idup">sorta.idup</a></h1>
<pre><code>[ld#1_+1=y]:x
[uD1+=x]:y
0&quot;&quot;1=y`</code></pre>
<pre><code> [ld#1_+1=y]:x
[uD1+=x]:y
0&quot;&quot;1=y`</code></pre>
<p>This script prints out the maximum file descriptor available from
repeated <code>dup(2)</code>s—usually <code>NOFILE - 1</code>. Can you see how it works?</p>
<h1 id="sorta.iecho"><a href="sorta.iecho">sorta.iecho</a></h1>
<pre><code>[&quot; &quot;$ld]:sld [ print a space ]ld
[1s1+DA$ld1s1_+D=sD=x]:xld [ given n (argc-n), print args ]ld
0a1_+D=x&quot;&quot;` [ simulation of /bin/echo ]ld</code></pre>
<pre><code> [&quot; &quot;$ld]:sld [ print a space ]ld
[1s1+DA$ld1s1_+D=sD=x]:xld [ given n (argc-n), print args ]ld
0a1_+D=x&quot;&quot;` [ simulation of /bin/echo ]ld</code></pre>
<p>This is a clone of <code>/bin/echo</code>, minus any argument processing and escape
interpretation. (Note that, unlike some shells’ echo, <code>/bin/echo</code> prints a
newline even with no arguments.) Try <code>./sorta foo bar &lt; iecho</code>.</p>
<h1 id="sorta.ifact1"><a href="sorta.ifact1">sorta.ifact1</a></h1>
<pre><code>1#`ld2*#`ld3*#`ld4*#`ld5*#`ld6*#`ld7*#`ld8*#`ld9*#`ld10*#`ld</code></pre>
<pre><code> 1#`ld2*#`ld3*#`ld4*#`ld5*#`ld6*#`ld7*#`ld8*#`ld9*#`ld10*#`ld</code></pre>
<p>This is a very straightforward factorial program: Take 1, print it,
multiply by 2, print it, multiply by 3, print it, etc.</p>
<h1 id="sorta.ifact2"><a href="sorta.ifact2">sorta.ifact2</a></h1>
<pre><code>[1+D2s*#`ld1s]:f
1 0
1=f 1=f 1=f 1=f 1=f 1=f 1=f 1=f 1=f 1=f</code></pre>
<pre><code> [1+D2s*#`ld1s]:f
1 0
1=f 1=f 1=f 1=f 1=f 1=f 1=f 1=f 1=f 1=f</code></pre>
<p><code>ifact1</code> does a lot of repeated work. <code>ifact2</code> takes advantage of this by
keeping the current <code>n!</code> <code>n</code> on the stack. Each call to routine <code>f (1=f)</code>
increments <code>n</code> by <code>1</code> and prints out the factorial.</p>
<h1 id="sorta.ifact3"><a href="sorta.ifact3">sorta.ifact3</a></h1>
<pre><code>[1+D2s*#`ld1s]:f [ given (n-1)! (n-1), print n!, put n! n ]
[2s1=f2s1_+D0&gt;=x]:x [ given n n! x, print (n+1)! through (n+x)! ]
0 1 10 1=x</code></pre>
<pre><code> [1+D2s*#`ld1s]:f [ given (n-1)! (n-1), print n!, put n! n ]
[2s1=f2s1_+D0&gt;=x]:x [ given n n! x, print (n+1)! through (n+x)! ]
0 1 10 1=x</code></pre>
<p>Finally, <code>ifact3</code> removes all the redundancy from <code>ifact2</code>, and exhibits
proper documentation of stack routines. You can replace the <code>10</code> by
anything in this version.</p>
<h1 id="sorta.iio"><a href="sorta.iio">sorta.iio</a></h1>
<pre><code> [ a simple example of interpreting code on the fly ]ld
<pre><code> [ a simple example of interpreting code on the fly ]ld
[&quot;] &quot;2 2+&quot;:xT [&quot;]T &quot; produces &quot;T 1=x#T &quot; which should be 4.&quot;T`</code></pre>
[&quot;] &quot;2 2+&quot;:xT [&quot;]T &quot; produces &quot;T 1=x#T &quot; which should be 4.&quot;T`</code></pre>
<p>Notice that <code>"2 2+"</code> is a literal string inside the program.</p>
<h1 id="sorta.irot13"><a href="sorta.irot13">sorta.irot13</a></h1>
<pre><code>&quot;[] [.tr] &quot;
[&quot;]&quot;.[a-m][n-z][A-M][N-Z]&quot;[&quot; ]TTT [&quot;]&quot;.[n-z][a-m][N-Z][A-M]&quot;[&quot; ]TTT
&quot;[tr] !q&quot;T:xld
[&quot;rot13: fatal: need exactly one argument&quot;`q]:gld
[&quot;rot13: fatal: cannot open &quot;1ST`q]:hld
a2_+=g
1A 0 [ that 0 is for RDONLY ]ld
0 &#39;o D0 1s&gt;=hld
0Ou1=x [ in a more complex spawner, this would be done under a fork ]ld</code></pre>
<pre><code> &quot;[] [.tr] &quot;
[&quot;]&quot;.[a-m][n-z][A-M][N-Z]&quot;[&quot; ]TTT [&quot;]&quot;.[n-z][a-m][N-Z][A-M]&quot;[&quot; ]TTT
&quot;[tr] !q&quot;T:xld
[&quot;rot13: fatal: need exactly one argument&quot;`q]:gld
[&quot;rot13: fatal: cannot open &quot;1ST`q]:hld
a2_+=g
1A 0 [ that 0 is for RDONLY ]ld
0 &#39;o D0 1s&gt;=hld
0Ou1=x [ in a more complex spawner, this would be done under a fork ]ld</code></pre>
<p>Despite its name, <code>irot13</code> is meant to show how to exec a program with
redirection from within <code>sorta</code>. You run it as <code>./sorta blah &lt; irot13</code>; it
opens <code>blah</code> and runs a (BSD-style) <code>tr</code> command to rotate all letters by 13
@@ -227,23 +227,23 @@ subroutine <code>h</code> to print a nice error message if necessary. <code>0Ou<
stdout and replaces it with the new descriptor. Finally, subroutine <code>x</code>
executes the <code>tr</code>.</p>
<h1 id="sorta.isleep"><a href="sorta.isleep">sorta.isleep</a></h1>
<pre><code>[&quot;&quot; &quot;+sleep&quot; &quot;+5&quot; &quot;sleep&quot; !q]:S [F0&gt;1_+=S]:s
&quot;forking sleep 5...&quot;`ld
1=s
&quot;waiting for sleep to finish...&quot;`ld
w
&quot;done, sleep exit code &quot; #T`</code></pre>
<pre><code> [&quot;&quot; &quot;+sleep&quot; &quot;+5&quot; &quot;sleep&quot; !q]:S [F0&gt;1_+=S]:s
&quot;forking sleep 5...&quot;`ld
1=s
&quot;waiting for sleep to finish...&quot;`ld
w
&quot;done, sleep exit code &quot; #T`</code></pre>
<p>This script illustrates the classic fork-exec-wait.</p>
<h1 id="sorta.itailrec"><a href="sorta.itailrec">sorta.itailrec</a></h1>
<pre><code>[3*#&quot; &quot;T$ldD=f]:f
1=f</code></pre>
<pre><code> [3*#&quot; &quot;T$ldD=f]:f
1=f</code></pre>
<p>The sole purpose of this script is to prove that <code>sorta</code> can do infinite
tail recursion (in this case, in program <code>f</code>). Do <code>./sorta &lt; itailrec | more</code>
and watch the powers of 3 (mod your computer’s word size) flow by.</p>
<h1 id="sorta.iwhosort"><a href="sorta.iwhosort">sorta.iwhosort</a></h1>
<pre><code>[0Ou &quot;&quot; &quot;+-u&quot; &quot;sort&quot; !q]:S [F0&gt;1_+=S]:s
[1Ou &quot;&quot; &quot;+-u&quot; &quot;who&quot; !q]:W [F0&gt;1_+=W]:w
P1=wO1=sOww</code></pre>
<pre><code> [0Ou &quot;&quot; &quot;+-u&quot; &quot;sort&quot; !q]:S [F0&gt;1_+=S]:s
[1Ou &quot;&quot; &quot;+-u&quot; &quot;who&quot; !q]:W [F0&gt;1_+=W]:w
P1=wO1=sOww</code></pre>
<p>This final example is a simple pipeline, <code>who | sort</code>.</p>
<!--
@@ -251,11 +251,11 @@ P1=wO1=sOww</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/
-->
@@ -292,7 +292,7 @@ P1=wO1=sOww</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+27 -9
View File
@@ -2,8 +2,9 @@ The `sorta` scripts described below can sorta be found in this directory.
# [sorta.i2+2](sorta.i2+2)
```
2 2+#` [ about as basic as you can get ]ld
```
This script takes 2, adds 2 to it, and prints the result (with a
@@ -13,7 +14,9 @@ your machine produces a different result so that I can send you patches.
# [sorta.iarg0](sorta.iarg0)
```
0A` [ take arg 0, print it ]
```
This is self-explanatory.
@@ -21,7 +24,7 @@ This is self-explanatory.
# [sorta.icalc](sorta.icalc)
```
[D2sD3s]:Dld [ input m n, output m n m n ]ld
[2*1=d]:cld [ aux routine for :d recursion ]ld
@@ -55,6 +58,7 @@ This is self-explanatory.
1=D 1s# " & "T 1s#T " is "T &D& #T$ld " (" 1=2 ")"T `ld
1=D 1s# " | "T 1s#T " is "T D&1sD&& #T$ld " (" 1=2 ")"T `ld
1=D 1s# " ^ "T 1s#T " is "T 1=D&2sD&1sD&&&D& #T$ld " (" 1=2 ")"T `ld
```
`icalc` shows off `SORTA`'s understanding of integer arithmetic. You can run
it with up to two arguments; the arguments have default values of 27182
@@ -68,10 +72,11 @@ you can just look it up here.
# [sorta.idup](sorta.idup)
```
[ld#1_+1=y]:x
[uD1+=x]:y
0""1=y`
```
This script prints out the maximum file descriptor available from
repeated `dup(2)`s---usually `NOFILE - 1`. Can you see how it works?
@@ -79,9 +84,11 @@ repeated `dup(2)`s---usually `NOFILE - 1`. Can you see how it works?
# [sorta.iecho](sorta.iecho)
```
[" "$ld]:sld [ print a space ]ld
[1s1+DA$ld1s1_+D=sD=x]:xld [ given n (argc-n), print args ]ld
0a1_+D=x""` [ simulation of /bin/echo ]ld
```
This is a clone of `/bin/echo`, minus any argument processing and escape
interpretation. (Note that, unlike some shells' echo, `/bin/echo` prints a
@@ -90,8 +97,9 @@ newline even with no arguments.) Try `./sorta foo bar < iecho`.
# [sorta.ifact1](sorta.ifact1)
```
1#`ld2*#`ld3*#`ld4*#`ld5*#`ld6*#`ld7*#`ld8*#`ld9*#`ld10*#`ld
```
This is a very straightforward factorial program: Take 1, print it,
multiply by 2, print it, multiply by 3, print it, etc.
@@ -99,10 +107,11 @@ multiply by 2, print it, multiply by 3, print it, etc.
# [sorta.ifact2](sorta.ifact2)
```
[1+D2s*#`ld1s]:f
1 0
1=f 1=f 1=f 1=f 1=f 1=f 1=f 1=f 1=f 1=f
```
`ifact1` does a lot of repeated work. `ifact2` takes advantage of this by
keeping the current `n!` `n` on the stack. Each call to routine `f (1=f)`
@@ -111,10 +120,11 @@ increments `n` by `1` and prints out the factorial.
# [sorta.ifact3](sorta.ifact3)
```
[1+D2s*#`ld1s]:f [ given (n-1)! (n-1), print n!, put n! n ]
[2s1=f2s1_+D0>=x]:x [ given n n! x, print (n+1)! through (n+x)! ]
0 1 10 1=x
```
Finally, `ifact3` removes all the redundancy from `ifact2`, and exhibits
proper documentation of stack routines. You can replace the `10` by
@@ -123,16 +133,18 @@ anything in this version.
# [sorta.iio](sorta.iio)
[ a simple example of interpreting code on the fly ]ld
```
[ a simple example of interpreting code on the fly ]ld
["] "2 2+":xT ["]T " produces "T 1=x#T " which should be 4."T`
```
Notice that `"2 2+"` is a literal string inside the program.
# [sorta.irot13](sorta.irot13)
```
"[] [.tr] "
["]".[a-m][n-z][A-M][N-Z]"[" ]TTT ["]".[n-z][a-m][N-Z][A-M]"[" ]TTT
"[tr] !q"T:xld
@@ -142,6 +154,7 @@ Notice that `"2 2+"` is a literal string inside the program.
1A 0 [ that 0 is for RDONLY ]ld
0 'o D0 1s>=hld
0Ou1=x [ in a more complex spawner, this would be done under a fork ]ld
```
Despite its name, `irot13` is meant to show how to exec a program with
redirection from within `sorta`. You run it as `./sorta blah < irot13`; it
@@ -154,21 +167,24 @@ executes the `tr`.
# [sorta.isleep](sorta.isleep)
```
["" "+sleep" "+5" "sleep" !q]:S [F0>1_+=S]:s
"forking sleep 5..."`ld
1=s
"waiting for sleep to finish..."`ld
w
"done, sleep exit code " #T`
```
This script illustrates the classic fork-exec-wait.
# [sorta.itailrec](sorta.itailrec)
```
[3*#" "T$ldD=f]:f
1=f
```
The sole purpose of this script is to prove that `sorta` can do infinite
tail recursion (in this case, in program `f`). Do `./sorta < itailrec | more`
@@ -177,9 +193,11 @@ and watch the powers of 3 (mod your computer's word size) flow by.
# [sorta.iwhosort](sorta.iwhosort)
```
[0Ou "" "+-u" "sort" !q]:S [F0>1_+=S]:s
[1Ou "" "+-u" "who" !q]:W [F0>1_+=W]:w
P1=wO1=sOww
```
This final example is a simple pipeline, `who | sort`.
+3 -3
View File
@@ -216,11 +216,11 @@ to reach into arbitrary parcels of memory.</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/
-->
@@ -283,7 +283,7 @@ to reach into arbitrary parcels of memory.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -169,11 +169,11 @@ you to place the meaningful letters wherever you want.</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/
-->
@@ -235,7 +235,7 @@ you to place the meaningful letters wherever you want.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -230,11 +230,11 @@ on the screen, dominates the time to compute the next generation.</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/
-->
@@ -296,7 +296,7 @@ on the screen, dominates the time to compute the next generation.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -212,11 +212,11 @@ encoded by adding one to every character of it just to confuse you).</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/
-->
@@ -279,7 +279,7 @@ encoded by adding one to every character of it just to confuse you).</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -219,11 +219,11 @@ for the student.</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/
-->
@@ -286,7 +286,7 @@ for the student.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -204,11 +204,11 @@ as assistant pizza chef. Larry Bassel was official taste tester. Yummo!</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/
-->
@@ -267,7 +267,7 @@ as assistant pizza chef. Larry Bassel was official taste tester. Yummo!</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+11 -11
View File
@@ -182,23 +182,23 @@ write the smallest playable game, but keep the playability and
enjoyment high.</p>
<h3 id="instructions">Instructions:</h3>
<p>Key to map:</p>
<pre><code> |
<pre><code> |
###### | | | /\ /--\ ==| /\ | | Directonal keys
###### Solid Wall | ----|| \/ /\ ||---- (unlock doors of
###### | \/ ==| \--/ \/ the same direction)
|\
| &lt;&lt; &gt;&gt; Doors. Unlocked by
Blank space | &lt;&lt; vvvvvv ^^^^^^ &gt;&gt; the above keys.
| &lt;&lt; &gt;&gt;
|\
|\
| &lt;&lt; &gt;&gt; Doors. Unlocked by
Blank space | &lt;&lt; vvvvvv ^^^^^^ &gt;&gt; the above keys.
| &lt;&lt; &gt;&gt;
|\
___ | o__O\ O__O ^__^ /O__o\
/ \ &#39;Crushable&#39; | \___/ /----\ /----\ \___/ The four sprites for
\___/ boulder | _/_\ _/ \_ _/ \_ /_\_ your character :-)
|\
|\
___ uncrushable | /\ Diamonds. They can either be found lying
/@@@\ boulder | &lt; &gt; around (if only!) or manufacture by pushing
\@@@/ | \/ two &#39;crushable&#39; rocks together.
|</code></pre>
|</code></pre>
<p>The general idea of the game is to collect all the diamonds. This must
be done in the minimum amount of moves. I’ve allowed a margin of 5
moves which brings the moves allowed to <code>484</code>. (alter the value of <code>u</code> in
@@ -216,11 +216,11 @@ Take care that it’s facing in the correct direction.</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/
-->
@@ -284,7 +284,7 @@ Take care that it’s facing in the correct direction.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+13 -13
View File
@@ -167,7 +167,7 @@ next move, recompile <code>nextmove.c</code> and play it again:</p>
<p>We have provided the shell script, <a href="ttt.sh">ttt</a>, to make it easier to play the
game:</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">make</span> ttt</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./ttt</span> <span class="pp">[</span><span class="ss">first_move</span><span class="pp">]</span> <span class="co"># &lt;- omit first arg to have it move first</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./ttt</span> <span class="pp">[</span><span class="ss">first_move</span><span class="pp">]</span> <span class="co"># &lt;- omit first arg to have it move first</span></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./ttt</span> next_move</span></code></pre></div>
<p>The shell script determines when the game is over, and automatically replaces
<code>merlyn.c</code> (copied from <a href="westley.c">westley.c</a> with an improved version after a
@@ -179,9 +179,9 @@ loss). The <a href="ttt.sh">ttt</a> script has two other modes:</p>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./ttt</span> 4</span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./ttt</span> 6</span></code></pre></div>
<p>The final might look like:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> a<span class="op">(</span>X<span class="op">){</span><span class="co">/*/X=- a(X){/*/</span>X<span class="op">=-</span></span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> X <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;</span>X<span class="op">=-</span> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;</span>X<span class="op">=-</span></span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;}</span><span class="co">/*/ -1;F;}/*/</span></span>
<div class="sourceCode" id="cb9"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> a<span class="op">(</span>X<span class="op">){</span><span class="co">/*/X=- a(X){/*/</span>X<span class="op">=-</span></span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> X <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;</span>X<span class="op">=-</span> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;</span>X<span class="op">=-</span></span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;}</span><span class="co">/*/ -1;F;}/*/</span></span>
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a><span class="dt">char</span> z<span class="op">[][</span><span class="dv">100</span><span class="op">]={</span><span class="st">&quot;char z[][100]={&quot;</span><span class="op">,</span><span class="st">&quot;a(X){/*/X=-&quot;</span><span class="op">,</span><span class="st">&quot;-1;F;X=-&quot;</span><span class="op">,</span><span class="st">&quot;-1;F;}/*/&quot;</span><span class="op">,</span><span class="st">&quot;1999999999 :-) &quot;</span><span class="op">,</span></span>
<span id="cb9-5"><a href="#cb9-5" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;int q,i,j,k,X,O=0,H;S(x)int*x;{X+=X;O+=O;*x+1?*x+2||X++:O++;*x=1;}L(n){for(*&quot;</span><span class="op">,</span></span>
<span id="cb9-6"><a href="#cb9-6" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;z[i=1]=n+97;i&lt;4;i++)M(256),s(i),M(128),s(i),M(64),N;X*=8;O*=8;}s(R){char*r=z&quot;</span><span class="op">,</span></span>
@@ -191,9 +191,9 @@ loss). The <a href="ttt.sh">ttt</a> script has two other modes:</p>
<span id="cb9-10"><a href="#cb9-10" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;c(1);*J=--u?O?*J:*v[1]:53;X|=u&lt;&lt;57-*v[u];y(X);K=40+q;q?e(O,X),q&amp;&amp;(K=&#39;|&#39;),e(X&quot;</span><span class="op">,</span></span>
<span id="cb9-11"><a href="#cb9-11" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;,O),R(),O|=1&lt;&lt;--i:J[*J-48+(X=O=0)]--;L(q=0);for(s(i=0);q=i&lt;12;)s(i++),i&gt;4&amp;&amp;N&quot;</span><span class="op">,</span></span>
<span id="cb9-12"><a href="#cb9-12" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;;s(q=12);P(48);P(&#39;}&#39;);P(59);N;q=0;L(1);for(i=5;i&lt;13;)s(i++),N;L(2);}&quot;</span><span class="op">,</span><span class="dv">0</span><span class="op">};</span></span>
<span id="cb9-13"><a href="#cb9-13" aria-hidden="true" tabindex="-1"></a> b<span class="op">(</span>X<span class="op">){</span><span class="co">/*/X=- b(X){/*/</span>X<span class="op">=-</span></span>
<span id="cb9-14"><a href="#cb9-14" aria-hidden="true" tabindex="-1"></a> X <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;</span>X<span class="op">=-</span> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;</span>X<span class="op">=-</span> X</span>
<span id="cb9-15"><a href="#cb9-15" aria-hidden="true" tabindex="-1"></a> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;}</span><span class="co">/*/ -1;F;}/*/</span></span>
<span id="cb9-13"><a href="#cb9-13" aria-hidden="true" tabindex="-1"></a> b<span class="op">(</span>X<span class="op">){</span><span class="co">/*/X=- b(X){/*/</span>X<span class="op">=-</span></span>
<span id="cb9-14"><a href="#cb9-14" aria-hidden="true" tabindex="-1"></a> X <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;</span>X<span class="op">=-</span> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;</span>X<span class="op">=-</span> X</span>
<span id="cb9-15"><a href="#cb9-15" aria-hidden="true" tabindex="-1"></a> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;}</span><span class="co">/*/ -1;F;}/*/</span></span>
<span id="cb9-16"><a href="#cb9-16" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> q<span class="op">,</span>i<span class="op">,</span>j<span class="op">,</span>k<span class="op">,</span>X<span class="op">,</span>O<span class="op">=</span><span class="dv">0</span><span class="op">,</span>H<span class="op">;</span>S<span class="op">(</span>x<span class="op">)</span><span class="dt">int</span><span class="op">*</span>x<span class="op">;{</span>X<span class="op">+=</span>X<span class="op">;</span>O<span class="op">+=</span>O<span class="op">;*</span>x<span class="op">+</span><span class="dv">1</span><span class="op">?*</span>x<span class="op">+</span><span class="dv">2</span><span class="op">||</span>X<span class="op">++:</span>O<span class="op">++;*</span>x<span class="op">=</span><span class="dv">1</span><span class="op">;}</span>L<span class="op">(</span>n<span class="op">){</span><span class="cf">for</span><span class="op">(*</span></span>
<span id="cb9-17"><a href="#cb9-17" aria-hidden="true" tabindex="-1"></a>z<span class="op">[</span>i<span class="op">=</span><span class="dv">1</span><span class="op">]=</span>n<span class="op">+</span><span class="dv">97</span><span class="op">;</span>i<span class="op">&lt;</span><span class="dv">4</span><span class="op">;</span>i<span class="op">++)</span>M<span class="op">(</span><span class="dv">256</span><span class="op">),</span>s<span class="op">(</span>i<span class="op">),</span>M<span class="op">(</span><span class="dv">128</span><span class="op">),</span>s<span class="op">(</span>i<span class="op">),</span>M<span class="op">(</span><span class="dv">64</span><span class="op">),</span>N<span class="op">;</span>X<span class="op">*=</span><span class="dv">8</span><span class="op">;</span>O<span class="op">*=</span><span class="dv">8</span><span class="op">;}</span>s<span class="op">(</span>R<span class="op">){</span><span class="dt">char</span><span class="op">*</span>r<span class="op">=</span>z</span>
<span id="cb9-18"><a href="#cb9-18" aria-hidden="true" tabindex="-1"></a><span class="op">[</span>R<span class="op">];</span><span class="cf">for</span><span class="op">(</span>q<span class="op">&amp;&amp;</span>Q<span class="op">;*</span>r<span class="op">;)</span>P<span class="op">(*</span>r<span class="op">++);</span>q<span class="op">&amp;&amp;(</span>Q<span class="op">,</span>P<span class="op">(</span><span class="dv">44</span><span class="op">));}</span>M<span class="op">(</span>m<span class="op">){</span>P<span class="op">(</span><span class="dv">9</span><span class="op">);</span>i<span class="op">-</span><span class="dv">2</span><span class="op">||</span>P<span class="op">(</span>X<span class="op">&amp;</span>m<span class="op">?</span><span class="dv">88</span><span class="op">:</span>O<span class="op">&amp;</span>m<span class="op">?</span><span class="dv">48</span><span class="op">:</span><span class="dv">32</span><span class="op">);</span>P<span class="op">(</span></span>
@@ -202,9 +202,9 @@ loss). The <a href="ttt.sh">ttt</a> script has two other modes:</p>
<span id="cb9-21"><a href="#cb9-21" aria-hidden="true" tabindex="-1"></a>c<span class="op">(</span><span class="dv">1</span><span class="op">);*</span>J<span class="op">=--</span>u<span class="op">?</span>O<span class="op">?*</span>J<span class="op">:*</span>v<span class="op">[</span><span class="dv">1</span><span class="op">]:</span><span class="dv">53</span><span class="op">;</span>X<span class="op">|=</span>u<span class="op">&lt;&lt;</span><span class="dv">57</span><span class="op">-*</span>v<span class="op">[</span>u<span class="op">];</span>y<span class="op">(</span>X<span class="op">);</span>K<span class="op">=</span><span class="dv">40</span><span class="op">+</span>q<span class="op">;</span>q<span class="op">?</span>e<span class="op">(</span>O<span class="op">,</span>X<span class="op">),</span>q<span class="op">&amp;&amp;(</span>K<span class="op">=</span><span class="ch">&#39;|&#39;</span><span class="op">),</span>e<span class="op">(</span>X</span>
<span id="cb9-22"><a href="#cb9-22" aria-hidden="true" tabindex="-1"></a><span class="op">,</span>O<span class="op">),</span>R<span class="op">(),</span>O<span class="op">|=</span><span class="dv">1</span><span class="op">&lt;&lt;--</span>i<span class="op">:</span>J<span class="op">[*</span>J<span class="op">-</span><span class="dv">48</span><span class="op">+(</span>X<span class="op">=</span>O<span class="op">=</span><span class="dv">0</span><span class="op">)]--;</span>L<span class="op">(</span>q<span class="op">=</span><span class="dv">0</span><span class="op">);</span><span class="cf">for</span><span class="op">(</span>s<span class="op">(</span>i<span class="op">=</span><span class="dv">0</span><span class="op">);</span>q<span class="op">=</span>i<span class="op">&lt;</span><span class="dv">12</span><span class="op">;)</span>s<span class="op">(</span>i<span class="op">++),</span>i<span class="op">&gt;</span><span class="dv">4</span><span class="op">&amp;&amp;</span>N</span>
<span id="cb9-23"><a href="#cb9-23" aria-hidden="true" tabindex="-1"></a><span class="op">;</span>s<span class="op">(</span>q<span class="op">=</span><span class="dv">12</span><span class="op">);</span>P<span class="op">(</span><span class="dv">48</span><span class="op">);</span>P<span class="op">(</span><span class="ch">&#39;}&#39;</span><span class="op">);</span>P<span class="op">(</span><span class="dv">59</span><span class="op">);</span>N<span class="op">;</span>q<span class="op">=</span><span class="dv">0</span><span class="op">;</span>L<span class="op">(</span><span class="dv">1</span><span class="op">);</span><span class="cf">for</span><span class="op">(</span>i<span class="op">=</span><span class="dv">5</span><span class="op">;</span>i<span class="op">&lt;</span><span class="dv">13</span><span class="op">;)</span>s<span class="op">(</span>i<span class="op">++),</span>N<span class="op">;</span>L<span class="op">(</span><span class="dv">2</span><span class="op">);}</span></span>
<span id="cb9-24"><a href="#cb9-24" aria-hidden="true" tabindex="-1"></a> c<span class="op">(</span>X<span class="op">){</span><span class="co">/*/X=- c(X){/*/</span>X<span class="op">=-</span></span>
<span id="cb9-25"><a href="#cb9-25" aria-hidden="true" tabindex="-1"></a> <span class="dv">0</span> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;</span>X<span class="op">=-</span> <span class="dv">0</span> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;</span>X<span class="op">=-</span> <span class="dv">0</span></span>
<span id="cb9-26"><a href="#cb9-26" aria-hidden="true" tabindex="-1"></a> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;}</span><span class="co">/*/ -1;F;}/*/</span></span>
<span id="cb9-24"><a href="#cb9-24" aria-hidden="true" tabindex="-1"></a> c<span class="op">(</span>X<span class="op">){</span><span class="co">/*/X=- c(X){/*/</span>X<span class="op">=-</span></span>
<span id="cb9-25"><a href="#cb9-25" aria-hidden="true" tabindex="-1"></a> <span class="dv">0</span> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;</span>X<span class="op">=-</span> <span class="dv">0</span> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;</span>X<span class="op">=-</span> <span class="dv">0</span></span>
<span id="cb9-26"><a href="#cb9-26" aria-hidden="true" tabindex="-1"></a> <span class="op">-</span><span class="dv">1</span><span class="op">;</span>F<span class="op">;}</span><span class="co">/*/ -1;F;}/*/</span></span>
<span id="cb9-27"><a href="#cb9-27" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb9-28"><a href="#cb9-28" aria-hidden="true" tabindex="-1"></a>ttt<span class="op">:</span> I win<span class="op">!</span></span></code></pre></div>
<p>Redirects stderr to <code>/dev/null</code> by default. If you need errors or warnings use
@@ -350,11 +350,11 @@ found. A template is scanned from bottom to top, right to left
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/
-->
@@ -419,7 +419,7 @@ found. A template is scanned from bottom to top, right to left
<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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -300,11 +300,11 @@ when compiled depending on the compiler.</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/
-->
@@ -374,7 +374,7 @@ when compiled depending on the compiler.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -237,11 +237,11 @@ Observation: “if it ends in a zero, it is divisible by ten”.</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/
-->
@@ -306,7 +306,7 @@ Observation: “if it ends in a zero, it is divisible by ten”.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -164,11 +164,11 @@ P1003 subcommittee.</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/
-->
@@ -233,7 +233,7 @@ P1003 subcommittee.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+22 -22
View File
@@ -207,36 +207,36 @@ place to site some references on the AE, but I don’t have any.</p>
<h3 id="definition-of-the-input-language-to-buzzard.1-or-what-exactly-do-all-the-macros-do">Definition of the input language to buzzard.1 (OR What Exactly Do All The Macros Do?)</h3>
<p>[Don’t read this unless you’re stumped!]</p>
<pre><code>
MACRO FUNCTION MNEMONIC
MACRO FUNCTION MNEMONIC
V begin variable declarations Variable
C begin program Code
V begin variable declarations Variable
C begin program Code
Q(b,a) let b = a eQuals
A(c,a,b) let c = a + b Add
S(c,a,b) let c = a - b Subtract
Q(b,a) let b = a eQuals
A(c,a,b) let c = a + b Add
S(c,a,b) let c = a - b Subtract
D(c,a,b) let c = a / b, where b is a *constant* Divide
U(c,a,b) let c = a / b, where b is anything Unknown
M(c,a,b) let c = a * b Multiply
M(c,a,b) let c = a * b Multiply
O(c,a,b) let c = a boolean-or b (a,b are 0 or 1) Or
B(b, a) let b = boolean value of a Boolean
P(b, a) let b = 1 if a&gt;0, else 0. Positive
B(b, a) let b = boolean value of a Boolean
P(b, a) let b = 1 if a&gt;0, else 0. Positive
l emit next sequential label Label
J(x) goto label #x Jump
l emit next sequential label Label
J(x) goto label #x Jump
Z(a,d) if a is 0 goto d (a is 0 or 1) Zero
E(a,d) if a is 1 goto d (a is 0 or 1) Else
Z(a,d) if a is 0 goto d (a is 0 or 1) Zero
E(a,d) if a is 1 goto d (a is 0 or 1) Else
H halt Haly
H halt Haly
K(x) let x = number of cmd line arguments Kount
G(x,y) let x = the value if the yth argument Get argument
T end of code; begin output section Terminate
X(y) print out hexadecimal value of y heXadecimal
T end of output section and program Terminate</code></pre>
T end of code; begin output section Terminate
X(y) print out hexadecimal value of y heXadecimal
T end of output section and program Terminate</code></pre>
<p>You can figure out the other macros yourself. In the sample program, I’ve
actually implemented subroutines by saving a return address in a variable and
then jumping to a routine– specifically, a routine that converts a number into
@@ -256,8 +256,8 @@ ourselves to two operand operations:</p>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a>temp <span class="op">-=</span> y<span class="op">;</span> <span class="op">(</span>temp <span class="op">==</span> z<span class="op">-</span>y<span class="op">)</span></span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a>temp <span class="op">*=</span> x<span class="op">;</span> <span class="op">(</span>temp <span class="op">==</span> <span class="op">(</span>z<span class="op">-</span>y<span class="op">)*</span>x<span class="op">)</span></span>
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a>y <span class="op">+=</span> temp<span class="op">;</span> <span class="op">(</span>y <span class="op">==</span> <span class="op">(</span>z<span class="op">-</span>y<span class="op">)*</span>x <span class="op">+</span> y<span class="op">)</span></span>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a> <span class="op">(</span> <span class="op">==</span> z<span class="op">*</span>x <span class="op">-</span> y<span class="op">*</span>x <span class="op">+</span> y<span class="op">)</span></span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a> <span class="op">(</span> <span class="op">==</span> z<span class="op">*</span>x <span class="op">+</span> y<span class="op">*(</span><span class="dv">1</span><span class="op">-</span>x<span class="op">))</span></span></code></pre></div>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a> <span class="op">(</span> <span class="op">==</span> z<span class="op">*</span>x <span class="op">-</span> y<span class="op">*</span>x <span class="op">+</span> y<span class="op">)</span></span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a> <span class="op">(</span> <span class="op">==</span> z<span class="op">*</span>x <span class="op">+</span> y<span class="op">*(</span><span class="dv">1</span><span class="op">-</span>x<span class="op">))</span></span></code></pre></div>
<p>Next we imagine we have a <a href="https://en.wikipedia.org/wiki/Program_counter">pc</a>.
“I’m supposed to execute statement pc next”, says our emulator. But suppose
we’re not currently coming up on statement pc. To handle this, we simply make
@@ -291,11 +291,11 @@ dedicated to the memory of Charles Barrett.</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/
-->
@@ -358,7 +358,7 @@ dedicated to the memory of Charles Barrett.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -149,11 +149,11 @@
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/
-->
@@ -190,7 +190,7 @@
<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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+155 -155
View File
@@ -188,64 +188,64 @@ when they are used. Normal instructions compile a pointer to their
executable part onto the end of the dictionary. As we will see, this
means that by default FIRST simply compiles things.</p>
<h4 id="integer-operations">Integer Operations</h4>
<pre><code>SYMBOL NAME FUNCTION
<pre><code>SYMBOL NAME FUNCTION
- binary minus pop top 2 elements of stack, subtract, push
- binary minus pop top 2 elements of stack, subtract, push
* multiply pop top 2 elements of stack, multiply, push
* multiply pop top 2 elements of stack, multiply, push
/ divide pop top 2 elements of stack, divide, push
/ divide pop top 2 elements of stack, divide, push
&lt;0 less than 0 pop top element of stack, push 1 if &lt; 0 else 0</code></pre>
&lt;0 less than 0 pop top element of stack, push 1 if &lt; 0 else 0</code></pre>
<p>Note that we can synthesize addition and negation from binary minus,
but we cannot synthesize a time efficient divide or multiply from it.
<code>&lt;0</code> is synthesize-able, but only in a non-portable way.</p>
<h4 id="memory-operations">Memory Operations</h4>
<pre><code>SYMBOL NAME FUNCTION
<pre><code>SYMBOL NAME FUNCTION
@ fetch pop top of stack, treat as address to push contents of
@ fetch pop top of stack, treat as address to push contents of
! store top of stack is address, 2nd is value; store to memory
and pop both off the stack</code></pre>
! store top of stack is address, 2nd is value; store to memory
and pop both off the stack</code></pre>
<h4 id="inputoutput-operations">Input/Output Operations</h4>
<pre><code>NAME FUNCTION
<pre><code>NAME FUNCTION
echo output top of stack through C&#39;s putchar()
echo output top of stack through C&#39;s putchar()
key push C&#39;s getchar() onto top of stack
key push C&#39;s getchar() onto top of stack
_read read a space-delimited word, find it in the
dictionary, and compile a pointer to
that word&#39;s code pointer onto the
current end of the dictionary</code></pre>
_read read a space-delimited word, find it in the
dictionary, and compile a pointer to
that word&#39;s code pointer onto the
current end of the dictionary</code></pre>
<p>Although <code>_read</code> could be synthesized from key, we need <code>_read</code> to be able
to compile words to be able to start any syntheses.</p>
<h4 id="execution-operations">Execution Operations</h4>
<pre><code>NAME FUNCTION
<pre><code>NAME FUNCTION
exit leave the current function: pop the return stack
into the program counter</code></pre>
exit leave the current function: pop the return stack
into the program counter</code></pre>
<h4 id="immediate-compilation-operations">Immediate (compilation) Operations</h4>
<pre><code>SYMBOL NAME FUNCTION
<pre><code>SYMBOL NAME FUNCTION
: define read in the next space-delimited word, add it to
the end of our string storage, and generate
a header for the new word so that when it
is typed it compiles a pointer to itself
so that it can be executed.
: define read in the next space-delimited word, add it to
the end of our string storage, and generate
a header for the new word so that when it
is typed it compiles a pointer to itself
so that it can be executed.
immediate immediate when used immediately after a name following a &#39;:&#39;,
it makes the word being defined run whenever
it is typed.</code></pre>
immediate immediate when used immediately after a name following a &#39;:&#39;,
it makes the word being defined run whenever
it is typed.</code></pre>
<p><code>:</code> cannot be synthesized, because we could not synthesize anything.
<code>immediate</code> has to be an immediate operation, so it could not be
synthesized unless by default operations were immediate; but that
would preclude our being able to do any useful compilation.</p>
<h4 id="stack-operations">Stack Operations</h4>
<pre><code>NAME FUNCTION
<pre><code>NAME FUNCTION
pick pop top of stack, use as index into stack and copy up
that element</code></pre>
pick pop top of stack, use as index into stack and copy up
that element</code></pre>
<p>If the data stack were stored in main memory, we could synthesize <code>pick</code>;
but putting the stack and stack pointer in main memory would significantly
increase the C source code size.</p>
@@ -264,16 +264,16 @@ word internally that it executes as its main loop. This word calls
up a word on the return stack, so it will eventually trash things.
This is discussed some more in section 2.</p>
<p>Here’s a handy summary of all the FIRST words:</p>
<pre><code>WORD DESCRIPTION
<pre><code>WORD DESCRIPTION
- * / binary integer operations on the stack
&lt;0 is top of stack less than 0?
@ ! read from or write to memory
echo key output or input one character
_read read a word from input and compile a pointer to it
exit stop running the current function
: compile the header of a definition
immediate modify the header to create an immediate word</code></pre>
- * / binary integer operations on the stack
&lt;0 is top of stack less than 0?
@ ! read from or write to memory
echo key output or input one character
_read read a word from input and compile a pointer to it
exit stop running the current function
: compile the header of a definition
immediate modify the header to create an immediate word</code></pre>
<p>Here is a sample FIRST program. I’m assuming you’re using
the ASCII character set. FIRST does not depend upon ASCII, but
since FIRST has no syntax for character constants, one normally has
@@ -286,26 +286,26 @@ differently if you wanted.</p>
inside parentheses. FIRST programs cannot have FORTH comments; but I need
some device to indicate what’s going on. (THIRD programs are an entirely
different subject.)</p>
<pre><code> ( Our first line gives the symbols for the built-ins )
<pre><code> ( Our first line gives the symbols for the built-ins )
: immediate _read @ ! - * / &lt;0 exit echo key _pick
( now we define a simple word that will print out a couple characters )
( now we define a simple word that will print out a couple characters )
: L ( define a word named &#39;L&#39; )
108 echo ( output an ascii &#39;l&#39; )
: L ( define a word named &#39;L&#39; )
108 echo ( output an ascii &#39;l&#39; )
exit
: hello ( define a word named &#39;hello&#39;)
72 echo ( output an ascii &#39;H&#39; )
101 echo ( output an ascii &#39;e&#39; )
111 ( push ascii &#39;o&#39; onto the stack )
L L ( output two ascii &#39;l&#39;s )
echo ( output the &#39;o&#39; we pushed on the stack before )
10 echo ( print a newline )
exit ( stop running this routine )
: hello ( define a word named &#39;hello&#39;)
72 echo ( output an ascii &#39;H&#39; )
101 echo ( output an ascii &#39;e&#39; )
111 ( push ascii &#39;o&#39; onto the stack )
L L ( output two ascii &#39;l&#39;s )
echo ( output the &#39;o&#39; we pushed on the stack before )
10 echo ( print a newline )
exit ( stop running this routine )
: test immediate ( define a word named &#39;test&#39; that runs whenever typed )
hello ( call hello )
: test immediate ( define a word named &#39;test&#39; that runs whenever typed )
hello ( call hello )
exit
test
@@ -362,11 +362,11 @@ word, from which you can never return. What it does is drops the top value off
the return stack, calls <code>_read</code>, then calls itself. Because it kills the top of
the return stack, it can recurse indefinitely.</p>
<pre><code>: ]
r @ Get the value of the return stack pointer
1 - Subtract one
r ! Store it back into the return stack pointer
_read Read and compile one word
] Start over</code></pre>
r @ Get the value of the return stack pointer
1 - Subtract one
r ! Store it back into the return stack pointer
_read Read and compile one word
] Start over</code></pre>
<p>Notice that we don’t need to exit, since we never come back. Also, it’s
possible that an immediate word may get run during <code>_read</code>, and that <code>_read</code>
will never return!</p>
@@ -376,12 +376,12 @@ main</code></pre>
<p>Next off, I’m going to do this the easy but non-portable way, and put some
character constant definitions in. I wanted them at the top of the file, but
that would have burned too much of the return stack.</p>
<pre><code>: &#39;&quot;&#39; 34 exit
: &#39;)&#39; 41 exit
: &#39;\n&#39; 10 exit
<pre><code>: &#39;&quot;&#39; 34 exit
: &#39;)&#39; 41 exit
: &#39;\n&#39; 10 exit
: &#39;space&#39; 32 exit
: &#39;0&#39; 48 exit
: &#39;-&#39; 45 exit
: &#39;0&#39; 48 exit
: &#39;-&#39; 45 exit
: cr &#39;\n&#39; echo exit</code></pre>
<p>Next, we want to define some temporary variables for locations <code>3</code>, <code>4</code>, and
@@ -421,18 +421,18 @@ make a generic pointer-advancing function.
Given a pointer to a memory location, increment the value
at that memory location.</p>
<pre><code>: inc
dup @ Get another copy of the address, and get the value
so now we have value, address on top of stack.
1 + Add one to the value
swap Swap to put the address on top of the stack
! exit Write it to memory
dup @ Get another copy of the address, and get the value
so now we have value, address on top of stack.
1 + Add one to the value
swap Swap to put the address on top of the stack
! exit Write it to memory
</code></pre>
<p><code>,</code> is a standard FORTH word. It should write the top of
stack into the dictionary, and advance the pointer</p>
<pre><code>: ,
h @ Get the value of the dictionary pointer
! Write the top of stack there
h inc And increment the dictionary pointer
h @ Get the value of the dictionary pointer
! Write the top of stack there
h inc And increment the dictionary pointer
exit</code></pre>
<p><code>'</code> is a standard FORTH word. It should push the address
of the word that follows it onto the stack. We could
@@ -443,25 +443,25 @@ stack will point into the instruction stream immediately
after the <code>'</code>. We push the word there, and advance the
return stack pointer so that we don’t execute it.</p>
<pre><code>: &#39;
r @ Get the address of the top of return stack
We currently have a pointer to the top of return stack
@ Get the value from there
We currently have a pointer to the instruction stream
dup Get another copy of it--the bottom copy will stick
around until the end of this word
1 + Increment the pointer, pointing to the NEXT instruction
r @ ! Write it back onto the top of the return stack
We currently have our first copy of the old pointer
to the instruction stream
@ Get the value there--the address of the &quot;next word&quot;
r @ Get the address of the top of return stack
We currently have a pointer to the top of return stack
@ Get the value from there
We currently have a pointer to the instruction stream
dup Get another copy of it--the bottom copy will stick
around until the end of this word
1 + Increment the pointer, pointing to the NEXT instruction
r @ ! Write it back onto the top of the return stack
We currently have our first copy of the old pointer
to the instruction stream
@ Get the value there--the address of the &quot;next word&quot;
exit
</code></pre>
<p>Now we’re set. <code>;</code> should be an immediate word that pushes
the address of <code>exit</code> onto the stack, then writes it out.</p>
<pre><code>: ; immediate
&#39; exit Get the address of exit
, Compile it
exit And we should return</code></pre>
&#39; exit Get the address of exit
, Compile it
exit And we should return</code></pre>
<p>Now let’s test out <code>;</code> by defining a useful word:</p>
<pre><code>: drop 0 * + ;</code></pre>
<p>Since we have <code>inc</code>, we ought to make <code>dec</code>:</p>
@@ -479,20 +479,20 @@ that off first… We better just bite the bullet and
code it out–but we can’t really break it into smaller
words, because that’ll trash the return stack.</p>
<pre><code>: tor
r @ @ Get the value off the top of the return stack
swap Bring the value to be pushed to the top of stack
r @ ! Write it over the current top of return stack
r @ 1 + r ! Increment the return stack pointer--but can&#39;t use inc
r @ ! Store our return address back on the return stack
r @ @ Get the value off the top of the return stack
swap Bring the value to be pushed to the top of stack
r @ ! Write it over the current top of return stack
r @ 1 + r ! Increment the return stack pointer--but can&#39;t use inc
r @ ! Store our return address back on the return stack
;</code></pre>
<p>Next we want the opposite routine, which pops the top
of the return stack, and puts it on the normal stack.</p>
<pre><code>: fromr
r @ @ Save old value
r @ 1 - r ! Decrement pointer
r @ @ Get value that we want off
swap Bring return address to top
r @ ! Store it and return
r @ @ Save old value
r @ 1 - r ! Decrement pointer
r @ @ Get value that we want off
swap Bring return address to top
r @ ! Store it and return
;</code></pre>
<p>Now, if we have a routine that’s recursing, and we
want to be polite about the return stack, right before
@@ -515,11 +515,11 @@ up.</p>
<pre><code>: &lt; - &lt;0 ;</code></pre>
<p><code>logical</code> turns the top of stack into either <code>0</code> or <code>1</code>.</p>
<pre><code>: logical
dup Get two copies of it
0 &lt; 1 if &lt; 0, 0 otherwise
swap minus Swap number back up, and take negative
0 &lt; 1 if original was &gt; 0, 0 otherwise
+ Add them up--has to be 0 or 1!
dup Get two copies of it
0 &lt; 1 if &lt; 0, 0 otherwise
swap minus Swap number back up, and take negative
0 &lt; 1 if original was &gt; 0, 0 otherwise
+ Add them up--has to be 0 or 1!
;</code></pre>
<p><code>not</code> returns 1 if top of stack is 0, and 0 otherwise</p>
<pre><code>: not logical bnot ;</code></pre>
@@ -531,12 +531,12 @@ an integer constant with the offset of how far to branch.
To branch, we use the return stack to read the offset, and
add that on to the top of the return stack, and return.</p>
<pre><code>: branch
r @ Address of top of return stack
@ Our return address
@ Value from there: the branch offset
r @ @ Our return address again
+ The address we want to execute at
r @ ! Store it back onto the return stack
r @ Address of top of return stack
@ Our return address
@ Value from there: the branch offset
r @ @ Our return address again
+ The address we want to execute at
r @ ! Store it back onto the return stack
;</code></pre>
<p>For conditional branches, we want to branch by a certain
amount if true, otherwise we want to skip over the branch
@@ -548,10 +548,10 @@ following computes the correct branch offset.</p>
<p>Branch if the value on top of the stack is <code>0</code>.</p>
<pre><code>: notbranch
not
r @ @ @ Get the branch offset
computebranch Adjust as necessary
r @ @ + Calculate the new address
r @ ! Store it
r @ @ @ Get the branch offset
computebranch Adjust as necessary
r @ @ + Calculate the new address
r @ ! Store it
;</code></pre>
<p><code>here</code> is a standard FORTH word which returns a pointer to
the current dictionary address–that is, the value of
@@ -564,27 +564,27 @@ we don’t know where the <code>then</code> will be. On the <em>stack</em>
we leave the address where we compiled the dummy offset.
<code>then</code> will calculate the offset and fill it in for us.</p>
<pre><code>: if immediate
&#39; notbranch , Compile notbranch
here Save the current dictionary address
0 , Compile a dummy value
&#39; notbranch , Compile notbranch
here Save the current dictionary address
0 , Compile a dummy value
;</code></pre>
<p><code>then</code> expects the address to <code>fixup</code> to be on the stack.</p>
<pre><code>: then immediate
dup Make another copy of the address
here Find the current location, where to branch to
swap - Calculate the difference between them
swap ! Bring the address to the top, and store it.
dup Make another copy of the address
here Find the current location, where to branch to
swap - Calculate the difference between them
swap ! Bring the address to the top, and store it.
;</code></pre>
<p>Now that we can do <code>if...then</code> statements, we can do
some parsing! Let’s introduce real FORTH comments.
<code>find-)</code> will scan the input until it finds a <code>)</code>, and
exit.</p>
<pre><code>: find-)
key Read in a character
&#39;)&#39; = Compare it to close parentheses
not if If it&#39;s not equal
tail find-) repeat (popping R stack)
then Otherwise branch here and exit
key Read in a character
&#39;)&#39; = Compare it to close parentheses
not if If it&#39;s not equal
tail find-) repeat (popping R stack)
then Otherwise branch here and exit
;
: ( immediate
@@ -598,35 +598,35 @@ exit.</p>
nest parentheses... )
: else immediate
&#39; branch , ( compile a definite branch )
here ( push the backpatching address )
0 , ( compile a dummy offset for branch )
swap ( bring old backpatch address to top )
dup here swap - ( calculate the offset from old address )
swap ! ( put the address on top and store it )
&#39; branch , ( compile a definite branch )
here ( push the backpatching address )
0 , ( compile a dummy offset for branch )
swap ( bring old backpatch address to top )
dup here swap - ( calculate the offset from old address )
swap ! ( put the address on top and store it )
;
: over _x! _y! _y _x _y ;
: add
_x! ( save the pointer in a temp variable )
_x @ ( get the value pointed to )
+ ( add the incremement from on top of the stack )
_x ! ( and save it )
_x! ( save the pointer in a temp variable )
_x @ ( get the value pointed to )
+ ( add the incremement from on top of the stack )
_x ! ( and save it )
;
: allot h add ;
: maybebranch
logical ( force the TOS to be 0 or 1 )
r @ @ @ ( load the branch offset )
computebranch ( calculate the condition offset [either TOS or 1])
r @ @ + ( add it to the return address )
r @ ! ( store it to our return address and return )
logical ( force the TOS to be 0 or 1 )
r @ @ @ ( load the branch offset )
computebranch ( calculate the condition offset [either TOS or 1])
r @ @ + ( add it to the return address )
r @ ! ( store it to our return address and return )
;
: mod _x! _y! ( get x then y off of stack )
_y _y _x / _x * ( y - y / x * x )
: mod _x! _y! ( get x then y off of stack )
_y _y _x / _x * ( y - y / x * x )
-
;
@@ -694,10 +694,10 @@ exit.</p>
;
: do immediate
&#39; swap , ( compile &#39;swap&#39; to swap the limit and start )
&#39; tor , ( compile to push the limit onto the return stack )
&#39; tor , ( compile to push the start on the return stack )
here ( save this address so we can branch back to it )
&#39; swap , ( compile &#39;swap&#39; to swap the limit and start )
&#39; tor , ( compile to push the limit onto the return stack )
&#39; tor , ( compile to push the start on the return stack )
here ( save this address so we can branch back to it )
;
: i r @ 1 - @ ;
@@ -708,13 +708,13 @@ exit.</p>
: &gt;= swap &lt;= ;
: inci
r @ 1 - ( get the pointer to i )
inc ( add one to it )
r @ 1 - ( get the pointer to i )
inc ( add one to it )
r @ 1 - @ ( find the value again )
r @ 2 - @ ( find the limit value )
r @ 2 - @ ( find the limit value )
&lt;=
if
r @ @ @ r @ @ + r @ ! exit ( branch )
r @ @ @ r @ @ + r @ ! exit ( branch )
then
fromr 1 +
fromr drop
@@ -726,10 +726,10 @@ exit.</p>
: loopexit
fromr drop ( pop off our return address )
fromr drop ( pop off i )
fromr drop ( pop off the limit of i )
; ( and return to the caller&#39;s caller routine )
fromr drop ( pop off our return address )
fromr drop ( pop off i )
fromr drop ( pop off the limit of i )
; ( and return to the caller&#39;s caller routine )
: execute
8 !
@@ -827,11 +827,11 @@ _welcome</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/
-->
@@ -868,7 +868,7 @@ _welcome</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -316,11 +316,11 @@ and thus indirectly inspiring me to write this program.</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/
-->
@@ -398,7 +398,7 @@ and thus indirectly inspiring me to write this program.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+10 -10
View File
@@ -159,15 +159,15 @@ following locations though the last one is more ironic:</p>
<pre><code>/usr/share/dict/words
/usr/share/lib/spell/words
/usr/ucblib/dict/words
/dev/null # &lt;-- for machines with nothing to say</code></pre>
/dev/null # &lt;-- for machines with nothing to say</code></pre>
<p>Then using the proper dictionary file it does:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> free software foundation <span class="op">&lt;</span> /usr/share/dict/words</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> obfuscated c contest <span class="op">&lt;</span> /usr/share/dict/words</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> unix international <span class="op">&lt;</span> /usr/share/dict/words</span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> george bush <span class="op">&lt;</span> /usr/share/dict/words</span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> bill clinton <span class="op">&lt;</span> /usr/share/dict/words</span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> ross perot <span class="op">&lt;</span> /usr/share/dict/words</span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> paul e tsongas <span class="op">&lt;</span> /usr/share/dict/words</span></code></pre></div>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> obfuscated c contest <span class="op">&lt;</span> /usr/share/dict/words</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> unix international <span class="op">&lt;</span> /usr/share/dict/words</span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> george bush <span class="op">&lt;</span> /usr/share/dict/words</span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> bill clinton <span class="op">&lt;</span> /usr/share/dict/words</span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> ross perot <span class="op">&lt;</span> /usr/share/dict/words</span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a><span class="ex">./ag</span> paul e tsongas <span class="op">&lt;</span> /usr/share/dict/words</span></code></pre></div>
<p>where <code>/usr/share/dict/words</code> is the dictionary file.</p>
<p>Then it uses the <a href="mkdict.sh">mkdict.sh</a> script to create a dictionary file out
of the files <a href="README.md">README.md</a>, <a href="try.sh">try.sh</a> (itself) and
@@ -341,11 +341,11 @@ the word directly from standard input to standard 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/
-->
@@ -409,7 +409,7 @@ the word directly from standard input to standard 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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+8 -8
View File
@@ -232,23 +232,23 @@ raster size; not a good idea!).</p>
<h3 id="options">Options</h3>
<p>The options of this program are:</p>
<pre><code>-centre x y (float x,y) Centre the picture at x+iy in the complex
plane (default x=0 y=0)
plane (default x=0 y=0)
-factor f (float f) Use f pixels per unit of the plane (default
f=x/4 where x is the width)
f=x/4 where x is the width)
-julia x y (float x,y) Draw a julia set. Use x+iy as the constant
to add after squaring (default x=0 y=0)
to add after squaring (default x=0 y=0)
-limit l (int l) Use l iterations maximum (default l=128)
-mask m (int m) Use m as a mask in deciding the colour of each
pixel (see below) (default m=1)
pixel (see below) (default m=1)
-size x y (int x,y) Produce an x-by-y output (default for raster
x=768 y=768; default for text x=63 y=23)
x=768 y=768; default for text x=63 y=23)
-text Produce text instead of raster.</code></pre>
<p>The colour of each point is determined by taking the bitwise AND of the
@@ -272,11 +272,11 @@ standard error to indicate its progress (one dot per pixel line).</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/
-->
@@ -339,7 +339,7 @@ standard error to indicate its progress (one dot per pixel line).</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -199,11 +199,11 @@ to serve as official taste testers. Yummo!</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/
-->
@@ -266,7 +266,7 @@ to serve as official taste testers. Yummo!</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -240,11 +240,11 @@ event loop at the end of program. It is not a bug, it’s a feature!</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/
-->
@@ -307,7 +307,7 @@ event loop at the end of program. It is not a bug, it’s a feature!</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -163,11 +163,11 @@ generates when compiling the source.</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/
-->
@@ -230,7 +230,7 @@ generates when compiling the source.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -165,11 +165,11 @@ number, all the other eight numbers next to it decrease and vice-versa.</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/
-->
@@ -231,7 +231,7 @@ number, all the other eight numbers next to it decrease and vice-versa.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -227,11 +227,11 @@ operator, or argument separator?).</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/
-->
@@ -294,7 +294,7 @@ operator, or argument separator?).</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+5 -5
View File
@@ -148,13 +148,13 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<pre><code>STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#1992_vern">1992 vern 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">./vern</span> 3 <span class="co"># &lt;-- default is 2</span></span></code></pre></div>
<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">./vern</span> 3 <span class="co"># &lt;-- default is 2</span></span></code></pre></div>
<h2 id="try">Try:</h2>
<p>You might start off by giving the following input:</p>
<pre><code>63 43
76 55
71 52
67 57 # &lt;-- this may take a while</code></pre>
67 57 # &lt;-- this may take a while</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The judges assume no responsibility for the obfuscated opening
suggested above. :-)</p>
@@ -262,11 +262,11 @@ nearest multiple of <code>4</code>, and then the other constants are derived fro
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/
-->
@@ -328,7 +328,7 @@ nearest multiple of <code>4</code>, and then the other constants are derived fro
<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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+5 -5
View File
@@ -171,10 +171,10 @@ so one can try the same script for both:</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">./try.sh</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>To find the approximate place where this entry was judged, type:</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">./whereami</span> 37 <span class="at">-122</span> <span class="co"># </span><span class="al">NOTE</span><span class="co">: - means west of meridian</span></span>
<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">./whereami</span> 37 <span class="at">-122</span> <span class="co"># </span><span class="al">NOTE</span><span class="co">: - means west of meridian</span></span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="co"># or if you don&#39;t have curses installed:</span></span>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./westley</span> 37 <span class="at">-122</span> <span class="co"># </span><span class="al">NOTE</span><span class="co">: - means west of meridian</span></span></code></pre></div>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./westley</span> 37 <span class="at">-122</span> <span class="co"># </span><span class="al">NOTE</span><span class="co">: - means west of meridian</span></span></code></pre></div>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>Run the program with your latitude &amp; longitude as integer
arguments; it will produce a map made up of <code>'!'</code> with the given
@@ -258,11 +258,11 @@ joined together as one 160-character line and listed. You should see:</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 @@ joined together as one 160-character line and listed. You should see:</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -174,11 +174,11 @@ more information.</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/
-->
@@ -244,7 +244,7 @@ more information.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -207,11 +207,11 @@ which in turn is based on it’s area and speed. How silly!</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/
-->
@@ -274,7 +274,7 @@ which in turn is based on it’s area and speed. How silly!</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -193,11 +193,11 @@ necessary to recurse <code>main()</code> in two “directions” simultaneously.
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/
-->
@@ -266,7 +266,7 @@ necessary to recurse <code>main()</code> in two “directions” simultaneously.
<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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -138,11 +138,11 @@ exponential in the number rings.</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/
-->
@@ -179,7 +179,7 @@ exponential in the number rings.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -202,11 +202,11 @@ compiler since it uses <code>signed char</code> and ANSI-style function declarat
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/
-->
@@ -273,7 +273,7 @@ compiler since it uses <code>signed char</code> and ANSI-style function declarat
<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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -264,11 +264,11 @@ exponential in the number of rings.</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/
-->
@@ -305,7 +305,7 @@ exponential in the number of rings.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+3 -3
View File
@@ -175,11 +175,11 @@ to serve as official taste testers. And as usual, the food was excellent.</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/
-->
@@ -240,7 +240,7 @@ to serve as official taste testers. And as usual, the food was excellent.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+4 -4
View File
@@ -148,7 +148,7 @@ install <a href="https://www.xquartz.org">XQuartz</a> in order to compile and ru
entry.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./jonth</span> <span class="co"># must be run on an X11 server</span></span></code></pre></div>
<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">./jonth</span> <span class="co"># must be run on an X11 server</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Use <code>h</code> and <code>l</code> to shift objects left or right. Use <code>k</code> to
rotate and press SPACE to drop.</p>
@@ -166,11 +166,11 @@ This program will not work on machines where <code>sizeof(int)!=sizeof(void *)</
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/
-->
@@ -232,7 +232,7 @@ This program will not work on machines where <code>sizeof(int)!=sizeof(void *)</
<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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+4 -4
View File
@@ -205,18 +205,18 @@ backspaces. Do “disable scrolling” on cmdtool or similar emulators.</p>
(2): ???? 3355
00
(1): ???? 6444
40 # we have guessed the number</code></pre>
40 # we have guessed the number</code></pre>
<!--
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/
-->
@@ -278,7 +278,7 @@ backspaces. Do “disable scrolling” on cmdtool or similar emulators.</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 &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
Loaded 100 of 402 files, more files were not shown because too many files have changed in this diff. Show more