[Question]
  [
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.
  
[Answer]
# Polyglot, 95
```
#undef X;A!"$%&'()*+-[,.]/0123456789:<=>?@BCDEFGHIJKLMNOPQRSTUVWYZ\^_`abcghijklmopqrstvwxyz{|}~
```
* [Perl](https://www.perl.org/)
* [Perl 6](https://perl6.org/)
* Any \*nx-like shell (`tclsh`, `bash`, `sh`, `ksh`, etc)
* [Awk (GNU / POSIX)](https://www.gnu.org/software/gawk/manual/gawk.html)
* [Brainfuck](http://esolangs.org/wiki/brainfuck), [Brian & Chuck](https://github.com/m-ender/brian-chuck), other [derivatives](http://esolangs.org/wiki/Brainfuck_Derivatives)
* [Ruby](https://www.ruby-lang.org/en/)
* [Coffescript](http://coffeescript.org/)
* [Golfscript](http://www.golfscript.com/golfscript/)
* [Python](https://www.python.org/)
* [R](https://www.r-project.org/)
* [Julia](https://julialang.org/)
* [Whitespace](https://en.wikipedia.org/wiki/Whitespace_(programming_language))
* [rk](//github.com/aaronryank/rk-lang)
* [Gaot++](https://github.com/tuxcrafting/gaot-plus-plus)
* [bc](https://www.gnu.org/software/bc/manual/html_mono/bc.html)
* [jq](https://stedolan.github.io/jq/)
* [Joy](http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language)
* [Tcl](http://tcl.tk/)
* [99](https://esolangs.org/wiki/99)
* [V (FMota)](https://esolangs.org/wiki/V_(FMota))
* [Acc!!](https://github.com/dloscutoff/Esolangs/tree/master/Acc!!)
* C - if no `main()` is needed. Thanks to [urogen](https://codegolf.stackexchange.com/users/3544/ugoren)
* [Duocentehexaquinquagesimal](https://esolangs.org/wiki/Duocentehexaquinquagesimal)
* [Vyxal `O`](https://github.com/lyxal/vyxal)
* [Thunno `d`](https://github.com/Thunno/Thunno)
* Probably more.
Does nothing.
[Answer]
## PHP 5.2, 4 + 69
```
<?<<
```
Save as a file called `!"#$%&'()*+-.023456789;=>@ABCDEFGIJKMNOQRUVWXYZ[\]^`bfghjkmqvwz{|}~`. `short_open_tag` needs to be `On` in your `php.ini`.
The output is:
```
PHP Parse error:  syntax error, unexpected T_SL in /wherever/!"#$%&\'()*+-.023456789;=>@ABCDEFGIJKMNOQRUVWXYZ[\\]^`bfghjkmqvwz{|}~ on line 1
```
[Answer]
### GolfScript, 15 12 characters
```
{`),32>^.}.~
```
Based on [Jan Dvorak's answer](https://codegolf.stackexchange.com/a/12373/1490) with a few twists and also in the style of [Peter Taylor's one](https://codegolf.stackexchange.com/a/12374/1490).
[Answer]
## JavaScript - 88
```
alert("BCDFGHIJKMNPQUVXYZ".toLowerCase())// !#$%&'*+,-0123456789:;<=>?@[\]^_`{|}~AERTOWS
```
prints "bcdfghijkmnpquvxyz"
[Answer]
### Whitespace, 61 57 characters
It's not the shortest but it probably has the simplest logic (it's just a loop really).
Here it is completely commented, where S is space, T is tab, L is line feed:
```
SSSTSSSSSL     # push 0x20
LSSSL          # label S
SSSTL          # push 1
TSSS           # add
SLS            # duplicate top of stack
SLS            # duplicate again
TLSS           # output ASCII character
SSSTTTTTTSL    # push 0x7E
TSST           # subtract (result - 0x7E)
LTTSL          # branch to label S if top of stack is negative
LLL            # end
```
Thanks to @r.e.s. for correction to the above (required extra duplicate for the branch instruction) and for smaller numbers to push on the stack.
[Answer]
## C, ~~83~~ ~~74~~ 69 characters
```
main(z) {for(;++z<96;"\33iE!vk?}GkRP8z"[z/7]&1<<z%7&&putchar(z+32));}
```
~~I really tried to get it down below 80 characters, but I just haven't been able to pull it off. I finally decided to post what I have, on the assumption that I (or someone else) will figure out 79-character solution ten minutes after posting this.~~ Okay, it wasn't quite ten minutes, but it worked in principle.
I really wanted to post a version that didn't have to have a gratuitous space in the source code, but that one landed in a strange-attractor orbit, bouncing between a handful of solutions. After many minutes of trying to nudge one of them into a stable solution, I gave up and added the space.
[Answer]
### ><> - 80
```
zbcdjkpqruvwxaABCDEFGHIJKLMNOPQRSTUVWXYZ#!"'$%^&*()@!+-[]{},;:/\<>=?|~0123456789
```
When fish errors it prints out "something smells fishy...". Since z is a bad instruction it errors right away
[Answer]
### Golfscript, ~~26~~ 24 characters
```
"126,32>''+".~\-'.~\-"'-
```
Takes a range generation script, duplicates it, executes it, substracts it from its result, then substracts the result subtraction code and the other quote character.
[Answer]
I know it's not winning any contests. I just wanted to try it in a language not normally used, just for kicks.
# **Java - ~~209~~ ~~195~~ ~~152~~ 140 characters**
```
class a{public static void main(String[]a){for(char c=0;;c++)System.out.print("publicas{tvodmn(Srg[])h=0;w+ye.\"\\xO<?:}".indexOf(c)<0?c:"");}}
```
**With line breaks and tabs**
```
class a{
    public static void main(String[]a) {
        for(char c=0;;c++)
            System.out.print("publicas{tvodmn(Srg[])h=0;w+ye.\"\\xO<?:} ".indexOf(c)<0?c:"");
    }
}
```
Beware if you execute: program does not terminate. Haha
**Explanation**
1. `for(char c=0;;c++)`: Since a `char` can be treated as an `int`, I use that to my advantage here to increment through all possible values of `c`. I omit the terminating condition in the loop (the one that would go between the two semicolons) in order to save on characters, since it wasn't specified that the program had to terminate. :)
2. `"publicas{tvodmn(Srg[])h=0;w+ye.\"\\xO<?:} ".indexOf(c)<0?c:""`: Sadly, not a very elegant approach, but it gets the job done. Manually list every character present in the source code as a `String` literal, then check whether the current `char c` occurs within it with `indexOf()`. If the `indexOf()` call returns `-1`, it doesn't exist, and therefore we should print it. The rest of it just uses the ternary operator to save on characters and space.
[Answer]
## Perl, 49 characters
```
say grep/[^+-246\[-^aceghmprsy]/,map chr,041..126
```
This is an interesting challenge -- it's sort of the anti-quine, and I've managed to shorten the program a couple of times by *increasing* the range of characters that appear in it.
[Answer]
## Ruby, ~~81~~ ~~78~~ ~~68~~ ~~66~~ ~~62~~ 57
```
(?!..?~).map{|a|$><<a if/[()ifmap{}|?!.~\/\\\[\]$><]/!~a}
```
Simply checks itself. Duplicate characters manually removed.
Thanks to Josh for saving 4 characters, and minitech for saving 5 characters!
[Answer]
## Befunge (48)
```
<|::-1,+*88:<+3*87
6<@.**85
9>"()~&"/%$ |!#';=?}
```
Outputs: {zyxwvutsrqponmlkjihgfedcba`\_^][ZYXWVUTSRQPONMLKJIHGFEDCBA240
[Answer]
Not very serious, but I had to give it a go:
## JSFuck (138152)
[(compiled source here)](http://wmmusic.nl/codexamples/printsitselfjsfuck.js)
Original source:
```
for(x=0x7e;x>0x19;x--){
    console.log(String.fromCharCode(x).replace(/[\[\]!\+\(\)]/ig, ''))
}
```
Prints all characters except ***()+[]!***
[Answer]
## GolfScript (18 16 chars)
```
"),@`^^32>#.~".~
```
[Online demo](http://golfscript.apphb.com/?c=IiksQGBeXjMyPiMufiIufgoKLnB1dHMgMTI3LDMyPl4nIiksQGBeXjMyPiMufiIufideLA%3D%3D) with an extra line which does a correctness check and outputs the number of characters in error.
(I have various equivalent alternatives. `@`^` can be replaced with `\\``; `#` can be replaced with ``` or `]`. The right combination can be used with Howard's trick to equal his score of 15 because backslashes don't need escaping in blocks the way they do in string literals: `{),\`^32>].~}.~`. But Howard deserves the credit for that trick).
[Answer]
# Brainfuck, 173
```
+++++[->++++++<]>>>++[------<+>]<++++>>----[----<+>]>-[-------<+>]>-[---<+>]<------->>-[---<+>]<+++++++++>>--[-----<+>]<+++++>>+[---------<++>]+++++++++++++[<[.+<]>[>]<-]\=,
```
Pretty long, I might try again later. 
[Answer]
## J (~~52~~ 40)
Edit: Duh, forgot about `e.`
```
'''([[email protected]](/cdn-cgi/l/email-protection)#[)~95{32}a'(-.@e.#[)~95{.32}.a.
```
Old version:
```
(>@(*/@('(>@*/''&~:).#]32{95}a'&~:)&.>)#])95{.32}.a.
```
Other variant (same length but less output):
```
([#~*/"1@('([#~*/"1@''&:0)95{.32}a'&~:"0))95{.32}.a.
```
[Answer]
# Python 3 - ~~68~~ 61
```
x=r"print(*set(map(chr,range(32,127)))-set(x+'=\"'))"
exec(x)
```
... thanks to @WolframH for the improvements.
[Answer]
## PowerShell: 96
Must be saved and run as a script.
```
diff([char[]](gc $MyInvocation.InvocationName))([char[]](32..126))-Pa|?{$_.SideIndicator-eq'=>'}
```
`diff` is a built-in alias for `Compare-Object`.
`gc` is a built-in alias for `Get-Content`.
`$MyInvocation.InvocationName` gets the full path to the script being executed.
`32..126` is the decimal equivalent for `0x20..0x7e`, and so creates an array of the decimal ASCII codes we're looking for.
`[char[]]` takes the contents of the next object and puts them into an array, breaking them up and converting them into ASCII characters. So, we now have two arrays of ASCII characters - one pulled from this script, the other defined by the challenge criteria.
`-Pa` sets `Compare-Object` to "Passthru" format, so only the items which are found different between the inputs are output at the console - indicators of which items were in which input are still stored in the object's data, but are not displayed.
`|?{$_.SideIndicator-eq'=>'}` pipes `Compare-Object`'s output to `Where-Object`, which filters it down to only the items which are exclusive to the second input.
[Answer]
# **Java - 126 characters**
minimized:
```
class hjq{public static void main(String...w){for(char z='"'|0;++z!='a';)if("'()+.0;=OS".indexOf(z)==~0)System.out.print(z);}}
```
unminimized:
```
class hjq {
    public static void main(String... w) { 
        for (char z = '"'|0; ++z != 'a';) {
            if ("'()+.0;=OS".indexOf(z) == ~0) {
                System.out.print(z);
            }
        }
    }
}
```
This is an interesting problem, because individual tokens might benefit from their longer form because it re-uses characters. For example, normally `String[]` would be shorter, but `String...` removes the need for the square brackets in the conditional string.
I found the trick was to try and use characters at the beginning and end of the range so you can exclude them from the output simply by altering your loop start and end.
For Java, a key character to exclude is `"`, because having that in the string requires escaping it, which adds `\` to your program, which needs to go in the string, which adds `\\`. By removing `"` from your conditional string you remove 4 characters. This can be achieved by making sure you use and `!` and starting your loop from `#`.
All the lowercase letters appear near the end of the range, with only `{`, `|`, `}` and `~` coming after them. Because of Java's verbosity, most of the lowercase letters are used just for the boilerplate. Likewise, `{` and `}` are trivial for a Java program, because the boilerplate requires them.
`|` can be used if you have an or condition, but I couldn't find a way to take advantage of one that leads to a shorter program than just using `|` as a bitwise operator. The `|0` makes me feel a little dirty, because it's the only part that's a nop just to get the character in there.
`~0` yields `-1`, which is handy because that's what we need to check for with `indexOf`. Combining this with using `!=` for the loop conditional eliminates the `<` character altogether, which means it doesn't need to go inside the conditional string.
[Answer]
**Javascript, 92**
```
(function f(){for(i=32;126>i++;)!~(""+f).indexOf(c=String.fromCharCode(i))&&console.log(c)})()
```
[Answer]
# [BitShift](http://esolangs.org/wiki/BitShift), 1038 bytes
BitShift is a language which only supports `0` and `1` as syntax. I figured it would be easy to print all other characters, but since it doesn't really support looping it still ended up a massive 1038 bytes.  
However, I believe it's not really possible to go any smaller than this..
```
101001100101011011010100110111010100100101011001101111010100100101011001000101011011010100101100110110101001001010110010001010110110101000001101010010010101100100010101101101010000010000011001010110110101000010000101011011010100110111010100100101011111100101011011010100110111010100100101011001101111010100100101011001000101011011010100000000011010100100101011001000101011011010100110010000101011011010100110111010100100101011001101001101010010010101100100010101101101010011001000010101101101010011011101010010010101111011111110010101101101010011011101010010010101100101100101011011010100010001010110110101001000010101101101010011011101010010010101110111110010101101101010011011101010010010101111111100101011011010100110111010100100101011111011110101001001010110010001010110110101001000100000101011011010100110111010100100101011111010011010100100101011001000101011011010100100000101011011010100110111010100100101011001101111010100100101011001000101011011010100010000010101101101010011011101010010010101101001101101010010010101101001101010
```
Prints
```
 !"#$%&'()*+,-./23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
```
Try it [here](https://dl.dropboxusercontent.com/u/10914578/Bitshift.html)
[Answer]
# Brainfuck, ~~133~~ ~~123~~ ~~114~~ 110 bytes
```
++++++++++++++++[->++++++>++>+++>++++>++<<<<<]>-->>->->+[---<.+.+<.+<.+<.+.+.+>>>>]++[-<.+.+.+<.+>>]<+.<+.<++.
```
A bit of more tinkering with a former solution (before I realized the below was smaller - allthough this was before I did some heavy optimization). This works by storing 4 sets of ascii numbers and print them with some tricky looping, and then give the missing characters afterwards (i.e. ones that are between invalid ascii numbers).
Original submission
```
>>+++++++++++[<+<+>>->++>+++<<]<++>>++++++>>+++++[-<<<++++++>>>]<<<+<<[->>+.<<]>>++.++<[->+.<]>++.+>[-<+.>]<++.+>>[-<<+.>>]
```
It does the following:
* Create 4 registers containing 11. 13, 28, 33
* Create a 5th with the value 31 to start the printing
* Print ascii 32-42 (11)
* Print ascii 44
* Print ascii 47-59 (13)
* Print ascii 61
* Print ascii 63-90 (28)
* Print ascii 92
* Print ascii 94-126 (33)
[Answer]
## sh (47)
```
tr</dev/urandom -cd \[:print:]|tr -d "`cat $0`"
```
Uses the self-referential approach. Assumes `/dev/urandom` will eventually output every octet at least once. Doesn't terminate.
If we assume that `man` is installed, we could instead make use of the `ascii(7)` manpage (and thus have a terminating program) (**44** chars, thanks @fennec).
```
man ascii|tr -cd \[:print:]|tr -d "`cat $0`"
```
[Answer]
## Python 2, 69
```
for x in range(38):print chr(x+59)#!"$%&'*,-./012467bdjklmqsuvwyz{|}~
```
I use the longest (that I'm able to find) sequence of continuous chars I can print out and add the others as a comment after the code.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 11 bytes
I don't think I saw any Vyxal on here! Prints all printable ASCII with kQ and filters chars out with F
```
kQ`\kQF\``F
```
[Try it Online!](https://vyxal.pythonanywhere.com/?v=2#WyIiLCIiLCJrUWBcXGtRRlxcYGBGIiwiIiwiIl0=)
[Answer]
Definitely the longest solution here, but coding in Lino is always fun:
# [L.in.oleum](http://anynowhere.com/bb/layout/html/frameset.html) - ~~655~~ 523 characters
```
"libraries"/arch/cpu/base;/hmi/conout;/data/bytes;/data/string/t2s;/data/heap;/data/heap/connect/mgrab;"stockfile"a;"directors"displaystatus=engage;"injection"c=524;b<-bytes.bytesizeconvert:c;b<-heap.alloc:b;a<-heap.alloc:c;[filecommand]=readfile;[filename]=stockfile;[fileposition]=0;[fileblocksize]=c;[fileblockpointer]=b;arch.fileread;[string.psource]=b;[string.ptarget]=a;string.t2s;b<-heap.alloc:7fh;c=32;d=b;"f"[d_32]=c;+c;+d;?c<7fh>f;"w"d=[a];+a;?d=0>y;?d<32>w;?d>7eh>w;e=b;e+d;[e]=33;^w;"y"b+32;"v"conout.say:b;bye;
```
No comments, just reads the source compiled into binary. Save as `a.txt` or it won't compile!
[Answer]
## Haskell (70)
```
import Data.List
main=putStrLn$[' '..'~']\\" \\\"$'.=DLS[]aimnoprstu~"
```
The boring duplicate-characters-in-program-in-a-string, subtract-from-universal-set solution. Far from a codegolf winner, though it's surprisingly legible for its length.
(Now with list subtraction instead of `filter`/`notWith`.)
[Answer]
# Java - 111 Bytes
I know I'm 4 years too late, but I just found this question.
```
void SPARE_VOMIT(){System.out.print(0!=('^'>>8|3&6%2<<~7*4)?"$#/^@\bc[]":'`'-5+"lnbfghjkqwxyz".toUpperCase());}
```
I tried to put as few characters in the ignored String as possible.
Ungolfed:
```
void SPARE_VOMIT(){                                   // vomit out all the spare characters
    System.out.print(0 != ('^'>>8|3&6%2<<~7*4) ?             // Both sides here = 0
                     "$#/^@\bc[]"              :             // The shame string...
                     '`'-5 + "lnbfghjkqwxyz".toUpperCase()); // Print 91 and caps.
}
```
[Answer]
# [><>](https://esolangs.org/wiki/Fish), ~~44~~ ~~43~~ ~~37~~ 35 bytes
[crossed out 44 is still regular 44 ;(](https://codegolf.stackexchange.com/a/135601/76162)
```
" 'r:{-}30{l4-*?.~~:9e*=?;:l2=?o1+}
```
[Try it online!](https://tio.run/##S8sszvj/X0lBvciqWrfW2KA6x0RXy16vrs7KMlXL1t7aKsfI1j7fULv2/38A "><> – Try It Online")
Outputs `!#$%&(),/5678<>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfghijkmnpqstuvwxyz|`
### How It Works:
```
"   Wrapping string literal, adding the source code to the stack.
    This adds a space at the start to initialise the counter
  '  Runs another string literal over the whole code
     This means both " and ' are added to the stack
   r:  Get the counter from the bottom of the stack and duplicate it
     {-}  Get the bottom of the stack and check if it is equal to the counter. Push the check to the bottom of the stack
        30  Add 3, 0 to the stack for later
          {l4-*  Get the equality check from the bottom of the stack and OR it with whether the stack is empty of values to check against
               ?.  If the character is equal or the stack is empty, continue. 
                   Else set the instruction pointer to 3,0 to check against the next character
                 ~~  Pop the excess 3,0
                   :9e*=?;  Check if the counter is equal to the 126, the last character, and end if so.
                          :l2=?o  If the stack is empty of values to check (ie the character is not in the code), print it.
                                1+}  Add one to the counter and, because ><> is toroidal, loop back to the beginning
```
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), 90 bytes
```
++++[->+++>++++++++<<]>-[->.>+<+<]>+.+++>++[-<.<++>+>]<+.++<++[->.>+<+<]>+.++>+++++[-<.+>]
```
[Try it online!](https://tio.run/##SypKzMxLK03O/v9fGwiide2AJAiDgY1NrJ0uUEzPTttGG8jW1oPIRuva6NmAWHaxNiAxG7BOZFUQI0DqgGr@/wcA "brainfuck – Try It Online")
**Tape Layout:**
*`[Initial Count Cell] , [Counter Cell One] , [Ascii Cell] , [Counter Cell Two]`*
**Explanation:**
```
++++[->+++>++++++++<<]>-      # sets counter cell one to 11 and ascii cell to 32
[->.>+<+<]                    # prints ascii 32-42 and creates counter cell two
>+.+++>++                     # prints ascii 44 and sets counter cell two to 13
[-<.<++>+>]                   # prints ascii 47-59 and resets counter cell one
<+.++<++                      # prints ascii 61 and sets counter cell one to 28
[->.>+<+<]                    # prints ascii 63-90 and resets counter cell two
>+.++>+++++                   # prints ascii 92 and sets counter cell two to 33
[-<.+>]                       # prints remaining ascii characters
```
**Output:**
```
 !"#$%&'()*,/0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~
```
]