# Backstory:

I think that my boss might finally realize that I don't any enough work, despite being paid by the hour. I want to throw him off track, by writing as many valid programs as I can to send to him. Unfortunately, due to budget cuts, my keyboard only allows each key to be pressed once.

# Specification:

Write as many different valid programs as you can for your language. You may not reuse any character at any time (even within the same program). A program is "valid" is it compiles and runs without any errors (warnings are acceptable), for any given input. Your score is the number of unique programs written.

It does not matter what the program actually does. It does not need to take input, produce output, or even terminate. The only restriction is that may never return an error.

# Example (JavaScript):

1. b=1
2. alert(2)
• "Any given input" is a bit problematic, we often define that input can be taken as command line arguments, and most compilers/interpreters will crash given some random argument. How about any input through one particular method chosen by the answerer? For complicated challenges like this I'd personally recommend using the sandbox. – FryAmTheEggman Jun 15 '17 at 0:07
• Open virtual keyboard, no keys pressed, any byte entered [/sarcasm] – CAD97 Jun 15 '17 at 0:34
• How do you define "return an error"? – Esolanging Fruit Jun 15 '17 at 1:15
• I voted to close as unclear because of the "any input" issue. (It's labelled as too broad because that's what the majority chose.) – xnor Jun 15 '17 at 1:16
• Yes, this is problematic in many esoteric languages, but it can be a very interesting challenge in others! My recent "How high can you count" challenge resulted in two gold badges and is somewhat similar to this one. A few suggestions off the top of my hat: 1. Ban languages where every single character is a valid complete program (e.g. Pingpong). 2. Ban symbol independent languages (Lenguage). 3. Require that the program does something (to disallow "programs" that consists of no-ops). 4. Skip the "any input" rule. I suggest you change the rule to: "The programs may optionally take input.". – Stewie Griffin Jun 15 '17 at 7:56

# Jelly, 225 programs

(empty program)
¢
¤
¥
¬
®
µ
½
Æ
Ç
Ñ
×
Ø
Œ
ß
æ
ç
ð
ı
ȷ
ñ
÷
ø
œ
(space)
!
\$
%
&
(
)
*
+
,
-
.
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
A
B
C
D
E
F
G
H
I
J
K
L
N
O
P
Q
R
S
U
V
W
X
Y
[
]
^
_
a
b
c
e
f
g
h
i
j
k
l
m
n
o
p
q
r
u
v
w
x
|
~
¶
°
¹
²
³
⁴
⁵
⁶
⁷
⁸
⁹
⁺
⁻
⁼
⁽
⁾
Ɓ
Ƈ
Ɗ
Ƒ
Ƙ
Ɱ
Ɲ
Ƥ
Ƭ
Ʋ
Ȥ
ɓ
ƈ
ɗ
ƒ
ɦ
ƙ
ɱ
ɲ
ƥ
ʠ
ɼ
ʂ
ƭ
ʋ
ȥ
Ạ
Ḅ
Ḍ
Ẹ
Ḥ
Ị
Ḳ
Ḷ
Ṃ
Ṇ
Ọ
Ṛ
Ṣ
Ṭ
Ụ
Ṿ
Ẉ
Ỵ
Ẓ
Ȧ
Ḃ
Ċ
Ḋ
Ė
Ḟ
Ġ
Ḣ
İ
Ṁ
Ṅ
Ȯ
Ṗ
Ṙ
Ṡ
Ṫ
Ẇ
Ẋ
Ẏ
Ż
ạ
ḅ
ḍ
ẹ
ḥ
ị
ḳ
ḷ
ṇ
ọ
ṛ
ṣ
ṭ
ụ
ṿ
ẉ
ỵ
ẓ
ȧ
ḃ
ċ
ḋ
ė
ḟ
ġ
ḣ
ṁ
ṅ
ȯ
ṗ
ṙ
ṡ
ṫ
ẇ
ẋ
ẏ
ż
«
»
‘
’
“
”


224 characters in Jelly's 256-byte codepage are valid, non-error-throwing programs on their own, plus an empty program. The other characters could be used in literals, but since all the literal-denoting characters are already in use on their own, no new programs can be made from them.

All of these were tested, one by one, on tio.run.

• @JonathanAllan Not according to the codepage. Are you thinking of a linefeed? – scatter Jun 15 '17 at 0:47
• Oopsie yes I was! – Jonathan Allan Jun 15 '17 at 0:49
• You could add t€, d/ and s\ . – Jonathan Allan Jun 15 '17 at 0:52
• The rules are rather unclear to me, but many of these programs error given certain inputs. – FryAmTheEggman Jun 15 '17 at 0:55
• The any input might trounce this count :( (was about to suggest changing d/ to t/ and adding dþ). – Jonathan Allan Jun 15 '17 at 1:08

# APL (Dyalog Unicode) version 16.0, 8384 programs

⍝ empty program
⍝ single space
⍝ single tab
0
1
2
3
4
5
6
7
8
9
+
-
×
÷
⌈
⌊
*
⍟
|
!
○
~
∨
∧
⍱
⍲
<
≤
=
≥
>
≠
≡
≢
⍴
,
⍪
⍳
↑
↓
?
⍒
⍋
⍉
⌽
⊖
∊
⊥
⊤
⍎
⍕
⌹
⊂
⊃
∪
∩
⍷
⌷
→
⎕
1 2 3           ⍝ input for above program
⍞
Hello, World!   ⍝ input for above program
/
⌿
\
⍀
¨
&
⍨
⌶
#
⊆
⊣
⊢
⌸
⍸
⍝
⋄
L:
⍬
{}
⍝ just a newline
⍝ this line belong with the previous one


Try it online! (except for two which cannot run on TIO's version 15.0)

### Explanations:

Most of the programs just print their content. Exceptions are:

• The four whitespace ones do nothing.
• → terminates
• ⎕ asks for evaluated input
• ⍞ asks for character input
• ⍝ is a comment
• ⋄ is a statement separator (i.e. two statements that each do nothing)
• ⍬ prints an empty numeric list (i.e. just a newline)
• @Uriel I keep forgetting that this isn't that other challenge. – Adám Jun 15 '17 at 1:13
• Yup. These should already have a tag, like polysnippets or something else – Uriel Jun 15 '17 at 1:15

# Python REPL, 24 programs

[empty]
[space]
[tab]
[newline]
0
1
2
3
4
5
6
7
8
9
sum
pow
chr
next
id
()
{}
[]
#
\

• How about this set of six... sum, pow, id, all, chr, next? Also _ is valid. – Jonathan Allan Jun 15 '17 at 0:35
• @JonathanAllan all isn't valid because internal repeats aren't allowed. – xnor Jun 15 '17 at 0:37
• @xnor oh yeah :p well five there, maybe there is another set of six somewhere... – Jonathan Allan Jun 15 '17 at 0:38
• ...in which case hash, '', ..., and "" must go. – Jonathan Allan Jun 15 '17 at 0:44
• @JonathanAllan _ on a clean repl would throw a name error - it is assigned only after each evaluation – Uriel Jun 15 '17 at 1:04