add hack-a-round for language specified markdown code blocks
When language is specified in a markdown code block such as:
````
```c
printf("Hello, world!\n");
```
````
is used, the resulting HTML as produced by `pandoc(1)` combined
with our revised `ioccc.css` is not intent the code block well.
A temporary "_hack-a-round_" is to turn the "markdown code language
specifier" into an HTML comment. For example:
````
```<!---c-->
printf("Hello, world!\n");
```
````
This commits turns off existing markdown code language specifiers
for now, while preserving our ability to restore them in the future
when a better "_hack-a-round_" to the "markdown code language
specifier" problem is found.
The HTML impact if this "_hack-a-round_" is to produce HTML that
looks like this:
```
<pre class="<!---c-->"><code> .. </code></pre>
```
We might be able to create a complex set of classes for each markdown
code language (there won't be very many) in `ioccc.css`, or we might
find a more general CSS (or maybe `pandoc(1)`?) solution.
For now, this hack-a-round will have to do.
This commit is contained in:
1 parent
3919df50fb
commit
b66c79254a
700 files changed
+7052
-7056
No files matched your search
@@ -1,20 +1,20 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
echo something | ./anderson
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -141,11 +141,11 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<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> something <span class="kw">|</span> <span class="ex">./anderson</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> echo something | ./anderson</code></pre>
|
||||
<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>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This small program might be a nice addition to a digital personal
|
||||
organizer; just in case you are stranded on a desert island and need to
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./bellard
|
||||
```
|
||||
|
||||
|
||||
@@ -141,9 +141,9 @@ Location: <a href="../../location.html#FR">FR</a> - <em>French Republic</em> (<e
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<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">./bellard</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./bellard</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This code is a nice compact example of a Modular Fast Fourier Transform. While
|
||||
its output is very specific, the internal FFT has a wide variety of uses.</p>
|
||||
|
||||
+11
-11
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./bmeyer
|
||||
```
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
In a video window (white text on black background):
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -31,7 +31,7 @@ dashed argument) for compression and decompression! You've been warned.
|
||||
|
||||
The author recommended on linux/x86, glibc 2.0, libc4/5:
|
||||
|
||||
```make
|
||||
```<!---make-->
|
||||
bmeyer: bmeyer.c
|
||||
CC -DY="__setfpucw(0x127f)" -O6 $? -o $@ -lm
|
||||
```
|
||||
@@ -40,7 +40,7 @@ However many compilers use `-O3` as the maximum level for `-O` optimization.
|
||||
|
||||
And on linux/x86, glibc 2.1:
|
||||
|
||||
```make
|
||||
```<!---make-->
|
||||
bmeyer: bmeyer.c
|
||||
gcc -DY='int x=0x127f; __asm__ ("fldcw %0" : : "m" (*&x))' $? -o $@ -lm
|
||||
```
|
||||
@@ -80,13 +80,13 @@ on stdin, and it will decompress it to stdout --- as either raw or
|
||||
ASCII .PGM, depending on what format it was compressed from. For
|
||||
example:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./glicbawls < michael.pgm > michael.glic
|
||||
```
|
||||
|
||||
and then
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./glicbawls < michael.glic > michael.decoded.pgm
|
||||
```
|
||||
|
||||
@@ -104,7 +104,7 @@ If you still have trouble, simply use a terminal or xterm with
|
||||
more than 80 columns, and tell `glicbawls` about it by giving the
|
||||
number of columns as an argument. For example
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./glicbawls 260 <lavabus.pgm >lavabus.glic
|
||||
```
|
||||
|
||||
@@ -122,21 +122,21 @@ decoded as 35, 36, 37, 38 or 39. In order to use this mode, simply
|
||||
give the maximum allowed error as an argument, with a dash (`-`)
|
||||
before it. For example:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./glicbawls -2 < graph.pgm > graph.2.glic
|
||||
```
|
||||
|
||||
will compress in a way that allows decompression with a maximum
|
||||
error of two. You can combine both types of arguments, i.e.:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./glicbawls -3 180 < graph.pgm >graph.3.glic
|
||||
```
|
||||
|
||||
will compress with a maximum error of 3, using a 180 column
|
||||
terminal for the progress display, and:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./glicbawls -3 180 < graph.3.glic > graph.3maxerr.pgm
|
||||
```
|
||||
|
||||
|
||||
+11
-11
@@ -141,23 +141,23 @@ Location: <a href="../../location.html#AU">AU</a> - <em>Commonwealth of Australi
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<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">./bmeyer</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./bmeyer</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>In a video window (white text on black background):</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>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<p>The script will suggest you compare the output of the program with images,
|
||||
prompting you to press any key to continue so that you may do so.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Don’t even think of supplying different compression factors (the
|
||||
dashed argument) for compression and decompression! You’ve been warned.</p>
|
||||
<p>The author recommended on linux/x86, glibc 2.0, libc4/5:</p>
|
||||
<pre class="make"><code> bmeyer: bmeyer.c
|
||||
<pre class="<!---make-->"><code> bmeyer: bmeyer.c
|
||||
CC -DY="__setfpucw(0x127f)" -O6 $? -o $@ -lm</code></pre>
|
||||
<p>However many compilers use <code>-O3</code> as the maximum level for <code>-O</code> optimization.</p>
|
||||
<p>And on linux/x86, glibc 2.1:</p>
|
||||
<pre class="make"><code> bmeyer: bmeyer.c
|
||||
<pre class="<!---make-->"><code> bmeyer: bmeyer.c
|
||||
gcc -DY='int x=0x127f; __asm__ ("fldcw %0" : : "m" (*&x))' $? -o $@ -lm</code></pre>
|
||||
<p>Compile with the maximum possible optimization on your system.
|
||||
If your system has 80-bit internal representation of floating
|
||||
@@ -184,9 +184,9 @@ output a compressed version to stdout. Feed it a compressed file
|
||||
on stdin, and it will decompress it to stdout — as either raw or
|
||||
ASCII .PGM, depending on what format it was compressed from. For
|
||||
example:</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">./glicbawls</span> <span class="op"><</span> michael.pgm <span class="op">></span> michael.glic</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./glicbawls < michael.pgm > michael.glic</code></pre>
|
||||
<p>and then</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">./glicbawls</span> <span class="op"><</span> michael.glic <span class="op">></span> michael.decoded.pgm</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./glicbawls < michael.glic > michael.decoded.pgm</code></pre>
|
||||
<p>As it turns out, <code>glicbawls</code> compresses greyscale images (or, more
|
||||
precisely, “natural” greyscale images) better than any other
|
||||
program I am aware of (with the exception of the not-yet-published
|
||||
@@ -199,7 +199,7 @@ have trouble recognizing the image, try squinting at it ;-).</p>
|
||||
<p>If you still have trouble, simply use a terminal or xterm with
|
||||
more than 80 columns, and tell <code>glicbawls</code> about it by giving the
|
||||
number of columns as an argument. For example</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">./glicbawls</span> 260 <span class="op"><</span>lavabus.pgm <span class="op">></span>lavabus.glic</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./glicbawls 260 <lavabus.pgm >lavabus.glic</code></pre>
|
||||
<p>will allow <code>glicbawls</code> to use up to 260 columns, which makes things
|
||||
much more recognizable.</p>
|
||||
<p>Still running out of space? Need to compress those images just a
|
||||
@@ -212,13 +212,13 @@ error of 2 is allowed, an original pixel value of 37 could be
|
||||
decoded as 35, 36, 37, 38 or 39. In order to use this mode, simply
|
||||
give the maximum allowed error as an argument, with a dash (<code>-</code>)
|
||||
before it. For example:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./glicbawls</span> <span class="at">-2</span> <span class="op"><</span> graph.pgm <span class="op">></span> graph.2.glic</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./glicbawls -2 < graph.pgm > graph.2.glic</code></pre>
|
||||
<p>will compress in a way that allows decompression with a maximum
|
||||
error of two. You can combine both types of arguments, i.e.:</p>
|
||||
<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">./glicbawls</span> <span class="at">-3</span> 180 <span class="op"><</span> graph.pgm <span class="op">></span>graph.3.glic</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./glicbawls -3 180 < graph.pgm >graph.3.glic</code></pre>
|
||||
<p>will compress with a maximum error of 3, using a 180 column
|
||||
terminal for the progress display, and:</p>
|
||||
<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="ex">./glicbawls</span> <span class="at">-3</span> 180 <span class="op"><</span> graph.3.glic <span class="op">></span> graph.3maxerr.pgm</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./glicbawls -3 180 < graph.3.glic > graph.3maxerr.pgm</code></pre>
|
||||
<p>will decompress the result on such a terminal.</p>
|
||||
<p>But wait, there is more — you can also feed <code>glicbawls</code> .PPM files
|
||||
(i.e. colour images), raw or ASCII, your choice. <code>glicbawls</code> will
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./briddlebane
|
||||
```
|
||||
|
||||
@@ -19,7 +19,7 @@ equivalent file!
|
||||
|
||||
You might also like to try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
|
||||
INSULTS=15 ./try.sh
|
||||
|
||||
@@ -144,16 +144,16 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<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">./briddlebane</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./briddlebane</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>For some fun every time you log in try running this from your <code>.bashrc</code> or
|
||||
equivalent file!</p>
|
||||
<p>You might also like to 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>
|
||||
<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="va">INSULTS</span><span class="op">=</span>15 <span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./try.sh
|
||||
|
||||
INSULTS=15 ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>One could argue that this program was a “diseased dumpster of tripe”
|
||||
but I suspect that would only result in the judges being heckled as a
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./dhyang
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -141,11 +141,11 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<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">./dhyang</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./dhyang</code></pre>
|
||||
<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>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>A beautiful combination of solving several different problems, but
|
||||
mostly, the single most impressive layout we’ve ever seen. Many
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
The following bit of perl may help determine the values you need:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
perl -MConfig -e 'print "$Config{archlibexp}/CORE\n"'
|
||||
```
|
||||
|
||||
@@ -27,14 +27,14 @@ For more detailed information see [2000 dlowe bugs](../../bugs.html#2000_dlowe).
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./dlowe [file ...]
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -126,7 +126,7 @@ or EOF is encountered.
|
||||
|
||||
### Examples:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
$ echo '12 13 14 15 16 + + + + f' | ./dlowe
|
||||
70
|
||||
$ echo '12 13 14 15 16 17 + - * / p' | ./dlowe
|
||||
|
||||
+18
-18
@@ -141,9 +141,9 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<p>The following bit of perl may help determine the values you need:</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">perl</span> <span class="at">-MConfig</span> <span class="at">-e</span> <span class="st">'print "$Config{archlibexp}/CORE\n"'</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> perl -MConfig -e 'print "$Config{archlibexp}/CORE\n"'</code></pre>
|
||||
<p>… just in case the Makefile does not figure this out for you.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
@@ -151,9 +151,9 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2000_dlowe">2000 dlowe bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</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">./dlowe</span> [file ...]</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./dlowe [file ...]</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<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.sh</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>When this entry was submitted the rules of the IOCCC did not prohibit
|
||||
the use of embedded language interpreters. The judges considered
|
||||
@@ -213,20 +213,20 @@ or EOF is encountered.</p>
|
||||
the results of an operation are really huge (> 10^308)
|
||||
This bug appears to be fixed in perl5.6.0</code></pre>
|
||||
<h3 id="examples">Examples:</h3>
|
||||
<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">$</span> echo <span class="st">'12 13 14 15 16 + + + + f'</span> <span class="kw">|</span> <span class="ex">./dlowe</span></span>
|
||||
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">70</span></span>
|
||||
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">$</span> echo <span class="st">'12 13 14 15 16 17 + - * / p'</span> <span class="kw">|</span> <span class="ex">./dlowe</span></span>
|
||||
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a> <span class="ex">-0.0515873015873016</span></span>
|
||||
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">$</span> echo <span class="st">'+'</span> <span class="kw">|</span> <span class="ex">./dlowe</span></span>
|
||||
<span id="cb10-6"><a href="#cb10-6" aria-hidden="true" tabindex="-1"></a> <span class="ex">stack</span> empty</span>
|
||||
<span id="cb10-7"><a href="#cb10-7" aria-hidden="true" tabindex="-1"></a> <span class="ex">$</span> echo <span class="st">'999999999999999 1 + p'</span> <span class="kw">|</span> <span class="ex">./dlowe</span></span>
|
||||
<span id="cb10-8"><a href="#cb10-8" aria-hidden="true" tabindex="-1"></a> <span class="ex">1e+15</span></span>
|
||||
<span id="cb10-9"><a href="#cb10-9" aria-hidden="true" tabindex="-1"></a> <span class="ex">$</span> echo <span class="st">'99999999999999 1 + p'</span> <span class="kw">|</span> <span class="ex">./dlowe</span></span>
|
||||
<span id="cb10-10"><a href="#cb10-10" aria-hidden="true" tabindex="-1"></a> <span class="ex">100000000000000</span></span>
|
||||
<span id="cb10-11"><a href="#cb10-11" aria-hidden="true" tabindex="-1"></a> <span class="ex">$</span> echo <span class="st">'12.5 9 % 10 * 15 + f'</span> <span class="kw">|</span> <span class="ex">./dlowe</span></span>
|
||||
<span id="cb10-12"><a href="#cb10-12" aria-hidden="true" tabindex="-1"></a> <span class="ex">50</span></span>
|
||||
<span id="cb10-13"><a href="#cb10-13" aria-hidden="true" tabindex="-1"></a> <span class="ex">$</span> echo <span class="st">'7 P 6 d P P 8 p'</span> <span class="kw">|</span> <span class="ex">./dlowe</span> <span class="kw">|</span> <span class="fu">tr</span> 876 tpo</span>
|
||||
<span id="cb10-14"><a href="#cb10-14" aria-hidden="true" tabindex="-1"></a> <span class="ex">poot</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> $ echo '12 13 14 15 16 + + + + f' | ./dlowe
|
||||
70
|
||||
$ echo '12 13 14 15 16 17 + - * / p' | ./dlowe
|
||||
-0.0515873015873016
|
||||
$ echo '+' | ./dlowe
|
||||
stack empty
|
||||
$ echo '999999999999999 1 + p' | ./dlowe
|
||||
1e+15
|
||||
$ echo '99999999999999 1 + p' | ./dlowe
|
||||
100000000000000
|
||||
$ echo '12.5 9 % 10 * 15 + f' | ./dlowe
|
||||
50
|
||||
$ echo '7 P 6 d P P 8 p' | ./dlowe | tr 876 tpo
|
||||
poot</code></pre>
|
||||
<h3 id="code-concept">Code Concept:</h3>
|
||||
<p>We all know that Perl and other VHLLs (very high level languages)
|
||||
are particularly well-suited for (among other things) string
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -9,7 +9,7 @@ You will need X11 header files and libraries installed to build this program.
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./jarijyrki < infile.info > outfile.info
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ You will need a system capable of displaying the results of X Window programs.
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./jarijyrki < finance.sheet > myedits.info
|
||||
```
|
||||
|
||||
@@ -88,7 +88,7 @@ supports are:
|
||||
|
||||
##### Starting
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./jarijyrki < finance.sheet > myedits.info
|
||||
```
|
||||
|
||||
@@ -144,7 +144,7 @@ To start the spreadsheet program with an existing
|
||||
spreadsheet, for instance [finance.sheet](finance.sheet), use the following
|
||||
command line:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./jarijyrki < finance.sheet
|
||||
```
|
||||
|
||||
@@ -156,7 +156,7 @@ supported by the program.
|
||||
|
||||
To start the program with an empty sheet, use
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./jarijyrki < /dev/null
|
||||
```
|
||||
|
||||
@@ -171,7 +171,7 @@ output. Hence, when the spreadsheet window has come up, you've made your
|
||||
changes, and you press the ESC key the program finishes. To save the results in
|
||||
a file, the following typical command line would be used:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./jarijyrki < finance.sheet > myedits.info
|
||||
```
|
||||
|
||||
|
||||
@@ -144,13 +144,13 @@ Location: <a href="../../location.html#FI">FI</a> - <em>Republic of Finland </em
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<p>You will need X11 header files and libraries installed to build this program.</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">./jarijyrki</span> <span class="op"><</span> infile.info <span class="op">></span> outfile.info</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./jarijyrki < infile.info > outfile.info</code></pre>
|
||||
<p>You will need a system capable of displaying the results of X Window programs.</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">./jarijyrki</span> <span class="op"><</span> finance.sheet <span class="op">></span> myedits.info</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./jarijyrki < finance.sheet > myedits.info</code></pre>
|
||||
<p>Then click on cell <code>C3</code> and type in the following:</p>
|
||||
<pre><code> C5 C6 C7 @</code></pre>
|
||||
<p>Click on cell <code>D4</code> and type in the following:</p>
|
||||
@@ -190,7 +190,7 @@ supports are:</p>
|
||||
<h3 id="usage-instructions">2. USAGE INSTRUCTIONS</h3>
|
||||
<h4 id="quick-guide">2.1. Quick Guide</h4>
|
||||
<h5 id="starting">Starting</h5>
|
||||
<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">./jarijyrki</span> <span class="op"><</span> finance.sheet <span class="op">></span> myedits.info</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./jarijyrki < finance.sheet > myedits.info</code></pre>
|
||||
<h5 id="stopping">Stopping</h5>
|
||||
<p>Use the ESC key.</p>
|
||||
<h5 id="movement">Movement</h5>
|
||||
@@ -214,14 +214,14 @@ character at the end of the formula; press backspace to delete the last one.</p>
|
||||
<p>To start the spreadsheet program with an existing
|
||||
spreadsheet, for instance <a href="finance.sheet">finance.sheet</a>, use the following
|
||||
command line:</p>
|
||||
<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="ex">./jarijyrki</span> <span class="op"><</span> finance.sheet</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./jarijyrki < finance.sheet</code></pre>
|
||||
<p>The file <a href="finance.sheet">finance.sheet</a> has been provided as an example. This
|
||||
file contains a set of financial numbers and two graphical entities - a pie
|
||||
chart and a histogram - based on them. We recommend starting the use of the
|
||||
program from this file, as a way to study and learn the formula language
|
||||
supported by the program.</p>
|
||||
<p>To start the program with an empty sheet, use</p>
|
||||
<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">./jarijyrki</span> <span class="op"><</span> /dev/null</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./jarijyrki < /dev/null</code></pre>
|
||||
<p>Alternatively, <code>/dev/zero</code> could be used but that may not exist on all systems.</p>
|
||||
<h4 id="exiting-and-saving-spreadsheets">2.3. Exiting and Saving Spreadsheets</h4>
|
||||
<p>Normally the user obviously wants to edit the spreadsheet. After the
|
||||
@@ -229,7 +229,7 @@ spreadsheet program finishes, it outputs the edited spreadsheet to the standard
|
||||
output. Hence, when the spreadsheet window has come up, you’ve made your
|
||||
changes, and you press the ESC key the program finishes. To save the results in
|
||||
a file, the following typical command line would be used:</p>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./jarijyrki</span> <span class="op"><</span> finance.sheet <span class="op">></span> myedits.info</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./jarijyrki < finance.sheet > myedits.info</code></pre>
|
||||
<h4 id="visual-overview">2.4. Visual Overview</h4>
|
||||
<p>On top of the window the Formula Area shows the formula (or text) of the
|
||||
currently selected cell. The program starts with <code>A1</code> as being the current cell.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -11,14 +11,14 @@ version](#alternate-code) below.
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./natori
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -42,14 +42,14 @@ The author noted that those in the southern hemisphere might want to change
|
||||
|
||||
To run the alternate code that supports the southern hemisphere:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./natori.alt
|
||||
```
|
||||
|
||||
@@ -65,7 +65,7 @@ versions? Or are there any?
|
||||
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -141,14 +141,14 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em></li>
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<p>An alt version exists for those in the southern hemisphere (or those who want to
|
||||
see what it would be in the southern hemisphere). See <a href="#alternate-code">alternate
|
||||
version</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">./natori</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./natori</code></pre>
|
||||
<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>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<p>Try running this on different days, say a few days apart (even better if the
|
||||
Moon phase changes), and each time run it several times in a row (or several
|
||||
times in a day).</p>
|
||||
@@ -160,9 +160,9 @@ input or else just by the code itself. Bonus points if you can make it show all.
|
||||
<code>acos(l/2)</code> into <code>acos(-l/2)</code> which we have done in the alternate version.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>To run the alternate code that supports the southern hemisphere:</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>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<h3 id="alternate-use">Alternate use:</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">./natori.alt</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./natori.alt</code></pre>
|
||||
<p>Try running this on different days, say a few days apart, and each time run it
|
||||
several times in a row (or several times in a day).</p>
|
||||
<p>What happens if you run it in the northern hemisphere? Are there any
|
||||
@@ -170,7 +170,7 @@ differences?</p>
|
||||
<p>Can you identify any Moon phases that result in the same output of both
|
||||
versions? Or are there any?</p>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
<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>
|
||||
<pre class="<!---sh-->"><code> ./try.alt.sh</code></pre>
|
||||
<p>Like with <a href="try.sh">try.sh</a>, try using this multiple times in a row or throughout
|
||||
the day on different days (if different phases of the Moon you’ll see more of a
|
||||
difference, of course).</p>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ For more detailed information see [2000 primenum bugs](../../bugs.html#2000_prim
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
echo n | ./primenum n
|
||||
```
|
||||
|
||||
@@ -27,7 +27,7 @@ NOTE: `n` is an integer.
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -64,7 +64,7 @@ Instead, the program reads input from `stdin` and returns garbled text on
|
||||
`stdout`. Fortunately, you can recover the original message simply by
|
||||
running the program a second time. Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./primenum n < textfile | ./primenum n > textfile2
|
||||
diff textfile textfile2
|
||||
```
|
||||
|
||||
@@ -141,16 +141,16 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2000_primenum">2000 primenum bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="bu">echo</span> n <span class="kw">|</span> <span class="ex">./primenum</span> n</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> echo n | ./primenum n</code></pre>
|
||||
<p>NOTE: <code>n</code> is an integer.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Don’t read the author remarks until you’re ready for the spoiler.
|
||||
Just stop and read the program; it won’t take long. Once you’ve figured
|
||||
@@ -174,8 +174,8 @@ syntax “mistakes” (e.g. <code>LessThanOrEqualTo</code>) and blatant “erro
|
||||
Instead, the program reads input from <code>stdin</code> and returns garbled text on
|
||||
<code>stdout</code>. Fortunately, you can recover the original message simply by
|
||||
running the program a second time. Try:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./primenum</span> n <span class="op"><</span> textfile <span class="kw">|</span> <span class="ex">./primenum</span> n <span class="op">></span> textfile2</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">diff</span> textfile textfile2</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./primenum n < textfile | ./primenum n > textfile2
|
||||
diff textfile textfile2</code></pre>
|
||||
<p>where n is the same number (modulo 64). So, the prime number generator
|
||||
is actually a simple text encoder/decoder! Of course, don’t forget that
|
||||
argument, otherwise the “bugs” in the program will cause it to crash!</p>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ For more detailed information see [2000 rince bugs](../../bugs.html#2000_rince).
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./rince number number2
|
||||
```
|
||||
|
||||
@@ -28,7 +28,7 @@ different.
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -51,7 +51,7 @@ observation.
|
||||
|
||||
The simplest way to run it is with no arguments. Just type:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./rince
|
||||
```
|
||||
|
||||
@@ -65,7 +65,7 @@ has a built in time machine. Indeed the program knows the speed of light,
|
||||
which is used to ensure that we see the "live" pictures. Simply specify
|
||||
the fraction of a day to skip forward for each screen refresh. I suggest:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./rince 0.01
|
||||
```
|
||||
|
||||
@@ -73,7 +73,7 @@ To display the output (still guessing?) for a given date, specify two
|
||||
arguments. The first argument is as before and the second argument is a
|
||||
Julian day number (given as a fractional component). E.g.:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./rince 0 2441193.6
|
||||
./rince 0.01 2441193.6
|
||||
```
|
||||
@@ -170,7 +170,7 @@ states the following:
|
||||
|
||||
Thus we can plot Galileo's discoveries using the following three plots:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./rince 0 $(./dmy2jd 7.8 1 1610)
|
||||
./rince 0 $(./dmy2jd 8.8 1 1610)
|
||||
./rince 0 $(./dmy2jd 10.8 1 1610)
|
||||
@@ -180,7 +180,7 @@ However we can go one better by seeing what Galileo would have seen if it
|
||||
wasn't cloudy on the 9th. Try:
|
||||
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./rince 0 $(./dmy2jd 9.85 1 1610)
|
||||
```
|
||||
|
||||
|
||||
+11
-11
@@ -141,17 +141,17 @@ Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make all</code></pre>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2000_rince">2000 rince bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./rince</span> number number2</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./rince number number2</code></pre>
|
||||
<p>If <code>DISPLAY</code> is not set the program will very likely crash or do something
|
||||
different.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<p>This will run the program several times with different parameters to show
|
||||
different types of things. See the author’s remarks for more details.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
@@ -162,7 +162,7 @@ observation.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="how-to-use-it">How to use it</h3>
|
||||
<p>The simplest way to run it is with no arguments. Just type:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./rince</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./rince</code></pre>
|
||||
<p>You will need to have access to X windows, although it doesn’t require
|
||||
desperately high resolution and there are no known limitations on colour
|
||||
depth.</p>
|
||||
@@ -171,12 +171,12 @@ or more to be visible. For those that cannot wait that long the program
|
||||
has a built in time machine. Indeed the program knows the speed of light,
|
||||
which is used to ensure that we see the “live” pictures. Simply specify
|
||||
the fraction of a day to skip forward for each screen refresh. I suggest:</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">./rince</span> 0.01</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./rince 0.01</code></pre>
|
||||
<p>To display the output (still guessing?) for a given date, specify two
|
||||
arguments. The first argument is as before and the second argument is a
|
||||
Julian day number (given as a fractional component). E.g.:</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">./rince</span> 0 2441193.6</span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./rince</span> 0.01 2441193.6</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./rince 0 2441193.6
|
||||
./rince 0.01 2441193.6</code></pre>
|
||||
<p>A Julian day is defined to be the number of days since January 1st in the year
|
||||
<code>-4712 (4713BC)</code>, starting at 12 noon GMT.<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a><a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a> To aid conversion from our time
|
||||
(GMT) to Julian day there is a supplementary program named:
|
||||
@@ -248,12 +248,12 @@ states the following:</p>
|
||||
Here he could see for himself that somehow, a planet could
|
||||
orbit the sun, and not leave a moon behind!</code></pre>
|
||||
<p>Thus we can plot Galileo’s discoveries using the following three plots:</p>
|
||||
<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="ex">./rince</span> 0 <span class="va">$(</span><span class="ex">./dmy2jd</span> 7.8 1 1610<span class="va">)</span></span>
|
||||
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./rince</span> 0 <span class="va">$(</span><span class="ex">./dmy2jd</span> 8.8 1 1610<span class="va">)</span></span>
|
||||
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./rince</span> 0 <span class="va">$(</span><span class="ex">./dmy2jd</span> 10.8 1 1610<span class="va">)</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./rince 0 $(./dmy2jd 7.8 1 1610)
|
||||
./rince 0 $(./dmy2jd 8.8 1 1610)
|
||||
./rince 0 $(./dmy2jd 10.8 1 1610)</code></pre>
|
||||
<p>However we can go one better by seeing what Galileo would have seen if it
|
||||
wasn’t cloudy on the 9th. Try:</p>
|
||||
<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">./rince</span> 0 <span class="va">$(</span><span class="ex">./dmy2jd</span> 9.85 1 1610<span class="va">)</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./rince 0 $(./dmy2jd 9.85 1 1610)</code></pre>
|
||||
<p>to see what he was missing out on. I wonder what he’d have made of that!</p>
|
||||
<p>Galileo discovered the fourth moon a few days later.</p>
|
||||
<p>I’ve tried typing these dates into two Java based Jovian moon plotters,
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./robison
|
||||
```
|
||||
|
||||
|
||||
@@ -141,9 +141,9 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<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">./robison</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./robison</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The program plays almost always reasonably, but does not always detect
|
||||
illegal moves. Try “9 1” as your first move, then “13 2”. Also it
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./schneiderwent
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./schneiderwent schneiderwent.data
|
||||
./schneiderwent
|
||||
```
|
||||
@@ -24,7 +24,7 @@ What's the difference?
|
||||
If you have a long while to spare (and you're bored enough that you could watch
|
||||
paint dry :-) ) you might also try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -33,7 +33,7 @@ you wish to make it run faster, you can override how long it sleeps per
|
||||
iterations and how many iterations it runs. For instance to make it sleep only
|
||||
30 seconds and run only twice:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
SLEEP=30 ITERATIONS=2 ./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -141,21 +141,21 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<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">./schneiderwent</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./schneiderwent</code></pre>
|
||||
<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">./schneiderwent</span> schneiderwent.data</span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./schneiderwent</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./schneiderwent schneiderwent.data
|
||||
./schneiderwent</code></pre>
|
||||
<p>What’s the difference?</p>
|
||||
<p>If you have a long while to spare (and you’re bored enough that you could watch
|
||||
paint dry :-) ) you might also 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">./try.sh</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<p>Alternatively, you can check on it later on, to see all the entry does. Or if
|
||||
you wish to make it run faster, you can override how long it sleeps per
|
||||
iterations and how many iterations it runs. For instance to make it sleep only
|
||||
30 seconds and run only twice:</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="va">SLEEP</span><span class="op">=</span>30 <span class="va">ITERATIONS</span><span class="op">=</span>2 <span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> SLEEP=30 ITERATIONS=2 ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Very nice play by the rules and portable text obfuscation.
|
||||
This far surpasses old tricks like adding or subtracting 1
|
||||
|
||||
+11
-11
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
@@ -16,7 +16,7 @@ looked like back in 2000 (with a configurable speed). See the
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./thadgavin.alt
|
||||
```
|
||||
|
||||
@@ -27,7 +27,7 @@ You can press 'q' at any time to exit.
|
||||
|
||||
If you have SDL1 installed:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./thadgavin_sdl
|
||||
```
|
||||
|
||||
@@ -43,13 +43,13 @@ microseconds) for the SDL version.
|
||||
|
||||
To change the SDL one to something like `15000` you can do:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make SDL_SLEEP=15000 clobber alt
|
||||
```
|
||||
|
||||
and to change the curses one to `40`:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make SLEEP=40 clobber alt
|
||||
```
|
||||
|
||||
@@ -75,14 +75,14 @@ is not a problem there.
|
||||
|
||||
### Original build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
### Original use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./thadgavin
|
||||
```
|
||||
|
||||
@@ -91,7 +91,7 @@ is not a problem there.
|
||||
|
||||
If you have SDL1 installed:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./thadgavin_sdl
|
||||
```
|
||||
|
||||
@@ -110,14 +110,14 @@ less than dazzling. We could not test this entry in DOS mode.
|
||||
|
||||
Compile using DJGPP as follows:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
gcc thadgavin.c -o thadgavin.exe -Wall -lm -O6 -mpentium -fomit-frame-pointer -ffast-math
|
||||
```
|
||||
|
||||
|
||||
### To use under Windows, X-Windows or macOS using the Simple DirectMedia Layer:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lSDL -DSDL -lm
|
||||
```
|
||||
|
||||
@@ -125,7 +125,7 @@ Compile using DJGPP as follows:
|
||||
### To use curses:
|
||||
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lncurses -lm
|
||||
```
|
||||
|
||||
|
||||
+11
-11
@@ -144,7 +144,7 @@ Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> alt</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<p>NOTE: if you don’t have curses or SDL1 installed both modes will fail to compile. In
|
||||
that case see the <a href="../../faq.html#SDL">FAQ 3.8 - How do I compile an IOCCC entry that requires SDL1
|
||||
or SDL2?</a> and <a href="../../faq.html#curses">FAQ 3.9 - How do I compile an IOCCC entry that
|
||||
@@ -153,11 +153,11 @@ requires (n)curses?</a> for more information.</p>
|
||||
looked like back in 2000 (with a configurable speed). See the
|
||||
<a href="#original-code">original code</a> section for the original entry.</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">./thadgavin.alt</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./thadgavin.alt</code></pre>
|
||||
<p>You can press ‘q’ at any time to exit.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>If you have SDL1 installed:</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">./thadgavin_sdl</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./thadgavin_sdl</code></pre>
|
||||
<p>Whereas the curses version has an early exit the SDL version does not. You will
|
||||
have to kill it yourself.</p>
|
||||
<p>You might also wish to reconfigure the speed at which the programs run. The code
|
||||
@@ -167,9 +167,9 @@ redefine the values: <code>SLEEP</code> is how long the program sleeps (in micro
|
||||
between output with curses and <code>SDL_SLEEP</code> is how long it sleeps (also in
|
||||
microseconds) for the SDL version.</p>
|
||||
<p>To change the SDL one to something like <code>15000</code> you can do:</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> SDL_SLEEP=15000 clobber alt</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make SDL_SLEEP=15000 clobber alt</code></pre>
|
||||
<p>and to change the curses one to <code>40</code>:</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> SLEEP=40 clobber alt</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make SLEEP=40 clobber alt</code></pre>
|
||||
<p>Then use the program(s) in the same way.</p>
|
||||
<p>The different macros is because the curses version is already much slower and so
|
||||
it’s better to not tie the two values together. You may of course redefine both
|
||||
@@ -184,12 +184,12 @@ typically ctrl-c) as the program does not call <code>endwin()</code>. Using <cod
|
||||
clear the screen. The alt code, as noted above, allows one to quit early so this
|
||||
is not a problem there.</p>
|
||||
<h3 id="original-build">Original build:</h3>
|
||||
<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> all</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make all</code></pre>
|
||||
<h3 id="original-use">Original use:</h3>
|
||||
<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">./thadgavin</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./thadgavin</code></pre>
|
||||
<h3 id="original-try">Original try:</h3>
|
||||
<p>If you have SDL1 installed:</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">./thadgavin_sdl</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./thadgavin_sdl</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This entry is a nice play by the rules. It can use curses, if the
|
||||
SDL graphic library is not present, and is quite good at that,
|
||||
@@ -198,11 +198,11 @@ less than dazzling. We could not test this entry in DOS mode.</p>
|
||||
<h2 id="authors-remarks">Authors’ remarks:</h2>
|
||||
<h3 id="to-use-under-dos">To use under DOS:</h3>
|
||||
<p>Compile using DJGPP as follows:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">gcc</span> thadgavin.c <span class="at">-o</span> thadgavin.exe <span class="at">-Wall</span> <span class="at">-lm</span> <span class="at">-O6</span> <span class="at">-mpentium</span> <span class="at">-fomit-frame-pointer</span> <span class="at">-ffast-math</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> gcc thadgavin.c -o thadgavin.exe -Wall -lm -O6 -mpentium -fomit-frame-pointer -ffast-math</code></pre>
|
||||
<h3 id="to-use-under-windows-x-windows-or-macos-using-the-simple-directmedia-layer">To use under Windows, X-Windows or macOS using the Simple DirectMedia Layer:</h3>
|
||||
<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="fu">gcc</span> <span class="at">-O6</span> <span class="at">-lpthread</span> <span class="at">-g</span> <span class="at">-o</span> thadgavin thadgavin.c <span class="at">-lSDL</span> <span class="at">-DSDL</span> <span class="at">-lm</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lSDL -DSDL -lm</code></pre>
|
||||
<h3 id="to-use-curses">To use curses:</h3>
|
||||
<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">gcc</span> <span class="at">-O6</span> <span class="at">-lpthread</span> <span class="at">-g</span> <span class="at">-o</span> thadgavin thadgavin.c <span class="at">-lncurses</span> <span class="at">-lm</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lncurses -lm</code></pre>
|
||||
<h3 id="warnings">Warnings</h3>
|
||||
<p>In gcc you might get the following warning:</p>
|
||||
<pre><code> thadgavin.c.c:46: warning: passing arg 2 of `SDL_SetColors' from incompatible pointer type</code></pre>
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -10,14 +10,14 @@ There is an alternate version that compiles [mkentry.c](mkentry.c). See
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./tomx
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -32,14 +32,14 @@ using it as a Makefile and running the code ends up running `mkentry`.
|
||||
|
||||
### Alternate build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -141,22 +141,22 @@ Location: <a href="../../location.html#NL">NL</a> - <em>Kingdom of the Netherlan
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<p>There is an alternate version that compiles <a href="mkentry.c">mkentry.c</a>. See
|
||||
<a href="#alternate-code">alternate code</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">./tomx</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./tomx</code></pre>
|
||||
<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>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This alternate code is based on the author’s remarks with a slight fix so that
|
||||
it will do what it once did, compile and run <a href="mkentry.c">mkentry.c</a>. You can use
|
||||
it in a similar way as <a href="tomx.c">tomx.c</a>, both executing the source file and
|
||||
using it as a Makefile and running the code ends up running <code>mkentry</code>.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<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>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<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>
|
||||
<pre class="<!---sh-->"><code> ./try.alt.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Polyglots have come and gone, but this was the first one we’d seen
|
||||
where one language <em>used</em> another to perform its tasks. An interesting
|
||||
|
||||
Reference in new issue
Block a user