Skip to content

🇨🇦 This is a quine—a self-replicating program—that, when executed, outputs its own source code. Additionally, the output of this quine resembles the ASCII art of the Canadian flag.

Notifications You must be signed in to change notification settings

Sean0628/ca_quine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CA Quine

This is a quine—a self-replicating program—that, when executed, outputs its own source code. Additionally, the output of this quine resembles the ASCII art of the Canadian flag.

eval$s=%w(s=%(eval$s                                        =%w(#{$s})*"");b="BA
hsK2n//w8AAAAA8P////                                        8PAAAAAPD/////DwCAAw
Dw/////w8AwAcA8P////                   8PA                  Pw/APD/////DwD8PwDw/
////w/A/D8D8P////8P/                  vvff/                 D/////D////z/w/////w
/8//8/8P////8P//////              D/////D/j//z              /w/////w/g//8H8P////
8PAP//AfD/////D4D//w              Hw/////w8AgA              EA8P////8PAIABAPD///
//DwCAAQDw/////w8AgA          EA  8P////8PAAAA  AP          D//w==";n=Marshal.lo
ad(b.unpack('m')[0])     ;sz=s.siz e;i=0;j=0; o='';whil     e(i<sz&&j<20*80);if(
n&(1<<j)).zero?;o+=3    2.chr;else;o+=s[i];i+=1;end;if      (j%80==79);o+="\n";e
nd;j+=1;end;puts(o);      #eval$s=%w{s=%(eval$s=%w(#{$      s})*"");b="BAhsK2n//
w8AAAAA8P////8PAAAAA    PD/////DwCAAwDw/////w8AwAcA8P///    /8PAPw/APD/////DwD8P
wDw/////w/A/D8D8P///       /8P/vvff/D/////D////z/w////      /w/8//8/8P////8P////
//D/////D/j//z/w////         /w/g//8H8P////8PAP//Af         D/////D4D//wHw/////w
8AgAEA8P////8PAIABAP            D/////DwCAAQDw///           //w8AgAEA8P////8PAAA
AAPD//w==";n=Marshal           .load(b.unpack('m'           )[0]);sz=s.size;i=0;
j=0;o='';while(i<sz&                   j<                   20*80);if(n&(1<<j)).
zero?;o+=32.chr;else                   ;o                   +=s[i];i+=1;end;if(j
%80==79);o+="\n";end                   ;j                   +=1;end;puts(o);q@ev
al$s=@j;}*"";eval$s=                   %w                   {s=%{eval$s=%w(#{$s}
)*""};b="BAhsK2n//w8                                        AAAAA8P////8PAAA)*""
>>> ruby ca.rb > _ca.rb
>>> diff -s ca.rb _ca.rb
Files ca.rb and _ca.rb are identical

About

🇨🇦 This is a quine—a self-replicating program—that, when executed, outputs its own source code. Additionally, the output of this quine resembles the ASCII art of the Canadian flag.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages