improved indentation and whitespace for markdown code blocks
All code blocks in markdown have been intended by at least 4 spaces. We add `--tab-stop=8` to all `pandoc(1)` executions in order to set a better tab stop indentation, especially for tab intended code blocks. Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.3 2024-03-26" to "1.6 2024-03-31". Fixed `1991/brnstnd/sorta.README.md` so that the sorta code is code blocks. Removed unneeded paragraph group in copyright in `inc/footer.default.html`. Fixed excess whitespace after list Author on entry `index.html` page. Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26" to "1.6 2024-03-31". Performed `make www` to perform the above and test under macOS. TODO: Fix the problem of the initial line of code being extra intended. TODO: Fix excess whitespace around code that is inline.
This commit is contained in:
1 parent
b84c27ce02
commit
a996f8d2b8
734 files changed
+16723
-16963
No files matched your search
+1
-1
@@ -84,7 +84,7 @@ Also include anything else that you would like to see in future contests.
|
||||
Send such email to:
|
||||
|
||||
```
|
||||
questions@ioccc.org
|
||||
questions@ioccc.org
|
||||
```
|
||||
|
||||
**IMPORTANT NOTE**: The email addresses found above are for historical
|
||||
|
||||
+11
-12
@@ -1,21 +1,21 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
echo something | ./anderson
|
||||
echo something | ./anderson
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -53,17 +53,16 @@ characters (semaphore smileys, if you will). For example, given the
|
||||
input "Hello, world!", the output will be:
|
||||
|
||||
```
|
||||
<> <> <> <> <> <>
|
||||
_() ()/ ()/ ()/ _\) () (/_ _\)
|
||||
[] /^ |^^ /^^ /^^ [] ^^ |^^| ^^ [] [] ^^
|
||||
<>[ [][ <>][ <>][ ][ [][] ][ ][
|
||||
<> <> <> <> <> <>
|
||||
_() ()/ ()/ ()/ _\) () (/_ _\)
|
||||
[] /^ |^^ /^^ /^^ [] ^^ |^^| ^^ [] [] ^^
|
||||
<>[ [][ <>][ <>][ ][ [][] ][ ][
|
||||
|
||||
|
||||
<> []
|
||||
_()_ ()/ |() ()
|
||||
[] ^^ [] /^^ ^^| |^^|
|
||||
][ <>][ ][] [][]
|
||||
|
||||
<> []
|
||||
_()_ ()/ |() ()
|
||||
[] ^^ [] /^^ ^^| |^^|
|
||||
][ <>][ ][] [][]
|
||||
```
|
||||
|
||||
The program is obfuscated without the use of the preprocessor or any
|
||||
|
||||
+12
-14
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Glyn_Anderson">Glyn Anderson</a><br>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,11 +141,11 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> something <span class="kw">|</span> <span class="ex">./anderson</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> something <span class="kw">|</span> <span class="ex">./anderson</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></code></pre></div>
|
||||
<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
|
||||
@@ -172,17 +171,16 @@ characters are ignored. The codes themselves are written to standard
|
||||
output as a depiction of a person holding two flags, using only ASCII
|
||||
characters (semaphore smileys, if you will). For example, given the
|
||||
input “Hello, world!”, the output will be:</p>
|
||||
<pre><code> <> <> <> <> <> <>
|
||||
_() ()/ ()/ ()/ _\) () (/_ _\)
|
||||
[] /^ |^^ /^^ /^^ [] ^^ |^^| ^^ [] [] ^^
|
||||
<>[ [][ <>][ <>][ ][ [][] ][ ][
|
||||
<pre><code> <> <> <> <> <> <>
|
||||
_() ()/ ()/ ()/ _\) () (/_ _\)
|
||||
[] /^ |^^ /^^ /^^ [] ^^ |^^| ^^ [] [] ^^
|
||||
<>[ [][ <>][ <>][ ][ [][] ][ ][
|
||||
|
||||
|
||||
<> []
|
||||
_()_ ()/ |() ()
|
||||
[] ^^ [] /^^ ^^| |^^|
|
||||
][ <>][ ][] [][]
|
||||
</code></pre>
|
||||
<> []
|
||||
_()_ ()/ |() ()
|
||||
[] ^^ [] /^^ ^^| |^^|
|
||||
][ <>][ ][] [][]</code></pre>
|
||||
<p>The program is obfuscated without the use of the preprocessor or any
|
||||
special compilation parameters. In fact, the program doesn’t even
|
||||
bother using any keywords, save the single <code>char</code> at the beginning.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./bellard
|
||||
./bellard
|
||||
```
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ Can you modify this code to produce primes such as `23523*2^70000-1`,
|
||||
NOTE: as bigger primes are found as time goes by this program no longer prints
|
||||
the biggest prime once noted by the author below.
|
||||
|
||||
|
||||
## Author's comments:
|
||||
|
||||
This program prints the biggest known prime number (`2^6972593-1`)
|
||||
|
||||
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Fabrice_Bellard">Fabrice Bellard</a><br>
|
||||
Location: <a href="../../location.html#FR">FR</a> - <em>French Republic</em> (<em>France</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#FR">FR</a> - <em>French Republic</em> (<em>France</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,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>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./bellard</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="ex">./bellard</span></span></code></pre></div>
|
||||
<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>
|
||||
|
||||
+13
-13
@@ -1,14 +1,14 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./bmeyer
|
||||
./bmeyer
|
||||
```
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ make
|
||||
In a video window (white text on black background):
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
The script will suggest you compare the output of the program with images,
|
||||
@@ -32,8 +32,8 @@ dashed argument) for compression and decompression! You've been warned.
|
||||
The author recommended on linux/x86, glibc 2.0, libc4/5:
|
||||
|
||||
```make
|
||||
bmeyer: bmeyer.c
|
||||
CC -DY="__setfpucw(0x127f)" -O6 $? -o $@ -lm
|
||||
bmeyer: bmeyer.c
|
||||
CC -DY="__setfpucw(0x127f)" -O6 $? -o $@ -lm
|
||||
```
|
||||
|
||||
However many compilers use `-O3` as the maximum level for `-O` optimization.
|
||||
@@ -41,8 +41,8 @@ However many compilers use `-O3` as the maximum level for `-O` optimization.
|
||||
And on linux/x86, glibc 2.1:
|
||||
|
||||
```make
|
||||
bmeyer: bmeyer.c
|
||||
gcc -DY='int x=0x127f; __asm__ ("fldcw %0" : : "m" (*&x))' $? -o $@ -lm
|
||||
bmeyer: bmeyer.c
|
||||
gcc -DY='int x=0x127f; __asm__ ("fldcw %0" : : "m" (*&x))' $? -o $@ -lm
|
||||
```
|
||||
|
||||
Compile with the maximum possible optimization on your system.
|
||||
@@ -81,13 +81,13 @@ ASCII .PGM, depending on what format it was compressed from. For
|
||||
example:
|
||||
|
||||
```sh
|
||||
./glicbawls < michael.pgm > michael.glic
|
||||
./glicbawls < michael.pgm > michael.glic
|
||||
```
|
||||
|
||||
and then
|
||||
|
||||
```sh
|
||||
./glicbawls < michael.glic > michael.decoded.pgm
|
||||
./glicbawls < michael.glic > michael.decoded.pgm
|
||||
```
|
||||
|
||||
As it turns out, `glicbawls` compresses greyscale images (or, more
|
||||
@@ -105,7 +105,7 @@ more than 80 columns, and tell `glicbawls` about it by giving the
|
||||
number of columns as an argument. For example
|
||||
|
||||
```sh
|
||||
./glicbawls 260 <lavabus.pgm >lavabus.glic
|
||||
./glicbawls 260 <lavabus.pgm >lavabus.glic
|
||||
```
|
||||
|
||||
will allow `glicbawls` to use up to 260 columns, which makes things
|
||||
@@ -123,21 +123,21 @@ give the maximum allowed error as an argument, with a dash (`-`)
|
||||
before it. For example:
|
||||
|
||||
```sh
|
||||
./glicbawls -2 < graph.pgm > graph.2.glic
|
||||
./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
|
||||
./glicbawls -3 180 < graph.pgm >graph.3.glic
|
||||
./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
|
||||
./glicbawls -3 180 < graph.3.glic > graph.3maxerr.pgm
|
||||
./glicbawls -3 180 < graph.3.glic > graph.3maxerr.pgm
|
||||
```
|
||||
|
||||
will decompress the result on such a terminal.
|
||||
|
||||
+14
-15
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Bernd_Meyer">Bernd Meyer</a><br>
|
||||
Location: <a href="../../location.html#AU">AU</a> - <em>Commonwealth of Australia</em> (<em>Australia</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#AU">AU</a> - <em>Commonwealth of Australia</em> (<em>Australia</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,24 +141,24 @@ 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>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./bmeyer</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="ex">./bmeyer</span></span></code></pre></div>
|
||||
<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>
|
||||
<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>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
|
||||
CC -DY="__setfpucw(0x127f)" -O6 $? -o $@ -lm</code></pre>
|
||||
<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
|
||||
gcc -DY='int x=0x127f; __asm__ ("fldcw %0" : : "m" (*&x))' $? -o $@ -lm</code></pre>
|
||||
<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
|
||||
point values (x86, some Motorola processors) and you want the
|
||||
@@ -185,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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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
|
||||
@@ -200,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>
|
||||
<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>
|
||||
<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
|
||||
@@ -213,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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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,14 +1,14 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./briddlebane
|
||||
./briddlebane
|
||||
```
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ equivalent file!
|
||||
You might also like to try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
|
||||
INSULTS=15 ./try.sh
|
||||
INSULTS=15 ./try.sh
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -135,8 +135,7 @@
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Moxen_N_Briddlebane">Moxen N. Briddlebane</a><br>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -145,16 +144,16 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./briddlebane</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="ex">./briddlebane</span></span></code></pre></div>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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,21 +1,21 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./dhyang
|
||||
./dhyang
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Don_Yang">Don Yang</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,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>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./dhyang</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="ex">./dhyang</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></code></pre></div>
|
||||
<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
|
||||
|
||||
+46
-46
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
The following bit of perl may help determine the values you need:
|
||||
|
||||
```sh
|
||||
perl -MConfig -e 'print "$Config{archlibexp}/CORE\n"'
|
||||
perl -MConfig -e 'print "$Config{archlibexp}/CORE\n"'
|
||||
```
|
||||
|
||||
... just in case the Makefile does not figure this out for you.
|
||||
@@ -18,8 +18,8 @@ perl -MConfig -e 'print "$Config{archlibexp}/CORE\n"'
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: known bug - please help us fix
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
STATUS: known bug - please help us fix
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
```
|
||||
|
||||
For more detailed information see [2000 dlowe bugs](../../bugs.html#2000_dlowe).
|
||||
@@ -28,14 +28,14 @@ For more detailed information see [2000 dlowe bugs](../../bugs.html#2000_dlowe).
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./dlowe [file ...]
|
||||
./dlowe [file ...]
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ of the submitters hidden until all winning entries have been selected.
|
||||
### Usage
|
||||
|
||||
```
|
||||
./dlowe [file ...]
|
||||
./dlowe [file ...]
|
||||
```
|
||||
|
||||
### Synopsis
|
||||
@@ -74,29 +74,29 @@ based on the `dc(1)` unix calculator.
|
||||
This program understands the following `dc(1)` commands:
|
||||
|
||||
```
|
||||
p prints the top stack value without altering the stack.
|
||||
P prints the top stack value, removing it from the stack, and
|
||||
doesn't print a trailing newline.
|
||||
f prints the contents of the stack, one number per line,
|
||||
without modifying it.
|
||||
c clears the stack.
|
||||
d pushes a copy of the top stack value onto the stack.
|
||||
r reverses the order of the top two stack values.
|
||||
p prints the top stack value without altering the stack.
|
||||
P prints the top stack value, removing it from the stack, and
|
||||
doesn't print a trailing newline.
|
||||
f prints the contents of the stack, one number per line,
|
||||
without modifying it.
|
||||
c clears the stack.
|
||||
d pushes a copy of the top stack value onto the stack.
|
||||
r reverses the order of the top two stack values.
|
||||
```
|
||||
|
||||
And the following arithmetic operators are supported:
|
||||
|
||||
```
|
||||
+ Pops 2 values and pushes their sum.
|
||||
- Pops 2 values and pushes the result of subtracting the first
|
||||
from the second.
|
||||
* Pops 2 values and pushes their product.
|
||||
/ Pops 2 values and pushes the result of dividing the second
|
||||
by the first.
|
||||
^ Pops 2 values and pushes the result of raising the second
|
||||
to the power of the first.
|
||||
% Pops 2 values and pushes the remainder of the division that
|
||||
/ would do.
|
||||
+ Pops 2 values and pushes their sum.
|
||||
- Pops 2 values and pushes the result of subtracting the first
|
||||
from the second.
|
||||
* Pops 2 values and pushes their product.
|
||||
/ Pops 2 values and pushes the result of dividing the second
|
||||
by the first.
|
||||
^ Pops 2 values and pushes the result of raising the second
|
||||
to the power of the first.
|
||||
% Pops 2 values and pushes the remainder of the division that
|
||||
/ would do.
|
||||
```
|
||||
|
||||
The precision and range are double, like it or not, except that the
|
||||
@@ -113,34 +113,34 @@ or EOF is encountered.
|
||||
### Diagnostics:
|
||||
|
||||
```
|
||||
"stack empty" Not enough on the stack for the requested command
|
||||
"divide by zero" Attempt to divide by zero
|
||||
"unimplemented" Invalid input
|
||||
Floating point exception (core dumped) (or something to that effect)
|
||||
Bug in Perl_sv_upgrade causes this in some cases when
|
||||
the results of an operation are really huge (> 10^308)
|
||||
This bug appears to be fixed in perl5.6.0
|
||||
"stack empty" Not enough on the stack for the requested command
|
||||
"divide by zero" Attempt to divide by zero
|
||||
"unimplemented" Invalid input
|
||||
|
||||
Floating point exception (core dumped) (or something to that effect)
|
||||
Bug in Perl_sv_upgrade causes this in some cases when
|
||||
the results of an operation are really huge (> 10^308)
|
||||
This bug appears to be fixed in perl5.6.0
|
||||
```
|
||||
|
||||
|
||||
### Examples:
|
||||
|
||||
```sh
|
||||
$ 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
|
||||
$ 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 Concept:
|
||||
|
||||
+48
-49
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#J_David_Lowe">J. David Lowe</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,19 +141,19 @@ 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>
|
||||
<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>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>
|
||||
<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>
|
||||
<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>
|
||||
<pre><code>STATUS: known bug - please help us fix
|
||||
STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<pre><code> STATUS: known bug - please help us fix
|
||||
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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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
|
||||
@@ -170,32 +169,32 @@ of the submitters hidden until all winning entries have been selected.</li>
|
||||
</ul>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<pre><code>./dlowe [file ...]</code></pre>
|
||||
<pre><code> ./dlowe [file ...]</code></pre>
|
||||
<h3 id="synopsis">Synopsis</h3>
|
||||
<p>This is a <a href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">Reverse Polish
|
||||
calculator</a>, loosely
|
||||
based on the <code>dc(1)</code> unix calculator.</p>
|
||||
<h1 id="syntax">Syntax</h1>
|
||||
<p>This program understands the following <code>dc(1)</code> commands:</p>
|
||||
<pre><code>p prints the top stack value without altering the stack.
|
||||
P prints the top stack value, removing it from the stack, and
|
||||
doesn't print a trailing newline.
|
||||
f prints the contents of the stack, one number per line,
|
||||
without modifying it.
|
||||
c clears the stack.
|
||||
d pushes a copy of the top stack value onto the stack.
|
||||
r reverses the order of the top two stack values.</code></pre>
|
||||
<pre><code> p prints the top stack value without altering the stack.
|
||||
P prints the top stack value, removing it from the stack, and
|
||||
doesn't print a trailing newline.
|
||||
f prints the contents of the stack, one number per line,
|
||||
without modifying it.
|
||||
c clears the stack.
|
||||
d pushes a copy of the top stack value onto the stack.
|
||||
r reverses the order of the top two stack values.</code></pre>
|
||||
<p>And the following arithmetic operators are supported:</p>
|
||||
<pre><code> + Pops 2 values and pushes their sum.
|
||||
- Pops 2 values and pushes the result of subtracting the first
|
||||
from the second.
|
||||
* Pops 2 values and pushes their product.
|
||||
/ Pops 2 values and pushes the result of dividing the second
|
||||
by the first.
|
||||
^ Pops 2 values and pushes the result of raising the second
|
||||
to the power of the first.
|
||||
% Pops 2 values and pushes the remainder of the division that
|
||||
/ would do.</code></pre>
|
||||
<pre><code> + Pops 2 values and pushes their sum.
|
||||
- Pops 2 values and pushes the result of subtracting the first
|
||||
from the second.
|
||||
* Pops 2 values and pushes their product.
|
||||
/ Pops 2 values and pushes the result of dividing the second
|
||||
by the first.
|
||||
^ Pops 2 values and pushes the result of raising the second
|
||||
to the power of the first.
|
||||
% Pops 2 values and pushes the remainder of the division that
|
||||
/ would do.</code></pre>
|
||||
<p>The precision and range are double, like it or not, except that the
|
||||
modulus operator actually returns <code>(p1 - (p2 * (p1 / p2)))</code>, but with
|
||||
the innermost division calculated at integer precision. This is
|
||||
@@ -205,29 +204,29 @@ the command line. Unlike <code>dc(1)</code>, multiple commands on the same line
|
||||
must be space separated. Commands are only executed when a newline
|
||||
or EOF is encountered.</p>
|
||||
<h3 id="diagnostics">Diagnostics:</h3>
|
||||
<pre><code>"stack empty" Not enough on the stack for the requested command
|
||||
"divide by zero" Attempt to divide by zero
|
||||
"unimplemented" Invalid input
|
||||
Floating point exception (core dumped) (or something to that effect)
|
||||
Bug in Perl_sv_upgrade causes this in some cases when
|
||||
the results of an operation are really huge (> 10^308)
|
||||
This bug appears to be fixed in perl5.6.0
|
||||
</code></pre>
|
||||
<pre><code> "stack empty" Not enough on the stack for the requested command
|
||||
"divide by zero" Attempt to divide by zero
|
||||
"unimplemented" Invalid input
|
||||
|
||||
Floating point exception (core dumped) (or something to that effect)
|
||||
Bug in Perl_sv_upgrade causes this in some cases when
|
||||
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>
|
||||
<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>
|
||||
<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
-1
@@ -184,7 +184,7 @@ REVERSAL ..</a>.</p>
|
||||
<p>Please send us comments and suggestions what we have expressed above.
|
||||
Also include anything else that you would like to see in future contests.
|
||||
Send such email to:</p>
|
||||
<pre><code>questions@ioccc.org</code></pre>
|
||||
<pre><code> questions@ioccc.org</code></pre>
|
||||
<p><strong>IMPORTANT NOTE</strong>: The email addresses found above are for historical
|
||||
purposes only, and should not be used today. See
|
||||
<a href="../contact.html">contact.html</a> for up to date contact details
|
||||
|
||||
+43
-43
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
You will need X11 header files and libraries installed to build this program.
|
||||
@@ -10,7 +10,7 @@ You will need X11 header files and libraries installed to build this program.
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./jarijyrki < infile.info > outfile.info
|
||||
./jarijyrki < infile.info > outfile.info
|
||||
```
|
||||
|
||||
You will need a system capable of displaying the results of X Window programs.
|
||||
@@ -19,19 +19,19 @@ You will need a system capable of displaying the results of X Window programs.
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./jarijyrki < finance.sheet > myedits.info
|
||||
./jarijyrki < finance.sheet > myedits.info
|
||||
```
|
||||
|
||||
Then click on cell `C3` and type in the following:
|
||||
|
||||
```
|
||||
C5 C6 C7 @
|
||||
C5 C6 C7 @
|
||||
```
|
||||
|
||||
Click on cell `D4` and type in the following:
|
||||
|
||||
```
|
||||
C5 C6 C7 !
|
||||
C5 C6 C7 !
|
||||
```
|
||||
|
||||
Hit `ESC`.
|
||||
@@ -39,7 +39,7 @@ Hit `ESC`.
|
||||
Now try running:
|
||||
|
||||
```
|
||||
./jarijyrki < myedits.info
|
||||
./jarijyrki < myedits.info
|
||||
```
|
||||
|
||||
And observe that it matches what you had in the previous run!
|
||||
@@ -89,7 +89,7 @@ supports are:
|
||||
##### Starting
|
||||
|
||||
```sh
|
||||
./jarijyrki < finance.sheet > myedits.info
|
||||
./jarijyrki < finance.sheet > myedits.info
|
||||
```
|
||||
|
||||
|
||||
@@ -112,18 +112,18 @@ character at the end of the formula; press backspace to delete the last one.
|
||||
##### Formulas
|
||||
|
||||
```
|
||||
123.45
|
||||
A1 A2 +
|
||||
B1 B2 -
|
||||
C1 C2 *
|
||||
D1 D2 /
|
||||
123.45
|
||||
A1 A2 +
|
||||
B1 B2 -
|
||||
C1 C2 *
|
||||
D1 D2 /
|
||||
```
|
||||
|
||||
|
||||
##### Pie charts
|
||||
|
||||
```
|
||||
A1 A2 A3 ...
|
||||
A1 A2 A3 ...
|
||||
```
|
||||
|
||||
Finish the formula with `@` to create the pie chart.
|
||||
@@ -132,7 +132,7 @@ Finish the formula with `@` to create the pie chart.
|
||||
##### Histograms
|
||||
|
||||
```
|
||||
A1 A2 A3 ...
|
||||
A1 A2 A3 ...
|
||||
```
|
||||
|
||||
Finish the formula with `!` to create the histogram.
|
||||
@@ -145,7 +145,7 @@ spreadsheet, for instance [finance.sheet](finance.sheet), use the following
|
||||
command line:
|
||||
|
||||
```sh
|
||||
./jarijyrki < finance.sheet
|
||||
./jarijyrki < finance.sheet
|
||||
```
|
||||
|
||||
The file [finance.sheet](finance.sheet) has been provided as an example. This
|
||||
@@ -157,7 +157,7 @@ supported by the program.
|
||||
To start the program with an empty sheet, use
|
||||
|
||||
```sh
|
||||
./jarijyrki < /dev/null
|
||||
./jarijyrki < /dev/null
|
||||
```
|
||||
|
||||
Alternatively, `/dev/zero` could be used but that may not exist on all systems.
|
||||
@@ -172,7 +172,7 @@ 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
|
||||
./jarijyrki < finance.sheet > myedits.info
|
||||
./jarijyrki < finance.sheet > myedits.info
|
||||
```
|
||||
|
||||
|
||||
@@ -217,29 +217,29 @@ Otherwise, the formula is interpreted as a string and shown as it is.
|
||||
An example of a simple formula, simply specifying a number is
|
||||
|
||||
```
|
||||
123.50
|
||||
123.50
|
||||
```
|
||||
|
||||
Another simple formula refers to a cell:
|
||||
|
||||
```
|
||||
A1
|
||||
A1
|
||||
```
|
||||
|
||||
This particular example formula referred to the first cell of the first row in
|
||||
the spreadsheet. Arithmetic operations require both arguments:
|
||||
|
||||
```
|
||||
A1 A2 +
|
||||
B1 B2 *
|
||||
C1 C2 -
|
||||
D1 D2 /
|
||||
A1 A2 +
|
||||
B1 B2 *
|
||||
C1 C2 -
|
||||
D1 D2 /
|
||||
```
|
||||
|
||||
More complex formulae can be constructed by combining these simple ones:
|
||||
|
||||
```
|
||||
A1 A2 + 2 *
|
||||
A1 A2 + 2 *
|
||||
```
|
||||
|
||||
This example calculates the sum of the cells `A1` and `A2`, and then multiplies
|
||||
@@ -260,7 +260,7 @@ slices, and is constructed by putting the pie amounts in stack and using the `@`
|
||||
operator. The program automatically computes the relative size of the slices.
|
||||
|
||||
```
|
||||
A1 A2 A3 A4 @
|
||||
A1 A2 A3 A4 @
|
||||
```
|
||||
|
||||
This example would draw a pie chart of four cells, `A1` to `A4`.
|
||||
@@ -269,7 +269,7 @@ The pie formula is shown above the pie for reference.
|
||||
The histograms are drawn in a similar manner, by using the `!` operator:
|
||||
|
||||
```
|
||||
A1 A2 A3 A3 !
|
||||
A1 A2 A3 A3 !
|
||||
```
|
||||
|
||||
|
||||
@@ -296,12 +296,12 @@ compile time parameters:
|
||||
---
|
||||
|
||||
```
|
||||
-DC=XK_Up
|
||||
-DL=XK_Down
|
||||
-DO=XK_Left
|
||||
-DV=XK_Right
|
||||
-DR=XK_Escape
|
||||
-D_=XK_BackSpace
|
||||
-DC=XK_Up
|
||||
-DL=XK_Down
|
||||
-DO=XK_Left
|
||||
-DV=XK_Right
|
||||
-DR=XK_Escape
|
||||
-D_=XK_BackSpace
|
||||
```
|
||||
|
||||
These definitions can be used to change the user interface of the program with
|
||||
@@ -314,7 +314,7 @@ for the arrow keys.
|
||||
|
||||
|
||||
```
|
||||
-DU=40
|
||||
-DU=40
|
||||
```
|
||||
|
||||
This parameter defines the maximum dimensions of the stored and handled
|
||||
@@ -323,7 +323,7 @@ thinking about the consequences!).
|
||||
|
||||
|
||||
```
|
||||
-DT=98
|
||||
-DT=98
|
||||
```
|
||||
|
||||
This parameter defines the maximum length of a formula in one cell. Note the
|
||||
@@ -331,7 +331,7 @@ warning in section 4.4.
|
||||
|
||||
|
||||
```
|
||||
-Dz="(T+1)*U*U"
|
||||
-Dz="(T+1)*U*U"
|
||||
```
|
||||
|
||||
Defines the number of bytes in a spreadsheet file. The number is automatically
|
||||
@@ -340,8 +340,8 @@ section 4.4.
|
||||
|
||||
|
||||
```
|
||||
-DQ=80
|
||||
-DS=20
|
||||
-DQ=80
|
||||
-DS=20
|
||||
```
|
||||
|
||||
These two parameters define the visual dimensions of a cell. Changing these may
|
||||
@@ -351,7 +351,7 @@ systems we've tested the program with. `S` also defines the size of the left
|
||||
|
||||
|
||||
```
|
||||
-DN=10
|
||||
-DN=10
|
||||
```
|
||||
|
||||
This is the x-indentation of text inside a cell. Changing this may be necessary
|
||||
@@ -359,7 +359,7 @@ to suit other font sizes and different X environments.
|
||||
|
||||
|
||||
```
|
||||
-DB=5
|
||||
-DB=5
|
||||
```
|
||||
|
||||
This is the y-indentation of text inside a cell. Changing this may be necessary
|
||||
@@ -367,14 +367,14 @@ to suit other font sizes and different X environments.
|
||||
|
||||
|
||||
```
|
||||
-DG=23
|
||||
-DG=23
|
||||
```
|
||||
|
||||
This parameter is the number of cell rows visible at one time.
|
||||
|
||||
|
||||
```
|
||||
-Dp=7
|
||||
-Dp=7
|
||||
```
|
||||
|
||||
This parameter is one smaller than the number of cells columns visible at one
|
||||
@@ -383,8 +383,8 @@ time.
|
||||
|
||||
|
||||
```
|
||||
-DM="((p+1)*Q)+S"
|
||||
-DH="(G*S)+S+S"
|
||||
-DM="((p+1)*Q)+S"
|
||||
-DH="(G*S)+S+S"
|
||||
```
|
||||
|
||||
These parameters are the window x and y sizes of the spreadsheet program window.
|
||||
|
||||
+44
-45
@@ -135,8 +135,7 @@
|
||||
Location: <a href="../../location.html#SE">SE</a> - <em>Kingdom of Sweden</em> (<em>Sweden</em>)
|
||||
<br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Jyrki_Holopainen">Jyrki Holopainen</a><br>
|
||||
Location: <a href="../../location.html#FI">FI</a> - <em>Republic of Finland </em> (<em>Finland</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#FI">FI</a> - <em>Republic of Finland </em> (<em>Finland</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -145,20 +144,20 @@ 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>
|
||||
<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>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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<p>Then click on cell <code>C3</code> and type in the following:</p>
|
||||
<pre><code>C5 C6 C7 @</code></pre>
|
||||
<pre><code> C5 C6 C7 @</code></pre>
|
||||
<p>Click on cell <code>D4</code> and type in the following:</p>
|
||||
<pre><code>C5 C6 C7 !</code></pre>
|
||||
<pre><code> C5 C6 C7 !</code></pre>
|
||||
<p>Hit <code>ESC</code>.</p>
|
||||
<p>Now try running:</p>
|
||||
<pre><code>./jarijyrki < myedits.info</code></pre>
|
||||
<pre><code> ./jarijyrki < myedits.info</code></pre>
|
||||
<p>And observe that it matches what you had in the previous run!</p>
|
||||
<p>NOTE: changing the dimension parameters (see the authors’ remarks) renders
|
||||
existing spreadsheet files unusable.</p>
|
||||
@@ -191,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>
|
||||
<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>
|
||||
<h5 id="stopping">Stopping</h5>
|
||||
<p>Use the ESC key.</p>
|
||||
<h5 id="movement">Movement</h5>
|
||||
@@ -200,29 +199,29 @@ supports are:</p>
|
||||
<p>The currently selected cell is always in the edit state. Press any key to add a
|
||||
character at the end of the formula; press backspace to delete the last one.</p>
|
||||
<h5 id="formulas">Formulas</h5>
|
||||
<pre><code>123.45
|
||||
A1 A2 +
|
||||
B1 B2 -
|
||||
C1 C2 *
|
||||
D1 D2 /</code></pre>
|
||||
<pre><code> 123.45
|
||||
A1 A2 +
|
||||
B1 B2 -
|
||||
C1 C2 *
|
||||
D1 D2 /</code></pre>
|
||||
<h5 id="pie-charts">Pie charts</h5>
|
||||
<pre><code>A1 A2 A3 ...</code></pre>
|
||||
<pre><code> A1 A2 A3 ...</code></pre>
|
||||
<p>Finish the formula with <code>@</code> to create the pie chart.</p>
|
||||
<h5 id="histograms">Histograms</h5>
|
||||
<pre><code>A1 A2 A3 ...</code></pre>
|
||||
<pre><code> A1 A2 A3 ...</code></pre>
|
||||
<p>Finish the formula with <code>!</code> to create the histogram.</p>
|
||||
<h4 id="starting-and-loading-spreadsheets">2.2. Starting and Loading Spreadsheets</h4>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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
|
||||
@@ -230,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>
|
||||
<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>
|
||||
<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.
|
||||
@@ -259,17 +258,17 @@ plus) are first pushed to the stack and then the operation is performed. If a
|
||||
formula on a cell produces <em>exactly</em> one result then that is shown in the cell.
|
||||
Otherwise, the formula is interpreted as a string and shown as it is.</p>
|
||||
<p>An example of a simple formula, simply specifying a number is</p>
|
||||
<pre><code>123.50</code></pre>
|
||||
<pre><code> 123.50</code></pre>
|
||||
<p>Another simple formula refers to a cell:</p>
|
||||
<pre><code>A1</code></pre>
|
||||
<pre><code> A1</code></pre>
|
||||
<p>This particular example formula referred to the first cell of the first row in
|
||||
the spreadsheet. Arithmetic operations require both arguments:</p>
|
||||
<pre><code>A1 A2 +
|
||||
B1 B2 *
|
||||
C1 C2 -
|
||||
D1 D2 /</code></pre>
|
||||
<pre><code> A1 A2 +
|
||||
B1 B2 *
|
||||
C1 C2 -
|
||||
D1 D2 /</code></pre>
|
||||
<p>More complex formulae can be constructed by combining these simple ones:</p>
|
||||
<pre><code>A1 A2 + 2 *</code></pre>
|
||||
<pre><code> A1 A2 + 2 *</code></pre>
|
||||
<p>This example calculates the sum of the cells <code>A1</code> and <code>A2</code>, and then multiplies
|
||||
the result by two.</p>
|
||||
<p>The currently selected cell is always in a state where it can be edited. Press
|
||||
@@ -282,11 +281,11 @@ of certain commercial spreadsheet programs.)</p>
|
||||
cells: pie charts and histograms. The pie chart can consist of any number of
|
||||
slices, and is constructed by putting the pie amounts in stack and using the <code>@</code>
|
||||
operator. The program automatically computes the relative size of the slices.</p>
|
||||
<pre><code>A1 A2 A3 A4 @</code></pre>
|
||||
<pre><code> A1 A2 A3 A4 @</code></pre>
|
||||
<p>This example would draw a pie chart of four cells, <code>A1</code> to <code>A4</code>.
|
||||
The pie formula is shown above the pie for reference.</p>
|
||||
<p>The histograms are drawn in a similar manner, by using the <code>!</code> operator:</p>
|
||||
<pre><code>A1 A2 A3 A3 !</code></pre>
|
||||
<pre><code> A1 A2 A3 A3 !</code></pre>
|
||||
<h4 id="errors-in-formulas">2.8. Errors in Formulas</h4>
|
||||
<p>The program detects recursive reference attempts, references cells not
|
||||
containing a numerical value, attempts to define formulas with zero, two, or
|
||||
@@ -301,12 +300,12 @@ value supposedly returned by it.</p>
|
||||
<p>This section explains the meaning and rationale for the
|
||||
compile time parameters:</p>
|
||||
<hr />
|
||||
<pre><code>-DC=XK_Up
|
||||
-DL=XK_Down
|
||||
-DO=XK_Left
|
||||
-DV=XK_Right
|
||||
-DR=XK_Escape
|
||||
-D_=XK_BackSpace</code></pre>
|
||||
<pre><code> -DC=XK_Up
|
||||
-DL=XK_Down
|
||||
-DO=XK_Left
|
||||
-DV=XK_Right
|
||||
-DR=XK_Escape
|
||||
-D_=XK_BackSpace</code></pre>
|
||||
<p>These definitions can be used to change the user interface of the program with
|
||||
respect to special keys. The first four define the movement operations and
|
||||
the latter two define the program termination and character deletion keys.
|
||||
@@ -314,36 +313,36 @@ Typical modifications to these parameters include changing character deletion to
|
||||
the key the user is most familiar with, which could also be <code>XK_Delete</code>.
|
||||
<code>XK_Escape</code> might be better in some cases as one of the function keys. Likewise
|
||||
for the arrow keys.</p>
|
||||
<pre><code>-DU=40</code></pre>
|
||||
<pre><code> -DU=40</code></pre>
|
||||
<p>This parameter defines the maximum dimensions of the stored and handled
|
||||
spreadsheet (but see section 4.4 for a warning about changing this without
|
||||
thinking about the consequences!).</p>
|
||||
<pre><code>-DT=98</code></pre>
|
||||
<pre><code> -DT=98</code></pre>
|
||||
<p>This parameter defines the maximum length of a formula in one cell. Note the
|
||||
warning in section 4.4.</p>
|
||||
<pre><code>-Dz="(T+1)*U*U"</code></pre>
|
||||
<pre><code> -Dz="(T+1)*U*U"</code></pre>
|
||||
<p>Defines the number of bytes in a spreadsheet file. The number is automatically
|
||||
adjusted when the spreadsheet size parameters are changed. Note the warning in
|
||||
section 4.4.</p>
|
||||
<pre><code>-DQ=80
|
||||
-DS=20</code></pre>
|
||||
<pre><code> -DQ=80
|
||||
-DS=20</code></pre>
|
||||
<p>These two parameters define the visual dimensions of a cell. Changing these may
|
||||
be necessary on your system if the default font sizes differ from those in the
|
||||
systems we’ve tested the program with. <code>S</code> also defines the size of the left
|
||||
(<code>x1</code>) and top margins (<code>x2</code>).</p>
|
||||
<pre><code>-DN=10</code></pre>
|
||||
<pre><code> -DN=10</code></pre>
|
||||
<p>This is the x-indentation of text inside a cell. Changing this may be necessary
|
||||
to suit other font sizes and different X environments.</p>
|
||||
<pre><code>-DB=5</code></pre>
|
||||
<pre><code> -DB=5</code></pre>
|
||||
<p>This is the y-indentation of text inside a cell. Changing this may be necessary
|
||||
to suit other font sizes and different X environments.</p>
|
||||
<pre><code>-DG=23</code></pre>
|
||||
<pre><code> -DG=23</code></pre>
|
||||
<p>This parameter is the number of cell rows visible at one time.</p>
|
||||
<pre><code>-Dp=7</code></pre>
|
||||
<pre><code> -Dp=7</code></pre>
|
||||
<p>This parameter is one smaller than the number of cells columns visible at one
|
||||
time.</p>
|
||||
<pre><code>-DM="((p+1)*Q)+S"
|
||||
-DH="(G*S)+S+S"</code></pre>
|
||||
<pre><code> -DM="((p+1)*Q)+S"
|
||||
-DH="(G*S)+S+S"</code></pre>
|
||||
<p>These parameters are the window x and y sizes of the spreadsheet program window.
|
||||
With these definitions, they are automatically reflecting the
|
||||
at-one-time-visible cell row/column amounts. Hence, we recommend changing the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
An alt version exists for those in the southern hemisphere (or those who want to
|
||||
@@ -12,14 +12,14 @@ version](#alternate-code) below.
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./natori
|
||||
./natori
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
Try running this on different days, say a few days apart (even better if the
|
||||
@@ -43,14 +43,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
|
||||
make alt
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
```sh
|
||||
./natori.alt
|
||||
./natori.alt
|
||||
```
|
||||
|
||||
Try running this on different days, say a few days apart, and each time run it
|
||||
@@ -66,7 +66,7 @@ versions? Or are there any?
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
./try.alt.sh
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
Like with [try.sh](try.sh), try using this multiple times in a row or throughout
|
||||
|
||||
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#NATORI_Shin">NATORI Shin</a><br>
|
||||
Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em>
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,14 +141,14 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em>
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<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>
|
||||
<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>
|
||||
<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></code></pre></div>
|
||||
<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>
|
||||
@@ -161,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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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
|
||||
@@ -171,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>
|
||||
<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>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,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ make
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
```
|
||||
|
||||
For more detailed information see [2000 primenum bugs](../../bugs.html#2000_primenum).
|
||||
@@ -19,8 +19,7 @@ For more detailed information see [2000 primenum bugs](../../bugs.html#2000_prim
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
echo n | ./primenum n
|
||||
|
||||
echo n | ./primenum n
|
||||
```
|
||||
|
||||
NOTE: `n` is an integer.
|
||||
@@ -29,7 +28,7 @@ NOTE: `n` is an integer.
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -66,8 +65,8 @@ Instead, the program reads input from `stdin` and returns garbled text on
|
||||
running the program a second time. Try:
|
||||
|
||||
```sh
|
||||
./primenum n < textfile | ./primenum n > textfile2
|
||||
diff textfile textfile2
|
||||
./primenum n < textfile | ./primenum n > textfile2
|
||||
diff textfile textfile2
|
||||
```
|
||||
|
||||
where n is the same number (modulo 64). So, the prime number generator
|
||||
|
||||
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Raymond_Cheong">Raymond Cheong</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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="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
|
||||
@@ -175,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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
+47
-47
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ make all
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
```
|
||||
|
||||
For more detailed information see [2000 rince bugs](../../bugs.html#2000_rince).
|
||||
@@ -19,7 +19,7 @@ For more detailed information see [2000 rince bugs](../../bugs.html#2000_rince).
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./rince number number2
|
||||
./rince number number2
|
||||
```
|
||||
|
||||
If `DISPLAY` is not set the program will very likely crash or do something
|
||||
@@ -29,7 +29,7 @@ different.
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
This will run the program several times with different parameters to show
|
||||
@@ -52,7 +52,7 @@ observation.
|
||||
The simplest way to run it is with no arguments. Just type:
|
||||
|
||||
```sh
|
||||
./rince
|
||||
./rince
|
||||
```
|
||||
|
||||
You will need to have access to X windows, although it doesn't require
|
||||
@@ -66,7 +66,7 @@ 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
|
||||
./rince 0.01
|
||||
./rince 0.01
|
||||
```
|
||||
|
||||
To display the output (still guessing?) for a given date, specify two
|
||||
@@ -74,8 +74,8 @@ arguments. The first argument is as before and the second argument is a
|
||||
Julian day number (given as a fractional component). E.g.:
|
||||
|
||||
```sh
|
||||
./rince 0 2441193.6
|
||||
./rince 0.01 2441193.6
|
||||
./rince 0 2441193.6
|
||||
./rince 0.01 2441193.6
|
||||
```
|
||||
|
||||
A Julian day is defined to be the number of days since January 1st in the year
|
||||
@@ -98,10 +98,10 @@ The moons are labelled with Roman numerals from `I` to `IV`, `I` being the
|
||||
closest to the planet and `IV` being the furthest. They are:
|
||||
|
||||
```
|
||||
I Io
|
||||
II Europa
|
||||
III Ganymede
|
||||
IV Callisto
|
||||
I Io
|
||||
II Europa
|
||||
III Ganymede
|
||||
IV Callisto
|
||||
```
|
||||
|
||||
Amazingly, all it takes is a pair of binoculars to see the Galilean moons,
|
||||
@@ -134,46 +134,46 @@ Galileo discovered the moons in January 1610.
|
||||
states the following:
|
||||
|
||||
```
|
||||
By early 1610, Galileo had further improved his telescope by
|
||||
double its power, so it now enlarged objects a thousand
|
||||
times. He began looking at the stars and couldn't believe how
|
||||
many more he could now see! The number seemed infinite. He was
|
||||
beginning to realize the fixed stars weren't a flat distant
|
||||
wall on a globe, but a three-dimensional expanse bigger than
|
||||
anyone had ever thought!
|
||||
By early 1610, Galileo had further improved his telescope by
|
||||
double its power, so it now enlarged objects a thousand
|
||||
times. He began looking at the stars and couldn't believe how
|
||||
many more he could now see! The number seemed infinite. He was
|
||||
beginning to realize the fixed stars weren't a flat distant
|
||||
wall on a globe, but a three-dimensional expanse bigger than
|
||||
anyone had ever thought!
|
||||
|
||||
Then, on January 7, about an hour after sunset, Jupiter rose
|
||||
in the east, and Galileo happened to turn his powerful scope
|
||||
on its bright disk. It wasn't the first time he had looked at
|
||||
Jupiter, but before it was with one of his lesser-powered
|
||||
telescopes. This time, though, he noticed three small but
|
||||
bright stars near the planet, two to one side and one to the
|
||||
other. He wondered at how bright the small stars were and how
|
||||
they were arranged in what seemed like a straight line. The
|
||||
next night he decided to look at Jupiter again, and to his
|
||||
surprise, the stars had moved. But not in such a way as he
|
||||
would expect. If Jupiter was moving as it normally should, the
|
||||
stars would be east of Jupiter. But all three were to the
|
||||
west! The next night was cloudy, but on January 10, Galileo
|
||||
was able to observe the planet again. One of the stars was
|
||||
gone, and the other two were now on the east side. As the
|
||||
stars moved around Jupiter on each succeeding night, and were
|
||||
finally joined by a fourth star, it dawned on Galileo that
|
||||
what he had found were moons orbiting Jupiter! Almost at once
|
||||
he realized that this was proof that not all objects orbited
|
||||
the Earth. Here were four bodies that were orbiting
|
||||
Jupiter. One argument against the sun-centered theory was, if
|
||||
the Earth orbited the sun, wouldn't the moon get left behind?
|
||||
Here he could see for himself that somehow, a planet could
|
||||
orbit the sun, and not leave a moon behind!
|
||||
Then, on January 7, about an hour after sunset, Jupiter rose
|
||||
in the east, and Galileo happened to turn his powerful scope
|
||||
on its bright disk. It wasn't the first time he had looked at
|
||||
Jupiter, but before it was with one of his lesser-powered
|
||||
telescopes. This time, though, he noticed three small but
|
||||
bright stars near the planet, two to one side and one to the
|
||||
other. He wondered at how bright the small stars were and how
|
||||
they were arranged in what seemed like a straight line. The
|
||||
next night he decided to look at Jupiter again, and to his
|
||||
surprise, the stars had moved. But not in such a way as he
|
||||
would expect. If Jupiter was moving as it normally should, the
|
||||
stars would be east of Jupiter. But all three were to the
|
||||
west! The next night was cloudy, but on January 10, Galileo
|
||||
was able to observe the planet again. One of the stars was
|
||||
gone, and the other two were now on the east side. As the
|
||||
stars moved around Jupiter on each succeeding night, and were
|
||||
finally joined by a fourth star, it dawned on Galileo that
|
||||
what he had found were moons orbiting Jupiter! Almost at once
|
||||
he realized that this was proof that not all objects orbited
|
||||
the Earth. Here were four bodies that were orbiting
|
||||
Jupiter. One argument against the sun-centered theory was, if
|
||||
the Earth orbited the sun, wouldn't the moon get left behind?
|
||||
Here he could see for himself that somehow, a planet could
|
||||
orbit the sun, and not leave a moon behind!
|
||||
```
|
||||
|
||||
Thus we can plot Galileo's discoveries using the following three plots:
|
||||
|
||||
```sh
|
||||
./rince 0 $(./dmy2jd 7.8 1 1610)
|
||||
./rince 0 $(./dmy2jd 8.8 1 1610)
|
||||
./rince 0 $(./dmy2jd 10.8 1 1610)
|
||||
./rince 0 $(./dmy2jd 7.8 1 1610)
|
||||
./rince 0 $(./dmy2jd 8.8 1 1610)
|
||||
./rince 0 $(./dmy2jd 10.8 1 1610)
|
||||
```
|
||||
|
||||
However we can go one better by seeing what Galileo would have seen if it
|
||||
@@ -181,7 +181,7 @@ wasn't cloudy on the 9th. Try:
|
||||
|
||||
|
||||
```sh
|
||||
./rince 0 $(./dmy2jd 9.85 1 1610)
|
||||
./rince 0 $(./dmy2jd 9.85 1 1610)
|
||||
```
|
||||
|
||||
to see what he was missing out on. I wonder what he'd have made of that!
|
||||
|
||||
+48
-49
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#James_Bonfield">James Bonfield</a><br>
|
||||
Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great Britain and Northern Ireland</em> (<em>United Kingdom</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great Britain and Northern Ireland</em> (<em>United Kingdom</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>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>
|
||||
@@ -163,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>
|
||||
<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>
|
||||
<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>
|
||||
@@ -172,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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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:
|
||||
@@ -192,10 +191,10 @@ location on Earth, but I assure you that the
|
||||
<a href="https://en.wikipedia.org/wiki/Parallax#Astronomy">parallax</a> is minimal!</p>
|
||||
<p>The moons are labelled with Roman numerals from <code>I</code> to <code>IV</code>, <code>I</code> being the
|
||||
closest to the planet and <code>IV</code> being the furthest. They are:</p>
|
||||
<pre><code>I Io
|
||||
II Europa
|
||||
III Ganymede
|
||||
IV Callisto</code></pre>
|
||||
<pre><code> I Io
|
||||
II Europa
|
||||
III Ganymede
|
||||
IV Callisto</code></pre>
|
||||
<p>Amazingly, all it takes is a pair of binoculars to see the Galilean moons,
|
||||
so the results can be experimentally checked. (Note that at present, the
|
||||
best views of Jupiter are over the autumn/winter.)</p>
|
||||
@@ -216,45 +215,45 @@ confusion, please consult the following chart (*):</p>
|
||||
<p>Galileo discovered the moons in January 1610.
|
||||
<a href="https://web.archive.org/web/20001204212000/http://www-isds.jpl.nasa.gov/cwo/cwo_54ga/html/cd/galileo.htm" class="uri">https://web.archive.org/web/20001204212000/http://www-isds.jpl.nasa.gov/cwo/cwo_54ga/html/cd/galileo.htm</a>
|
||||
states the following:</p>
|
||||
<pre><code>By early 1610, Galileo had further improved his telescope by
|
||||
double its power, so it now enlarged objects a thousand
|
||||
times. He began looking at the stars and couldn't believe how
|
||||
many more he could now see! The number seemed infinite. He was
|
||||
beginning to realize the fixed stars weren't a flat distant
|
||||
wall on a globe, but a three-dimensional expanse bigger than
|
||||
anyone had ever thought!
|
||||
<pre><code> By early 1610, Galileo had further improved his telescope by
|
||||
double its power, so it now enlarged objects a thousand
|
||||
times. He began looking at the stars and couldn't believe how
|
||||
many more he could now see! The number seemed infinite. He was
|
||||
beginning to realize the fixed stars weren't a flat distant
|
||||
wall on a globe, but a three-dimensional expanse bigger than
|
||||
anyone had ever thought!
|
||||
|
||||
Then, on January 7, about an hour after sunset, Jupiter rose
|
||||
in the east, and Galileo happened to turn his powerful scope
|
||||
on its bright disk. It wasn't the first time he had looked at
|
||||
Jupiter, but before it was with one of his lesser-powered
|
||||
telescopes. This time, though, he noticed three small but
|
||||
bright stars near the planet, two to one side and one to the
|
||||
other. He wondered at how bright the small stars were and how
|
||||
they were arranged in what seemed like a straight line. The
|
||||
next night he decided to look at Jupiter again, and to his
|
||||
surprise, the stars had moved. But not in such a way as he
|
||||
would expect. If Jupiter was moving as it normally should, the
|
||||
stars would be east of Jupiter. But all three were to the
|
||||
west! The next night was cloudy, but on January 10, Galileo
|
||||
was able to observe the planet again. One of the stars was
|
||||
gone, and the other two were now on the east side. As the
|
||||
stars moved around Jupiter on each succeeding night, and were
|
||||
finally joined by a fourth star, it dawned on Galileo that
|
||||
what he had found were moons orbiting Jupiter! Almost at once
|
||||
he realized that this was proof that not all objects orbited
|
||||
the Earth. Here were four bodies that were orbiting
|
||||
Jupiter. One argument against the sun-centered theory was, if
|
||||
the Earth orbited the sun, wouldn't the moon get left behind?
|
||||
Here he could see for himself that somehow, a planet could
|
||||
orbit the sun, and not leave a moon behind!</code></pre>
|
||||
Then, on January 7, about an hour after sunset, Jupiter rose
|
||||
in the east, and Galileo happened to turn his powerful scope
|
||||
on its bright disk. It wasn't the first time he had looked at
|
||||
Jupiter, but before it was with one of his lesser-powered
|
||||
telescopes. This time, though, he noticed three small but
|
||||
bright stars near the planet, two to one side and one to the
|
||||
other. He wondered at how bright the small stars were and how
|
||||
they were arranged in what seemed like a straight line. The
|
||||
next night he decided to look at Jupiter again, and to his
|
||||
surprise, the stars had moved. But not in such a way as he
|
||||
would expect. If Jupiter was moving as it normally should, the
|
||||
stars would be east of Jupiter. But all three were to the
|
||||
west! The next night was cloudy, but on January 10, Galileo
|
||||
was able to observe the planet again. One of the stars was
|
||||
gone, and the other two were now on the east side. As the
|
||||
stars moved around Jupiter on each succeeding night, and were
|
||||
finally joined by a fourth star, it dawned on Galileo that
|
||||
what he had found were moons orbiting Jupiter! Almost at once
|
||||
he realized that this was proof that not all objects orbited
|
||||
the Earth. Here were four bodies that were orbiting
|
||||
Jupiter. One argument against the sun-centered theory was, if
|
||||
the Earth orbited the sun, wouldn't the moon get left behind?
|
||||
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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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,14 +1,14 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./robison
|
||||
./robison
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Arch_D_Robison">Arch D. Robison</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,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>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./robison</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="ex">./robison</span></span></code></pre></div>
|
||||
<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,22 +1,22 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./schneiderwent
|
||||
./schneiderwent
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./schneiderwent schneiderwent.data
|
||||
./schneiderwent
|
||||
./schneiderwent schneiderwent.data
|
||||
./schneiderwent
|
||||
```
|
||||
|
||||
What's the difference?
|
||||
@@ -25,7 +25,7 @@ If you have a long while to spare (and you're bored enough that you could watch
|
||||
paint dry :-) ) you might also try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
Alternatively, you can check on it later on, to see all the entry does. Or if
|
||||
@@ -34,7 +34,7 @@ iterations and how many iterations it runs. For instance to make it sleep only
|
||||
30 seconds and run only twice:
|
||||
|
||||
```sh
|
||||
SLEEP=30 ITERATIONS=2 ./try.sh
|
||||
SLEEP=30 ITERATIONS=2 ./try.sh
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Craig_Schneiderwent">Craig Schneiderwent</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,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>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schneiderwent</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="ex">./schneiderwent</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">./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>
|
||||
<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>
|
||||
<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>
|
||||
<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>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>
|
||||
<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>
|
||||
<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
|
||||
|
||||
+17
-18
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
make alt
|
||||
```
|
||||
|
||||
NOTE: if you don't have curses or SDL1 installed both modes will fail to compile. In
|
||||
@@ -17,7 +17,7 @@ looked like back in 2000 (with a configurable speed). See the
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./thadgavin.alt
|
||||
./thadgavin.alt
|
||||
```
|
||||
|
||||
You can press 'q' at any time to exit.
|
||||
@@ -28,7 +28,7 @@ You can press 'q' at any time to exit.
|
||||
If you have SDL1 installed:
|
||||
|
||||
```sh
|
||||
./thadgavin_sdl
|
||||
./thadgavin_sdl
|
||||
```
|
||||
|
||||
Whereas the curses version has an early exit the SDL version does not. You will
|
||||
@@ -44,13 +44,13 @@ microseconds) for the SDL version.
|
||||
To change the SDL one to something like `15000` you can do:
|
||||
|
||||
```sh
|
||||
make SDL_SLEEP=15000 clobber alt
|
||||
make SDL_SLEEP=15000 clobber alt
|
||||
```
|
||||
|
||||
and to change the curses one to `40`:
|
||||
|
||||
```sh
|
||||
make SLEEP=40 clobber alt
|
||||
make SLEEP=40 clobber alt
|
||||
```
|
||||
|
||||
Then use the program(s) in the same way.
|
||||
@@ -76,14 +76,14 @@ is not a problem there.
|
||||
### Original build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
### Original use:
|
||||
|
||||
```sh
|
||||
./thadgavin
|
||||
./thadgavin
|
||||
```
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ make all
|
||||
If you have SDL1 installed:
|
||||
|
||||
```sh
|
||||
./thadgavin_sdl
|
||||
./thadgavin_sdl
|
||||
```
|
||||
|
||||
|
||||
@@ -111,14 +111,14 @@ less than dazzling. We could not test this entry in DOS mode.
|
||||
Compile using DJGPP as follows:
|
||||
|
||||
```sh
|
||||
gcc thadgavin.c -o thadgavin.exe -Wall -lm -O6 -mpentium -fomit-frame-pointer -ffast-math
|
||||
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
|
||||
gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lSDL -DSDL -lm
|
||||
gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lSDL -DSDL -lm
|
||||
```
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lSDL -DSDL -lm
|
||||
|
||||
|
||||
```sh
|
||||
gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lncurses -lm
|
||||
gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lncurses -lm
|
||||
```
|
||||
|
||||
|
||||
@@ -135,18 +135,17 @@ gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lncurses -lm
|
||||
In gcc you might get the following warning:
|
||||
|
||||
```
|
||||
thadgavin.c.c:46: warning: passing arg 2 of `SDL_SetColors' from incompatible pointer type
|
||||
thadgavin.c.c:46: warning: passing arg 2 of `SDL_SetColors' from incompatible pointer type
|
||||
```
|
||||
|
||||
In Microsoft Visual Studio you may get warnings as follows:
|
||||
|
||||
```
|
||||
thadgavin.c(46) : warning C4133: 'function' : incompatible types - from 'unsigned
|
||||
char *' to 'struct SDL_Color *'
|
||||
thadgavin.c(63) : warning C4026: function declared with formal parameter list
|
||||
thadgavin.c(77) : warning C4244: '=' : conversion from 'double ' to 'unsigned
|
||||
char ', possible loss of data
|
||||
|
||||
thadgavin.c(46) : warning C4133: 'function' : incompatible types - from 'unsigned
|
||||
char *' to 'struct SDL_Color *'
|
||||
thadgavin.c(63) : warning C4026: function declared with formal parameter list
|
||||
thadgavin.c(77) : warning C4244: '=' : conversion from 'double ' to 'unsigned
|
||||
char ', possible loss of data
|
||||
```
|
||||
|
||||
But don't worry, this is completely normal.
|
||||
|
||||
+18
-20
@@ -135,8 +135,7 @@
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Thaddaeus_Frogley">Thaddaeus Frogley</a><br>
|
||||
Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great Britain and Northern Ireland</em> (<em>United Kingdom</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great Britain and Northern Ireland</em> (<em>United Kingdom</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -145,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>
|
||||
<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>
|
||||
<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
|
||||
@@ -154,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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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
|
||||
@@ -168,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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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
|
||||
@@ -185,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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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,
|
||||
@@ -199,21 +198,20 @@ 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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<pre><code> thadgavin.c.c:46: warning: passing arg 2 of `SDL_SetColors' from incompatible pointer type</code></pre>
|
||||
<p>In Microsoft Visual Studio you may get warnings as follows:</p>
|
||||
<pre><code>thadgavin.c(46) : warning C4133: 'function' : incompatible types - from 'unsigned
|
||||
char *' to 'struct SDL_Color *'
|
||||
thadgavin.c(63) : warning C4026: function declared with formal parameter list
|
||||
thadgavin.c(77) : warning C4244: '=' : conversion from 'double ' to 'unsigned
|
||||
char ', possible loss of data
|
||||
</code></pre>
|
||||
<pre><code> thadgavin.c(46) : warning C4133: 'function' : incompatible types - from 'unsigned
|
||||
char *' to 'struct SDL_Color *'
|
||||
thadgavin.c(63) : warning C4026: function declared with formal parameter list
|
||||
thadgavin.c(77) : warning C4244: '=' : conversion from 'double ' to 'unsigned
|
||||
char ', possible loss of data</code></pre>
|
||||
<p>But don’t worry, this is completely normal.</p>
|
||||
<h3 id="recommended-dosage">Recommended dosage:</h3>
|
||||
<p>At least 3 minutes taken 3 times a day when tired.</p>
|
||||
|
||||
+8
-8
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
There is an alternate version that compiles [mkentry.c](mkentry.c). See
|
||||
@@ -11,14 +11,14 @@ There is an alternate version that compiles [mkentry.c](mkentry.c). See
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./tomx
|
||||
./tomx
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -33,14 +33,14 @@ using it as a Makefile and running the code ends up running `mkentry`.
|
||||
### Alternate build:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
./try.alt.sh
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -101,9 +101,9 @@ source still acceptable to `make` and `sh`. The following modification to the
|
||||
last few lines will compile the IOCCC's famous [mkentry.c](mkentry.c).
|
||||
|
||||
```
|
||||
.PHONY: /* true clean */
|
||||
#undef true
|
||||
#include "mkentry.c"
|
||||
.PHONY: /* true clean */
|
||||
#undef true
|
||||
#include "mkentry.c"
|
||||
```
|
||||
|
||||
Ain't that useful?
|
||||
|
||||
+9
-10
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Thomas_P_John">Thomas P John</a><br>
|
||||
Location: <a href="../../location.html#NL">NL</a> - <em>Kingdom of the Netherlands</em> (<em>Netherlands</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#NL">NL</a> - <em>Kingdom of the Netherlands</em> (<em>Netherlands</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,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>
|
||||
<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>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>
|
||||
<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>
|
||||
<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></code></pre></div>
|
||||
<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>
|
||||
<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-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></code></pre></div>
|
||||
<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
|
||||
@@ -201,9 +200,9 @@ the <code>main()</code>, leaving the complexities of the C file elsewhere and ma
|
||||
source still acceptable to <code>make</code> and <code>sh</code>. The following modification to the
|
||||
last few lines will compile the IOCCC’s famous <a href="mkentry.c">mkentry.c</a>.</li>
|
||||
</ol>
|
||||
<pre><code>.PHONY: /* true clean */
|
||||
#undef true
|
||||
#include "mkentry.c"</code></pre>
|
||||
<pre><code> .PHONY: /* true clean */
|
||||
#undef true
|
||||
#include "mkentry.c"</code></pre>
|
||||
<p>Ain’t that useful?</p>
|
||||
<ol start="2" type="1">
|
||||
<li><p>By extending this program’s idea, It is possible to do some
|
||||
|
||||
Reference in new issue
Block a user