Input must not be required, and output must read "All your base are belong to us".


  • No external resources.

    Plus a minimum of two of the following:

  • You cannot use "a", "b", "t", "u", or "y" in any case in your code (bonus -10 to your golf score if you can do this)

  • You cannot use "l", "o", "s", "e", or "r" in any case in your code (bonus -20 to your golf score if you can do this)

  • You cannot use "n", "g", "0", "1", or "2" in any case in your code (bonus -30 to your golf score if you can do this)

So for example, if you manage to get the code done with 40 characters and use rules 1 and 2, your golf score is 40 - 10 - 20 = 10 chars.

Smallest code golf score wins... Good luck!

  • 5
    \$\begingroup\$ So much as declaring a string breaks all three restrictions, and char, var and Write break two of them each. This is going to be tough to get valid answers, bar maybe Barinfuck. \$\endgroup\$ Jan 23 '14 at 2:28
  • 7
    \$\begingroup\$ "no input required". Doesn't that mean that I could, for example, do something like print(input()) (python)? The user would be required to input the correct string, but that isn't forbidden. \$\endgroup\$
    – Justin
    Jan 23 '14 at 6:40
  • 5
    \$\begingroup\$ @Quincunx I wouldn't accept such a solution, as the code is not guaranteed to output a correct solution. Also, stdin is arguably an "external source". \$\endgroup\$
    – nitro2k01
    Jan 23 '14 at 18:39
  • 2
    \$\begingroup\$ @PranavHosangadi There is a deleted answer to this question with a score of -6 which is essentially the same as that. It's been done before a number of times in various questions and is explicitly disallowed in the code-golf tag. \$\endgroup\$
    – Gareth
    Jan 24 '14 at 10:31
  • 1
    \$\begingroup\$ According to code-golf standard rules answers in latin1/unicode/name you charmap is rated in bytes after conversion to utf-8. Are we to count like that or have you chosen a different score method? Current leader would then be at 0 instead of -40. \$\endgroup\$
    – Sylwester
    Jan 30 '14 at 1:27

42 Answers 42


Perl 5, 99 − 50 = 49

A subroutine that returns the required string:

{A.($c=h|d)."$c y".($f=f|k).u.($k=p|b)." ba".($j=c|p).($d=d|a)." a$k$d b$d$c$f".(jf|fc)." t$f u$j"}

See it printed thus:

perl -e'print sub{...}->().$/'

BF-RLE, 146 - 30 = 116

  • \$\begingroup\$ This can be shortened significantly \$\endgroup\$
    – Timtech
    Feb 16 '17 at 0:09

SmileBASIC, 149 bytes -30 -10 = 109

L$=CHR$(&H75)O$=CHR$(98)S$=CHR$(97)?CHR$(65);"ll",CHR$(&H79);"o";L$;"r ";O$;S$;"se ";S$;"re ";O$;"elo";CHR$(&H6E);CHR$(&H67);" ";CHR$(&H74);"o",L$;"s

PHP, 67 bytes -60 bonus = 7


bitwise XOR on the ASCII characters

I brute forced a pair of characters not in the forbidden characters for each character in output.
No word character pair for A and I don´t like extended ASCII, so I live with one string in quotes.

  • \$\begingroup\$ Now, @Titus, how exactly does this work? I can only guess that somehow you're using some clever replace function... I've never seen this kind of witchcraft with PHP before... All I know is that it works! \$\endgroup\$ Apr 19 '17 at 8:33
  • \$\begingroup\$ @WallyWest I´ll explain inline. \$\endgroup\$
    – Titus
    Apr 19 '17 at 8:47
  • \$\begingroup\$ The ^ symbol! Of course! I had read about PHP's XOR ability a while back but had completely forgotten about it... Nice one! \$\endgroup\$ Apr 19 '17 at 8:49

VBA, 119 - 40 = 79 Bytes

Anonymous VBE Immediate window function that takes no input and outputs All your base are belong to us to the VBE immediate window

L=Chr(&H75):O=Chr(98):S=Chr(97):?Chr(65)"ll "Chr(&H79)"o"L"r "O;S"se "S"re "O"elo"Chr(&H6E)Chr(&H67)" "Chr(&H74)"o "L"s

This is largely a port of 12Me21's SmileBASIC Answer - Hooray for BASIC languages


Whitespace, 194 (254 bytes - 60 bonus)

[S S S T    S T S N
_Push_10_s][S S S T T   S S N
_Push_12_u][S S T   T   S S T   S S T   N
_Push_-73_space][S S S T    T   S N
_Push_6_o][S S S T  S T T   N
_Push_11_t][S T S S T   S N
_copy_2nd_space][S S T  T   S N
_Push_-2_g][S S S T S T N
_Push_5_n][S S S T  T   S N
_Push_6_o][S S S T  T   N
_Push_3_l][S S T    T   S S N
_Push_-4_e][S S T   T   T   T   N
_Push_-7_b][S S T   T   S S T   S S T   N
_Push_-73_space][S S T  T   S S N
_Push_-4_e][S S S T S S T   N
_Push_9_r][S S T    T   S S S N
_Push_-8_a][S T S S T   T   N
_Copy_3rd_space][S S T  T   S S N
_Push_-4_e][S S S T S T S N
_Push_10_s][S S T   T   S S S N
_Push_-8_a][S S T   T   T   T   N
_Push_-7_b][S T S S T   S S N
_Copy_4th_space][S S S T    S S T   N
_Push_9_r][S S S T  T   S S N
_Push_12_u][S S S T T   S N
_Push_6_o][S S S T  S S S S N
_Push_17_y][S T S S T   S S N
_Copy_4th_space][S S S T    T   N
_Push_3_l][S N
S _Duplicate_8_l][S S T T   S T S S S N
_Create_Label_LOOP][S S S T T   S T S S T   N
_Push_105][T    S S S _Add][T   N
S S _Print_as_character][N

Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.

Try it online (raw with spaces, tabs, and new-lines only).

Uses the shorter alternative I've explained in the bottom of this Whitespace tip, with the fixed amount being 105 in this case.

  • \$\begingroup\$ Very nice... I've was wondering when I've was going to see an esoteric answer creeping in! \$\endgroup\$ Apr 6 '18 at 9:25

Pxem, Filename: 45 bytes + Content: 0 bytes - Bonus: 30 bytes = 15 bytes.

  • Filename (escaped some characters): Xx\202\330\330\100\362\336\352\344\100\304\302\346\312\100\302\344\312\100\304\312\330\336\334\316\100\350\336\100\352\346!.z\002.$.o.c!.a
    • Printed version: Xx‚ØØ@òÞêä@ÄÂæÊ@ÂäÊ@ÄÊØÞÜÎ@èÞ@êæ!.z.$.o.c!.a
  • Content: empty

What it does

  • Twice necesity ASCII codes before.
  • Halve on this program.

Try it online!

Pxem, Filename: 55 bytes + Content: 0 bytes - Bonus: 50 bytes = 5 bytes.

  • Filename (escaped some): Xx\202\330\330\100\362\336\352\344\100\304\302\346\312\100\302\344\312\100\304\312\330\336\334\316\100\350\336\100\352\346!.z\002.$.t.v.m.v.c!.a.t.p
    • Printed: XxØØ@òÞêä@ÄÂæÊ@ÂäÊ@ÄÊØÞÜÎ@èÞ@êæ!.z.$.t.v.m.v.c!.a.t.p
  • Content: empty

What it does

  • Move to bottom each of them.
  • Hide last ! to heap.
  • Print all of them at once.

Try it online!


05AB1E, 18 - 60 = -42 bytes


Try it online!

“...“.ª  # trimmed program
“...“    # push "all your base are belong to us"...
     .ª  # in sentence case
         # implicit output

Deadfish~, 232 − 40 = 192 238 − 60 = 178 bytes


Try it online!


Japt, 33 - 60 = -27 bytes

`mßPÚXmÞ-ãù“`i`à ö` d"m " Å

Try it online!

The shoco library is powerful at compressing lowercase letters, but I had to do lots of experiment in order to get a compressed string without any of the banned chars.

Unpacked & How it works

`mßPÚXmÞ-ãù“`i`à ö` d"m " s1
`mßPÚXmÞ-ãù“`                 "mbasemarembelongmtomus"
              i`à ö`           Insert "allmyour" at the beginning
                     d"m "     Replace "m" with " "
                           s1  Discard initial "a"
                               Implicitly assign to U

Ui      Add to the beginning of U...
  ++I     65
     d    chr(65) == "A"

Aceto, 23 bytes

3rd grade Hilbert curve, 53 bytes - 30 bonus = 23.

lo'm"  u
b cIcIp"
"l y

Google Sheets, 53 - 30 = 23

Speaking of Bases... Following rules 1 & 2:

="All your base are belo"&LOWER(BASE(775,33))&" to us

I believe this is optimal, unless the string can be compressed.

  • Applying all three rules does not leave us with any useful functions. These are IMDIV, FV, PV, IF, PI, PHI, and MID. MID is almost interesting: we can gain access to [TRUEFALS] because we can do comparisons to get boolean strings, but this leaves way too many letters out.
  • Similarly, even following two rules, we still don't have access to any useful alphabetic character yielding functions. (CHAR, BASE, TEXT)
  • This means that we have to follow one rule or bust. I choose the most valuable one, [NG012]. Luckily the phrase only contains an illegal "ng", which we can easily get around with BASE.
  • An alternative solution is to split all words by spaces into a column, then join by spaces, but that results in the same score and is harder to set up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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