24
\$\begingroup\$

Objective Write a full program that outputs (to STDOUT or closest alternative) an arbitrary string of text, no more than 64 characters long. Simple enough, right? Well, here's the catch: You may not use any characters that were present in the previous answer's output. That's right, none of them.

Thus, you are trying to be the last answer for a total of three days. That is, you want no one to answer the question in the 72 hours following the posting of your question.

Some rules

  • Your answer (and output) may only contain printable ASCII characters, newlines (carriage returns included), and tabs.
  • Your answer's output may not be the same as another answer's output. Two output's are the same if and only if they use the exact same characters.
  • You may use any language that was not specifically made for this challenge, even if it was made after the challenge. (This language, of course, must be testable.)
  • You may not use any language that was previously used.
  • Your entry may not include comments. You may, of course, provide an extra commented program.
  • You may not answer twice in a row.
  • Your program must be at least 1 byte.

Entry format

Your answer should look generally like the following:

# {Language}
Uses: `characters present in the output`

Does not use: `characters used in the previous output` from [previous submission, language](link-to-previous-submission]

    {program}

Outputs:

    {output}

An explanation with your answer is appreciated.

\$\endgroup\$
  • 3
    \$\begingroup\$ I'm wildly confused about what is being asked. I have to print any <=64 char string, and I can't use the characters in the latest submission's output? \$\endgroup\$ – Lynn Dec 21 '15 at 21:36
  • 1
    \$\begingroup\$ @Mauris Yes, that is correct. \$\endgroup\$ – Conor O'Brien Dec 21 '15 at 21:39
  • 3
    \$\begingroup\$ Ah, okay; the bit about "character space" is really confusing IMO. That term doesn't mean anything... Maybe you should rewrite it? \$\endgroup\$ – Lynn Dec 21 '15 at 21:40
  • 1
    \$\begingroup\$ @question_asker If nobody can come up with an answer to follow yours, you win the challenge (and get the green checkmark). For example, if I wrote a program that outputs every printable ASCII character, it would be impossible to follow (ignoring those annoying languages that generate output for the empty program). \$\endgroup\$ – ThisSuitIsBlackNot Dec 22 '15 at 23:34
  • 1
    \$\begingroup\$ @question_asker Your code cannot contain any of the characters from the previous answer's output; your output cannot use the same set of characters as any previous output. If the code for the first answer is foo and it outputs bar, the code for the next answer cannot contain b, a, or r; no subsequent answer can output abr, arb, bar, bra, rab, or rba. (Yes, I agree this was very confusing.) \$\endgroup\$ – ThisSuitIsBlackNot Dec 22 '15 at 23:54

12 Answers 12

2
\$\begingroup\$

Ruby

$><<'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" '

Does not use abcdefghijklmnopqrstuvwxyz{}\~_^[]|` from the previous answer.

Prints, and hence uses, ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", a space, and a newline.

\$\endgroup\$
5
\$\begingroup\$

Pyth

Uses: ()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg.

Doesn't use: !"#$%&'()*+,-./0123456789:;<=>?@[\]^_`abcdefghijklnsm{|}~ from previous submission in Octave.

Code:

pMCMryyTyyytytttT

Output:

()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg
\$\endgroup\$
  • \$\begingroup\$ Is there a space in there? I guess there aren't any tabs or newlines that aren't shown? It looks like the next answer must be a whitespace answer (or at least close)... \$\endgroup\$ – Stewie Griffin Dec 22 '15 at 11:44
  • \$\begingroup\$ No whitespace in the output that's mine; I don't know if the language appends a newline though \$\endgroup\$ – Lynn Dec 22 '15 at 11:46
5
\$\begingroup\$

Brainfuck

Uses: -.

Does not use: !"%&')+,0123456789<=>ABCDEFGHIJKLNOPRSTWXYZ]`acefghjlnoprstux{| from CJam. Thanks to SuperJedi

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.---------------------------.--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.-------------------------------------------------------------------------------------------.-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.

Outputs:

; (){}[]"'
\$\endgroup\$
  • 2
    \$\begingroup\$ This could be altered to only use - and .. That's my proposal for the purposes of the challenge. \$\endgroup\$ – SuperJedi224 Dec 21 '15 at 20:55
  • \$\begingroup\$ tinyurl.com/obzsvot \$\endgroup\$ – SuperJedi224 Dec 21 '15 at 22:09
  • 2
    \$\begingroup\$ Sorry, I took the uses portion to mean that those were the entities used in the code. Gimme a goddamn minute before you start using downvotes. \$\endgroup\$ – Seadrus Dec 21 '15 at 23:15
3
\$\begingroup\$

CJam

Uses: 0123456789:;_bc

Does not use: !GSaefgimnoprstuw, from previous submission, MATLAB

183185535513294435547695067785526290427932963043839368372854060721693597139131275368051870173845056551161192991350318233082749156998652_;128b:c

Outputs:

 !"%&')+,0123456789<=>ABCDEFGHIJKLNOPRSTWXYZ]`acefghjlnoprstux{|
\$\endgroup\$
  • \$\begingroup\$ Well, I can't beat this. \$\endgroup\$ – Mutador Dec 21 '15 at 20:27
3
\$\begingroup\$

Octave

Uses: !"#$%&'()*+,-./0123456789:;<=>?@[\]^_``abcdefghijklnsm{|}~ and a newline in the output.

Doesn't use: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" from previous submission in Microscript.

Code:

[' ':'@','[':'`','{':'~',('@'+' '):('>'+'/')]

Output:

ans =
 !"#$%&'()*+,-./0123456789:;<=>?@[\]^_`{|}~`abcdefghijklm

Explanation:

This is a collection of consecutive ASCII-characters. The code is equivalent to:

[char(32:64) char(91:96) char(123:126) char(96:109)]

Where char(32:64) are the ASCII characters from 32 to 64 (space to @). In order to get the alphabet-part in the end of the output, I had to add characters, as I couldn't use a and m. @+ equals 96 (``) and >+/ equals 109 (m)

\$\endgroup\$
  • \$\begingroup\$ How does this work? \$\endgroup\$ – Conor O'Brien Dec 21 '15 at 21:13
  • \$\begingroup\$ @CᴏɴᴏʀO'Bʀɪᴇɴ, explanation included =) \$\endgroup\$ – Stewie Griffin Dec 21 '15 at 21:21
3
\$\begingroup\$

Perl

Uses: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz} (with space)

Does not use: "#$%'()*+,-./123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|~ from previous submission in Unreadable

eval q!print uc q&} abcdefghijklmnopqrstuvwxyz&!and eval q}print q&0abcdefghijklmnopqrstuvwxyz&}and eval q&print length for qw!a bc def ghij klmno pqrstu vwxyzab cdefghij klmnopqrs!&

Outputs:

} ABCDEFGHIJKLMNOPQRSTUVWXYZ0abcdefghijklmnopqrstuvwxyz123456789

…the old joke about monkeys writing code comes to mind…

You can run the program online.

This program abuses the weird features of Perl to write code in just about any subset of ASCII:

  • Functions can be called without parentheses in some cases (unsure about exact rules)
  • q#text# where # can be almost any character is the same as "text"
  • qw#word1 word2 word3# like the above is the same as ["word1", "word2", "word3"]
  • for loops and other things can be appended to lines, eliminating any punctuation
\$\endgroup\$
3
\$\begingroup\$

Javascript ES6

Previous answer: https://codegolf.stackexchange.com/a/67406/39022

Source does not contain !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ, space, or newline.

alert`abcdefghijklmnopqrstuvwxyz{}\\~_^[]|\``

Output:

abcdefghijklmnopqrstuvwxyz{}\~_^[]|`

(Lowercase alphabet, curly brackets, backslash, tilde, underscore, carat, square brackets, pipe, and backtick)

\$\endgroup\$
  • \$\begingroup\$ I believe you mean backslash instead of forward slash. But nice entry! \$\endgroup\$ – ETHproductions Dec 22 '15 at 19:00
  • \$\begingroup\$ @ETHproductions You're right about the backslash. \$\endgroup\$ – SuperJedi224 Dec 22 '15 at 19:04
2
\$\begingroup\$

Python 3

Uses: !CGaceilmnoprstw z.

print("Germanic Capitalization is awesome!")

Simply prints Germanic Capitalization is awesome! with no restrictions. Good luck!

\$\endgroup\$
2
\$\begingroup\$

Microscript II

Previous answer: here. Program does not use semicolon, space, parentheses, curly brackets, square brackets, single straight quotes, or double straight quotes. This program would be a lot shorter if it didn't have to avoid quotes.

Output includes: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", and a newline.

Program:

97Kp98Kp99Kp100Kp101Kp102Kp103Kp104Kp105Kp106Kp107Kp108Kp109Kp110Kp111Kp112Kp113Kp114Kp115Kp116Kp117Kp118Kp119Kp120Kp121Kp122Kp""P65Kp66Kp67Kp68Kp69Kp70Kp71Kp72Kp73Kp74Kp75Kp76Kp77Kp78Kp79Kp80Kp81Kp82Kp83Kp84Kp85Kp86Kp87Kp88Kp89Kp90Kp123456789qh

Exact output:

abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ"123456789"
\$\endgroup\$
  • 1
    \$\begingroup\$ And the Does not incude bit. \$\endgroup\$ – Conor O'Brien Dec 21 '15 at 20:41
2
\$\begingroup\$

MATLAB

Uses: !GSaefgimnoprstuw and newline.

Does not use: !CGaceilmnoprstw z from previous submission, Python 3.

[83,116,101,119,105,101,32,71,114,105,102,102,105,110,32,105,115,32,97,32,112,114,111,109,105,110,101,110,116,32,103,101,110,105,111,117,115,33,'']

Prints:

ans =

Stewie Griffin is a prominent genious!
\$\endgroup\$
2
\$\begingroup\$

Unreadable

Uses: "#$%'()*+,-./123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|~

Does not use: ()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg from previous submission in Pyth

'"'""'""'"'""'"'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'"'""'""'"'""'"'""'"'""'"'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'"""

Outputs:

"#$%'()*+,-./123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|~

In case you are wondering, yes, programming by hand in this language is painful, so I made this script (in JavaScript) to generate the code:

var program = `"`,
    output = "\"#$%'()*+,-./123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`{|~";
for(var i = 1, c = 0; c < output.length; i++) {
  program = `'""` + program;
  if(i == output.charCodeAt(c)) {
    program = `'"` + program;
    c++;
  }
}
program;

I used the Python interpreter for Unreadable here to run the code.

\$\endgroup\$
  • \$\begingroup\$ Having a space in there would make life hard for the next one =) \$\endgroup\$ – Stewie Griffin Dec 22 '15 at 12:54
  • \$\begingroup\$ @StewieGriffin That's true. Is it too late to edit? xD TBH though, I think this challenge can go on for a lot longer because there's many languages which have pre-set variables in either upper or lower-case letters, so just the one character would be a valid answer. (Even though it wouldn't be too interesting and makes it very easy for the next answer!) \$\endgroup\$ – user81655 Dec 22 '15 at 13:10
  • 1
    \$\begingroup\$ I think it's too late now. Someone might be working on a solution in for instance whitespace, and suddenly adding a space in the output will probably make them annoyed. \$\endgroup\$ – Stewie Griffin Dec 22 '15 at 13:14
  • \$\begingroup\$ @StewieGriffin Yeah, that was my reasoning too. \$\endgroup\$ – user81655 Dec 22 '15 at 13:15
1
\$\begingroup\$

GolfScript

Uses: space, newline, !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ.

Doesn't use 0-9A-Za-z{ or space from previous submission in Perl.

The code:

'!'.!=('['.!=,>''+

The output:

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ

And a trailing newline.

Try it here.

\$\endgroup\$

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.