239
\$\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\$
15
  • 23
    \$\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.
    Commented Aug 23, 2013 at 19:22
  • 4
    \$\begingroup\$ Are we allowed to print newlines (or any other unprintable ASCII characters)? \$\endgroup\$
    – flornquake
    Commented Aug 24, 2013 at 0:30
  • 2
    \$\begingroup\$ How did this question get revived? It's started getting upvotes again. \$\endgroup\$
    – Joe Z.
    Commented Jan 31, 2014 at 16:38
  • 7
    \$\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.
    Commented Feb 1, 2014 at 3:01
  • 2
    \$\begingroup\$ Can we output non-ASCII characters as well? \$\endgroup\$ Commented Nov 23, 2017 at 16:19

114 Answers 114

4
\$\begingroup\$

R, 72 bytes

cat(intToUtf8(setdiff(32:126,utf8ToInt("\\\"(),12368:ITUacdefinostu"))))

Try it online!

With correction from @JayCe

\$\endgroup\$
3
  • \$\begingroup\$ nicely done! Beats out the default polyglot by a fair margin! \$\endgroup\$
    – Giuseppe
    Commented May 15, 2018 at 18:49
  • 1
    \$\begingroup\$ I think you're missing \\ in the string which costs 2 bytes :( Otherwise I tried to golf it further but couldn't - clever use of setdiff ! \$\endgroup\$
    – JayCe
    Commented May 16, 2018 at 20:21
  • 1
    \$\begingroup\$ 71 bytes by starting at 35, which avoids the \\\" issue. \$\endgroup\$ Commented Mar 29, 2022 at 14:42
4
\$\begingroup\$

Ink, 91 86 bytes

{POW(77,7)} /*-#!"$%&'9:;<=>?@ABCDFGHIJKLMNQRSTUVXYZ[\]^_`abcdefghijklmnopqrstuvwxyz|~

Try it online!

Prints 1.604852E+13

The only thing Ink can really do to a string is print it - if you want to do actual string processing, you're meant to hook into external code. This means almost all characters will have to occur in our code, since we generally have no way to print the ones that don't. That means we can basically treat the first occurrence of each character as being free, and see how much stuff we can generate with as few repeated characters as possible.

One thing Ink can do is math. We can generate and print a number. With only two repeated characters, the expression {POW(77,7)} becomes 1.604852E+13, which has eleven distinct characters, none of which are used in the expression.

At this point, there isn't much more we could generate. We need 7 in our code, and while we might be able to generate a -, we'd need another set of {} to do more math, so that would really be a net negative. So we begin a multi-line comment using /* (because Ink doesn't care if we ever close those) and shove all the rest of the characters we aren't using in there.

  • -5 bytes by creating a larger floating-point number using POW instead of FLOAT, which then also includes E and + and has fewer repeated characters
\$\endgroup\$
3
\$\begingroup\$

J - 21

(u:32+i.97)-.1!:1<":5

write this to a file called 5 in the current directory. Then load execute the script with 0!:1<'5'

Or 25 without the file trick:

(-.~".)'(":u:32+i.0-~95)'
\$\endgroup\$
1
  • \$\begingroup\$ Source code contains ', which isn't removed from the output. \$\endgroup\$
    – FireFly
    Commented Jul 13, 2014 at 2:52
3
\$\begingroup\$

Clojure (142, 106, 103)

(defn -main[](let[c"(fn[l](pr(reduce disj(set(map char(range 32 126)))l)));-\\\"o"]((load-string c)c)))

formatted:

(defn -main []
  (let [c "(fn[l](pr(reduce disj(set(map char(range 32 126)))l)));-\\\"o"]
    ((load-string c) c)))

Think this does it, may need some tweaks. output:

#{@ ` ! A B b # C $ D % E & F ' G H I * J + K k , L M . N / O 0 P Q q R S 4 T 5 U V v 7 W w 8 X x 9 Y y : Z z { < | = } > ^ ? _}

runs the string, which is evaluateable clojure code, on itself. String has some comments at the end to get the characters used outside of the string (main method, etc)

\$\endgroup\$
3
\$\begingroup\$

Cubically, 61 bytes

Code:

~:5+1-777(B1D1+7)6+33077777(D3B3@6-7)0&2 !"#$%'*,./489;<=>?AC

Unique characters in program:

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

Output:

EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}
\$\endgroup\$
3
\$\begingroup\$

Python 2, 68 83 88 (but it actually reads the file)

No comments, no hacks, it just opens itself, and checks the contents. Includes the set logic from this answer.

print"".join(set(map(chr,range(32,127)))-set(open(__file__).read()))

Changed to print the output and not an array.

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Outputs the following characters which are in the program: ` 127[]acdefrtx` \$\endgroup\$
    – user8943
    Commented Aug 24, 2013 at 2:24
  • \$\begingroup\$ @ZeroPiraeus I've corrected that, and have met your score! \$\endgroup\$
    – user8777
    Commented Aug 24, 2013 at 5:47
  • 3
    \$\begingroup\$ These are definitely not ASCII characters. ASCII below 32 only contains control codes (Backspace, Bell, etc.), whitespace (CR, LF, tab), and the null char. \$\endgroup\$ Commented Aug 24, 2013 at 13:25
  • 1
    \$\begingroup\$ @Felix These are from Code page 437 (which starts at U+2639, I believe) \$\endgroup\$
    – Doorknob
    Commented Aug 24, 2013 at 15:02
  • 1
    \$\begingroup\$ You can get this down to 62 chars in python3 using @WolframH 's idea: print(*set(map(chr,range(32,127)))-set(open(__file__).read())). Longer by 1 character than the other answer, but more pythonic in my opinion \$\endgroup\$ Commented Aug 29, 2013 at 1:47
3
\$\begingroup\$

Bash (pure), 93 92 88 bytes

eval "a=$'$(printf '\\x%x' {32..127})'"
while read -rn1 c;do a=${a/"$c"};done<$0
echo $a

Example

cat > foo.sh # now paste and C-d
bash foo.sh  # !#&*+,45689:>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`bgjkmqsuyz|~
wc -c foo.sh # 93 (including end-of-line \n)

Explanation

  • The eval thing: construct a string that looks like \x20\x21...\x7f, and use bash&ksh's c-style-quote $'c-escape-str' to wrap it, in order to escape it into some real list-of-chars.
  • Then we use a while loop to read chars one-by-one, and use the 'replace first occurance' ${var/pat} to kill corresponding chars in $a. Note that we didn't set IFS properly, and read by default will consume \x20, \n and \t. The \x20 part will be handled later.
  • Finally we abuse IFS again so it can eat the space.

The output is in ASCII char order.

This very literal (for code golfs at least) one actually ended up smaller than what I expected it to be. Otherwise I will be thinking about # !&*+abc....

\$\endgroup\$
3
\$\begingroup\$

Z80Golf, 83 bytes

00000000: 2b2b 7036 092e 452c 453b 3b78 6f2c 4523  ++p6..E,E;;xo,E#
00000010: 2323 2323 2323 2323 2323 2323 2323 2329  ###############)
00000020: 2929 2929 2929 2929 307e 7620 2122 2425  ))))))))0~v !"$%
00000030: 2627 282a 2d2f 3132 3334 3537 3839 3a3c  &'(*-/12345789:<
00000040: 3d3e 3f40 4142 4344 7172 7374 7577 797a  =>?@ABCDqrstuwyz
00000050: 7b7c 7d                                  {|}

Try it online!

Printable characters aren't too useful in z80, but we can write this:

   dec hl
   dec hl
   ld (hl),b
   ld (hl),9
   ld l,'E'
   inc l
   ld b,l

   dec sp      ; $0009 starts here
   dec sp
   ld a,b
   ld l,a
   inc l
   ld b,l
   inc hl
   inc hl
   inc hl
   inc hl
   inc hl
   inc hl
   inc hl
   inc hl
   inc hl
   inc hl
   inc hl
   inc hl
   inc hl
   inc hl
   inc hl
   inc hl
   add hl,hl
   add hl,hl
   add hl,hl
   add hl,hl
   add hl,hl
   add hl,hl
   add hl,hl
   add hl,hl
   add hl,hl
   jr nc, $+2+'~'
   halt
   db " !\"$%&'(*-/12345789:<=>?@ABCDqrstuwyz{|}"

The idea is to print characters from 'F' to 'n', and put all the remaining characters in the code (the "garbage" string at the end).

The preamble writes 09 (tab) to $fffe, so that we can point SP there to jump to $0009 after putchar. The ld (hl), b achieves nothing; I just get rid of 'p' there.

L is initialized to 'E'+1, and counts up until (HL+17) << 9 overflows (sets the carry), which is when L is 111 = 'o', the first character we don't want to print.

If the carry is not set, we jump over a halt instruction and the garbage string, into thousands of NOPs, the PC eventually running into putchar = $8000 and returning to $0009.

See this answer for some more info on how this code prints characters in the first place.

\$\endgroup\$
1
  • \$\begingroup\$ nvm I saw that the code had to be printable as well. \$\endgroup\$
    – qwr
    Commented Jun 20, 2018 at 19:16
3
\$\begingroup\$

Deadfish~, 70 55 51 bytes

{iii}i{icicicicicic}dd{ci}iicicicici{ic}dd{ci}iciic

Because, y'know, I'm hilarious and original.

Saved 15 bytes by repeating a few characters
Saved 4 more by simplifying both instances of d{ic}i to {ci}

Try it online!

Previous Version (55 bytes):

{iii}i{icicicicicic}ddd{ic}iiicicicici{ic}ddd{ic}iiciic
\$\endgroup\$
3
\$\begingroup\$

Brainfuck, 95 bytes

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

The way this works is pretty simple, any decent Brainfuck interpreter will ignore the code between the brackets appearing at the start of source file, therefore creating a comment.

\$\endgroup\$
3
\$\begingroup\$

Pip, 20 bytes

PARM`[\\APRM\`\]\[]`

Uses the predefined printable ASCII variable, and regexes out the letters in the code.

Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ Added that into the Regex. \$\endgroup\$
    – Razetime
    Commented Sep 5, 2020 at 6:18
2
\$\begingroup\$

Q, 44

-1"c"$til[128]except"i"$"-1\"c$til[28]exp;";

.

q)-1"c"$til[128]except"i"$"-1\"c$til[28]exp;";
345679:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abdfghjkmnoqrsuvwyz{|}
\$\endgroup\$
2
\$\begingroup\$

C++ 143

#include<fstream>
#include<iostream>
char c[256],d,e=32;int main(){for(std::fstream i(__FILE__);i>>d;)c[d]++;for(;++e<127;)c[e]||std::cout<<e;}

Alternative version using macros - 155

#include"iostream"
#define d int main(){while(s,*s)l[*s++]++;for(e=35;++e<127;)!l[e]&&std::cout<<e;}
#define t(a)#a
#define f(a)t(a)
char*s=f(d),l[257],e;d

And a version without 'reflection' (examining own source) - 139

#include"iostream"
char h['~'],*a="'()*+,:;<=[]acdefhilmnorstu{}",i='#';int main(){for(;*a;)h[*a++]++;for(;++i<'~';)if(!h[i])std::cout<<i;}
\$\endgroup\$
2
\$\begingroup\$

Bash, with coreutils, 80

p=printf
for o in {32..126};{
c=`$p $($p "\%o" $o)`
grep -qF "$c" $0||$p "$c"
}

Output is:

!#&'}+,/45789:<>}@ABCDEGHIJKLMNOPQRSTUVWXYZ[]^_abhjklmsuvwxyz~
\$\endgroup\$
3
  • \$\begingroup\$ Never heard about this for v in something; COMPOUND_CMD syntax. Great… \$\endgroup\$ Commented Mar 2, 2016 at 8:13
  • \$\begingroup\$ Just a grep replacement, but 5-bytes longer: [[ $(<$0) = *"$c"* ]] \$\endgroup\$ Commented Mar 2, 2016 at 8:15
  • \$\begingroup\$ only 3 bytes longer now: remove the double quotes \$\endgroup\$ Commented Feb 19, 2018 at 0:04
2
\$\begingroup\$

PowerShell, 75 bytes

[char[]](32..39+42+44+45+47+58..90+92+94..96+98+100..103+105..113+115..126)

A different approach than the other PowerShell answer. Here, we manually build a list of ASCII values (...) that aren't in the source code, then cast that as a char-array [char[]]. PowerShell will by default write out values alone on a line like this, so we get printing for free.

Characters used in code: ()+.0123456789[]achr

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

Marbelous, 111 bytes

@0
--7E
<XE\
../\@0
:E\
}0}0
&0&1
{0{>
}0
-F
-E
-5
-4
>0
-7
>D
-F
>0
-2
>0
-2
>0
-3
>3
-2
-6
-8
-9
>0
&0&1
\/\/

Main board loops from 0x7E down to 0x20, E\ function rejects values by decrementing and comparing to small numbers (Marbelous' built in < and > operators only work on the range 0-35).

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

Python 2, 62

from string import*;print set(printable)-set(open("p").read())


Code must be saved in a file called p.

Lowest python solution so far ;D

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

Bash internals only, 133 bytes

w=printf
while IFS= read -r -n1 r;do i[$($w %d \'$r)]=1;done<$0
for r in {33..126};do [[ 1 -ne ${i[$r]} ]]&& $w \\$($w "%o" $r);done

Save and run with bash <filename>

Explanation

  1. Make printf shorter.
  2. For each char r read from $0 (i.e. the script itself), set i[ord(r)] to 1.
  3. For each number r in range(33, 127), if i[r] is not 1, printf the char corresponding to the number r. The $w \\$($w "%o" $r) part is where the number-to-char magic is: convert the number to OCT, and then prepend a backslash, and finally feed to printf to really print it.

The output is in ASCII order.

\$\endgroup\$
2
  • \$\begingroup\$ Actually I count 132. You can spare a few more characters: pastebin.com/G8YDBzJj – 113 characters. \$\endgroup\$
    – manatwork
    Commented Jan 31, 2014 at 9:59
  • 1
    \$\begingroup\$ This would get my upvote with some explanation about how it works. \$\endgroup\$ Commented Mar 19, 2015 at 19:37
2
\$\begingroup\$

05AB1E, 33 bytes

157 255B'QJ.V"157 2B'QJ.VSK"SK'"K

Try it online!


Pushes žQ by converting 157 into base 255.

Executes žQ with .V which pushes the printable ASCII character set (32-128).

Then remove all characters in the source code using K.

\$\endgroup\$
3
  • \$\begingroup\$ I have the feeling the program string can somehow be combined with a D.VsSK but I'm unable to find a way to accomplish it..:( That J screws things up so much.. +1 though, nice answer. \$\endgroup\$ Commented Apr 12, 2019 at 9:33
  • 1
    \$\begingroup\$ Ok, found something! :) "YSK157 255B'QJ.V"VY.VYSK'"K 28 bytes "YSK157 255B'QJ.V" is the string. This is popped and saved in variable Y, after which it's pushed again, and executed with .V (the YSK are no-ops; and the 157 255B'QJ.V is still the same as in your answer). Then the characters of this string Y are removed with YSK, and finally the double quote is removed (again, same as in your answer) with '"K. \$\endgroup\$ Commented Apr 12, 2019 at 9:46
  • 1
    \$\begingroup\$ @KevinCruijssen your 28 can easily be 25 by merging the two YSK. Using modern 05AB1E, I can get 24 with "8!55+257B.V3.$YSK"VY.V. \$\endgroup\$
    – Grimmy
    Commented Jan 16, 2020 at 22:50
2
\$\begingroup\$

Memory GAP, 3104 bytes

74b87337454200d4d33f80c4663dc5e5f7bd60b75b29d79b660a2859395c1a240e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf47cef8a734855777c2a9d0caf42666e69b21afc54fb48d153c19101658f4a2a480e9f1e8e40bb79e800b0cc9433830cf40e9f1e8e40bb79e800b0cc9433830cf40e9f1e8e40bb79e800b0cc9433830cf4594f803b380a41396ed63dca39503542f7bd60b75b29d79b660a2859395c1a240e9f1e8e40bb79e800b0cc9433830cf40e9f1e8e40bb79e800b0cc9433830cf40e9f1e8e40bb79e800b0cc9433830cf40e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a092433234ec78fcc91ffb1e54cd85e4a092433234ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a092433247bce5c74f589f4867dbd57e9ca9f808f7bd60b75b29d79b660a2859395c1a2434ec78fcc91ffb1e54cd85e4a092433234ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf4594f803b380a41396ed63dca395035420e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a0924332f7bd60b75b29d79b660a2859395c1a2434ec78fcc91ffb1e54cd85e4a09243320cc175b9c0f1b6a831c399e269772661f7bd60b75b29d79b660a2859395c1a24f24c2c15b9d03797c6874986a8d1951634ec78fcc91ffb1e54cd85e4a0924332faf05c15dfad45dafd1fc23d51236853f0a1dfdc675b0a14a64099f7ac1cee8374b87337454200d4d33f80c4663dc5e5f7bd60b75b29d79b660a2859395c1a240e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf40e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a092433234ec78fcc91ffb1e54cd85e4a09243320cc175b9c0f1b6a831c399e269772661f7bd60b75b29d79b660a2859395c1a2434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf4594f803b380a41396ed63dca39503542f7bd60b75b29d79b660a2859395c1a2434ec78fcc91ffb1e54cd85e4a0924332faf05c15dfad45dafd1fc23d5123685334ec78fcc91ffb1e54cd85e4a09243320cc175b9c0f1b6a831c399e269772661f7bd60b75b29d79b660a2859395c1a24f0a1dfdc675b0a14a64099f7ac1cee83f24c2c15b9d03797c6874986a8d1951634ec78fcc91ffb1e54cd85e4a09243327cef8a734855777c2a9d0caf42666e69b21afc54fb48d153c19101658f4a2a48a87deb01c5f539e6bda34829c8ef2368c68271a63ddbc431c307beb7d2918275852438d026c018c4307b916406f98c6274985f5115ad149212a917dbef8ec801b21afc54fb48d153c19101658f4a2a480cc175b9c0f1b6a831c399e269772661f7bd60b75b29d79b660a2859395c1a2434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf474b87337454200d4d33f80c4663dc5e5f7bd60b75b29d79b660a2859395c1a240e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf40e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243324124bc0a9335c27f086f24ba207a4912f7bd60b75b29d79b660a2859395c1a24f24c2c15b9d03797c6874986a8d1951634ec78fcc91ffb1e54cd85e4a0924332faf05c15dfad45dafd1fc23d5123685374985f5115ad149212a917dbef8ec801

Try it online!

Expanded:

74b87337454200d4d33f80c4663dc5e5f7bd60b75b29d79b660a2859395c1a240e9f1e8e40bb79e8
00b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf4
34ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e
54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf47cef8a734855777c2a9d0caf42666e69
b21afc54fb48d153c19101658f4a2a480e9f1e8e40bb79e800b0cc9433830cf40e9f1e8e40bb79e8
00b0cc9433830cf40e9f1e8e40bb79e800b0cc9433830cf4594f803b380a41396ed63dca39503542
f7bd60b75b29d79b660a2859395c1a240e9f1e8e40bb79e800b0cc9433830cf40e9f1e8e40bb79e8
00b0cc9433830cf40e9f1e8e40bb79e800b0cc9433830cf40e9f1e8e40bb79e800b0cc9433830cf4
34ec78fcc91ffb1e54cd85e4a092433234ec78fcc91ffb1e54cd85e4a092433234ec78fcc91ffb1e
54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a0924332
47bce5c74f589f4867dbd57e9ca9f808f7bd60b75b29d79b660a2859395c1a2434ec78fcc91ffb1e
54cd85e4a092433234ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf4
594f803b380a41396ed63dca395035420e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e
54cd85e4a0924332f7bd60b75b29d79b660a2859395c1a2434ec78fcc91ffb1e54cd85e4a0924332
0cc175b9c0f1b6a831c399e269772661f7bd60b75b29d79b660a2859395c1a24f24c2c15b9d03797
c6874986a8d1951634ec78fcc91ffb1e54cd85e4a0924332faf05c15dfad45dafd1fc23d51236853
f0a1dfdc675b0a14a64099f7ac1cee8374b87337454200d4d33f80c4663dc5e5f7bd60b75b29d79b
660a2859395c1a240e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a0924332
0e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e8
00b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf4
0e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a092433234ec78fcc91ffb1e
54cd85e4a09243320cc175b9c0f1b6a831c399e269772661f7bd60b75b29d79b660a2859395c1a24
34ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf4594f803b380a4139
6ed63dca39503542f7bd60b75b29d79b660a2859395c1a2434ec78fcc91ffb1e54cd85e4a0924332
faf05c15dfad45dafd1fc23d5123685334ec78fcc91ffb1e54cd85e4a09243320cc175b9c0f1b6a8
31c399e269772661f7bd60b75b29d79b660a2859395c1a24f0a1dfdc675b0a14a64099f7ac1cee83
f24c2c15b9d03797c6874986a8d1951634ec78fcc91ffb1e54cd85e4a09243327cef8a734855777c
2a9d0caf42666e69b21afc54fb48d153c19101658f4a2a48a87deb01c5f539e6bda34829c8ef2368
c68271a63ddbc431c307beb7d2918275852438d026c018c4307b916406f98c6274985f5115ad1492
12a917dbef8ec801b21afc54fb48d153c19101658f4a2a480cc175b9c0f1b6a831c399e269772661
f7bd60b75b29d79b660a2859395c1a2434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e8
00b0cc9433830cf474b87337454200d4d33f80c4663dc5e5f7bd60b75b29d79b660a2859395c1a24
0e9f1e8e40bb79e800b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e8
00b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf4
34ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf40e9f1e8e40bb79e8
00b0cc9433830cf434ec78fcc91ffb1e54cd85e4a09243320e9f1e8e40bb79e800b0cc9433830cf4
34ec78fcc91ffb1e54cd85e4a09243324124bc0a9335c27f086f24ba207a4912f7bd60b75b29d79b
660a2859395c1a24f24c2c15b9d03797c6874986a8d1951634ec78fcc91ffb1e54cd85e4a0924332
faf05c15dfad45dafd1fc23d5123685374985f5115ad149212a917dbef8ec801

Explanation

Memory GAP's instructions are md5 hashes of their actual instructions. Using ; as a delimiter, this is the "original" program:

;
aaaa;size;dup;add;dup;add;dup;add;


dup;open;pop;
dup;

dup;
dup;
aaaaa;size;dup;dup;dup;dup;add;add;add;dup;add;aaa;size;add;add;dup;aaaaa;dup;add;size;add;a;size;neg;add;
btwn;

swap;
aaaa;size;dup;add;dup;add;dup;add;dup;dup;add;add;a;size;add;dup;aaaaa;size;add;btwn;
add;

a;size;swap;neg;add;
open;
pop;char;out;nil;shut;pop;

a;size;add;
dup;
aaaa;size;dup;add;dup;add;dup;add;
dup;dup;add;dup;add;aa;size;neg;add;btwn;
shut;

This simply iterates over the range between 32 and 126, and prints it if and only if it does not fall between '0' and '9' or 'a' and 'f'.

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

dc, 83 79 bytes

120d115 108 100 93 91 80 62[d1-d43<:]ds:x[l.dP]s;34s.[dl.!=;s,l.1+ds.127>/]ds/x

Try it online!

Prints "#$%&'()*?@ABCDEFGHIJKLMNOQRSTUVWXYZ\^_`abcefghijkmnopqrtuvwyz{|}~

The lazy answer of commenting out the entire printable range (and printing nothing) would be 95 bytes, so while this may be suboptimal, I'm pretty pleased.

120d115 108 100 93 91 80 62[d1-d43<:]ds:x puts all the values on the stack that we need to ignore. Decimal is seemingly the ideal base for this, particularly when I factor in the additional characters that would be needed to change the input base. The first few values I have to enter in manually, but I use all the characters from 43-62, so I can generate those in a loop. I don't need to use a few of these characters, but it saves bytes to run through the ones that I don't need, so I named my registers/macros :, ., ,, ;, and / for the sake of using those characters.

[l.dP]s; is the macro that will print the character if it's not in the list. 34s. is the counter - since I use characters 32 and 33, I just start at 34. [dl.!=;s,l.1+ds.127>/]ds/x is a pretty straightforward macro, just load the counter, ., see if it's in the list, run ; if so, increment, and loop until we're out of printable range.

Golfed off four bytes because I was accidentally omitting p (this also made my answer invalid!). I must have at one point used both P and p to print, or thought I would have to.

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

Perl 6, 43 bytes

<say |keys (" "..<~>) (-).comb#EVAL>~~.EVAL

Try it online!

Uses the standard Perl6 quine format.

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

Ly, 41 bytes

"lops!;=`][' "s'"ll[p'~=[;]p~![!lo]pl`sl]

Try it online!

This one just pushes all the unique characters used in the code (minus ~ to the stack, along with ") then iterates from the codepoint for (space) checking to see if that codepoint is on the stack. Any codepoint that isn't found is printed.

"lops!;=`][' "                            - loads all the used chars to the stack
              s                           - save ` ` (space) to backup cell
               '"                         - add `"` to the stack too 
                 ll                       - load the curr codepoint twice
                   [p                  l] - infinite loop
                     '~=[;]p              - if the code point is `~` exit
                            ~              - search stack for curr codepoint
                             !             - negate results boolean
                              [!  ]p       - if/then, true if not found
                                lo         - restore curr codepoint and print
                                    l`s    - restore curr codepoint and increment
             

Output is: #$%&()*+,-./0123456789<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_abcdefghijkmnqrtuvwxyz{|}

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

JSFuck 11863

This answer is a compressed version of this code

for(x=0x7e;x>0x19;x--){console.log(String.fromCharCode(x).replace(/[\[\]!\+\(\)]/ig,''))}

here is the full working JSFuck version of this code

[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[!+[]+!+[]])+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]])()([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+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[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]]((!![]+[])[+[]])[([][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]](([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]])+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])())

\$\endgroup\$
1
  • \$\begingroup\$ Characters other than ] and - don't need to be escaped inside character groups. \$\endgroup\$
    – xigoi
    Commented Mar 10, 2022 at 21:17
2
\$\begingroup\$

Stax, 12 bytes

Vp.."-"Vp-"-

Run and debug online!

Added for completeness.

Vp in Stax is the set of all printable ASCII characters, .." is the two character string literal (of .") in Stax.

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

Ruby (50)

puts (?#..?~).to_a.join.tr"()?!#.,~_aijnoprstu",""

Outputs:

$%&'*+-/0123456789:;<=>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^`bcdefghklmqvwxyz{|}
\$\endgroup\$
1
\$\begingroup\$

Python, 94

print !"#$%&'90*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[/\]^_`abcdefghjklmoqsuvwxyz{|}
\$\endgroup\$
2
  • 1
    \$\begingroup\$ The "do nothing" solution was already posted. \$\endgroup\$
    – Joe Z.
    Commented Nov 27, 2013 at 22:15
  • \$\begingroup\$ @JoeZ. I've changed it to do something \$\endgroup\$
    – Timtech
    Commented Nov 28, 2013 at 12:06
1
\$\begingroup\$

Ruby 2.1.0

206 204 characters

chars_in_source = File.read("self.rb").chars.uniq.map(&:ord)
printable_ascii = (20..126).to_a
not_in_source = printable_ascii.reject { |c| chars_in_source.include?(c) }

puts not_in_source.map(&:chr).join

And the output is:

#$%'*+,-/345789;<>@ABCDEGHIJKLMNOPQRSTUVWXYZ[\]^`gkvwxyz~

Not the shortest here (in fact, it might be the longest). But that's the great thing about this: it got me to go try something I'd never done before.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ VariableNamesGreaterThanOneCharacterLongException on line 1 \$\endgroup\$ Commented Mar 2, 2016 at 4:38
1
\$\begingroup\$

Python, 88 81 78 77 bytes

actually reads the file

I tried to do it the 'clean' (as in 'easy to read') way, turned out quite nice, although i'm still new to python and probably this can be shortened as well.

file named 'a' is the file executed.

from string import*
for c in printable:
    if c not in open('a').read():print c

And it prints out all the ASCII characters not found in source file. I know this was supposed to be a clever hack (as in all those which contain all the ascii set or addresses, or use an error), but I wanted to do explicitly what was asked :]

Anyone has a suggestion how to make it even shorter while still going in this direction?

[edit] trimmed one more char, thanks for the tip!

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Timtech's tip makes possible to reduce 1 more character. \$\endgroup\$
    – manatwork
    Commented Jan 31, 2014 at 12:30
1
\$\begingroup\$

Javascript 78 chars

bghjklm()seuABCDEFGHIJKLMNOPQRSTUVWXYZvwyz!@#$%^&*1234567890{}[]-=_+\;"'.,<>/?

Outputs:

SyntaxError: Unexpected identifier

Not the shortest code, but threw a try for fun. Notice the colon (:) and space () are covered in Output also.

Feedback appreciated.

\$\endgroup\$
1
  • \$\begingroup\$ And I just notice now that @xem has already done something similar to my code. Sorry, at CodeGolf people (and xem), if you all consider what I did unknowingly is copying another's work, I will happily delete my answer. \$\endgroup\$ Commented Jan 31, 2014 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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