Fixes and updates to 2000/tomx
Format fixes in README.md. Link fix via the Internet Wayback Machine. This was also fixed in winners.csv and winners.html. Copy ../mkentry.c to this directory because the author made an example of where one can modify the program to compile it instead - it felt better than to change it to ../mkentry.c as that assumes the directory structure is the same. Added mkentry to .gitignore.
This commit is contained in:
1 parent
93e97ec356
commit
bee1d82370
5 files changed
+1303
-33
No files matched your search
@@ -1 +1,2 @@
|
|||||||
tomx
|
tomx
|
||||||
|
mkentry
|
||||||
+27
-31
@@ -1,12 +1,11 @@
|
|||||||
# Most Complete Program
|
# Most Complete Program
|
||||||
|
|
||||||
Thomas P John
|
Thomas P John
|
||||||
Mishybi Plamoottil
|
Mishybi Plamoottil
|
||||||
Parottukonam
|
Parottukonam
|
||||||
Nalanchira P.O, Trivandrum-695015
|
Nalanchira P.O, Trivandrum-695015
|
||||||
India
|
India
|
||||||
|
<https://web.archive.org/web/20010720192926/http://tomx.tripod.com/>
|
||||||
http://tomx.tripod.com/
|
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
@@ -43,22 +42,21 @@ 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
|
||||||
to it than you might think, since you have to make sure that your
|
to it than you might think, since you have to make sure that your
|
||||||
changes don't change the shell code or the makefile.
|
changes don't change the shell code or the Makefile.
|
||||||
|
|
||||||
## Author's remarks:
|
## Author's remarks:
|
||||||
|
|
||||||
### 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
|
||||||
Shell (/bin/sh) script. But unlike some other multi-language prog-
|
(`/bin/sh`) script. But unlike some other multi-language programs, this one is
|
||||||
rams, this one is NOT meant to print "Hello, world" in all 3 cases
|
NOT meant to print "Hello, world" in all 3 cases (At least in the true sense
|
||||||
(At least in the true sense ;-)). The C, make and shell code build
|
;-)). The C, make and shell code build upon each other to create a C program (?)
|
||||||
upon each other to create a C program (?) which when executed as a
|
which when executed as a shell script will compile itself through the C compiler
|
||||||
shell script will compile itself through the C compiler using a
|
using a Makefile! - Pretty useful, Eh?
|
||||||
makefile! - Pretty useful, Eh?.
|
|
||||||
|
|
||||||
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
|
||||||
("Your entry must be a complete program") in the strictest sense;-)
|
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
|
||||||
|
|
||||||
@@ -76,27 +74,25 @@ 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.
|
`IOCCC`s.
|
||||||
|
|
||||||
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 and #2 below).
|
||||||
|
|
||||||
|
|
||||||
### Notes
|
### Notes
|
||||||
|
|
||||||
1. The program could have been something other than the simple "Hello, world"
|
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
|
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
|
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
|
source still acceptable to `make` and `sh`. The following modification to the
|
||||||
last few lines will compile the IOCCC's famous `mkentry.c`.
|
last few lines will compile the IOCCC's famous [mkentry.c](mkentry.c).
|
||||||
|
|
||||||
```make
|
.PHONY: /* true clean */
|
||||||
.PHONY: /* true clean */
|
#undef true
|
||||||
#undef true
|
#include "mkentry.c"
|
||||||
#include "mkentry.c"
|
|
||||||
```
|
|
||||||
|
|
||||||
Ain't that useful?
|
Ain't that useful?
|
||||||
|
|
||||||
@@ -104,18 +100,18 @@ Ain't that useful?
|
|||||||
very interesting things like generating C code on execution
|
very interesting things like generating C code on execution
|
||||||
by adding additional code in make/sh (open up a loop????).
|
by adding additional code in make/sh (open up a loop????).
|
||||||
This opens the possibilities of generating & compiling some
|
This opens the possibilities of generating & compiling some
|
||||||
[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 disastrous.
|
or converting tabs to spaces can be disastrous.
|
||||||
|
|
||||||
## Copyright and CC BY-SA 4.0 License:
|
## Copyright and CC BY-SA 4.0 License:
|
||||||
|
|
||||||
|
|||||||
+1273
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -179,7 +179,7 @@ Teemu Rantanen,Teemu_Rantanen,http://www.cs.hut.fi/~tvr/,null,tvr@cs.hut.fi,null
|
|||||||
Tero Kivinen,Tero_Kivinen,http://www.iki.fi/kivinen/,null,kivinen@iki.fi,null,null);
|
Tero Kivinen,Tero_Kivinen,http://www.iki.fi/kivinen/,null,kivinen@iki.fi,null,null);
|
||||||
Thaddaeus Frogley,Thaddaeus_Frogley,http://thad.notagoth.org/,null,codemonkey_uk@hotmail.com,null,null);
|
Thaddaeus Frogley,Thaddaeus_Frogley,http://thad.notagoth.org/,null,codemonkey_uk@hotmail.com,null,null);
|
||||||
Thomas A. Fine,Thomas_A._Fine,http://hea-www.harvard.edu/~fine/,null,fine@head-cfa.harvard.edu,null,null);
|
Thomas A. Fine,Thomas_A._Fine,http://hea-www.harvard.edu/~fine/,null,fine@head-cfa.harvard.edu,null,null);
|
||||||
Thomas P John,Thomas_P_John,http://tomx.tripod.com/,null,thomaspjohn@hotmail.com,null,null);
|
Thomas P John,Thomas_P_John,https://web.archive.org/web/20010720192926/http://tomx.tripod.com/,thomaspjohn@hotmail.com,null,null);
|
||||||
Thomas Stewart,Thomas_Stewart,null,null,null,US,null);
|
Thomas Stewart,Thomas_Stewart,null,null,null,US,null);
|
||||||
Thor Eldby,Thor_Eldby,null,null,null,null,null);
|
Thor Eldby,Thor_Eldby,null,null,null,null,null);
|
||||||
Timo Poikola,Timo_Poikola,https://ig.fi/other/ioccc,null,timo@ig.fi,null,@timpoiko);
|
Timo Poikola,Timo_Poikola,https://ig.fi/other/ioccc,null,timo@ig.fi,null,@timpoiko);
|
||||||
|
|||||||
|
Can't render this file because it contains an unexpected character in line 23 and column 6.
|
+1
-1
@@ -663,7 +663,7 @@ Contest </I></FONT></CENTER><BR>
|
|||||||
<!-- J J J J J J J J J J J J J J J J J J J J J J J - -->
|
<!-- J J J J J J J J J J J J J J J J J J J J J J J - -->
|
||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
<LI TYPE=none><A NAME="Thomas_P_John"></A><B><a href="mailto:thomaspjohn@hotmail.com">Thomas P John</a></B> -- <A HREF="http://tomx.tripod.com/">http://tomx.tripod.com/</a>
|
<LI TYPE=none><A NAME="Thomas_P_John"></A><B><a href="mailto:thomaspjohn@hotmail.com">Thomas P John</a></B> -- <A HREF="https://web.archive.org/web/20010720192926/http://tomx.tripod.com/">https://web.archive.org/web/20010720192926/http://tomx.tripod.com/</a>
|
||||||
<UL>
|
<UL>
|
||||||
<LI TYPE=square>Most Complete Program (<A HREF="years.html#2000_tomx">2000 tomx</A>)
|
<LI TYPE=square>Most Complete Program (<A HREF="years.html#2000_tomx">2000 tomx</A>)
|
||||||
</UL><BR>
|
</UL><BR>
|
||||||
|
|||||||
Reference in new issue
Block a user