| Bytes | Lang | Time | Link |
|---|---|---|---|
| 018 | Setanta | 250806T231019Z | bb94 |
| 164 | Bespoke | 250804T090915Z | Josiah W |
| nan | 170125T005538Z | xnor | |
| 009 | Haskell | 230923T194321Z | Joao-3 |
| 031 | Python | 170125T001332Z | Value In |
| 8762 | APPLESOFT BASIC | 230922T173457Z | mmphosis |
| 060 | ZX81 BASIC | 230605T115539Z | Shaun Be |
| 040 | Commodore C64 | 230605T085921Z | Shaun Be |
| 6369 | JSFuck | 230217T191529Z | EzioMerc |
| 012 | GolfScript | 230217T151256Z | emirps |
| 000 | Vyxal h | 230217T154320Z | pacman25 |
| nan | 230217T152741Z | The Thon | |
| 061 | Aheui esotope | 230106T073647Z | Bubbler |
| 005 | K ngn/k | 221007T081608Z | oeuf |
| 074 | Malbolge | 221007T073809Z | ceilingc |
| nan | 221007T012241Z | bigyihsu | |
| 052 | Fortran GFortran | 221006T111844Z | JSorngar |
| 005 | C | 170128T144816Z | 12431234 |
| 004 | Vyxal | 220130T194925Z | mathcat |
| 033 | Python 2 | 220130T175138Z | mathcat |
| 215 | Python 2 15 Bytes | 211211T200236Z | poggersb |
| 017 | BQN | 211209T160742Z | SjoerdPe |
| 001 | APOL | 211209T133940Z | Ginger |
| 011 | COMMODORE 64 BASIC | 170129T202359Z | Mark |
| 022 | PICO8 | 211103T172110Z | weatherm |
| 001 | Jelly | 211105T163731Z | Baby_Boy |
| 005 | 170629T195433Z | totallyh | |
| 002 | Python 2 | 170125T191927Z | Max |
| 005 | Pyth | 200731T162202Z | sugarfi |
| 000 | Vyxal h | 210717T062548Z | emanresu |
| 1053 | JSFuck JScrewIt Firefox | 210614T015950Z | habs |
| 015 | A0A0 | 210612T150751Z | stefvans |
| 000 | Java JDK | 210611T172426Z | Makonede |
| 014 | <>^v | 210611T173152Z | astroide |
| 009 | Red | 210611T172331Z | Aaroneou |
| 012 | x86 machinde code | 210611T161809Z | Febriyan |
| 021 | Branch | 210417T231150Z | hyperneu |
| 019 | CSASM v2.1.2.3 | 210321T043816Z | absolute |
| 001 | Pyth | 210320T225200Z | hakr14 |
| nan | Pxem | 210319T095115Z | user1004 |
| 001 | Forth gforth | 201106T105143Z | Unrelate |
| 005 | C gcc | 201026T032340Z | tsh |
| 008 | Rockstar | 200928T160230Z | Shaggy |
| 018 | Rust | 200806T131732Z | madlaina |
| 035 | Excel | 200725T053721Z | General |
| 001 | C | 200518T150847Z | user9523 |
| 000 | 05AB1E legacy | 200516T122422Z | user9206 |
| 000 | Keg | 200115T050419Z | lyxal |
| 003 | W | 200109T055316Z | user8505 |
| 035 | Rail | 191119T115107Z | IMP1 |
| 212 | MarioLANG | 191118T122948Z | CoedRhyf |
| 229 | Poetic | 191117T033622Z | JosiahRy |
| 3813 | Turing Machine But Way Worse | 191014T115536Z | ouflak |
| 094 | Whitespace | 191011T073951Z | Dorian |
| 006 | Linux | 191002T163357Z | Esc Điệp |
| 023 | C | 191002T160007Z | Esc Điệp |
| 002 | Oasis | 190815T145037Z | user8505 |
| 002 | BASIC ZX Spectrum | 170125T011104Z | Neil |
| 013 | VBA | 170129T195123Z | Taylor R |
| 000 | Go | 190813T071805Z | Rajan Ku |
| 001 | Unix shells bash | 190812T041653Z | roblogic |
| 001 | jq | 190812T113706Z | user344 |
| 001 | 33 | 190812T095725Z | TheOnlyM |
| 007 | 05AB1E | 190812T093947Z | Kevin Cr |
| 010 | MathGolf | 190812T092035Z | maxb |
| 003 | Ruby | 170125T104508Z | G B |
| 004 | @ | 190810T110337Z | user8505 |
| 001 | Perl 5 | 180328T075858Z | Ton Hosp |
| 002 | J | 170125T183148Z | Dane |
| 3128 | Ruby | 180327T092927Z | AJFarada |
| 008 | x86 | 180327T170453Z | qwr |
| 009 | ><> | 180327T040931Z | Jo King |
| 002 | Stax | 180327T030802Z | Weijun Z |
| 164 | Ada GNAT | 180326T220414Z | LambdaBe |
| 079 | brainfuck | 180326T024957Z | X1M4L |
| 028 | Julia | 180325T013642Z | eaglgene |
| 011 | SmileBASIC | 170125T005401Z | 12Me21 |
| 627 | Javascript in Firefox | 171022T023704Z | Citty |
| 000 | UPL | 171012T183551Z | BlackCap |
| 022 | Chip8 | 171011T140030Z | 12Me21 |
| 010 | Ly | 170727T223353Z | LyricLy |
| 008 | Bean | 170727T222217Z | Patrick |
| 011 | Quetzalcoatl | 170128T022647Z | NoOneIsH |
| 013 | Julia 0.6.0 | 170727T190003Z | Goysa |
| 001 | 4 | 170727T191053Z | Uriel |
| 001 | Swift | 170126T011249Z | Alexande |
| 015 | Noether | 170703T111810Z | Beta Dec |
| nan | 170125T180235Z | user1893 | |
| 006 | q/kdb+ | 170629T233342Z | mkst |
| 000 | TeX and variants | 170629T230102Z | cp.fe.cp |
| 032 | Rexx Regina | 170629T212715Z | theblitz |
| 015 | Python | 170125T010743Z | user6357 |
| 105 | brainfuck | 170125T055416Z | TrojanBy |
| 000 | Erlang | 170315T221849Z | G B |
| 021 | REXX | 170315T104155Z | idrougge |
| 044 | Python 2 | 170305T232637Z | sporkl |
| 058 | TSQL 58 Bytes | 170221T165458Z | Nelson |
| 009 | Bash | 170125T103158Z | Penguin9 |
| 044 | C++ | 170125T180228Z | Steadybo |
| 006 | dc | 170205T185154Z | daniero |
| 000 | C gcc | 170205T144136Z | Matthew |
| 006 | dc | 170204T171919Z | Neil |
| 006 | QBIC | 170125T071413Z | steenber |
| 001 | PHP | 170130T094056Z | aross |
| 002 | Perl | 170129T100922Z | Zaid |
| 021 | JAVA | 170127T120506Z | Walfrat |
| 001 | chicken not scheme | 170130T054052Z | hcorion |
| 019 | Hexagony | 170129T083517Z | Sunny Pu |
| 013 | Hoon | 170129T002424Z | RenderSe |
| 008 | Pyth | 170128T002607Z | Nick the |
| 004 | Forth gforth | 170127T194106Z | 2xsaiko |
| 005 | GNU M4 | 170127T182058Z | Thriller |
| 020 | HTML | 170125T005202Z | darrylye |
| 010 | ><> | 170125T093725Z | Teal pel |
| 042 | JavaScript REPL | 170127T010314Z | ioseph |
| 002 | PowerShell | 170127T024147Z | Nacht |
| 000 | Huh? | 170126T022859Z | Flambino |
| 034 | Juggle | 170126T193955Z | Zavada |
| 018 | Perl 5.10+ | 170126T001226Z | ThisSuit |
| 013 | PHP | 170125T004626Z | Arnauld |
| nan | 170125T010828Z | user2428 | |
| 004 | 8th | 170126T073624Z | Chaos Ma |
| 006 | Ruby | 170125T000542Z | Value In |
| nan | Stacked | 170126T010504Z | Conor O& |
| 036 | Brainelly | 170126T003427Z | Julian L |
| 002 | PHP 2 Byte | 170126T001527Z | UTF-8 |
| 003 | Bash + coreutils | 170125T182540Z | Mitchell |
| 025 | Del|m|t | 170125T184139Z | MercyBea |
| 001 | R | 170125T182818Z | Konrad R |
| 010 | R | 170125T073006Z | Rudier |
| 202 | PHP | 170125T172819Z | Alex How |
| 119 | Befunge | 170125T162650Z | James Ho |
| 079 | FerNANDo | 170125T162829Z | Martin E |
| 113 | Excel 2010 VBA | 170125T160302Z | Mr.Burns |
| 001 | Chicken | 170125T155654Z | Business |
| 000 | Vim | 170125T113222Z | xenia |
| 009 | bash CLI | 170125T002933Z | Digital |
| 005 | Forth | 170125T150518Z | mbomb007 |
| 001 | Brachylog | 170125T103625Z | Fatalize |
| 067 | C# | 170125T033229Z | Bob |
| 011 | 05AB1E | 170125T143619Z | Emigna |
| 008 | ><> | 170125T142447Z | Emigna |
| 000 | Vim | 170125T142403Z | Noodle9 |
| nan | Perl 5 | 170125T140522Z | simbabqu |
| 028 | Labyrinth | 170125T074439Z | Martin E |
| 011 | Scala. | 170125T113818Z | corvus_1 |
| 000 | C | 170125T111804Z | Cees Tim |
| 000 | Python | 170125T111627Z | nigel222 |
| 047 | Pascal | 170125T110606Z | ash |
| 054 | brainfuck | 170125T110552Z | Sp3000 |
| 016 | QC | 170125T110156Z | user6333 |
| 001 | Pyke | 170125T084934Z | Blue |
| 001 | Groovy | 170125T075212Z | Gurupad |
| 003 | Vim | 170125T004449Z | DJMcMayh |
| 004 | Jelly | 170125T072951Z | user6213 |
| 008 | Pip | 170125T054031Z | DLosc |
| 001 | JAVA | 170125T042328Z | t77 |
| 056 | GNU CLISP 2.49+ | 170125T035331Z | Robert C |
| nan | C 20 Bytes Clang 3.8.1 | 170125T012717Z | Wade Tyl |
| 025 | CSS | 170125T013638Z | darrylye |
| 002 | Octave | 170125T011515Z | Suever |
| 015 | Python 2 | 170125T011501Z | user6357 |
| 006 | CJam | 170125T004828Z | Luis Men |
| 003 | MATLAB | 170125T002856Z | Luis Men |
| 025 | Python 2 | 170125T003737Z | xnor |
| 001 | MATL | 170125T003507Z | Luis Men |
| 011 | R | 170125T003420Z | Lyth |
| 019 | RProgN | 170125T000143Z | ATaco |
| 006 | dc | 170125T003107Z | Digital |
| 045 | JavaScript ES6 | 170125T000914Z | Arnauld |
| 002 | V | 170124T234636Z | DJMcMayh |
Setanta, 18 bytes
scriobh("sETANTA")
Prints sETANTA; unfortunately, this is the best we can do, since any way to get characters without explicitly mentioning them in source relies on either go_téacs (= toString) or nasc (= join). Drawing to the stage is also impossible because stáitse contains forbidden characters.
Bespoke, 165 164 bytes
-1 byte by doing PUSH I at the end of the loop instead of DO COPY.
did try:a difficulty I had in writing
witty and fun
F A Q:why?cuz I m an ill man,I m crazy
that draft,if right,had an actual taxing quality
handful vacant in data:X
Prints BespoKe, before exiting with a Stack underflow. error.
The code doesn't use the uppercase or lowercase letters B, E, K, O, P, or S. I tried to make it mention this fact...but that's pretty hard to do without using these letters.
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.
Haskell, 1 byte
1
Error:
Parse error: naked expression at top level
Perhaps you intended to use TemplateHaskell
Lua, 1 byte
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.
tinylisp, 5 bytes
(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.
PHP, 3 bytes
<?=
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, 2 bytes
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.
S.I.L.O.S, 2 bytes
x+
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)
Pip, 5 bytes
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
Stax, 2 bytes
0u
Error:
Stax runtime error: rational divide by zero
zh also works.
ink, 1 byte
~
~ 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
Rust, 0 bytes
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`.
sed, 1 byte
A
Error:
sed: file /ATO/code line 1: unknown command: `A'
flat assembler, 0 byte
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>'
Thunno, 0 bytes
Error (for Thunno v1.2.1):
Thunno, v1.2.1
Vyxal, 2 bytes
λ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
Haskell, 9 bytes
"hASKELL"
You don't even need to know Haskell to see that this works.
Python, 27 53 49 48 45 31 bytes
-3 bytes from @wizzwizz4
exec'IM\x50ORT THIS'.swapcase()
Prints the following text, which has "Python" on the first line.
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
APPLESOFT BASIC, 87 bytes / 62 tokenized bytes
0x$="":goto1to==^atint>notabscolor=fntoint-spc(pr#
1pokepeek(131)+peek(132)*256,19:?x$
Enter the program in lower-case. The output printed:
":+1APPLESOFT BASIC
ZX81 BASIC, ~60 Tokenised BASIC bytes
1 PRINT CHR$ 191; CHR$ 189; CHR$ 164; CHR$ 157; CHR$ 128; CHR$ 167; CHR$ 166; CHR$ 184; CHR$ 174; CHR$ 168
Some notes: the ZX81 default character set does not have upper and lower case characters, in fact, all of the BASIC tokens, such as PRINT are included in the character set. It does however have normal and reversed characters in which all of the bits are flipped per character (except for keywords). So this prints ZX81 BASIC with the reversed characters.
I've included the machine name as ZX BASIC is pretty distinct amongst 8-BIT basics, of which there are three revisions, ZX80, ZX81 and ZX Spectrum (the latter being commonly called ZX BASIC).
I will properly work out the byte count later. This may be entered online into the JtyOne ZX81 emulator here
Commodore C64, 40 PETSCII characters with BASIC keyword abbreviations
?"{CTRL+N}":fOr=40964to40971:?cH(pE(r)+128);:nE
This prints out the ROM bytes from 0xa004 to 0xa00b, and adds 128 to convert the case.
How it works
Firstly, printing the control character N (CTRL + N on the C64 keyboard) switches Commodore C64 BASIC to upper/lower case characters, equivalent of pressing SHIFT + C= key. Like many 8-bit BASIC interpreters, the ? is abbreviation for PRINT.
The fO is F then SHIFT + O on the keyboard, which is the abbreviation for the FOR command. So, we are iterating over 40964 to 40971 inclusive of the ROM, passing the values of these bytes to the variable r.
?cH(pE(r)+128); is printing the contents of each byte per iteration and adding 128. As we're not in the PETSCII graphics mode, these characters will appear as upper case. nE is the abbreviation for NEXT, which will iterate again until r is equal to 40971.
JSFuck, 6369 bytes
[][((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]]((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+([]+ +([]+[][+[]]))[(+!+[])]+((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]]((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))][([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]](([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[+[]]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+![])[(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])])()[([]+![])[(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]](([]+{})[(+!+[])+(+!+[])+(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+![])[+[]]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]]((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])))
Explanation
_0 = +[];
_1 = +!_0;
_2 = _1 + _1;
_4 = _2 + _2;
_8 = _4 + _4;
_16 = _8 + _8;
_32 = _16 + _16;
_35 = _32 + _2 + _1;
_objectObject = [] + {}; // Here [object Object]
_undefined = [] + [][_0];
_NaN = [] + +_undefined;
_false = [] + ![];
_true = [] + !![];
a = _NaN[_1];
c = _objectObject[_4 + _1];
e = _undefined[_2 + _1];
f = _false[_0];
i = _undefined[_4 + _1];
j = _objectObject[_2 + _1];
l = _false[_2];
n = _undefined[_1];
o = _objectObject[_1];
r = _true[_1];
s = _false[_2 + _1];
t = _objectObject[_4 + _2];
u = _undefined[_0];
_space = _objectObject[_4 + _2 + _1];
_functionString = [] + ([]+[])[c+o+n+s+t+r+u+c+t+o+r];
S = _functionString[_8 + _1];
g = _functionString[_8 + _4 + _2];
h = (_16 + _1)[t+o+S+t+r+i+n+g](_35);
k = (_16 + _4)[t+o+S+t+r+i+n+g](_35);
m = (_16 + _4 + _2)[t+o+S+t+r+i+n+g](_35);
p = (_16 + _8 + _1)[t+o+S+t+r+i+n+g](_35);
[][m+a+p][c+o+n+s+t+r+u+c+t+o+r](r+e+t+u+r+n+_space+c+o+n+s+o+l+e)()[l+o+g](j+s+f+u+c+k)
Try it:
[][((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]]((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+([]+ +([]+[][+[]]))[(+!+[])]+((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]]((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))][([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]](([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[+[]]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+![])[(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])])()[([]+![])[(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]](([]+{})[(+!+[])+(+!+[])+(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+![])[+[]]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]]((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])))
GolfScript, 18 12 bytes
I skipped over the "case insensitive" part of the challenge description initially.
"gOLFsCRIPT"
Vyxal h, 0 bytes
Any character that is an invalid flag will work. Outputs a list of all flags and their descriptions; the v flag says "Use Vyxal encoding for input file" which contains the name.
Edit: This actually doesn't output to Debug (which is like STDERR), instead it prints to regular Output
Thunno, \$ 10 \log_{256}(96) \approx \$ 8.23 bytes
"tHUNNO"zV
"tHUNNO" # Push the string "tHUNNO"
zV # Convert to title case
# Implicit output
Aheui (esotope), 61 bytes
받바밢타밝밤밝밝따붒
밦밦받따땨히파타먛타
Prints "Aheui".
>>>>>>>>>v
.........> Push 3, -9 (0 - 9), 7, 4, 43 (7 * 7 - 6) to the stack
>>>>».>>». Loop: Push 108 (6 * 6 * 3), swap, subtract, print as char
.....X<... On swap, movement is reversed if not enough items on the stack;
go to halt instruction
Aheui (esotope), 87 bytes
받발따빠따빠따빠발발발따따타맣밝밣밢밢따따따다밦타밝타맣히
Prints "아희", the original Korean name of this language.
>>>>>>>...................... Push 15^4=50625
> Dup
>>>>>>> Subtract 5^3=125 and print 50500 as char (아)
>>>>>>>> Add 7*8*9*9=4536 to 50625 = 55161
>>>>>X Subtract 6 and 7 and print 55148 as char (희)
K (ngn/k), 5 bytes
`c$75
There seems to be no rules for inplementation-specific programming languages, so I will assume the name of the implementation doesn't need to be included.
Malbolge, 74 bytes
('%$:^"!~}{3Wyxvv-Qsrq('&Jlj(!~}CAA@~>`ut:rq66GsVTj0hQ,kd*u('r%$5"!C^@@.>,
Generated with ZB3's Malbolge Tools
Go, 54 bytes, prints to STDERR
Prints GO.
package main
func main(){print(string([]rune{71,79}))}
Go, 67 bytes, prints to STDOUT
Also prints GO.
package main
import."fmt"
func main(){Print(string([]rune{71,79}))}
Fortran (GFortran), 52 bytes
Since Fortran is case insensitive and the case of the output doesn't matter we can abuse this and just code the program in sArCaSm CaSE.
pROgRAm fORTRAN
pRiNT*,"fORTRAN"
eNd pROgRAm fORTRAN
C, 15 14 5 Bytes
Compiled C on a Linux machine with a German locale:
main;
It will try to call the variable main which is not allowed because main is stored in the bss section which has the NX bit set, therefore generates a SIGSEGV and prints Speicherzugriffsfehler (german for Segmentation fault) on stderr.
Stolen from https://stackoverflow.com/a/1770717/6082851
Old answer with 14 Bytes
Compiled C on a Linux machine with the C locale on AMD64, compiled with gcc:
main(a){a/=0;}
This will create a division by zero exception and print Floating point exception on stderr. Not sure about other implementation, architectures or compilers since it uses UB.
Old answer with 15 Bytes
Compiled C on a Linux machine with a German locale:
main(){main();}
It will run to a stack overflow and print Speicherzugriffsfehler (german for Segmentation fault) on stderr.
Vyxal, 4 bytes
Flagless and without dictionary compression.
kaṖṅ
This prints out all the possible permutations of the lowercase alphabet.
In the online interpreter the code times out (for understandable reasons). Does it count?
Try it Online!
Python 2, 41 39 33 bytes
- 2 bytes thanks to emanresu A
- 6 bytes thanks to Wheat Wizard
exec"p"+'RINT"pYTHON"'.swapcase()
Python 2 (15 Bytes)
exec"\x68elp()"
Python 3 (17 Bytes)
exec('\x68elp()')
BQN, 17 bytes
With this magic trick, I will turn apples into bacon!
1⊸+⌾(¯1⊸⊏)1+"APL"
Explanation
1⊸+⌾(¯1⊸⊏)1+"APL"
"APL" - Take each letter of "APL"
1+ - Add one to it, giving the next letter.
⌾(¯1⊸⊏) - Then take the last letter of "BQM"
1⊸+ - And add one to it.
BQN, 7 bytes
And now for the golfy answer.
"APM"+1
Explanation
"APM"+1
"APM" - Take each letter of "APM"
+1 - ...and add one to it, giving the next letter.
APOL, 1 byte
↹
The ↹ constant contains the interpreter's name and language version, which with PyPOL evaluates to "PyPOL APOL interpreter vXXXXXX by GingerIndustries 2021". APOL will then implicitly print the constant's value.
COMMODORE 64 BASIC, 11 bytes
1sY830*78-2
To get around the case-sensitive "can't use the characters of the languages's name" restriction, put the computer in "shifted mode" so you can enter the "s" in lower-case. This code performs a soft reset of the computer, taking it out of shifted mode (so the name is printed in upper-case) and printing out the name. The output printed:
**** COMMODORE 64 BASIC V2 ****
64 K RAM SYSTEM 38911 BASIC BYTES FREE
READY.
PICO-8, 22 bytes
?"\112\73\67\79\45\56"
Outputs "Pico-8"; I feel that this should be fine, as it is acknowledged as an alternative in the PICO-8 FAQ:
How should the name be written and pronounced?
The preferred style is all caps with a dash: PICO-8. If you feel like you're shouting in the middle of a sentence, Pico-8 or pico-8 is also fine.
And here's the all-caps version (24 bytes), if needed:
?"\112\105\99\111\45\56"
Fun fact: I didn't realize that ?, escape characters, or lowercase letters were useable going into this, and due to just how much the restriction limited my options, I had to resort to modifying the memory directly in order to produce the same result as cls() print("PICO-8"). That ended up looking like this:
memset(24576,0,0x2000)
b=0x66
l=0x06
r=0x60
//line 1
memset(0x6000,b,1)
memset(0x6001,l,7)
memset(0x6002,b,1) // +8
memset(0x6004,r,1) // +8
memset(0x6006,r,1) // +8
memset(0x600a,b,1) // +8
memset(0x600b,l,1) // +8
//line 2
memset(0x6040,l,2)
memset(0x6042,r,1)
memset(0x6044,l,1)
memset(0x6046,l,2)
memset(0x604a,l,2)
//line 3
memset(0x6080,b,1) //8
memset(0x6081,l,1)
memset(0x6082,r,1)
memset(0x6084,l,1) // 8+8
memset(0x6086,l,2)
memset(0x6088,b,1)
memset(0x6089,l,1)
memset(0x608a,b,1)
memset(0x608b,l,1)
//line 4
memset(0x60c0,l,1) //c+8
memset(0x60c2,r,1)
memset(0x60c4,l,1)
memset(0x60c6,l,2)
memset(0x60ca,l,2) //c+8
//line 5
memset(0x6100,l,1)
memset(0x6102,b,5)
memset(0x6103,l,3)
memset(0x6104,r,1)
memset(0x610a,b,1)
memset(0x610b,l,1)
A compliant/golfed version of this would be ~500 bytes.
Jelly, 1 byte
`
Try it online! This just throws an error that outputs
Traceback (most recent call last):
File "/usr/local/bin/jelly", line 74, in <module>
raise SystemExit(main(code, args, end))
File "/usr/local/lib/python3.7/site-packages/jelly/__init__.py", line 10, in main
output(jelly_eval(code, args[:2]), end)
File "/usr/local/lib/python3.7/site-packages/jelly/interpreter.py", line 422, in jelly_eval
return variadic_chain(parse_code(code)[-1] if code else '', arguments)
File "/usr/local/lib/python3.7/site-packages/jelly/interpreter.py", line 1247, in variadic_chain
return niladic_chain(chain)
File "/usr/local/lib/python3.7/site-packages/jelly/interpreter.py", line 683, in niladic_chain
return monadic_chain(chain, 0)
File "/usr/local/lib/python3.7/site-packages/jelly/interpreter.py", line 622, in monadic_chain
ret = monadic_link(chain[0], ret)
File "/usr/local/lib/python3.7/site-packages/jelly/interpreter.py", line 637, in monadic_link
return link.call(arg)
File "/usr/local/lib/python3.7/site-packages/jelly/interpreter.py", line 2988, in <lambda>
call = lambda z: dyadic_link(links[0], (z, z))
IndexError: list index out of range
Real time: 0.080 s
User time: 0.063 s
Sys. time: 0.014 s
CPU share: 96.62 %
Exit code: 1
The name of the language, jelly, being contained in the second line of the error.
,,, - 6 5 bytes
44c3×
As short as ","3× and ",,,"!
Explanation
44c3×
44 push 44 [44]
c convert 44 to ASCII character [',']
3× repeat ',' 3 times [',,,']
implicit output []
Pyth, 5 Bytes
"pYTH
Simple prints the string pYTH to stdout.
JSFuck (JScrewIt Firefox), 1053 bytes
(+(!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+[+[]]+(+!![])+(!![]+!![]+!![])+(+!![])+(!![]+!![]+!![]+!![]+!![])+(+!![])+(!![]+!![]+!![])+(!![]+!![])))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[+[]]]+([]+[])[([]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[+[]]]+(!![]+[])[+!![]]][([][[]]+[])[+!![]]+(![]+[])[+!![]]+([]+(+[])[([]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[+[]]]+(!![]+[])[+!![]]])[+!![]+[+!![]]]+(!![]+[])[!![]+!![]+!![]]]](!![]+!![]+!![]+[!![]+!![]+!![]+!![]])
Requires Firefox nightly for Array.prototype.at, or you can use the following polyfill on any browser:
Array.prototype.at = { constructor: Function.prototype.constructor, toString: () => "function at() {\n [native code]\n}" };
A0A0, 15 bytes
P65
P48
P65
P48
P prints the character corresponding to the ASCII value next to it. Luckily for me, none of the ASCII values needed have a zero in them. If the requirement of not containing the characters of your language wasn't there, this could be improved by two bytes by swapping out the P48 for O0 which prints the numeric value after it, so zero.
One column is the most optimal layout for this text. Two columns would add 2 bytes to the total.
Java (JDK), 0 bytes
Ties OrangeDog's Java answer, nigel222's Python answer, Cees Timmerman's C answer, Loovjo's Vim answer, Noodle9's Vim answer, James Holderness's Befunge answer, Alex Howansky's PHP answer, Flambino's huh? answer, NoOneIsHere's Quetzalcoatl answer, Matthew Roh's C answer, G B's Erlang answer, cp.fe.cp's TeX answer, BlackCap's UPL answer, Rajan Kumar's Go answer, lyxal's Keg answer, user92069's 05AB1E answer, madlaina's Rust answer, and tail spark rabbit ear's Pxem answer for #1.
Output (stderr)
Error: could not find or load class Main Caused by: java.lang.ClassNotFoundException: Main
Python 3, 0 bytes
Takes a command-line option not in this list:
-B
-b
-c
-d
-E
-I
-i
-O
-q
-S
-s
-u
-W
-X
-x
<>^v, 14 bytes
60\62\94\118\`
Pushes to stack the character's index in ASCII, then prints them, and prints a newline.
Red, 9 bytes
prin 'rED
Due to the rules, this is valid, but it's boring, so let's not do that, ok?
Non-trivial, 35 bytes
prin#"Q"+ 1 prin#"f"- 1 prin#"c"+ 1
This takes Q, f, and c as character codes, adds or subtracts 1, then prints them without newlines. Q + 1 = R, f - 1 = e, c + 1 = d. Unfortunately, this doesn't work on TIO, but you can try it locally.
x86 machinde code - 12 bytes
Borrowed code from qwr's answer.
8048054: b8 1a dd 2c 11 mov eax,0x112cdd1a
8048059: 2d de c0 11 11 sub eax,0x1111c0de
804805e: d1 e0 shl eax,1
Branch, 21 bytes
66.114.97.110.99.104.
Try it on the online Branch interpreter!
Not the most exciting answer. An answer with no numbers though:
Branch, 74 bytes
/^\^'/;c;^+/;c;^'/;c;^*N/;^*}}./;c;^+/;cn^-{{.O/;cn^-{./o{{{{.^}}./{{{{{{.
Try it on the online Branch interpreter!
CSASM v2.1.2.3, 108 19 bytes
func main:
abs
ret
end
The abs instruction throws the following error if no values were on the stack:
StackException thrown in compiled code:
Stack underflow detected. Cannot pop more objects from the stack.
at CSASM.Core.CSASMStack.Pop()
at CSASM.Core.Ops.func_abs()
Any of the 3-character instructions that pop a value from the stack would also work for this answer.
Pyth, 1 byte
.
On the online interpreter, prints the following to stderr:
Traceback (most recent call last):
File "pyth.py", line 737, in <module>
py_code_line = general_parse(pyth_code, safe_mode_on)
File "pyth.py", line 46, in general_parse
parsed, tokens = parse(tokens, safe_mode)
File "pyth.py", line 74, in parse
raise PythParseError(active_token, rest_tokens)
extra_parse.PythParseError: . is not implemented, 1 from the end.
The exact error message differs depending on the environment Pyth is running in, but it always includes PythParseError.
Pxem, (See below)
Depends on invokation
pxemi.7z, 0 bytes (on invokation).
Compile the source code in C++ and run the interpreter with no arguments, like this: /path/to/pxemi.
The following line is output to stderr: usage: pxemi pxemFileName.
RPxem, 0 bytes (on invokation)
Just like nk.'s pxemi, run with no arguments: Usage: rpxem path-to-pxem-file.pxe can be seen.
Programs
Pxem, 6 bytes of filename only, case-insensitive, boring.
- Filename:
pXEM.p. - Content: none.
Pxem, 18 bytes of filename only, case-sensitive output, depends on ASCII-compatible filesystem.
- Filename:
@-.+23.+7A.+%+.+.p - Content: None
On every ??.+ each character is generated with sum of two characters' ASCII code from backwards.
Forth (gforth), 1 byte
]
] switches to compile state, causing following words to be executed with their compilation semantics... and apparently, if the program never returns to interpret state, also causing it to output
Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
I thought maybe there was some chance I could get around having to create a definition to use loops for another challenge, but this works too.
C (gcc), 5 bytes
main;
- Output "type defaults to ‘int’ in declaration of ‘main’" to stderr while compile.
- Output "Segmentation fault (core dumped)" to stderr while execute.
-2 bytes, thanks to ceilingcat
Rockstar, 8 bytes
Probably the only time Rockstar will ever come close to being competitive!
rOCKSTAR
Try it here (Code will need to be pasted in)
Rust, 0 bytes (compile time) / 18 bytes (run time)
Compile time, 0 bytes
Complier output:
error[E0601]: `main` function not found in crate `empty`
|
= note: consider adding a `main` function to `empty.rs`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0601`.
Run time, 18 bytes
fn main(){todo!()}
Output:
thread 'main' panicked at 'not yet implemented', panic.rs:1:11
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Unfortunately, panicking via array indices
fn main(){[][1]}
doesn't work, because rustc catches the error at compile time.
Excel, 35
Closing parens already discounted.
Simple enough:
A1-=RIGHT(0=1)-EfromFALSE- Output -
=A1&ROMAN(90)&A1&ROMAN(50)-EXCEL
ROMAN(90) = XC, ROMAN(50) = L
05AB1E (legacy), 0 bytes
An amazing trick that I just learned from Kevin Cruijssen.
It outputs contents of info.txt, which of course contains the name 05AB1E.
Keg, -v 0 bytes
Prints:
Keg Last Updated On: Wednesday 15 January 2020
Well, at least using commit 8b6ad216c1fc60e59bd143ba2ee0571df29db2f6 it does. The date part changes between commits. Why? Because -v prints out the current interpreter version.
A 3 byte answer:
ǨƐƓ
Prints:
keg
A 6 byte answer:
L;f;h;
Prints:
Keg
The 3 byter uses the push'n'print part of Keg, and the 6 byter pushes each letter and decrements it to get the correct letter.
W, 3 bytes
I'll see which is compressable, I am not permitted to use the compressor yet.
Convery 87 to a character.
87C
W, 3 bytes
Output every character between 'a' and 0x00. It maps over the (implicit input) 0 converted to a character to the letter 'a'.
CaM
Rail, 35 bytes
$ 'main'
-[q]?3c(!!)2co\
#oc1?n(!!)oc5?-&
Here's an expanded version:
$ 'expanded'
\
--[any string]-?-3c-(!discard!)-2c-o\
\
#-o-c1-?n---(!discard!)-o-c5?--&
Rail works like a train track, with special 'stations' (functions) represented by characters that operate on values from the stack.
This pushes a string ("q" in the short one, "any string" in the long one), and then gets its type ("string"), which has an r in. It then cuts the string up to just get the r, and prints that to stdout.
It then creates an empty lambda, gets its type ("lambda"), which has an a in it, cuts the first 5 letters out, and prints the last a.
It then pushes nil (the empty list) to the stack, with n, gets its type ("nil"), gets the il and prints that.
The special character stations used are as follows:
[q],[any string]: push a literal string?: pop a value, push its type3: the literal value "3"c: pop a, b; cut the string at the ath position and push back both halves(!!): pop a value and store it in the variable with name in between the!s.o: pop the stack and print its value to Standard Output\,-: rails&: push a lambda to the stack, and turn the train around a half turnn: push nil to the stack.#: terminate the program
Fun fact, in the expanded version, the second instance of the variable assignment to discard is actually assigning to dracsid, because the order you go through a station matters. The characters are read individually by the train as it goes through. This doesn't matter, because it's just being used to pop values off the stack and never use them again.
MarioLANG, 212 bytes
+>+>+>+>+>->->-
+"+"+"+"+"-"-"-
+++++++++-----.
+++++++.+-.-.-
+++++++-+-+-+-
+++++++-+-+-+-
+++++++-+-+-+-
+++++++-+-+-+.
++++++.-+.+-++
++++++--+++-++
++++++--++..++
++++++--++--++
+!+!+!-!+!-!+!
=#=#=#=#=#=#=#
This answer quite simply increments and decrements the value in one cell. I'm pretty sure this is the shortest you can get without loops - I might look at an answer using loops later.
Poetic, 229 bytes
why?w-h-y?always a war,many flaws,a sham,a fraud,a sad day
luxury a la shahs,a day a la Buddha?ah,many days usually always a burn
a husband hungry?uh-huh
awful suburbs,always a handful
sadly,a man runs harshly away
hardly unusual
Prints Poetic.
This was an interesting challenge. Not only did I have to write the shortest program that prints Poetic, but I challenged myself to create a somewhat coherent series of sentences without using p, o, e, t, i, or c (in keeping with the spirit of the language). That makes this program a "lipogram".
Turing Machine But Way Worse, 3813 bytes
0 0 0 1 1 0 0
0 1 1 1 2 0 0
0 2 0 1 3 0 0
0 3 1 1 4 0 0
0 4 0 1 5 0 0
0 5 1 1 6 0 0
0 6 0 1 7 0 0
0 7 0 1 8 1 0
0 8 0 1 9 0 0
0 9 1 1 10 0 0
0 10 1 1 11 0 0
0 11 1 1 12 0 0
0 12 0 1 13 0 0
0 13 1 1 14 0 0
0 14 0 1 15 0 0
0 15 1 1 16 1 0
0 16 0 1 17 0 0
0 17 1 1 18 0 0
0 18 1 1 19 0 0
0 19 1 1 20 0 0
0 20 0 1 21 0 0
0 21 0 1 22 0 0
0 22 1 1 23 0 0
0 23 0 1 24 1 0
0 24 0 1 25 0 0
0 25 1 1 26 0 0
0 26 1 1 27 0 0
0 27 0 1 28 0 0
0 28 1 1 29 0 0
0 29 0 1 30 0 0
0 30 0 1 31 0 0
0 31 1 1 32 1 0
0 32 0 1 33 0 0
0 33 1 1 34 0 0
0 34 1 1 35 0 0
0 35 0 1 36 0 0
0 36 1 1 37 0 0
0 37 1 1 38 0 0
0 38 1 1 39 0 0
0 39 0 1 40 1 0
0 40 0 1 41 0 0
0 41 1 1 42 0 0
0 42 1 1 43 0 0
0 43 0 1 44 0 0
0 44 0 1 45 0 0
0 45 1 1 46 0 0
0 46 1 1 47 0 0
0 47 1 1 48 1 0
0 48 0 1 49 0 0
0 49 0 1 50 0 0
0 50 1 1 51 0 0
0 51 0 1 52 0 0
0 52 0 1 53 0 0
0 53 0 1 54 0 0
0 54 0 1 55 0 0
0 55 0 1 56 1 0
0 56 0 1 57 0 0
0 57 1 1 58 0 0
0 58 0 1 59 0 0
0 59 0 1 60 0 0
0 60 1 1 61 0 0
0 61 1 1 62 0 0
0 62 0 1 63 0 0
0 63 1 1 64 1 0
0 64 0 1 65 0 0
0 65 1 1 66 0 0
0 66 1 1 67 0 0
0 67 0 1 68 0 0
0 68 0 1 69 0 0
0 69 0 1 70 0 0
0 70 0 1 71 0 0
0 71 1 1 72 1 0
0 72 0 1 73 0 0
0 73 1 1 74 0 0
0 74 1 1 75 0 0
0 75 0 1 76 0 0
0 76 0 1 77 0 0
0 77 0 1 78 0 0
0 78 1 1 79 0 0
0 79 1 1 80 1 0
0 80 0 1 81 0 0
0 81 1 1 82 0 0
0 82 1 1 83 0 0
0 83 0 1 84 0 0
0 84 1 1 85 0 0
0 85 0 1 86 0 0
0 86 0 1 87 0 0
0 87 0 1 88 1 0
0 88 0 1 89 0 0
0 89 1 1 90 0 0
0 90 1 1 91 0 0
0 91 0 1 92 0 0
0 92 1 1 93 0 0
0 93 0 1 94 0 0
0 94 0 1 95 0 0
0 95 1 1 96 1 0
0 96 0 1 97 0 0
0 97 1 1 98 0 0
0 98 1 1 99 0 0
0 99 0 1 100 0 0
0 100 1 1 101 0 0
0 101 1 1 102 0 0
0 102 1 1 103 0 0
0 103 0 1 104 1 0
0 104 0 1 105 0 0
0 105 1 1 106 0 0
0 106 1 1 107 0 0
0 107 0 1 108 0 0
0 108 0 1 109 0 0
0 109 1 1 110 0 0
0 110 0 1 111 0 0
0 111 1 1 112 1 0
0 112 0 1 113 0 0
0 113 0 1 114 0 0
0 114 1 1 115 0 0
0 115 0 1 116 0 0
0 116 0 1 117 0 0
0 117 0 1 118 0 0
0 118 0 1 119 0 0
0 119 0 1 120 1 0
0 120 0 1 121 0 0
0 121 1 1 122 0 0
0 122 0 1 123 0 0
0 123 0 1 124 0 0
0 124 0 1 125 0 0
0 125 0 1 126 0 0
0 126 1 1 127 0 0
0 127 0 1 128 1 0
0 128 0 1 129 0 0
0 129 1 1 130 0 0
0 130 1 1 131 0 0
0 131 1 1 132 0 0
0 132 0 1 133 0 0
0 133 1 1 134 0 0
0 134 0 1 135 0 0
0 135 1 1 136 1 0
0 136 0 1 137 0 0
0 137 1 1 138 0 0
0 138 1 1 139 0 0
0 139 1 1 140 0 0
0 140 0 1 141 0 0
0 141 1 1 142 0 0
0 142 0 1 143 0 0
0 143 0 1 144 1 0
0 144 0 1 145 0 0
0 145 0 1 146 0 0
0 146 1 1 147 0 0
0 147 0 1 148 0 0
0 148 0 1 149 0 0
0 149 0 1 150 0 0
0 150 0 1 151 0 0
0 151 0 1 152 1 0
0 152 0 1 153 0 0
0 153 1 1 154 0 0
0 154 0 1 155 0 0
0 155 1 1 156 0 0
0 156 0 1 157 0 0
0 157 1 1 158 0 0
0 158 1 1 159 0 0
0 159 1 1 160 1 0
0 160 0 1 161 0 0
0 161 1 1 162 0 0
0 162 1 1 163 0 0
0 163 0 1 164 0 0
0 164 0 1 165 0 0
0 165 0 1 166 0 0
0 166 0 1 167 0 0
0 167 1 1 168 1 0
0 168 0 1 169 0 0
0 169 1 1 170 0 0
0 170 1 1 171 0 0
0 171 1 1 172 0 0
0 172 1 1 173 0 0
0 173 0 1 174 0 0
0 174 0 1 175 0 0
0 175 1 1 176 1 0
0 176 0 1 177 0 0
0 177 0 1 178 0 0
0 178 1 1 179 0 0
0 179 0 1 180 0 0
0 180 0 1 181 0 0
0 181 0 1 182 0 0
0 182 0 1 183 0 0
0 183 0 1 184 1 0
0 184 0 1 185 0 0
0 185 1 1 186 0 0
0 186 0 1 187 0 0
0 187 1 1 188 0 0
0 188 0 1 189 0 0
0 189 1 1 190 0 0
0 190 1 1 191 0 0
0 191 1 1 192 1 0
0 192 0 1 193 0 0
0 193 1 1 194 0 0
0 194 1 1 195 0 0
0 195 0 1 196 0 0
0 196 1 1 197 0 0
0 197 1 1 198 0 0
0 198 1 1 199 0 0
0 199 1 1 200 1 0
0 200 0 1 201 0 0
0 201 1 1 202 0 0
0 202 1 1 203 0 0
0 203 1 1 204 0 0
0 204 0 1 205 0 0
0 205 0 1 206 0 0
0 206 1 1 207 0 0
0 207 0 1 208 1 0
0 208 0 1 209 0 0
0 209 1 1 210 0 0
0 210 1 1 211 0 0
0 211 1 1 212 0 0
0 212 0 1 213 0 0
0 213 0 1 214 0 0
0 214 1 1 215 0 0
0 215 1 1 216 1 0
0 216 0 1 217 0 0
0 217 1 1 218 0 0
0 218 1 1 219 0 0
0 219 0 1 220 0 0
0 220 0 1 221 0 0
0 221 1 1 222 0 0
0 222 0 1 223 0 0
0 223 1 1 224 1 1
Little surprised I didn't see this here already.
Whitespace, 94 bytes
ssslssttslssttsslssststtlssstttslssslsssttttlssstsslsssttlssttttsl
push [0, -2, -4, 11, 14, 0, 15, 4, 3, -14]
lssl label print
sssttsststl push 101
tsss add
tlss print char
lsll jmp print
Linux, Unix Shell (sh/bash...) (6 bytes)
find /
C, 23 bytes (without Error)
This works on little-endian machine.
67 is 0x00000043 and the layout on memory is {0x43,0x00,0x00,0x00} (32bit, little-endian) . This memory block is a valid c string (zero-ending char array). Then, just pass the pointer of this memory block into puts.
main(i){i=67;puts(&i);}
As the restrictions:
putcharis not allowed (contains c). Thenputsis used.
Oasis, 2 bytes
ne
Explanation
n Push n
e Recurse with a(n-n); i.e. a(0), which is undefined
This tries to do recursion of itself where a(0) is undefined. Therefore, it recurses until the Python interpreter's call stack overflows:
Fatal Python error: Cannot recover from stack overflow.
Current thread 0x00007f4457bba740 (most recent call first):
File "/usr/lib64/python3.7/ast.py", line 67 in _convert
File "/usr/lib64/python3.7/ast.py", line 91 in literal_eval
File "/opt/oasis/oasis.py", line 27 in pop_stack
File "/opt/oasis/oasis.py", line 261 in func_a
File "/opt/oasis/oasis.py", line 268 in func_a
...
/srv/wrappers/oasis: line 3: 2892 Aborted (core dumped) python3 /opt/oasis/oasis.py .code.tio "$@" < .input.tio
Real time: 0.242 s
User time: 0.182 s
Sys. time: 0.036 s
CPU share: 90.02 %
Exit code: 134
BASIC (ZX Spectrum), 4 2 bytes
crossed out 4 is still regular 4
Saved 2 bytes thanks to @ShaunBebbers.
0õ
Note: In the ZX Spectrum character set, these bytes display as
0 PRINT
When you enter this in, the Spectrum starts by parsing an optional number followed by a line of code. Normally the line number is 1..9999 which causes the code to be added to the stored program. However if no line number is supplied then the code is executed immediately instead. Unfortunately a bug in the Spectrum means that it mistakes a line number of zero for no line number at all, but it still tries to execute the zero as part of the line of code, which is illegal, thus causing the error.
The previous 4-byte version generates a true error rather than relying on an interpreter bug:
õ°""
Note: In the ZX Spectrum character set, these bytes display as
PRINT VAL ""
which outputs
C Nonsense in BASIC, 0:1
because the empty string is not a valid numeric expression. (I could of course have used any statement that takes a single integer.) If this answer is unacceptable, then for 6 bytes you can write a program consisting of a single line with one of the keywords that accepts no arguments, then use POKE to replace it with an illegal keyword, then attempt to RUN the program.
VBA, 13 Bytes
I tried using error codes and all sorts of little tricks, but it would appear that this is about as compact as I can get it, as boring as it is.
Anonymous Immediates window function that takes no input out outputs to the immediates window. Works with both Win and Mac Excel, Access, Word, PowerPoint, Outlook and Publisher
?ucase("vba")
Unix shells (bash, sh, zsh, etc) to STDERR, 1 byte
The shells bash, ksh, sh, zsh all output their name to STDERR when you give them an unknown command, e.g.
1
Examples:
λ bash<<<1
bash: line 1: 1: command not found
λ zsh<<<1
zsh: command not found: 1
λ ksh<<<1
ksh: line 1: 1: not found
λ sh<<<1
sh: line 1: 1: command not found
λ fish<<<1
fish: Unknown command 1
If the challenge requires output to STDOUT, add 5 bytes 2>&1 to redirect it:
λ bash<<<1 2>&1
bash: line 1: 1: command not found
If the challenge had specified "use a valid program"... zsh, 18 bytes
<<<$'\x7a\x73\x68'
not like this!
, as Gamma pointed outecho "\x7a\x73\x68"
33, 1 byte
~
Any character not recognised by the interpreter will print the message 33 (<location>): Unrecognised token. In this case, the location would be 1:1.
Non-stderr version, 3 bytes
btp
The mutable list is initially filled in with argv, with the first element of that normalised to be "33". This takes 33 from the list, puts it in the source string, then prints it.
05AB1E, 7 bytes
•₄)í•hÁ
Explanation:
•₄)í• # Push compressed integer 5943776
h # Convert it to hexadecimal: "5AB1E0"
Á # Rotate it once towards the right: "05AB1E"
# (after which the result is output implicitly)
See this 05AB1E tip of mine (section How to compress large integers?) to understand why •₄)í• is 5943776.
MathGolf, 10 bytes
ÿ∙╤Æⁿ½]$╦y
Explanation
ÿ∙╤Æⁿ Push "∙╤Æⁿ"
½ uninterleave, pushing "∙Æ" and "╤ⁿ" to the stack
] wrap stack in array
$ push ord(a) for each element in the array
╦ fetch dictionary words ("Math" and "Golf")
y join array without separator to string or number
With dictionary popping using strings, which should be coming in the next version, this will be 1 byte shorter (remove $).
The boring solution (1 byte)
'
From TIO:
Traceback (most recent call last):
File "/opt/mathgolf/math_golf.py", line 750, in <module>
result = evaluate(code_list[:], stdin, Stack([]))
File "/opt/mathgolf/math_golf.py", line 115, in evaluate
stack.append(code.pop().char)
IndexError: pop from empty list
This is implementation dependent, but if you're planning on using MathGolf, you'll probably pull the git repository, which is named mathgolf, meaning that unless the directory is renamed, the error will persist.
Ruby, 3 bytes
p$:
From the documentation:
The array contains the list of places to look for Ruby scripts and binary modules by load or require. It initially consists of the arguments to any -I command line switches, followed by the default Ruby library, probabl "/usr/local/lib/ruby", followed by ".", to represent the current directory. (Mnemonic: colon is the separators for PATH environment variable.)
This is not guaranteed to work on any system, but works at least on TIO, and on most (if not all) Linux distributions when Ruby is installed.
@, 4 bytes
Although the language name is 1 byte, outputting the name is astonishingly difficult.
-{}0
This subtracts the string a by 0, which is undefined behavior and thus throws an error:
Traceback (most recent call last):
File "@", line 477, in <module>
res = root.eval()
File "@", line 413, in eval
return self.ins.func(*self.argv, *self.insargs)
File "@", line 115, in insHYPHEN
raise TypeError('-')
TypeError: -
Perl 5, 1 bytes
Includes +1 for -v
(the body is empty). This includes both perl and Perl. But I'm going to assume the language name is perl from here on. It's what perl's own version string says the name is after all.
This is of course totally boring. Somewhat more interesting:
Perl 5, 6 bytes
say$^X
This assumes the name of the executable contains perl. I've yet to see an install where this is not so.
Perl 5, 11 bytes
say"\LPERL"
Uses the fact that case variations don't count. I couldn't use lc because it contains l. Still boring
Perl 5, 12 bytes
say FSDZ^6x4
This one clean but long
J, 2 bytes
a.
┌┬┐├┼┤└┴┘│─ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~��������������������������������������������������������������������������������������������������������������������������������
a. returns the alphabet of the J language — a built-in list of all bytes.
My original: 4 bytes
%:_1
0j1
This just seems pretty cool to me. The square root (%:) of negative 1 (_1) is i (0j1).
x86, 8 bytes
Returns the string "x86" in eax.
0: b8 3c 1c 1b 00 mov $0x1b1c3c,%eax
5: d1 e0 shl %eax
7: c3 retq
As ASCII:
�<���
The idea is to get 0x363878. It may be possible to shorten this with a clever multiply or other instruction.
><>, 9 bytes
"-o_!\ _!
Same byte count, much cleaner output. Now it only outputs ><> and nothing else by subtracting the difference between pairs of no-ops. I was very lucky that > + ! is _ which is a no-op when traveling horizontally.
><>, 9 bytes
"2*4-o! !
How It Works:
Initially the " pushes the source code in reverse. 2*4-o multiplies the value of the final ! by 2 and subtracts 4 to make it correspond to >. The ! skips over the " so no more code is pushed to the stack, and it repeats the operation over the rest of the source code, resulting in an output of ><>ÚVdP`
Ada (GNAT), 164 bytes
function Test return Integer is
function puts(C:out Integer)return Integer with Import,Convention=>C;Text:Integer:=16#00616441#;
begin return puts(Text); enD Test;
It is hard not being able to use EITHER a. Especially since the I/O library is called Ada.Text_IO and there's no way around that. Since I can't access Ada's standard library, I have to go around and import some I/O from C. Luckily its easy to do that from within Ada, unfortunately the function that would work well is putchar with that pesky a again.
To work around I need to somehow send a pointer through to C. Unfortunately the types that will do this are Interfaces.C.Pointers which has an a and access types, also with A. Thus I'm left using Ada's implicit interpretation of out parameters in C interfaces as being a pointer. Now I just construct a 32-bit integer as my 'string' and it just so happens to fit "Ada" and the null terminator.
I was close to removing the only d too, but there's no way out of using end. Depending on how you style Ada you can toggle its case, as the language is completely case insensitive (but with the standard spelling the case insensitivity still bans the a).
brainfuck, 79 bytes
-[>++>++>++<<<-----]>----.>++++++++++++.<-.>>+++.+++++.<<+++++.>+++.<---.>>---.
It's not the shortest brainfuck submission, that would be @Sp3000's answer, but frankly, I dont understand how his submission works anyways, and this was the best I could do.
Explanation:
The word "brainfuck" is 9 letters: b(98), r(114), a(97), i(105), n(110), f(102), u(117), c(99), and k(107) Splitting these up into three groups by similar ascii values gives us our tape:
[Initial Count Cell] , [ABCF Cell] , [RU Cell] , [IKN Cell]
By using three cells instead of one to print the ascii characters, we cut down the number of bytes needed by nearly half.
-[>++>++>++<<<-----] Wrapped loop sets all three ascii cells to 102
>----. print 'b'
>++++++++++++. print 'r'
<-. print 'a'
>>+++. print 'i'
+++++. print 'n'
<<+++++. print 'f'
>+++. print 'u'
<---. print 'c'
>>---. print 'k'
Output:
brainfuck
Credits: -2 bytes thanks to @ETHproductions
Julia, 28 bytes
show("\x6A\x75\x6C\x69\x61")
As it turned out, the hardest part wasn't encoding the string (easy enough with escapes and an ASCII table), but finding a function in the standard library to show it. Most of them have one of the letters of ['a', 'i', 'j', 'l', 'u'] in them.
SmileBASIC, 11 bytes
sPsET.,1474
Equivalent to SPSET 0,1474. Sets sprite 0 to definition 1474, which is the SmileBASIC logo.
Javascript (in Firefox), 627 bytes
Doesn't use JavaScript's letters upper or lowercase. Only works in Firefox because it uses eb() function as a method of getting a "p". It also needs the popup blocker to be disabled.
f=!1+[];n=1E309+[];h=!0+[];d=(eb+[])[3];o={b:1};g=d+"on"+f[3]+h[0]+h[1]+"u"+d+h[0]+"o"+h[1];q=(/b/[g]+[])[14];l=[][g][g];k=o[g]["key"+f[3]](l(h[1]+"e"+h[0]+"u"+h[1]+"n o"+q+'en("")')());u=k["f"+n[3]+"l"+h[0]+"e"+h[1]](l("b",h[1]+"e"+h[0]+"u"+h[1]+"n 0==b."+n[3]+'ndexOf("on'+n[3]+'n")&&"l"==b[6]'))[0];e=k["f"+n[3]+"l"+h[0]+"e"+h[1]](l("b",h[1]+"e"+h[0]+"u"+h[1]+"n-1!=b."+n[3]+'ndexOf("omm'+u[5]+"nd"+f[3]+'")'))[0][6];m=o[g]["n"+f[1]+"me"][2][h[0]+"oU"+q+q+"e"+h[1]+e+u[5]+f[3]+"e"]();l(h[1]+"e"+h[0]+"u"+h[1]+"n "+d+"on"+f[3]+"ole")().log(m+u[5]+u[4]+u[5]+f[3][h[0]+"oU"+q+q+"e"+h[1]+e+u[5]+f[3]+"e"]()+d+h[1]+n[3]+q+h[0]);
Ungolfed version:
f = !1+[];
n = 1E309+[];
h = !0+[];
d = (eb+[])[3];
o = {b:1};
g = d+"on"+f[3]+h[0]+h[1]+"u"+d+h[0]+"o"+h[1];
q = (/a/[g]+[])[14]
l = [][g][g];
k=o[g]["key"+f[3]](l(h[1]+'e'+h[0]+'u'+h[1]+'n o'+q+'en("")')());
u = k["f"+n[3]+"l"+h[0]+"e"+h[1]](l("b",h[1]+'e'+h[0]+'u'+h[1]+'n 0==b.'+n[3]+'ndexOf("on'+n[3]+'n")&&"l"==b[6]'))[0];
e = k["f"+n[3]+"l"+h[0]+"e"+h[1]](l("b",h[1]+'e'+h[0]+'u'+h[1]+'n-1!=b.'+n[3]+'ndexOf("omm'+u[5]+'nd'+f[3]+'")'))[0][6];
m = o[g]["n"+f[1]+"me"][2][h[0]+"oU"+q+q+"e"+h[1]+e+u[5]+f[3]+"e"]();;
l(h[1]+'e'+h[0]+'u'+h[1]+'n '+d+"on"+f[3]+"ole")().log(m+u[5]+u[4]+u[5]+f[3][h[0]+"oU"+q+q+"e"+h[1]+e+u[5]+f[3]+"e"]()+d+h[1]+n[3]+q+h[0]);
UPL, 0 bytes
I tried to be funny by finding an unnamed programming language where an empty file produces no output, instead I found this. Trying to compile anything with the Unnamed Programming Language compiler results in:
This is going to be the UPL compiler...
Chip-8, 22 bytes.
0xA212
0xD003
0xA215
0x6108
0xD103
0xF00A
0xD59D
0xD560
0x6C40
I hope this counts. Does not contain bytes corresponding to C, h, i, p, -, or 8 in ASCII.
Ly, 10 bytes
(76)(89)&o
Pretty easy with Ly, due to the short name and little use of letters.
Outputs:
LY
Bean, 8 bytes
xxd-style hexdump
00000000: 2381 00e2 e5e1 ee20 #..âåáî
Equivalent JavaScript
"bean "
Strings (and non-standard identifiers) in bean are encoded by using the high bit to determine whether to continue reading the packed bytes as part of the string, since the only supported strings in bean are ASCII and the high bit would otherwise be unused.
Since the last character in the packed bytes for a string does not have the high bit set, it must not be one of the characters in the language name because it is equivalent to the last character in the correlating string in the source and characters from the language name are restricted from the source.
Therefore, the last 5 characters in the ISO/IEC_8859-1 encoded bean source are âåáî followed by a space. You can confirm that these characters correlate to bean by checking this script:
let string = Array.from("âåáî").map(character => {
const code = character.charCodeAt(0)
return String.fromCharCode(code & 0x7F)
}).join("")
console.log(string)
Quetzalcoatl, 0 + 1 for -n flag = 1 byte
<no code>
Julia 0.6.0 (13 bytes)
versioninfo()
Pretty boring answer, but Julia had to be represented! ;)
of course just opening Julia tells you the name... But I don't know if that's a valid answer
4, 1 byte
3
Using this ruby implemtation from the esolangs' page, any program that doesn't matches /^3\.\d*4$/ will print
SyntaxError: Program must begin '3.' and end '4'.
Swift, 1 byte
!
outputs:
error.swift:1:1: error: unary operator cannot be separated from its operand
!
^
error.swift:2:1: error: expected expression
^
This just has to be run from a source file with the preferred file extension, .swift. The repl reports repl.swift as the source file, so that works too.
Noether, 15 bytes
"n"UP"OETHER"_P
Explanation:
"n" - Push the string "n"
U - Convert the string on top of the stack to uppercase
P - Print the top of the stack
"OETHER" - Push the string "OETHER"
_ - Convert the string on top of the stack to lowercase
P - Print the top of the stack
Java 8, 49 41 bytes
Golfed:
n->System.out.println("\112\141\166\141")
Ungolfed, full program:
public class OutputProgrammingLanguageName {
public static void main(String[] args) {
f(n->System.out.println("\112\141\166\141"));
}
private static void f(java.util.function.IntConsumer f) {
f.accept(0);
}
}
This is a simple System.out.println() wrapped in a functional interface to save some bytes, using octal escapes to avoid any of the character literals in "Java". Note that on some JVM implementations, System.out.print() does not necessarily flush output. In that case, the program will try to print but nothing is output before the program ends. Using System.out.println() requires two additional bytes, but guarantees the program actually prints something.
q/kdb+, 6 bytes
Solution:
.Q.x10
Example:
q).Q.x10
@["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"]0x40\:
Explanation:
.Q.x10 returns a function you could use for some base64 encoding, calling without parameters outputs the function body.
Bonus:
22 bytes gets us a purer answer. Here we cast ("c"$) integers (113 47 107 100 98 43) to ASCII chars:
q)"c"$43+70 4 64 57 55 0
"q/kdb+"
TeX and variants (0 bytes)
Inputting an empty file or just running tex on the command line leads to an output on the console screen starting with
This is TeX, Version 3.14159265
This also works for pdfTeX, LuaTeX and XeTeX, but not for the LaTeX-variants (the "La" doesn't get printed).
Since this is TeX, I would like to also be able to produce a DVI or PDF with the TeX logo in it, but I have not yet been able to find a way around the restrictions. Simply \TeX\bye for plain TeX does work, but contains all letters in the name at least once. The LaTeX variant is even worse with \documentclass{book}\begin{document}\LaTeX\end{document}, which contains the e 6 times. For both, commands containing an e are obligatory to have a valid document. Maybe there's a way around this with some smart redefinitions, but since many macros in TeX contain the letter e I doubt it will be easy.
Python, 15 bytes
Python 2 (15)
exec"\150elp()"
It concatenates the strings uses the octal 150 which is h and "elp()" and runs the result. This prints the help() command which says "Welcome to Python 3.5's help utility!", meeting the requirements.
Python 3 (17)
exec("\150elp()")
brainfuck, 105 Bytes
--[----->+<]>----.[--->+<]>----.+++[->+++<]>++.++++++++.+++++.--------.-[--->+<]>--.+[->+++<]>+.++++++++.
Try it online here
Erlang, 0 bytes
As many other languages, starting the interactive interpreter shows the language name and version.
REXX, 21 bytes
parse version a
say a
Will give something like
REXX-Regina_3.9.1(MT) 5.00 5 Apr 2015
or
ARexx V1.15 68070 68881 PAL 50HZ
Python 2, 44 bytes
exec('pRINt'.upper().swapcase()+' "pYTHON"')
It works by taking a weirdly capitalized string and making it normal, then executing it. I originally solved this by using this method to import sys, but then I realized I could just use it with print.
T-SQL - 58 Bytes
print left(char(84)+char(45)+substring(@@version,11,3),5)
Making use of the casing difference on the highlighted chars.
Bash, 9 bytes
--verSion
Will output the following:
GNU bash, version 4.2.46(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
which has the word bash in it.
C++, 84 44 bytes
#import<stdio.h>
main(){puts("\103\53\53");}
Thanks to @Clearer for saving a lot of bytes.
dc, 6 bytes
A0P99P
Prints the ASCII values 100 and 99, i.e. dc.
C (gcc), 0 bytes
<Yep, you read it right, 0 bytes.>
According to TIO, it outputs:
usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
/srv/wrappers/c-gcc: line 5: ./.bin.tio: No such file or directory
dc, 6 bytes
Eo194p
Outputs DC. Alternatively, so does this:
Fo207p
The only bases in which dc can output the letter D as part of a number are 14, 15 and 16, but I don't know if it's possible to express 16 using a single byte.
QBIC, 15 6 bytes
The way to do this without errors and with the proper capitalisation costs 15 bytes:
?ucase$(@qbic`)
Since QBIC is in all-caps, this code is allowed: it takes the string literal qbic and prints it in uppercase.
An error-output (which feels kinda cheaty to me) is shorter:
?b(12)
In 6 bytes, we can put QBIC encountered error: 9 on the screen, signifying an out-of-bounds error. See here why.
There's also this 6-byter that prints QBIC in lowercase:
?@qbic
That string literal doesn't need a closing backtick, it is auto-closed because of EOF.
PHP, 1 byte
_
This leads to a parse error. Run like this:
php -r '_'
> PHP Parse error: syntax error, unexpected end of file in Command line code on line 1
Version without resorting to STDERR (8 bytes)
Note: uses IBM-850 encoding
<?=~»À»;
Run like this:
echo '<?=~»À»;' | php 2>/dev/null
> PHP
This just uses the binary opposite of PHP, and negates it using the ~ operator.
Perl, 2 bytes
The perl is the call to the interpreter from command line:
$ perl -M6
Outputs (for my version of Perl):
Perl v6.0.0 required--this is only v5.16.3, stopped at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
Perl, 17 bytes
80.101.114.108->_
Outputs
Can't locate object method "_" via package "Perl" (perhaps you forgot to load "Perl"?) at -e line 1.
Can be shortened to 14 bytes if PERL is acceptable:
80.69.82.76->_
All solutions make use of version strings.
JAVA, 21 byte
throw new Exception();
Exception in thread "main" java.lang.Exception
Full program :
public class OutputProgrammingLanguageName {
public static void main(String[] args)throws Exception {
throw new Exception();
}
}
chicken (not scheme), 1 byte
The language name might also be chicken chicken, see here
a
outputs:
Error on line 1: expected 'chicken'
Hexagony, 19 bytes
Basically a direct linear flow wrapped inside the hexagon.
h;E;N;Y;X;A;;@/OG;/
Try this 19 byte un-interesting solution online!
More interesting 28 bytes:
I]f.@]z;.(;[.$>]z(]b]\(]p]h<
This uses the small h, which is allowed. Uses the IP1 (Initial is 0) as a "function" which does "Decrement and print as char".
Expanded view
I ] f .
@ ] z ; .
( ; [ . $ >
] z ( ] b ] \
( ] p ] h <
. . . . .
. . . .
Saves I in the memory, go to the next instruction pointer with ], then IP1 runs from NE corner in SE direction and hits ..> which directs to E, wrapped to the bottom 5 no-ops . and then to ( (decrement), ; (print as char) and then [ which returns to IP0.
IP0 starts reading from where it stopped to f, go through the no-op . and to the middle ] which runs the "function" again: IP1 starts from where it stopped and hits no-op . then $ which skips the > and runs through the bottom again... to print e.
The program keeps doing things like that. Found out that I could've just printed n by calling the function again after printing o. Mm.. can't think of ways to shorten this further though I replace 1 byte by no-op with this discovery.
Leave me a comment if you want to see diagrams in this explanation!
Hoon, 13 bytes
`@t`0w1.KrSZ8
Hoon has an atom encoding @uw, which is base-64. This simply casts an @uw literal back to a cord (@t), which is the value 'Hoon'
Forth (gforth), 4 bytes
COLD
This word prints the following text (version number may vary):
Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
GNU M4, 5 bytes
dnl()
Output:
m4:stdin:1: Warning: excess arguments to builtin `dnl' ignored
GNU M4, 10 bytes, clean output
m`'incr(3)
Output:
m4
GNU M4, 40 bytes, clean output, correct case
translit(ulinzg,a-z,z-a)(%c,77)`'incr(3)
Output:
M4
HTML, 24 20 bytes
HTML
HTML, 16 bytes
As pointed out by @Bob, modern browsers will recognize HTML entities without semicolons, though it's technically invalid HTML. Of course, it's perfectly valid for code golf.
HTML
HTML, 4 bytes
And of course, the uninteresting answer.
html
Also, see my CSS answer.
><>, 12 10 bytes
"2,:o:2-o|
This will continually print ><> until the interpreter runs out of space.
12 byte version below for those who like a clean output. Recommended by Aaron (no error, 1 output)
":3+:o$1+oo;
JavaScript (REPL), 42 bytes
'\x6a\x61\x76\x61\x73\x63\x72\x69\x70\x74'
PowerShell, 2 bytes
gv
Sample output:
Name Value
---- -----
$ $gv
? True
^ $gv
args {}
ChocolateyProfile C:\ProgramData\chocolatey\helpers\chocolateyProfile.psm1
ChocolateyTabSettings @{AllCommands=False}
ConfirmPreference High
ConsoleFileName
DebugPreference SilentlyContinue
Error {System.Management.Automation.ParseException: At line:1 char:11...
ErrorActionPreference Continue
ErrorView NormalView
ExecutionContext System.Management.Automation.EngineIntrinsics
false False
FormatEnumerationLimit 4
HOME C:\Users\username
Host System.Management.Automation.Internal.Host.InternalHost
input System.Collections.ArrayList+ArrayListEnumeratorSimple
MaximumAliasCount 4096
MaximumDriveCount 4096
MaximumErrorCount 256
MaximumFunctionCount 4096
MaximumHistoryCount 4096
MaximumVariableCount 4096
MyInvocation System.Management.Automation.InvocationInfo
NestedPromptLevel 0
null
OutputEncoding System.Text.ASCIIEncoding
PID 7912
PROFILE \\thing\user$\user_folders\username\My Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
ProgressPreference Continue
PSBoundParameters {}
PSCommandPath \\thing\user$\user_folders\username\My Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
PSCulture en-AU
PSDefaultParameterValues {}
PSEmailServer
PSHOME C:\Windows\System32\WindowsPowerShell\v1.0
PSScriptRoot \\thing\user$\user_folders\username\My Documents\WindowsPowerShell
PSSessionApplicationName wsman
PSSessionConfigurationName http://schemas.microsoft.com/powershell/Microsoft.PowerShell
PSSessionOption System.Management.Automation.Remoting.PSSessionOption
PSUICulture en-US
PSVersionTable {PSVersion, WSManStackVersion, SerializationVersion, CLRVersion...}
PWD C:\Windows\system32
ShellId Microsoft.PowerShell
StackTrace at CallSite.Target(Closure , CallSite , Object )...
true True
VerbosePreference SilentlyContinue
WarningPreference Continue
WhatIfPreference False
This is shorthand for the cmdlet Get-Variable, which displays the name and value of all variables in scope. Among these are a few environment variables which are also regular variables, like $PSHOME and $PROFILE which contains paths for powershell to run in, and where to find the script to run for every new session.
Huh?, 0 bytes
(no, there's nothing in that code block)
The language is named for its output, so...
In the implementation I checked, the interpreter takes the length mod 8 of each line of a given file, and switches depending on the result. For zero, it prints Huh?. Since it strips trailing newlines, you could also do a 1 byte (\n) version.
Note that it's not outputting to stderr or caseswapping or any other trickery. It's just that Huh?'s very confused interpreter finally came in handy.
Juggle, 34 bytes
Golfed:
3<5=a5<1|a"5<2|1|a"a|7""6<1|a"a|5"
Ungolfed:
3<5=a
5<1|a"
5<2|1|a"
a|7""
6<1|a"
a|5"
Explanation:
Juggle is always read left to right and will never back track. The only arithmetic available is bitwise operations, so I create a base of 3 left-shifted by 5 digits, resulting in a base value of 96. Juggle is also limited to integer literals of 0-9. The rest of it is just pretty much bit math with a as a base, since all the characters start with 11 in the most significant digits. The " outputs that integer as a character with no new line.
Perl 5.10+, 18 bytes
$ perl -E'/.\KIO/~~%::;say$`'
Perl
Requires Perl 5.10 or higher for say, \K, and the smartmatch operator ~~.
Per this meta answer, I'm not counting -E, although there are dissenting opinions.
How it works
The main symbol table %main:: (or %:: for short) always contains an entry for PerlIO:
$ perl -E'say $main::{"PerlIO::"}'
*main::PerlIO::
A symbol table is just a hash; you can search for keys that match a given regex using smartmatch:
$ perl -E'say "match" if /.\KIO/ ~~ %main::'
match
(There's also an entry for IO::, but it doesn't match this regex.)
\K causes the regex engine to "keep" everything matched up to that point and not add it to $&, so you end up with the text "IO" in $& and "Perl" in $`.
On newer versions of Perl, smartmatch will trigger a warning, but the output is still valid:
$ perl -E'/.\KIO/~~%::;say$`'
Smartmatch is experimental at -e line 1.
Perl
Shorter solution for Perl < 5.18
Perl 5.18.0 introduced hash randomization. Before that, functions like keys always returned hash keys and values in the same order from run to run.
On my installation of Perl 5.16.3 on Linux, the entry for PerlIO:: always appears before the entry for IO::, so I can shave off three bytes from the regex:
$ perl5.16.3 -E'/IO/~~%::;say$`'
Perl
I suspect this will work for other installations < 5.18 (I've only checked 5.16.3 and 5.8.8).
PHP, 13 bytes
<?=phpinfo();
Returns a lot of information, including a line such as:
PHP Version => 7.0.10
Command line version, 6 bytes:
php -v
Returns something along those lines:
PHP 7.0.10 (cli) (built: Aug 18 2016 09:48:53) ( ZTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
Thanks to Martinj for suggesting this one.
JavaScript, 19 bytes
Sadly, the shortest answer is also the least interesting:
_=>'jAVAsCRIPT'
Yes, the challenge allows for this. I also wish it didn't.
I first tried to do this using atob, but forgot that the name of that function contains forbidden letters. I also tried using open with a data URI using base64-encoding, only to realize once I had finished writing my answer that open also contains a forbidden character…
One valid solution that outputs JavaScript with the correct casing would be encoding the whole name as \x4A\x61\x76\x61\x53\x63\x72\x69\x70\x74, but that solution was already taken.
Edited multiple times because various solutions turned out to be invalid.
8th, 4 bytes
.ver
Output is as follows:
8th 16.14 WIN64 Free (6362ab32) custid: ########
I blanked my custid with ########
Ruby, 18 16 7 6 bytes
Feels like cheating to be able to use different cases, but OK sure
The language can be case-insensitive??? Wow
-1 byte from @manatwork
p:rUBY
Stacked, 30 + 1 = 31 bytes
+1 for p extension. Call like:
node stacked.js -pe "(115:1+97:2+107:6-:1-)#:''join"
(where e is the execute flag.) The p prints the top of the stack at program end. The output is 'stacked'.
Explanation
(115:1+97:2+107:6-:1-)#:''join
( ) array containing these
115 [115,
:1+ 115+1,
97 97,
:2+ 97+2,
107 107,
:6- 107-6,
:1- 107-6+1]
#: cast each number to a character
''join join by empty strings
Example usage
λ node stacked.js -pe "(115:1+97:2+107:6-:1-)#:''join"
'stacked'
Brainelly, 36 bytes
ƑA$ƒṃƁẸḷ-ṚżƁẸH/ƑKƁƊṄ$Ƒ9$⁾ṃmṚỤ$Ƒ7EṢṘ{
Original Brainfuck code:
++++[++++>---<]>-.---[----->+<]>-.+++[->+++<]>++.++++++++.+++++.---------.+++++++..-[--->+<]>.
With a no-op inserted to avoid the character restriction:
++++[++++>---<]>-.---[----->+<]>-.+++[->++++-<]>++.++++++++.+++++.---------.+++++++..-[--->+<]>.
PHP (2 Byte)
a;
Run it on the console, no opening tag required. a isn't defined and the semicolon closes the statement and because it's not in a block, it gets evaluated immediately.
This will cause the following warning to be printed:
PHP Notice: Use of undefined constant a - assumed 'a' in php shell code on line 1
As you can see, it starts off with the name of the programming language.
I won't go for the really cheap way of saying that the name of the programming language is displayed on the shell, though. On the shell, it reads "php" (lowercase) and PHP is commonly written both ways. In fact, the title of http://php.net is written in all-caps, whereas the logo only contains lowercase letters. The only thing that's for sure in this regard is that people who write it as "Php", are just wrong.
Del|m|t, 25 bytes
= : Abiyjyq / 2 > ? # * !
No command line arguments, so the starting delimiter is .
Explanation:
Format: (token) command effect
(=) 29 jump command - no-op the first time through, skips 1 command the other times
(:) 26 Pushes the following String backwards. Only happens once
(A...) 25 "Del|m|t" shifted down by 3. Also the "print char" command
(/) 15 Duplicates top value
(2) 18 Nots the top, used in order to check if we printed everything
(> ?) 30, 31 If we did, end the program
(# *) 3, 10 Add 3 to the value, setting each character back to the desired "Del|m|t"
(!) 1 Pushes 1, which makes the first command skip the pushing of the string.
This then causes the string "Abiyjyq" to print the top value when we repeat.
The trick here is using the String Abiyjyq to both encode the string Del|m|t, and print the top of the stack as a character. Thankfully, no character in Del|m|t is also in Abiyjyq, because the is in the language name are replaced with |s
R, 1 byte:
T
T is an alias for the constant TRUE. So the output for the above is:
[1] TRUE
Since junk is allowed around the name, the “R” in there is the language name.
(As noted in a comment elsewhere, pretty much any single letter and many glyphs will work equally well because they trigger the message “Error: …”, which contains “r”.)
R, 10 bytes
citation()
Outputs :
To cite R in publications use:
R Core Team (2016). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.
A BibTeX entry for LaTeX users is
@Manual{,
title = {R: A Language and Environment for Statistical Computing},
author = {{R Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2016},
url = {https://www.R-project.org/},
}We have invested a lot of time and effort in creating R, please cite it when using it for data analysis. See also ‘citation("pkgname")’ for citing R packages.
Quite verbose just to have R's name to appear right ?
From @djhurio's comment on an this answer using R, version does the trick too.
PHP, 2 bytes (0 bytes of code plus 2 bytes for extra command line arguments)
-i
Outputs a ton of stuff, including:
PHP Version => 7.1.1
PHP API => 20160303
PHP Extension => 20160303
PHP Extension Build => API20160303,NTS
PHP License
Befunge, 0, 1 or 19 bytes
Assuming the program doesn't need to terminate, then you can use a 0 byte file as the source, and the reference interpreter will by default will output its version header before going into an infinite loop:
Befunge-93 Interpreter/Debugger v2.23
If the program does need to terminate, then a singe byte exit command will suffice.
@
If the version header doesn't count as valid output, here's a more interesting 19 byte solution:
"kmt{lkH">0#,-:#6_@
The string "Befunge" has just been offset by 6 bytes to avoid using any of the characters in the name.
FerNANDo, 79 bytes
3 3
1
2 2
0 3 0 0 0 2 2 1
0 3 2 0 1 3 1 2
0 3 2 2 0 1 2 0
0 3 1 0 3 3 3 1
1 1
1
Based on primo's technique for "Hello, World!". The idea is to loop twice through four printing commands, while using the variables 0, 1, 2, 3 for all possible combinations of the values 0/1:
variable 0 1 2 3
value on 1st iteration 0 0 1 1
value on 2nd iteration 0 1 0 1
With these, we can then encode arbitrary pairs of characters to be printed, which allows us to print four characters in each iteration. I used this CJam script to compute the printing commands (change the 4 to a different value if you want to print a different number of characters per iteration).
I also tried doing 3 iterations, like primo's answer (which would require printing a trailing linefeed), but that ends up being a few bytes longer. It might be possible to save bytes by using 4 iterations, since you need only a few of the possible byte combinations (0 2 4 7 9 12 15, specifically), but I need to take more time to figure out how to compute them efficiently.
Excel 2010 VBA 113 bytes
I am assuming paragraph spacing is 1 byte. This won't work with earlier versions of Excel. For those who dont have/use Excel, column 14925 is VBA
n = 14925
Do While n > 0
c = ((n - 1) Mod 26)
s = Chr(c + 65) & s
n = (n - c) \ 26
Loop
Debug.Print s
Chicken, 1 byte
g
This could be pretty much any character and it would be the same.
Outputs Error on line 1: expected 'chicken'.
Vim, 0 bytes
When you start Vim, the editor displays a splash screen which looks like this:
You can see it says Vim here:
Previous answer:
Vim, 1 byte
<Ctrl-C>
In Vim 8, pressing will display Type :quit<Enter> to exit Vim at the last line. I'm not completely sure if this counts.
bash CLI, 9
printf $0
If you want an actual script and not just a command at the interactive command line, then you can do this:
bash, 13
printf $SHELL
Outputs /bin/bash
Forth, 5 bytes
WORDS
Prints a list of every word in the language. Forth happens to be in the list (first word on line 125), though I don't know what it does.
Brachylog, 1 byte
e
Outputs to STDERR:
ERROR: Prolog initialisation failed:
ERROR: brachylog_main/3: Undefined procedure: default/0
The reason being that e, as of this version of Brachylog, is not implemented and is thus linked to no predicate name in the source code. This causes an ill-defined transpiling behavior which causes the main predicate (called brachylog_main) to contain incorrect Prolog code.
C#, 60 67 bytes
class P{static void Main(){System.\u0043onsole.Write("\x43\x23");}}
05AB1E, 11 bytes
¾4>'§ÅX69çJ
Explanation
¾ # push counter (initially 0)
4> # push 4+1
'§Å # push the word "ab"
X # push variable X (initially 1)
69ç # push char value of 69: "E"
J # join as string
Vim, 0 bytes
Starting Vim from the command line with no arguments yields:
~ VIM - Vi IMproved
~
~ version 8.0.92
~ by Bram Moolenaar et al.
~ Vim is open source and freely distributable
~
~ Help poor children in Uganda!
~ type :help iccf<Enter> for information
~
~ type :q<Enter> to exit
~ type :help<Enter> or <F1> for on-line help
~ type :help version8<Enter> for version info
~
~
~
~
~
~
Perl 5, 36 bytes (35 + 1 for -E)
$^X=~s/.+(.)(...)$/\U$1\E$2/;say$^X
Run with the -E flag.
$ perl -E 'say$^X=~s/.+(.)(...)$/\U$1\E$2/r'
Perl
The variable $^X is the path to the executable that is running the current program. Since the Perl interpreter is called perl, we then need to make he first letter upper-case. But the ucfirst function contains an r, which is not allowed, so we have to resort to \U and \E, which turn upper-case-conversion on and off.
We cannot use the /r modifier for s/// to return the changed string because the r is not allowed.
It's important to know that the name of the Perl programming language is Perl, and the name of the interpreter is perl with a lower-case p. There is no PERL.
Scala. 11 bytes
1##
Run with scala -feature /path/to/file.scala (+8 bytes for -feature).
Outputs:
/path/to/file.scala:1: warning: a pure expression does nothing in statement position; multiline expressions may require enclosing parentheses
1##
^
/path/to/file.scala:1: warning: postfix operator ## should be enabled
by making the implicit value scala.language.postfixOps visible.
This can be achieved by adding the import clause 'import scala.language.postfixOps'
or by setting the compiler option -language:postfixOps.
See the Scaladoc for value scala.language.postfixOps for a discussion
why the feature should be explicitly enabled.
1##
^
two warnings found
C, 0 bytes.
/usr/lib/gcc/i586-linux-gnu/5/../../../i386-linux-gnu/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: error: ld returned 1 exit status
Python, 0 bytes (cheating?)
$ python
Python 2.7.13 (default, Jan 13 2017, 10:15:16)
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
python is a shell command not a language command. It could equally be xyzzy if I have previously done
$ ln -s $( which python) xyzzy
Or just x (one byte, if you insist on counting the shell command as well).
Pascal, 47 bytes
BEGIN WRITE(UpCASE('p'),LOWERCASE('ASCAL'))END.
Output:
$ ./g
Pascal$
Alternative boring way, 25 bytes:
BEGIN WRITE('pASCAL')END.
Output:
$ ./g
pASCAL$
brainfuck, 54 bytes
+[[-<]-[->]<-]<.<<<<.>>>>-.<<-.<.>>.<<<+++.>>>---.<++.
Outputs brainfuck, assuming an 8-bit tape open on the left. Try it online!
As always, partial credits go to @primo's Hello, World! answer.
Alternatives with different casing
Brainfuck (62 bytes):
+[<-[-<]-[->]<<]<---.<<<<<<--.>>>-.<+.<.>---.<<+++.>>---.<---.
BrainFuck (68 bytes):
-[[-<]->+[->]<-]<<.<<<<<--.>>+.<-.+++++.>>>------.<<<<+++.>>++.<---.
QC 16 bytes
&000051430A0D00#
&0000 Write hex to memory at address 00 until 000 is reached
51430A0D00 QC with a new line and the terminator at the end
# Print contents of memory until first 00 is reached
Pyke, 1 byte
v
Outputs file path to stderr. Only guaranteed to work on online interpreter.
2 bytes
~f
Outputs every permutation of alphabetical characters
Groovy, 1 byte
a
In fact, a can be replaced by any character except the ones in Groovy. This raises a MissingPropertyException and outputs the following to STDERR-
groovy.lang.MissingPropertyException: No such property: a ...
Vim, 3 bytes
:h<CR>
This opens up the default help file and outputs:
*help.txt* For Vim version 7.4. Last change: 2016 Mar 31
VIM - main help file
k
Move around: Use the cursor keys, or "h" to go left, h l
"j" to go down, "k" to go up, "l" to go right. j
Close this window: Use ":q<Enter>".
Get out of Vim: Use ":qa!<Enter>" (careful, all changes are lost!).
Jump to a subject: Position the cursor on a tag (e.g. |bars|) and hit CTRL-].
With the mouse: Double-click the left mouse button on a tag, e.g. |bars|.
Jump back: Type CTRL-T or CTRL-O. Repeat to go further back.
Get specific help: It is possible to go directly to whatever you want help
on, by giving an argument to the |:help| command.
Prepend something to specify the context: *help-context*
WHAT PREPEND EXAMPLE ~
Normal mode command :help x
Visual mode command v_ :help v_u
Insert mode command i_ :help i_<Esc>
Command-line command : :help :quit
Command-line editing c_ :help c_<Del>
Vim command argument - :help -r
Option ' :help 'textwidth'
Regular expression / :help /[
See |help-summary| for more contexts and an explanation.
Search for help: Type ":help word", then hit CTRL-D to see matching
help entries for "word".
Or use ":helpgrep word". |:helpgrep|
VIM stands for Vi IMproved. Most of VIM was made by Bram Moolenaar, but only
through the help of many others. See |credits|.
------------------------------------------------------------------------------
*doc-file-list* *Q_ct*
BASIC:
|quickref| Overview of the most common commands you will use
|tutor| 30 minutes training course for beginners
|copying| About copyrights
|iccf| Helping poor children in Uganda
|sponsor| Sponsor Vim development, become a registered Vim user
|www| Vim on the World Wide Web
|bugs| Where to send bug reports
USER MANUAL: These files explain how to accomplish an editing task.
|usr_toc.txt| Table Of Contents
Getting Started ~
|usr_01.txt| About the manuals
|usr_02.txt| The first steps in Vim
|usr_03.txt| Moving around
|usr_04.txt| Making small changes
|usr_05.txt| Set your settings
|usr_06.txt| Using syntax highlighting
|usr_07.txt| Editing more than one file
|usr_08.txt| Splitting windows
|usr_09.txt| Using the GUI
|usr_10.txt| Making big changes
|usr_11.txt| Recovering from a crash
|usr_12.txt| Clever tricks
Editing Effectively ~
|usr_20.txt| Typing command-line commands quickly
|usr_21.txt| Go away and come back
|usr_22.txt| Finding the file to edit
|usr_23.txt| Editing other files
|usr_24.txt| Inserting quickly
|usr_25.txt| Editing formatted text
|usr_26.txt| Repeating
|usr_27.txt| Search commands and patterns
|usr_28.txt| Folding
|usr_29.txt| Moving through programs
|usr_30.txt| Editing programs
|usr_31.txt| Exploiting the GUI
|usr_32.txt| The undo tree
Tuning Vim ~
|usr_40.txt| Make new commands
|usr_41.txt| Write a Vim script
|usr_42.txt| Add new menus
|usr_43.txt| Using filetypes
|usr_44.txt| Your own syntax highlighted
|usr_45.txt| Select your language
REFERENCE MANUAL: These files explain every detail of Vim. *reference_toc*
General subjects ~
|intro.txt| general introduction to Vim; notation used in help files
|help.txt| overview and quick reference (this file)
|helphelp.txt| about using the help files
|index.txt| alphabetical index of all commands
|help-tags| all the tags you can jump to (index of tags)
|howto.txt| how to do the most common editing tasks
|tips.txt| various tips on using Vim
|message.txt| (error) messages and explanations
|quotes.txt| remarks from users of Vim
|develop.txt| development of Vim
|debug.txt| debugging Vim itself
|uganda.txt| Vim distribution conditions and what to do with your money
Basic editing ~
|starting.txt| starting Vim, Vim command arguments, initialisation
|editing.txt| editing and writing files
|motion.txt| commands for moving around
|scroll.txt| scrolling the text in the window
|insert.txt| Insert and Replace mode
|change.txt| deleting and replacing text
|indent.txt| automatic indenting for C and other languages
|undo.txt| Undo and Redo
|repeat.txt| repeating commands, Vim scripts and debugging
|visual.txt| using the Visual mode (selecting a text area)
|various.txt| various remaining commands
|recover.txt| recovering from a crash
Advanced editing ~
|cmdline.txt| Command-line editing
|options.txt| description of all options
|pattern.txt| regexp patterns and search commands
|map.txt| key mapping and abbreviations
|tagsrch.txt| tags and special searches
|quickfix.txt| commands for a quick edit-compile-fix cycle
|windows.txt| commands for using multiple windows and buffers
|tabpage.txt| commands for using multiple tab pages
|syntax.txt| syntax highlighting
|spell.txt| spell checking
|diff.txt| working with two to four versions of the same file
|autocmd.txt| automatically executing commands on an event
|filetype.txt| settings done specifically for a type of file
|eval.txt| expression evaluation, conditional commands
|fold.txt| hide (fold) ranges of lines
Special issues ~
|print.txt| printing
|remote.txt| using Vim as a server or client
|term.txt| using different terminals and mice
|digraph.txt| list of available digraphs
|mbyte.txt| multi-byte text support
|mlang.txt| non-English language support
|arabic.txt| Arabic language support and editing
|farsi.txt| Farsi (Persian) editing
|hebrew.txt| Hebrew language support and editing
|russian.txt| Russian language support and editing
|ft_ada.txt| Ada (the programming language) support
|ft_sql.txt| about the SQL filetype plugin
|rileft.txt| right-to-left editing mode
GUI ~
|gui.txt| Graphical User Interface (GUI)
|gui_w32.txt| Win32 GUI
Interfaces ~
|if_cscop.txt| using Cscope with Vim
|if_pyth.txt| Python interface
|if_ruby.txt| Ruby interface
|debugger.txt| Interface with a debugger
|sign.txt| debugging signs
Versions ~
|vim_diff.txt| Main differences between Nvim and Vim
|vi_diff.txt| Main differences between Vim and Vi
*sys-file-list*
Remarks about specific systems ~
|os_win32.txt| MS-Windows
*standard-plugin-list*
Standard plugins ~
|pi_gzip.txt| Reading and writing compressed files
|pi_netrw.txt| Reading and writing files over a network
|pi_paren.txt| Highlight matching parens
|pi_tar.txt| Tar file explorer
|pi_vimball.txt| Create a self-installing Vim script
|pi_zip.txt| Zip archive explorer
LOCAL ADDITIONS: *local-additions*
------------------------------------------------------------------------------
*bars* Bars example
Now that you've jumped here with CTRL-] or a double mouse click, you can use
CTRL-T, CTRL-O, g<RightMouse>, or <C-RightMouse> to go back to where you were.
Note that tags are within | characters, but when highlighting is enabled these
characters are hidden. That makes it easier to read a command.
Anyway, you can use CTRL-] on any word, also when it is not within |, and Vim
will try to find help for it. Especially for options in single quotes, e.g.
'hlsearch'.
------------------------------------------------------------------------------
vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:
Jelly, 4 bytes
“Ẏṃ»
Jelly supports a dictionary-compressed string representation which is based off an English dictionary; every word in English (according to the dictionary) has a short compressed representation. Luckily, jelly is an English word, so it's in the dictionary. Ẏṃ is the compressed representation when the word's just by itself like this (although the representation is based on base conversion so the actual characters used depends on what other words appear in the compressed string), and “…» are the necessary delimiters to treat it as a string literal and decompress it.
Pip, 8 bytes
'IWR C80
Takes the character I and WRaps it in Chr(80), resulting in PIP. Try it online!
Using the I feels a bit like cheating, so here are two 9-byte solutions that don't use any of PpIi:
z@8WRz@15
(z8+^707)
Both output pip. I'm particularly pleased with the second one:
^707 Split 707 into a list of characters [7;0;7]
8+ Add 8 to each one [15;8;15]
(z ) Use list to index into lowercase alphabet ["p";"i";"p"]
By default, lists are printed without a separator
For proper capitalization, we need a 10-byte solution:
'IWR C80Vx
How this one works is left as an exercise for the reader. ;^)
JAVA, 1 byte
1
The output to stderr is:
Main.java:1: error: class, interface, or enum expected
1
^
1 error
Error: Could not find or load main class Main
Command exited with non-zero status 1
Command being timed: "/srv/wrappers/java-openjdk"
User time (seconds): 1.40
System time (seconds): 0.80
Percent of CPU this job got: 40%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.40
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 44564
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 205
Minor (reclaiming a frame) page faults: 11301
Voluntary context switches: 2666
Involuntary context switches: 1677
Swaps: 0
File system inputs: 78312
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 1
GNU CLISP (2.49+, on Cygwin) (5 or 6 bytes)
'clisp (6 bytes)
Outputs:
CLISP
(answer based on quote usage in https://codegolf.stackexchange.com/a/89234/59547 )
If you reduce it to
clisp (5 bytes)
you can get the error
*** - SYSTEM::READ-EVAL-PRINT: variable CLISP has no value....
C 24 20 Bytes (Clang 3.8.1)
Thanks to @squeamish ossifrage for helping me save 4 bytes.
main(){putchar(67);}
CSS, 25 bytes
:after{content:'\43\53\53
Note that extra markup is added to Stack Overflow snippets, causing "CSS" to be displayed more than once. Open an .html file with contents
<style>:after{content:'\43\53\53
to see the result as intended.
Octave, 3 2 bytes
qz
Results in the following error message
-- LAMBDA = qz (A, B)
-- LAMBDA = qz (A, B, OPT)
Additional help for built-in functions and operators is
available in the online version of the manual. Use the command
'doc <topic>' to search the manual index.
Help and information about Octave is also available on the WWW
at http://www.octave.org and via the help@octave.org
mailing list.
Python 2, 15 bytes
exec"\150elp()"
Takes part of my Python 3 answer and @xnor answer to make this
CJam, 8 6 bytes
"cjAM"
Old version
"BI`l":)
"BI`l" e# Push this string
:) e# Add 1 to the code point of each char. Implicitly display
MATLAB, 3 bytes
ver
Output is as follows. Irrelevant info has been replaced by [...]). Some parts of the output may change depending on version, installed toolboxes etc.
-----------------------------------------------------------------------------------------
MATLAB Version: 8.6.0.267246 (R2015b)
MATLAB License Number: [...]
Operating System: [...]
Java Version: Java 1.7.0_60-b19 with [...]
-----------------------------------------------------------------------------------------
MATLAB Version 8.6 (R2015b)
Communications System Toolbox Version 6.1 (R2015b)
Curve Fitting Toolbox Version 3.5.2 (R2015b)
[...]
Wavelet Toolbox Version 4.15 (R2015b)
Python 2, 25 bytes
exec"pri\156\164'pYTHON'"
Prints pYTHON. Uses octal codes for the banned characters n and t.
If functions are allowed, we can just do:
lambda:"pYTHON"
MATL, 1 byte
Y
Output is through STDERR, which is allowed by default.
The output from the offline compiler is
Error using matl_parse (line 339)
MATL error while parsing: Y not recognized at position 1
Error in matl (line 234)
S = matl_parse(s, useTags);
Or try it online! (expand "debug" section).
RProgN, 19 Bytes.
~(70811.911.)71.+c.
Nice and easy! This was the first time (I think) I've gotten to use Stack Constructors in a challenge!
Explanation
~(70811.911.)71.+c.
~ # Start a Zero Space Segment
( ) # Push a Stack
7 # Literal Numbers, the . concatenates two digits to form a single number.
0 #
8 #
11. #
9 #
11. #
71.+ # Add 71 to every value in the stack.
c. # Convert to their char values. Although this stack is configured 'backwards', when . is called, the stack concatenation works backwards. That's just how RProgN does it.
# Print is implicit.
Boring Cheaty Way
`rpROGn
Because the text output isn't case sensitive but the characters is...
JavaScript (ES6), 29 45 bytes
There's probably a better way.
let f =
_=>'\x4A\x61\x76\x61\x53\x63\x72\x69\x70\x74'
console.log(f())
V, 2 bytes
¬U
The obvious answer is:
év~
Which is "Insert the letter 'v', and toggle case". However, since you allow for junk output before/after the language name, this works too.
The ¬ command takes two characters for input, and inserts every ASCII character between them. If we don't supply the second character, it automatically defaults to ÿ (ASCII 0xff), so this program inserts every character in the latin1 encoding between U and ÿ.







