Many README.md files updated
Formatting and other notes. Many more need to be checked for this but I wanted these changes out of the way of git status to try and clean my working changes.
This commit is contained in:
1 parent
626304242f
commit
a68a5d4d18
17 files changed
+381
-327
No files matched your search
+41
-40
@@ -12,65 +12,66 @@
|
||||
|
||||
### To run
|
||||
|
||||
If lpr on your system can print PostScript:
|
||||
If lpr on your system can print PostScript:
|
||||
|
||||
./bas1 | gunzip | lpr
|
||||
|
||||
else, while in X Window System,
|
||||
else, while in X Window System,
|
||||
|
||||
./bas1 | gunzip | gv -
|
||||
or:
|
||||
or:
|
||||
|
||||
./bas1 | gunzip | gs -sDEVICE=pgmraw -sOutputFile='|xv -' -
|
||||
|
||||
## Judges' comments
|
||||
|
||||
The output is supposed to be a 3D maze, but it is somewhat more
|
||||
than that. If you've seen any of the Maurits Escher's works,
|
||||
you'll know what we're talking about.
|
||||
The output is supposed to be a 3D maze, but it is somewhat more
|
||||
than that. If you've seen any of the Maurits Escher's works,
|
||||
you'll know what we're talking about.
|
||||
|
||||
When trying to run the program with command line arguments, be generous.
|
||||
When trying to run the program with command line arguments, be generous.
|
||||
|
||||
## Author's comments
|
||||
|
||||
BEMAZING
|
||||
========
|
||||
BEMAZING
|
||||
========
|
||||
|
||||
"You're in a twisty little maze of beams, all different."
|
||||
"You're in a twisty little maze of beams, all different."
|
||||
|
||||
Bemazing is "amazing" taken one step (letter) further. Bemazing
|
||||
creates a 3D maze of beams. Try to go from the entrance (the
|
||||
unfinished beam in one corner) to the exit (the unfinished beam in the
|
||||
opposite corner) or vice versa.
|
||||
Bemazing is "amazing" taken one step (letter) further. Bemazing
|
||||
creates a 3D maze of beams. Try to go from the entrance (the
|
||||
unfinished beam in one corner) to the exit (the unfinished beam in the
|
||||
opposite corner) or vice versa.
|
||||
|
||||
For maximum portability, Bemazing is not tied to any window system,
|
||||
but creates postscript. The picture it makes will fit on either A4 or
|
||||
letter size paper.
|
||||
For maximum portability, Bemazing is not tied to any window system,
|
||||
but creates postscript. The picture it makes will fit on either A4 or
|
||||
letter size paper.
|
||||
|
||||
In addition, because postscript is rather verbose, Bemazing creates
|
||||
the postscript in gzip format, in order to save precious bits on your
|
||||
hard disk for the latest version of GNU Emacs (after all, you wouldn't
|
||||
want to use an editor without a psychoanalyze-pinhead function, now
|
||||
would you). Again for maximum portability, Bemazing will take special
|
||||
care that the binary output will not contain any newline or return
|
||||
characters that may get weird treatment on systems that do not use the
|
||||
One True Line Separator.
|
||||
In addition, because postscript is rather verbose, Bemazing creates
|
||||
the postscript in gzip format, in order to save precious bits on your
|
||||
hard disk for the latest version of GNU Emacs (after all, you wouldn't
|
||||
want to use an editor without a psychoanalyze-pinhead function, now
|
||||
would you). Again for maximum portability, Bemazing will take special
|
||||
care that the binary output will not contain any newline or return
|
||||
characters that may get weird treatment on systems that do not use the
|
||||
One True Line Separator.
|
||||
|
||||
NOTES
|
||||
=====
|
||||
NOTES
|
||||
=====
|
||||
|
||||
Be sure to view the source with something that can display characters
|
||||
\240-\377. Use LESSCHARSET=latin1, M-x standard-display-european in
|
||||
GNU Emacs etc. The source does not use characters in the range
|
||||
\200-\237 (we are not an unnamed word processor that tends to create
|
||||
HTML containing these control characters).
|
||||
Be sure to view the source with something that can display characters
|
||||
`\240-\377`. Use `LESSCHARSET=latin1`, `M-x` `standard-display-european` in
|
||||
GNU Emacs etc. The source does not use characters in the range
|
||||
`\200-\237` (we are not an unnamed word processor that tends to create
|
||||
HTML containing these control characters).
|
||||
|
||||
Because this is not the obfuscated postscript contest, the postscript
|
||||
does not contain any "for", "if" or other control structures. All the
|
||||
logic is in the C code. There are only a few straightforward "def"s,
|
||||
because otherwise the output would become much larger.
|
||||
Because this is not the obfuscated postscript contest, the postscript
|
||||
does not contain any "for", "if" or other control structures. All the
|
||||
logic is in the C code. There are only a few straightforward "def"s,
|
||||
because otherwise the output would become much larger.
|
||||
|
||||
Try running Bemazing with command line arguments and see what
|
||||
happens. (But note that the program only guarantees that there
|
||||
actually is a route from entrance to exit if you run it without
|
||||
command line arguments.)
|
||||
Try running `Bemazing` with command line arguments and see what
|
||||
happens. (But note that the program only guarantees that there
|
||||
actually is a route from entrance to exit if you run it without
|
||||
command line arguments.)
|
||||
|
||||
+21
-21
@@ -10,38 +10,38 @@
|
||||
|
||||
make all
|
||||
|
||||
### To run
|
||||
### To run:
|
||||
|
||||
./bas2 < bas2.c
|
||||
|
||||
## Judges' comments
|
||||
## Judges' comments:
|
||||
|
||||
Questions to ponder:
|
||||
### Questions to ponder:
|
||||
|
||||
Can you determine the relationship between the input and the
|
||||
resulting numeric output?
|
||||
Can you determine the relationship between the input and the
|
||||
resulting numeric output?
|
||||
|
||||
The program was not designed to process files with a certain
|
||||
octet value, what value is that?
|
||||
The program was not designed to process files with a certain
|
||||
octet value, what value is that?
|
||||
|
||||
Hint and Extra Credit:
|
||||
### Hint and Extra Credit:
|
||||
|
||||
This entry points our a minor flaw in the IOCCC rules that has
|
||||
been around since 1992. It processes a certain octet value in
|
||||
a way that differs from a strict reading of one of the
|
||||
official IOCCC rules. What is the rule and what is the octet
|
||||
value?
|
||||
This entry points our a minor flaw in the IOCCC rules that has
|
||||
been around since 1992. It processes a certain octet value in
|
||||
a way that differs from a strict reading of one of the
|
||||
official IOCCC rules. What is the rule and what is the octet
|
||||
value?
|
||||
|
||||
## Author's comments
|
||||
## Author's comments:
|
||||
|
||||
The main obfuscation is the way characters are recognized, which is
|
||||
done by matching the bit patterns. Minor obfuscations are:
|
||||
The main obfuscation is the way characters are recognized, which is
|
||||
done by matching the bit patterns. Minor obfuscations are:
|
||||
|
||||
- Useless layout.
|
||||
- Useless layout.
|
||||
|
||||
- Useless variable names.
|
||||
- Useless variable names.
|
||||
|
||||
- Recursive main() instead of 2 loops (over input characters and over
|
||||
bits in the character).
|
||||
- Recursive main() instead of 2 loops (over input characters and over bits in
|
||||
the character).
|
||||
|
||||
- ? and || instead of if statements.
|
||||
- ? and || instead of if statements.
|
||||
+50
-48
@@ -1,4 +1,4 @@
|
||||
Best Object Orientation:
|
||||
# Best Object Orientation:
|
||||
|
||||
Alan De Smet
|
||||
8531 Greenway Blvd. #206
|
||||
@@ -8,70 +8,72 @@ Best Object Orientation:
|
||||
http://www.upl.cs.wisc.edu/~chaos/
|
||||
|
||||
|
||||
Judge's Comments:
|
||||
|
||||
To build:
|
||||
## To build:
|
||||
|
||||
make chaos
|
||||
|
||||
To use:
|
||||
|
||||
./chaos
|
||||
|
||||
This is the authors first IOCCC entry. We thought the entry was
|
||||
a nice example of a compact collection of obfuscations.
|
||||
|
||||
Can you figure our why, in some cases, it wants to read itself?
|
||||
|
||||
Some systems do not implement halfdelay() in their libcurses.
|
||||
You might try compiling with -lncurses of you have that library.
|
||||
Or you can build this entry without the halfdelay() call by:
|
||||
NOTE: Some systems do not implement `halfdelay()` in their `libcurses`.
|
||||
You might try compiling with -lncurses of you have that library.
|
||||
Or you can build this entry without the `halfdelay()` call by:
|
||||
|
||||
make chaos_nohalf
|
||||
|
||||
|
||||
Selected Author's Comments:
|
||||
## To run:
|
||||
|
||||
|
||||
* Usage
|
||||
./chaos
|
||||
|
||||
The executable takes a single argument for the data file to use.
|
||||
If no argument is given, it will find a data file by itself, don't
|
||||
worry about it...
|
||||
## Judge's Comments:
|
||||
|
||||
This is the author's first IOCCC entry. We thought the entry was
|
||||
a nice example of a compact collection of obfuscations.
|
||||
|
||||
Can you figure our why, in some cases, it wants to read itself?
|
||||
|
||||
|
||||
* Summary
|
||||
|
||||
This is a simple ncurses 3D object viewer. The keys 'y', 'u', 'i',
|
||||
'h', 'j', and 'k' rotate. 'a' and 'z' zoom in and out. 'q' quits.
|
||||
Given about 3 seconds of no input, it will start rotating until
|
||||
interrupted by user input.
|
||||
## Selected Author's Comments:
|
||||
|
||||
|
||||
* Features (aka Bugs):
|
||||
### Usage
|
||||
|
||||
Memory malloced is never freed. This shouldn't be a big deal,
|
||||
since only one block is ever allocated, and the OS should recover it.
|
||||
The executable takes a single argument for the data file to use.
|
||||
If no argument is given, it will find a data file by itself, don't
|
||||
worry about it...
|
||||
|
||||
My local flavor of lint doesn't seem to like the fact that I never
|
||||
"return" from main. Feh, what does it know? Otherwise, ignoring
|
||||
lint's over protectiveness ("Of course I'm not using all of the
|
||||
functions defined in curses.h!"), it's lint clean.
|
||||
|
||||
If the compiler happens to generate the byte sequence "AlWuzEre"
|
||||
in the executable by chance, the program may be unable to locate
|
||||
the embedded string. As a result, running the program without an
|
||||
external data file may act in undefined ways.
|
||||
### Summary
|
||||
|
||||
If the compiler doesn't store char * P's data in a nice contiguous
|
||||
stream, it would be bad. As above, it would break running the
|
||||
program without an external data file.
|
||||
This is a simple ncurses 3D object viewer. The keys 'y', 'u', 'i',
|
||||
'h', 'j', and 'k' rotate. 'a' and 'z' zoom in and out. 'q' quits.
|
||||
Given about 3 seconds of no input, it will start rotating until
|
||||
interrupted by user input.
|
||||
|
||||
If the incoming data is corrupt, the results are undefined.
|
||||
(Although dumping core is a popular result.)
|
||||
|
||||
When a point passes behind the camera, it is still plotted.
|
||||
The object will "bounce" off the camera, but the result (some points
|
||||
in front, some reflected from the rear) looks really odd. And it
|
||||
sometimes hangs. So just don't fly through objects. You'll be
|
||||
happier.
|
||||
### Features (aka Bugs):
|
||||
|
||||
Memory malloced is never freed. This shouldn't be a big deal,
|
||||
since only one block is ever allocated, and the OS should recover it.
|
||||
|
||||
My local flavor of lint doesn't seem to like the fact that I never
|
||||
"return" from main. Feh, what does it know? Otherwise, ignoring
|
||||
lint's over protectiveness ("Of course I'm not using all of the
|
||||
functions defined in curses.h!"), it's lint clean.
|
||||
|
||||
If the compiler happens to generate the byte sequence "AlWuzEre"
|
||||
in the executable by chance, the program may be unable to locate
|
||||
the embedded string. As a result, running the program without an
|
||||
external data file may act in undefined ways.
|
||||
|
||||
If the compiler doesn't store `char * P`'s data in a nice contiguous
|
||||
stream, it would be bad. As above, it would break running the
|
||||
program without an external data file.
|
||||
|
||||
If the incoming data is corrupt, the results are undefined.
|
||||
(Although dumping core is a popular result.)
|
||||
|
||||
When a point passes behind the camera, it is still plotted.
|
||||
The object will "bounce" off the camera, but the result (some points
|
||||
in front, some reflected from the rear) looks really odd. And it
|
||||
sometimes hangs. So just don't fly through objects. You'll be
|
||||
happier.
|
||||
+106
-104
@@ -10,133 +10,135 @@
|
||||
|
||||
make all
|
||||
|
||||
### To run
|
||||
### To run:
|
||||
|
||||
./df
|
||||
|
||||
## Judges' comments
|
||||
## Judges' comments;
|
||||
|
||||
Everyone talks about how data hiding can produce clearer code; I am
|
||||
pleased to offer this charming refutation.
|
||||
Everyone talks about how data hiding can produce clearer code; I am
|
||||
pleased to offer this charming refutation.
|
||||
|
||||
The program is a simple game. A bit of observation reveals that the
|
||||
game has some data - but where? It's unclear which of the contents of
|
||||
the program are used.
|
||||
The program is a simple game. A bit of observation reveals that the
|
||||
game has some data - but where? It's unclear which of the contents of
|
||||
the program are used.
|
||||
|
||||
Curiously, the program only works if its source is in the directory
|
||||
it's run in. More curiously, the program will fail if the program's
|
||||
name's second letter isn't "r" (the source has been changed for your
|
||||
convenience and this restriction does no longer exist).
|
||||
Curiously, the program only works if its source is in the directory
|
||||
it's run in. More curiously, the program will fail if the program's
|
||||
name's second letter isn't "r" (the source has been changed for your
|
||||
convenience and this restriction does no longer exist).
|
||||
|
||||
Modern design has come a long way since the unreadable, tightly-coupled
|
||||
systems we used to have.
|
||||
Modern design has come a long way since the unreadable, tightly-coupled
|
||||
systems we used to have.
|
||||
|
||||
Extra credit questions:
|
||||
Extra credit questions:
|
||||
|
||||
Where are the words stored?
|
||||
How many words does this entry use?
|
||||
Can you add more words to the program and still make it work?
|
||||
- Where are the words stored?
|
||||
- How many words does this entry use?
|
||||
- Can you add more words to the program and still make it work?
|
||||
|
||||
## Author's comments
|
||||
|
||||
This program lets you guess English words. It displays an underscore
|
||||
for each letter in the word; guessing a letter that actually is in
|
||||
the word replaces the corresponding underscores with the letter
|
||||
itself. You can guess a letter simply by typing it in. If your C
|
||||
implementation requires it, you may have to hit Return before it
|
||||
is recognized. In this case, you can also type multiple guesses
|
||||
on the same line (completely solve it by entering
|
||||
"abcdefghijklmnopqrstuvwxyz"). Execution stops when all underscores
|
||||
have been replaced.
|
||||
This program lets you guess English words. It displays an underscore
|
||||
for each letter in the word; guessing a letter that actually is in
|
||||
the word replaces the corresponding underscores with the letter
|
||||
itself. You can guess a letter simply by typing it in. If your C
|
||||
implementation requires it, you may have to hit Return before it
|
||||
is recognized. In this case, you can also type multiple guesses
|
||||
on the same line (completely solve it by entering
|
||||
"abcdefghijklmnopqrstuvwxyz"). Execution stops when all underscores
|
||||
have been replaced.
|
||||
|
||||
The program offers a number of different words to guess, time() is
|
||||
used to pick one at random. All words are eight characters long.
|
||||
The program offers a number of different words to guess, time() is
|
||||
used to pick one at random. All words are eight characters long.
|
||||
|
||||
The source should compile with any ANSI C compiler (I used CodeWarrior
|
||||
w/ ANSI strict). Using non-ANSI compilers that implement the ANSI
|
||||
features it uses will not work (unless they defined __STDC__ 1
|
||||
which they shouldn't). Due to space restrictions, I did not use
|
||||
any trigraph sequences. It does not require any special -D defines.
|
||||
The source should compile with any ANSI C compiler (I used CodeWarrior
|
||||
w/ ANSI strict). Using non-ANSI compilers that implement the ANSI
|
||||
features it uses will not work (unless they defined `__STDC__ 1`
|
||||
which they shouldn't). Due to space restrictions, I did not use
|
||||
any trigraph sequences. It does not require any special -D defines.
|
||||
|
||||
The source passes lint without any complaint (if invoked with
|
||||
>/dev/null). (My lclint is unable to recover from some parts of it.)
|
||||
The source passes lint without any complaint (if invoked with
|
||||
`>/dev/null`). (My lclint is unable to recover from some parts of it.)
|
||||
|
||||
Actually, the code not only is compliant with the ANSI specifications,
|
||||
but uses a near minimum subset of them. C keywords that were not
|
||||
used have been re(de)fined to avoid unnecessary introduction of
|
||||
new, unknown character patterns. The source also includes all ANSI
|
||||
headers it needs (after most of the functions have been used), and
|
||||
the declaration of main() follows the guidelines (but the return
|
||||
type has a different meaning and the arguments are either mis- or
|
||||
unused). There also may be some compiler warnings. These are not
|
||||
bugs, but features. The more warnings, the better the compiler.
|
||||
There wouldn't be any if I had been allowed to use some extra space
|
||||
for prototypes etc.
|
||||
Actually, the code not only is compliant with the ANSI specifications,
|
||||
but uses a near minimum subset of them. C keywords that were not
|
||||
used have been re(de)fined to avoid unnecessary introduction of
|
||||
new, unknown character patterns. The source also includes all ANSI
|
||||
headers it needs (after most of the functions have been used), and
|
||||
the declaration of main() follows the guidelines (but the return
|
||||
type has a different meaning and the arguments are either mis- or
|
||||
unused). There also may be some compiler warnings. These are not
|
||||
bugs, but features. The more warnings, the better the compiler.
|
||||
There wouldn't be any if I had been allowed to use some extra space
|
||||
for prototypes etc.
|
||||
|
||||
Multiple defines are used (but not all of them define), and #define
|
||||
y define is used with #y but the code doesn't assume #y to expand
|
||||
to #define. I have also included comments in the code, and vital
|
||||
code in the comments. And of course there is code that doesn't do
|
||||
anything but will crash the program if it is removed (just like
|
||||
those comments I mentioned above). Additionally, since you said
|
||||
you'd be preprocessing entries ignoring includes I figured I should
|
||||
use some more of them instead of other obfuscation methods. Did
|
||||
I mention that preprocessed or beautified sources will crash or
|
||||
hang your system? The program will also crash on non-ASCII machines.
|
||||
Multiple defines are used (but not all of them define), and `#define
|
||||
y define` is used with `#y` but the code doesn't assume `#y` to expand
|
||||
to `#define`. I have also included comments in the code, and vital
|
||||
code in the comments. And of course there is code that doesn't do
|
||||
anything but will crash the program if it is removed (just like
|
||||
those comments I mentioned above). Additionally, since you said
|
||||
you'd be preprocessing entries ignoring includes I figured I should
|
||||
use some more of them instead of other obfuscation methods. Did
|
||||
I mention that preprocessed or beautified sources will crash or
|
||||
hang your system? The program will also crash on non-ASCII machines.
|
||||
|
||||
The executable needs its source file present in the current directory
|
||||
or, depending on your system, in your path. The name of the source
|
||||
file is not hard-coded, __FILE__ is used instead.
|
||||
The executable needs its source file present in the current directory
|
||||
or, depending on your system, in your path. The name of the source
|
||||
file is not hard-coded, `__FILE__` is used instead.
|
||||
|
||||
In the original version which was sent in to the contest, there were
|
||||
some restrictions on the file name:
|
||||
The second letter had to be a lowercase 'r'.
|
||||
The third letter could never be a '+' or a 'b'.
|
||||
Valid names would have been "pr4.c", "pr.c", "prog.c", "brownie.c" etc.
|
||||
My first private version would only run when compiled on a Friday.
|
||||
I decided it would be better this way...
|
||||
These restrictions have been removed for your convenience.
|
||||
In the original version which was sent in to the contest, there were
|
||||
some restrictions on the file name:
|
||||
|
||||
The following lines describe how this program works; if you don't
|
||||
want to know it at this time, please skip them. If this entry would
|
||||
by some mistake win the contest, please do not rot13 this - I hate
|
||||
rot13'd spoilers since it is somewhat complicated on a Mac to
|
||||
reverse them. Anyone out there should have enough discipline and
|
||||
rot13 shouldn't be required, really. After all, we are no children
|
||||
anymore :-)
|
||||
- The second letter had to be a lowercase 'r'.
|
||||
- The third letter could never be a '+' or a 'b'.
|
||||
|
||||
This paragraph is not part of the author's comments, but is a helpful
|
||||
gift from the judges; if you read too fast to stop yourself, this should
|
||||
give you enough time to stop, which you really need to do RIGHT NOW if
|
||||
you don't want to read the spoilers, which really do spoil everything,
|
||||
we mean it.
|
||||
Valid names would have been "pr4.c", "pr.c", "prog.c", "brownie.c" etc.
|
||||
My first private version would only run when compiled on a Friday.
|
||||
I decided it would be better this way...
|
||||
These restrictions have been removed for your convenience.
|
||||
|
||||
The source file needs to be present because the words are read from
|
||||
it. The wordlist is encoded within the source using a 24 entry
|
||||
sliding dictionary where lowercase letters are offsets into the
|
||||
dictionary, uppercase letters are new letters not yet in the
|
||||
dictionary, and all other characters are ignored. The words are
|
||||
spread over six lines in the source; decoding starts on a line
|
||||
after a tab and a whitespace have been found, and stops on a newline.
|
||||
The grin after the "Demonic Smiley" actually is one encoded letter
|
||||
while the string is completely ignored; and the "cut" in "cut here"
|
||||
is required while "here" is not.
|
||||
The following lines describe how this program works; if you don't
|
||||
want to know it at this time, please skip them. If this entry would
|
||||
by some mistake win the contest, please do not rot13 this - I hate
|
||||
rot13'd spoilers since it is somewhat complicated on a Mac to
|
||||
reverse them. Anyone out there should have enough discipline and
|
||||
rot13 shouldn't be required, really. After all, we are no children
|
||||
anymore :-)
|
||||
|
||||
"For extra credit", explain why the words are sorted alphabetically
|
||||
(because I extracted them from a dictionary :-)
|
||||
This paragraph is not part of the author's comments, but is a helpful
|
||||
gift from the judges; if you read too fast to stop yourself, this should
|
||||
give you enough time to stop, which you really need to do RIGHT NOW if
|
||||
you don't want to read the spoilers, which really do spoil everything,
|
||||
we mean it.
|
||||
|
||||
The file name had to fulfill the restrictions mentioned above
|
||||
because __FILE__+1 was used as a second parameter to fopen(). (It
|
||||
essentially was fopen(__FILE__,__FILE__+1) ). This was an extra joke
|
||||
that does no longer exist in the released version.
|
||||
The source file needs to be present because the words are read from
|
||||
it. The wordlist is encoded within the source using a 24 entry
|
||||
sliding dictionary where lowercase letters are offsets into the
|
||||
dictionary, uppercase letters are new letters not yet in the
|
||||
dictionary, and all other characters are ignored. The words are
|
||||
spread over six lines in the source; decoding starts on a line
|
||||
after a tab and a whitespace have been found, and stops on a newline.
|
||||
The grin after the "Demonic Smiley" actually is one encoded letter
|
||||
while the string is completely ignored; and the "cut" in "cut here"
|
||||
is required while "here" is not.
|
||||
|
||||
You probably discovered that the while(FILE) in main is not a while loop
|
||||
but the statement that opens the file and initializes the dictionary.
|
||||
Similarly, int and signed have been redefined (to save space, of
|
||||
course).
|
||||
"For extra credit", explain why the words are sorted alphabetically
|
||||
(because I extracted them from a dictionary :-)
|
||||
|
||||
The main function (the guessing part) is between the last #else..#endif,
|
||||
but still is declared before main(). The 5[O]() in main() calls
|
||||
this function. Similarly, Most indexing operations have been
|
||||
changed to this form; and I tried to write each such operation
|
||||
different.
|
||||
The file name had to fulfill the restrictions mentioned above
|
||||
because `__FILE__+1` was used as a second parameter to fopen(). (It
|
||||
essentially was `fopen(__FILE__,__FILE__+1)` ). This was an extra joke
|
||||
that does no longer exist in the released version.
|
||||
|
||||
You probably discovered that the `while(FILE)` in main is not a while loop
|
||||
but the statement that opens the file and initializes the dictionary.
|
||||
Similarly, int and signed have been redefined (to save space, of
|
||||
course).
|
||||
|
||||
The main function (the guessing part) is between the last #else..#endif,
|
||||
but still is declared before main(). The `5[O]()` in main() calls
|
||||
this function. Similarly, Most indexing operations have been
|
||||
changed to this form; and I tried to write each such operation
|
||||
different.
|
||||
+24
-23
@@ -18,18 +18,19 @@
|
||||
|
||||
## Judges' comments
|
||||
|
||||
Why is this entry would be considered a utility? Well because it
|
||||
is able to convert content-free web pages into useful web pages.
|
||||
Why is this entry would be considered a utility? Well because it
|
||||
is able to convert content-free web pages into useful web pages.
|
||||
|
||||
To see why, try using an online version, modified for use as
|
||||
a CGI program:
|
||||
To see why, try using an online version, modified for use as
|
||||
a CGI program:
|
||||
|
||||
http://pootpoot.com/poot/pootify?URL=http%3A%2F%2Fwww.microsoft.com
|
||||
https://web.archive.org/web/20001025182142/http://pootpoot.com/poot/pootify?URL=http://www.microsoft.com
|
||||
|
||||
We are sure that you will find that new web page to make a much
|
||||
more consistent level of quality. :-)
|
||||
We are sure that you will find that new web page to make a much
|
||||
more consistent level of quality. :-)
|
||||
|
||||
A CGI script such as:
|
||||
|
||||
A CGI script such as:
|
||||
|
||||
#!/bin/sh
|
||||
# pootify - a sample CGI pootifier
|
||||
@@ -53,29 +54,29 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
can be used to pootify web pages.
|
||||
can be used to pootify web pages.
|
||||
|
||||
For further information see:
|
||||
For further information see:
|
||||
|
||||
http://pootpoot.com/poot/pootify?URL=http%3A%2F%2Fwww.ioccc.org
|
||||
https://web.archive.org/web/20040326083431/http://www.pootpoot.com/poot/pootify/?URL=http%3A%2F%2Fwww.ioccc.org
|
||||
|
||||
NOTE: The original entry was just a text based pootifier. To build
|
||||
that version try:
|
||||
NOTE: The original entry was just a text based pootifier. To build
|
||||
that version try:
|
||||
|
||||
make dlowe.alt
|
||||
./dlowe.alt < anyfile > pootfile
|
||||
|
||||
## Author's comments
|
||||
|
||||
This program is a text filter, it reads stdin and outputs the
|
||||
"corrected" text to stdout.
|
||||
This program is a text filter, it reads stdin and outputs the
|
||||
"corrected" text to stdout.
|
||||
|
||||
It is obfuscated in that the code is painful to look at and
|
||||
its purpose and mode of operation are not terribly obvious.
|
||||
More importantly, it is a tool for further obfuscation, in that it
|
||||
can take any text and render it unintelligible.
|
||||
It is obfuscated in that the code is painful to look at and
|
||||
its purpose and mode of operation are not terribly obvious.
|
||||
More importantly, it is a tool for further obfuscation, in that it
|
||||
can take any text and render it unintelligible.
|
||||
|
||||
Suggested uses: add to your MANROFFSEQ environment variable for man page
|
||||
enjoyment; use it to turn the GPL into the PPL; see what happens when you
|
||||
run perl4 programs after they've been run through it; "encrypt" sensitive
|
||||
(but unnecessary) documents...
|
||||
Suggested uses: add to your MANROFFSEQ environment variable for man page
|
||||
enjoyment; use it to turn the GPL into the PPL; see what happens when you
|
||||
run perl4 programs after they've been run through it; "encrypt" sensitive
|
||||
(but unnecessary) documents...
|
||||
+98
-72
@@ -18,89 +18,115 @@
|
||||
|
||||
## Judges' comments
|
||||
|
||||
Read the Author's comments below. We believe that your experience may
|
||||
mirror one of our experiences:
|
||||
Read the Author's comments below. We believe that your experience may
|
||||
mirror one of our experiences:
|
||||
|
||||
Originally, I didn't appreciate the game. Then I actually read the
|
||||
description of the controls. I started playing. I struggled.
|
||||
I spelled my first "poot". I was hooked ...
|
||||
> Originally, I didn't appreciate the game. Then I actually read the
|
||||
> description of the controls. I started playing. I struggled.
|
||||
> I spelled my first "poot". I was hooked ...
|
||||
|
||||
## Author's comments
|
||||
|
||||
Usage:
|
||||
Usage:
|
||||
|
||||
./pootris [X size of board] [Y size of board]
|
||||
|
||||
Synopsis:
|
||||
The object of this game is to spell "POOT" as much as possible. There
|
||||
is no time pressure. You're given one letter at a time (sort of randomly
|
||||
chosen from the set 'P', 'O', and 'T') and you get to move it freely
|
||||
around the border of the playing board, and decide when and where to drop
|
||||
it into the board. Sound easy? Of course, there's a catch...
|
||||
### Synopsis:
|
||||
|
||||
Controls:
|
||||
. Only three controls:
|
||||
'a' moves the current letter one position counterclockwise around
|
||||
the border of the playing field.
|
||||
's' moves the current letter one position clockwise around the border
|
||||
of the playing field.
|
||||
'd' drops the current letter onto the board.
|
||||
. To quit, send a fatal signal to the process.
|
||||
The object of this game is to spell "POOT" as much as possible. There
|
||||
is no time pressure. You're given one letter at a time (sort of randomly
|
||||
chosen from the set 'P', 'O', and 'T') and you get to move it freely
|
||||
around the border of the playing board, and decide when and where to drop
|
||||
it into the board. Sound easy? Of course, there's a catch...
|
||||
|
||||
Rules of motion:
|
||||
. The different letters move in different directions once dropped onto
|
||||
the board:
|
||||
'P' moves diagonally, at a 45 degree angle and in a clockwise
|
||||
direction around the board once dropped.
|
||||
'O' moves in a straight line perpendicular to the border from which
|
||||
it is dropped.
|
||||
'T' moves diagonally, at a 45 degree angle and in a counterclockwise
|
||||
direction around the board once dropped.
|
||||
. The letters bounce off the top and sides of the board. They bounce
|
||||
in a 'natural' way, with the exception that 'O's will fall straight
|
||||
down if they hit a side wall.
|
||||
. The letters stop when they hit another letter or the bottom of the
|
||||
board.
|
||||
### Controls:
|
||||
|
||||
Rules of spelling:
|
||||
. When you spell 'POOT' on the board, in any direction, the letters
|
||||
comprising the word will disappear, and any letters which may have
|
||||
accumulated above the disappeared letters will 'fall'.
|
||||
. Letters can be used in multiple spellings of 'POOT'.
|
||||
. Chain reactions are possible.
|
||||
|
||||
Only three controls:
|
||||
|
||||
Rules of scoring:
|
||||
. You get one (1) point for each letter you drop onto the board.
|
||||
. You get a bunch of points for spelling 'POOT'. More if you spell
|
||||
it in more than one way simultaneously.
|
||||
'a' moves the current letter one position counterclockwise around
|
||||
the border of the playing field.
|
||||
's' moves the current letter one position clockwise around the border
|
||||
of the playing field.
|
||||
'd' drops the current letter onto the board.
|
||||
|
||||
Some of the obfuscations:
|
||||
. Several different coordinate systems are used. There's the "real" X
|
||||
by Y system used for curses, the "inside the box" X by Y system used
|
||||
for moving things around and finding instances of "POOT" inside the
|
||||
box, and the position of the current letter, which is a single value
|
||||
from 0 to 2 * xsize + 2 * ysize - 1.
|
||||
. The fact that x%3 is a perfect hash function for x values 'P', 'O'
|
||||
and 'T' is used.
|
||||
. Of course, the code is as hideous as possible, and spells poot for
|
||||
fun (It's also exactly 3217 bytes in length, with exactly 1536
|
||||
counted characters for purposes of this contest.)
|
||||
. Love that modulus operator! Mmmm...
|
||||
. There are some equations used which are really unnecessarily ugly,
|
||||
which served the dual purposes of compacting the code and making it
|
||||
trickier to understand. I'm thinking of the equations used to convert
|
||||
between coordinate systems when dropping pieces into the game board.
|
||||
. Simple and silly ones: short, meaningless (and sometimes misleading
|
||||
(see 'x')) variable names; hard-coded ASCII numeric values used for
|
||||
character constants; using goto for fun and profit; reusing and
|
||||
re-purposing variables in different places.
|
||||
. The game itself is simple, but still weird and quite difficult.
|
||||
To quit, send a fatal signal to the process.
|
||||
|
||||
Some things I wish I could have fit into this, but didn't have the space:
|
||||
. Seeding the random number generator (doh!)
|
||||
. Something to detect when the game is over.
|
||||
. Some kind of scoreboard.
|
||||
. Sound.
|
||||
. Some way of quitting gracefully.
|
||||
### Rules of motion:
|
||||
|
||||
Good Luck!
|
||||
The different letters move in different directions once dropped onto the board:
|
||||
|
||||
'P' moves diagonally, at a 45 degree angle and in a clockwise direction around
|
||||
the board once dropped.
|
||||
'O' moves in a straight line perpendicular to the border from which it is
|
||||
dropped.
|
||||
'T' moves diagonally, at a 45 degree angle and in a counterclockwise direction
|
||||
around the board once dropped.
|
||||
|
||||
The letters bounce off the top and sides of the board. They bounce in a
|
||||
'natural' way, with the exception that 'O's will fall straight down if they hit
|
||||
a side wall.
|
||||
|
||||
The letters stop when they hit another letter or the bottom of the board.
|
||||
|
||||
### Rules of spelling:
|
||||
|
||||
- When you spell 'POOT' on the board, in any direction, the letters comprising
|
||||
the word will disappear, and any letters which may have accumulated above the
|
||||
disappeared letters will 'fall'.
|
||||
|
||||
- Letters can be used in multiple spellings of 'POOT'.
|
||||
|
||||
- Chain reactions are possible.
|
||||
|
||||
### Rules of scoring:
|
||||
|
||||
- You get one (1) point for each letter you drop onto the board.
|
||||
|
||||
- You get a bunch of points for spelling 'POOT'. More if you spell it in more
|
||||
than one way simultaneously.
|
||||
|
||||
|
||||
### Some of the obfuscations:
|
||||
|
||||
- Several different coordinate systems are used. There's the "real" X by Y
|
||||
system used for curses, the "inside the box" X by Y system used for moving
|
||||
things around and finding instances of "POOT" inside the box, and the position
|
||||
of the current letter, which is a single value from 0 to 2 * xsize + 2 * ysize -
|
||||
1.
|
||||
|
||||
- The fact that x%3 is a perfect hash function for x values 'P', 'O' and 'T' is
|
||||
used.
|
||||
|
||||
- Of course, the code is as hideous as possible, and spells poot for fun (It's
|
||||
also exactly 3217 bytes in length, with exactly 1536 counted characters for
|
||||
purposes of this contest.)
|
||||
|
||||
- Love that modulus operator! Mmmm...
|
||||
|
||||
- There are some equations used which are really unnecessarily ugly, which
|
||||
served the dual purposes of compacting the code and making it trickier to
|
||||
understand. I'm thinking of the equations used to convert between coordinate
|
||||
systems when dropping pieces into the game board.
|
||||
|
||||
- Simple and silly ones: short, meaningless (and sometimes misleading (see 'x'))
|
||||
variable names; hard-coded ASCII numeric values used for character constants;
|
||||
using goto for fun and profit; reusing and re-purposing variables in different
|
||||
places.
|
||||
|
||||
- The game itself is simple, but still weird and quite difficult.
|
||||
|
||||
### Some things I wish I could have fit into this, but didn't have the space:
|
||||
|
||||
- Seeding the random number generator (doh!)
|
||||
|
||||
- Something to detect when the game is over.
|
||||
|
||||
- Some kind of scoreboard.
|
||||
|
||||
- Sound.
|
||||
|
||||
- Some way of quitting gracefully.
|
||||
|
||||
|
||||
Good Luck!
|
||||
@@ -15,7 +15,7 @@
|
||||
### To run
|
||||
|
||||
./schnitzi 5 > sort.c
|
||||
cc sort.c -o sort
|
||||
make sort
|
||||
echo 123 > data
|
||||
echo 234 >> data
|
||||
echo 413 >> data
|
||||
|
||||
Reference in new issue
Block a user