Outputs to STDERR
Outputting to STDERR is now at +33/-21 as an allowed default, which is positive but contested. This is a CW answer to collect answers that just invoke an error in a language where error messages includes the language name.
1
Error:
Parse error: naked expression at top level
Perhaps you intended to use TemplateHaskell
1
Error:
lua: .code.tio:1: syntax error near <eof>
(file name is unimportant)
Batch, 1 byte
~
Error:
'~' is not recognized as an internal or external command,
operable program or batch file.
(c()1
Error:
Error: cannot cons to Int in tinylisp
R, 1 byte
)
Error:
Error: unexpected ')' in ")"
Java bytecode, 0 bytes
Error:
Exception in thread "main" java.lang.ClassFormatError: Truncated class file
Groovy, 1 byte
a
Note that a
can be replaced with any other character
Error:
groovy.lang.MissingPropertyException: No such property: a ...
MATLAB, 1 byte
\
Error:
Error: Unexpected MATLAB operator.
<?=
Error:
PHP Parse error: syntax error, unexpected end of file in /home/runner/.code.tio on line 1
CJam, 1 byte
/
Error:
/
^
RuntimeException: The stack is empty
Java exception:
java.lang.RuntimeException: The stack is empty
at net.aditsu.cjam.CJam.pop(CJam.java:75)
at net.aditsu.cjam.Op2.run(Op2.java:10)
at net.aditsu.cjam.Block.run(Block.java:304)
at net.aditsu.cjam.CJam.runCode(CJam.java:210)
at net.aditsu.cjam.CJam.main(CJam.java:240)
Twig is a template language written in PHP. It's possible that this is a polyglot.
{{
{%
{#
Error:
PHP Fatal error: Uncaught exception 'Twig_Error_Syntax' with message [...] in [...][...]:n:
Stack trace:
#0 [...]
The message varies depending on which program you choose.
x+
Try it online!
Trivially invokes undocumented behavior. Silos is the name of the language.
Python, 6 bytes
pYTHON
As the character restriction is case insensitive, and the output doesn't have to be in the correct case, this is a valid answer. The error message it produces is something like this:
Traceback (most recent call last):
File ".code.tio", line 1, in <module>
pYTHON
NameError: name 'pYTHON' is not defined
Try it online! (outputs to 'debug' tab)
JavaScript, 10 bytes
jAVAsCRIPT
This produces the following error message or similar in all environments:
ReferenceError: jAVAsCRIPT is not defined
QBIC, 6 bytes
?b(12)
In 6 bytes, we can put QBIC encountered error: 9 on the screen, signifying an out-of-bounds error.
ForceLang, 2 bytes
()
Error produced:
Exception in thread "main" lang.exceptions.IllegalInvocationException: null is not a function.
at lang.ForceLang.parse(ForceLang.java:99)
at lang.ForceLang.main(ForceLang.java:129)
1~`[`
(Note: this works in the current version as of this writing, 0.17.09.01. No guarantees the interpreter won't change to handle this error differently in the future.)
Tries to regex match with a syntactically invalid pattern. The error produced will look something like this:
Traceback (most recent call last):
File "/opt/pip/pip.py", line 221, in <module>
pip(interactive=False)
File "/opt/pip/pip.py", line 206, in pip
state.executeProgram(tree, args)
File "/opt/pip/execution.py", line 56, in executeProgram
returnVal = self.functionCall(mainFunction, cmdLineArgs)
File "/opt/pip/execution.py", line 368, in functionCall
returnVal = self.getRval(returnExpr)
File "/opt/pip/execution.py", line 235, in getRval
expr = self.evaluate(expr)
File "/opt/pip/execution.py", line 213, in evaluate
result = opFunction(*args)
File "/opt/pip/execution.py", line 1134, in FIRSTMATCH
matchObj = regex.asRegex().search(str(string))
File "/opt/pip/ptypes.py", line 175, in asRegex
self._compiled = re.compile(pyRegex)
File "/usr/lib64/python3.6/re.py", line 233, in compile
return _compile(pattern, flags)
File "/usr/lib64/python3.6/re.py", line 301, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib64/python3.6/sre_compile.py", line 562, in compile
p = sre_parse.parse(p, flags)
File "/usr/lib64/python3.6/sre_parse.py", line 855, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "/usr/lib64/python3.6/sre_parse.py", line 416, in _parse_sub
not nested and not items))
File "/usr/lib64/python3.6/sre_parse.py", line 765, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "/usr/lib64/python3.6/sre_parse.py", line 416, in _parse_sub
not nested and not items))
File "/usr/lib64/python3.6/sre_parse.py", line 523, in _parse
source.tell() - here)
sre_constants.error: unterminated character set at position 8
0u
Error:
Stax runtime error: rational divide by zero
zh
also works.
~
~
at the start of a line marks that the line is a statement to be executed, rather than text to be printed. As of whichever version of inklecate TIO is using, if there's nothing after the ~
, the interpreter crashes with the following error:
System.NullReferenceException: Object reference not set to an instance of an object
at Ink.InkParser.LogicLine () [0x000b1] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.StringParser.ParseObject (Ink.StringParser+ParseRule rule) [0x00012] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.StringParser.OneOf (Ink.StringParser+ParseRule[] array) [0x0000a] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.InkParser.StatementAtLevel (Ink.InkParser+StatementLevel level) [0x00009] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.InkParser+<>c__DisplayClass134_0.<StatementsAtLevel>b__0 () [0x00000] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.StringParser.ParseObject (Ink.StringParser+ParseRule rule) [0x00012] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.StringParser.Interleave[T] (Ink.StringParser+ParseRule ruleA, Ink.StringParser+ParseRule ruleB, Ink.StringParser+ParseRule untilTerminator, System.Boolean flatten) [0x00040] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.InkParser.StatementsAtLevel (Ink.InkParser+StatementLevel level) [0x0004f] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.InkParser.Parse () [0x00000] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.Compiler.Compile () [0x00033] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.CommandLineTool..ctor (System.String[] args) [0x001a3] in <d64e27e7788347b2a5377c9e19bbdcab>:0
at Ink.CommandLineTool.Main (System.String[] args) [0x00000] in <d64e27e7788347b2a5377c9e19bbdcab>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at Ink.InkParser.LogicLine () [0x000b1] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.StringParser.ParseObject (Ink.StringParser+ParseRule rule) [0x00012] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.StringParser.OneOf (Ink.StringParser+ParseRule[] array) [0x0000a] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.InkParser.StatementAtLevel (Ink.InkParser+StatementLevel level) [0x00009] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.InkParser+<>c__DisplayClass134_0.<StatementsAtLevel>b__0 () [0x00000] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.StringParser.ParseObject (Ink.StringParser+ParseRule rule) [0x00012] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.StringParser.Interleave[T] (Ink.StringParser+ParseRule ruleA, Ink.StringParser+ParseRule ruleB, Ink.StringParser+ParseRule untilTerminator, System.Boolean flatten) [0x00040] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.InkParser.StatementsAtLevel (Ink.InkParser+StatementLevel level) [0x0004f] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.InkParser.Parse () [0x00000] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.Compiler.Compile () [0x00033] in <b1e5e74f4ee842fc961297862cf23e07>:0
at Ink.CommandLineTool..ctor (System.String[] args) [0x001a3] in <d64e27e7788347b2a5377c9e19bbdcab>:0
at Ink.CommandLineTool.Main (System.String[] args) [0x00000] in <d64e27e7788347b2a5377c9e19bbdcab>:0
Error:
error[E0601]: `main` function not found in crate `code`
|
= note: consider adding a `main` function to `code.tio`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0601`.
A
Error:
sed: file /ATO/code line 1: unknown command: `A'
Error:
flat assembler version 1.73.16 (16384 kilobytes memory, x64)
1 passes, 0 bytes.
GolfScript, 1 byte
\
Error:
/opt/golfscript/golfscript.rb:118:in `block in to_gs': undefined method `to_gs' for nil:NilClass (NoMethodError)
from /opt/golfscript/golfscript.rb:118:in `each'
from /opt/golfscript/golfscript.rb:118:in `inject'
from /opt/golfscript/golfscript.rb:118:in `to_gs'
from (eval):1:in `block in initialize'
from /opt/golfscript/golfscript.rb:306:in `go'
from (eval):1:in `block in initialize'
from /opt/golfscript/golfscript.rb:306:in `go'
from (eval):1:in `block in initialize'
from /opt/golfscript/golfscript.rb:306:in `go'
from /opt/golfscript/golfscript.rb:500:in `<main>'
Error (for Thunno v1.2.1):
Thunno, v1.2.1
λx
Error:
Traceback (most recent call last):
File "/usr/local/bin/vyxal", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.10/site-packages/vyxal/main.py", line 470, in cli
execute_vyxal(file_name, flags, inputs)
File "/usr/local/lib/python3.10/site-packages/vyxal/main.py", line 430, in execute_vyxal
vy_print(output, ctx=ctx)
File "/usr/local/lib/python3.10/site-packages/vyxal/elements.py", line 7253, in vy_print
res = safe_apply(lhs, *args, ctx=ctx, arity_override=override)
File "/usr/local/lib/python3.10/site-packages/vyxal/helpers.py", line 983, in safe_apply
ret = function(
File "<string>", line 10, in _lambda_36f6fb46b5889e1e4e91c1f138c09b37
File "<string>", line 10, in _lambda_36f6fb46b5889e1e4e91c1f138c09b37
File "<string>", line 10, in _lambda_36f6fb46b5889e1e4e91c1f138c09b37
[Previous line repeated 982 more times]
File "<string>", line 8, in _lambda_36f6fb46b5889e1e4e91c1f138c09b37
File "/usr/local/lib/python3.10/site-packages/vyxal/LazyList.py", line 184, in __len__
next(self)
File "/usr/local/lib/python3.10/site-packages/vyxal/LazyList.py", line 198, in __next__
item = vyxalify(next(self.raw_object))
File "/usr/local/lib/python3.10/site-packages/vyxal/helpers.py", line 1488, in vyxalify
return sympy.nsimplify(value, rational=True)
File "/usr/local/lib/python3.10/site-packages/sympy/simplify/simplify.py", line 1436, in nsimplify
return sympify(as_int(expr))
File "/usr/local/lib/python3.10/site-packages/sympy/core/sympify.py", line 383, in sympify
return conv(a)
File "/usr/local/lib/python3.10/site-packages/sympy/core/cache.py", line 72, in wrapper
retval = cfunc(*args, **kwargs)
RecursionError: maximum recursion depth exceeded in comparison
--version
isn't allowed"? \$\endgroup\$