Four score and twenty. (Complete Obfuscation)

-1

This challenge is to write a program that prints a great famous speech.

Goals:

  • Obfuscated text (you should not be able to tell what speech it prints without running it)
  • Obfuscated code (it is more fun if you cant figure out how it works)
  • non-wrapping text and code is preferred. (78 chars/line)
  • Low score wins.

Rules:

  1. When picking a speech it must be famous: it must have at least three published references (newspaper, history book, or similar) websites only count 1/3 unless associated with a dead tree publication. (if only using websites you need 9)
  2. When picking a speech it must be great: it must not be too short (5 sentence minimum) or too long (It should be able to be read in less than 15 minutes) and have real meaning (you must assert that you have a strong opinion about the speech)
  3. No input (files, web, etc.)

Scoring:

  1. Punctuation and white space has no score.
  2. Words found in the speech count 20 points.
  3. Words not found in the speech count one point.
  4. choice of language:
    • golf languages where the longest command is 1 letter cost 15 points.
    • languages that print to output by default cost 3 points.
    • interpreted languages cost 1 point.
    • java and languages where a typical method call is longer than 20 chars get a -5 point bonus.
  5. three free lines of boilerplate (warnings, standard i/o, #!) boilerplate must be generic.

hildred

Posted 2013-12-19T19:29:51.197

Reputation: 1 329

Question was closed 2013-12-19T23:08:51.890

3This looks like it should probably go through the Sandbox for hammering out bugs/ambiguities in the rules/scoring first. – Iszi – 2013-12-19T19:37:50.020

@Iszi did you have any specific recommendations to make or did this just look too complicated? before posting this I read the rules proposed in atomic scoring(meta) and looked at a couple questions with great ideas that had failed because the scoring was not well thought out. your advice is appreciated. – hildred – 2013-12-19T20:00:15.977

I'm not 100% sure the scoring rules are appropriately adjusted, but will let others weigh in. Other than that, leaving the speech choice up to the contestants is horrifically ambiguous even if you have set some sort of objective quality standards. Also, obfuscation of code in general is subjective. – Iszi – 2013-12-19T20:04:33.117

1“non-wrapping text and code is preferred. (78 chars/line)” What does that mean? Enforce it or don’t. – Ry- – 2013-12-19T20:21:13.423

@minitech the Goals are subjective, intentionally, to provide guidance of intent, but as they cannot be scored are not scored. They will only earn you smart remarks. The rules are enforced, the scoring tells you how you did. – hildred – 2013-12-19T20:31:15.743

@Iszi My intent was to solicit maximum creativity, by allowing flexibility, but still having a specific non disputable way to win. – hildred – 2013-12-19T20:34:13.053

Careful how you do that - that's usually how loopholes are made. – Iszi – 2013-12-19T20:35:33.597

2"This is one. This is two. This is three. This is four. This is five" Can I post this on 9 block sites and use it? – Cruncher – 2013-12-19T21:19:35.737

@Cruncher what is your strong opinion about that speech? – hildred – 2013-12-19T21:21:00.267

@hildred That's not a requirement. I simply have to assert that I do have a strong opinion about it. – Cruncher – 2013-12-19T21:56:45.327

@Cruncher Those Five sentences do not appear to have real meaning, and if you assert that you have a strong opinion about them I will make fun of you, because I would be unable to reach any conclusion other than that you have abnormal mental development. – hildred – 2013-12-19T22:03:39.963

2@Cruncher is pointing out exactly what I'm talking about, and jazzpi's answer also calls out further ambiguity in the rules. (Personally I would feel that language keywords should not count against "words found in the speech".) Also, what counts as a "word" - whether in the speech or not? Do gibberish character combinations qualify? – Iszi – 2013-12-19T22:25:56.140

whitespace has no score? Ok, write it in whitespace. – Johannes Kuhn – 2013-12-21T13:06:22.160

Some suggestions: 1. submitters should reveal the output (until the submission period, say, 3 weeks, has ended); others should post comments in which they attempt to identify the speech (BEFORE RUNNING THE CODE). 2. Score is the number of incorrect ids MINUS correct ids. 3. Obfuscation and subterfuges of any sort are encouraged. 4. To be an eligible submitter, one must post guesses that aim to identify the speech of each of the other submissions! 5. Once a guess is posted, it cannot be changed. – DavidC – 2013-12-21T21:16:37.997

Answers

4

Python

import sys, this
sys.stderr.write(''.join(map(lambda i: this.d.get(i, i),
'V nz cebhq gb pbzr gb guvf pvgl nf gur thrfg bs lbhe qvfgvathvfurq Znlbe, jub '
'unf flzobyvmrq guebhtubhg gur jbeyq gur svtugvat fcvevg bs Jrfg Oreyva. Naq V '
'nz cebhq gb ivfvg gur Srqreny Erchoyvp jvgu lbhe qvfgvathvfurq Punapryybe jub '
'sbe fb znal lrnef unf pbzzvggrq Treznal gb qrzbpenpl naq serrqbz naq '
'cebterff, naq gb pbzr urer va gur pbzcnal bs zl sryybj Nzrevpna, Trareny '
'Pynl, jub unf orra va guvf pvgl qhevat vgf terng zbzragf bs pevfvf naq jvyy '
'pbzr ntnva vs rire arrqrq. \n\nGjb gubhfnaq lrnef ntb gur cebhqrfg obnfg jnf '
'"pvivf Ebznahf fhz." Gbqnl, va gur jbeyq bs serrqbz, gur cebhqrfg obnfg vf '
'"Vpu ova rva Oreyvare." \n\nV nccerpvngr zl vagrecergre genafyngvat zl '
'Trezna! \n\nGurer ner znal crbcyr va gur jbeyq jub ernyyl qba\'g haqrefgnaq, '
'be fnl gurl qba\'g, jung vf gur terng vffhr orgjrra gur serr jbeyq naq gur '
'Pbzzhavfg jbeyq. Yrg gurz pbzr gb Oreyva. Gurer ner fbzr jub fnl gung '
'pbzzhavfz vf gur jnir bs gur shgher. Yrg gurz pbzr gb Oreyva. Naq gurer ner '
'fbzr jub fnl va Rhebcr naq ryfrjurer jr pna jbex jvgu gur Pbzzhavfgf. Yrg '
'gurz pbzr gb Oreyva. Naq gurer ner rira n srj jub fnl gung vg vf gehr gung '
'pbzzhavfz vf na rivy flfgrz, ohg vg crezvgf hf gb znxr rpbabzvp cebterff. '
'Ynff\' fvp anpu Oreyva xbzzra. Yrg gurz pbzr gb Oreyva. \n\nSerrqbz unf znal '
'qvssvphygvrf naq qrzbpenpl vf abg cresrpg, ohg jr unir arire unq gb chg n '
'jnyy hc gb xrrc bhe crbcyr va, gb cerirag gurz sebz yrnivat hf. V jnag gb '
'fnl, ba orunys bs zl pbhagelzra, jub yvir znal zvyrf njnl ba gur bgure fvqr '
'bs gur Ngynagvp, jub ner sne qvfgnag sebz lbh, gung gurl gnxr gur terngrfg '
'cevqr gung gurl unir orra noyr gb funer jvgu lbh, rira sebz n qvfgnapr, gur '
'fgbel bs gur ynfg 18 lrnef. V xabj bs ab gbja, ab pvgl, gung unf orra '
'orfvrtrq sbe 18 lrnef gung fgvyy yvirf jvgu gur ivgnyvgl naq gur sbepr, naq '
'gur ubcr naq gur qrgrezvangvba bs gur pvgl bs Jrfg Oreyva. Juvyr gur jnyy vf '
'gur zbfg boivbhf naq ivivq qrzbafgengvba bs gur snvyherf bs. gur Pbzzhavfg '
'flfgrz, sbe nyy gur jbeyq gb frr, jr gnxr ab fngvfsnpgvba va vg, sbe vg vf, '
'nf lbhe Znlbe unf fnvq, na bssrafr abg bayl ntnvafg uvfgbel ohg na bssrafr '
'ntnvafg uhznavgl, frcnengvat snzvyvrf, qvivqvat uhfonaqf naq jvirf naq '
'oebguref naq fvfgref, naq qvivqvat n crbcyr jub jvfu gb or wbvarq gbtrgure. '
'\n\nJung vf gehr bs guvf pvgl vf gehr bs Treznal\xe2\x80\x94erny, ynfgvat '
'crnpr va Rhebcr pna arire or nffherq nf ybat nf bar Trezna bhg bs sbhe vf '
'qravrq gur ryrzragnel evtug bs serr zra, naq gung vf gb znxr n serr pubvpr. '
'Va 18 lrnef bs crnpr naq tbbq snvgu, guvf trarengvba bs Treznaf unf rnearq '
'gur evtug gb or serr, vapyhqvat gur evtug gb havgr gurve snzvyvrf naq gurve '
'angvba va ynfgvat crnpr, jvgu tbbq jvyy gb nyy crbcyr. Lbh yvir va n qrsraqrq '
'vfynaq bs serrqbz, ohg lbhe yvsr vf cneg bs gur znva. Fb yrg zr nfx lbh, nf V '
'pybfr, gb yvsg lbhe rlrf orlbaq gur qnatref bs gbqnl, gb gur ubcrf bs '
'gbzbeebj, orlbaq gur serrqbz zreryl bs guvf pvgl bs Oreyva, be lbhe pbhagel '
'bs Treznal, gb gur nqinapr bs serrqbz rireljurer, orlbaq gur jnyy gb gur qnl '
'bs crnpr jvgu whfgvpr, orlbaq lbhefryirf naq bhefryirf gb nyy znaxvaq. '
'\n\nSerrqbz vf vaqvivfvoyr, naq jura bar zna vf rafynirq, nyy ner abg serr. '
'Jura nyy ner serr, gura jr pna ybbx sbejneq gb gung qnl jura guvf pvgl jvyy '
'or wbvarq nf bar naq guvf pbhagel naq guvf terng Pbagvarag bs Rhebcr va n '
'crnprshy naq ubcrshy tybor. Jura gung qnl svanyyl pbzrf, nf vg jvyy, gur '
'crbcyr bs Jrfg Oreyva pna gnxr fbore fngvfsnpgvba va gur snpg gung gurl jrer '
'va gur sebag yvarf sbe nyzbfg gjb qrpnqrf. \n\nNyy serr zra, jurerire gurl '
'znl yvir, ner pvgvmraf bs Oreyva, naq, gurersber, nf n serr zna, V gnxr cevqr '
'va gur jbeqf "Vpu ova rva Oreyvare!"')))

This should be run with

$ python codegolf.py > /dev/null

I guess the text is pretty obfuscated, and the code as well, if you didn't take a closer look into the this module. Instead of 78 chars, I stuck to 80.

Score:

Language choice:

Interpreted language: 1

Code words:

The words found in the speech are this (1x), for (1x) but I guess they don't really count since they are language keywords (?).

If they count, this is 29. Otherwise, it's 11.

Encoded speech words:

I guess I have a disadvantage here due to picking a long speech. But it has a total of 673 words, none of them in the speech.

Total score:

Best case (Not counting language keywords and encoded speech words):

1 + 11 = 12

Worst case (Counting language keywords and encoded speech words):

1 + 29 + 673 = 703

Note: Speech is used from here.

jazzpi

Posted 2013-12-19T19:29:51.197

Reputation: 846

language keywords used in the speech count as words used in the speech. your worst case is the correct score. Great job to kick things off with. Let's see if you keep the checkmark. – hildred – 2013-12-19T22:21:53.533