57
\$\begingroup\$

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

Restrictions

  • 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!

\$\endgroup\$
18
  • 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\$ – Hand-E-Food 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

38 Answers 38

1
2
1
\$\begingroup\$

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
\$\endgroup\$
1
\$\begingroup\$

PHP, 67 bytes -60 bonus = 7

<?=d__cJZFFcQWFVcWFVcQV_ZZQcCZcFF^"%33C3534C3653C643C333546C75C35";

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.

\$\endgroup\$
3
  • \$\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\$ – Eliseo D'Annunzio 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\$ – Eliseo D'Annunzio Apr 19 '17 at 8:49
1
\$\begingroup\$

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

\$\endgroup\$
1
\$\begingroup\$

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
_Push_-40_A][N
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
S N
N
_Jump_to_Label_LOOP]

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.

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

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!

\$\endgroup\$
0
1
\$\begingroup\$

Jelly, 23 - 60 = -37

“%⁼“¡¢8ṣƤ¹;“pȷȦÆ⁾“¡PȤṫ»

Try it online!

This is just the compressed representation of ["All", " your base are", " belong to", " us"] (Jelly has a compressed string format). The string's split into multiple pieces in order to ensure that none of the banned characters appear within the compressed representation; they're all implicitly concatenated at the end of the program.

\$\endgroup\$
0
\$\begingroup\$

Japt, 33 - 60 = -27 bytes

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

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++Id
Ui      Add to the beginning of U...
  ++I     65
     d    chr(65) == "A"
\$\endgroup\$
0
\$\begingroup\$

Aceto, 23 bytes

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

lo'm"  u
e"poptos
b cIcIp"
rep'fo
asab
 er 
Aluo
"l y
\$\endgroup\$
1
2

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.