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:
1 parent
9eb7a54e9f
commit
b0b212acb1
402 files changed
+37061
-55132
No files matched your search
+75
-103
@@ -129,9 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Jens_Schweikhardt">Jens
|
||||
Schweikhardt</a><br> Location: <a href="../../location.html#DE">DE</a> -
|
||||
<em>Federal Republic of Germany</em> (<em>Germany</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Jens_Schweikhardt">Jens Schweikhardt</a><br>
|
||||
Location: <a href="../../location.html#DE">DE</a> - <em>Federal Republic of Germany</em> (<em>Germany</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,38 +142,34 @@ Schweikhardt</a><br> Location: <a href="../../location.html#DE">DE</a> -
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<p><strong>WARNING: DO NOT RUN this program without reading this text
|
||||
down to the end!</strong> It may render your system unusable for a
|
||||
limited amount of time or force you to reboot using the Big Red Button!
|
||||
This is <strong>NOT</strong> a joke. You have been warned.</p>
|
||||
<p><strong>WARNING: DO NOT RUN this program without reading this text down to the end!</strong>
|
||||
It may render your system unusable for a limited amount of time
|
||||
or force you to reboot using the Big Red Button! This is <strong>NOT</strong> a joke.
|
||||
You have been warned.</p>
|
||||
<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">./schweikh3</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The source fails to compile on compilers that recognize the inline
|
||||
keyword by default. For gcc, you may need to use <code>-ansi</code>.</p>
|
||||
<p>See the file <a href="schweikh3.info">schweikh3.info</a> for example
|
||||
output from various systems.</p>
|
||||
<p>See the file <a href="schweikh3.info">schweikh3.info</a> for example output from various
|
||||
systems.</p>
|
||||
<p>But still it is a useful utility. To use try:</p>
|
||||
<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">./schweikh3</span></span></code></pre></div>
|
||||
<p>and thanks for the virtual memories! :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="why-i-think-my-entry-is-obfuscated">Why I think my entry is
|
||||
obfuscated</h3>
|
||||
<p>There are some layout obfuscations that hinder readability, like some
|
||||
(but not all) one character tokens in column 1. <code>#include</code>s,
|
||||
<code>#define</code>s and declarations of data and functions appear
|
||||
intermixed. <code>iso646.h</code> is even included in the middle of an
|
||||
expression, how disgusting. Besides, requiring <code>iso646.h</code>
|
||||
will render the program uncompilable on many systems that have not yet
|
||||
incorporated Amendment One to The Standard. If you, dear reader, suffer
|
||||
from this disease, just read <code>iso646.h</code>.</p>
|
||||
<p>There are no
|
||||
<code>if' statements. They have been replaced by</code>switch () case
|
||||
1:<code>or</code>switch () case
|
||||
0:<code>etc. At least one</code>switch<code>has a declaration after the opening brace, booh! Identifiers are named after random programming languages, BASIC (as</code>Basic`),
|
||||
<h3 id="why-i-think-my-entry-is-obfuscated">Why I think my entry is obfuscated</h3>
|
||||
<p>There are some layout obfuscations that hinder readability, like
|
||||
some (but not all) one character tokens in column 1. <code>#include</code>s,
|
||||
<code>#define</code>s and declarations of data and functions appear intermixed.
|
||||
<code>iso646.h</code> is even included in the middle of an expression, how
|
||||
disgusting. Besides, requiring <code>iso646.h</code> will render the program
|
||||
uncompilable on many systems that have not yet incorporated
|
||||
Amendment One to The Standard. If you, dear reader, suffer from
|
||||
this disease, just read <code>iso646.h</code>.</p>
|
||||
<p>There are no <code>if' statements. They have been replaced by</code>switch () case 1:<code>or</code>switch () case 0:<code>etc. At least one</code>switch<code>has a declaration after the opening brace, booh! Identifiers are named after random programming languages, BASIC (as</code>Basic`),
|
||||
COBOL, F77, awk etc.</p>
|
||||
<p>You have to select maximum ANSI C conformance of your compiler. The
|
||||
source fails to compile under a C++ compiler due to the `new’ identifier
|
||||
which is a C++ reserved word:</p>
|
||||
<p>You have to select maximum ANSI C conformance of your
|
||||
compiler. The source fails to compile under a C++ compiler due to
|
||||
the `new’ identifier which is a C++ reserved word:</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">$</span> g++ schweikh3.c</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">schweikh3.c:9:</span> parse error before <span class="kw">`</span><span class="ex">new</span><span class="st">'</span></span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="st">schweikh3.c:16: parse error before `new'</span></span>
|
||||
@@ -191,20 +187,18 @@ keyword by default, e.g. gcc:</p>
|
||||
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="st">schweikh3.c: At top level:</span></span>
|
||||
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a><span class="st">schweikh3.c:97: parse error before `void'</span></span></code></pre></div>
|
||||
<p>The <code>-ansi</code> option to gcc fixes this.</p>
|
||||
<p>The source fails to compile on obsolete systems with obsolete memory
|
||||
models due to the identifier <code>far</code> (to be honest: this is
|
||||
<p>The source fails to compile on obsolete systems with obsolete
|
||||
memory models due to the identifier <code>far</code> (to be honest: this is
|
||||
untested :-) ).</p>
|
||||
<p>Does your indent cope with backslash/newline pairs in between
|
||||
keywords like in <code>re\turn</code> where the <code>re\</code> is at
|
||||
the end of a line? ? Solaris’ indent inserts spaces and thereby renders
|
||||
the source uncompilable…</p>
|
||||
<p>Does your indent cope with backslash/newline pairs in between keywords like in
|
||||
<code>re\turn</code> where the <code>re\</code> is at the end of a line? ? Solaris’ indent inserts
|
||||
spaces and thereby renders the source uncompilable…</p>
|
||||
<p>The indented source will exhibit different semantics when indenting
|
||||
changes the number of lines (due to using the <code>__LINE__</code>
|
||||
macro in an expression).</p>
|
||||
<p>And what about <code>sizeof __TIME__</code>? This one’s for the
|
||||
philosophers and physicists among us programmers. What is it?
|
||||
<code>sizeof (char *)</code>? – no. <code>strlen ("hh:mm:ss")</code>? –
|
||||
no. It’s the same as <code>sizeof __DATE__ - sizeof "no"</code> :-)</p>
|
||||
changes the number of lines (due to using the <code>__LINE__</code> macro in an
|
||||
expression).</p>
|
||||
<p>And what about <code>sizeof __TIME__</code>? This one’s for the philosophers
|
||||
and physicists among us programmers. What is it? <code>sizeof (char *)</code>? – no.
|
||||
<code>strlen ("hh:mm:ss")</code>? – no. It’s the same as <code>sizeof __DATE__ - sizeof "no"</code> :-)</p>
|
||||
<p>The program is POSIX conformant and lints without warning under
|
||||
Solaris’ Sunpro lint. Allocated memory is correctly freed on all
|
||||
possible execution paths.</p>
|
||||
@@ -212,97 +206,75 @@ possible execution paths.</p>
|
||||
<p>This program tests your operating system’s allocation honesty. It
|
||||
forks a child that will allocate as much memory as possible with byte
|
||||
granularity and then write to every 1024th byte, at the same time
|
||||
writing a status report on <code>stdout</code>. This way each page of
|
||||
the allocated virtual memory will eventually be referenced. Without any
|
||||
arguments, <code>malloc(3)</code> will be used to allocate memory. If
|
||||
the first arg starts with <code>c</code>, <code>calloc(3)</code> will be
|
||||
used instead.</p>
|
||||
writing a status report on <code>stdout</code>. This way each page of the
|
||||
allocated virtual memory will eventually be referenced. Without
|
||||
any arguments, <code>malloc(3)</code> will be used to allocate memory. If the
|
||||
first arg starts with <code>c</code>, <code>calloc(3)</code> will be used instead.</p>
|
||||
<p>I distinguish three different behaviours:</p>
|
||||
<ol type="1">
|
||||
<li><p>OS without memory overcommit: <code>malloc(3)</code> does not lie
|
||||
– you can use all memory the OS granted to you.</p></li>
|
||||
<li><p>OS with memory overcommit: <code>malloc(3)</code> lies – any
|
||||
program may get killed at random when the OS can not acquire a free
|
||||
page.</p></li>
|
||||
<li><p>OS with pseudo memory overcommit: <code>malloc(3)</code> lies –
|
||||
The OS puts processes to sleep for which it can not acquire a free page.
|
||||
Because other processes are also affected this way, the system slows
|
||||
down and quickly becomes totally unusable (also known as “thrashing”).
|
||||
Because more and more processes wait for memory returned by other
|
||||
exiting processes the system eventually enters a deadlock situation and
|
||||
effectively halts.</p></li>
|
||||
<li><p>OS without memory overcommit: <code>malloc(3)</code> does not lie – you can use all memory
|
||||
the OS granted to you.</p></li>
|
||||
<li><p>OS with memory overcommit: <code>malloc(3)</code> lies – any program may get killed at
|
||||
random when the OS can not acquire a free page.</p></li>
|
||||
<li><p>OS with pseudo memory overcommit: <code>malloc(3)</code> lies – The OS puts processes to
|
||||
sleep for which it can not acquire a free page. Because other processes are also
|
||||
affected this way, the system slows down and quickly becomes totally unusable
|
||||
(also known as “thrashing”). Because more and more processes wait for memory
|
||||
returned by other exiting processes the system eventually enters a deadlock
|
||||
situation and effectively halts.</p></li>
|
||||
</ol>
|
||||
<p>I had the pleasure and pain to find all three behaviours on the
|
||||
platforms I use regularly.</p>
|
||||
<p>The file <a href="schweikh3.info">schweikh3.info</a> has output for
|
||||
Solaris, FreeBSD and Linux. The Linux case is interesting in that the
|
||||
behaviour changes when <code>calloc(3)</code> is used instead of
|
||||
<code>malloc(3)</code>. For FreeBSD, the last two lines are not messages
|
||||
stemming from my program but issued by the syslog daemon.</p>
|
||||
Solaris, FreeBSD and Linux. The Linux case is interesting in that
|
||||
the behaviour changes when <code>calloc(3)</code> is used instead of <code>malloc(3)</code>.
|
||||
For FreeBSD, the last two lines are not messages stemming from
|
||||
my program but issued by the syslog daemon.</p>
|
||||
<h3 id="implementation-remarks">Implementation remarks</h3>
|
||||
<p>How can we distinguish the three different OS types from the table
|
||||
above?</p>
|
||||
<p>How can we distinguish the three different OS types from the
|
||||
table above?</p>
|
||||
<p>Obviously, type (1), no overcommit, is easy.</p>
|
||||
<p>For type (2), random kill, we need to fork a child that can be killed
|
||||
and whose exit status the parent collects and decodes. Here’s where
|
||||
POSIX enters the scene.</p>
|
||||
and whose exit status the parent collects and decodes. Here’s
|
||||
where POSIX enters the scene.</p>
|
||||
<p>Type (3), thrashing, was the hardest part. The first attempt was to
|
||||
measure the elapsed processor time it takes to write a single byte
|
||||
(using <code>clock()</code>). If a certain threshold is reached I assume
|
||||
the system is thrashing. When thrashing, however, the process does not
|
||||
consume processor time in a noticeable amount any longer and I lose. So
|
||||
I switched to measuring wall clock time using <code>time(3)</code>. On
|
||||
the one system that I observe thrashing (Linux) this works (although the
|
||||
value returned by <code>time(3)</code> seems to ‘hang’ sometimes when
|
||||
the OS thrashes. Exceeding a threshold of 5 seconds may be detected only
|
||||
after half a minute or so.</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>
|
||||
(using <code>clock()</code>). If a certain threshold is reached I assume the
|
||||
system is thrashing. When thrashing, however, the process does not
|
||||
consume processor time in a noticeable amount any longer and I lose.
|
||||
So I switched to measuring wall clock time using <code>time(3)</code>. On the one
|
||||
system that I observe thrashing (Linux) this works (although the
|
||||
value returned by <code>time(3)</code> seems to ‘hang’ sometimes when the OS thrashes.
|
||||
Exceeding a threshold of 5 seconds may be detected only after half a
|
||||
minute or so.</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-1996schweikh3"><a name="inventory"></a>Inventory
|
||||
for 1996/schweikh3</h1>
|
||||
<h1 id="inventory-for-1996schweikh3"><a name="inventory"></a>Inventory for 1996/schweikh3</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/1996/schweikh3/schweikh3.c">schweikh3.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh3/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh3/schweikh3.orig.c">schweikh3.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh3/schweikh3.info">schweikh3.info</a>
|
||||
- example output from various systems</li>
|
||||
<li><a href="1996_schweikh3.tar.bz2">1996_schweikh3.tar.bz2</a> -
|
||||
download entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh3/schweikh3.c">schweikh3.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh3/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh3/schweikh3.orig.c">schweikh3.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh3/schweikh3.info">schweikh3.info</a> - example output from various systems</li>
|
||||
<li><a href="1996_schweikh3.tar.bz2">1996_schweikh3.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/1996/schweikh3/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh3/.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/1996/schweikh3/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh3/.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/1996/schweikh3/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1996/schweikh3/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
Reference in new issue
Block a user