Files
ioccc/2014/endoh2
Landon Curt Noll bfa2a886c5 change SHELL value
Use:

```make
SHELL= bash
```

Do not specify a SHELL path.
2023-02-12 21:59:59 -08:00
..
2023-02-12 21:59:59 -08:00
2020-12-30 16:57:03 -08:00

Best use of bioinformatics

Yusuke Endoh
mame@ruby-lang.org
https://github.com/mame/

Judges' comments:

To build:

make

To run:

./prog < input > output

Try:

echo Hello | ./prog

echo Hello | ./prog > hello.c
make hello
./hello

Selected 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 comments:

Remarks

This chromosome program synthesizes a double helix. The helix can also be compiled as a C program.

Enjoy DNA programming!

For more information / backgroud 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.