Merge pull request #2151 from xexyl/manifest-updates

Manifest updates
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2024-02-03 16:37:30 -08:00
commit f7a83b8bba
42 files changed
+936 -301

No files matched your search

-16
View File
@@ -49,22 +49,6 @@
"display_via_github" : true,
"winners_text" : "original source"
},
{
"file_path" : "try.alt.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run alternative code"
},
{
"file_path" : "try.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run"
},
{
"file_path" : "input.txt",
"inventory_order" : 150,
-6
View File
@@ -178,12 +178,6 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/spinellis/sp
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/spinellis/spinellis.orig.c">spinellis.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/spinellis/try.alt.sh">try.alt.sh</a>
- how to run alternative code</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/spinellis/try.sh">try.sh</a>
- how to run</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1988/spinellis/input.txt">input.txt</a>
- example input</li>
<li><a
+1
View File
@@ -9,4 +9,5 @@ indent
indent.c
indent.o
out
out.count
prog.orig
+1 -1
View File
@@ -215,7 +215,7 @@ clean:
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM out
${RM} -rf *.dSYM out out.count c.c
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
+31 -17
View File
@@ -24,11 +24,13 @@ EXIT_CODE=0
# delete temporary files first to make sure that they're clean
rm -f out out.count
echo "This may take a while: please be patient." 1>&2
# redirect stdout to 'out' (but show it to output via tee(1)) so that we can run
# the test suite of giljade.
./"$GILJADE" | tee out
echo 1>&2
# redirect stdout to 'out' so that we can run the test suite of giljade
./"$GILJADE" > out
echo 1>&2
# warn user that this will take a while
echo "This may take a while: please be patient:" 1>&2
# here we want to show only the lines matching the regexp '^Line' but write
# everything to out.count for checking (after running it all) for errors and how
# many versions were found.
@@ -41,16 +43,17 @@ if [[ "$COUNT" != 180 ]]; then
# if we failed to get exactly 180 versions there is a problem
echo "FAIL: Expected 180 versions, got $COUNT" 1>&2
EXIT_CODE=1
elif [[ "$(grep -c '[^-]error' out.count)" -ne 0 ]]; then
# we have to check for '[^-]error' because the CFLAGS contain '-Wno-error'
# which would be a false positive.
echo "FAIL: Error compiling one or more versions!" 1>&2
echo "Try the following command to find out what problems occurred:" 1>&2
echo 1>&2
echo " grep -C10 -E '[^-]error' out.count" 1>&2
echo 1>&2
echo "and feel free to report or fix it and make a GitHub pull request." 1>&2
EXIT_CODE=2
if [[ "$(grep -c '[^-]error' out.count)" != 0 ]]; then
# we have to check for '[^-]error' because the CFLAGS contain '-Wno-error'
# which would be a false positive.
echo "FAIL: Error compiling one or more versions!" 1>&2
echo "Try the following command to find out what problems occurred:" 1>&2
echo 1>&2
echo " grep -C 10 -E '[^-]error' out.count | less" 1>&2
echo 1>&2
echo "and feel free to report or fix it and then make a GitHub pull request." 1>&2
EXIT_CODE=2
fi
else
# all good: every version could be compiled
echo "Found and successfully compiled all 180 versions!" 1>&2
@@ -58,10 +61,21 @@ else
EXIT_CODE=0
fi
# delete temporary files but only if no failure
# delete temporary files but only if no failure and the user doesn't want to
# look at them
if [[ "$EXIT_CODE" = 0 ]]; then
rm -f out out.count
read -r -p "Do you wish to keep the 'out' and 'out.count' files (Y/N)? "
echo 1>&2
if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then
rm -vf out out.count
else
echo "Leaving 'out' and 'out.count' for you to look at. Remove them manually" 1>&2
echo "when you wish to or run 'make clobber' to remove them automatically." 1>&2
fi
else
echo "Leaving 'out' and 'out.count' for you to look at. Remove them manually" 1>&2
echo "when you wish to or run 'make clobber' to remove them automatically." 1>&2
echo 1>&2
fi
# exit :-)
+8
View File
@@ -65,6 +65,14 @@
"display_via_github" : true,
"winners_text" : "sample input"
},
{
"file_path" : "try.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run"
},
{
"file_path" : "twinkle.abc",
"inventory_order" : 100,
+23 -9
View File
@@ -125,16 +125,27 @@ Location: <a href="/temp-test-ioccc/location.html#JP">JP</a></p>
endoh3 in bugs.md</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.md#faq3_10">FAQ 3.10 -
How do I compile and use an IOCCC winner 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>
<p>Trying this out will depend on how your system can play sounds. The
author’s remarks include some options for different operating
systems.</p>
<p>The simplest way is to create a .wav file and have your system play
that.</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="bu">echo</span> <span class="st">&#39;CDEFGABc&#39;</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>Observe how you will need ruby installed.</p>
<p>There are also some other musical samples, twinkle.abc and
menuet.abc.</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">./try.sh</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> ABC</span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a></span>
<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 <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>
@@ -315,6 +326,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh3/menue
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
+1 -1
View File
@@ -50,7 +50,7 @@
"winners_text" : "3D object coordinates"
},
{
"file_path" : "try.sh",
"file_path" : "endoh4.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
+37 -15
View File
@@ -118,22 +118,41 @@ Location: <a href="/temp-test-ioccc/location.html#JP">JP</a></p>
<!-- END: next line ends content generated by: bin/gen-author.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>
<p>If you wish to change the size (see the <a
href="#authors-remarks">Author’s remarks</a> below) you can do so with
the <code>SIZE</code> variable. For instance you can do:</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="fu">make</span> clobber SIZE=50,50 all</span></code></pre></div>
<p>but you can also do this directly with the <a
href="endoh4.sh">endoh4.sh</a> script as described below.</p>
<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.md#2013-endoh4">2013
endoh4 in bugs.md</a>.</p>
<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">./endoh4</span> <span class="op">&lt;</span> file</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./run.sh</span> file</span></code></pre></div>
<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">./endoh4</span> <span class="op">&lt;</span> file</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh4.sh</span> file</span></code></pre></div>
<p>The second form is preferable as it will temporarily make the cursor
invisible as recommended by the author. If no file is specified in
<code>run.sh</code> command line it will feed to the program <a
invisible as recommended by the author. If no file is specified in the
<code>./endoh4.sh</code> command line it will feed to the program <a
href="endoh4.c">endoh4.c</a>.</p>
<h2 id="try">Try:</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">./run.sh</span> cube.txt</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="ex">./endoh4.sh</span> cube.txt</span></code></pre></div>
<p>Hit ctrl-c to end the program.</p>
<p>The author recommends the use of xterm.</p>
<p>For an example, if you are a football/soccer fan, try:</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">./run.sh</span> solids/archimedian-solid/a11-truncated-icosahedron.txt</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">./endoh4.sh</span> solids/archimedian-solid/a11-truncated-icosahedron.txt</span></code></pre></div>
<p>You can provide more than one file:</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">./endoh4.sh</span> solids/archimedian-solid/a11-truncated-icosahedron.txt cube.txt</span></code></pre></div>
<p>Hit ctrl-c/intr to go to the next file.</p>
<p>If you wish to change the size to <code>50,50</code> without passing
any arg:</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="va">SIZE</span><span class="op">=</span>50,50 <span class="ex">./endoh4.sh</span></span></code></pre></div>
<p>Not specifying a file feeds <a href="endoh4.c">endoh4.c</a> to the
program.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This program is formatted as the net for a tetrahedron (hint: try
feeding the program it’s own source code like <code>./run.sh</code>).
feeding the program it’s own source code like <code>./endoh4.sh</code>).
When it runs there is an animation for the computation to work out the
convex hull.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
@@ -164,23 +183,26 @@ triangulated)</li>
<p>(Note that this program does not use <code>math.h</code>.)</p>
<h3 id="portability">Portability</h3>
<p>I think it conforms with both C89 and C99. I confirmed that it worked
on gcc, clang, and tcc. It should not be warned with
on gcc, clang, and tcc. It should not trigger warnings with
<code>-pedantic</code> and <code>-Wextra</code>.</p>
<h3 id="tips">Tips</h3>
<p>You may want to use <code>tput</code> to hide the terminal
cursor.</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">tput</span> civis</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh4</span> <span class="op">&lt;</span> cube.txt</span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="fu">tput</span> cnorm</span></code></pre></div>
<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">tput</span> civis</span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh4</span> <span class="op">&lt;</span> cube.txt</span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="fu">tput</span> cnorm</span></code></pre></div>
<p>or</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">./run.sh</span> cube.txt</span></code></pre></div>
<div class="sourceCode" id="cb10"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh4.sh</span> cube.txt</span></code></pre></div>
<h3 id="bonuses">Bonuses</h3>
<p>You can change the screen size. Let the aspect ratio be about
3:1.</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="fu">cc</span> <span class="at">-DS</span><span class="op">=</span>120,40 <span class="at">-o</span> endoh4 endoh4.c</span></code></pre></div>
<div class="sourceCode" id="cb11"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-DS</span><span class="op">=</span>120,40 <span class="at">-o</span> endoh4 endoh4.c</span></code></pre></div>
<p>The shape of this code is the geometric net of a regular tetrahedron.
So, try:</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">./endoh4</span> <span class="op">&lt;</span> endoh4.c <span class="co"># or ./run.sh</span></span></code></pre></div>
<div class="sourceCode" id="cb12"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./endoh4</span> <span class="op">&lt;</span> endoh4.c <span class="co"># or ./endoh4.sh</span></span></code></pre></div>
<p>The <a href="solids/">solids/</a> directory includes various solid
data:</p>
<ul>
@@ -230,7 +252,7 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/endoh
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/cube.txt">cube.txt</a>
- 3D object coordinates</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/try.sh">try.sh</a>
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/endoh4.sh">endoh4.sh</a>
- how to run</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/endoh4/solids/antiprism/a04-square-antiprism.txt">solids/antiprism/a04-square-antiprism.txt</a>
+8
View File
@@ -65,6 +65,14 @@
"display_via_github" : true,
"winners_text" : "sample input"
},
{
"file_path" : "try.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run"
},
{
"file_path" : "luna.jpg",
"inventory_order" : 150,
+10 -9
View File
@@ -130,15 +130,13 @@ auto-refreshing PPM image viewer ready. Refresh the image every time the
output refreshes, all effects should be more or less recognizable when
you see 16.</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">./hou</span> BIG</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./hou</span> old_default.scene BIG</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./hou</span> otherroom.scene</span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./hou</span> otherroom.scene NAIVE</span></code></pre></div>
<p>Try opening the file and then let the program run a while and every
so often reopen the file, to see how it changes. The author suggests
that you leave the program running overnight to see what happens. If
however you do not have all night :-) then the following JPEG files
should show you what happens with some of the invocations above:</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">./try.sh</span></span></code></pre></div>
<p>Try opening the file noted by the program then let the program run a
while and every so often reopen the file, to see how it changes. The
author suggests that you leave the program running overnight to see what
happens. If however you do not have all night :-) then the following
JPEG files should show you what happens with some of the invocations
above:</p>
<figure>
<img src="luna.jpg" alt="./hou BIG - Luna" />
<figcaption aria-hidden="true">./hou BIG - Luna</figcaption>
@@ -380,6 +378,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/old_defa
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/otherroom.scene">otherroom.scene</a>
- sample input</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/hou/try.sh">try.sh</a>
- how to run</li>
<li><a href="luna.jpg">luna.jpg</a> - sample image data</li>
<li><a href="old_default.jpg">old_default.jpg</a> - sample image
data</li>
+8
View File
@@ -41,6 +41,14 @@
"display_via_github" : true,
"winners_text" : "original source"
},
{
"file_path" : "try.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shelllscript",
"display_via_github" : true,
"winners_text" : "how to run"
},
{
"file_path" : "2013_morgan1.tar.bz2",
"inventory_order" : 300,
+8 -8
View File
@@ -120,15 +120,12 @@ href="/temp-test-ioccc/location.html#FR">FR</a></p>
<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>
<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="bu">echo</span> <span class="st">&quot;2013/10/03&quot;</span> <span class="kw">|</span> <span class="ex">./morgan1</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="bu">echo</span> <span class="st">&quot;YYYY/MM/DD&quot;</span> <span class="kw">|</span> <span class="ex">./morgan1</span></span></code></pre></div>
<p>where <code>YYYY</code> is the four digit year, <code>MM</code> is
the two digit month and <code>DD</code> is two digit day of the
month.</p>
<h2 id="try">Try:</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="bu">echo</span> <span class="st">&quot;1985/10/28&quot;</span> <span class="kw">|</span> <span class="ex">./morgan1</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&quot;1996/12/31&quot;</span> <span class="kw">|</span> <span class="ex">./morgan1</span></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&quot;1986/03/31&quot;</span> <span class="kw">|</span> <span class="ex">./morgan1</span> <span class="co"># Comet Halley (look for &#39;Ha&#39;)</span></span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&quot;1997/04/01&quot;</span> <span class="kw">|</span> <span class="ex">./morgan1</span> <span class="co"># Comet Hale-Bopp (look for &#39;Hb&#39;)</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>
<p>Try pressing the arrow keys when your focus is in the window.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>To verify the output, try echoing the date of an evening with a clear
@@ -242,6 +239,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/Make
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/morgan1.orig.c">morgan1.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2013/morgan1/try.sh">try.sh</a>
- how to run</li>
<li><a href="2013_morgan1.tar.bz2">2013_morgan1.tar.bz2</a> - download
winning source</li>
</ul>
+8
View File
@@ -49,6 +49,14 @@
"display_via_github" : true,
"winners_text" : "original source"
},
{
"file_path" : "try.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run"
},
{
"file_path" : "2014_vik.tar.bz2",
"inventory_order" : 300,
+7 -4
View File
@@ -127,11 +127,11 @@ href="#alternate-code">Alternate code</a> section below.</p>
<p>For more detailed information see <a href="/bugs.md#2014-vik">2014
vik in bugs.md</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">./prog</span> <span class="op">&gt;</span> foo.c</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="bu">echo</span> foo <span class="kw">|</span> <span class="ex">./prog</span> <span class="op">&gt;</span> audio_file.raw</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> foo <span class="kw">|</span> <span class="ex">./prog</span> <span class="kw">|</span> <span class="ex">mplayer</span> <span class="at">-demuxer</span> rawaudio <span class="at">-</span></span></code></pre></div>
<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="bu">echo</span> <span class="st">&#39;Want to hear me beep?&#39;</span> <span class="kw">|</span> <span class="ex">./prog</span> <span class="op">&gt;</span> audio_file.raw</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&#39;No. I want chocolate!&#39;</span> <span class="kw">|</span> <span class="ex">./prog</span> <span class="kw">|</span> <span class="ex">mplayer</span> <span class="at">-demuxer</span> rawaudio <span class="at">-</span></span></code></pre></div>
<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></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>The alternate code, <a href="prog.alt.c">prog.alt.c</a>, is based on
the author’s instructions on how to get it to work with Windows.</p>
@@ -212,6 +212,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/vik/prog.alt
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/vik/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/vik/try.sh">try.sh</a>
- how to run</li>
<li><a href="2014_vik.tar.bz2">2014_vik.tar.bz2</a> - download winning
source</li>
</ul>
+1 -1
View File
@@ -220,7 +220,7 @@ clean:
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM
${RM} -rf *.dSYM calc ecalc
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
+8
View File
@@ -49,6 +49,14 @@
"display_via_github" : true,
"winners_text" : "original source"
},
{
"file_path" : "try.alt.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run alternate code"
},
{
"file_path" : "try.sh",
"inventory_order" : 100,
+6 -1
View File
@@ -135,13 +135,15 @@ like.</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="fu">make</span> alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>prog.alt</code> as you would <code>prog</code> above.</p>
<h3 id="alternate-try">Alternate try:</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="ex">./try.alt.sh</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>With this entry, you won’t need to turn your monitor <a
href="http://en.wikipedia.org/wiki/River_%28typography%29">upside
down</a>!</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="compiling-the-program">Compiling the program:</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> <span class="at">-Wall</span> <span class="at">-Wextra</span> <span class="at">-Wpedantic</span> <span class="at">-O3</span> <span class="at">-std</span><span class="op">=</span>c11 prog.c <span class="at">-o</span> prog</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="fu">cc</span> <span class="at">-Wall</span> <span class="at">-Wextra</span> <span class="at">-Wpedantic</span> <span class="at">-O3</span> <span class="at">-std</span><span class="op">=</span>c11 prog.c <span class="at">-o</span> prog</span></code></pre></div>
<p>Also works with a standard of C99, but C90/C89 will not compile due
to <code>for</code> loop initial declarations, along with additional
warnings about variable length arrays and lack of a <code>return</code>
@@ -203,6 +205,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/anderson/pro
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/anderson/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/anderson/try.alt.sh">try.alt.sh</a>
- how to run alternate code</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/anderson/try.sh">try.sh</a>
- how to run</li>
<li><a href="2018_anderson.tar.bz2">2018_anderson.tar.bz2</a> - download
+8
View File
@@ -57,6 +57,14 @@
"display_via_github" : false,
"winners_text" : "sample image data"
},
{
"file_path" : "try.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run"
},
{
"file_path" : "2018_bellard.tar.bz2",
"inventory_order" : 300,
+16 -11
View File
@@ -124,17 +124,19 @@ href="#alternate-code">Alternate code</a> below.</p>
<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> <span class="op">&gt;</span> lena.ppm</span></code></pre></div>
<h2 id="try">Try:</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">eog</span> lena.ppm <span class="co"># On Linux</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">open</span> <span class="at">-a</span> Preview lena.ppm <span class="co"># On macOS</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="ex">pngtopam</span> <span class="op">&lt;</span> Lenna.png <span class="kw">|</span> <span class="ex">pnmscale</span> 0.25 <span class="kw">|</span> <span class="ex">cjpeg</span> <span class="at">-arithmetic</span> <span class="at">-dct</span> float <span class="at">-quality</span> 14 <span class="op">&gt;</span> small.jpg</span></code></pre></div>
<p>NOTE: <code>pngtopam(1)</code> (or <code>pngtopnm(1)</code> for older
versions) and <code>pnmscale</code> come from the netpbm project and
<code>cjpeg(1)</code> comes from <code>libjpeg-turbo</code>. If you
don’t have these tools already see <a href="/faq.md#netpbm">FAQ 3.15 -
How do I compile and install netpbm for entries that require it?</a> and
<a href="/faq.md#libjpeg">FAQ 3.16 - How do I compile and install
libjpeg-turbo for entries that require it?</a>.</p>
<p>First open <a href="Lenna.png">Lenna.png</a> in your graphics viewer
of choice. Next, after running the above command
(<code>./prog &gt; lena.ppm</code>), open <code>lena.ppm</code> in your
graphics viewer of choice. After that 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">./try.sh</span></span></code></pre></div>
<p>NOTE: the script uses the tools <code>pngtopam(1)</code> (or
<code>pngtopnm(1)</code> for older versions) and <code>pnmscale</code>
come from the netpbm project and <code>cjpeg(1)</code> comes from
<code>libjpeg-turbo</code>. If you don’t have these tools already see <a
href="/faq.md#netpbm">FAQ 3.15 - How do I compile and install netpbm for
entries that require it?</a> and <a href="/faq.md#libjpeg">FAQ 3.16 -
How do I compile and install libjpeg-turbo for entries that require
it?</a>.</p>
<p>NOTE: <a href="Lenna.png">Lenna.png</a> is from <a
href="https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png"
class="uri">https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png</a>.</p>
@@ -222,6 +224,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/bellard/prog
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/bellard/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a href="Lenna.png">Lenna.png</a> - sample image data</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/bellard/try.sh">try.sh</a>
- how to run</li>
<li><a href="2018_bellard.tar.bz2">2018_bellard.tar.bz2</a> - download
winning source</li>
</ul>
+8
View File
@@ -57,6 +57,14 @@
"display_via_github" : false,
"winners_text" : "How to squeeze a lexicon paper"
},
{
"file_path" : "try.alt.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run alternate code"
},
{
"file_path" : "try.sh",
"inventory_order" : 100,
+8 -2
View File
@@ -124,8 +124,7 @@ href="#remarks">remarks section</a>) below for more details.</p>
<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> <span class="op">&lt;</span> text</span></code></pre></div>
<h2 id="try">Try:</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">./prog</span> <span class="op">&lt;</span> Makefile</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="op">&lt;</span> README.md</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>
<h2 id="alternate-code">Alternate code:</h2>
<p>An alternate version of this entry, <a
href="prog.alt.c">prog.alt.c</a>, is provided. As mentioned in the
@@ -135,6 +134,10 @@ useful bug fix.</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="fu">make</span> alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>prog.alt</code> as you would <code>prog</code> above.</p>
<h3 id="alternate-try">Alternate try:</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="ex">./try.alt.sh</span></span></code></pre></div>
<p>Do you spot the fix by running both <a href="try.sh">try.sh</a> and
<a href="try.alt.sh">try.alt.sh</a>?</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This text was processed by <code>prog</code>. You may get confused.
We’re not really sure: <a href="prog.c">prog.c</a> wasn’t commented. Who
@@ -398,6 +401,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ciura/prog.o
<li><a href="lexicon.pdf">lexicon.pdf</a> - How to squeeze a lexicon
paper</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ciura/try.alt.sh">try.alt.sh</a>
- how to run alternate code</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ciura/try.sh">try.sh</a>
- how to run</li>
<li><a href="2018_ciura.tar.bz2">2018_ciura.tar.bz2</a> - download
+32
View File
@@ -57,6 +57,38 @@
"display_via_github" : true,
"winners_text" : "information about various files"
},
{
"file_path" : "id.alt.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run"
},
{
"file_path" : "id.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run"
},
{
"file_path" : "monkey-words.alt.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shell script",
"display_via_github" : true,
"winners_text" : "how to run"
},
{
"file_path" : "monkey-words.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run"
},
{
"file_path" : "rpm.html",
"inventory_order" : 100,
+224 -147
View File
@@ -125,7 +125,22 @@ below.</p>
<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">./weasel</span></span></code></pre></div>
<h2 id="try">Try:</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">./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>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="co"># For those who believe in &#39;&quot;intelligent&quot; design&#39; or want to see how easy it is</span></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="co"># to prove evolution is a proven fact:</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./id.sh</span></span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a><span class="co"># For those who want to see if Eric the monkey can type the word &#39;words&#39; before</span></span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a><span class="co"># falling asleep or giving up:</span></span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a><span class="ex">./monkey-words.sh</span></span></code></pre></div>
<p>NOTE: the <a href="try.sh">try.sh</a> script will run the other two
scripts but if the first one, <a href="id.sh">id.sh</a> is terminated
early in the try script, the second one, <a
href="monkey-words.sh">monkey-words.sh</a> will not be run.</p>
<p>You can reconfigure certain values. These are described by the author
in more detail in the <a href="#constants">S, M and N Constants</a>
section. The script above will make use of some of these.</p>
<h2 id="alternate-code">Alternate code:</h2>
<p>This version has a simpler keyboard (fewer characters). The author
wrote more about this under the <a href="#keyboards">keyboards</a>
@@ -137,7 +152,27 @@ section.</p>
<p>Use <code>weasel.alt</code> as you would <code>weasel</code>
above.</p>
<h3 id="alternate-try">Alternate try:</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="ex">./try.alt.sh</span></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="ex">./try.alt.sh</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="co"># For those who believe in &#39;&quot;intelligent&quot; design&#39; or want to see how easy it is</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="co"># to prove evolution is a proven fact:</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./id.alt.sh</span></span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a><span class="co"># For those who want to see if Eric the monkey can type the word &#39;words&#39; before</span></span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a><span class="co"># falling asleep or giving up:</span></span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a><span class="ex">./monkey-words.alt.sh</span></span></code></pre></div>
<p>NOTE: the <a href="try.alt.sh">try.alt.sh</a> script will run the
other two scripts but if the first one, <a
href="id.alt.sh">id.alt.sh</a> is terminated early in the try script,
the second one, <a href="monkey-words.alt.sh">monkey-words.alt.sh</a>
will not be run.</p>
<p>You can reconfigure certain values. These are described by the author
in more detail in the <a href="#constants">S, M and N Constants</a>
section. The script above will make use of some of these.</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">./try.alt.sh</span></span></code></pre></div>
<p>You can reconfigure certain values. These are described by the author
in more detail in the <a href="#constants">S, M and N Constants</a>
section. The script above will make use of some of these.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Looking back over the strata of past IOCCC entries, this program
marks a new mutation on our understanding of sequencing of code. In
@@ -153,7 +188,7 @@ which us Homo sapiens hang from the phylogenetic tree of life.</p>
code era, while using more Cenozoic minded code migration, read
rpm.md.</p>
<p>If you find yourself in an evolutionary dead end, try:</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">man</span> ./weasel.1</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="fu">man</span> ./weasel.1</span></code></pre></div>
<h2 id="authors-remarks">Author’s remarks:</h2>
<ol start="0" type="1">
<li>Preface</li>
@@ -182,7 +217,7 @@ people don’t like to read long texts. To resolve this I think the best
way is referencing the judges’ remarks: if you want a quick rundown of
the entry try what they suggest and view the man page (it explains all
the options and describes the program briefly):</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="fu">man</span> ./weasel.man</span></code></pre></div>
<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="fu">man</span> ./weasel.man</span></code></pre></div>
<p>If that isn’t sufficient <strong>I would recommend reading this
section</strong> <em>(and possibly the next)</em> where I attempt to
give a brief explanation of the sections to make reading it easier and
@@ -215,10 +250,11 @@ after.</p>
techniques that might not be used.</p>
<p><strong><a href="#build">How to build</a>:</strong> Here I describe
briefly <a href="#constants">the constants that can be redefined</a>
<code>S</code> and <code>N</code>: the maximum size of the chromosome
(target string; the maximum length is <code>S - 1</code> but it must be
&gt;= the default 38) and the number of offspring, respectively. I also
give <a href="#compiling">example compiler invocations</a>, <a
<code>S</code>, <code>M</code> and <code>N</code>: the maximum size of
the chromosome (target string; the maximum length is <code>S - 1</code>
but it must be &gt;= the default 38), the number of maximum attempts
before giving up and the number of offspring, respectively. I also give
<a href="#compiling">example compiler invocations</a>, <a
href="#portability">portability notes</a>, an <a href="#bugs">more
portability notes</a> and a <a href="#rpm">note on rpm.md</a>.</p>
<p>On the subject of <code>S</code> and <code>N</code>: As the judges’
@@ -458,18 +494,18 @@ means you’ll need to quote the string if it has more than one word (that
is it contains spaces) or anything else interpreted specially by your
shell e.g. parentheses. For instance if you just want to find
<code>METHINKS</code> you could do one of:</p>
<div class="sourceCode" id="cb15"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> METHINKS</span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="st">&quot;METHINKS&quot;</span></span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="st">&#39;METHINKS&#39;</span></span></code></pre></div>
<p>If you wanted <code>YOU ARE A MONKEY</code>:</p>
<div class="sourceCode" id="cb16"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="st">&quot;YOU ARE A MONKEY&quot;</span></span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="st">&#39;YOU ARE A MONKEY&#39;</span></span></code></pre></div>
<p>If you do one of:</p>
class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> METHINKS</span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="st">&quot;METHINKS&quot;</span></span>
<span id="cb16-3"><a href="#cb16-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="st">&#39;METHINKS&#39;</span></span></code></pre></div>
<p>If you wanted <code>YOU ARE A MONKEY</code>:</p>
<div class="sourceCode" id="cb17"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="st">&quot;METHINKS IT IS A&quot;</span> <span class="st">&quot;MONKEY&quot;</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> METHINKS IT IS A MONKEY</span></code></pre></div>
class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="st">&quot;YOU ARE A MONKEY&quot;</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="st">&#39;YOU ARE A MONKEY&#39;</span></span></code></pre></div>
<p>If you do one of:</p>
<div class="sourceCode" id="cb18"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="st">&quot;METHINKS IT IS A&quot;</span> <span class="st">&quot;MONKEY&quot;</span></span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> METHINKS IT IS A MONKEY</span></code></pre></div>
<p><br />
It will search for <code>MONKEY</code> in both cases; in other words
it’s the last one. If the string is too long given the value of
@@ -479,14 +515,14 @@ truncated.</p>
<p>If you actually do want to search for a string starting with a
<code>-</code> you must disable further parsing of options by using the
<code>-</code> option itself; for example if you were to do any of:</p>
<div class="sourceCode" id="cb18"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-q-</span> <span class="at">--</span> <span class="at">-test</span></span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-q-</span> <span class="at">-test</span></span>
<span id="cb18-3"><a href="#cb18-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-q</span> <span class="at">--</span> <span class="at">-test</span></span></code></pre></div>
<div class="sourceCode" id="cb19"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-q-</span> <span class="at">--</span> <span class="at">-test</span></span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-q-</span> <span class="at">-test</span></span>
<span id="cb19-3"><a href="#cb19-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-q</span> <span class="at">--</span> <span class="at">-test</span></span></code></pre></div>
<p>The target string will be: <code>-TEST</code>. This means though that
here:</p>
<div class="sourceCode" id="cb19"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-q</span> <span class="at">--</span> <span class="at">-test</span> <span class="at">-r5</span></span></code></pre></div>
<div class="sourceCode" id="cb20"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-q</span> <span class="at">--</span> <span class="at">-test</span> <span class="at">-r5</span></span></code></pre></div>
<p>The string to be searched would actually be <code>-r5</code> and the
mutation rate will remain the default because after the <code>-</code>
option is seen it will no longer parse additional options: only target
@@ -497,8 +533,8 @@ three above are equivalent i.e. the following two are equivalent:</p>
-q --</code></pre>
<p><br />
As for the caveat I referenced what does the following do?</p>
<div class="sourceCode" id="cb21"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-qr</span> 5</span></code></pre></div>
<div class="sourceCode" id="cb22"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-qr</span> 5</span></code></pre></div>
<p>In fact it will set quiet output and set the target string to be ‘5’.
So the mutation rate will be out of range, thus enabling that Easter
egg, but it will likely come to an answer fairly quickly because it’s
@@ -507,21 +543,21 @@ option; if the program is currently parsing <code>argv[N]</code>, for
example, and it encounters a <code>--</code> then depending on where the
other options are in the command line it might still parse the options.
Thus you have:</p>
<div class="sourceCode" id="cb22"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./weasel <span class="at">-qr-r5</span></span>
<span id="cb22-2"><a href="#cb22-2" aria-hidden="true" tabindex="-1"></a><span class="ex">quiet</span> output</span>
<span id="cb22-3"><a href="#cb22-3" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate out of range</span>
<span id="cb22-4"><a href="#cb22-4" aria-hidden="true" tabindex="-1"></a><span class="ex">target</span> <span class="st">&#39;METHINKS IT IS LIKE A WEASEL&#39;</span></span>
<span id="cb22-5"><a href="#cb22-5" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate 5</span>
<span id="cb22-6"><a href="#cb22-6" aria-hidden="true" tabindex="-1"></a><span class="ex">Generation</span> 440 Offspring 20: METHINKS IT IS LIKE A WEASEL</span></code></pre></div>
<div class="sourceCode" id="cb23"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./weasel <span class="at">-qr-r5</span></span>
<span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a><span class="ex">quiet</span> output</span>
<span id="cb23-3"><a href="#cb23-3" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate out of range</span>
<span id="cb23-4"><a href="#cb23-4" aria-hidden="true" tabindex="-1"></a><span class="ex">target</span> <span class="st">&#39;METHINKS IT IS LIKE A WEASEL&#39;</span></span>
<span id="cb23-5"><a href="#cb23-5" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate 5</span>
<span id="cb23-6"><a href="#cb23-6" aria-hidden="true" tabindex="-1"></a><span class="ex">Generation</span> 440 Offspring 20: METHINKS IT IS LIKE A WEASEL</span></code></pre></div>
<p>Similarly this would set quiet output, then an invalid mutation rate
and then a mutation rate of 5:</p>
<div class="sourceCode" id="cb23"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">--qrr5</span></span></code></pre></div>
<p>If you were instead to do one of (for example):</p>
<div class="sourceCode" id="cb24"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-q</span> <span class="at">--</span> <span class="at">-r</span></span>
<span id="cb24-2"><a href="#cb24-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-q</span> <span class="at">-q-</span> <span class="at">-r</span></span></code></pre></div>
class="sourceCode sh"><code class="sourceCode bash"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">--qrr5</span></span></code></pre></div>
<p>If you were instead to do one of (for example):</p>
<div class="sourceCode" id="cb25"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-q</span> <span class="at">--</span> <span class="at">-r</span></span>
<span id="cb25-2"><a href="#cb25-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./weasel</span> <span class="at">-q</span> <span class="at">-q-</span> <span class="at">-r</span></span></code></pre></div>
<p>Then it <em>would</em> set quiet output then see the <code>--</code>
(the <code>-</code> option itself) and then the target string would
<em>literally</em> be set to <code>-r</code> because it no longer cares
@@ -555,16 +591,16 @@ If yes how do we know if monkey mode was specially requested? There are
at least two ways to go about it: I took the monkey safe (‘fool safe’)
method; *if you explicitly request monkey mode you cannot disable it in
the same invocation of <code>weasel</code>!</p>
<div class="sourceCode" id="cb25"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./weasel <span class="at">-qr101r5r101r1r</span> test</span>
<span id="cb25-2"><a href="#cb25-2" aria-hidden="true" tabindex="-1"></a><span class="ex">quiet</span> output</span>
<span id="cb25-3"><a href="#cb25-3" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate out of range</span>
<span id="cb25-4"><a href="#cb25-4" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate out of range</span>
<span id="cb25-5"><a href="#cb25-5" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate out of range</span>
<span id="cb25-6"><a href="#cb25-6" aria-hidden="true" tabindex="-1"></a><span class="ex">target</span> <span class="st">&#39;test&#39;</span></span>
<span id="cb25-7"><a href="#cb25-7" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate 0</span>
<span id="cb25-8"><a href="#cb25-8" aria-hidden="true" tabindex="-1"></a><span class="ex">monkey</span> at typewriter</span>
<span id="cb25-9"><a href="#cb25-9" aria-hidden="true" tabindex="-1"></a><span class="ex">Generation</span> 16844 Offspring 22: TEST</span></code></pre></div>
<div class="sourceCode" id="cb26"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./weasel <span class="at">-qr101r5r101r1r</span> test</span>
<span id="cb26-2"><a href="#cb26-2" aria-hidden="true" tabindex="-1"></a><span class="ex">quiet</span> output</span>
<span id="cb26-3"><a href="#cb26-3" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate out of range</span>
<span id="cb26-4"><a href="#cb26-4" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate out of range</span>
<span id="cb26-5"><a href="#cb26-5" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate out of range</span>
<span id="cb26-6"><a href="#cb26-6" aria-hidden="true" tabindex="-1"></a><span class="ex">target</span> <span class="st">&#39;test&#39;</span></span>
<span id="cb26-7"><a href="#cb26-7" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate 0</span>
<span id="cb26-8"><a href="#cb26-8" aria-hidden="true" tabindex="-1"></a><span class="ex">monkey</span> at typewriter</span>
<span id="cb26-9"><a href="#cb26-9" aria-hidden="true" tabindex="-1"></a><span class="ex">Generation</span> 16844 Offspring 22: TEST</span></code></pre></div>
<p>So in this case I joined the options in the following order:</p>
<ol type="1">
<li><p><code>-q</code></p>
@@ -601,27 +637,27 @@ for <code>TEST</code>).</p></li>
<p>Given that it was a short string it did find the answer relatively
quickly, even in monkey mode.</p>
<p>Another example:</p>
<div class="sourceCode" id="cb26"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./weasel <span class="at">-q</span> <span class="at">-r101</span> test <span class="at">-r5</span></span>
<span id="cb26-2"><a href="#cb26-2" aria-hidden="true" tabindex="-1"></a><span class="ex">quiet</span> output</span>
<span id="cb26-3"><a href="#cb26-3" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate out of range</span>
<span id="cb26-4"><a href="#cb26-4" aria-hidden="true" tabindex="-1"></a><span class="ex">target</span> <span class="st">&#39;test&#39;</span></span>
<span id="cb26-5"><a href="#cb26-5" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate 5</span>
<span id="cb26-6"><a href="#cb26-6" aria-hidden="true" tabindex="-1"></a><span class="ex">Generation</span> 109 Offspring 13: TEST</span></code></pre></div>
<div class="sourceCode" id="cb27"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./weasel <span class="at">-q</span> <span class="at">-r101</span> test <span class="at">-r5</span></span>
<span id="cb27-2"><a href="#cb27-2" aria-hidden="true" tabindex="-1"></a><span class="ex">quiet</span> output</span>
<span id="cb27-3"><a href="#cb27-3" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate out of range</span>
<span id="cb27-4"><a href="#cb27-4" aria-hidden="true" tabindex="-1"></a><span class="ex">target</span> <span class="st">&#39;test&#39;</span></span>
<span id="cb27-5"><a href="#cb27-5" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate 5</span>
<span id="cb27-6"><a href="#cb27-6" aria-hidden="true" tabindex="-1"></a><span class="ex">Generation</span> 109 Offspring 13: TEST</span></code></pre></div>
<p>In this case I also enabled quiet mode but I didn’t join the options;
the <code>-r101</code> reports that it’s out of range and sets monkey
mode. I then specify the target string and then set a valid mutation
rate. This disabled monkey mode which means that it’ll use the genetic
algorithm.</p>
<p>One more example of monkey mode:</p>
<div class="sourceCode" id="cb27"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./weasel <span class="at">-q</span> <span class="at">-mr101</span> test <span class="at">-r5</span></span>
<span id="cb27-2"><a href="#cb27-2" aria-hidden="true" tabindex="-1"></a><span class="ex">quiet</span> output</span>
<span id="cb27-3"><a href="#cb27-3" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate out of range</span>
<span id="cb27-4"><a href="#cb27-4" aria-hidden="true" tabindex="-1"></a><span class="ex">target</span> <span class="st">&#39;test&#39;</span></span>
<span id="cb27-5"><a href="#cb27-5" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate 5</span>
<span id="cb27-6"><a href="#cb27-6" aria-hidden="true" tabindex="-1"></a><span class="ex">monkey</span> at typewriter</span>
<span id="cb27-7"><a href="#cb27-7" aria-hidden="true" tabindex="-1"></a><span class="ex">Generation</span> 465298 Offspring 10: TEST</span></code></pre></div>
<div class="sourceCode" id="cb28"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./weasel <span class="at">-q</span> <span class="at">-mr101</span> test <span class="at">-r5</span></span>
<span id="cb28-2"><a href="#cb28-2" aria-hidden="true" tabindex="-1"></a><span class="ex">quiet</span> output</span>
<span id="cb28-3"><a href="#cb28-3" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate out of range</span>
<span id="cb28-4"><a href="#cb28-4" aria-hidden="true" tabindex="-1"></a><span class="ex">target</span> <span class="st">&#39;test&#39;</span></span>
<span id="cb28-5"><a href="#cb28-5" aria-hidden="true" tabindex="-1"></a><span class="ex">mutation</span> rate 5</span>
<span id="cb28-6"><a href="#cb28-6" aria-hidden="true" tabindex="-1"></a><span class="ex">monkey</span> at typewriter</span>
<span id="cb28-7"><a href="#cb28-7" aria-hidden="true" tabindex="-1"></a><span class="ex">Generation</span> 465298 Offspring 10: TEST</span></code></pre></div>
<p>Here I also requested quiet output and then <em>explicitly requested
that Eric the monkey types.</em> After this I set the mutation rate to
be 101 which would have set monkey mode (<em>in this case only
@@ -715,13 +751,13 @@ read from the file and pass each string to the program itself</em>. I’ve
included a script <code>test.sh</code> and a file of sample input
<code>test-strings.txt</code> that you can play with.</p>
<p>Try:</p>
<div class="sourceCode" id="cb32"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> test</span></code></pre></div>
<div class="sourceCode" id="cb33"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> test</span></code></pre></div>
<p>This will essentially make sure the program is compiled and then
do:</p>
<div class="sourceCode" id="cb33"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a><span class="fu">chmod</span> +x test.sh</span>
<span id="cb33-2"><a href="#cb33-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./test.sh</span></span></code></pre></div>
<div class="sourceCode" id="cb34"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="fu">chmod</span> +x test.sh</span>
<span id="cb34-2"><a href="#cb34-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./test.sh</span></span></code></pre></div>
<p>The script will first try compiling the program (if necessary) and if
it fails for any reason it will exit; else it will read each line in the
file <code>test-strings.txt</code> (if the file doesn’t exist or can’t
@@ -732,8 +768,8 @@ until all the strings have been read and processed).</p>
<p>You can pass additional options directly to the script but remember
that it stops when there are no more strings in the file - so if you
try:</p>
<div class="sourceCode" id="cb34"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./test.sh</span> <span class="at">-q</span> test</span></code></pre></div>
<div class="sourceCode" id="cb35"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./test.sh</span> <span class="at">-q</span> test</span></code></pre></div>
<p>The final string <code>test</code> won’t be searched for; it will
however run the program in all invocations with quiet output enabled.
The following are some notes about how the shell and the program
@@ -762,12 +798,12 @@ keyboard the program prints an error message and then exits (returning
1). But since the keyboard doesn’t have <code>'\n'</code> if you were to
type a <code>'</code> and send a <code>'\n'</code> before the closing
<code>'</code> you might see something like:</p>
<div class="sourceCode" id="cb35"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./weasel <span class="st">&#39;!!</span></span>
<span id="cb35-2"><a href="#cb35-2" aria-hidden="true" tabindex="-1"></a><span class="st">&gt; &#39;</span></span>
<span id="cb35-3"><a href="#cb35-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb35-4"><a href="#cb35-4" aria-hidden="true" tabindex="-1"></a><span class="st">&#39;</span></span>
<span id="cb35-5"><a href="#cb35-5" aria-hidden="true" tabindex="-1"></a><span class="st">&#39;</span> not in keyboard <span class="st">&quot; !&quot;</span>#$<span class="op">&lt;</span>%:<span class="op">&gt;&amp;</span><span class="st">&#39;()*+,-./0123456789;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~&quot;</span></span></code></pre></div>
<div class="sourceCode" id="cb36"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ./weasel <span class="st">&#39;!!</span></span>
<span id="cb36-2"><a href="#cb36-2" aria-hidden="true" tabindex="-1"></a><span class="st">&gt; &#39;</span></span>
<span id="cb36-3"><a href="#cb36-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb36-4"><a href="#cb36-4" aria-hidden="true" tabindex="-1"></a><span class="st">&#39;</span></span>
<span id="cb36-5"><a href="#cb36-5" aria-hidden="true" tabindex="-1"></a><span class="st">&#39;</span> not in keyboard <span class="st">&quot; !&quot;</span>#$<span class="op">&lt;</span>%:<span class="op">&gt;&amp;</span><span class="st">&#39;()*+,-./0123456789;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~&quot;</span></span></code></pre></div>
<p>I showed that <code>'</code> is in the keyboard already; however the
user sent a <code>\n</code> (hence the secondary prompt
<code>&gt;</code> on line two) before literally typing the closing
@@ -793,9 +829,9 @@ read.</p>
(like <code>S</code>) as well as some C keywords.</p></li>
<li><p>The way <code>main()</code> is declared is:</p></li>
</ol>
<div class="sourceCode" id="cb36"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a><span class="co">/* Special C main() handler (encapsulation): */</span></span>
<span id="cb36-2"><a href="#cb36-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#define r</span><span class="op">(</span><span class="pp">main</span><span class="op">)</span><span class="pp"> main</span></span>
<span id="cb36-3"><a href="#cb36-3" aria-hidden="true" tabindex="-1"></a>r<span class="op">(</span>k main<span class="op">(</span>k a<span class="op">,</span> E <span class="op">**</span>V<span class="op">))</span> <span class="op">{</span></span></code></pre></div>
<div class="sourceCode" id="cb37"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="co">/* Special C main() handler (encapsulation): */</span></span>
<span id="cb37-2"><a href="#cb37-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#define r</span><span class="op">(</span><span class="pp">main</span><span class="op">)</span><span class="pp"> main</span></span>
<span id="cb37-3"><a href="#cb37-3" aria-hidden="true" tabindex="-1"></a>r<span class="op">(</span>k main<span class="op">(</span>k a<span class="op">,</span> E <span class="op">**</span>V<span class="op">))</span> <span class="op">{</span></span></code></pre></div>
<pre><code>It appears to be recursively defined but is it? And is it truly</code></pre>
<p>encapsulation? And is it executing code of any kind? It mightn’t seem
like it isn’t encapsulation and also isn’t executing code but assuming
@@ -852,18 +888,22 @@ wrong. Yes some of it might look like a blob but this is clearly false;
or misleading it should be made clear in the comments! :)</em></p>
<h2 id="how-to-build"><strong>5. <a name="build">How to
build</a></strong></h2>
<h3 id="s-and-n-constants"><a name="constants">S and N
<h3 id="s-m-and-n-constants"><a name="constants">S, M and N
Constants</a></h3>
<p>Skip to <a href="#compiling">Compilation</a>.</p>
<p>These two <code>#define</code>d constants can be redefined at
compilation to modify the behaviour of the program in a number of ways
(see the <strong><a href="#compiling">Compilation</a></strong>
<p>There are three <code>#define</code>d constants that can be redefined
at compilation to modify the behaviour of the program in a number of
ways (see the <strong><a href="#compiling">Compilation</a></strong>
subsection for example invocations). Both are capped to be no greater
than <code>SIZE_MAX - 1</code>. This is handled by the C
preprocessor.</p>
<p><code>S</code></p>
<p>This determines the maximum size of the target string but it
<strong>must be at least 38</strong>; this is because
than <code>SIZE_MAX - 1</code> or whatever <code>M</code> (which can’t
be lower than 100) is set to (maximum attempts before giving up). This
is handled by the C preprocessor.</p>
<ul>
<li><code>S</code></li>
</ul>
<p>The macro <code>S</code> (or <code>MAX_SIZE</code> in the Makefile)
is the maximum size of the target string but it <strong>must be at least
38</strong> (which is protected against in the code); this is because
<code>38 &gt;= 29</code> and because
<code>strlen("METHINKS IT IS LIKE A WEASEL") == 28</code> (which is the
default target string - it would hardly be an implementation of the
@@ -874,33 +914,58 @@ works</a></strong> and specifically an Easter egg I referenced there
(it’s <em>not the only Easter egg</em> but it’s the only Easter egg I
won’t spoil; yes this ironically and amusingly means I’ve left a rotten
egg somewhere!).</p>
<p><code>N</code></p>
<p>This is the number of offspring per generation. Anything less than 4
will be set to 3 (that’s not a typo!) and this is part of an Easter
egg.</p>
<p>Be aware that depending on the size of <code>S</code> and
<code>N</code> (individually and together) the program will use varying
amounts of memory and the larger the values the more memory it’ll
require.</p>
<p>The Makefile simplifies how to reconfigure this value with the
variable <code>MAX_SIZE</code>:</p>
<div class="sourceCode" id="cb39"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber MAX_SIZE=55 all</span></code></pre></div>
<p>The next macro that can be reconfigured, <code>M</code> (or
<code>MAX_ATTEMPTS</code> in the Makefile), is the maximum attempts
before giving up. This was added as another feature in 2024 but it was
not made an alt version because there already is an alt version. This
macro allows for seeing what happens when reaching the maximum number
attempts without waiting for a very long time.</p>
<p>The Makefile simplifies how to reconfigure this value with the
variable <code>MAX_ATTEMPTS</code>:</p>
<div class="sourceCode" id="cb40"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber MAX_ATTEMPTS=100 all</span></code></pre></div>
<p>The final macro, <code>N</code> (or <code>OFFSPRING</code> in the
Makefile), is the number of offspring per generation.</p>
<p>Anything less than 4 will be set to 3 (that’s not a typo!) and this
is part of an Easter egg.</p>
<p>Be aware that depending on the size of <code>S</code>
(<code>MAX_SIZE</code>) and <code>N</code> (<code>OFFSPRING</code>) both
individually and together the program will use varying amounts of memory
and the larger the values the more memory it’ll require.</p>
<p>The Makefile simplifies how to reconfigure this value with the
variable <code>OFFSPRING</code>:</p>
<div class="sourceCode" id="cb41"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber OFFSPRING=55 all</span></code></pre></div>
<h3 id="compilation"><a name="compiling">Compilation</a></h3>
<p>Skip to <a href="#portability">Portability</a>.</p>
<p>The following options <strong>must always be passed to the
compiler:</strong></p>
<div class="sourceCode" id="cb38"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true" tabindex="-1"></a><span class="ex">-DQ=</span><span class="st">&#39;typedef&#39;</span> <span class="at">-D</span><span class="st">&#39;g(o)&#39;</span><span class="op">=</span><span class="st">&#39;goto o;&#39;</span> <span class="at">-D</span><span class="st">&#39;w(x)&#39;</span><span class="op">=</span><span class="st">&quot;x:&quot;</span> <span class="at">-D</span><span class="st">&#39;H(main)&#39;</span><span class="op">=</span><span class="st">&#39;r(main)&#39;</span></span></code></pre></div>
<div class="sourceCode" id="cb42"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a><span class="ex">-DQ=</span><span class="st">&#39;typedef&#39;</span> <span class="at">-D</span><span class="st">&#39;g(o)&#39;</span><span class="op">=</span><span class="st">&#39;goto o;&#39;</span> <span class="at">-D</span><span class="st">&#39;w(x)&#39;</span><span class="op">=</span><span class="st">&quot;x:&quot;</span> <span class="at">-D</span><span class="st">&#39;H(main)&#39;</span><span class="op">=</span><span class="st">&#39;r(main)&#39;</span></span></code></pre></div>
<p>which running <code>make</code> will always do.</p>
<p>If you want to increase the number of offspring to <code>50</code>
and the size of the chromosome to <code>75</code> you would pass to the
compiler:</p>
<div class="sourceCode" id="cb39"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a><span class="ex">-DQ=</span><span class="st">&#39;typedef&#39;</span> <span class="at">-D</span><span class="st">&#39;g(o)&#39;</span><span class="op">=</span><span class="st">&#39;goto o;&#39;</span> <span class="at">-D</span><span class="st">&#39;w(x)&#39;</span><span class="op">=</span><span class="st">&quot;x:&quot;</span> <span class="at">-D</span><span class="st">&#39;H(main)&#39;</span><span class="op">=</span><span class="st">&#39;r(main)&#39;</span> <span class="at">-DN</span><span class="op">=</span>50 <span class="at">-DS</span><span class="op">=</span>75</span></code></pre></div>
(<code>N</code>) and the size of the chromosome to <code>75</code>
(<code>S</code>) you would do:</p>
<div class="sourceCode" id="cb43"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber OFFSPRING=50 MAX_SIZE=75 everything</span></code></pre></div>
<p>If you wanted to change <code>N</code> to <code>3</code>:</p>
<div class="sourceCode" id="cb40"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a><span class="ex">-DQ=</span><span class="st">&#39;typedef&#39;</span> <span class="at">-D</span><span class="st">&#39;g(o)&#39;</span><span class="op">=</span><span class="st">&#39;goto o;&#39;</span> <span class="at">-D</span><span class="st">&#39;w(x)&#39;</span><span class="op">=</span><span class="st">&quot;x:&quot;</span> <span class="at">-D</span><span class="st">&#39;H(main)&#39;</span><span class="op">=</span><span class="st">&#39;r(main)&#39;</span> <span class="at">-DN</span><span class="op">=</span>3</span></code></pre></div>
<div class="sourceCode" id="cb44"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb44-1"><a href="#cb44-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber OFFSPRING=3 everything</span></code></pre></div>
<p>Remember that it cannot be less than <code>3</code>; <em>more
correctly if it’s less than 4 it’s redefined to 3</em> so you could have
passed in <code>-DN=2</code> and have the same result. Remember too that
<code>S</code> cannot be less than <code>38</code>. Both <code>S</code>
and <code>N</code> are capped at <code>SIZE_MAX - 1</code>.</p>
passed in <code>-DN=2</code> (or <code>MAX_SIZE=2</code>) and have the
same result. Remember too that <code>S</code> (<code>MAX_SIZE</code>)
cannot be less than <code>38</code>. Both <code>S</code> and
<code>N</code> are capped at <code>SIZE_MAX - 1</code> or whatever
<code>M</code> (<code>MAX_ATTEMPTS</code>) is set to.</p>
<p>If you wanted to change the maximum number attempts to 100 you could
do:</p>
<div class="sourceCode" id="cb45"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb45-1"><a href="#cb45-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber MAX_ATTEMPTS=100 everything</span></code></pre></div>
<h3 id="portability"><a name="portability">Portability</a></h3>
<p>Skip to <a href="#bugs">An aside on bugs</a>.</p>
<p>This entry requires at least C99 even if you translate digraphs. The
@@ -911,48 +976,48 @@ some data type sizes will be smaller and this I believe includes
issues (if any) either but I have no way to test this. Originally I
tested it on the below systems.</p>
<h4 id="fedora-26">Fedora 26:</h4>
<div class="sourceCode" id="cb41"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> clang <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
<span id="cb41-2"><a href="#cb41-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> version 4.0.1 <span class="er">(</span><span class="ex">tags/RELEASE_401/final</span><span class="kw">)</span></span>
<span id="cb41-3"><a href="#cb41-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
<span id="cb41-4"><a href="#cb41-4" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="er">(</span><span class="ex">GCC</span><span class="kw">)</span> <span class="ex">7.3.1</span> 20180130 <span class="er">(</span><span class="ex">Red</span> Hat 7.3.1-2<span class="kw">)</span></span>
<span id="cb41-5"><a href="#cb41-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> /lib64/libc-2.25.so <span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span><span class="kw">|</span><span class="fu">cut</span> <span class="at">-d</span><span class="st">&#39;,&#39;</span> <span class="at">-f1-1</span></span>
<span id="cb41-6"><a href="#cb41-6" aria-hidden="true" tabindex="-1"></a><span class="ex">GNU</span> C Library <span class="er">(</span><span class="ex">GNU</span> libc<span class="kw">)</span> <span class="ex">stable</span> release version 2.25</span>
<span id="cb41-7"><a href="#cb41-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> lscpu <span class="kw">|</span><span class="fu">grep</span> Endian</span>
<span id="cb41-8"><a href="#cb41-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Byte</span> Order: Little Endian</span></code></pre></div>
<div class="sourceCode" id="cb46"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> clang <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
<span id="cb46-2"><a href="#cb46-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> version 4.0.1 <span class="er">(</span><span class="ex">tags/RELEASE_401/final</span><span class="kw">)</span></span>
<span id="cb46-3"><a href="#cb46-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
<span id="cb46-4"><a href="#cb46-4" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="er">(</span><span class="ex">GCC</span><span class="kw">)</span> <span class="ex">7.3.1</span> 20180130 <span class="er">(</span><span class="ex">Red</span> Hat 7.3.1-2<span class="kw">)</span></span>
<span id="cb46-5"><a href="#cb46-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> /lib64/libc-2.25.so <span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span><span class="kw">|</span><span class="fu">cut</span> <span class="at">-d</span><span class="st">&#39;,&#39;</span> <span class="at">-f1-1</span></span>
<span id="cb46-6"><a href="#cb46-6" aria-hidden="true" tabindex="-1"></a><span class="ex">GNU</span> C Library <span class="er">(</span><span class="ex">GNU</span> libc<span class="kw">)</span> <span class="ex">stable</span> release version 2.25</span>
<span id="cb46-7"><a href="#cb46-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> lscpu <span class="kw">|</span><span class="fu">grep</span> Endian</span>
<span id="cb46-8"><a href="#cb46-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Byte</span> Order: Little Endian</span></code></pre></div>
<h4 id="centos-linux-release-7.4.1708-core">CentOS Linux release
7.4.1708 (Core)</h4>
<div class="sourceCode" id="cb42"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> clang <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
<span id="cb42-2"><a href="#cb42-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> version 3.4.2 <span class="er">(</span><span class="ex">tags/RELEASE_34/dot2-final</span><span class="kw">)</span></span>
<span id="cb42-3"><a href="#cb42-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
<span id="cb42-4"><a href="#cb42-4" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="er">(</span><span class="ex">GCC</span><span class="kw">)</span> <span class="ex">4.8.5</span> 20150623 <span class="er">(</span><span class="ex">Red</span> Hat 4.8.5-16<span class="kw">)</span></span>
<span id="cb42-5"><a href="#cb42-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> /lib64/libc-2.17.so <span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span> <span class="kw">|</span><span class="fu">cut</span> <span class="at">-d,</span> <span class="at">-f1-1</span></span>
<span id="cb42-6"><a href="#cb42-6" aria-hidden="true" tabindex="-1"></a><span class="ex">GNU</span> C Library <span class="er">(</span><span class="ex">GNU</span> libc<span class="kw">)</span> <span class="ex">stable</span> release version 2.17</span>
<span id="cb42-7"><a href="#cb42-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> lscpu <span class="kw">|</span><span class="fu">grep</span> Endian</span>
<span id="cb42-8"><a href="#cb42-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Byte</span> Order: Little Endian</span></code></pre></div>
<div class="sourceCode" id="cb47"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb47-1"><a href="#cb47-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> clang <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
<span id="cb47-2"><a href="#cb47-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> version 3.4.2 <span class="er">(</span><span class="ex">tags/RELEASE_34/dot2-final</span><span class="kw">)</span></span>
<span id="cb47-3"><a href="#cb47-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
<span id="cb47-4"><a href="#cb47-4" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="er">(</span><span class="ex">GCC</span><span class="kw">)</span> <span class="ex">4.8.5</span> 20150623 <span class="er">(</span><span class="ex">Red</span> Hat 4.8.5-16<span class="kw">)</span></span>
<span id="cb47-5"><a href="#cb47-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> /lib64/libc-2.17.so <span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span> <span class="kw">|</span><span class="fu">cut</span> <span class="at">-d,</span> <span class="at">-f1-1</span></span>
<span id="cb47-6"><a href="#cb47-6" aria-hidden="true" tabindex="-1"></a><span class="ex">GNU</span> C Library <span class="er">(</span><span class="ex">GNU</span> libc<span class="kw">)</span> <span class="ex">stable</span> release version 2.17</span>
<span id="cb47-7"><a href="#cb47-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> lscpu <span class="kw">|</span><span class="fu">grep</span> Endian</span>
<span id="cb47-8"><a href="#cb47-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Byte</span> Order: Little Endian</span></code></pre></div>
<h4 id="fedora-27">Fedora 27:</h4>
<div class="sourceCode" id="cb43"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> clang <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
<span id="cb43-2"><a href="#cb43-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> version 5.0.1 <span class="er">(</span><span class="ex">tags/RELEASE_501/final</span><span class="kw">)</span></span>
<span id="cb43-3"><a href="#cb43-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
<span id="cb43-4"><a href="#cb43-4" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="er">(</span><span class="ex">GCC</span><span class="kw">)</span> <span class="ex">7.3.1</span> 20180303 <span class="er">(</span><span class="ex">Red</span> Hat 7.3.1-5<span class="kw">)</span></span>
<span id="cb43-5"><a href="#cb43-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> /lib64/libc-2.26.so <span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span><span class="kw">|</span><span class="fu">cut</span> <span class="at">-d,</span> <span class="at">-f1-1</span></span>
<span id="cb43-6"><a href="#cb43-6" aria-hidden="true" tabindex="-1"></a><span class="ex">GNU</span> C Library <span class="er">(</span><span class="ex">GNU</span> libc<span class="kw">)</span> <span class="ex">stable</span> release version 2.26</span>
<span id="cb43-7"><a href="#cb43-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> lscpu <span class="kw">|</span><span class="fu">grep</span> Endian</span>
<span id="cb43-8"><a href="#cb43-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Byte</span> Order: Little Endian</span></code></pre></div>
<div class="sourceCode" id="cb48"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb48-1"><a href="#cb48-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> clang <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
<span id="cb48-2"><a href="#cb48-2" aria-hidden="true" tabindex="-1"></a><span class="fu">clang</span> version 5.0.1 <span class="er">(</span><span class="ex">tags/RELEASE_501/final</span><span class="kw">)</span></span>
<span id="cb48-3"><a href="#cb48-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">--version</span><span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span></span>
<span id="cb48-4"><a href="#cb48-4" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="er">(</span><span class="ex">GCC</span><span class="kw">)</span> <span class="ex">7.3.1</span> 20180303 <span class="er">(</span><span class="ex">Red</span> Hat 7.3.1-5<span class="kw">)</span></span>
<span id="cb48-5"><a href="#cb48-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> /lib64/libc-2.26.so <span class="kw">|</span><span class="fu">head</span> <span class="at">-n1</span><span class="kw">|</span><span class="fu">cut</span> <span class="at">-d,</span> <span class="at">-f1-1</span></span>
<span id="cb48-6"><a href="#cb48-6" aria-hidden="true" tabindex="-1"></a><span class="ex">GNU</span> C Library <span class="er">(</span><span class="ex">GNU</span> libc<span class="kw">)</span> <span class="ex">stable</span> release version 2.26</span>
<span id="cb48-7"><a href="#cb48-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> lscpu <span class="kw">|</span><span class="fu">grep</span> Endian</span>
<span id="cb48-8"><a href="#cb48-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Byte</span> Order: Little Endian</span></code></pre></div>
<h4 id="macos">macOS:</h4>
<p>System Version: macOS 10.13.4 (17E199) Kernel Version: Darwin
17.5.0</p>
<div class="sourceCode" id="cb44"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb44-1"><a href="#cb44-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">-v</span></span>
<span id="cb44-2"><a href="#cb44-2" aria-hidden="true" tabindex="-1"></a><span class="ex">Configured</span> with: <span class="at">--prefix</span><span class="op">=</span>/Library/Developer/CommandLineTools/usr <span class="at">--with-gxx-include-dir</span><span class="op">=</span>/usr/include/c++/4.2.1</span>
<span id="cb44-3"><a href="#cb44-3" aria-hidden="true" tabindex="-1"></a><span class="ex">Apple</span> LLVM version 9.1.0 <span class="er">(</span><span class="ex">clang-902.0.39.1</span><span class="kw">)</span></span>
<span id="cb44-4"><a href="#cb44-4" aria-hidden="true" tabindex="-1"></a><span class="ex">Target:</span> x86_64-apple-darwin17.5.0</span>
<span id="cb44-5"><a href="#cb44-5" aria-hidden="true" tabindex="-1"></a><span class="ex">Thread</span> model: posix</span>
<span id="cb44-6"><a href="#cb44-6" aria-hidden="true" tabindex="-1"></a><span class="ex">InstalledDir:</span> /Library/Developer/CommandLineTools/usr/bin</span>
<span id="cb44-7"><a href="#cb44-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> uname <span class="at">-srmv</span></span>
<span id="cb44-8"><a href="#cb44-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Darwin</span> 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018<span class="kw">;</span> <span class="ex">root:xnu-4570.51.1~1/RELEASE_X86_64</span> x86_64</span></code></pre></div>
<div class="sourceCode" id="cb49"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb49-1"><a href="#cb49-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> gcc <span class="at">-v</span></span>
<span id="cb49-2"><a href="#cb49-2" aria-hidden="true" tabindex="-1"></a><span class="ex">Configured</span> with: <span class="at">--prefix</span><span class="op">=</span>/Library/Developer/CommandLineTools/usr <span class="at">--with-gxx-include-dir</span><span class="op">=</span>/usr/include/c++/4.2.1</span>
<span id="cb49-3"><a href="#cb49-3" aria-hidden="true" tabindex="-1"></a><span class="ex">Apple</span> LLVM version 9.1.0 <span class="er">(</span><span class="ex">clang-902.0.39.1</span><span class="kw">)</span></span>
<span id="cb49-4"><a href="#cb49-4" aria-hidden="true" tabindex="-1"></a><span class="ex">Target:</span> x86_64-apple-darwin17.5.0</span>
<span id="cb49-5"><a href="#cb49-5" aria-hidden="true" tabindex="-1"></a><span class="ex">Thread</span> model: posix</span>
<span id="cb49-6"><a href="#cb49-6" aria-hidden="true" tabindex="-1"></a><span class="ex">InstalledDir:</span> /Library/Developer/CommandLineTools/usr/bin</span>
<span id="cb49-7"><a href="#cb49-7" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> uname <span class="at">-srmv</span></span>
<span id="cb49-8"><a href="#cb49-8" aria-hidden="true" tabindex="-1"></a><span class="ex">Darwin</span> 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018<span class="kw">;</span> <span class="ex">root:xnu-4570.51.1~1/RELEASE_X86_64</span> x86_64</span></code></pre></div>
<h4 id="an-aside"><a name="bugs">An aside</a></h4>
<p>Skip to <a href="#rpm">Installing</a>.</p>
<p>Any undocumented bugs are the result of insolent monkeys tampering
@@ -1082,8 +1147,8 @@ we quickly added additional cryptic features and evolved into B, BCPL,
and finally C. We stopped when we got a clean compile on the following
syntax:</p>
</blockquote>
<div class="sourceCode" id="cb45"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb45-1"><a href="#cb45-1" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span><span class="op">(;</span>P<span class="op">(</span><span class="st">&quot;</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">),</span>R<span class="op">=;</span>P<span class="op">(</span><span class="st">&quot;|&quot;</span><span class="op">))</span><span class="cf">for</span><span class="op">(</span>e<span class="op">=</span>C<span class="op">;</span>e<span class="op">=</span>P<span class="op">(</span><span class="st">&quot;_&quot;</span><span class="op">+(*</span>u<span class="op">++/</span></span>
<span id="cb45-2"><a href="#cb45-2" aria-hidden="true" tabindex="-1"></a><span class="dv">8</span><span class="op">)%</span><span class="dv">2</span><span class="op">))</span>P<span class="op">(</span><span class="st">&quot;|&quot;</span><span class="op">+(*</span>u<span class="op">/</span><span class="dv">4</span><span class="op">)%</span><span class="dv">2</span><span class="op">);</span></span></code></pre></div>
<div class="sourceCode" id="cb50"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb50-1"><a href="#cb50-1" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span><span class="op">(;</span>P<span class="op">(</span><span class="st">&quot;</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">),</span>R<span class="op">=;</span>P<span class="op">(</span><span class="st">&quot;|&quot;</span><span class="op">))</span><span class="cf">for</span><span class="op">(</span>e<span class="op">=</span>C<span class="op">;</span>e<span class="op">=</span>P<span class="op">(</span><span class="st">&quot;_&quot;</span><span class="op">+(*</span>u<span class="op">++/</span></span>
<span id="cb50-2"><a href="#cb50-2" aria-hidden="true" tabindex="-1"></a><span class="dv">8</span><span class="op">)%</span><span class="dv">2</span><span class="op">))</span>P<span class="op">(</span><span class="st">&quot;|&quot;</span><span class="op">+(*</span>u<span class="op">/</span><span class="dv">4</span><span class="op">)%</span><span class="dv">2</span><span class="op">);</span></span></code></pre></div>
<blockquote>
<p>“To think that modern programmers would try to use a language that
allowed such a statement was beyond our comprehension! We actually
@@ -1129,8 +1194,8 @@ since he was part of its creation I don’t think it’s a bad thing;
<strong>on the contrary it makes all of us C programmers even more
talented! :)</strong> I do wonder if he tested that bit of C code
though:</p>
<div class="sourceCode" id="cb46"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span><span class="op">(;</span>P<span class="op">(</span><span class="st">&quot;</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">),</span>R<span class="op">=;</span>P<span class="op">(</span><span class="st">&quot;|&quot;</span><span class="op">))</span><span class="cf">for</span><span class="op">(</span>e<span class="op">=</span>C<span class="op">;</span>e<span class="op">=</span>P<span class="op">(</span><span class="st">&quot;_&quot;</span><span class="op">+(*</span>u<span class="op">++/</span></span>
<span id="cb46-2"><a href="#cb46-2" aria-hidden="true" tabindex="-1"></a><span class="dv">8</span><span class="op">)%</span><span class="dv">2</span><span class="op">))</span>P<span class="op">(</span><span class="st">&quot;|&quot;</span><span class="op">+(*</span>u<span class="op">/</span><span class="dv">4</span><span class="op">)%</span><span class="dv">2</span><span class="op">);</span></span></code></pre></div>
<div class="sourceCode" id="cb51"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb51-1"><a href="#cb51-1" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span><span class="op">(;</span>P<span class="op">(</span><span class="st">&quot;</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">),</span>R<span class="op">=;</span>P<span class="op">(</span><span class="st">&quot;|&quot;</span><span class="op">))</span><span class="cf">for</span><span class="op">(</span>e<span class="op">=</span>C<span class="op">;</span>e<span class="op">=</span>P<span class="op">(</span><span class="st">&quot;_&quot;</span><span class="op">+(*</span>u<span class="op">++/</span></span>
<span id="cb51-2"><a href="#cb51-2" aria-hidden="true" tabindex="-1"></a><span class="dv">8</span><span class="op">)%</span><span class="dv">2</span><span class="op">))</span>P<span class="op">(</span><span class="st">&quot;|&quot;</span><span class="op">+(*</span>u<span class="op">/</span><span class="dv">4</span><span class="op">)%</span><span class="dv">2</span><span class="op">);</span></span></code></pre></div>
<p><br />
How is <code>R=;</code> valid? Since I don’t have the context maybe
there is something I’m missing but either way it’s a funny piece. It
@@ -1232,6 +1297,18 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ferguson/pro
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ferguson/FILES">FILES</a>
- information about various files</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ferguson/id.alt.sh">id.alt.sh</a>
- how to run</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ferguson/id.sh">id.sh</a>
- how to run</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ferguson/monkey-words.alt.sh">monkey-words.alt.sh</a>
- how to run</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ferguson/monkey-words.sh">monkey-words.sh</a>
- how to run</li>
<li><a href="rpm.html">rpm.html</a> - about forming the rpm</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/ferguson/test.sh">test.sh</a>
+8
View File
@@ -137,6 +137,14 @@
"display_via_github" : true,
"winners_text" : "run with English data"
},
{
"file_path" : "fr.alt.sh",
"inventory_order" : 150,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run alternative code in French"
},
{
"file_path" : "fr.sh",
"inventory_order" : 150,
+3
View File
@@ -322,6 +322,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/ciura/de.sh"
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/ciura/en.sh">en.sh</a>
- run with English data</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/ciura/fr.alt.sh">fr.alt.sh</a>
- how to run alternative code in French</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/ciura/fr.sh">fr.sh</a>
- run with French data</li>
<li><a
+8
View File
@@ -49,6 +49,14 @@
"display_via_github" : false,
"winners_text" : "reverb algorithm block-diagram of internal structure"
},
{
"file_path" : "try.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run"
},
{
"file_path" : "MonodyVocals.wav",
"inventory_order" : 150,
+8 -7
View File
@@ -121,13 +121,11 @@ Location: <a href="/temp-test-ioccc/location.html#AU">AU</a></p>
<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> infile.wav outfile.wav</span></code></pre></div>
<h2 id="try">Try:</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">play</span> MonodyVocals.wav</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> MonodyVocals.wav</span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">play</span> out.wav</span></code></pre></div>
<p>NOTE: <code>play</code> comes from SoX, the Swiss Army Knife of sound
processing programs. If you don’t have this installed, see <a
href="/faq.md#faq3_10">FAQ 3.10: How do I compile and use an IOCCC
winner that requires sound</a>.</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>
<p>NOTE: <code>play</code>, which <a href="try.sh">try.sh</a> uses,
comes from SoX, the Swiss Army Knife of sound processing programs. If
you don’t have this installed, see <a href="/faq.md#faq3_10">FAQ 3.10:
How do I compile and use an IOCCC winner that requires sound</a>.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Do you need to pretend enjoying a more spacious living environment
than you actually are in, or the great outdoors with mountains and
@@ -371,6 +369,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/giles/prog.o
- original source</li>
<li><a href="BlockDiagram.png">BlockDiagram.png</a> - reverb algorithm
block-diagram of internal structure</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2019/giles/try.sh">try.sh</a>
- how to run</li>
<li><a href="MonodyVocals.wav">MonodyVocals.wav</a> - Monody by
TheFatRat featuring Laura Brehm</li>
<li><a href="2019_giles.tar.bz2">2019_giles.tar.bz2</a> - download
+8
View File
@@ -49,6 +49,14 @@
"display_via_github" : true,
"winners_text" : "original source"
},
{
"file_path" : "run_clock.alt.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run alternate code"
},
{
"file_path" : "run_clock.sh",
"inventory_order" : 100,
+7 -1
View File
@@ -133,6 +133,9 @@ Unicode letters.</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="fu">make</span> alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>prog.alt</code> as you would <code>prog</code> above.</p>
<h3 id="alternate-try">Alternate try:</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="ex">./run_clock.alt</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="co"># And watch closely for 15-20 seconds</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>You may be tempted to use a mirror. Resist the temptation! Try
figuring out how the clock hands are drawn. Can you change the program
@@ -142,7 +145,7 @@ second hand?</p>
your perception of time might depend on what time it is.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>Prepare a mirror!</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">make</span> clock</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="fu">make</span> clock</span></code></pre></div>
<p>Note: You need to recompile it each run.</p>
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
License:</h2>
@@ -172,6 +175,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/endoh3/prog.
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/endoh3/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/endoh3/run_clock.alt.sh">run_clock.alt.sh</a>
- how to run alternate code</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/endoh3/run_clock.sh">run_clock.sh</a>
- how to run</li>
<li><a href="2020_endoh3.tar.bz2">2020_endoh3.tar.bz2</a> - download
-8
View File
@@ -97,14 +97,6 @@
"display_via_github" : true,
"winners_text" : "script to reset - preset colors"
},
{
"file_path" : "ioccc-and-chocolate.pdf",
"inventory_order" : 150,
"OK_to_edit" : true,
"display_as" : "pdf",
"display_via_github" : false,
"winners_text" : "IOCCC publications"
},
{
"file_path" : "prog.2.c",
"inventory_order" : 150,
-2
View File
@@ -752,8 +752,6 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/pl
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/snake-colours.sh">snake-colours.sh</a>
- script to reset - preset colors</li>
<li><a href="ioccc-and-chocolate.pdf">ioccc-and-chocolate.pdf</a> -
IOCCC publications</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson1/prog.2.c">prog.2.c</a>
- source with more digraphs</li>
-8
View File
@@ -105,14 +105,6 @@
"display_via_github" : true,
"winners_text" : "Enigma simulator man page"
},
{
"file_path" : "ioccc-and-chocolate.pdf",
"inventory_order" : 150,
"OK_to_edit" : true,
"display_as" : "pdf",
"display_via_github" : false,
"winners_text" : "IOCCC publications"
},
{
"file_path" : "key.txt",
"inventory_order" : 150,
-2
View File
@@ -988,8 +988,6 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/tr
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/enigma.1">enigma.1</a>
- Enigma simulator man page</li>
<li><a href="ioccc-and-chocolate.pdf">ioccc-and-chocolate.pdf</a> -
IOCCC publications</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/key.txt">key.txt</a>
- key to decipher or encipher IOCCC</li>
+8
View File
@@ -41,6 +41,14 @@
"display_via_github" : true,
"winners_text" : "original source"
},
{
"file_path" : "try.sh",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "shellscript",
"display_via_github" : true,
"winners_text" : "how to run"
},
{
"file_path" : "cvikl.mid",
"inventory_order" : 150,
+6 -5
View File
@@ -127,11 +127,9 @@ href="/bugs.md#2020-otterness">2020 otterness in bugs.md</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">./prog</span></span></code></pre></div>
<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">./prog</span> <span class="op">&lt;</span> cvikl.mid <span class="op">&gt;</span> output.mid</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="co"># Play output.mid with your favorite player</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="op">&lt;</span> entertainer.mid <span class="op">&gt;</span> output2.mid</span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="co"># Play output2.mid with your favorite player</span></span></code></pre></div>
<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></code></pre></div>
<p>Now play <code>output.mid</code> and <code>output2.mid</code> in an
audio player that can play MIDI files.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>In an entry that boasts not using literals, one would expect to see
straightforward ways to produce small integers like
@@ -264,6 +262,9 @@ href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/otterness/Ma
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/otterness/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/otterness/try.sh">try.sh</a>
- how to run</li>
<li><a href="cvikl.mid">cvikl.mid</a> - sample input sound</li>
<li><a href="entertainer.mid">entertainer.mid</a> - sample input
sound</li>
+16 -5
View File
@@ -327,8 +327,6 @@
1988,spinellis,Makefile,30,true,makefile,true,winner Makefile
1988,spinellis,spinellis.alt.c,40,true,c,true,alternative source
1988,spinellis,spinellis.orig.c,50,true,c,true,original source
1988,spinellis,try.alt.sh,100,true,shellscript,true,how to run alternative code
1988,spinellis,try.sh,100,true,shellscript,true,how to run
1988,spinellis,input2.txt,150,true,text,true,example input
1988,spinellis,input.txt,150,true,text,true,example input
1988,spinellis,1988_spinellis.tar.bz2,300,false,tbz2,false,download winning source
@@ -3019,6 +3017,7 @@
2013,endoh3,flea-waltz.abc,100,true,text,true,sample input
2013,endoh3,menuet.abc,100,true,text,true,sample input
2013,endoh3,test.abc,100,true,text,true,sample input
2013,endoh3,try.sh,100,true,shellscript,true,how to run
2013,endoh3,twinkle.abc,100,true,text,true,sample input
2013,endoh3,wavify.rb,100,true,ruby,true,post process output to form a WAV sound file
2013,endoh3,yankee.abc,100,true,text,true,sample input
@@ -3032,7 +3031,7 @@
2013,endoh4,Makefile,30,true,makefile,true,winner Makefile
2013,endoh4,endoh4.orig.c,50,false,c,true,original source
2013,endoh4,cube.txt,100,true,text,true,3D object coordinates
2013,endoh4,try.sh,100,true,shellscript,true,how to run
2013,endoh4,endoh4.sh,100,true,shellscript,true,how to run
2013,endoh4,solids/antiprism/a04-square-antiprism.txt,200,true,text,true,3D object coordinates
2013,endoh4,solids/antiprism/a05-pentagonal-antiprism.txt,200,true,text,true,3D object coordinates
2013,endoh4,solids/antiprism/a06-hexagonal-antiprism.txt,200,true,text,true,3D object coordinates
@@ -3192,6 +3191,7 @@
2013,hou,doc/example.html,100,false,html,false,detailed information about entry
2013,hou,old_default.scene,100,true,text,true,sample input
2013,hou,otherroom.scene,100,true,text,true,sample input
2013,hou,try.sh,100,true,shellscript,true,how to run
2013,hou,luna.jpg,150,true,image,false,sample image data
2013,hou,old_default.jpg,150,true,image,false,sample image data
2013,hou,otherroom.jpg,150,true,image,false,sample image data
@@ -3229,6 +3229,7 @@
2013,morgan1,morgan1.c,20,true,c,true,winning source
2013,morgan1,Makefile,30,true,makefile,true,winner Makefile
2013,morgan1,morgan1.orig.c,50,false,c,true,original source
2013,morgan1,try.sh,100,true,shelllscript,true,how to run
2013,morgan1,2013_morgan1.tar.bz2,300,false,tbz2,false,download winning source
2013,morgan1,README.md,4294967295,true,markdown,true,markdown source for index.html
2013,morgan1,.gitignore,4294967295,true,gitignore,true,list of files that should not be committed under git
@@ -3381,6 +3382,7 @@
2014,vik,Makefile,30,true,makefile,true,winner Makefile
2014,vik,prog.alt.c,40,true,c,true,alternative source
2014,vik,prog.orig.c,50,false,c,true,original source
2014,vik,try.sh,100,true,shellscript,true,how to run
2014,vik,2014_vik.tar.bz2,300,false,tbz2,false,download winning source
2014,vik,README.md,4294967295,true,markdown,true,markdown source for index.html
2014,vik,.gitignore,4294967295,true,gitignore,true,list of files that should not be committed under git
@@ -3601,6 +3603,7 @@
2018,anderson,Makefile,30,true,makefile,true,winner Makefile
2018,anderson,prog.alt.c,40,true,c,true,alternative source
2018,anderson,prog.orig.c,50,false,c,true,original source
2018,anderson,try.alt.sh,100,true,shellscript,true,how to run alternate code
2018,anderson,try.sh,100,true,shellscript,true,how to run
2018,anderson,2018_anderson.tar.bz2,300,false,tbz2,false,download winning source
2018,anderson,README.md,4294967295,true,markdown,true,markdown source for index.html
@@ -3613,6 +3616,7 @@
2018,bellard,prog.alt.c,40,true,c,true,alternative source
2018,bellard,prog.orig.c,50,false,c,true,original source
2018,bellard,Lenna.png,100,true,image,false,sample image data
2018,bellard,try.sh,100,true,shellscript,true,how to run
2018,bellard,2018_bellard.tar.bz2,300,false,tbz2,false,download winning source
2018,bellard,README.md,4294967295,true,markdown,true,markdown source for index.html
2018,bellard,fruits.bin,4294967295,true,binary,false,binary support file
@@ -3700,6 +3704,7 @@
2018,ciura,prog.alt.c,40,true,c,true,alternative source
2018,ciura,prog.orig.c,50,false,c,true,original source
2018,ciura,lexicon.pdf,100,true,pdf,false,How to squeeze a lexicon paper
2018,ciura,try.alt.sh,100,true,shellscript,true,how to run alternate code
2018,ciura,try.sh,100,true,shellscript,true,how to run
2018,ciura,2018_ciura.tar.bz2,300,false,tbz2,false,download winning source
2018,ciura,README.md,4294967295,true,markdown,true,markdown source for index.html
@@ -3738,6 +3743,10 @@
2018,ferguson,prog.alt.c,40,true,c,true,alternative source
2018,ferguson,prog.orig.c,50,false,c,true,original source
2018,ferguson,FILES,100,true,text,true,information about various files
2018,ferguson,id.alt.sh,100,true,shellscript,true,how to run
2018,ferguson,id.sh,100,true,shellscript,true,how to run
2018,ferguson,monkey-words.alt.sh,100,true,shell script,true,how to run
2018,ferguson,monkey-words.sh,100,true,shellscript,true,how to run
2018,ferguson,rpm.html,100,false,html,false,about forming the rpm
2018,ferguson,test.sh,100,true,shellscript,true,run the test suite
2018,ferguson,try.alt.sh,100,true,shellscript,true,how to run alternative code
@@ -3873,6 +3882,7 @@
2019,ciura,wrapprog.py,100,true,python,true,merge pangrams before passing them to prog
2019,ciura,de.sh,150,true,shellscript,true,run with German data
2019,ciura,en.sh,150,true,shellscript,true,run with English data
2019,ciura,fr.alt.sh,150,true,shellscript,true,how to run alternative code in French
2019,ciura,fr.sh,150,true,shellscript,true,run with French data
2019,ciura,it.sh,150,true,shellscript,true,run with Italian data
2019,ciura,pl.sh,150,true,shellscript,true,run with Polish data
@@ -3956,6 +3966,7 @@
2019,giles,Makefile,30,true,makefile,true,winner Makefile
2019,giles,prog.orig.c,50,false,c,true,original source
2019,giles,BlockDiagram.png,100,true,image,false,reverb algorithm block-diagram of internal structure
2019,giles,try.sh,100,true,shellscript,true,how to run
2019,giles,MonodyVocals.wav,150,true,wav,false,Monody by TheFatRat featuring Laura Brehm
2019,giles,2019_giles.tar.bz2,300,false,tbz2,false,download winning source
2019,giles,README.md,4294967295,true,markdown,true,markdown source for index.html
@@ -4101,6 +4112,7 @@
2020,endoh3,Makefile,30,true,makefile,true,winner Makefile
2020,endoh3,prog.alt.c,40,true,c,true,alternative source
2020,endoh3,prog.orig.c,50,false,c,true,original source
2020,endoh3,run_clock.alt.sh,100,true,shellscript,true,how to run alternate code
2020,endoh3,run_clock.sh,100,true,shellscript,true,how to run
2020,endoh3,2020_endoh3.tar.bz2,300,false,tbz2,false,download winning source
2020,endoh3,README.md,4294967295,true,markdown,true,markdown source for index.html
@@ -4118,7 +4130,6 @@
2020,ferguson1,crazy.log.html,100,false,html,false,about some screen dumps
2020,ferguson1,play.sh,100,true,shellscript,true,how to run
2020,ferguson1,snake-colours.sh,100,true,shellscript,true,script to reset - preset colors
2020,ferguson1,ioccc-and-chocolate.pdf,150,true,pdf,false,IOCCC publications
2020,ferguson1,prog.2.c,150,true,c,true,source with more digraphs
2020,ferguson1,prog.3.c,150,true,c,true,source with a more artistic layout
2020,ferguson1,prog.3-j.c,150,true,c,true,source with artistic layout and shorter j macro
@@ -4154,7 +4165,6 @@
2020,ferguson2,try.sh,100,true,shellscript,true,how to run
2020,ferguson2,try.this.txt,100,true,text,true,sample input
2020,ferguson2,enigma.1,150,true,man,true,Enigma simulator man page
2020,ferguson2,ioccc-and-chocolate.pdf,150,true,pdf,false,IOCCC publications
2020,ferguson2,key.txt,150,true,text,true,key to decipher or encipher IOCCC
2020,ferguson2,obfuscation.key,150,true,text,true,key to decipher or encipher obfuscation.txt
2020,ferguson2,recode.1,150,true,man,true,configuration tool man page
@@ -4238,6 +4248,7 @@
2020,otterness,prog.c,20,true,c,true,winning source
2020,otterness,Makefile,30,true,makefile,true,winner Makefile
2020,otterness,prog.orig.c,50,false,c,true,original source
2020,otterness,try.sh,100,true,shellscript,true,how to run
2020,otterness,cvikl.mid,150,true,midi,false,sample input sound
2020,otterness,entertainer.mid,159,true,midi,false,sample input sound
2020,otterness,2020_otterness.tar.bz2,300,false,tbz2,false,download winning source
1 # year dir file_path inventory_order OK_to_edit display_as display_via_github winners_text
327 1988 spinellis Makefile 30 true makefile true winner Makefile
328 1988 spinellis spinellis.alt.c 40 true c true alternative source
329 1988 spinellis spinellis.orig.c 50 true c true original source
1988 spinellis try.alt.sh 100 true shellscript true how to run alternative code
1988 spinellis try.sh 100 true shellscript true how to run
330 1988 spinellis input2.txt 150 true text true example input
331 1988 spinellis input.txt 150 true text true example input
332 1988 spinellis 1988_spinellis.tar.bz2 300 false tbz2 false download winning source
3017 2013 endoh3 flea-waltz.abc 100 true text true sample input
3018 2013 endoh3 menuet.abc 100 true text true sample input
3019 2013 endoh3 test.abc 100 true text true sample input
3020 2013 endoh3 try.sh 100 true shellscript true how to run
3021 2013 endoh3 twinkle.abc 100 true text true sample input
3022 2013 endoh3 wavify.rb 100 true ruby true post process output to form a WAV sound file
3023 2013 endoh3 yankee.abc 100 true text true sample input
3031 2013 endoh4 Makefile 30 true makefile true winner Makefile
3032 2013 endoh4 endoh4.orig.c 50 false c true original source
3033 2013 endoh4 cube.txt 100 true text true 3D object coordinates
3034 2013 endoh4 try.sh endoh4.sh 100 true shellscript true how to run
3035 2013 endoh4 solids/antiprism/a04-square-antiprism.txt 200 true text true 3D object coordinates
3036 2013 endoh4 solids/antiprism/a05-pentagonal-antiprism.txt 200 true text true 3D object coordinates
3037 2013 endoh4 solids/antiprism/a06-hexagonal-antiprism.txt 200 true text true 3D object coordinates
3191 2013 hou doc/example.html 100 false html false detailed information about entry
3192 2013 hou old_default.scene 100 true text true sample input
3193 2013 hou otherroom.scene 100 true text true sample input
3194 2013 hou try.sh 100 true shellscript true how to run
3195 2013 hou luna.jpg 150 true image false sample image data
3196 2013 hou old_default.jpg 150 true image false sample image data
3197 2013 hou otherroom.jpg 150 true image false sample image data
3229 2013 morgan1 morgan1.c 20 true c true winning source
3230 2013 morgan1 Makefile 30 true makefile true winner Makefile
3231 2013 morgan1 morgan1.orig.c 50 false c true original source
3232 2013 morgan1 try.sh 100 true shelllscript true how to run
3233 2013 morgan1 2013_morgan1.tar.bz2 300 false tbz2 false download winning source
3234 2013 morgan1 README.md 4294967295 true markdown true markdown source for index.html
3235 2013 morgan1 .gitignore 4294967295 true gitignore true list of files that should not be committed under git
3382 2014 vik Makefile 30 true makefile true winner Makefile
3383 2014 vik prog.alt.c 40 true c true alternative source
3384 2014 vik prog.orig.c 50 false c true original source
3385 2014 vik try.sh 100 true shellscript true how to run
3386 2014 vik 2014_vik.tar.bz2 300 false tbz2 false download winning source
3387 2014 vik README.md 4294967295 true markdown true markdown source for index.html
3388 2014 vik .gitignore 4294967295 true gitignore true list of files that should not be committed under git
3603 2018 anderson Makefile 30 true makefile true winner Makefile
3604 2018 anderson prog.alt.c 40 true c true alternative source
3605 2018 anderson prog.orig.c 50 false c true original source
3606 2018 anderson try.alt.sh 100 true shellscript true how to run alternate code
3607 2018 anderson try.sh 100 true shellscript true how to run
3608 2018 anderson 2018_anderson.tar.bz2 300 false tbz2 false download winning source
3609 2018 anderson README.md 4294967295 true markdown true markdown source for index.html
3616 2018 bellard prog.alt.c 40 true c true alternative source
3617 2018 bellard prog.orig.c 50 false c true original source
3618 2018 bellard Lenna.png 100 true image false sample image data
3619 2018 bellard try.sh 100 true shellscript true how to run
3620 2018 bellard 2018_bellard.tar.bz2 300 false tbz2 false download winning source
3621 2018 bellard README.md 4294967295 true markdown true markdown source for index.html
3622 2018 bellard fruits.bin 4294967295 true binary false binary support file
3704 2018 ciura prog.alt.c 40 true c true alternative source
3705 2018 ciura prog.orig.c 50 false c true original source
3706 2018 ciura lexicon.pdf 100 true pdf false How to squeeze a lexicon paper
3707 2018 ciura try.alt.sh 100 true shellscript true how to run alternate code
3708 2018 ciura try.sh 100 true shellscript true how to run
3709 2018 ciura 2018_ciura.tar.bz2 300 false tbz2 false download winning source
3710 2018 ciura README.md 4294967295 true markdown true markdown source for index.html
3743 2018 ferguson prog.alt.c 40 true c true alternative source
3744 2018 ferguson prog.orig.c 50 false c true original source
3745 2018 ferguson FILES 100 true text true information about various files
3746 2018 ferguson id.alt.sh 100 true shellscript true how to run
3747 2018 ferguson id.sh 100 true shellscript true how to run
3748 2018 ferguson monkey-words.alt.sh 100 true shell script true how to run
3749 2018 ferguson monkey-words.sh 100 true shellscript true how to run
3750 2018 ferguson rpm.html 100 false html false about forming the rpm
3751 2018 ferguson test.sh 100 true shellscript true run the test suite
3752 2018 ferguson try.alt.sh 100 true shellscript true how to run alternative code
3882 2019 ciura wrapprog.py 100 true python true merge pangrams before passing them to prog
3883 2019 ciura de.sh 150 true shellscript true run with German data
3884 2019 ciura en.sh 150 true shellscript true run with English data
3885 2019 ciura fr.alt.sh 150 true shellscript true how to run alternative code in French
3886 2019 ciura fr.sh 150 true shellscript true run with French data
3887 2019 ciura it.sh 150 true shellscript true run with Italian data
3888 2019 ciura pl.sh 150 true shellscript true run with Polish data
3966 2019 giles Makefile 30 true makefile true winner Makefile
3967 2019 giles prog.orig.c 50 false c true original source
3968 2019 giles BlockDiagram.png 100 true image false reverb algorithm block-diagram of internal structure
3969 2019 giles try.sh 100 true shellscript true how to run
3970 2019 giles MonodyVocals.wav 150 true wav false Monody by TheFatRat featuring Laura Brehm
3971 2019 giles 2019_giles.tar.bz2 300 false tbz2 false download winning source
3972 2019 giles README.md 4294967295 true markdown true markdown source for index.html
4112 2020 endoh3 Makefile 30 true makefile true winner Makefile
4113 2020 endoh3 prog.alt.c 40 true c true alternative source
4114 2020 endoh3 prog.orig.c 50 false c true original source
4115 2020 endoh3 run_clock.alt.sh 100 true shellscript true how to run alternate code
4116 2020 endoh3 run_clock.sh 100 true shellscript true how to run
4117 2020 endoh3 2020_endoh3.tar.bz2 300 false tbz2 false download winning source
4118 2020 endoh3 README.md 4294967295 true markdown true markdown source for index.html
4130 2020 ferguson1 crazy.log.html 100 false html false about some screen dumps
4131 2020 ferguson1 play.sh 100 true shellscript true how to run
4132 2020 ferguson1 snake-colours.sh 100 true shellscript true script to reset - preset colors
2020 ferguson1 ioccc-and-chocolate.pdf 150 true pdf false IOCCC publications
4133 2020 ferguson1 prog.2.c 150 true c true source with more digraphs
4134 2020 ferguson1 prog.3.c 150 true c true source with a more artistic layout
4135 2020 ferguson1 prog.3-j.c 150 true c true source with artistic layout and shorter j macro
4165 2020 ferguson2 try.sh 100 true shellscript true how to run
4166 2020 ferguson2 try.this.txt 100 true text true sample input
4167 2020 ferguson2 enigma.1 150 true man true Enigma simulator man page
2020 ferguson2 ioccc-and-chocolate.pdf 150 true pdf false IOCCC publications
4168 2020 ferguson2 key.txt 150 true text true key to decipher or encipher IOCCC
4169 2020 ferguson2 obfuscation.key 150 true text true key to decipher or encipher obfuscation.txt
4170 2020 ferguson2 recode.1 150 true man true configuration tool man page
4248 2020 otterness prog.c 20 true c true winning source
4249 2020 otterness Makefile 30 true makefile true winner Makefile
4250 2020 otterness prog.orig.c 50 false c true original source
4251 2020 otterness try.sh 100 true shellscript true how to run
4252 2020 otterness cvikl.mid 150 true midi false sample input sound
4253 2020 otterness entertainer.mid 159 true midi false sample input sound
4254 2020 otterness 2020_otterness.tar.bz2 300 false tbz2 false download winning source
Binary file not shown.
+16 -5
View File
@@ -299,8 +299,6 @@
1988/spinellis/spinellis.alt.c
1988/spinellis/spinellis.c
1988/spinellis/spinellis.orig.c
1988/spinellis/try.alt.sh
1988/spinellis/try.sh
1988/westley/.gitignore
1988/westley/.path
1988/westley/.winner.json
@@ -2764,6 +2762,7 @@
2013/endoh3/index.html
2013/endoh3/menuet.abc
2013/endoh3/test.abc
2013/endoh3/try.sh
2013/endoh3/twinkle.abc
2013/endoh3/wavify.rb
2013/endoh3/yankee.abc
@@ -2775,6 +2774,7 @@
2013/endoh4/cube.txt
2013/endoh4/endoh4.c
2013/endoh4/endoh4.orig.c
2013/endoh4/endoh4.sh
2013/endoh4/index.html
2013/endoh4/solids/antiprism/a04-square-antiprism.txt
2013/endoh4/solids/antiprism/a05-pentagonal-antiprism.txt
@@ -2923,7 +2923,6 @@
2013/endoh4/solids/trapezohedron/t06-hexagonal-trapezohedron.txt
2013/endoh4/solids/trapezohedron/t08-octagonal-trapezohedron.txt
2013/endoh4/solids/trapezohedron/t10-decagonal-trapezohedron.txt
2013/endoh4/try.sh
2013/hou/.gitignore
2013/hou/.path
2013/hou/.winner.json
@@ -2941,6 +2940,7 @@
2013/hou/old_default.scene
2013/hou/otherroom.jpg
2013/hou/otherroom.scene
2013/hou/try.sh
2013/mills/.gitignore
2013/mills/.path
2013/mills/.winner.json
@@ -2968,6 +2968,7 @@
2013/morgan1/index.html
2013/morgan1/morgan1.c
2013/morgan1/morgan1.orig.c
2013/morgan1/try.sh
2013/morgan2/.gitignore
2013/morgan2/.path
2013/morgan2/.winner.json
@@ -3106,6 +3107,7 @@
2014/vik/prog.alt.c
2014/vik/prog.c
2014/vik/prog.orig.c
2014/vik/try.sh
2014/wiedijk/.gitignore
2014/wiedijk/.path
2014/wiedijk/.winner.json
@@ -3307,6 +3309,7 @@
2018/anderson/prog.alt.c
2018/anderson/prog.c
2018/anderson/prog.orig.c
2018/anderson/try.alt.sh
2018/anderson/try.sh
2018/bellard/.gitignore
2018/bellard/.path
@@ -3320,6 +3323,7 @@
2018/bellard/prog.alt.c
2018/bellard/prog.c
2018/bellard/prog.orig.c
2018/bellard/try.sh
2018/bellard/vintage_cars.bin
2018/burton1/.gitignore
2018/burton1/.path
@@ -3401,6 +3405,7 @@
2018/ciura/prog.alt.c
2018/ciura/prog.c
2018/ciura/prog.orig.c
2018/ciura/try.alt.sh
2018/ciura/try.sh
2018/endoh1/.gitignore
2018/endoh1/.path
@@ -3433,7 +3438,11 @@
2018/ferguson/Makefile
2018/ferguson/README.md
2018/ferguson/hint.css
2018/ferguson/id.alt.sh
2018/ferguson/id.sh
2018/ferguson/index.html
2018/ferguson/monkey-words.alt.sh
2018/ferguson/monkey-words.sh
2018/ferguson/prog.alt.c
2018/ferguson/prog.c
2018/ferguson/prog.orig.c
@@ -3551,6 +3560,7 @@
2019/ciura/en.alt.sh
2019/ciura/en.sh
2019/ciura/fasc5c.pdf
2019/ciura/fr.alt.sh
2019/ciura/fr.sh
2019/ciura/getwords.sh
2019/ciura/index.html
@@ -3639,6 +3649,7 @@
2019/giles/index.html
2019/giles/prog.c
2019/giles/prog.orig.c
2019/giles/try.sh
2019/karns/.gitignore
2019/karns/.path
2019/karns/.winner.json
@@ -3773,6 +3784,7 @@
2020/endoh3/prog.alt.c
2020/endoh3/prog.c
2020/endoh3/prog.orig.c
2020/endoh3/run_clock.alt.sh
2020/endoh3/run_clock.sh
2020/ferguson1/.gitignore
2020/ferguson1/.path
@@ -3789,7 +3801,6 @@
2020/ferguson1/gameplay.md
2020/ferguson1/halfwidth_vs_fullwidth.png
2020/ferguson1/index.html
2020/ferguson1/ioccc-and-chocolate.pdf
2020/ferguson1/ioccc-cake.jpg
2020/ferguson1/play.sh
2020/ferguson1/prog.2.c
@@ -3814,7 +3825,6 @@
2020/ferguson2/enigma.1
2020/ferguson2/index.html
2020/ferguson2/input.txt
2020/ferguson2/ioccc-and-chocolate.pdf
2020/ferguson2/ioccc-cake.jpg
2020/ferguson2/key.txt
2020/ferguson2/obfuscation.key
@@ -3900,6 +3910,7 @@
2020/otterness/index.html
2020/otterness/prog.c
2020/otterness/prog.orig.c
2020/otterness/try.sh
2020/tsoj/.gitignore
2020/tsoj/.path
2020/tsoj/.winner.json
+16 -5
View File
@@ -333,8 +333,6 @@
1988/spinellis/spinellis.alt.c
1988/spinellis/spinellis.c
1988/spinellis/spinellis.orig.c
1988/spinellis/try.alt.sh
1988/spinellis/try.sh
1988/westley/.gitignore
1988/westley/.path
1988/westley/.winner.json
@@ -3023,6 +3021,7 @@
2013/endoh3/index.html
2013/endoh3/menuet.abc
2013/endoh3/test.abc
2013/endoh3/try.sh
2013/endoh3/twinkle.abc
2013/endoh3/wavify.rb
2013/endoh3/yankee.abc
@@ -3035,6 +3034,7 @@
2013/endoh4/cube.txt
2013/endoh4/endoh4.c
2013/endoh4/endoh4.orig.c
2013/endoh4/endoh4.sh
2013/endoh4/index.html
2013/endoh4/solids/antiprism/a04-square-antiprism.txt
2013/endoh4/solids/antiprism/a05-pentagonal-antiprism.txt
@@ -3183,7 +3183,6 @@
2013/endoh4/solids/trapezohedron/t06-hexagonal-trapezohedron.txt
2013/endoh4/solids/trapezohedron/t08-octagonal-trapezohedron.txt
2013/endoh4/solids/trapezohedron/t10-decagonal-trapezohedron.txt
2013/endoh4/try.sh
2013/hou/.gitignore
2013/hou/.path
2013/hou/.winner.json
@@ -3203,6 +3202,7 @@
2013/hou/old_default.scene
2013/hou/otherroom.jpg
2013/hou/otherroom.scene
2013/hou/try.sh
2013/mills/.gitignore
2013/mills/.path
2013/mills/.winner.json
@@ -3233,6 +3233,7 @@
2013/morgan1/index.html
2013/morgan1/morgan1.c
2013/morgan1/morgan1.orig.c
2013/morgan1/try.sh
2013/morgan2/.gitignore
2013/morgan2/.path
2013/morgan2/.winner.json
@@ -3385,6 +3386,7 @@
2014/vik/prog.alt.c
2014/vik/prog.c
2014/vik/prog.orig.c
2014/vik/try.sh
2014/wiedijk/.gitignore
2014/wiedijk/.path
2014/wiedijk/.winner.json
@@ -3605,6 +3607,7 @@
2018/anderson/prog.alt.c
2018/anderson/prog.c
2018/anderson/prog.orig.c
2018/anderson/try.alt.sh
2018/anderson/try.sh
2018/bellard/.gitignore
2018/bellard/.path
@@ -3619,6 +3622,7 @@
2018/bellard/prog.alt.c
2018/bellard/prog.c
2018/bellard/prog.orig.c
2018/bellard/try.sh
2018/bellard/vintage_cars.bin
2018/burton1/.gitignore
2018/burton1/.path
@@ -3704,6 +3708,7 @@
2018/ciura/prog.alt.c
2018/ciura/prog.c
2018/ciura/prog.orig.c
2018/ciura/try.alt.sh
2018/ciura/try.sh
2018/endoh1/.gitignore
2018/endoh1/.path
@@ -3739,7 +3744,11 @@
2018/ferguson/Makefile
2018/ferguson/README.md
2018/ferguson/hint.css
2018/ferguson/id.alt.sh
2018/ferguson/id.sh
2018/ferguson/index.html
2018/ferguson/monkey-words.alt.sh
2018/ferguson/monkey-words.sh
2018/ferguson/prog.alt.c
2018/ferguson/prog.c
2018/ferguson/prog.orig.c
@@ -3867,6 +3876,7 @@
2019/ciura/en.alt.sh
2019/ciura/en.sh
2019/ciura/fasc5c.pdf
2019/ciura/fr.alt.sh
2019/ciura/fr.sh
2019/ciura/getwords.sh
2019/ciura/index.html
@@ -3961,6 +3971,7 @@
2019/giles/index.html
2019/giles/prog.c
2019/giles/prog.orig.c
2019/giles/try.sh
2019/karns/.gitignore
2019/karns/.path
2019/karns/.winner.json
@@ -4105,6 +4116,7 @@
2020/endoh3/prog.alt.c
2020/endoh3/prog.c
2020/endoh3/prog.orig.c
2020/endoh3/run_clock.alt.sh
2020/endoh3/run_clock.sh
2020/ferguson1/.gitignore
2020/ferguson1/.path
@@ -4126,7 +4138,6 @@
2020/ferguson1/gameplay.md
2020/ferguson1/halfwidth_vs_fullwidth.png
2020/ferguson1/index.html
2020/ferguson1/ioccc-and-chocolate.pdf
2020/ferguson1/ioccc-cake.jpg
2020/ferguson1/play.sh
2020/ferguson1/prog.2.c
@@ -4152,7 +4163,6 @@
2020/ferguson2/enigma.1
2020/ferguson2/index.html
2020/ferguson2/input.txt
2020/ferguson2/ioccc-and-chocolate.pdf
2020/ferguson2/ioccc-cake.jpg
2020/ferguson2/key.txt
2020/ferguson2/obfuscation.key
@@ -4244,6 +4254,7 @@
2020/otterness/index.html
2020/otterness/prog.c
2020/otterness/prog.orig.c
2020/otterness/try.sh
2020/tsoj/.gitignore
2020/tsoj/.path
2020/tsoj/.winner.json
+16 -5
View File
@@ -233,8 +233,6 @@
1988/spinellis/spinellis.alt.c
1988/spinellis/spinellis.c
1988/spinellis/spinellis.orig.c
1988/spinellis/try.alt.sh
1988/spinellis/try.sh
1988/westley/.gitignore
1988/westley/.winner.json
1988/westley/Makefile
@@ -2274,6 +2272,7 @@
2013/endoh3/flea-waltz.abc
2013/endoh3/menuet.abc
2013/endoh3/test.abc
2013/endoh3/try.sh
2013/endoh3/twinkle.abc
2013/endoh3/wavify.rb
2013/endoh3/yankee.abc
@@ -2284,6 +2283,7 @@
2013/endoh4/cube.txt
2013/endoh4/endoh4.c
2013/endoh4/endoh4.orig.c
2013/endoh4/endoh4.sh
2013/endoh4/solids/antiprism/a04-square-antiprism.txt
2013/endoh4/solids/antiprism/a05-pentagonal-antiprism.txt
2013/endoh4/solids/antiprism/a06-hexagonal-antiprism.txt
@@ -2431,7 +2431,6 @@
2013/endoh4/solids/trapezohedron/t06-hexagonal-trapezohedron.txt
2013/endoh4/solids/trapezohedron/t08-octagonal-trapezohedron.txt
2013/endoh4/solids/trapezohedron/t10-decagonal-trapezohedron.txt
2013/endoh4/try.sh
2013/hou/.gitignore
2013/hou/.winner.json
2013/hou/Makefile
@@ -2447,6 +2446,7 @@
2013/hou/old_default.scene
2013/hou/otherroom.jpg
2013/hou/otherroom.scene
2013/hou/try.sh
2013/mills/.gitignore
2013/mills/.winner.json
2013/mills/Makefile
@@ -2468,6 +2468,7 @@
2013/morgan1/README.md
2013/morgan1/morgan1.c
2013/morgan1/morgan1.orig.c
2013/morgan1/try.sh
2013/morgan2/.gitignore
2013/morgan2/.winner.json
2013/morgan2/Makefile
@@ -2582,6 +2583,7 @@
2014/vik/prog.alt.c
2014/vik/prog.c
2014/vik/prog.orig.c
2014/vik/try.sh
2014/wiedijk/.gitignore
2014/wiedijk/.winner.json
2014/wiedijk/Makefile
@@ -2749,6 +2751,7 @@
2018/anderson/prog.alt.c
2018/anderson/prog.c
2018/anderson/prog.orig.c
2018/anderson/try.alt.sh
2018/anderson/try.sh
2018/bellard/.gitignore
2018/bellard/.winner.json
@@ -2760,6 +2763,7 @@
2018/bellard/prog.alt.c
2018/bellard/prog.c
2018/bellard/prog.orig.c
2018/bellard/try.sh
2018/bellard/vintage_cars.bin
2018/burton1/.gitignore
2018/burton1/.winner.json
@@ -2835,6 +2839,7 @@
2018/ciura/prog.alt.c
2018/ciura/prog.c
2018/ciura/prog.orig.c
2018/ciura/try.alt.sh
2018/ciura/try.sh
2018/endoh1/.gitignore
2018/endoh1/.winner.json
@@ -2862,6 +2867,10 @@
2018/ferguson/Makefile
2018/ferguson/README.md
2018/ferguson/hint.css
2018/ferguson/id.alt.sh
2018/ferguson/id.sh
2018/ferguson/monkey-words.alt.sh
2018/ferguson/monkey-words.sh
2018/ferguson/prog.alt.c
2018/ferguson/prog.c
2018/ferguson/prog.orig.c
@@ -2962,6 +2971,7 @@
2019/ciura/en.alt.sh
2019/ciura/en.sh
2019/ciura/fasc5c.pdf
2019/ciura/fr.alt.sh
2019/ciura/fr.sh
2019/ciura/getwords.sh
2019/ciura/it.alt.sh
@@ -3037,6 +3047,7 @@
2019/giles/README.md
2019/giles/prog.c
2019/giles/prog.orig.c
2019/giles/try.sh
2019/karns/.gitignore
2019/karns/.winner.json
2019/karns/Makefile
@@ -3151,6 +3162,7 @@
2020/endoh3/prog.alt.c
2020/endoh3/prog.c
2020/endoh3/prog.orig.c
2020/endoh3/run_clock.alt.sh
2020/endoh3/run_clock.sh
2020/ferguson1/.gitignore
2020/ferguson1/.winner.json
@@ -3165,7 +3177,6 @@
2020/ferguson1/crazy.log.md
2020/ferguson1/gameplay.md
2020/ferguson1/halfwidth_vs_fullwidth.png
2020/ferguson1/ioccc-and-chocolate.pdf
2020/ferguson1/ioccc-cake.jpg
2020/ferguson1/play.sh
2020/ferguson1/prog.2.c
@@ -3188,7 +3199,6 @@
2020/ferguson2/chocolate-cake.md
2020/ferguson2/enigma.1
2020/ferguson2/input.txt
2020/ferguson2/ioccc-and-chocolate.pdf
2020/ferguson2/ioccc-cake.jpg
2020/ferguson2/key.txt
2020/ferguson2/obfuscation.key
@@ -3262,6 +3272,7 @@
2020/otterness/entertainer.mid
2020/otterness/prog.c
2020/otterness/prog.orig.c
2020/otterness/try.sh
2020/tsoj/.gitignore
2020/tsoj/.winner.json
2020/tsoj/Makefile
+354
View File
@@ -0,0 +1,354 @@
#!/usr/bin/env bash
#
# update-manifest.sh - interactive script to update the IOCCC manifest step by
# step post manifest.csv export
#
export UPDATE_MANIFEST_VERSION="0.0.1-1 2024-28-01" # format: major.minor.patch-release YYYY-DD-MM
NAME="$(basename "$0")"; export NAME
export V_FLAG=0
export A_FLAG=
# default -v 3 for other tools
export CAP_D_FLAG=3
export TOPDIR=".."
GIT="$(type -P git)"
export GIT
# usage
#
export USAGE="usage: $0 [-h] [-v level] [-D] [-g git] [-a]
-h print help message and exit
-v level set verbosity level (def level: $V_FLAG)
-D level set verbosity level (via -v level) in tool: (def level: $CAP_D_FLAG)
-t topdir path to top of the local GitHub repo tree (def: $TOPDIR)
-a automatically run git add an git commit commands (when prompted)
Exit codes:
0 all OK
2 -h and help string printed or -V and version string printed
3 command line error
4 user told us there is a problem
5 a tool exited non-zero
$NAME version: $UPDATE_MANIFEST_VERSION"
# parse command line
#
while getopts :hv:D:t:g:a flag; do
case "$flag" in
h) echo "$USAGE"
exit 2
;;
v) V_FLAG="$OPTARG"
;;
D) CAP_D_FLAG="$OPTARG"
;;
t) TOPDIR="$OPTARG"
;;
g) GIT="$OPTARG"
;;
a) A_FLAG="-a"
;;
\?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2
echo 1>&2
echo "$USAGE" 1>&2
exit 3
;;
:) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2
echo 1>&2
echo "$USAGE" 1>&2
exit 3
;;
*) echo "$0: ERROR: unexpected value from getopts: $flag" 1>&2
echo 1>&2
echo "$USAGE" 1>&2
exit 3
;;
esac
done
# print running info if verbose
#
if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
fi
# first determine if git is executable
if [[ -z "$GIT" || ! -f "$GIT" || ! -x "$GIT" ]]; then
echo "$0: ERROR: git not an executable file: $GIT" 1>&2
exit 3
fi
# check that topdir is a directory and a git repo
#
# first verify $TOPDIR is not empty and that it's a directory
if [[ -z "$TOPDIR" ]]; then
echo "$0: ERROR: topdir is empty: $TOPDIR" 1>&2
exit 3
fi
if [[ ! -d "$TOPDIR" ]]; then
echo "$0: ERROR: topdir not a directory: $TOPDIR" 1>&2
exit 3
fi
# now cd to directory
#
if ! cd "$TOPDIR"; then
echo "$0: could not cd to topdir: $TOPDIR" 1>&2
exit 3
fi
# I have found problems using git rev-parse to verify that we're in a git repo
# so use git status instead. Plus we need the user to see git status anyway.
"$GIT" status 1>&2
status="$?"
if [[ "$status" -ne 0 ]]; then
echo "$USAGE" 1>&2
echo 1>&2
echo "$(basename "$0"): ERROR: ${PWD} is not a git repository" 1>&2
exit 3
fi
read -r -p "Do you have a clean state from git status (Y/N)? "
if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then
echo "$0: exiting 4 due to user telling us there's a problem." 1>&2
exit 4
fi
# now cd to the tmp directory
#
if ! cd tmp; then
echo "$0: could not cd to tmp subdirectory of topdir: $TOPDIR"
exit 3
fi
# now check that manifest.csv is a regular readable file
#
if [[ ! -f manifest.csv || ! -r manifest.csv ]]; then
echo "$0: manifest.csv does not exist or not a regular readable file" 1>&2
exit 3
fi
# now ask user if they sorted the manifest.numbers AND exported it to the CSV
# file
echo "We will now try and update the manifest files. Are you sure that you updated" 1>&2
read -r -p "AND sorted the manifest.numbers spreadsheet AND exported to manifest.csv (Y/N)? "
if [[ "$REPLY" != "y" && "$REPLY" != "Y" ]]; then
echo "$0: exiting 4 due to user not updating manifest files before running this tool" 1>&2
exit 4
fi
# run ./fix_csv.sh first
#
if [[ "$V_FLAG" -gt 0 ]]; then
echo "$0: debug[1]: about to run: ./fix_csv.sh -v $CAP_D_FLAG" 1>&2
fi
if ! ./fix_csv.sh -v "$CAP_D_FLAG" ; then
echo "$0: fix_csv.sh failed, try updating manifest.csv and try again." 1>&2
exit 5
fi
# run ./gen_path_list.found.sh
#
if [[ "$V_FLAG" -gt 0 ]]; then
echo "$0: debug[1]: about to run: ./gen_path_list.found.sh -v $CAP_D_FLAG" 1>&2
fi
if ! ./gen_path_list.found.sh -v "$CAP_D_FLAG" ; then
echo "$0: gen_path_list.found.sh failed, try updating manifest.csv and try again." 1>&2
exit 5
fi
# now run git diff path_list.found.txt
#
read -r -n 1 -p "Press any key to run: $GIT diff path_list.found.txt: "
echo 1>&2
"$GIT" diff path_list.found.txt
read -r -p "Does everything look okay (Y/N)? "
if [[ "$REPLY" != "y" && "$REPLY" != "Y" ]]; then
echo "$0: exiting 4 due to user telling us there's a problem." 1>&2
exit 4
fi
# run ./check_path_list.sh
#
echo "$0: now will run: ./check_path_list.sh -v $CAP_D_FLAG" 1>&2
if ! ./check_path_list.sh -v "$CAP_D_FLAG"; then
echo "$0: ./check_path_list.sh failed, try updating manifest.csv and try again." 1>&2
exit 5
fi
echo "$0: now will run: $GIT archive HEAD manifest.numbers | tar -tvf - manifest.numbers" 1>&2
"$GIT" archive HEAD manifest.numbers | tar -tvf - manifest.numbers
read -r -p "Does everything look okay (Y/N)? "
if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then
echo "$0: exiting 4 due to user telling us there's a problem." 1>&2
exit 4
fi
if [[ -n "$A_FLAG" ]]; then
echo "Do you wish to automatically run the commands:" 1>&2
echo " $GIT add -u" 1>&2
echo " $GIT status" 1>&2
echo " $GIT commit -m'update manifest as per recent file changes'" 1>&2
read -r -p "Enter your choice (Y/N): "
if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then
echo "Now you should run the following commands in another terminal," 1>&2
echo "making sure you're on the appropriate branch:"
echo 1>&2
echo " git add -u" 1>&2
echo " git status" 1>&2
echo " git commit -m'update manifest as per recent file changes'" 1>&2
echo 1>&2
read -r -n 1 -p "Press any key when this is done: "
echo 1>&2
else
"$GIT" add -u
"$GIT" status
"$GIT" commit -m'update manifest as per recent file changes'
fi
else
# user did not use -a, don't prompt: make them run commands in another
# terminal first.
echo "Now you should run the following commands in another terminal," 1>&2
echo "making sure you're on the appropriate branch:"
echo 1>&2
echo " git add -u" 1>&2
echo " git status" 1>&2
echo " git commit -m'update manifest as per recent file changes'" 1>&2
echo 1>&2
read -r -n 1 -p "Press any key when this is done: "
echo 1>&2
fi
echo 1>&2
echo "now will run ./run_all.sh -v $CAP_D_FLAG ./gen_winner_json.sh" 1>&2
echo "NOTE: this step will take a while." 1>&2
if ! ./run_all.sh -v "$CAP_D_FLAG" ./gen_winner_json.sh; then
echo "$0: problem with ./run_all.sh, fix manifest and try again." 1>&2
exit 5
fi
read -r -n 1 -p "Press any key to run: $GIT diff: "
echo 1>&2
"$GIT" diff
read -r -p "Does everything look okay (Y/N)? "
if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then
echo "$0: exiting 4 due to user telling us there's a problem." 1>&2
exit 4
fi
if [[ -n "$A_FLAG" ]]; then
echo "Do you wish to automatically run the commands:" 1>&2
echo " $GIT add -u" 1>&2
echo " $GIT status" 1>&2
echo " $GIT commit -m'update .winner.json files per recent manifest changes'" 1>&2
read -r -p "Enter your choice (Y/N): "
if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then
echo "Now you should run the following commands in another terminal," 1>&2
echo "making sure you're on the appropriate branch:"
echo 1>&2
echo " $GIT add -u" 1>&2
echo " $GIT status" 1>&2
echo " $GIT commit -m'update .winner.json files per recent manifest changes'" 1>&2
echo 1>&2
read -r -n 1 -p "Press any key when this is done: "
echo 1>&2
else
"$GIT" add -u
"$GIT" status
"$GIT" commit -m'update .winner.json files per recent manifest changes'
fi
else
echo "Now you should run the following commands in another terminal," 1>&2
echo "making sure you're on the appropriate branch:"
echo 1>&2
echo " $GIT add -u" 1>&2
echo " $GIT status" 1>&2
echo " $GIT commit -m'update .winner.json files per recent manifest changes'" 1>&2
echo 1>&2
read -r -n 1 -p "Press any key when this is done: "
echo 1>&2
fi
# now cd to top level directory
cd ..
read -r -n 1 -p "Press any key to continue: "
echo 1>&2
echo "Will now update index.html files." 1>&2
read -r -p "Do you wish to use quick-readme2index.sh (Y/N)? "
if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then
echo "$0: now will run: bin/all-run.sh -v $CAP_D_FLAG bin/readme2index.sh -v $CAP_D_FLAG" 1>&2
if ! bin/all-run.sh -v "$CAP_D_FLAG" bin/readme2index.sh -v "$CAP_D_FLAG"; then
echo "$0: problem running bin/all-run bin/readme2index.sh, fix and try again." 1>&2
exit 5
fi
else
echo "$0: now will run: bin/all-run.sh -v $CAP_D_FLAG bin/quick-readme2index.sh -v $CAP_D_FLAG"
echo "NOTE: this will take a while." 1>&2
if ! bin/all-run.sh -v "$CAP_D_FLAG" bin/quick-readme2index.sh -v "$CAP_D_FLAG"; then
echo "$0: problem running bin/all-run bin bin/quick-readme2index.sh, fix and try again." 1>&2
exit 5
fi
fi
read -r -n 1 -p "Press any key to run: $GIT diff: "
echo 1>&2
"$GIT" diff
read -r -p "Does everything look okay (Y/N)? "
if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then
echo "$0: exiting 4 due to user telling us there's a problem." 1>&2
exit 4
fi
if [[ -n "$A_FLAG" ]]; then
echo "Do you wish to automatically run the commands:" 1>&2
echo " git add -u" 1>&2
echo " git status" 1>&2
echo " git commit -m'update index.html and .winner.json per recent manifest changes'" 1>&2
read -r -p "Enter your choice (Y/N): "
if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then
echo "Now you should run the following commands in another terminal," 1>&2
echo "making sure you're on the appropriate branch:"
echo 1>&2
echo " git add -u" 1>&2
echo " git status" 1>&2
echo " git commit -m'update index.html and .winner.json per recent manifest changes'" 1>&2
echo 1>&2
read -r -n 1 -p "Press any key when this is done: "
echo 1>&2
else
"$GIT" add -u
"$GIT" status
"$GIT" commit -m'update index.html and .winner.json per recent manifest changes'
fi
else
echo "Now you should run the following commands in another terminal," 1>&2
echo "making sure you're on the appropriate branch:"
echo 1>&2
echo " git add -u" 1>&2
echo " git status" 1>&2
echo " git commit -m'update index.html and .winner.json per recent manifest changes'" 1>&2
echo 1>&2
read -r -n 1 -p "Press any key when this is done: "
echo 1>&2
fi
echo 1>&2
echo 1>&2
echo "All done. Make sure to push the commits and open a GitHub pull request." 1>&2
exit 0