56
\$\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\$
  • 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

39 Answers 39

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

Jelly, 23 - 60 = -37 (language postdates challenge)

“%⁼“¡¢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.

Arguably this is competing despite postdating the challenge, because the rules at the time of the challenge (this is an old challenge) were more along the lines of "you can't create a language specifically to solve the challenge" (Jelly wasn't), rather than "you can't use a language newer than the challenge".

| improve this answer | |
\$\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.

| improve this answer | |
\$\endgroup\$
  • \$\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\$ – WallyWest 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\$ – WallyWest 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

| improve this answer | |
\$\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.

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

In PHP Simple base64 decoding method can achieve the op

<?php echo base64_decode(QWxsIHlvdXIgYmFzZSBhcmUgYmVsb25nIHRvIHVz); ?>
| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ Doesn't meet the conditions of at least 2 of the bonuses. \$\endgroup\$ – Gareth Jan 25 '14 at 22:30
  • \$\begingroup\$ Still, valiant attempt. \$\endgroup\$ – WallyWest Jan 29 '14 at 23:40
  • \$\begingroup\$ @WallyWest invalid: contains B, e and g; so there is a member of each of the forbidden sets. \$\endgroup\$ – Titus Apr 18 '17 at 16:27
  • \$\begingroup\$ @Titus, ease up, BetaCoder is still new to the ways of the Force, dude... \$\endgroup\$ – WallyWest Apr 18 '17 at 19:32
  • \$\begingroup\$ @WallyWest Sure, sorry. Oh I misread your comment. invalid, but not invaliant. :) Actually it inspired me to try base64 on random obfuscations of the wanted output; but they all failed. +1 for the inspiration. \$\endgroup\$ – Titus Apr 19 '17 at 8:24
0
\$\begingroup\$

Aceto, 23 bytes, non-competing

Challenge predates the language.

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

lo'm"  u
e"poptos
b cIcIp"
rep'fo
asab
 er 
Aluo
"l y
| improve this answer | |
\$\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"
| improve this answer | |
\$\endgroup\$
-3
\$\begingroup\$

GolfScript, 36 - 30 = 6

'Bmm!zpvs!cbtf!bsf!cfmpoh!up!vt'{(}%

Edit: I see Howard had the same idea, using unprintable characters.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ You fail at least two of the conditions, rendering this answer invalid. (I can see several bs (condition # 1) and several ss (condition 2)) \$\endgroup\$ – Justin Jan 23 '14 at 8:09
  • \$\begingroup\$ @Quincunx They're not required conditions, they just afford bonuses if you complete them. By your comment he would still get the 3rd bonus (hence the -30). However, it looks to me like there's an o in there too, so the score should be 36. \$\endgroup\$ – starsplusplus Jan 23 '14 at 8:56
  • 7
    \$\begingroup\$ At least 2 of the 3 bonuses are required. \$\endgroup\$ – user2357112 supports Monica Jan 23 '14 at 8:58
  • \$\begingroup\$ You are correct. Also I misread the third condition - it's 0 not o. Wrong on two counts! \$\endgroup\$ – starsplusplus Jan 23 '14 at 9:01
  • \$\begingroup\$ @Quincunx Oops, you're right. No bonus, so it's still 36. \$\endgroup\$ – Remy Jan 23 '14 at 9:03
1
2

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