# You failed everything! [closed]

Your goal is simple: to fail everything. More precisely, you should write the shortest code that triggers a compilation/interpretation error, or a runtime error.

# What does not count

• Failing with symbols that are not covered by the language syntax and are meant to appear only in string literals, comments and other ways to include non-executable data in the code, or are not meant to appear in the code at all
• Warnings and notices that don't prevent successful compilation or execution
• Overflow related errors: infinite loops, recursion limits reaching, stack overflows, out-of-memory errors and so on

This is , so the shortest code in bytes wins!

By the way, this is probably the only challenge where non-esoterical languages can beat esoterical ones ;-)

• What's wrong with overflow errors?
– Jo King
Sep 19 '18 at 23:41
• Also, almost every answer is going to be a boring one or zero byte syntax error...
– Jo King
Sep 19 '18 at 23:45
• @JoKing the focus is on making a program that is totally erroneous, not just implementing a wrong behaviour or striving from finite resources. Sep 19 '18 at 23:46
• @bodqhrohro The way code golf works is that people post the shortest answer they can find that follows the rules. Whatever you think the focus is meant to be, the winningest answers are blank programs or one-characters syntax errors, so that's what people will post.
– xnor
Sep 19 '18 at 23:48
• What do you mean by "symbols that are not covered by the language syntax"? Is a symbol only valid in string literal considered "not covered by the language syntax"?
– tsh
Sep 20 '18 at 9:50

# Polyglot, 0 bytes

This is a list of languages where an empty program gives an error.

• C/C++/Objective-C: Any compiler will complain not having a main, and emit a link error.
• Java: It's an error to not have a class to run.
• C#: Requires a static Main method.
• Pascal: Not having a BEGIN to begin with is an error.
• Visual Basic: Unlike other Basics, VB requires to have a Sub Main to run.
• Other languages that require some kind of main to compile and run.
• Languages that require specific syntax elements to run correctly.
• Languages that specifically reject empty files.
• Languages that segfault or otherwise show erroneous behavior with empty files. Some of these might be actually a bug in the compiler/interpreter.
• Backhand: Tries to access the first instruction and throws an error.
• Check is similarly bugged with empty code.
• ecpp segfaults when an empty program is given.
• Seed always gives error if the code isn't two integers with a space between them.
• plenty of javas error too as "File xxx.java does not have public class xxx" or something like that Sep 20 '18 at 0:11
• Hey my own esolang falls under the last category, I should probably fix that
– RK.
Sep 24 '18 at 5:26

# 60% of all coding languages, 1 byte

+ or - or / or * or % or any valid token etc.

• Ah, so the only two answers needed.
– Jo King
Sep 20 '18 at 0:06

# Polyglot, 1 byte

a


This gives undefined identifier error in many interpreted languages.

• Python
• Javascript
• APL
• J

# Polyglot, 1 byte

+


This gives syntax error in many languages.

# Polyglot, 1 byte

'


This gives open string literal error in many languages.

# Polyglot, 1 byte

[


This gives open bracket error in many languages. (Feel free to change to ( or { if some languages specifically error with it.)

# Attache, 1 byte

/


Try it online!

Crashes with:

AttacheUnimplementedError: (1:1) / is not defined for NilClass


# Racket / Scheme / Lisp / Others?: 1 byte

) Will give an error for mismatched parentheses

/


Tries to do 0/0. Reference implementation on TIO will fail with:

Exception in thread "main" java.lang.ArithmeticException: / by zero