Author:
- Name: Yusuke Endoh
Location: JP - Japan
To build:
make
To use:
./prog < input > output
Try:
./try.sh
Judges’ remarks:
If you look closely at the source, you will see code that appears to puts C code that includes itself. How and why? Perhaps it is in the DNA code of the code? Perhaps there are 23 reasons? :-)
Author’s remarks:
Remarks
This chromosome program synthesizes a double helix. The helix can also be compiled as a C program.
Enjoy DNA programming!
For more information / background reading:
This program was inspired by Acme::DoubleHelix: http://search.cpan.org/~xern/Acme-DoubleHelix-0.01/
The synthesized helix just includes the original program at the head. Do you see how prog.c determines whether it was invoked as a standalone program or included as a header file? Note that it does not use any gcc extension such as
__INCLUDE_LEVEL__
.The synthesized helix of course follows the base-pairing rules for DNA: A is bonding only to T, and C is bonding only to G.
Inventory for 2014/endoh2
Primary files
- prog.c - entry source code
- Makefile - entry Makefile
- prog.orig.c - original source code
- try.sh - script to try entry
Secondary files
- 2014_endoh2.tar.bz2 - download entry tarball
- README.md - markdown source for this web page
- .entry.json - entry summary and manifest in JSON
- .gitignore - list of files that should not be committed under git
- .path - directory path from top level directory
- index.html - this web page