Metapoem equinox

8

2

Objective:

  • Write one program that outputs sourcecode for another program that outputs words.

General information:

  • Any programming language.

Rules:

  1. Your programs should not take any input. (from user, filename, network or anything).
  2. The generated program sourcecode must not be in the same programming language as the original.
  3. The output from the generated program should be exactly every third character from the original sourcecode, starting at character #3 (first character in sourcecode is #1).
  4. Sourcecode constraints: Maximum 1500 characters
  5. Sourcecode constraints for generated program: Maximum 250 characters

Scoring is based on the output from the generated program, you get points for the following words (any combination of upper/lowercase):

me - 2 points
ore - 3 points
freq - 5 points
pager - 7 points
mentor - 11 points
triumph - 13 points
equipage - 17 points
equipment - 19 points
equivalent - 23 points
equilibrium - 29 points
unubiquitous - 31 points
questionnaire - 37 points

Each word can be repeated but lose 1 point for each repetition. For example:

  • four of Equilibrium (in any place) in the output gives: 29+28+27+26 points.

Letters in the output can be used in more than one word, for example:

  • equipager = equipage and pager = 17+7 points.

Best score wins. Good luck, have fun!

Plarsen

Posted 2014-01-18T13:57:59.377

Reputation: 1 740

1I don't get the Rule 3! What do you mean? Can you write down an example? – Vereos – 2014-01-18T14:29:02.613

If the sourcecode is this: print("hello") then the output from the generated code must be exactly: i(eo . The output from the generated code can therefor be maximum 500 characters long (since the original sourcecode is limited to 1500 characters). – Plarsen – 2014-01-18T14:34:25.173

2@Plarsen: Shouldn't you update your question then? Now it says "Maximum 250 characters" for the generated program, but in your comment you say "500 characters". – ProgramFOX – 2014-01-18T14:43:50.477

1the maximum sourcecode size for the generated program is 250, but it can output up to 500 characters (if the original sourcecode is 1500 characters) – Plarsen – 2014-01-18T14:45:02.670

Am I correct in thinking that 'mentor' and 'equipment' should get a bonus of 2 points for containing 'me'? – Kendall Frey – 2014-01-18T15:44:48.473

Will i get penalties for using words to often? (mememememe -> 2+1+0-1-2) – quasimodo – 2014-01-18T15:48:59.320

yes, both mentor and equipment contains me and give extra points for the words, but the word me can only give you a total of 3 points. First occurance gives 2 points, second: 1 point and after that zero points. – Plarsen – 2014-01-18T15:49:03.733

@quasimodo no, no penalties – Plarsen – 2014-01-18T15:49:34.237

I wonder how many people will write a program to write their initial program... – Kendall Frey – 2014-01-18T17:40:54.993

How does rule #3 affect newlines and multibyte characters? Do we count every third octet, or every third codepoint, or what? And I'm guessing newlines count as characters as well? – FireFly – 2014-01-18T20:04:31.640

newlines is counted as 1 character. 1 byte is 1 character and the other way round, sorry for not clarifying that. – Plarsen – 2014-01-18T20:07:08.110

Answers

2

Befunge-98, produces zsh script: 150 1053 1113 1139 points

The Befunge-98 program (1500)

:#q #u!#e!#sa#t7#i6#o*#n*#n*#aj#ib#r9#e*#q:#u:#i:#p:#a:#g:#e:#r:#e:#q3#u+#i,#pc#m+#e,#nf#t+#o,#r4#e8#q*#u,#i6#l+#i:#b,#r4#i8#u*#m,#e,#qb#u+#i:#p:#m:#e:#n:#t,#o4#r8#e*#q,#u,#i4#l8#i*#b,#r,#i4#u8#m*#u,#n,#u4#b8#i*#q,#u,#i4#t8#o*#u,#s,#q4#ua#e*#s-#t,#i2#o+#n,#n,#a5#i+#r,#ec#q+#u,#i4#v8#a*#l,#e9#n5#t*#-,#qb#ua#e*#s,#t4#i8#o*#n,#n #a #i #r #e #q #u #i #p #a #g #e #r #e #q #u #i #p #m #e #n #t #o #r #e #q #u #i #l #i #b #r #i #u #m #e #q #u #i #p #m #e #n #t #o #r #e #q #u #i #l #i #b #r #i #u #m #u #n #u #b #i #q #u #i #t #o #u #s #q #u #e #s #t #i #o #n #n #a #i #r #e #q #u #i #v #a #l #e #n #t #- #q #u #e #s #t #i #o #n #n #a #i #r #e #q #u #i #p #a #g #e #r #e #q #u #i #p #m #e #n #t #o #r #e #q #u #i #l #i #b #r #i #u #m #e #q #u #i #p #m #e #n #t #o #r #e #q #u #i #l #i #b #r #i #u #m #u #n #u #b #i #q #u #i #t #o #u #s #q #u #e #s #t #i #o #n #n #a #i #r #e #q #u #i #v #a #l #e #n #t #- #q #u #e #s #t #i #o #n #n #a #i #r #e #q #u #i #p #a #g #e #r #e #q #u #i #p #m #e #n #t #o #r #e #q #u #i #l #i #b #r #i #u #m #e #q #u #i #p #m #e #n #t #o #r #e #q #u #i #l #i #b #r #i #u #m #u #n #u #b #i #q #u #i #t #o #u #s #q #u #e #s #t #i #o #n #n #a #i #r #e #q #u #i #v #a #l #e #n #t #- #q #u #e #s #t #i #o #n #n #a #i #r #e #q #u #i #p #a #g #e #r #e #q #u #i #p #m #e #n #t #o #r #e #q #u #i #l #i #b #r #i #u #m #e #q #u #i #p #m #e #n #t #o #r #e #q #u #i #l #i #b #r #i #u #m #u #n #u #b #i #q #u #i #t #o #u #s:#q2#u+#e0#sg#t,#i3#o+#n:#n #a3#i9#rb#e*#q*#u #i`#v #a!#l #e1#n+jt@#-

produces the zsh shell script (127)

for i in n n n n n;echo -n questionnairequipagerequipmentorequilibriumequipmentorequilibriumunubiquitousquestionnairequivalent-

which in turn of course outputs (500)

questionnairequipagerequipmentorequilibriumequipmentorequilibriumunubiquitousquestionnairequivalent-questionnairequipagerequipmentorequilibriumequipmentorequilibriumunubiquitousquestionnairequivalent-questionnairequipagerequipmentorequilibriumequipmentorequilibriumunubiquitousquestionnairequivalent-questionnairequipagerequipmentorequilibriumequipmentorequilibriumunubiquitousquestionnairequivalent-questionnairequipagerequipmentorequilibriumequipmentorequilibriumunubiquitousquestionnairequivalent-

when executed. This is worth 1139 points (assuming my calculations are correct).

Early version (saved here because it's much easier to try to understand)

The Befunge-98 program

:#m #e!#n!#tb#o9#r*#e*#qj#ub#i9#l*#i:#b:#r:#u2#m+#f,#r,#e5#q+#u,#ec#s+#t,#i8#o4#n*#n,#a #r #i #e #q #u #i #p #m #e #n #t #r #i #u:#m2#p+#h0#ug#n,#u3#b+#i:#qf#uf#i*#t`#o5ju @s#_

produces the Bourne shell script (including a bunch of trailing spaces)

echo mentorequilibrumfrequestionnariequipmentriumphunubiquitous                  

Here is the same program transposed, for easier reading.

: !!b9**jb9*:::2+,,5+,c+,84*,              :2+0g,3+:ff*`5 #
########################################################j@_
mentorequilibrumfrequestionnariequipmentriumphunubiquitous

FireFly

Posted 2014-01-18T13:57:59.377

Reputation: 7 107

I knew someone was going to use echo as the second step eventually. :) – Kendall Frey – 2014-01-18T22:02:58.517

I considered leaving it out and calling the target language "English" or "/bin/cat", but that would probably be a tad cheaty. :P – FireFly – 2014-01-18T22:05:59.623

2

Shellscript and Python - 514 Points

My submission is written in shellscript:

echo   print"'h rthtq""u""e""s""t""i""o""n""n""a""i""r""e""q""u""e""s""t""i""o""n""n""a""i""r""e""q""u""e""s""t""i""o""n""n""a""i""r""e""q""u""e""s""t""i""o""n""n""a""i""r""e""q""u""e""s""t""i""o""n""n""a""i""r""e""q""u""e""s""t""i""o""n""n""a""i""r""e""q""u""e""s""t""i""o""n""n""a""i""r""e""q""u""e""s""t""i""o""n""n""a""i""r""e""u""n""u""b""i""q""u""i""t""o""u""s""u""n""u""b""i""q""u""i""t""o""u""s""u""n""u""b""i""q""u""i""t""o""u""s""u""n""u""b""i""q""u""i""t""o""u""s""u""n""u""b""i""q""u""i""t""o""u""s""e""q""u""i""l""i""b""r""i""u""m""e""q""u""i""l""i""b""r""i""u""m""e""q""u""i""l""i""b""r""i""u""m""e""n""t""o""r""e""q""u""i""p""m""e""n""t""o""r""e""q""u""i""p""m""e""n""t""o""r""e""q""u""i""p""m""e""n""t""o""r'"

It will output the following python code (249 characters):

print'h rthtquestionnairequestionnairequestionnairequestionnairequestionnairequestionnairequestionnairequestionnaireunubiquitousunubiquitousunubiquitousunubiquitousunubiquitousequilibriumequilibriumequilibriumentorequipmentorequipmentorequipmentor'

Whose output contains:

8 * questionnaire: 37+36+35+34+33+32+31+30
5 * unubiquitous: 31+30+29+28+27
3 * equipment: 19+18+17
4 * mentor: 11+10+9+8
3 * ore: 3+2+1
6 * me: 2+1

for a total of 514 Points.

Not very sophisticated, i am sure others can do better :)

quasimodo

Posted 2014-01-18T13:57:59.377

Reputation: 985

1Maybe you can stuff more stuff in if you rearrange so that it goes "questionairequipmentor" – Justin – 2014-01-18T18:01:45.353

Agree with Quincunx, addition to that is I believe one can have advantage of creating an algorithm in the generated code that takes advantage of the frequent use of the characters q u i e in the words worth most to create a 500 character output. But I am not sure – Plarsen – 2014-01-18T19:17:43.573

2

JavaScript & REBEL - 198

Initial program:

console.log( "nll(llf  r  e  q  u  e  s  t  i  o  n  n  a  i  r  e  q  u  i  p  a  g  e  r  u  n  u  b  i  q  u  i  t  o  u  s  e  q  u  i  p  m  e  n  t  o  r  e  q  u  i  v  a  l  e  n  t  r  i  u  m  p  h  e  q  u  i  l  i  b  r  i  u  m+.+ +.$0+;/ + +//.+/$>$0")+0 ;

Generated program:

nll(llf  r  e  q  u  e  s  t  i  o  n  n  a  i  r  e  q  u  i  p  a  g  e  r  u  n  u  b  i  q  u  i  t  o  u  s  e  q  u  i  p  m  e  n  t  o  r  e  q  u  i  v  a  l  e  n  t  r  i  u  m  p  h  e  q  u  i  l  i  b  r  i  u  m+.+ +.$0+;/ + +//.+/$>$0

Output:

nll(llfrequestionnairequipagerunubiquitousequipmentorequivalentriumphequilibrium+.+ +.$0+;

Notes:

Each word is output exactly once, except "me" which is output twice.

You will notice that the generated program is exactly 250 characters long. I didn't notice this until it was written. I consider myself lucky.

Kendall Frey

Posted 2014-01-18T13:57:59.377

Reputation: 2 384

2

Python that outputs C, 947

##q##u##e##s##t##i##o##n##n##a##i##r##e##q##u##i##p##a##g##e##r##e##q##u##i##p##m##e##n##t##o##r##e##q##u##i##v##a##l##e##n##t##r##i##u##m##p##h##u##n##u##b##i##q##u##i##t##o##u##s##q##u##e##s##t##i##o##n##n##a##i##r##e##q##u##i##p##a##g##e##r##e##q##u##i##p##m##e##n##t##o##r##e##q##u##i##v##a##l##e##n##t##r##i##u##m##p##h##u##n##u##b##i##q##u##i##t##o##u##s##q##u##e##s##t##i##o##n##n##a##i##r##e##q##u##i##p##a##g##e##r##e##q##u##i##p##m##e##n##t##o##r##e##q##u##i##v##a##l##e##n##t##r##i##u##m##p##h##u##n##u##b##i##q##u##i##t##o##u##s##q##u##e##s##t##i##o##n##n##a##i##r##e##q##u##i##p##a##g##e##r##e##q##u##i##p##m##e##n##t##o##r##e##q##u##i##v##a##l##e##n##t##r##i##u##m##p##h##u##n##u##b##i##q##u##i##t##o##u##s##q##u##e##s##t##i##o##n##n##a##i##r##e##q##u##i##p##a##g##e##r##e##q##u##i##p##m##e##n##t##o##r##e##q##u##i##v##a##l##e##n##t##r##i##u##m##p##h##u##n##u##b##i##q##u##i##t##o##u##s##q##u##e##s##t##i##o##n##n##a##i##r##e##q##u##i##p##a##g##e##r##e##q##u##i##p##m##e##n##t##o##r##e##q##u##i##v##a##l##e##n##t##r##i##u##m##p##h##u##n##u##b##i##q##u##i##t##o##u##s##q##u##e##s##t##i##o##n##n##a##i##r##e##q##u##i##p##a##g##e##r##e##q##u##i##p##m##e##n##t##o##r##e##q##u##i##v##a##l##e##n##t##r##i##u##m##p##h##u##n##u##b##i##q##u##i##t##o##u##s
print 'main(i,j){for (i=0;i<7;i++) printf("questionnairequipagerequipmentorequivalentriumphunubiquitous");printf("a(jf =i;+pn(utniqpeqpnruanipniiu)rt\"a(jf =i;+pn(utniqpeqpnruanipniiu)rt\"j=+(nppuii)\\)");}'

I use the longest words (that give the best score) and overlapping words too (equipage-pager, as for the example). This is how the score is computed:

me= 2+1+0+0+0+0+0=3
ore= 3+2+1+0+0+0+0=6
pager= 7+6+5+4+3+2+1=28
mentor= 11+10+9+8+7+6+5=56
triumph= 13+12+11+10+9+8+7=70
equipage= 17+16+15+14+13+12+11=98
equipment= 19+18+17+16+15+14+13=112
equivalent= 23+22+21+20+19+18+17=140
unubiquitous= 31+30+29+28+27+26+25=196
questionnaire= 37+36+35+34+33+32+31=238

Total is 947.

Edit: now the generated program should output "exactly every third character from the original sourcecode" :)

Gabriele D'Antona

Posted 2014-01-18T13:57:59.377

Reputation: 1 336

Nice! Is your generated C-code actually printing exactly every third character of ALL your Python code? I also think you forgot counting your points for the words ore and me :) – Plarsen – 2014-01-18T19:51:50.410

I assumed that the generated code doesn't have to output ALL the Python code (maybe I misinterpreted the sentence "exactly every third character from the original sourcecode"). Will try to fix that. – Gabriele D'Antona – 2014-01-18T20:12:05.980

2

Javascript and Golfscript - 1074 points

Javascript (1500 chars):

/*e  q  u  i  l  i  b  r  i  u  m  u  n  u  b  i  q  u  i  t  o  u  s  q  u  e  s  t  i  o  n  n  a  i  r  e  q  u  i  p  a  g  e  r  e  q  u  i  l  i  b  r  i  u  m  u  n  u  b  i  q  u  i  t  o  u  s  q  u  e  s  t  i  o  n  n  a  i  r  e  q  u  i  p  m  e  n  t  o  r  e  q  u  i  l  i  b  r  i  u  m  u  n  u  b  i  q  u  i  t  o  u  s  q  u  e  s  t  i  o  n  n  a  i  r  e  q  u  i  p  a  g  e  r  e  q  u  i  l  i  b  r  i  u  m  u  n  u  b  i  q  u  i  t  o  u  s  q  u  e  s  t  i  o  n  n  a  i  r  e  q  u  i  p  m  e  n  t  o  r  e  q  u  i  l  i  b  r  i  u  m  u  n  u  b  i  q  u  i  t  o  u  s  q  u  e  s  t  i  o  n  n  a  i  r  e  q  u  i  p  a  g  e  r  e  q  u  i  l  i  b  r  i  u  m  u  n  u  b  i  q  u  i  t  o  u  s  q  u  e  s  t  i  o  n  n  a  i  r  e  q  u  i  p  m  e  n  t  o  r  e  q  u  i  l  i  b  r  i  u  m  u  n  u  b  i  q  u  i  t  o  u  s  q  u  e  s  t  i  o  n  n  a  i  r  e  q  u  i  p  a  g  e  r  e  q  u  i  l  i  b  r  i  u  m  u  n  u  b  i  q  u  i  t  o  u  s  q  u  e  s  t  i  o  n  n  a  i  r  e  q  u  i  p  m  e  n  t  o  r  e  q  u  i  l  i  b  r  i  u  m  u  n  u  b  i  q  u  i  t  o  u  s  q  u  e  s  t  i  o  n  n  a  i  r  e  q  u  i  p  a  g  e  r  e  q  u  i  l  i  b  r  i  u  m  u  n  u  b  i  q  u  i  t  o  u  s  q  u  e  s  t  i  o  n  n  a  i  r  e  q  u  i  p  m  e  n  t  o  r*/console.log(  "5{ 2{'equilibriumunubiquitousquestionnairequip'   'ager'}*   'mentor' \\;}*  'cseo 52eibuniiuutniqp ar* eo ; co2biui *o 2u*22  '" ); 

Generated Golfscript (128 chars): Test GolfScript online

5{ 2{'equilibriumunubiquitousquestionnairequip'   'ager'}*   'mentor' \;}*  'cseo 52eibuniiuutniqp ar* eo ; co2biui *o 2u*22  ' 

Output (500 chars):

equilibriumunubiquitousquestionnairequipagerequilibriumunubiquitousquestionnairequipmentorequilibriumunubiquitousquestionnairequipagerequilibriumunubiquitousquestionnairequipmentorequilibriumunubiquitousquestionnairequipagerequilibriumunubiquitousquestionnairequipmentorequilibriumunubiquitousquestionnairequipagerequilibriumunubiquitousquestionnairequipmentorequilibriumunubiquitousquestionnairequipagerequilibriumunubiquitousquestionnairequipmentorcseo 52eibuniiuutniqp ar* eo ; co2biui *o 2u*22  

Score:

10 * questionnaire (37+36+35+34+33+32+31+30+29+28)    = 325
10 * unubiquitous  (31+30+29+28+27+26+25+24+23+22)    = 265
10 * equilibrium   (29+28+27+26+25+24+23+22+21+20)    = 245
5  * equipage      (17+16+15+14+13)                   = 75
5  * pager         (7+6+5+4+3)                        = 25
5  * equipment     (19+18+17+16+15)                   = 85
5  * mentor        (11+10+9+8+7)                      = 45
4  * ore           (3+2+1)                            = 6
10 * me            (2+1)                              = 3

Total: 1074

UPDATE: Managed to gain some points by changing GolfScript loops from 3*3 to 5*2.

Plarsen

Posted 2014-01-18T13:57:59.377

Reputation: 1 740