My simple quine programs : )
Including normal quines, Ouroboros quines and ASCII Art quines.
I have implemented a simple ASCII art quine program.
The ruby program ./ascii_quine/rumia_ascii.rb
and ./ascii_quine/rumia_ascii2.rb
are implemented using eval and lambda.
It is not just an ASCII Art but also a Quine program, which means the output of this program is its own source code.
You could run the script ./ascii_quine/check_output.sh
to verify.
Here is the screenshot:
./ascii_quine/rumia_ascii.rb
./ascii_quine/rumia_ascii2.rb
There is an Ouroboros ASCII Quine as well. The ruby program ./ascii_quine/cirno.rb
will print another ASCII Art Komeji Koishi. Then the Komeji Koishi will ASCII Art print Rumia. Finally, Rumia will print Cirno again. You could check the file cirno_result.txt
to view these results.
Here are the screenshots:
You could run the script ./ascii_quine/check_output.sh
to verify.
The image ./ascii_quine/src/cirno.jpg
is created by Zhihu user 天才琪露诺
The image ./ascii_quine/src/koishi.jpg
is created by Zhihu user 古明地恋
I have implemented normal quine using different langages.
Normal Quines will print its own source code.
You could run the script ./normal_quine/check_output.sh
to verify.
The C quine program ./normal_quine/printf.c
is implemented using printf. Classic implementation :)
The C++ quine program ./normal_quine/str_replace.cpp
is implemented using std::string::replace.
./normal_quine/eval.rb
is implemented using eval../normal_quine/str_format.rb
is implemented using ruby string format../normal_quine/heredoc.rb
is implemented using ruby heredoc../normal_quine/base64.rb
is implemented using base64../normal_quine/eval2.rb
is implemented using eval as well, which is from ta-chibana's ASCII quine.
I have implemented Ouroboros quine using different langages as well.
Ouroboros Quines will print another source code written in different language, which will print another source code as well. Eventually, the original source code of first program will be printed.
The C and Python Ouroboros quine is under folder ./ouroboros_quine/c_python/
The C program quine.c
will output the python program quine.py
,
while the python program quine.py
will output the C program quine.c
.
You could run the script check_output.sh
to verify~
The Ruby and Python Ouroboros quine is under folder ./ouroboros_quine/ruby_python/
The Ruby program quine.rb
will output the python program quine.py
,
while the Python program quine.py
will output the Ruby program quine.rb
.
You could run the script check_output.sh
to verify~