Update 2000/tomx/README.md
Various fixes (typos and formatting fixes included).
This commit is contained in:
1 parent
0c2a0a471d
commit
517e936b63
1 file changed
+35
-32
+35
-32
@@ -1,4 +1,4 @@
|
|||||||
Most Complete Program:
|
# Most Complete Program:
|
||||||
|
|
||||||
Thomas P John
|
Thomas P John
|
||||||
Mishybi Plamoottil
|
Mishybi Plamoottil
|
||||||
@@ -9,13 +9,12 @@ Most Complete Program:
|
|||||||
http://tomx.tripod.com/
|
http://tomx.tripod.com/
|
||||||
|
|
||||||
|
|
||||||
Judges' Comments:
|
## Judges' Comments:
|
||||||
|
### To use:
|
||||||
To build:
|
|
||||||
|
|
||||||
make tomx
|
make tomx
|
||||||
|
|
||||||
Try:
|
### Try:
|
||||||
|
|
||||||
rm -f ./tomx
|
rm -f ./tomx
|
||||||
sh tomx.c
|
sh tomx.c
|
||||||
@@ -28,12 +27,15 @@ Judges' Comments:
|
|||||||
./tomx.c
|
./tomx.c
|
||||||
./tomx
|
./tomx
|
||||||
|
|
||||||
Also try:
|
### Also try:
|
||||||
|
|
||||||
rm -f ./tomx
|
rm -f ./tomx
|
||||||
make -f tomx.c
|
make -f tomx.c
|
||||||
./tomx
|
./tomx
|
||||||
|
|
||||||
|
|
||||||
|
### Selected Judges Remarks
|
||||||
|
|
||||||
Polyglots have come and gone, but this was the first one we'd seen
|
Polyglots have come and gone, but this was the first one we'd seen
|
||||||
where one language *used* another to perform its tasks. An interesting
|
where one language *used* another to perform its tasks. An interesting
|
||||||
approach. Admittedly, it's not all that obfuscated - but there's more
|
approach. Admittedly, it's not all that obfuscated - but there's more
|
||||||
@@ -41,10 +43,10 @@ Judges' Comments:
|
|||||||
changes don't change the shell code or the makefile.
|
changes don't change the shell code or the makefile.
|
||||||
|
|
||||||
|
|
||||||
Selected Author's Comments:
|
### Selected Author's Comments:
|
||||||
|
|
||||||
|
### Summary
|
||||||
|
|
||||||
Summary
|
|
||||||
-------
|
|
||||||
This program works as a C source file, a Makefile and also as a
|
This program works as a C source file, a Makefile and also as a
|
||||||
Shell (/bin/sh) script. But unlike some other multi-language prog-
|
Shell (/bin/sh) script. But unlike some other multi-language prog-
|
||||||
rams, this one is NOT meant to print "Hello, world" in all 3 cases
|
rams, this one is NOT meant to print "Hello, world" in all 3 cases
|
||||||
@@ -56,43 +58,44 @@ Selected Author's Comments:
|
|||||||
Probably, this is the first entry ever to fully satisfy Rule #1
|
Probably, this is the first entry ever to fully satisfy Rule #1
|
||||||
("Your entry must be a complete program") in the strictest sense;-)
|
("Your entry must be a complete program") in the strictest sense;-)
|
||||||
|
|
||||||
Top 5 reasons (IMHO) why this code is an entry for IOCCC
|
### Top 5 reasons (IMHO) why this code is an entry for IOCCC
|
||||||
--------------------------------------------------------
|
|
||||||
1. A glance at the source itself will tell U that most of the
|
1. A glance at the source itself will tell you that most of the
|
||||||
Obfuscation is NOT in the C code per se, but in the comments
|
Obfuscation is NOT in the C code per se, but in the comments
|
||||||
to the C code. (But sadly, I could not find an "International
|
to the C code. (But sadly, I could not find an "International
|
||||||
Obfuscated C COMMENT contest". So I HAD to sent this entry
|
Obfuscated C COMMENT contest". So I HAD to send this entry
|
||||||
here to the IOCCC itself).
|
here to the IOCCC itself).
|
||||||
|
|
||||||
2. Of the 3 languages in the source, the least obfuscated is
|
2. Of the 3 languages in the source, the least obfuscated is
|
||||||
C (But again, there was NO obfuscated make/shscript contest)
|
C (But again, there was NO obfuscated make/shscript contest)
|
||||||
(Does this hint for a rule in IOCCC-2001 that the major
|
(Does this hint for a rule in IOCCC-2001 that the major
|
||||||
obfuscation should be in C and not elsewhere???. Mmmmm...)
|
obfuscation should be in C and not elsewhere???. Mmmmm...).
|
||||||
|
|
||||||
3. Extending Argument #2... Obfuscation done in the C code
|
3. Extending Argument #2... Obfuscation done in the C code
|
||||||
(comments?) create obfuscated code for the other 2 languages.
|
(comments?) create obfuscated code for the other 2 languages.
|
||||||
This opens new possibilities to be explored in depth in future
|
This opens new possibilities to be explored in depth in future
|
||||||
IOCCCs
|
IOCCCs.
|
||||||
|
|
||||||
4. LOOKS like a makefile, WORKS like a shell script and COMPILES
|
4. LOOKS like a Makefile, WORKS like a shell script and COMPILES
|
||||||
like a C program
|
like a C program.
|
||||||
|
|
||||||
5. Does something useful (See Notes #1, #2)
|
5. Does something useful (See Notes #1, #2).
|
||||||
|
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
|
1. The program could have been something other than the simple "Hello, world"
|
||||||
|
program that it is. It is possible to do `#include "prog2.c"` in the place of
|
||||||
|
the main(), leaving the complexities of the C file elsewhere and making this
|
||||||
|
source still acceptable to "make" and "sh". The following modification to the
|
||||||
|
last few lines will compile the IOCCC's famous `mkentry.c`.
|
||||||
|
|
||||||
Notes
|
|
||||||
-----
|
|
||||||
1. The program could have been something other than the simple
|
|
||||||
"Hello, world" program that it is. It is possible to do
|
|
||||||
#include "prog2.c" in the place of the main(), leaving the
|
|
||||||
complexities of the C file elsewhere and making this source
|
|
||||||
still acceptable to "make" and "sh". The following modif-
|
|
||||||
ication to the last few lines will compile IOCCCs famous
|
|
||||||
"mkentry.c"
|
|
||||||
|
|
||||||
.PHONY: /* true clean */
|
.PHONY: /* true clean */
|
||||||
#undef true
|
#undef true
|
||||||
#include "mkentry.c"
|
#include "mkentry.c"
|
||||||
|
|
||||||
|
|
||||||
Ain't that useful?
|
Ain't that useful?
|
||||||
|
|
||||||
2. By extending this program's idea, It is possible to do some
|
2. By extending this program's idea, It is possible to do some
|
||||||
@@ -102,13 +105,13 @@ Selected Author's Comments:
|
|||||||
[obfuscated?] C code. (Maybe should try this if this program
|
[obfuscated?] C code. (Maybe should try this if this program
|
||||||
fails at IOCCC 2000)
|
fails at IOCCC 2000)
|
||||||
|
|
||||||
3. Changing the "%:%.c" dependency to a "$(PROG):$(PROG).c" form
|
3. Changing the `%:%.c` dependency to a `$(PROG):$(PROG).c` form
|
||||||
can compile this program with some other make-s (I got it to
|
can compile this program with some other `make`s (I got it to
|
||||||
work in Windows using nmake and Gnuwin32's sh ;-)
|
work in Windows using nmake and Gnuwin32's sh ;-)
|
||||||
|
|
||||||
4. Interesting things to do: try "$ ./tomx.c clean". This will
|
4. Interesting things to do: try `./tomx.c clean`. This will
|
||||||
do the same as "make clean" :-)). Also: "$ ./tomx.c all"
|
do the same as `make clean` :-)). Also: `./tomx.c all`
|
||||||
|
|
||||||
5. Be careful about the Tabs in the source code. Removing them
|
5. Be careful about the Tabs in the source code. Removing them
|
||||||
or converting Tabs to spaces can be disasterous
|
or converting Tabs to spaces can be disastrous.
|
||||||
|
|
||||||
Reference in new issue
Block a user