222
\$\begingroup\$

Your task is to build a program (using only printable ASCII characters and/or tabs and newlines) that prints out exactly the characters in the printable ASCII space (0x20 to 0x7e) that don't appear in your program's source code (in any order, however many times you want).

The shortest code to do this in any language wins.

\$\endgroup\$
  • 19
    \$\begingroup\$ They are, but they're not in the range 0x20 to 0x7e, which are defined as the "printable ASCII characters". Technically tabs and newlines are actually control characters. \$\endgroup\$ – Joe Z. Aug 23 '13 at 19:22
  • 3
    \$\begingroup\$ Are we allowed to print newlines (or any other unprintable ASCII characters)? \$\endgroup\$ – flornquake Aug 24 '13 at 0:30
  • 1
    \$\begingroup\$ Tabs and newlines do not render in such a way that they occupy a printing position. They move the position. See the ANSI C "isprint" function. \$\endgroup\$ – Kaz Aug 24 '13 at 2:00
  • 2
    \$\begingroup\$ How did this question get revived? It's started getting upvotes again. \$\endgroup\$ – Joe Z. Jan 31 '14 at 16:38
  • 3
    \$\begingroup\$ @Timwi: If you wanted to do that, you'd have to output all the characters in the CJK character space too (excluding the ones appearing in your code). It's too complicated to manage, so I restricted it to just ASCII. \$\endgroup\$ – Joe Z. Feb 1 '14 at 3:01

107 Answers 107

1 2 3
4
0
\$\begingroup\$

k4 (31)

-1 x@&~(x:"c"$32+!95)in*0:.z.f;

save in a file, name doesn't matter (except that the extension has to be .k), and run with q.

$ q aq.k 2>/dev/null
#%',/4678<=>?ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abdeghjklmopqrstuvwy{|}

works by getting the name of current script file, reading it, removing its contents from the list of all printable ascii, and printing what's left.

if we dispense with the trailing newline in the printout, we can save one character (the - at the beginning of the code)

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

PHP - 99 Characters

echo implode('',array_diff(array_map('chr',range(33,126)),str_split(file_get_contents(__FILE__))));
| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Hassium, 129 Bytes

This one is a bit more unique than some of what I've seen. It reads the program's source into a variable then iterates of the ASCII table.

To run you must save your code in a file called "f".

use IO;func main(){f=File.readText("f");for(c=0;c<128;c++){c=Convert.toChar(c);g=1;foreach(d in f)if(c==d)g=0;if(g==1)print(c);}}

Run and see expanded here

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Microscript II, 82 bytes

Well, that's just ridiculous.

( %&'*+,-./12345789:<=>?@ABCDEFGHIJKLMNORSTUVWXYZ\^_`bcdghijkmovwxyz{|}~)P6;q!p#Q$

One ridiculously long unexecuted conditional, followed by the commands P6;q!p#Q$.

Output:

null
"false"true"0"
[]
| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Groovy, 90 78 bytes

(32..126).each{print'(32.16)each{print\'\\dxOf+?:}'.indexOf(it)+1?'':(char)it}
| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Mouse-2002, 105 95

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

Contains a bunch of unprintables; hexdump (reversible with xxd -r):

Does nothing, and is not a comment; it just so happens everything after $ is ignored.


A real answer would start like

zh+i:(i.127<^i.!'i.b+i:)

But you'd need a lot of if-statements and it would just get ridiculously long.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ "is not a comment, ... everything after$ is ignored." Pretty sure that's the definition of a comment \$\endgroup\$ – MD XF Nov 17 '17 at 19:19
  • 1
    \$\begingroup\$ @MDXF no, it is the end of the program \$\endgroup\$ – cat Nov 18 '17 at 18:23
0
\$\begingroup\$

Pyke, 34 bytes, noncompeting

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

I'm going the no-op, print chars route

Try it here!

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Mathematica 71 bytes

Taking as the range of "printable" characters ASCII 32-126, this takes the complement of the full set of characters (CharacterRange[32, 126]) and the used set of characters ("Charactes@Rngplm[32,16]").

Complement[CharacterRange[32, 126],Characters@"Charactes@Rngplm[32,16]"]

{"!", "#", "%", "^", "&", "*", "(", ")", "_", "-", "+", "=", "~", "`", "{", "}", "|", "\", "<", ">", ".", ";", "\"", "?", "'", "/", ":", " ", "0", "4", "5", "7", "8", "9", "A", "b", "B", "d", "D", "E", "f", "F", "G", "H", "i", "I", "j", "J", "k", "K", "L", "M", "N", "o", "O", "P", "q", "Q", "S", "T", "u", "U", "v", "V", "w", "W", "x", "X", "y", "Y", "z", "Z", "$"}

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Perl6, 66

(63..96)>>.chr.join.print #!"$%&/+-*:;<=0124578abdefghklmqsuvwxyz'
| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

ISOLADOS, 7369 bytes (non-competing)

ISOLAADOOS ISOLAAAAAAADOS ISOLAADOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAAADOS ISOLAAADOS ISOLAADOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOS ISOLAAAAAA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| |
\$\endgroup\$
  • 1
    \$\begingroup\$ link to interpreter or something? \$\endgroup\$ – Destructible Lemon May 31 '17 at 23:21
  • \$\begingroup\$ Link to interpreter or something? \$\endgroup\$ – MD XF Nov 17 '17 at 19:18
0
\$\begingroup\$

QBIC, 61 bytes

[32,126|B=chr$(a)~instr(A,B)|\?B}##$(),1236=?ABB[\achinrst|}~

Are we allowing new languages on old challenges yet?

Explanation

[32,126|      FOR a = 32 TO 126
B=chr$(a)       Set B$ to the char code a
~instr(A,B)   IF A$ contains B$
|             THEN do nothing
\?B}          ELSE print B$
#             Define a literal A$ that has every char in this program once.
 #$(),1236=?ABB[\achinrst|}~

Usually, QBIC would delimit a literal with a backtck ('`'), so that's the one char we can't have in a literal. However, the backtick is auto-added on open literals at EOF.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

PHP, 81 bytes

<?php $w=file(__FILE__)[0];foreach(range(' ','')as$i){echo!strpos($w,$i)?$i:'';}

Shortest by-the-book PHP submission so far, built upon @michal.hubczyk 's answer with a few golf twists. Interestingly enough, adding the <?php prolog saves some bytes off the whole solution, thanks to the use of file()[0] modern php array-dereferencing on the one-liner file instead of the classic file_get_contents().

Try it online!

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Brain-Flak, 155 bytes

Includes +1 for -A

((((((()()()()){}){}){})<>[()()()])[()])((((()()()){})){}{})<>((()()()()){}){({}[()]<(({})())>)}{}({}()())<>{{({}<>[()]<(({})())><>)}{}<>(({}())()())<>}<>

Try it online!

# Push 32 on this stack and 18, 28 and 29 to the other
# 18, 28 and 29 are the distances between the sets of braces 
((((((()()()()){}){}){})<>[()()()])[()])((((()()()){})){}{})<>

# For 0 to 8
((()()()()){}){({}[()]<

    # Push TOS, TOS + 1
    (({})())

# end For 0 to 8
>)}{}

# Push TOS + 2 
# skips '(' and ')'
({}()())

# For each value on the off stack (18, 28, 28)
<>{

    # For 0 to that number
    {({}<>[()]<

        # Push TOS, TOS + 1
        (({})())

    # End for 0 to that number
    ><>)}{}

    # Push TOS + 1, TOS + 3 (skips this set of braces)
    <>(({}())()())<>

# End for each value on the off stack (18, 28, 28)
}<>
| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

MATLAB/Octave, 45 44 41 bytes

setdiff([33:126 ''],'setdif([3:126''],)')

Try it online!

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

JavaScript, 96

eval(l="for(e=32,x='';e<127;e++)v=eval('\"\\\\x'+e.toString(16)+'\"'),x+=-1==l.indexOf(v)?v:''")
| improve this answer | |
\$\endgroup\$
-1
\$\begingroup\$

SmileBASIC, 78 63 bytes

FOR I=32TO 126?CHR$(I)*(INSTR(LOAD("TXT:_",0),CHR$(I))<0);
NEXT

Assumes the program is saved in a file named _ (which sounds like cheating to me but apparently this is ok)

| improve this answer | |
\$\endgroup\$
-2
\$\begingroup\$

Groovy: 52 chars

print(((' '..'~')-new File('a').text.grep()).join())

// print all characters from '#' to '~', except those present in the file itself (the name of the source file is 'a').

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Why the downvote ? \$\endgroup\$ – Stéphane Gourichon Mar 19 '15 at 19:38
  • 1
    \$\begingroup\$ @StéphaneGourichon because it's assuming that file a has all the missing characters in it. This solution exploits a common loophole, and is therefore invalid. \$\endgroup\$ – Magic Octopus Urn Aug 3 '17 at 14:52
  • 1
    \$\begingroup\$ @Magic Octopus Urn - No. The file 'a' is the name of the program itself. The program simply reads itself, and then removes all the characters it contains from the specified range of characters. \$\endgroup\$ – br2000 Aug 10 '17 at 11:41
1 2 3
4

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.