Spinning Quine
Update
After completing this page/project I did a web search for my spinning
quine page. It turns out, someone else had a very similar idea. They made a
"spiraling" quine in perl. I guess great minds think alike ;-). Any ways,
here is a link to the
page with the spiraling quine. It is a lot different than mine, because they
made use of perl's ability to evaluate a string as code. Something you can't
do in C (unless you write your own interpreter). So, the code ends up being
much smaller.
Introduction
After completing a simple quine, I decided to try something a bit more
challenging. The result is the following iterating quine. An iterating quine
is a program that outputs the source code of another program. The new program
can then be compiled, and it outputs the source code for another program. This
process can be continued until eventually the n'th program outputs the original
program.
Here is the source code for the first program in the sequence. If you look
at the sequence of programs generated, the spiral of text in the array can
be seen "spinning" clock-wise.
Source: spinningquine.c
Warning: require_once(../../../../../../php/Beautifier/Init.php): Failed to open stream: No such file or directory in ../../functions.php on line 57
Fatal error: Uncaught Error: Failed opening required '../../../../../../php/Beautifier/Init.php' (include_path='.:/usr/pkg/lib/php82') in ../../functions.php:57
Stack trace:
#0 ../../functions.php(312): InitBeatifier()
#1 ../../functions.php(347): displayFile()
#2 /sdf/www/af/d/dwcope/projects/spinningquine/index.php(37): displayDLFile()
#3 {main}
thrown in ../../functions.php on line 57
|