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

+72 -99
View File
@@ -129,10 +129,9 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a
href="../../authors.html#Pierre-Philippe_Coupard">Pierre-Philippe
Coupard</a><br> Location: <a href="../../location.html#ZZ">ZZ</a> -
<em>Unknown location</em> <br><br></li>
<li>Name: <a href="../../authors.html#Pierre-Philippe_Coupard">Pierre-Philippe Coupard</a><br>
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
<br><br></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -148,27 +147,26 @@ Coupard</a><br> Location: <a href="../../location.html#ZZ">ZZ</a> -
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>You may need to run this a few times to understand exactly what is
being said. You might even need to look somewhere on your desktop, your
arm or the wall for confirmation.</p>
being said. You might even need to look somewhere on your desktop,
your arm or the wall for confirmation.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>Past years’ IOCCC entries do many marvellous things in small
packages, such as console utilities, games, math, languages or even X
<p>Past years’ IOCCC entries do many marvellous things in small packages,
such as console utilities, games, math, languages or even X
applications. But they all have one thing in common (despite being hard
to read obviously): when they interact with the user, they only
<em>display</em> things, i.e. they display either text or drawings.</p>
<p>So, for a change, this program titillates the sense of hearing
instead of sight: this program is a self-contained speech synthesizer
that tells the current time through the computer’s sound card - in just
under 2 Kb of source code !</p>
<p>In the 2001 IOCCC <a href="../../2001/rules.txt">rules</a> and <a
href="../../2001/guidelines.txt">guidelines</a> documents, there is no
mention of what is or isn’t acceptable regarding audio I/O, but it is
mentioned that hardware-specific and/or non-portable programs are not
welcome. So, in order to do audio and satisfy those requirements, the
format required by <code>/dev/audio</code> has been chosen:
<code>/dev/audio</code> is a rather ancient fixed-format audio interface
that is supported by the majority of Unices that can do sound, as a
lowest-denominator sound I/O interface.</p>
<p>So, for a change, this program titillates the sense of hearing instead
of sight: this program is a self-contained speech synthesizer that
tells the current time through the computer’s sound card - in just under
2 Kb of source code !</p>
<p>In the 2001 IOCCC <a href="../../2001/rules.txt">rules</a> and
<a href="../../2001/guidelines.txt">guidelines</a> documents, there is no mention of
what is or isn’t acceptable regarding audio I/O, but it is mentioned
that hardware-specific and/or non-portable programs are not welcome. So,
in order to do audio and satisfy those requirements, the format required
by <code>/dev/audio</code> has been chosen: <code>/dev/audio</code> is a rather ancient
fixed-format audio interface that is supported by the majority of Unices
that can do sound, as a lowest-denominator sound I/O interface.</p>
<h3 id="program-usage">Program usage</h3>
<p>To listen to what the program says directly, invoke</p>
<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">./coupard</span> <span class="op">&gt;</span> /dev/audio</span></code></pre></div>
@@ -177,40 +175,36 @@ lowest-denominator sound I/O interface.</p>
<p>The time is HH hours MM minutes SS seconds</p>
</blockquote>
<p>in military time (24 hours). Of course, you need to have permissions
to write to <code>/dev/audio</code>, have your sound card enabled, the
volume up, the speakers connected … :-)</p>
<p>If you want to convert the audio output of the program into another
audio format, you can pipe it to <a
href="https://en.wikipedia.org/wiki/SoX">SoX</a> for example
(<code>sox</code> is the Swiss army knife of Unix audio tools). The
command:</p>
to write to <code>/dev/audio</code>, have your sound card enabled, the volume up,
the speakers connected … :-)</p>
<p>If you want to convert the audio output of the program into another audio
format, you can pipe it to <a href="https://en.wikipedia.org/wiki/SoX">SoX</a> for example
(<code>sox</code> is the Swiss army knife of Unix audio tools). The command:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./coupard</span> <span class="kw">|</span> <span class="fu">sox</span> <span class="at">-c1</span> <span class="at">-r8000</span> <span class="at">-tub</span> <span class="at">-</span> <span class="at">-c2</span> <span class="at">-r44100</span> <span class="at">-twav</span> test.wav</span></code></pre></div>
<p>converts the output of the program into a 44.1KHz stereo .WAV file
and saves it into <code>test.wav</code>.</p>
<p>converts the output of the program into a 44.1KHz stereo .WAV
file and saves it into <code>test.wav</code>.</p>
<p>The output format of the program is 8KHz, unsigned 8-bit samples.</p>
<p>NOTE: the program’s return code is meaningless.</p>
<h3 id="audio-quality">Audio quality</h3>
<p>The quality of the sound produced by the program is cross between a
<a
href="https://en.wikipedia.org/wiki/Tin_can_telephone">yogurt-pot-and-string
telephone</a> and a bad <a
href="https://en.wikipedia.org/wiki/Phonograph">gramophone</a>, i.e. the
S/N ratio is very low and the signal’s top frequency is very low as
well. This is because the audio is stored internally at a sampling rate
of 4KHz (the <a
href="https://en.wikipedia.org/wiki/Nyquist_frequency">Nyquist
frequency</a> is only 2KHz) with only 4-bit samples (adding 24db of
quantization noise to an already poor signal).</p>
<a href="https://en.wikipedia.org/wiki/Tin_can_telephone">yogurt-pot-and-string
telephone</a> and a bad
<a href="https://en.wikipedia.org/wiki/Phonograph">gramophone</a>, i.e. the S/N ratio is
very low and the signal’s top frequency is very low as well. This is because
the audio is stored internally at a sampling rate of 4KHz (the <a href="https://en.wikipedia.org/wiki/Nyquist_frequency">Nyquist
frequency</a> is only 2KHz) with
only 4-bit samples (adding 24db of quantization noise to an already poor
signal).</p>
<p>In short, you might have to listen twice to understand what the
program is saying. 2048 bytes including the sound generation program
doesn’t leave much room for audio quality ;-)</p>
<h3 id="speech-generation">Speech generation</h3>
<p>Only 9 phonemes are used to generate the speech. Beside the limited
number of words the program has to generate (66 words), the low sound
quality is actually exploited to take liberties with certain consonants
(for example, <code>s</code> and <code>f</code> sound very much the same
at 4KHz, so they can be merged into one phoneme). Because the <a
href="https://en.wikipedia.org/wiki/Psychoacoustics">psychoacoustic</a>
quality is actually exploited to take liberties with certain
consonants (for example, <code>s</code> and <code>f</code> sound very much the same at 4KHz,
so they can be merged into one phoneme). Because the
<a href="https://en.wikipedia.org/wiki/Psychoacoustics">psychoacoustic</a>
context around those phonemes is just sufficient, the words can be
interpreted correctly most of the time despite the fact that they are
pronounced quite wrongly.</p>
@@ -220,78 +214,57 @@ externally.</p>
<h3 id="data-compression">Data compression</h3>
<p>Even at 4KHz / 4 bits, the weight of all the phoneme samples and the
word-to-phonemes table put together is over 1600 bytes, which is well
over 2048 bytes when encoded in a C string made of printable characters.
Therefore, a compression method was needed that’s both efficient and
with a decompressor that is implementable in the shortest amount of code
possible. GSM compression is very good, but needs large psychoacoustic
tables to regenerate the original signal. Raw FFT spectral compression
is efficient too, but the decompression code can’t be made small
enough.</p>
over 2048 bytes when encoded in a C string made of printable
characters. Therefore, a compression method was needed that’s both
efficient and with a decompressor that is implementable in the
shortest amount of code possible. GSM compression is very good, but
needs large psychoacoustic tables to regenerate the original
signal. Raw FFT spectral compression is efficient too, but the
decompression code can’t be made small enough.</p>
<p>The best compression compromise was found using a simple Huffman
compressor, and encoding the compressed data by blocks of 13 bits in
pairs of printable ASCII characters: the raw data is compressed to 8465
bits, and the resulting C string is therefore about 1300 characters,
which leaves just enough room for the decompressor with a hard-coded
Huffman tree, and the code that plays the phonemes in the right
order.</p>
<h3 id="note-on-compiler-warnings-and-lint">Note on compiler warnings
and lint</h3>
<p>The program should build with <code>gcc -Wall -Werror -ansi</code>.
If the <code>-pedantic</code> flag is used, gcc will complain about the
length of the data string and the sign of its type, and also the fact
that <code>main()</code> returns with no value. The confusion with the
sign of the char type doesn’t matter with the data string because it’s
composed only of printable characters under 127.</p>
<p>When linting the program with <code>lclint</code>, it complains about
a huge list of things that, if corrected to make lint happy, would
probably double the size of the source code.</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>
pairs of printable ASCII characters: the raw data is compressed to
8465 bits, and the resulting C string is therefore about 1300
characters, which leaves just enough room for the decompressor with a
hard-coded Huffman tree, and the code that plays the phonemes in the
right order.</p>
<h3 id="note-on-compiler-warnings-and-lint">Note on compiler warnings and lint</h3>
<p>The program should build with <code>gcc -Wall -Werror -ansi</code>. If the <code>-pedantic</code>
flag is used, gcc will complain about the length of the data string and the sign
of its type, and also the fact that <code>main()</code> returns with no value. The
confusion with the sign of the char type doesn’t matter with the data string
because it’s composed only of printable characters under 127.</p>
<p>When linting the program with <code>lclint</code>, it complains about a huge list
of things that, if corrected to make lint happy, would probably double
the size of the source code.</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-2001coupard"><a name="inventory"></a>Inventory for
2001/coupard</h1>
<h1 id="inventory-for-2001coupard"><a name="inventory"></a>Inventory for 2001/coupard</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/2001/coupard/coupard.c">coupard.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/coupard.orig.c">coupard.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/try.sh">try.sh</a>
- how to run</li>
<li><a href="2001_coupard.tar.bz2">2001_coupard.tar.bz2</a> - download
entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/coupard.c">coupard.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/coupard.orig.c">coupard.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/try.sh">try.sh</a> - how to run</li>
<li><a href="2001_coupard.tar.bz2">2001_coupard.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/2001/coupard/.entry.json">.entry.json</a>
- description of entry in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/.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/2001/coupard/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/.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/2001/coupard/README.md">README.md</a>
- markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/coupard/README.md">README.md</a> - markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->