Skip to content
/ Quine Public

A quine is a computer program which takes no input and produces a copy of its own source code as its only output.

License

Notifications You must be signed in to change notification settings

thsmi/Quine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

What ist a Quine?

A Quine is a self-replicating (compiled) programm. It generates a copy of its own source code.

I did this Java quine back in 2004, at this time there was no Java example at Wikipedia like it is now. So we wondered if it's possible to hack a Quine in Java within reasonable time. So I acceped the callange and put it on a test. It took way less time than expected, actually way less than a hour!

But be warned the code is an ugly oneliner without any linebreaks. It's just a prove of concept.

The rationale behind building such a quine is prettry straight forward. You need a string which serves on the one hand as a rough outline of the sourcecode and on the other hand as a reservoir for escape characters, keywords and whitespace. When printing to stdout you just copy characters or blocks form this string.

About

A quine is a computer program which takes no input and produces a copy of its own source code as its only output.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages