-1
\$\begingroup\$

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.
\$\endgroup\$

closed as unclear what you're asking by Iszi, manatwork, Doorknob, Peter Taylor, user8777 Dec 19 '13 at 23:08

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    \$\begingroup\$ This looks like it should probably go through the Sandbox for hammering out bugs/ambiguities in the rules/scoring first. \$\endgroup\$ – Iszi Dec 19 '13 at 19:37
  • \$\begingroup\$ @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. \$\endgroup\$ – hildred Dec 19 '13 at 20:00
  • 1
    \$\begingroup\$ “non-wrapping text and code is preferred. (78 chars/line)” What does that mean? Enforce it or don’t. \$\endgroup\$ – Ry- Dec 19 '13 at 20:21
  • 2
    \$\begingroup\$ "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? \$\endgroup\$ – Cruncher Dec 19 '13 at 21:19
  • 2
    \$\begingroup\$ @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? \$\endgroup\$ – Iszi Dec 19 '13 at 22:25
4
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ 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. \$\endgroup\$ – hildred Dec 19 '13 at 22:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.