Python 2, jiggabytes.
Here's a small variant. I'd use some dataset like all the phone conversations in the world over the last 6 months, but some jackass can't figure out power to the building. Oh, and they haven't responded to my FOIA* request.
s='Another one got caught today, it\'s all over the papers. "Teenager Arrested in Computer Crime Scandal", "Hacker Arrested after Bank Tampering"...\n\nDamn kids. They\'re all alike.\n\nBut did you, in your three-piece psychology and 1950\'s technobrain, ever take a look behind the eyes of the hacker? Did you ever wonder what made him tick, what forces shaped him, what may have molded him?\n\nI am a hacker, enter my world...\n\nMine is a world that begins with school... I\'m smarter than most of the other kids, this crap they teach us bores me...\n\nDamn underachiever. They\'re all alike.\n\nI\'m in junior high or high school. I\'ve listened to teachers explain for the fifteenth time how to reduce a fraction. I understand it. "No, Ms. Smith, I didn\'t show my work. I did it in my head..."\n\nDamn kid. Probably copied it. They\'re all alike.\n\nI made a discovery today. I found a computer. Wait a second, this is cool. It does what I want it to. If it makes a mistake, it\'s because I screwed it up. Not because it doesn\'t like me... Or feels threatened by me.. Or thinks I\'m a smart ass.. Or doesn\'t like teaching and shouldn\'t be here...\n\nDamn kid. All he does is play games. They\'re all alike.\n\nAnd then it happened... a door opened to a world... rushing through the phone line like heroin through an addict\'s veins, an electronic pulse is sent out, a refuge from the day-to-day incompetencies is sought... a board is found. "This is it... this is where I belong..." I know everyone here... even if I\'ve never met them, never talked to them, may never hear from them again... I know you all...\n\nDamn kid. Tying up the phone line again. They\'re all alike...\n\nYou bet your ass we\'re all alike... we\'ve been spoon-fed baby food at school when we hungered for steak... the bits of meat that you did let slip through were pre-chewed and tasteless. We\'ve been dominated by sadists, or ignored by the apathetic. The few that had something to teach found us willing pupils, but those few are like drops of water in the desert.\n\nThis is our world now... the world of the electron and the switch, the beauty of the baud. We make use of a service already existing without paying for what could be dirt-cheap if it wasn\'t run by profiteering gluttons, and you call us criminals. We explore... and you call us criminals. We seek after knowledge... and you call us criminals. We exist without skin color, without nationality, without religious bias... and you call us criminals. You build atomic bombs, you wage wars, you murder, cheat, and lie to us and try to make us believe it\'s for our own good, yet we\'re the criminals.\n\nYes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.\n\nI am a hacker, and this is my manifesto. You may stop this individual, but you can\'t stop us all... after all, we\'re all alike.\n;from hashlib import*;h=new("sha512");h.update(`s`);h=h.digest().encode("base64");print(%r==h)*(\'s=\'+`s`+s[2952:]%%h)';from hashlib import*;h=new("sha512");h.update(`s`);h=h.digest().encode("base64");print('25eLAyYiA1nZPZQ6u0QwdIcPdypqedXDgGtwY1E7R1cYo6amjKxOl18rmmyGBMHyzW7tQPjYziOk\nXNQd+Egpeg==\n'==h)*('s='+`s`+s[2952:]%h)
How it works
The quine starts by defining a string s
which contains a payload followed by the quine code. You'd like to delete that junk to golf the quine. But you can't, because the quine contains a cryptographically strong hash of s
. If the hash of s
doesn't match that in the quine, it doesn't print.
Initially, I'd used this article for the payload but a government conspiracy** prevented me from pasting in the 34k program. The choice of article was not random: the NSA may know how to delete characters from this quine to preserve the hash. So, I used the Hacker Manifesto. Not that I'm actually that kind of hacker... but it seemed appropriate to draw an analogy.
To really beef up security, I even included the length of the hashed string. As everybody knows, this makes hashes like a million million times more secure. But this is even better than that, because you'd have to delete some subset of the length if you've deleted some of the hashed text.
Here's the prequine.
s=open("anyfile").read()
t=""";from hashlib import*;h=new("sha512");h.update(`s`);h=h.digest().encode("base64");print(%%r==h)*('s='+`s`+s[%d:]%%%%h)"""%len(s)
from hashlib import*
h=new('sha512')
h.update(`s+t`)
h=h.digest().encode('base64')
print"s="+`s+t`+t%h
*BTLT+JTWAQFZC3zIr29pQO6BbKSz6lNS7vqbyrLj8osjiphxgkgr9GsySFBMp0ZCor8aTVc94Xdji4KaSX543Q==
** Or, y'know, because it was over the site size limit for a post.
So, if you use a language which supports the null quine (an empty file), are all characters redundant? – boothby – 2014-01-06T23:02:53.983
@boothby: There are no characters, so they can't be redundant. Anyway, you won't win if you post a null quine. – ProgramFOX – 2014-01-07T17:25:52.420
No. I mean: Python supports a null quine. Therefore, I believe that any quine written in Python is 100% redundant: you can delete all of its characters and the result is a quine. – boothby – 2014-01-07T19:38:58.697
@boothby: I don't treat all characters in a language that supports a null quine as redundant characters. – ProgramFOX – 2014-01-08T14:30:59.463
I think that you should specify that all characters should be directly related to the execution of the quine code, so padding with whitespace, comments, useless string data, etc is disallowed. – Sammitch – 2014-01-09T18:21:37.987
I think this is much more impressive than the golf version. – Embattled Swag – 2014-01-10T21:43:48.770
@Sammitch: Because there are already some answers, it's not allowed to change the rules because this can make some answers invalid. – ProgramFOX – 2014-01-11T10:39:10.723