force use of pandoc version >= 3.1.12.2

The `bin/pandoc-wrapper.sh` tool will verify that the ssytem
has a recent enough version of `pandoc(1)`.

We explain why we insist on `pandoc(1)`. version >= 3.1.12.2
in comments where the $PANDOC_MIN_VERSION is set.

Added `--wrap=preserve` as a default argument to `pandoc(1)`.
While this change will impact every HTML file generated,
we believe this will improve the ability of someone to look
at the generated HTML and correlate with the original markdown.

Changed `bin/pandoc-wrapper.sh` VERSION from "1.4.2 2024-03-17"
to "1.4.3 2024-03-18".

Performed `make www` to achieve all of the above and to generate
HTML using the new  `--wrap=preserve` `pandoc(1)` mode.
This commit is contained in:
Landon Curt Noll committed 2024-03-18 01:26:39 -07:00
1 parent 9eb7a54e9f
commit b0b212acb1
402 files changed
+37061 -55132

No files matched your search

+74 -126
View File
@@ -144,14 +144,12 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code>STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a
href="../../bugs.html#2013_endoh3">2013 endoh3 bugs</a>.</p>
<p>For more detailed information see <a href="../../bugs.html#2013_endoh3">2013 endoh3 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">./endoh3</span></span></code></pre></div>
<p>This program plays sound. See <a href="../../faq.html#sox">FAQ 3.10 -
How do I compile and use an IOCCC entry that requires sound?</a> if you
do not know how to set your system up for this or if you want to verify
that everything is oky.</p>
<p>This program plays sound. See <a href="../../faq.html#sox">FAQ 3.10 - How do I compile and use an IOCCC
entry that requires sound?</a> if you do not know how to set your
system up for this or if you want to verify that everything is oky.</p>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
@@ -160,59 +158,50 @@ that everything is oky.</p>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> test.abc yankee.abc</span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> <span class="pp">*</span>.abc</span></code></pre></div>
<p>The script will check for SoX first and next <code>padsp</code> from
<code>PulseAudio</code> and finally if neither are found if you have
<code>ruby(1)</code> installed it’ll use the included ruby script to
convert it to a WAV file for you to play.</p>
<p>If no args are passed to the script it will play <a
href="twinkle.abc">twinkle.abc</a> and the string <code>ABC</code>.
Otherwise while there’s a remaining arg if it’s a file it will run the
program on the file. If it’s not a file it’ll run it as a string.</p>
<p>The script will check for SoX first and next <code>padsp</code> from <code>PulseAudio</code> and
finally if neither are found if you have <code>ruby(1)</code> installed it’ll use the
included ruby script to convert it to a WAV file for you to play.</p>
<p>If no args are passed to the script it will play <a href="twinkle.abc">twinkle.abc</a> and
the string <code>ABC</code>. Otherwise while there’s a remaining arg if it’s a file it will
run the program on the file. If it’s not a file it’ll run it as a string.</p>
<p>The <code>*.abc</code> files are provided as music samples.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This program can toot out a tune that is small enough to posted to
most social media platforms that have small message length limits.</p>
<p>This program can toot out a tune that is small enough to posted to most social
media platforms that have small message length limits.</p>
<p>This endoh3ram can toot out a tune that is small enough.</p>
<h3
id="a-modern-day-2023-note-about-the-award-most-tweetable-1-liner-and-twitter">A
modern day (2023) note about the award ‘Most tweetable 1-liner’ and
twitter:</h3>
<p>The IOCCC no longer endorses the use of what was once twitter, or
whatever it might be called today. We recommend that you pick a
responsible social media platform to post the program’s output on.
Nevertheless the award of this entry will remain the same for historical
purposes.</p>
<h3 id="a-modern-day-2023-note-about-the-award-most-tweetable-1-liner-and-twitter">A modern day (2023) note about the award ‘Most tweetable 1-liner’ and twitter:</h3>
<p>The IOCCC no longer endorses the use of what was once twitter, or whatever it
might be called today. We recommend that you pick a responsible social media
platform to post the program’s output on. Nevertheless the award of this entry
will remain the same for historical purposes.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="remarks">Remarks</h3>
<p>This is a sound synthesizer for a subset of <a
href="http://en.wikipedia.org/wiki/ABC_notation">ABC music
<p>This is a sound synthesizer for a subset of <a href="http://en.wikipedia.org/wiki/ABC_notation">ABC music
notation</a>.</p>
<p>Try:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-o</span> endoh3 endoh3.c</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&quot;CDEFGABc&quot;</span> <span class="kw">|</span> <span class="ex">./endoh3</span> <span class="op">&gt;</span> /dev/dsp</span></code></pre></div>
<p>If <code>/dev/dsp</code> is not available on your system, use an OSS
sound wrapper such as <code>padsp</code> or <code>aoss</code>:</p>
<p>If <code>/dev/dsp</code> is not available on your system, use an OSS sound wrapper such
as <code>padsp</code> or <code>aoss</code>:</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="bu">echo</span> <span class="st">&quot;CDEFGABc&quot;</span> <span class="kw">|</span> <span class="ex">./endoh3</span> <span class="kw">|</span> <span class="ex">padsp</span> tee /dev/dsp <span class="op">&gt;</span> /dev/null</span></code></pre></div>
<p>If you are using Mac OS X, try <a
href="http://sox.sourceforge.net/">sox</a> like so:</p>
<p>If you are using Mac OS X, try <a href="http://sox.sourceforge.net/">sox</a> like so:</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="bu">echo</span> <span class="st">&quot;CDEFGABc&quot;</span> <span class="kw">|</span> <span class="ex">./endoh3</span> <span class="kw">|</span> <span class="fu">sox</span> <span class="at">-q</span> <span class="at">-traw</span> <span class="at">-r8000</span> <span class="at">-b8</span> <span class="at">-e</span> unsigned-integer <span class="at">-</span> <span class="at">-tcoreaudio</span></span></code></pre></div>
<p>If that does not work, use the attached script to convert the output
into a wave file format:</p>
<p>If that does not work, use the attached script to convert the output into a wave
file format:</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="bu">echo</span> <span class="st">&quot;CDEFGABc&quot;</span> <span class="kw">|</span> <span class="ex">./endoh3</span> <span class="kw">|</span> <span class="ex">ruby</span> wavify.rb <span class="op">&gt;</span> cde.wav</span></code></pre></div>
<p>and play <code>cde.wav</code>.</p>
<p>You can also enjoy some music scores that I attached. With
<code>/dev/dsp</code> you can do so like:</p>
<p>You can also enjoy some music scores that I attached. With <code>/dev/dsp</code> you can
do so like:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span> twinkle.abc <span class="kw">|</span> <span class="ex">./endoh3</span> <span class="op">&gt;</span> /dev/dsp</span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span> menuet.abc <span class="kw">|</span> <span class="ex">./endoh3</span> <span class="op">&gt;</span> /dev/dsp</span></code></pre></div>
<p>but you should be able to modify it a way to meet your system
requirements as described above.</p>
<p>but you should be able to modify it a way to meet your system requirements as
described above.</p>
<h3 id="obfuscation">Obfuscation</h3>
<p>The following sequence of questions may be helpful to understand the
<code>endoh3ram</code> program:</p>
<p>The following sequence of questions may be helpful to understand the <code>endoh3ram</code>
program:</p>
<ul>
<li>How does it convert ABC notes into the frequency?</li>
<li>What is <code>89/84.</code>? I found it by using the <a
href="https://en.wikipedia.org/wiki/Stern-Brocot_tree">Stern-Brocot
<li>What is <code>89/84.</code>? I found it by using the <a href="https://en.wikipedia.org/wiki/Stern-Brocot_tree">Stern-Brocot
tree</a>.</li>
<li>How does it generate a wave? Hint: it generates a saw wave.</li>
</ul>
@@ -221,10 +210,8 @@ tree</a>.</li>
<ul>
<li>Notes:
<ul>
<li><code>C</code> <code>D</code> <code>E</code> <code>F</code>
<code>G</code> <code>A</code> <code>B</code> (in low octave)</li>
<li><code>c</code> <code>d</code> <code>e</code> <code>f</code>
<code>g</code> <code>a</code> <code>b</code> (in high octave)</li>
<li><code>C</code> <code>D</code> <code>E</code> <code>F</code> <code>G</code> <code>A</code> <code>B</code> (in low octave)</li>
<li><code>c</code> <code>d</code> <code>e</code> <code>f</code> <code>g</code> <code>a</code> <code>b</code> (in high octave)</li>
</ul></li>
<li>Rests: <code>z</code></li>
<li>Note lengths:
@@ -250,8 +237,8 @@ tree</a>.</li>
<li>Bar line, repeat, ties and slurs, and everything else.</li>
</ul>
<h3 id="known-bugs">Known Bugs</h3>
<p>You can <em>NOT</em> write a note length immediately followed by a
note <code>E</code>, such as <code>C2E2</code>.</p>
<p>You can <em>NOT</em> write a note length immediately followed by a note <code>E</code>,
such as <code>C2E2</code>.</p>
<p>Can you figure out why?</p>
<p>A workaround is inserting a whitespace: <code>C2 E2</code>.</p>
<h3 id="portability">Portability</h3>
@@ -261,20 +248,17 @@ note <code>E</code>, such as <code>C2E2</code>.</p>
<li>Mac OS X 10.6 with gcc 4.2.1 and clang 1.7.</li>
</ul>
<h3 id="legal">Legal</h3>
<p>I believe that all the scores that I attached are
out-of-copyright.</p>
<p>I did write a score of the Happy Birthday song too. (It does not
matter because the song is out-of-copyright in my country.) But I do not
attach it to protect you from W****r.</p>
<p>For the same reason, do not post a score that contains only
<code>z1092</code>. You know, it is <a
href="http://en.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3">“the famous
song”</a>.</p>
<p>I believe that all the scores that I attached are out-of-copyright.</p>
<p>I did write a score of the Happy Birthday song too.
(It does not matter because the song is out-of-copyright in my country.)
But I do not attach it to protect you from W****r.</p>
<p>For the same reason, do not post a score that contains only <code>z1092</code>.
You know, it is <a href="http://en.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3">“the famous song”</a>.</p>
<h3 id="spoiler">Spoiler</h3>
<p>Here is a magical expression which I found by brute-force:</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="op">(</span>c <span class="op">%</span> <span class="dv">32</span> <span class="op">+</span> <span class="dv">5</span><span class="op">)</span> <span class="op">*</span> <span class="dv">9</span> <span class="op">/</span> <span class="dv">5</span> <span class="op">%</span> <span class="dv">13</span> <span class="op">+</span> n <span class="op">/</span> <span class="dv">32</span> <span class="op">*</span> <span class="dv">12</span> <span class="op">-</span> <span class="dv">22</span></span></code></pre></div>
<p>Interestingly, it converts an ASCII number of ABC notes to the
corresponding tone number.</p>
<p>Interestingly, it converts an ASCII number of ABC notes
to the corresponding tone number.</p>
<pre><code>&#39;C&#39; (ASCII 67) =&gt; 3
&#39;D&#39; (ASCII 68) =&gt; 5
&#39;E&#39; (ASCII 69) =&gt; 7
@@ -289,97 +273,61 @@ corresponding tone number.</p>
&#39;g&#39; (ASCII 103) =&gt; 22
&#39;a&#39; (ASCII 97) =&gt; 24
&#39;b&#39; (ASCII 98) =&gt; 26</code></pre>
<p>By the way, you can write a half-tone by the following
characters.</p>
<p>By the way, you can write a half-tone by the following characters.</p>
<pre><code>&#39;K&#39; =&gt; 4 (= C#)
&#39;L&#39; =&gt; 6 (= D#)
&#39;U&#39; =&gt; 8 (= F#)
&#39;V&#39; =&gt; 11 (= G#)
&#39;P&#39; =&gt; 13 (= A#)</code></pre>
<p>Note that the tone numbers simply enumerate the semi-tone steps. So
we can calculate the frequency easily: <code>pow(2, n / 12.0)</code>.
Then, how can we calculate <code>pow</code> without <code>math.h</code>?
<code>pow(2, 1.0 / 12.0)</code> is approximated by <code>89/84.</code>.
(I found this approximation by using the <a
href="http://en.wikipedia.org/wiki/Stern%E2%80%93Brocot_tree">Stern-Brocot
tree</a>.) We can gain the frequency by multiplying the value by
<code>n</code> times.</p>
<p>Note that the tone numbers simply enumerate the semi-tone steps. So we can
calculate the frequency easily: <code>pow(2, n / 12.0)</code>. Then, how can we calculate
<code>pow</code> without <code>math.h</code>? <code>pow(2, 1.0 / 12.0)</code> is approximated by <code>89/84.</code>. (I
found this approximation by using the <a href="http://en.wikipedia.org/wiki/Stern%E2%80%93Brocot_tree">Stern-Brocot
tree</a>.) We can gain the
frequency by multiplying the value by <code>n</code> times.</p>
<p>Finally, the following code generates a saw wave:</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span><span class="op">(</span>c <span class="op">=</span> <span class="dv">0</span><span class="op">;</span> c <span class="op">&lt;</span> len<span class="op">;</span> c<span class="op">++)</span> putchar<span class="op">(</span>a <span class="op">=</span> n <span class="op">*</span> D<span class="op">);</span></span></code></pre></div>
<p>where <code>D</code> is a frequency and <code>a</code> is a variable
whose type is <code>char</code>. By assigning <code>float</code> to
<code>char</code> variable, the implicit type conversion is performed
<p>where <code>D</code> is a frequency and <code>a</code> is a variable whose type is <code>char</code>. By
assigning <code>float</code> to <code>char</code> variable, the implicit type conversion is performed
from <code>float</code> to <code>char</code> (modulo 256).</p>
<p>(Strictly speaking, this behavior is undefined according to 6.3.1.4
in C99; you can replace it with <code>(long)(n*D)</code> if you are
pedantic.)</p>
<p>All that was left was to combine and condense the components. The key
is squashing them into just one <code>for</code>-loop.</p>
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
License:</h2>
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
Reserved. You are free to share and adapt this file under the terms of
this license:</p>
<p>(Strictly speaking, this behavior is undefined according to 6.3.1.4 in C99; you
can replace it with <code>(long)(n*D)</code> if you are pedantic.)</p>
<p>All that was left was to combine and condense the components. The key is
squashing them into just one <code>for</code>-loop.</p>
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0 License:</h2>
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved.
You are free to share and adapt this file under the terms of this license:</p>
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
<p>For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/</p>
<p>For more information, see: https://creativecommons.org/licenses/by-sa/4.0/</p>
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.sh -->
<!-- START: this line starts content generated by: bin/output-index-inventory.sh -->
<h1 id="inventory-for-2013endoh3"><a name="inventory"></a>Inventory for
2013/endoh3</h1>
<h1 id="inventory-for-2013endoh3"><a name="inventory"></a>Inventory for 2013/endoh3</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/endoh3.c">endoh3.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/endoh3.orig.c">endoh3.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/flea-waltz.abc">flea-waltz.abc</a>
- sample input</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/menuet.abc">menuet.abc</a>
- sample input</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/test.abc">test.abc</a>
- sample input</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/try.sh">try.sh</a>
- how to run</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/twinkle.abc">twinkle.abc</a>
- sample input</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/wavify.rb">wavify.rb</a>
- post process output to form a WAV sound file</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/yankee.abc">yankee.abc</a>
- sample input</li>
<li><a href="2013_endoh3.tar.bz2">2013_endoh3.tar.bz2</a> - download
entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/endoh3.c">endoh3.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/endoh3.orig.c">endoh3.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/flea-waltz.abc">flea-waltz.abc</a> - sample input</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/menuet.abc">menuet.abc</a> - sample input</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/test.abc">test.abc</a> - sample input</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/twinkle.abc">twinkle.abc</a> - sample input</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/wavify.rb">wavify.rb</a> - post process output to form a WAV sound file</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/yankee.abc">yankee.abc</a> - sample input</li>
<li><a href="2013_endoh3.tar.bz2">2013_endoh3.tar.bz2</a> - download entry source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/.entry.json">.entry.json</a>
- description of entry in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/.gitignore">.gitignore</a>
- list of files that should not be committed under git</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/.gitignore">.gitignore</a> - list of files that should not be committed under git</li>
<li><a href=".path">.path</a> - directory path from top directory</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/README.md">README.md</a>
- markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/README.md">README.md</a> - markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->