improved indentation and whitespace for markdown code blocks
All code blocks in markdown have been intended by at least 4 spaces. 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 from "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`. Fixed excess whitespace after list Author on entry `index.html` page. Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26" to "1.6 2024-03-31". Performed `make www` to perform the above and test under macOS. TODO: Fix the problem of the initial line of code being extra intended. TODO: Fix excess whitespace around code that is inline.
This commit is contained in:
1 parent
b84c27ce02
commit
a996f8d2b8
734 files changed
+16723
-16963
No files matched your search
+37
-38
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Ilya_Kurdyukov">Ilya Kurdyukov</a><br>
|
||||
Location: <a href="../../location.html#RU">RU</a> - <em>Russian Federation</em> (<em>Russia</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#RU">RU</a> - <em>Russian Federation</em> (<em>Russia</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,13 +141,13 @@ Location: <a href="../../location.html#RU">RU</a> - <em>Russian Federation</em>
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<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></span></code></pre></div>
|
||||
<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></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">./prog</span> text_file output_length context_length random_seed</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">./prog</span> text_file output_length context_length random_seed</span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>When running this, ask yourself why it gets progressively slower when the
|
||||
context length decreases:</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">./try.sh</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">./try.sh</span></span></code></pre></div>
|
||||
<blockquote>
|
||||
<p>Performance depends on the number of same hashes found.
|
||||
Too many identical strings if the context length is small.
|
||||
@@ -164,11 +163,11 @@ way it works too fast regardless of the context length, and it’s much less fun
|
||||
If some string only appears after half the input, the first instance
|
||||
of this string will have a 50% chance of occurrence.
|
||||
Example:</p>
|
||||
<pre><code>echo "00000000000000000000 01 02 02 02 02 02 02" > test.txt
|
||||
./prog test.txt 1000 2 123
|
||||
# more twos in output
|
||||
./rand test.txt 1000 2 123
|
||||
# more ones in output</code></pre>
|
||||
<pre><code> echo "00000000000000000000 01 02 02 02 02 02 02" > test.txt
|
||||
./prog test.txt 1000 2 123
|
||||
# more twos in output
|
||||
./rand test.txt 1000 2 123
|
||||
# more ones in output</code></pre>
|
||||
<blockquote>
|
||||
<p>But this will happen very rarely on real data.
|
||||
– Author</p>
|
||||
@@ -184,11 +183,11 @@ Middle-earth (HoMe)</a>.
|
||||
Now can you appreciate the award title a bit better?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="building">Building:</h3>
|
||||
<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> prog.c <span class="at">-o</span> prog</span></code></pre></div>
|
||||
<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> prog.c <span class="at">-o</span> prog</span></code></pre></div>
|
||||
<h3 id="usage">Usage:</h3>
|
||||
<p>This program generates random text from the provided dictionary using a Markov
|
||||
chain, outputting to <code>stdout</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="ex">./prog</span> input.txt 2000 10 12345</span></code></pre></div>
|
||||
<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">./prog</span> input.txt 2000 10 12345</span></code></pre></div>
|
||||
<p>Parameters are:</p>
|
||||
<ol type="1">
|
||||
<li><p>dictionary filename
|
||||
@@ -210,33 +209,33 @@ the output of this size in bytes exists somewhere in the dictionary.</p></li>
|
||||
<h3 id="example">Example</h3>
|
||||
<p>You can try this with the inputs provided with
|
||||
<a href="../../2019/mills/index.html">2019/mills</a> from the IOCCC entries.</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">$</span> ./prog Shakespeare.txt 2001 10 12345</span></code></pre></div>
|
||||
<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">$</span> ./prog Shakespeare.txt 2001 10 12345</span></code></pre></div>
|
||||
<p>produces:</p>
|
||||
<pre><code>r sons, wives for them, as the hope I had it. This is the way they be not too ra
|
||||
sh a trial of you only. Therefore will not out of door? Nurse: Marry, bachelor,
|
||||
Have other some, he is in Rome: but where is Warwick frowns at his. PRINCE EDWAR
|
||||
D: Where is the light: But I will watch thy waking, what work he makes Amongst y
|
||||
ou? Come, sirs, We shall write to you, fortune and The hazard of much blood. I w
|
||||
ould to heaven, respective lenity, And fire-eyed fury be my convoy in the senten
|
||||
ced; 'tis too horrible, so bloody on the banks If they were created, Would bring
|
||||
them to our presence? FLORIZEL: And those his golden crown, What is six winters
|
||||
? they are but Lewis and Warwick bids you come too late come from the king's fri
|
||||
end, and will do't; for, look you, sir, For still thy true servitor: I will rend
|
||||
an oak And peg thee in his knotty entrails till Thou hast hazel eyes: what eye
|
||||
but such an eye would spy out such a day to-morrow, or next day: He is within th
|
||||
e limit of the like, forsworn to love, Send her a story of more woe Than this is
|
||||
a merry ballad, but a very pretty one. MOPSA: Thou hast amazed me, My name is E
|
||||
lbow: I do lean upon, Now thou art: Thy tears are womanish; thy wild acts denote
|
||||
The unreasonably: come, you must: and there, I then do't to them? VOLUMNIA: Now
|
||||
the red pestilence hangs in our aim, which is yours. What is't your honour, as
|
||||
in war, since then, You have said before: My child is dead; or 'twere not 'long
|
||||
of him; but he, like you, lads; about your ears it is Menenius? Second Officer:
|
||||
Come, come, young wanton and effeminate boy, Takes on the hungry beach Fillip th
|
||||
e stars Shall bitterly begin his wooing that we have in hand are angry And frown
|
||||
ing brow to brow, ourselves, Still your own affections are devised, As blanks, b
|
||||
enevolences, and I thank thee for it. KING HENRY VI: Master lieutenant comes. Ma
|
||||
ster lieutenant comes. Master lieutenant, pray you,-- CORIOLANUS: What's that to
|
||||
him? CHRISTOPHER: At Pembroke, Sir James Blunt, And Rice ap Thomas with a virtu</code></pre>
|
||||
<pre><code> r sons, wives for them, as the hope I had it. This is the way they be not too ra
|
||||
sh a trial of you only. Therefore will not out of door? Nurse: Marry, bachelor,
|
||||
Have other some, he is in Rome: but where is Warwick frowns at his. PRINCE EDWAR
|
||||
D: Where is the light: But I will watch thy waking, what work he makes Amongst y
|
||||
ou? Come, sirs, We shall write to you, fortune and The hazard of much blood. I w
|
||||
ould to heaven, respective lenity, And fire-eyed fury be my convoy in the senten
|
||||
ced; 'tis too horrible, so bloody on the banks If they were created, Would bring
|
||||
them to our presence? FLORIZEL: And those his golden crown, What is six winters
|
||||
? they are but Lewis and Warwick bids you come too late come from the king's fri
|
||||
end, and will do't; for, look you, sir, For still thy true servitor: I will rend
|
||||
an oak And peg thee in his knotty entrails till Thou hast hazel eyes: what eye
|
||||
but such an eye would spy out such a day to-morrow, or next day: He is within th
|
||||
e limit of the like, forsworn to love, Send her a story of more woe Than this is
|
||||
a merry ballad, but a very pretty one. MOPSA: Thou hast amazed me, My name is E
|
||||
lbow: I do lean upon, Now thou art: Thy tears are womanish; thy wild acts denote
|
||||
The unreasonably: come, you must: and there, I then do't to them? VOLUMNIA: Now
|
||||
the red pestilence hangs in our aim, which is yours. What is't your honour, as
|
||||
in war, since then, You have said before: My child is dead; or 'twere not 'long
|
||||
of him; but he, like you, lads; about your ears it is Menenius? Second Officer:
|
||||
Come, come, young wanton and effeminate boy, Takes on the hungry beach Fillip th
|
||||
e stars Shall bitterly begin his wooing that we have in hand are angry And frown
|
||||
ing brow to brow, ourselves, Still your own affections are devised, As blanks, b
|
||||
enevolences, and I thank thee for it. KING HENRY VI: Master lieutenant comes. Ma
|
||||
ster lieutenant comes. Master lieutenant, pray you,-- CORIOLANUS: What's that to
|
||||
him? CHRISTOPHER: At Pembroke, Sir James Blunt, And Rice ap Thomas with a virtu</code></pre>
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
Reference in new issue
Block a user