Chapter 14 in the book discusses quines. This embedding of meaning inside exterior messages is used constantly in programming, whether it is hooking together multiple tiers of architecture (server in C, application in Java, database in SQL, UI in Java), or working in cybersecurity (delivering payloads in small, space-limited locations that must expand themselves.
Write a quine program. The number of languages the quine works in must be at least one more than the number of people in the group (so, 2-5 languages). The quine may be any of these forms, in increasing difficulty:
- Quine Relay
- Multiquine
- Polyglot Quine
Note that there are indeed many quines extant on the Internet. As usual, feel free to use these for inspiration, but copying these wholesale will go poorly for you.
Further, note how incredibly badly your program may be disturbed by errant spaces, tabs, or punctuation. Make sure your source file(s) amongst your team members all agree.
Every bit of program output for a given language must be identical, no matter how many times it is run, and that must be identical to the original version (if applicable). This includes invisible characters, such as spaces and tabs, spaces at the end of your lines, line endings, blank lines at the end of the file, EVERYTHING.
Make sure you use the diff
and md5sum
programs on GL to ensure that your programs are identical. I was lenient for the midterm, I will not be for this final project.
The restriction on programming languages is lifted for this project. You may use any languages, including ones you have used in previous projects.