Fixes in html files of 1993
This commit is contained in:
1 parent
5d93fb57b1
commit
12b548bf8a
26 files changed
+104
-112
No files matched your search
+8
-8
@@ -25,15 +25,15 @@ not be able to compile the entry, sorry!
|
||||
|
||||
## A few notes regarding future contests:
|
||||
|
||||
Be sure to wait until the 1994 rules are posted before submitting entries.
|
||||
Rules differ from year to year, sometimes in significant ways.
|
||||
Be sure to wait until the [1994 rules](../1994/rules.txt) are posted before
|
||||
submitting entries. Rules differ from year to year, sometimes in significant
|
||||
ways.
|
||||
|
||||
In 1994, we will retract the guideline that discouraged the use of C
|
||||
constructs such as `3["curds"]`. At one time, certain ANSI compilers did
|
||||
not consider such expressions to be valid ANSI C. Alert readers noted
|
||||
that the current ANSI standard considered them to be valid. We were
|
||||
unable to find an ANSI C compiler that flagged such expressions as
|
||||
errors.
|
||||
In [1994](../1994/index.html), we will retract the guideline that discouraged
|
||||
the use of C constructs such as `3["curds"]`. At one time, certain ANSI
|
||||
compilers did not consider such expressions to be valid ANSI C. Alert readers
|
||||
noted that the current ANSI standard considered them to be valid. We were
|
||||
unable to find an ANSI C compiler that flagged such expressions as errors.
|
||||
|
||||
Please send us comments and suggestions what we have expressed above.
|
||||
Also include anything else that you would like to see in future contests.
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: INABIAF - please DO NOT fix
|
||||
STATUS: missing file - please provide it
|
||||
```
|
||||
|
||||
|
||||
+2
-1
@@ -405,7 +405,8 @@ Location: <a href="../../location.html#CA">CA</a> - <em>Canada</em></li>
|
||||
<pre><code> make all</code></pre>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code> STATUS: missing file - please provide it</code></pre>
|
||||
<pre><code> STATUS: INABIAF - please DO NOT fix
|
||||
STATUS: missing file - please provide it</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1993_ant">1993/ant in bugs.html</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre><code> ./ant 'ERE' [file ...]</code></pre>
|
||||
|
||||
+14
-17
@@ -1,18 +1,17 @@
|
||||
## To build:
|
||||
|
||||
We recommend you try the alt version first so you can get a better idea of what
|
||||
this entry was like back in 1993. See the [original code](#original-code)
|
||||
section below to run the original.
|
||||
We recommend you try the alternate version first so you can get a better idea of what
|
||||
this entry was like back in 1993 (though see the [known bug in
|
||||
bugs.html](../../bugs.html#1993_cmills)). See the [original code](#original-code)
|
||||
section below to run the original (the bug also exists here).
|
||||
|
||||
``` <!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
NOTE: this entry requires the `X11/Xlib.h` header file and the X11 library to
|
||||
compile. If you're under macOS and do not know how to install and use X11
|
||||
programs see [FAQ 3.7 - How do I compile and use on macOS, an IOCCC entry that
|
||||
requires X11?](../../faq.html#X11macos).
|
||||
|
||||
compile. If you don't have the X11 installed see the [FAQ on how to compile and
|
||||
run an entry that requires X11](../../faq.html#X11).
|
||||
|
||||
To configure how many microseconds to sleep before updates try:
|
||||
|
||||
@@ -71,16 +70,14 @@ Use `cmills` as you would `cmills.alt` above.
|
||||
From the San Jose Mercury News (May 15, 1993 page 20A "West Hackers
|
||||
trounce East in computer quiz game"):
|
||||
|
||||
```
|
||||
"Since 1984, a contest has been held on Usenet for the most
|
||||
unreadable, creative, bizarre but working C program", Gates
|
||||
said. "What is the name of this contest"
|
||||
|
||||
"Windows," shot back Gassee, naming Microsoft's premier product
|
||||
- a product over which Apple sued Microsoft five years ago. Not
|
||||
the right answer - it's "The Obfuscated C Contest [sic]" - but
|
||||
it brought down the house of Apple partisans...
|
||||
```
|
||||
> "Since 1984, a contest has been held on Usenet for the most unreadable,
|
||||
creative, bizarre but working C program", Gates said. "What is the name of this
|
||||
contest?"
|
||||
>
|
||||
> "**Windows**," shot back _Gassee_, naming Microsoft's premier product - a
|
||||
product over which Apple sued Microsoft five years ago. Not the right answer -
|
||||
it's "**The Obfuscated C Contest** [sic]" - but it brought down the house of Apple
|
||||
partisans...
|
||||
|
||||
[The expression on Bill Gates' face was a sight to behold, as reported
|
||||
to us by several who were there].
|
||||
|
||||
+15
-14
@@ -402,14 +402,14 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
|
||||
<!-- BEFORE: 1st line of markdown file: 1993/cmills/README.md -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>We recommend you try the alt version first so you can get a better idea of what
|
||||
this entry was like back in 1993. See the <a href="#original-code">original code</a>
|
||||
section below to run the original.</p>
|
||||
<p>We recommend you try the alternate version first so you can get a better idea of what
|
||||
this entry was like back in 1993 (though see the <a href="../../bugs.html#1993_cmills">known bug in
|
||||
bugs.html</a>). See the <a href="#original-code">original code</a>
|
||||
section below to run the original (the bug also exists here).</p>
|
||||
<pre><code> make alt</code></pre>
|
||||
<p>NOTE: this entry requires the <code>X11/Xlib.h</code> header file and the X11 library to
|
||||
compile. If you’re under macOS and do not know how to install and use X11
|
||||
programs see <a href="../../faq.html#X11macos">FAQ 3.7 - How do I compile and use on macOS, an IOCCC entry that
|
||||
requires X11?</a>.</p>
|
||||
compile. If you don’t have the X11 installed see the <a href="../../faq.html#X11">FAQ on how to compile and
|
||||
run an entry that requires X11</a>.</p>
|
||||
<p>To configure how many microseconds to sleep before updates try:</p>
|
||||
<pre><code> make clobber SLEEP=200 alt</code></pre>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
@@ -433,14 +433,15 @@ on but you can use the original without any delays if you wish.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>From the San Jose Mercury News (May 15, 1993 page 20A “West Hackers
|
||||
trounce East in computer quiz game”):</p>
|
||||
<pre><code> "Since 1984, a contest has been held on Usenet for the most
|
||||
unreadable, creative, bizarre but working C program", Gates
|
||||
said. "What is the name of this contest"
|
||||
|
||||
"Windows," shot back Gassee, naming Microsoft's premier product
|
||||
- a product over which Apple sued Microsoft five years ago. Not
|
||||
the right answer - it's "The Obfuscated C Contest [sic]" - but
|
||||
it brought down the house of Apple partisans...</code></pre>
|
||||
<blockquote>
|
||||
<p>“Since 1984, a contest has been held on Usenet for the most unreadable,
|
||||
creative, bizarre but working C program”, Gates said. “What is the name of this
|
||||
contest?”</p>
|
||||
<p>“<strong>Windows</strong>,” shot back <em>Gassee</em>, naming Microsoft’s premier product - a
|
||||
product over which Apple sued Microsoft five years ago. Not the right answer -
|
||||
it’s “<strong>The Obfuscated C Contest</strong> [sic]” - but it brought down the house of Apple
|
||||
partisans…</p>
|
||||
</blockquote>
|
||||
<p>[The expression on Bill Gates’ face was a sight to behold, as reported
|
||||
to us by several who were there].</p>
|
||||
<p>You must set <code>$DISPLAY</code> in your environment or the program will
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
|
||||
where:
|
||||
|
||||
`datafile` is the initial pattern (default is the [dgibson.data1](%%REPO_URL%%/1993/dgibson/dgibson.data1) file)
|
||||
`datafile` is the initial pattern (default is the
|
||||
[dgibson.data1](%%REPO_URL%%/1993/dgibson/dgibson.data1) file).
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
@@ -406,7 +406,8 @@ Location: <a href="../../location.html#ZA">ZA</a> - <em>Republic of South Africa
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre><code> ./dgibson.sh [datafile]</code></pre>
|
||||
<p>where:</p>
|
||||
<p><code>datafile</code> is the initial pattern (default is the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data1">dgibson.data1</a> file)</p>
|
||||
<p><code>datafile</code> is the initial pattern (default is the
|
||||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data1">dgibson.data1</a> file).</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
|
||||
+3
-7
@@ -11,11 +11,7 @@
|
||||
./ejb level
|
||||
```
|
||||
|
||||
where:
|
||||
|
||||
``` <!---sh-->
|
||||
level a value from -128 to 127
|
||||
```
|
||||
where `level` is a value from `-128` to `127`.
|
||||
|
||||
|
||||
## Try:
|
||||
@@ -88,8 +84,8 @@ reasonably, however.)
|
||||
|
||||
Although this program has only been tested on UNIX systems it will probably run
|
||||
on just about any machine with an ANSI C compiler. It does not use the C
|
||||
preprocessor at all. The only functions it uses are `atoi()`, `malloc()`,
|
||||
`memset()`, `printf()`, and `puts()`. It does, however, require that the
|
||||
preprocessor at all. The only functions it uses are `atoi(3)`, `malloc(3)`,
|
||||
`memset(3)`, `printf(3)`, and `puts(3)`. It does, however, require that the
|
||||
architecture it runs on have bytes that are at least eight bits long and
|
||||
pointers that are at least four bytes long. In addition, it requires an ANSI
|
||||
compiler since it uses `signed char` and ANSI-style function declarations.
|
||||
|
||||
+3
-4
@@ -405,8 +405,7 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<pre><code> make all</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre><code> ./ejb level</code></pre>
|
||||
<p>where:</p>
|
||||
<pre><code> level a value from -128 to 127</code></pre>
|
||||
<p>where <code>level</code> is a value from <code>-128</code> to <code>127</code>.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
@@ -451,8 +450,8 @@ indented properly. (It is pretty hard to indent this code
|
||||
reasonably, however.)</p>
|
||||
<p>Although this program has only been tested on UNIX systems it will probably run
|
||||
on just about any machine with an ANSI C compiler. It does not use the C
|
||||
preprocessor at all. The only functions it uses are <code>atoi()</code>, <code>malloc()</code>,
|
||||
<code>memset()</code>, <code>printf()</code>, and <code>puts()</code>. It does, however, require that the
|
||||
preprocessor at all. The only functions it uses are <code>atoi(3)</code>, <code>malloc(3)</code>,
|
||||
<code>memset(3)</code>, <code>printf(3)</code>, and <code>puts(3)</code>. It does, however, require that the
|
||||
architecture it runs on have bytes that are at least eight bits long and
|
||||
pointers that are at least four bytes long. In addition, it requires an ANSI
|
||||
compiler since it uses <code>signed char</code> and ANSI-style function declarations.</p>
|
||||
|
||||
@@ -514,7 +514,7 @@ restoration of ring 1 and the removal of ring 3. This is
|
||||
because ring 1 is always movable, and ring 3 is currently
|
||||
the second ring still attached to the <code>U</code>. This constraint
|
||||
leads to a recursive solution to the puzzle. Like the
|
||||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/hanoi.md">Towers of Hanoi</a>, the number of steps to solve this puzzle is
|
||||
<a href="hanoi.html">Towers of Hanoi</a>, the number of steps to solve this puzzle is
|
||||
exponential in the number of rings.</p>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>Jump to: <a href="#">top</a></p>
|
||||
|
||||
@@ -139,7 +139,7 @@ restoration of ring 1 and the removal of ring 3. This is
|
||||
because ring 1 is always movable, and ring 3 is currently
|
||||
the second ring still attached to the `U`. This constraint
|
||||
leads to a recursive solution to the puzzle. Like the
|
||||
[Towers of Hanoi](%%REPO_URL%%/1993/ejb/hanoi.md), the number of steps to solve this puzzle is
|
||||
[Towers of Hanoi](hanoi.html), the number of steps to solve this puzzle is
|
||||
exponential in the number of rings.
|
||||
|
||||
|
||||
|
||||
+8
-8
@@ -405,14 +405,14 @@ classic K&R C was allowed so long as ANSI C compilers could still
|
||||
compile the entry. If you do not have an ANSI C compiler, you may
|
||||
not be able to compile the entry, sorry!</p>
|
||||
<h2 id="a-few-notes-regarding-future-contests">A few notes regarding future contests:</h2>
|
||||
<p>Be sure to wait until the 1994 rules are posted before submitting entries.
|
||||
Rules differ from year to year, sometimes in significant ways.</p>
|
||||
<p>In 1994, we will retract the guideline that discouraged the use of C
|
||||
constructs such as <code>3["curds"]</code>. At one time, certain ANSI compilers did
|
||||
not consider such expressions to be valid ANSI C. Alert readers noted
|
||||
that the current ANSI standard considered them to be valid. We were
|
||||
unable to find an ANSI C compiler that flagged such expressions as
|
||||
errors.</p>
|
||||
<p>Be sure to wait until the <a href="../1994/rules.txt">1994 rules</a> are posted before
|
||||
submitting entries. Rules differ from year to year, sometimes in significant
|
||||
ways.</p>
|
||||
<p>In <a href="../1994/index.html">1994</a>, we will retract the guideline that discouraged
|
||||
the use of C constructs such as <code>3["curds"]</code>. At one time, certain ANSI
|
||||
compilers did not consider such expressions to be valid ANSI C. Alert readers
|
||||
noted that the current ANSI standard considered them to be valid. We were
|
||||
unable to find an ANSI C compiler that flagged such expressions as errors.</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>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
## To build:
|
||||
|
||||
NOTE: this entry requires `X11/Xlib.h` header file and the X11 library to
|
||||
compile. macOS users running Mountain Lion and later will need to download and
|
||||
install [XQuartz](https://www.xquartz.org) in order to compile and run this
|
||||
entry.
|
||||
NOTE: this entry requires the `X11/Xlib.h` header file and the X11 library to
|
||||
compile. See [the FAQ on how to run entries that require X11](../../faq.html#X11) if
|
||||
you need help.
|
||||
|
||||
|
||||
``` <!---sh-->
|
||||
make all
|
||||
@@ -30,7 +30,7 @@ on inverse video. :-)
|
||||
|
||||
This is `jonth` (`jon's t(h)etris`) for the X Window System.
|
||||
|
||||
This program is also an example of data abstraction. The X array is
|
||||
This program is also an example of data abstraction. The `X` array is
|
||||
after initialization hidden by the well defined macros `t`, `u` and `F`.
|
||||
|
||||
This program is highly portable as it runs on a "Notebook" size SPARC.
|
||||
|
||||
@@ -402,10 +402,9 @@ Location: <a href="../../location.html#NO">NO</a> - <em>Kingdom of Norway</em> (
|
||||
|
||||
<!-- BEFORE: 1st line of markdown file: 1993/jonth/README.md -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>NOTE: this entry requires <code>X11/Xlib.h</code> header file and the X11 library to
|
||||
compile. macOS users running Mountain Lion and later will need to download and
|
||||
install <a href="https://www.xquartz.org">XQuartz</a> in order to compile and run this
|
||||
entry.</p>
|
||||
<p>NOTE: this entry requires the <code>X11/Xlib.h</code> header file and the X11 library to
|
||||
compile. See <a href="../../faq.html#X11">the FAQ on how to run entries that require X11</a> if
|
||||
you need help.</p>
|
||||
<pre><code> make all</code></pre>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre><code> ./jonth # must be run on an X11 server</code></pre>
|
||||
@@ -416,7 +415,7 @@ rotate and press SPACE to drop.</p>
|
||||
on inverse video. :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This is <code>jonth</code> (<code>jon's t(h)etris</code>) for the X Window System.</p>
|
||||
<p>This program is also an example of data abstraction. The X array is
|
||||
<p>This program is also an example of data abstraction. The <code>X</code> array is
|
||||
after initialization hidden by the well defined macros <code>t</code>, <code>u</code> and <code>F</code>.</p>
|
||||
<p>This program is highly portable as it runs on a “Notebook” size SPARC.
|
||||
This program will not work on machines where <code>sizeof(int)!=sizeof(void *)</code>.</p>
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ International Internet community.
|
||||
|
||||
This program plays
|
||||
[Mastermind](https://en.wikipedia.org/wiki/Mastermind_(board_game)), if you call
|
||||
it by a name ending by 'd', otherwise it _solves_ Mastermind. Call it without
|
||||
it by a name ending by `d`, otherwise it _solves_ Mastermind. Call it without
|
||||
parameters to use 6 digits (colors), or indicate the number of possible digits
|
||||
(you cannot change the number of positions so easily).
|
||||
|
||||
@@ -66,7 +66,7 @@ backspaces. Do "disable scrolling" on cmdtool or similar emulators.
|
||||
|
||||
#### Bugs
|
||||
|
||||
Please don't type ^D at the prompt!!
|
||||
Please don't type `^D` at the prompt!!
|
||||
|
||||
|
||||
##### EXAMPLE: Suppose we think of 1234
|
||||
|
||||
+2
-2
@@ -419,7 +419,7 @@ International Internet community.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program plays
|
||||
<a href="https://en.wikipedia.org/wiki/Mastermind_(board_game)">Mastermind</a>, if you call
|
||||
it by a name ending by ‘d’, otherwise it <em>solves</em> Mastermind. Call it without
|
||||
it by a name ending by <code>d</code>, otherwise it <em>solves</em> Mastermind. Call it without
|
||||
parameters to use 6 digits (colors), or indicate the number of possible digits
|
||||
(you cannot change the number of positions so easily).</p>
|
||||
<p>The number in parentheses is the number of possible combinations,
|
||||
@@ -439,7 +439,7 @@ of binary coded colors-base numbers is.</p>
|
||||
<p>Suggestions: Use terminal (or emulator) with non-destructive
|
||||
backspaces. Do “disable scrolling” on cmdtool or similar emulators.</p>
|
||||
<h4 id="bugs">Bugs</h4>
|
||||
<p>Please don’t type ^D at the prompt!!</p>
|
||||
<p>Please don’t type <code>^D</code> at the prompt!!</p>
|
||||
<h5 id="example-suppose-we-think-of-1234">EXAMPLE: Suppose we think of 1234</h5>
|
||||
<pre><code> $ ./leo
|
||||
(1296): 6433
|
||||
|
||||
@@ -28,9 +28,8 @@ _a long time ago_ (.. _in a galaxy far, far away_?).
|
||||
|
||||
If `make all` fails to compile, a suggestion of compiling and running
|
||||
the alternate version is printed. This alternate version is a variant
|
||||
for [those of us](https://www.collinsdictionary.com/dictionary/english/everyone)
|
||||
with gcc >= 2.3.3 or using clang. See [Alternate code](#alternate-code)
|
||||
section below for more details.
|
||||
for those of us with gcc >= 2.3.3 or using clang. See [Alternate
|
||||
code](#alternate-code) section below for more details.
|
||||
|
||||
|
||||
### Bugs and (Mis)features:
|
||||
@@ -57,7 +56,6 @@ If you have gcc < 2.3.3 (i.e. the entry can compile):
|
||||
|
||||
This version does what the code did but in a way that will work with modern
|
||||
compilers. We'd like to say there's something special about it but there isn't.
|
||||
Nonetheless it will be compiled in case the original entry fails to compile.
|
||||
|
||||
|
||||
### Alternate build:
|
||||
@@ -201,7 +199,7 @@ These failed miserably:
|
||||
- `dbx` - Quit with a very 'informative' error message:
|
||||
`"dbx: fatal error: Is a directory"`
|
||||
|
||||
- gdb - Printed almost the same error message `": Is a directory"`.
|
||||
- `gdb` - Printed almost the same error message `": Is a directory"`.
|
||||
It was, however, possible to step through the code but
|
||||
not list it.
|
||||
|
||||
|
||||
@@ -418,9 +418,8 @@ on a bug which was later fixed in gcc 2.3.3, and that happened
|
||||
<em>a long time ago</em> (.. <em>in a galaxy far, far away</em>?).</p>
|
||||
<p>If <code>make all</code> fails to compile, a suggestion of compiling and running
|
||||
the alternate version is printed. This alternate version is a variant
|
||||
for <a href="https://www.collinsdictionary.com/dictionary/english/everyone">those of us</a>
|
||||
with gcc >= 2.3.3 or using clang. See <a href="#alternate-code">Alternate code</a>
|
||||
section below for more details.</p>
|
||||
for those of us with gcc >= 2.3.3 or using clang. See <a href="#alternate-code">Alternate
|
||||
code</a> section below for more details.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code> STATUS: INABIAF - please DO NOT fix</code></pre>
|
||||
@@ -430,8 +429,7 @@ section below for more details.</p>
|
||||
<pre><code> ./lmfjyh</code></pre>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This version does what the code did but in a way that will work with modern
|
||||
compilers. We’d like to say there’s something special about it but there isn’t.
|
||||
Nonetheless it will be compiled in case the original entry fails to compile.</p>
|
||||
compilers. We’d like to say there’s something special about it but there isn’t.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>Should you wish to build this version manually:</p>
|
||||
<pre><code> make alt</code></pre>
|
||||
@@ -518,7 +516,7 @@ with some older UNIX variants).</p>
|
||||
<ul>
|
||||
<li><p><code>dbx</code> - Quit with a very ‘informative’ error message:
|
||||
<code>"dbx: fatal error: Is a directory"</code></p></li>
|
||||
<li><p>gdb - Printed almost the same error message <code>": Is a directory"</code>.
|
||||
<li><p><code>gdb</code> - Printed almost the same error message <code>": Is a directory"</code>.
|
||||
It was, however, possible to step through the code but
|
||||
not list it.</p></li>
|
||||
</ul>
|
||||
|
||||
@@ -64,8 +64,7 @@ bypass](https://hitchhikers.fandom.com/wiki/Bypass).
|
||||
## Original code:
|
||||
|
||||
This version, the original, does not sleep in between writes, and is thus much
|
||||
faster (depending on the `SLEEP` parameter specified in the build of `alt`, of
|
||||
course).
|
||||
faster, at least with modern systems.
|
||||
|
||||
|
||||
### Original build:
|
||||
@@ -117,7 +116,7 @@ but must be present.
|
||||
Variable names are single characters chosen for their similarity to other
|
||||
characters (`O` for `0` (zero), `l` for `1` (one), `S` for `5` (five) in some
|
||||
fonts, and `_` for ... well nothing really, but it is easy to miss). To
|
||||
prevent the need for `strlen()`, the fact that argv is laid out sequentially is
|
||||
prevent the need for `strlen(3)`, the fact that argv is laid out sequentially is
|
||||
exploited (i.e. `argv[i + 1] == argv[i] + strlen(argv[i]) + 1`). This is not
|
||||
portable (by the books), but it seems to work everywhere I try (actually, for
|
||||
VMS, that only holds for `i > 1`). Also, I depend on the fact that a carriage
|
||||
@@ -131,11 +130,11 @@ who don't mind ruining our eyes with 132 column screens).
|
||||
The first statement points the base of `l` (the argument vector) to
|
||||
be the first argument by incrementing it. It then assigns `O` to
|
||||
point to the character before the first character of the second
|
||||
argument which also happens to be the NUL termination of the first
|
||||
argument which also happens to be the `NUL` termination of the first
|
||||
argument. `*O` gets a `\r` assigned to it. Finally `0` is assigned to
|
||||
the first character of the second argument which has the effect of
|
||||
NUL terminating the first argument after the carriage return had
|
||||
removed its NUL termination. I really tried to make the last part
|
||||
`NUL` terminating the first argument after the carriage return had
|
||||
removed its `NUL` termination. I really tried to make the last part
|
||||
of that statement part of the original expression, but the best I
|
||||
could do was attach it with a comma (against the advice of K&R).
|
||||
The for loop runs the next for loop continuously (actually until
|
||||
|
||||
@@ -441,8 +441,7 @@ bypass</a>.</p>
|
||||
SLEEP=1200 ./try.alt.sh xyzzyzzyx 5555</code></pre>
|
||||
<h2 id="original-code">Original code:</h2>
|
||||
<p>This version, the original, does not sleep in between writes, and is thus much
|
||||
faster (depending on the <code>SLEEP</code> parameter specified in the build of <code>alt</code>, of
|
||||
course).</p>
|
||||
faster, at least with modern systems.</p>
|
||||
<h3 id="original-build">Original build:</h3>
|
||||
<pre><code> make all</code></pre>
|
||||
<h3 id="original-use">Original use:</h3>
|
||||
@@ -474,7 +473,7 @@ but must be present.</p>
|
||||
<p>Variable names are single characters chosen for their similarity to other
|
||||
characters (<code>O</code> for <code>0</code> (zero), <code>l</code> for <code>1</code> (one), <code>S</code> for <code>5</code> (five) in some
|
||||
fonts, and <code>_</code> for … well nothing really, but it is easy to miss). To
|
||||
prevent the need for <code>strlen()</code>, the fact that argv is laid out sequentially is
|
||||
prevent the need for <code>strlen(3)</code>, the fact that argv is laid out sequentially is
|
||||
exploited (i.e. <code>argv[i + 1] == argv[i] + strlen(argv[i]) + 1</code>). This is not
|
||||
portable (by the books), but it seems to work everywhere I try (actually, for
|
||||
VMS, that only holds for <code>i > 1</code>). Also, I depend on the fact that a carriage
|
||||
@@ -486,11 +485,11 @@ who don’t mind ruining our eyes with 132 column screens).</p>
|
||||
<p>The first statement points the base of <code>l</code> (the argument vector) to
|
||||
be the first argument by incrementing it. It then assigns <code>O</code> to
|
||||
point to the character before the first character of the second
|
||||
argument which also happens to be the NUL termination of the first
|
||||
argument which also happens to be the <code>NUL</code> termination of the first
|
||||
argument. <code>*O</code> gets a <code>\r</code> assigned to it. Finally <code>0</code> is assigned to
|
||||
the first character of the second argument which has the effect of
|
||||
NUL terminating the first argument after the carriage return had
|
||||
removed its NUL termination. I really tried to make the last part
|
||||
<code>NUL</code> terminating the first argument after the carriage return had
|
||||
removed its <code>NUL</code> termination. I really tried to make the last part
|
||||
of that statement part of the original expression, but the best I
|
||||
could do was attach it with a comma (against the advice of K&R).
|
||||
The for loop runs the next for loop continuously (actually until
|
||||
|
||||
@@ -78,7 +78,8 @@ The author has provided several CABBAGE files for your amusement:
|
||||
for left, `/` for right, and `.` for 'fire the ball'.
|
||||
|
||||
- [rince.data2](%%REPO_URL%%/1993/rince/rince.data2) plays the old [James Bonfield](../../authors.html#James_Bonfield)'s
|
||||
([1991/rince](../../1991/rince/index.html) game from IOCCC 1991.
|
||||
([1991/rince](../../1991/rince/index.html) game from [IOCCC
|
||||
1991](../../1991/index.html)).
|
||||
|
||||
- [rince.data3](%%REPO_URL%%/1993/rince/rince.data3) Sokoban screen 11. You are the `o` character.
|
||||
You must push the money `m` into the dotted region of the screen. The game is
|
||||
@@ -166,7 +167,7 @@ conflict of the two).
|
||||
The use of `select(2)` no doubt makes it less portable to STRICT SysV machines.
|
||||
However I have tested this on several so-called SysV machines, and all of them
|
||||
support `select(2)`. In fact, the `select(2)` they support appears to be more
|
||||
portable between them than their `poll()` call.
|
||||
portable between them than their `poll(2)` call.
|
||||
|
||||
|
||||
### Obfuscation
|
||||
@@ -174,11 +175,11 @@ portable between them than their `poll()` call.
|
||||
I have tried to use as many different obfuscation techniques, including
|
||||
some of which (such as `sizeof` confusion) I have not seen in any entries
|
||||
(hmmm - perhaps there's a reason for that...) so far. Also, very poor
|
||||
structure (yes, I use `goto`'s) has led to apparently having an `fgets()` as
|
||||
structure (yes, I use `goto`'s) has led to apparently having an `fgets(3)` as
|
||||
the last line of main. Note that I have still tried to aim at least some
|
||||
efficiency (provided it makes things slightly more obfuscated of course).
|
||||
One such thing is the way I dynamically allocate a 2-dimensional array
|
||||
using only ONE `malloc()`. Hence this program could be used as a tutorial
|
||||
using only ONE `malloc(3)`. Hence this program could be used as a tutorial
|
||||
for all those people who consistently ask this question in the C
|
||||
newsgroups.
|
||||
|
||||
|
||||
@@ -437,7 +437,8 @@ changed).</p>
|
||||
<a href="https://en.wikipedia.org/wiki/Breakout_(video_game)">Breakout</a>. Keys are <code>,</code>
|
||||
for left, <code>/</code> for right, and <code>.</code> for ‘fire the ball’.</p></li>
|
||||
<li><p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data2">rince.data2</a> plays the old <a href="../../authors.html#James_Bonfield">James Bonfield</a>’s
|
||||
(<a href="../../1991/rince/index.html">1991/rince</a> game from IOCCC 1991.</p></li>
|
||||
(<a href="../../1991/rince/index.html">1991/rince</a> game from <a href="../../1991/index.html">IOCCC
|
||||
1991</a>).</p></li>
|
||||
<li><p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data3">rince.data3</a> Sokoban screen 11. You are the <code>o</code> character.
|
||||
You must push the money <code>m</code> into the dotted region of the screen. The game is
|
||||
considered finished when all the <code>m</code>s are then <code>M</code>s.</p></li>
|
||||
@@ -496,16 +497,16 @@ conflict of the two).</p>
|
||||
<p>The use of <code>select(2)</code> no doubt makes it less portable to STRICT SysV machines.
|
||||
However I have tested this on several so-called SysV machines, and all of them
|
||||
support <code>select(2)</code>. In fact, the <code>select(2)</code> they support appears to be more
|
||||
portable between them than their <code>poll()</code> call.</p>
|
||||
portable between them than their <code>poll(2)</code> call.</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>I have tried to use as many different obfuscation techniques, including
|
||||
some of which (such as <code>sizeof</code> confusion) I have not seen in any entries
|
||||
(hmmm - perhaps there’s a reason for that…) so far. Also, very poor
|
||||
structure (yes, I use <code>goto</code>’s) has led to apparently having an <code>fgets()</code> as
|
||||
structure (yes, I use <code>goto</code>’s) has led to apparently having an <code>fgets(3)</code> as
|
||||
the last line of main. Note that I have still tried to aim at least some
|
||||
efficiency (provided it makes things slightly more obfuscated of course).
|
||||
One such thing is the way I dynamically allocate a 2-dimensional array
|
||||
using only ONE <code>malloc()</code>. Hence this program could be used as a tutorial
|
||||
using only ONE <code>malloc(3)</code>. Hence this program could be used as a tutorial
|
||||
for all those people who consistently ask this question in the C
|
||||
newsgroups.</p>
|
||||
<p>Also, the program does require a volatile type (especially when
|
||||
|
||||
@@ -79,7 +79,7 @@ The author suggests the following questions when using
|
||||
- Do colorless green ideas sleep furiously?
|
||||
|
||||
We suggest you try using the body (minus the header and signature line)
|
||||
of a Usenet article. You might want to try something from alt.flame. :-)
|
||||
of a Usenet article. You might want to try something from _alt.flame_. :-)
|
||||
|
||||
NOTE: If you have certain `'` in the question this entry might fail.
|
||||
|
||||
|
||||
@@ -443,7 +443,7 @@ some questions related to the text.</p>
|
||||
<li>Do colorless green ideas sleep furiously?</li>
|
||||
</ul>
|
||||
<p>We suggest you try using the body (minus the header and signature line)
|
||||
of a Usenet article. You might want to try something from alt.flame. :-)</p>
|
||||
of a Usenet article. You might want to try something from <em>alt.flame</em>. :-)</p>
|
||||
<p>NOTE: If you have certain <code>'</code> in the question this entry might fail.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>I wanted to write a program that would read in a text file in
|
||||
|
||||
@@ -1297,7 +1297,7 @@ the index.html file for details.</p>
|
||||
<h3 id="information-1993rinceindex.html">Information: <a href="1993/rince/index.html">1993/rince/index.html</a></h3>
|
||||
<p>Although the code checks if the file can be opened or not, badly formatted files
|
||||
will cause problems. No other checks are performed either.</p>
|
||||
<p>There is no end of game checking method so you will have to quit the game
|
||||
<p>There is no end of game checking function so you will have to quit the game
|
||||
through ctrl-c or such.</p>
|
||||
<div id="1993_schnitzi">
|
||||
<h2 id="schnitzi">1993/schnitzi</h2>
|
||||
|
||||
@@ -1313,7 +1313,7 @@ the index.html file for details.
|
||||
Although the code checks if the file can be opened or not, badly formatted files
|
||||
will cause problems. No other checks are performed either.
|
||||
|
||||
There is no end of game checking method so you will have to quit the game
|
||||
There is no end of game checking function so you will have to quit the game
|
||||
through ctrl-c or such.
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user