g | x | w | all
Bytes Lang Time Link
nan250804T134418ZSteve Be
0022 languages250804T131926ZSteve Be
0053 languages220208T193228Zuser1008
nan201001T011501ZJonah

Alternative answer

It's a bit hard to tell whether this is valid or not, but maybe this works in F# and OCaml.

fun _->infinity

It's a lambda that you have to assign to something and run. I don't think it's possible to call a function without passing something, but the something is ignored, so I don't know if that counts as using input.

F# (.NET Core), 17 bytes

  fun _->infinity

Try it online!

OCaml, 17 bytes

  fun _->infinity

Try it online!

2 languages, 2 bytes

jq

[]

Running jq with the -n flag ("--null-input / -n: Don´t read any input at all. Instead, the filter is run once using null as the input.") which seems to be the reasonable way to use jq for this challenge.

Outputs []

Removing either character makes a syntax error. Removing both causes a different compilation error.

JavaScript (browser REPL)

[]

Outputs []. Depending on the REPL, it might not actually be possible to make a program attempt to run with characters removed.

Comments

Ok, this seems like an interesting but very difficult challenge. My problem is I don't really know any languages other than JavaScript these days.

I tried to make something in JS/My-Basic or JS/SQLite but no luck.

Strangely JS and My-Basic often had opposite problems. My-Basic is fine assigning undefined variables to each other (a=b) but doesn't like random expressions (3+2).

But in general it seems very difficult to make anything which is more than a single keyword. Anything you add to make one language compile is by definition going to be superfluous in another. The best bet seems to be two languages which have very similar syntax in some way but which are considered separate enough for the challenge.

3 languages, 5 bytes

Ruby

print

Python 2

print

Perl 5

print

2 languages, 20 bytes

Scala

System.out.println()

Javascript

System.out.println()

This does about the same thing that the answer by Jonah does, except because a lot less languages use print, it features 3 or 2 languages. Still felt like answering however.

These all print the empty string.

6 languages

Bash, 4 bytes

echo

Try it online!

Zsh, 4 bytes

echo

Try it online!

fish, 4 bytes

echo

Try it online!

tcsh, 4 bytes

echo

Try it online!

ksh, 4 bytes

echo

Try it online!

J, 4 bytes

echo

Try it online!

Kicking things off with a boring one. If I understand the rules, I think it's legal though.

The shells are clear enough and output a newline. Removing any contiguous substring will result in "command not found".

In J, echo is a built in function, and prints its argument with a newline appended. J doesn't have 0-argument functions, so you have to call it with something. However, anything works, including the empty string '', which is the conventional choice for calling a function when the argument doesn't matter.