Merge pull request #72 from xexyl/readmes
Various README.md files updated
This commit is contained in:
8 files changed
+218
-192
No files matched your search
@@ -15,6 +15,27 @@
|
|||||||
NOTE: we were able to get this to compile under modern systems with a patch from
|
NOTE: we were able to get this to compile under modern systems with a patch from
|
||||||
Yusuke Endoh. Thank you for your assistance Yusuke!
|
Yusuke Endoh. Thank you for your assistance Yusuke!
|
||||||
|
|
||||||
|
## To run:
|
||||||
|
|
||||||
|
./robison
|
||||||
|
# enter valid expressions
|
||||||
|
|
||||||
|
|
||||||
|
## Try:
|
||||||
|
|
||||||
|
./robison
|
||||||
|
11x10
|
||||||
|
|
||||||
|
echo 1x10x111 | ./robison
|
||||||
|
|
||||||
|
echo 1+1+10 | ./robison
|
||||||
|
|
||||||
|
echo 100 - 1 | ./robison
|
||||||
|
|
||||||
|
echo -100 x 100 + 1 | ./robison
|
||||||
|
|
||||||
|
echo 100 / 100 | ./robison # <-- what happens here ?
|
||||||
|
|
||||||
## Judges' comments:
|
## Judges' comments:
|
||||||
|
|
||||||
Sites with punch card facilities will be happy to note that
|
Sites with punch card facilities will be happy to note that
|
||||||
|
|||||||
+14
-13
@@ -1,4 +1,4 @@
|
|||||||
Best Output:
|
# Best Output:
|
||||||
|
|
||||||
Sean Barrett
|
Sean Barrett
|
||||||
University of Maryland
|
University of Maryland
|
||||||
@@ -16,24 +16,24 @@ Best Output:
|
|||||||
|
|
||||||
## Judges' comments
|
## Judges' comments
|
||||||
|
|
||||||
You will be A-mazed.
|
You will be A-mazed.
|
||||||
|
|
||||||
You are invited to try to cheat, ... if you can figure out how! :-)
|
You are invited to try to cheat, ... if you can figure out how! :-)
|
||||||
|
|
||||||
## Author's comments
|
## Author's comments
|
||||||
|
|
||||||
HOW TO PLAY:
|
### HOW TO PLAY:
|
||||||
|
|
||||||
When the game starts, you are at the far end of the maze from the
|
When the game starts, you are at the far end of the maze from the
|
||||||
exit, looking down a corridor. To move forward, type 'f' and press
|
exit, looking down a corridor. To move forward, type 'f' and press
|
||||||
return. To turn 90 degrees right, type 'r'; left, 'l'. You can
|
return. To turn 90 degrees right, type 'r'; left, 'l'. You can
|
||||||
put multiple commands on one line, and the new view will be drawn
|
put multiple commands on one line, and the new view will be drawn
|
||||||
after all the moves.
|
after all the moves.
|
||||||
|
|
||||||
The game ends if you get out the exit (you'll know it when you see
|
The game ends if you get out the exit (you'll know it when you see
|
||||||
it) or when you type ^D.
|
it) or when you type ^D.
|
||||||
|
|
||||||
HINTS ON HOW TO CHEAT: (rot13 to read)
|
### HINTS ON HOW TO CHEAT: (rot13 to read)
|
||||||
|
|
||||||
Lbh pna, bs pbhefr, purng ol ybbxvat ng gur znmr znc. Gur dhrfgvba
|
Lbh pna, bs pbhefr, purng ol ybbxvat ng gur znmr znc. Gur dhrfgvba
|
||||||
lbh arrq gb nfx lbhefrys, gubhtu, vf jung frdhrapr bs punenpgref
|
lbh arrq gb nfx lbhefrys, gubhtu, vf jung frdhrapr bs punenpgref
|
||||||
@@ -44,7 +44,7 @@ Best Output:
|
|||||||
gura onpxjneq sebz gur pheerag cbfvgvba gb qenj gur yrsg fvqr naq
|
gura onpxjneq sebz gur pheerag cbfvgvba gb qenj gur yrsg fvqr naq
|
||||||
gura gur evtug fvqr.
|
gura gur evtug fvqr.
|
||||||
|
|
||||||
ADVANCED USAGE NOTES: (rot13 to read)
|
### ADVANCED USAGE NOTES: (rot13 to read)
|
||||||
|
|
||||||
Gur cebtenz pna nyfb or eha sebz bgure svyrf pbagnvavat znmrf. Gur
|
Gur cebtenz pna nyfb or eha sebz bgure svyrf pbagnvavat znmrf. Gur
|
||||||
znmr fubhyq or ynvq bhg tencuvpnyyl va gur boivbhf sbezng; arjyvarf
|
znmr fubhyq or ynvq bhg tencuvpnyyl va gur boivbhf sbezng; arjyvarf
|
||||||
@@ -86,6 +86,7 @@ Best Output:
|
|||||||
|
|
||||||
Gur cebtenz nffhzrf gung gnof ner frg gb 8 punenpgref.
|
Gur cebtenz nffhzrf gung gnof ner frg gb 8 punenpgref.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 1991, Landon Curt Noll & Larry Bassel.
|
Copyright (c) 1991, Landon Curt Noll & Larry Bassel.
|
||||||
All Rights Reserved. Permission for personal, educational or non-profit use is
|
All Rights Reserved. Permission for personal, educational or non-profit use is
|
||||||
granted provided this this copyright and notice are included in its entirety
|
granted provided this this copyright and notice are included in its entirety
|
||||||
|
|||||||
+10
-7
@@ -17,20 +17,22 @@
|
|||||||
|
|
||||||
## Judges' comments
|
## Judges' comments
|
||||||
|
|
||||||
Why is the following label necessary?
|
Why is the following label necessary?
|
||||||
|
|
||||||
|
|
||||||
sorryfor_this_unused_but_very_needed_label:
|
sorryfor_this_unused_but_very_needed_label:
|
||||||
|
|
||||||
Notice that if you C beautify (cb) or pre-process this program, it
|
|
||||||
will no longer work correctly, or at all. (go ahead, try it... :-))
|
|
||||||
|
|
||||||
NOTE: One should remove the final trailing newline to obtain the
|
Notice that if you C beautify (cb) or pre-process this program, it
|
||||||
original source file. This step is not needed to compile
|
will no longer work correctly, or at all. (go ahead, try it... :-))
|
||||||
this entry.
|
|
||||||
|
NOTE: One should remove the final trailing newline to obtain the
|
||||||
|
original source file. This step is not needed to compile
|
||||||
|
this entry.
|
||||||
|
|
||||||
## Author's comments
|
## Author's comments
|
||||||
|
|
||||||
Spoiler, rot13 to read:
|
Spoiler, rot13 to read:
|
||||||
|
|
||||||
Gur fbhepr pbqr ubyqf gur yrggref bs gur zrffntr. Rnpu yrggre, pbzovarq
|
Gur fbhepr pbqr ubyqf gur yrggref bs gur zrffntr. Rnpu yrggre, pbzovarq
|
||||||
jvgu nabgure xrl yrggre, vf hfrq gb pbzchgr gur pbbeqvangrf bs gur arkg
|
jvgu nabgure xrl yrggre, vf hfrq gb pbzchgr gur pbbeqvangrf bs gur arkg
|
||||||
@@ -44,6 +46,7 @@
|
|||||||
Guvf jnl, nal zrffntr pna or zvkrq vagb n pbqr, fvapr gur xrlf nyybj
|
Guvf jnl, nal zrffntr pna or zvkrq vagb n pbqr, fvapr gur xrlf nyybj
|
||||||
lbh gb cynpr gur zrnavatshy yrggref jurerire lbh jnag.
|
lbh gb cynpr gur zrnavatshy yrggref jurerire lbh jnag.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 1991, Landon Curt Noll & Larry Bassel.
|
Copyright (c) 1991, Landon Curt Noll & Larry Bassel.
|
||||||
All Rights Reserved. Permission for personal, educational or non-profit use is
|
All Rights Reserved. Permission for personal, educational or non-profit use is
|
||||||
granted provided this this copyright and notice are included in its entirety
|
granted provided this this copyright and notice are included in its entirety
|
||||||
|
|||||||
+75
-75
@@ -1,4 +1,4 @@
|
|||||||
Best X11 Graphics:
|
# Best X11 Graphics:
|
||||||
|
|
||||||
David Applegate Guy Jacobson
|
David Applegate Guy Jacobson
|
||||||
School of Computer Science AT&T Bell Laboratories
|
School of Computer Science AT&T Bell Laboratories
|
||||||
@@ -10,107 +10,107 @@ Best X11 Graphics:
|
|||||||
|
|
||||||
make all
|
make all
|
||||||
|
|
||||||
### To run
|
## To run:
|
||||||
|
|
||||||
./davidguy ip_address:server.screen
|
./davidguy ip_address:server.screen
|
||||||
|
|
||||||
where 'ip_address' in an IP address of an X server. For example, try:
|
where `ip_address` in an IP address of an X server.
|
||||||
|
|
||||||
davidguy 127.0.0.1:0.0
|
## Try:
|
||||||
|
|
||||||
Of course, may need to supply a more reasonable address. :-)
|
./davidguy 127.0.0.1:0.0
|
||||||
|
|
||||||
Also try:
|
Of course, you may need to supply a more reasonable address. :-)
|
||||||
|
|
||||||
|
## Also try:
|
||||||
|
|
||||||
cp -f davidguy guydavid
|
cp -f davidguy guydavid
|
||||||
./guydavid 127.0.0.1:0.0
|
./guydavid 127.0.0.1:0.0
|
||||||
|
|
||||||
## Judges' comments
|
## Judges' comments
|
||||||
|
|
||||||
Can you determine why this makes a difference.
|
Can you determine why this makes a difference?
|
||||||
|
|
||||||
We permitted this type of entry to win because:
|
We permitted this type of entry to win because:
|
||||||
|
|
||||||
- it did not require X to be on the host system
|
- it did not require X to be on the host system
|
||||||
- both BSD and SVR4 have sockets
|
- both BSD and SVR4 have sockets
|
||||||
|
|
||||||
Now that X11 and sockets have become 'standard', we plan to open
|
Now that X11 and sockets have become 'standard', we plan to open
|
||||||
up the contest to programs that use them. Future rules will
|
up the contest to programs that use them. Future rules will
|
||||||
explain this further.
|
explain this further.
|
||||||
|
|
||||||
We are pleased that this entry has helped bring new 'life' into
|
We are pleased that this entry has helped bring new 'life' into
|
||||||
the contest.
|
the contest.
|
||||||
|
|
||||||
## Author's comments
|
## Author's comments
|
||||||
|
|
||||||
The program is a fully-functional X client. It talks directly to
|
The program is a fully-functional X client. It talks directly to
|
||||||
the X server through a socket without using Xlib, Xt or any other
|
the X server through a socket without using Xlib, Xt or any other
|
||||||
wussie toolkit junk. With no arguments, it will try to run
|
wussie toolkit junk. With no arguments, it will try to run
|
||||||
locally using the unix-domain socket (only on BSD :-( ) or you can
|
locally using the unix-domain socket (only on BSD :-( ) or you can
|
||||||
give it a command line argument identifying a display host address
|
give it a command line argument identifying a display host address
|
||||||
(in dotted octet notation, like 127.0.0.1:0.0) where the X server
|
(in dotted octet notation, like 127.0.0.1:0.0) where the X server
|
||||||
is running. It handles color and monochrome displays, and
|
is running. It handles color and monochrome displays, and
|
||||||
performs whatever byte-swapping and bit-reversal is needed (so
|
performs whatever byte-swapping and bit-reversal is needed (so
|
||||||
that the program works even when the server and the client have
|
that the program works even when the server and the client have
|
||||||
different architectures). It buffers communication to the X
|
different architectures). It buffers communication to the X
|
||||||
server for efficiency.
|
server for efficiency.
|
||||||
|
|
||||||
[[ NOTE: The original source in davidguy.c used only an IP address
|
[[ NOTE: The original source in davidguy.c used only an IP address
|
||||||
argument (assumed :0.0) and assumed the color of black
|
argument (assumed :0.0) and assumed the color of black
|
||||||
and white. ]]
|
and white. ]]
|
||||||
|
|
||||||
The program doesn't require any user interaction; you can just sit
|
The program doesn't require any user interaction; you can just sit
|
||||||
back and watch it run. All the action takes place in the root
|
back and watch it run. All the action takes place in the root
|
||||||
window of the display.
|
window of the display.
|
||||||
|
|
||||||
We think the program is interesting for these reasons:
|
We think the program is interesting for these reasons:
|
||||||
|
|
||||||
1) It belongs to a class of programs that programmers make
|
1. It belongs to a class of programs that programmers make the following
|
||||||
the following complaints about: they require a mountain
|
complaints about: they require a mountain of code to implement even the
|
||||||
of code to implement even the simplest program; and they
|
simplest program; and they must be linked with giant libraries of
|
||||||
must be linked with giant libraries of hard-to-understand
|
hard-to-understand functions. In contrast to these complaints (made by wimps,
|
||||||
functions. In contrast to these complaints (made by wimps,
|
in our humble opinion), our program fits in under 1536 bytes, doesn't need any
|
||||||
in our humble opinion), our program fits in under 1536
|
external functions except for a few system calls, and doesn't need to include
|
||||||
bytes, doesn't need any external functions except for a few
|
any header files.
|
||||||
system calls, and doesn't need to include any header files.
|
|
||||||
|
|
||||||
2) It implements an extremely efficient algorithm for the
|
2. It implements an extremely efficient algorithm for the computation it
|
||||||
computation it performs. One cool feature of the algorithm
|
performs. One cool feature of the algorithm (at least as far as this contest is
|
||||||
(at least as far as this contest is concerned) is that its
|
concerned) is that its obscurity is fundamentally necessary for its efficiency.
|
||||||
obscurity is fundamentally necessary for its efficiency.
|
In other words, even if we took steps to present the algorithm clearly, (we
|
||||||
In other words, even if we took steps to present the algorithm
|
haven't) the relation of the computation performed to the specification of what
|
||||||
clearly, (we haven't) the relation of the computation performed
|
the program was supposed to do would still be hard to understand.
|
||||||
to the specification of what the program was supposed to do
|
|
||||||
would still be hard to understand.
|
|
||||||
|
|
||||||
Quasi-spoiler on internals:
|
### Quasi-spoiler on internals:
|
||||||
|
|
||||||
The program plays Conway's game of Life in the root window's
|
The program plays Conway's game of Life in the root window's
|
||||||
background pixmap. It starts by setting the background to random
|
background pixmap. It starts by setting the background to random
|
||||||
bits, and then plays Life, with one Life cell for each pixel of the
|
bits, and then plays Life, with one Life cell for each pixel of the
|
||||||
screen. In the game of Life, a cell survives to the next round if
|
screen. In the game of Life, a cell survives to the next round if
|
||||||
2 or 3 of its 8 neighbors are also alive, and a cell is born if
|
2 or 3 of its 8 neighbors are also alive, and a cell is born if
|
||||||
exactly 3 of its neighbors are alive. Otherwise, a cell dies of
|
exactly 3 of its neighbors are alive. Otherwise, a cell dies of
|
||||||
exposure if it has only 0 or 1 neighbors, and dies of overcrowding
|
exposure if it has only 0 or 1 neighbors, and dies of overcrowding
|
||||||
if it has 4 or more neighbors.
|
if it has 4 or more neighbors.
|
||||||
|
|
||||||
|
The algorithm used to compute the next generation is based on the
|
||||||
|
observation that a cell's state in the next generation is a boolean
|
||||||
|
function of its current state, and the states of its 8 neighbors
|
||||||
|
(ie, a boolean function from 9 bits to 1 bit). This function can
|
||||||
|
be computed by a boolean circuit. In addition, intermediate values
|
||||||
|
computed by the circuit can be shared between neighboring cells,
|
||||||
|
reducing the number of gates per cell required. These ideas
|
||||||
|
have been used before, to compute the next generation through a
|
||||||
|
series of bit blits. Instead of doing this, we map values in the
|
||||||
|
circuit to bits in registers, so that the next generation can be
|
||||||
|
computed efficiently within registers, minimizing memory accesses.
|
||||||
|
As a result, the computation of the next generation is performed
|
||||||
|
with about 1.6 instructions per life cell, consisting of .125
|
||||||
|
memory accesses, .17 shifts, and 1.3 logic operations. The net
|
||||||
|
result is that the time to transfer the bits to the X server, and
|
||||||
|
for the X server to draw them on the screen, dominates the time to
|
||||||
|
compute the next generation.
|
||||||
|
|
||||||
The algorithm used to compute the next generation is based on the
|
|
||||||
observation that a cell's state in the next generation is a boolean
|
|
||||||
function of its current state, and the states of its 8 neighbors
|
|
||||||
(ie, a boolean function from 9 bits to 1 bit). This function can
|
|
||||||
be computed by a boolean circuit. In addition, intermediate values
|
|
||||||
computed by the circuit can be shared between neighboring cells,
|
|
||||||
reducing the number of gates per cell required. These ideas
|
|
||||||
have been used before, to compute the next generation through a
|
|
||||||
series of bit blits. Instead of doing this, we map values in the
|
|
||||||
circuit to bits in registers, so that the next generation can be
|
|
||||||
computed efficiently within registers, minimizing memory accesses.
|
|
||||||
As a result, the computation of the next generation is performed
|
|
||||||
with about 1.6 instructions per life cell, consisting of .125
|
|
||||||
memory accesses, .17 shifts, and 1.3 logic operations. The net
|
|
||||||
result is that the time to transfer the bits to the X server, and
|
|
||||||
for the X server to draw them on the screen, dominates the time to
|
|
||||||
compute the next generation.
|
|
||||||
|
|
||||||
Copyright (c) 1991, Landon Curt Noll & Larry Bassel.
|
Copyright (c) 1991, Landon Curt Noll & Larry Bassel.
|
||||||
All Rights Reserved. Permission for personal, educational or non-profit use is
|
All Rights Reserved. Permission for personal, educational or non-profit use is
|
||||||
|
|||||||
+26
-25
@@ -18,33 +18,34 @@
|
|||||||
|
|
||||||
## Judges' comments
|
## Judges' comments
|
||||||
|
|
||||||
Make and run as follows:
|
Make and run as follows:
|
||||||
|
|
||||||
make dds
|
make dds
|
||||||
For example, the author suggests trying:
|
|
||||||
|
For example, the author suggests trying:
|
||||||
|
|
||||||
dds LANDER.BAS
|
dds LANDER.BAS
|
||||||
a.out
|
a.out
|
||||||
|
|
||||||
Notice that a file a.c has been generated. Can you tell how a.c was
|
Notice that a file a.c has been generated. Can you tell how a.c was
|
||||||
produced? How does a.c relate to LANDER.BAS?
|
produced? How does a.c relate to LANDER.BAS?
|
||||||
|
|
||||||
This obfuscated program translates BASIC programs into obfuscated
|
This obfuscated program translates BASIC programs into obfuscated
|
||||||
C programs by way of an obfuscated algorithm.
|
C programs by way of an obfuscated algorithm.
|
||||||
|
|
||||||
NOTE: Due to minor problems with some strict ANSI C compilers, we
|
NOTE: Due to minor problems with some strict ANSI C compilers, we
|
||||||
have supplied a more portable ANSI version.
|
have supplied a more portable ANSI version.
|
||||||
|
|
||||||
|
|
||||||
## Author's comments
|
## Author's comments
|
||||||
|
|
||||||
This program is a companion to the DDS-BASIC interpreter program that
|
This program is a companion to the DDS-BASIC interpreter program that
|
||||||
was submitted to the contest in 1990. This compiles BASIC programs into
|
was submitted to the contest in 1990. This compiles BASIC programs into
|
||||||
executable commands. The input format is almost identical to the input
|
executable commands. The input format is almost identical to the input
|
||||||
format of the DDS-BASIC interpreter. The program needs an executable C
|
format of the DDS-BASIC interpreter. The program needs an executable C
|
||||||
compiler called `cc' in your path in order to work.
|
compiler called `cc' in your path in order to work.
|
||||||
|
|
||||||
Program commands:
|
Program commands:
|
||||||
|
|
||||||
variable names A to Z variables initialized to 0 on RUN
|
variable names A to Z variables initialized to 0 on RUN
|
||||||
FOR var = exp TO exp NEXT variable
|
FOR var = exp TO exp NEXT variable
|
||||||
@@ -54,22 +55,22 @@
|
|||||||
PRINT exp var = exp
|
PRINT exp var = exp
|
||||||
REM any text END
|
REM any text END
|
||||||
|
|
||||||
Expressions are the same as the expressions of the C language.
|
Expressions are the same as the expressions of the C language.
|
||||||
Many system calls and C library calls can be used.
|
Many system calls and C library calls can be used.
|
||||||
|
|
||||||
Input format:
|
Input format:
|
||||||
|
|
||||||
- Free format positioning of tokens on the line.
|
- Free format positioning of tokens on the line.
|
||||||
- No space is allowed before the line number.
|
- No space is allowed before the line number.
|
||||||
- Exactly one space is needed after the FOR and NEXT tokens
|
- Exactly one space is needed after the FOR and NEXT tokens
|
||||||
- ALL INPUT MUST BE UPPERCASE.
|
- ALL INPUT MUST BE UPPERCASE.
|
||||||
|
|
||||||
Error checking / error reports:
|
Error checking / error reports:
|
||||||
|
|
||||||
The compiler silently ignores many errors.
|
The compiler silently ignores many errors.
|
||||||
Other errors may produce errors in later phases of the compilation.
|
Other errors may produce errors in later phases of the compilation.
|
||||||
|
|
||||||
Can you figure out how the compiler works? Hint (rot13):
|
Can you figure out how the compiler works? Hint:
|
||||||
|
|
||||||
The compiler is NOT written in C, so this is really a meta-obfuscated
|
The compiler is NOT written in C, so this is really a meta-obfuscated
|
||||||
program. The C code is an intepreter for the four register, seven
|
program. The C code is an intepreter for the four register, seven
|
||||||
|
|||||||
+11
-11
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
make all
|
make all
|
||||||
|
|
||||||
### To run
|
### Try:
|
||||||
|
|
||||||
echo "green terra
|
echo "green terra
|
||||||
vex
|
vex
|
||||||
@@ -23,22 +23,22 @@ clerk" | ./fine
|
|||||||
|
|
||||||
## Judges' comments
|
## Judges' comments
|
||||||
|
|
||||||
This filter, 80 chars plus a newline, fits into a single line on most
|
This filter, 80 chars plus a newline, fits into a single line on most
|
||||||
terminals (unless your terminal has a line wrap mis-feature :-)).
|
terminals (unless your terminal has a line wrap mis-feature :-)).
|
||||||
|
|
||||||
This entry is likely one of the smallest C implementations of this
|
This entry is likely one of the smallest C implementations of this
|
||||||
filter, excluding programs that resort to command line or include
|
filter, excluding programs that resort to command line or include
|
||||||
file tricks.
|
file tricks.
|
||||||
|
|
||||||
How does this program work? Which 3 bytes of C code can be changed
|
How does this program work? Which 3 bytes of C code can be changed
|
||||||
into 2 bytes, allowing the program to still work, but also stripping
|
into 2 bytes, allowing the program to still work, but also stripping
|
||||||
the high bit off of some input?
|
the high bit off of some input?
|
||||||
|
|
||||||
## Author's comments
|
## Author's comments
|
||||||
|
|
||||||
The author wishes to thank J Greely for the last 6 bytes.
|
The author wishes to thank J Greely for the last 6 bytes.
|
||||||
|
|
||||||
Here's about how it does it: [rot13 to read]
|
Here's about how it does it: [rot13 to read]
|
||||||
|
|
||||||
|
|
||||||
ABGR: Ovgf ner ersreerq gb nf 76543210, uvtu gb ybj.
|
ABGR: Ovgf ner ersreerq gb nf 76543210, uvtu gb ybj.
|
||||||
|
|||||||
@@ -12,20 +12,20 @@
|
|||||||
|
|
||||||
make all
|
make all
|
||||||
|
|
||||||
### To run
|
### To run:
|
||||||
|
|
||||||
./rince
|
./rince
|
||||||
|
|
||||||
## Judges' comments
|
## Judges' comments:
|
||||||
|
|
||||||
This entry has been updated to allow most ANSI C compiler.
|
This entry has been updated to allow most ANSI C compiler.
|
||||||
|
|
||||||
## Author's comments
|
## Author's comments
|
||||||
|
|
||||||
This program is a simple puzzle type game. (I'll leave you to play
|
This program is a simple puzzle type game. (I'll leave you to play
|
||||||
it to see the rest of it .. :-) .) The general idea was to try and
|
it to see the rest of it .. :-) .) The general idea was to try and
|
||||||
write the smallest playable game, but keep the playability and
|
write the smallest playable game, but keep the playability and
|
||||||
enjoyment high.
|
enjoyment high.
|
||||||
|
|
||||||
Instructions (rot 13 to read).
|
Instructions (rot 13 to read).
|
||||||
==============================
|
==============================
|
||||||
|
|||||||
+54
-54
@@ -37,8 +37,8 @@ Both albert and albert.orig loop without printing anything, although
|
|||||||
the first factor is 101 and is usually found in an instant.
|
the first factor is 101 and is usually found in an instant.
|
||||||
```
|
```
|
||||||
|
|
||||||
The `albert.c` file is the fixed file, where as the `albert.alt.c`
|
The `albert.c` file is the fixed file, whereas the `albert.alt.c`
|
||||||
is file before aookying Leo Broukhis' fix.
|
is the file before applying Leo Broukhis' fix.
|
||||||
|
|
||||||
To compile this alternate version:
|
To compile this alternate version:
|
||||||
|
|
||||||
@@ -48,69 +48,69 @@ Use `albert.alt` as you would `albert` above.
|
|||||||
|
|
||||||
## Judges' comments
|
## Judges' comments
|
||||||
|
|
||||||
We were impressed with the speed at which it was able to factor
|
We were impressed with the speed at which it was able to factor
|
||||||
arbitrarily large numbers consisting of factors that fit into
|
arbitrarily large numbers consisting of factors that fit into
|
||||||
a long.
|
a long.
|
||||||
|
|
||||||
## Author's comments
|
## Author's comments
|
||||||
|
|
||||||
The Obfuscated version of the Horst algorithm.
|
The Obfuscated version of the Horst algorithm.
|
||||||
|
|
||||||
This program will factor unlimited length numbers and print the
|
This program will factor unlimited length numbers and print the
|
||||||
factors in ascending order. Numbers of one digit (e.g. 8)
|
factors in ascending order. Numbers of one digit (e.g. 8)
|
||||||
are rejected without notice.
|
are rejected without notice.
|
||||||
It quits as soon as there is at most one
|
It quits as soon as there is at most one
|
||||||
factor left, but that factor will not be shown.
|
factor left, but that factor will not be shown.
|
||||||
It accomplishes this efficiently, without resorting to division
|
It accomplishes this efficiently, without resorting to division
|
||||||
or multiplication, until the candidate factor no longer fits in
|
or multiplication, until the candidate factor no longer fits in
|
||||||
a signed long.
|
a signed long.
|
||||||
|
|
||||||
The nicest way is to rename the program into e.g. 4294967297
|
The nicest way is to rename the program into e.g. 4294967297
|
||||||
if you want to factor Fermat's 4th number. Then just run it.
|
if you want to factor Fermat's 4th number. Then just run it.
|
||||||
Or you may type "prog <some-number>"
|
Or you may type "prog <some-number>"
|
||||||
A nice one is also (30 ones)
|
A nice one is also (30 ones)
|
||||||
albert 111111111111111111111111111111
|
albert 111111111111111111111111111111
|
||||||
|
|
||||||
Apart from the foregoing there are no special execution instructions.
|
Apart from the foregoing there are no special execution instructions.
|
||||||
|
|
||||||
To customize the program into a factorizer of a fixed number, use
|
To customize the program into a factorizer of a fixed number, use
|
||||||
cc albert.c -o 4294967297
|
cc albert.c -o 4294967297
|
||||||
or some such.
|
or some such.
|
||||||
|
|
||||||
There are no data files used, and it is not possible to feed input
|
There are no data files used, and it is not possible to feed input
|
||||||
via stdin.
|
via stdin.
|
||||||
|
|
||||||
I think this program is a nice example of algorithmic obfuscation.
|
I think this program is a nice example of algorithmic obfuscation.
|
||||||
Several times two similar algorithms are merged into one. Then you
|
Several times two similar algorithms are merged into one. Then you
|
||||||
need quite some tricks to get it running, such as long jumps
|
need quite some tricks to get it running, such as long jumps
|
||||||
through recursive subroutines. I felt like a sword smith,
|
through recursive subroutines. I felt like a sword smith,
|
||||||
welding the sword very long, folding it again to the proper
|
welding the sword very long, folding it again to the proper
|
||||||
length, keep on hammering till it is tight, then fold again.
|
length, keep on hammering till it is tight, then fold again.
|
||||||
Always keeping it at the proper red hot temperature, but not too
|
Always keeping it at the proper red hot temperature, but not too
|
||||||
hot lest the hardness fades.
|
hot lest the hardness fades.
|
||||||
The strict naming conventions for subroutines did not make things
|
The strict naming conventions for subroutines did not make things
|
||||||
much clearer after all, but it was not supposed to.
|
much clearer after all, but it was not supposed to.
|
||||||
|
|
||||||
I would like to draw attention to the robustness of the program
|
I would like to draw attention to the robustness of the program
|
||||||
with respect to error handling and the nice stopping criterion.
|
with respect to error handling and the nice stopping criterion.
|
||||||
The esthetic appeal of some lines is at the expense of clearness,
|
The aesthetic appeal of some lines is at the expense of clearness,
|
||||||
I apologize.
|
I apologize.
|
||||||
Running the program through the c-beautifier reveals nothing,
|
Running the program through the c-beautifier reveals nothing,
|
||||||
it will only destroy some of the lay out.
|
it will only destroy some of the lay out.
|
||||||
Running the program through lint shows the usual remarks for a
|
Running the program through lint shows the usual remarks for a
|
||||||
K&R program. Defeating this through casts does not make a program
|
K&R program. Defeating this through casts does not make a program
|
||||||
cleaner in my opinion.
|
cleaner in my opinion.
|
||||||
|
|
||||||
Here are some hints, but they may not be too helpful.
|
Here are some hints, but they may not be too helpful.
|
||||||
1. The Horst algorithm is described in the Hobby Computer Club
|
1. The Horst algorithm is described in the Hobby Computer Club
|
||||||
Newsletter, year 82, part 4, a real Dutch treat.
|
Newsletter, year 82, part 4, a real Dutch treat.
|
||||||
Assembler, c and Forth version have been around for some years.
|
Assembler, c and Forth version have been around for some years.
|
||||||
2. Does fractal programming exist after all?
|
2. Does fractal programming exist after all?
|
||||||
3. You remember the ToomCook algorithm in Knuth?
|
3. You remember the ToomCook algorithm in Knuth?
|
||||||
It uses iteration instead of recursion and is quite jumpy.
|
It uses iteration instead of recursion and is quite jumpy.
|
||||||
This program shares these disadvantages in a modified form.
|
This program shares these disadvantages in a modified form.
|
||||||
4. The Conversion is to be found in Knuth, not so the Observation.
|
4. The Conversion is to be found in Knuth, not so the Observation.
|
||||||
The Observation: "if it ends in a zero, it is divisible by ten"
|
The Observation: "if it ends in a zero, it is divisible by ten"
|
||||||
|
|
||||||
Copyright (c) 1992, Landon Curt Noll & Larry Bassel.
|
Copyright (c) 1992, Landon Curt Noll & Larry Bassel.
|
||||||
All Rights Reserved. Permission for personal, educational or non-profit use is
|
All Rights Reserved. Permission for personal, educational or non-profit use is
|
||||||
|
|||||||
Reference in new issue
Block a user