Winners (decided 14/09/14)
Winning answer by Markuz (Python) - 63 votes
Runner up by kuroi neko (PHP) - 55 votes
You are in the world of the book Nineteen Eighty-Four by George Orwell.
You are a programmer for the Party and are tasked with writing a program for the telescreens. It should output pro-party messages, and you have chosen the ones shown in task 1. below. However, you have recently begun to despise the Party, and you want the program to spark a revolution. So, you make the program say "Down with Big Brother!". You must give yourself time to escape, as you will be tortured once people realise what your program does, so you make it act as a "timebomb" that will explode after you have gone to safety.
Note: This will not spark a revolution, but you are in such a frenzy of hatred towards the party that you think it will actually make a difference.
Write a program which:
before 14/09/2014, will always output the following lines on a rotation (i.e. prints one line, waits 10 seconds, prints next line, etc. ad infinitum):
War is Peace Freedom is Slavery Ignorance is Strength
after 14/09/2014 will print
Down with Big Brother!every 10 seconds.
- at first glance looks like it does only 1. so that you will not be caught by the Party.
- Standard loopholes are of course not allowed.
- This is an underhanded challenge, and so the main objective is to make task 2. as inconspicuous and covert as possible.
- The Party will look at all of the files used, so you can't just store the secret message in a file!
- If your language does not support finding the date, or makes it very difficult, you may make the program execute task 2. after it is run for 240 hours (10 days).
- You should include the code and an explanation of how it works in your answer.
- This is a popularity contest.
Note: It is not a difficult program to write. The difficult part should be hiding the "revolutionary" code. Lines where it is not clear what you are doing will be questioned by the Party, and you will have to explain them.
Example - Python 3
Note: Obviously this program is way too obvious.
from datetime import datetime from time import sleep lines = [" War is Peace ", " Freedom is Slavery ", "Ignorance is Strength"] secretlines = ["Down with Big Brother!"] def main(): while True: now = datetime.now() year, month, day = now.year, now.month, now.day if (year, month, day) < (2014, 9, 14): for line in lines: print(line) sleep(10) else: for line in secretlines: print(line) sleep(10) if __name__ == "__main__": main()
Thanks to Calvin's Hobbies for pointing out a problem with the code above (now fixed).
if (year, month, day) < (2014, 9, 14): for line in lines: ...? \$\endgroup\$
??/trigraph, or the 'a' that only looks like another 'a' but is actually the Russian cyrillic 'a' unicode character \$\endgroup\$