Output programming language name

45

6

Challenge:

In the programming language of your choice, take no input and output your programming language's name.

Fair enough, right?

Restrictions:

  • You can't use any character that is included in your programming language's name in your code. E.g., if I use Batch, I must not use the chars 'B' 'a' t' 'c' 'h' in my code. Note that this is case sensitive. I can still use the char 'b' because it's different from 'B'.
  • You can have "junk output" before or after the name of the language
  • Version number doesn't count as part of the name of the language. E.g., I can use the number 3 in the code in my answer if it's in Python 3
  • The output of the programming language name is not case sensitive.
  • Brute-forcing all possible letter combinations and hoping you get your language name is forbidden.

Example outputs: (let's say my programming language is called Language) (✔ if valid, else ✖)

  • Language
  • Body language is a type of non-verbal communication in which physical behavior, as opposed to words, is used to express or convey information. Such behavior includes facial expressions, body posture, gestures, eye movement, touch and the use of space.
  • Language 2.0 - © 1078 AD some company
  • foobar

This is thus shortest code wins.

P. Ktinos

Posted 2017-01-24T23:33:03.143

Reputation: 2 742

7The rule about case sensitive restrictions is very ambiguous. Which is the correct orthography: BASIC Basic or basic? I'm pretty sure I can find examples for all three. – Level River St – 2017-01-24T23:47:47.737

7Obligatory "Just having your code be blank but have a flag like --version isn't allowed"? – Value Ink – 2017-01-25T00:00:54.733

88Have case-insensitive output while banning the language name case-sensitively allows boring solutions that just output the language name case-swapped. – xnor – 2017-01-25T00:47:59.327

2Does the output need to go to the screen/be printed, or can it be returned as well? – simbabque – 2017-01-25T13:48:41.507

1@xnor Agreed. This should be changed. – mbomb007 – 2017-01-25T14:53:02.830

1@xnor I won't change it, because outputting the name case-swapped would need at least the amount of bytes the name is, which allows more creative answers to win, since they would have lower byte count. – P. Ktinos – 2017-01-25T15:08:51.490

Can I pass my language name as a command line argument if my language does not have a method to reliably print what's passed, and may even automatically error on certain command line arguments? The idea is that the command line argument specifies the regex that is used to parse the source code. My language name happens to be valid regex, and would lead to a (semi-) interesting solution. Because of certain constraints, it may not even be optimal, as command line arguments add to your byte count. – MildlyMilquetoast – 2017-01-25T17:20:28.597

12You made a mistake by allowing users to output junk data. All they have to do is use a language where the compiler include the name whenever there's an error. It's cool but not the challenge I was hoping for – Lynob – 2017-01-26T08:23:26.603

Can the filename of the program include the language name? – leancz – 2017-01-26T11:59:36.710

3This question really needs to be specified that "Code" must be run. Most languages will show their name in the usage dump if you don't give any code--for instance "Java" or "Groovy" at the command line with no code will display the correct name, however if you pass code (even "empty" code) as in (groovy -e "") you will get an empty response. Same for compile problems, the compiler usage or error output does not mean you wrote a program. – Bill K – 2017-01-26T18:30:31.123

1@Lynob to be honest, if we wanted something creative we would need to ban ascii code/unicode/and such things. – Walfrat – 2017-01-27T12:08:10.877

@Lynob preventing output to stderr should prevent a lot of language to use such a trick – Sefa – 2017-01-27T13:32:16.697

Unfortunately I can't do it in Smalltalk. Object comment uses 2 characters in the name Smalltalk. – None – 2019-08-27T15:11:13.247

Answers

68

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+

Try it online! Trivially invokes undocumented behavior. Silos is the name of the language.

Python, 6 bytes

pYTHON

As the character restriction is case insensitive, and the output doesn't have to be in the correct case, this is a valid answer. The error message it produces is something like this:

Traceback (most recent call last):
  File ".code.tio", line 1, in <module>
    pYTHON
NameError: name 'pYTHON' is not defined

Try it online! (outputs to 'debug' tab)

JavaScript, 10 bytes

jAVAsCRIPT

This produces the following error message or similar in all environments:

ReferenceError: jAVAsCRIPT is not defined

QBIC, 6 bytes

?b(12)

In 6 bytes, we can put QBIC encountered error: 9 on the screen, signifying an out-of-bounds error.

ForceLang, 2 bytes

()

Error produced:

Exception in thread "main" lang.exceptions.IllegalInvocationException: null is not a function.
    at lang.ForceLang.parse(ForceLang.java:99)
    at lang.ForceLang.main(ForceLang.java:129)

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 

xnor

Posted 2017-01-24T23:33:03.143

Reputation: 115 687

19Isn't the empty string contained in the language's name? :D – mbomb007 – 2017-01-25T15:08:36.040

21The C and R ones are clever. – DLosc – 2017-01-26T07:10:37.997

2@mbomb007 but it's not a character, therefore it's not a character included in the language's name. – user253751 – 2017-01-27T04:26:01.987

The PHP version can be disabled, if I'm not mistaken. Using something like <?? will be more effective and can't be disabled. – Ismael Miguel – 2017-01-27T14:29:48.187

C can be 0 bytes, since if theres nothing it will complain that theres no main – Matthew Roh – 2017-02-05T12:48:27.103

PHP, 1 byte: php -r '1' – axiac – 2017-02-05T16:17:40.680

1Does the S.I.L.O.S one count? It doesn't output the periods. – Business Cat – 2017-02-06T17:16:54.423

11"Java bytecode, 0 bytes". First time I see Java triumphing above ALL of those other languages mentioned. :) – Kevin Cruijssen – 2017-07-03T11:26:55.900

49

SmileBASIC, 11 bytes

sPsET.,1474

Equivalent to SPSET 0,1474. Sets sprite 0 to definition 1474, which is the SmileBASIC logo.

Screenshot

12Me21

Posted 2017-01-24T23:33:03.143

Reputation: 6 110

44

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).

Luis Mendo

Posted 2017-01-24T23:33:03.143

Reputation: 87 464

7

Should you merge with this?

– wizzwizz4 – 2017-01-25T18:31:32.757

@wizzwizz4 I'm not sure. I asked in chat and got these two replies, so it's not really clear

– Luis Mendo – 2017-01-25T19:47:32.803

1yeah but Y tho? – sagiksp – 2017-01-26T09:34:45.520

@sagiksp Anything that throws an error will do, such as X or Z. This is because X, Y or Z are prefixes of two-char function names, so a Y by itself is invalid – Luis Mendo – 2017-01-26T10:55:05.853

38

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”.)

Konrad Rudolph

Posted 2017-01-24T23:33:03.143

Reputation: 1 067

31

HTML, 24 20 bytes

&#72;&#84;&#77;&#76;

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.

&#72&#84&#77&#76

HTML, 4 bytes

And of course, the uninteresting answer.

html

Also, see my CSS answer.

darrylyeo

Posted 2017-01-24T23:33:03.143

Reputation: 6 214

3You can save four characters by using decimal instead: &#72;&#84;&#77;&#76;. You can save an additional four characters by dropping the semicolons, at the cost of being technically invalid HTML (but still working in modern browsers). – Bob – 2017-01-25T03:26:30.133

Why doesn't HTML count? – OrangeDog – 2017-01-25T13:51:00.267

1@OrangeDog "You can't use any character that is included in your programming language's name in your code" – darrylyeo – 2017-01-25T18:39:39.530

But html should be valid, reducing the score by 12 bytes. – Christoph – 2017-01-27T11:09:50.647

@Christoph Added. – darrylyeo – 2017-01-27T18:07:39.287

Is this a valid HTML document? I thought you had to include the whole doctype + header + body stuff. If you must have header, it's impossible to complete this challenge with HTML. – Clearer – 2017-02-14T01:42:52.250

3@Clearer This is code golf! As long as it works in at least one environment, who cares whether W3C thinks it's valid? – darrylyeo – 2017-02-15T15:31:58.347

How can html be valid? Either it uses letters of the programming language's name (if you think case doesn't matter) or it doesn't output the programming language's name (if you think case matters). The restriction of not being allowed to use the letters of the programming language's name is clearly to avoid exactly this approach. – Alfe – 2019-10-14T13:02:36.017

26

Vim, 0 bytes



When you start Vim, the editor displays a splash screen which looks like this:

Vim splash screen

You can see it says Vim here:

Vim splash screen with vim highlighted

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.

Loovjo

Posted 2017-01-24T23:33:03.143

Reputation: 7 357

1It should count. Ctrl-C actually has its own ASCII code (code 3, also called ETX or "end of text"), so this is a pure-ASCII program (if not purely printable ASCII). You can use that to prove that the program's one byte long, and displaying text on screen counts. – None – 2017-01-25T14:36:35.643

4Since when is "vim" a programming language? – DepressedDaniel – 2017-01-27T03:26:49.300

4@DepressedDaniel vim is actually a scripting language if you take a deeper look into the internals. All those fancy keystrokes are instructions => you're programming when you're controlling your editor. – bash0r – 2017-01-27T13:32:28.273

1@DepressedDaniel is it turing complete? If it's not, I don't think it should count. – Clearer – 2017-02-14T01:45:10.690

1@Clearer, several significant languages are not Turing complete by default (e.g., Coq, Agda, and Isabelle) or have non-Turing complete modes of operation (e.g., Idris). It would be very sad if those were excluded! – dfeuer – 2019-08-12T07:45:11.350

3@dfeuer I've come to agree with you, since I made that comment more than 2 years ago. – Clearer – 2019-08-13T06:57:54.753

20

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()")

Try it online!

user63571

Posted 2017-01-24T23:33:03.143

Reputation:

Not sure help counts, it only works in a REPL environment. – xnor – 2017-01-25T01:09:50.357

It still prints out the Python. That's all that's required. – None – 2017-01-25T01:16:00.237

If it works in TIO surely it's a valid answer? – None – 2017-01-25T01:22:37.450

1Never mind, I was mistaken and it works as a program. Sorry about that. – xnor – 2017-01-25T01:22:55.073

1you have used the letter 'p' – Matt – 2017-01-25T15:34:00.883

3p is allowed but P isn't. Rule 1. – None – 2017-01-25T17:54:40.037

oh yes, my bad! nice answer – Matt – 2017-01-26T08:52:16.070

In the REPL, it prints Python and the version, sooooo???? – Stan Strum – 2018-03-27T02:06:26.323

17

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

Try it online!

Cees Timmerman

Posted 2017-01-24T23:33:03.143

Reputation: 625

where is the name ? Or do you refer to the c characters in there ? – HopefullyHelpful – 2017-01-26T11:46:52.297

3This should be marked as C (gcc), because other compilers have different messages. – orlp – 2017-01-26T12:47:58.833

Meh, your c's come from extremely implementation-dependent sources. Would have been nicer if you at least provoked a message that contains c in some boilerplate output. – DepressedDaniel – 2017-01-27T03:24:51.763

1@DepressedDaniel undefined reference to 'main' – Loren Pechtel – 2017-01-27T05:59:50.700

@LorenPechtel Fair enough, missed that. – DepressedDaniel – 2017-01-27T06:02:12.870

C has always been the "bite me"-language. – Clearer – 2017-01-27T20:25:30.240

This is not C, this is gcc. – 12431234123412341234123 – 2017-03-27T11:14:51.923

@12431234123412341234123 No, it's not GCC. GCC isn't a language. You're correct that it isn't C however. This answer is simply incorrect. – Jakob – 2018-03-25T01:17:17.147

17

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.

Flambino

Posted 2017-01-24T23:33:03.143

Reputation: 1 001

Wait, is this language Turing complete? – Hello Goodbye – 2019-11-18T15:08:23.853

13

V, 2 bytes

¬U

Try it online!

The obvious answer is:

év~

Try it online!

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 ÿ.

James

Posted 2017-01-24T23:33:03.143

Reputation: 54 537

13

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):

-[[-<]->+[->]<-]<<.<<<<<--.>>+.<-.+++++.>>>------.<<<<+++.>>++.<---.

Sp3000

Posted 2017-01-24T23:33:03.143

Reputation: 58 729

12

Python, 27 53 49 48 45 bytes

-3 bytes from @wizzwizz4

exec eval('"IMpORT THIS".LOWER()'.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!

Value Ink

Posted 2017-01-24T23:33:03.143

Reputation: 10 608

1@Arnauld fixed! – Value Ink – 2017-01-25T00:27:18.087

1HELP() or HELP(HELP) is shorter. – Gurupad Mamadapur – 2017-01-25T08:14:27.483

It doesn't matter if you swap the case of the import string, because you're making it lower-case anyway. -3 bytes. – wizzwizz4 – 2017-01-25T18:39:54.137

@GurupadMamadapur the Python 3 answer already covered it and better (pretty sure my code would be the exact same), so I'm not in the mood to use it too. Guess I'm sticking to import this. – Value Ink – 2017-01-27T09:20:40.653

@ValueInk Alright then. – Gurupad Mamadapur – 2017-01-27T14:00:38.647

I don't like this approach. Then also a simple 'pYTHON'.swapcase() works. – Alfe – 2019-10-14T13:09:51.180

@Alfe 'pYTHON'.swapcase() does not output anything -- it's a snippet and will not print anything when run from a file. If you use the solution I'm using with an exec/eval/lower/swapcase combo, print'python' is longer than import this anyways. If you have any other ideas feel free to make your own solution -- after all there are at least two other Python solutions here that are shorter than mine. – Value Ink – 2019-10-14T21:22:07.443

12

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)

Luis Mendo

Posted 2017-01-24T23:33:03.143

Reputation: 87 464

Uses a v and an e – None – 2017-01-25T00:31:35.710

Your language is Octave, so you can't use v and e. – JungHwan Min – 2017-01-25T00:31:41.117

6Woops. Corrected by changing language to Matlab (which was my initial intent anyway) – Luis Mendo – 2017-01-25T00:55:34.687

12

Python 2 (1 byte)

è

output...:

output

Max

Posted 2017-01-24T23:33:03.143

Reputation: 501

Are you sure this is only 1 byte? – Okx – 2017-07-27T22:38:23.903

1Agreed. It's 2 bytes in UTF-8 – mbomb007 – 2017-10-20T13:48:53.057

The key is "non-ASCII" -- try 0xa0 (nbsp) or basically any other high byte you like and you'll get the same error! – John P – 2017-10-20T17:57:45.333

3This is 1 byte in Win1252, which the error message shows this is using. – ATaco – 2017-10-21T05:04:04.570

10

><>, 12 10 bytes

"2,:o:2-o|

This will continually print ><> until the interpreter runs out of space.

Try it online!

12 byte version below for those who like a clean output. Recommended by Aaron (no error, 1 output)

":3+:o$1+oo;

Teal pelican

Posted 2017-01-24T23:33:03.143

Reputation: 1 338

Brilliant solution! – Emigna – 2017-01-25T14:14:42.950

@Emigna - Thanks, the final version was after a bunch of failed golfs but I quite like it because with the error it prints ><> and fish :D – Teal pelican – 2017-01-25T15:32:52.983

Nice one ! Here's a 14 bytes version which only prints once and doesn't errors out : "-o-o-o;_!\ _! – Aaron – 2017-01-25T16:37:29.353

@Aaron if you check the edit the first version did that at 12. I do like how clean yours looks though :) – Teal pelican – 2017-01-26T17:28:17.963

I like your 12 bytes version (the 10 bytes too :)), I think you should have left it included to your answer as an aside ("for those who like a clean output,[...]") ! – Aaron – 2017-01-26T17:32:08.040

@Aaron - edited it back in as you're right, I'll keep it in mind for any futures golfs too :) – Teal pelican – 2017-01-27T09:16:16.933

9

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 

t77

Posted 2017-01-24T23:33:03.143

Reputation: 107

15This is output from compilation, rather than running the program. I don't know whether this is allowed by default. – CAD97 – 2017-01-25T06:16:37.833

2Also, if you chose a different file extension, it wouldn’t output "java" would it? (Not sure if that’s possible with java) – Jonas Schäfer – 2017-01-25T07:41:18.700

12if you change from java to java bytecode you could reduce by one character. trying to run empty class file will throw java.lang.ClassFormatError – user902383 – 2017-01-25T09:59:12.013

2

Programs outputting to stderr should be edited into this answer.

– mbomb007 – 2017-01-25T14:47:31.303

8

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.

darrylyeo

Posted 2017-01-24T23:33:03.143

Reputation: 6 214

8

C, 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.

12431234123412341234123

Posted 2017-01-24T23:33:03.143

Reputation: 305

............ :-D – Alfe – 2019-10-14T13:12:23.417

7

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

Digital Trauma

Posted 2017-01-24T23:33:03.143

Reputation: 64 644

1echo $0 should work – r3mainer – 2017-01-25T01:41:28.900

@squeamishossifrage That works at the shell command line, but in a script it will output the name of the script. – Digital Trauma – 2017-01-25T07:08:19.143

echo $SHELL isn't any better anyway. http://pastebin.com/BfsWjCni Regardless whether you run it from command line or script and whether you use shebang in that script or not. – manatwork – 2017-01-25T09:26:11.993

1x $0 works, assuming there's no executable called x on the path. In which case substitute any other letter, digit, or non-special character. – nigel222 – 2017-01-25T11:08:27.293

2'h' is illigal character for you, and you are using it in echo – user902383 – 2017-01-25T11:38:06.590

2$'ec\x68o' $0 cures that detail. – manatwork – 2017-01-25T12:02:09.597

Doh. Better printf $0. (Glad I not posted any solution today.) – manatwork – 2017-01-25T12:17:17.663

@manatwork Doh indeed. printf it is then. :) – Digital Trauma – 2017-01-25T15:44:17.863

You could just use print $0 . – ckjbgames – 2017-01-25T15:48:03.840

@ckjbgames I'm not familiar with that one. The print on my Ubuntu VM apparently does this "run-mailcap, view, see, edit, compose, print - execute programs via entries in the mailcap file". Output is Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE (.*?)}/ at /usr/bin/print line 528. Error: no "print" mailcap rules found for type "inode/directory" – Digital Trauma – 2017-01-25T16:43:09.873

@DigitalTrauma Must be getting my languages confused... – ckjbgames – 2017-01-25T17:51:13.917

@DigitalTrauma, Piotr Grochowski in his Bash tip also claims such print exists. At least on his Android.

– manatwork – 2017-01-25T18:37:30.497

.$0 should also work – 12431234123412341234123 – 2018-03-27T11:59:42.633

Any character which is not a command do work: 1-Byte solution: x. message: bash: x: command not found. Something like / will always work (there can not be a command called /) – 12431234123412341234123 – 2018-03-27T12:24:43.883

6

dc, 6

25699P

Outputs dc.

Try it online.

Digital Trauma

Posted 2017-01-24T23:33:03.143

Reputation: 64 644

6

C#, 60 67 bytes

class P{static void Main(){System.\u0043onsole.Write("\x43\x23");}}

Bob

Posted 2017-01-24T23:33:03.143

Reputation: 844

Is this actually your answer, or did a bug messed up your answer? – auhmaan – 2017-01-25T14:18:26.620

@auhmaan Sorry, fixed. I initially tested on LINQPad, and forgot it has a few default namespace imports.

– Bob – 2017-01-25T14:40:19.113

I was referring to the \u0043 and alikes – auhmaan – 2017-01-25T16:16:09.430

1@auhmaan That's intentional because I need Console but can't use C as per question rules. In C# you can use Unicode escape sequences in identifiers. – Bob – 2017-01-25T16:36:25.377

3I'm sure you can use an anonymous method for this, I can't see a restriction requiring a full program, so you could do _=>System.\u0043onsole.Write("\x43\x23"); – TheLethalCoder – 2017-01-26T16:29:18.600

'\x43' could be replaced with 'c' – NPSF3000 – 2017-01-28T15:25:06.150

@NPSF3000 Not really, it's officially written as C# with the capital C – Metoniem – 2017-02-09T10:57:48.867

@Metoniem read the rules "The output of the programming language name is not case sensitive." – NPSF3000 – 2017-02-09T15:30:18.450

6

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. ;^)

DLosc

Posted 2017-01-24T23:33:03.143

Reputation: 21 213

6

brainfuck, 105 Bytes

--[----->+<]>----.[--->+<]>----.+++[->+++<]>++.++++++++.+++++.--------.-[--->+<]>--.+[->+++<]>+.++++++++.

Try it online here

TrojanByAccident

Posted 2017-01-24T23:33:03.143

Reputation: 300

7Well, not a problem in BrainFuck ;) – devRicher – 2017-01-25T07:24:41.260

@devRicher not at all ;) – TrojanByAccident – 2017-01-25T07:29:49.320

@mbomb007 I see. – TrojanByAccident – 2017-01-25T20:31:49.970

@mbomb007 updated – TrojanByAccident – 2017-01-25T20:52:25.090

Is there any reason for the excessive --- in your markdown? – FlipTack – 2017-01-25T20:54:24.630

@FlipTack er, not particularly. – TrojanByAccident – 2017-01-25T21:01:51.123

6

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

Try it online!

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".

JosiahRyanW

Posted 2017-01-24T23:33:03.143

Reputation: 2 600

5

R, 11 bytes

cat("\x52")

Try it online!

Lyth

Posted 2017-01-24T23:33:03.143

Reputation: 781

version$l 9 bytes – djhurio – 2017-01-25T13:37:17.433

2Probably version is enough (7 bytes) – djhurio – 2017-01-25T13:39:25.040

1Or just 'r'. 3 bytes. – Konrad Rudolph – 2017-01-25T18:25:05.027

@KonradRudolph You can't use... wait; the specs are case sensitive in checking but not output... Clever. – wizzwizz4 – 2017-01-25T18:42:44.207

@wizzwizz4 Yeah … but I’ve since posted a solution that only needs one character, and even gets the case right.

– Konrad Rudolph – 2017-01-25T18:50:27.270

LETTERS[18] is also 11 :) – Punintended – 2018-03-26T23:43:07.620

@Punintended that contains R, unfortunately. – Giuseppe – 2018-03-28T17:55:03.930

@Giuseppe: Derp, you're right. In that case, depending on how the OP defines "junk output", you could argue a case for c. That outputs function (...) .Primitive("c"), which contains the r character – Punintended – 2018-03-28T18:06:11.183

@Punintended I'm sure that would be perfectly valid; Konrad Rudolph's answer is just T, which prints [1] TRUE of course. I also recently started an R chatroom in case you want to ever have a nice discussion about R golfing not in the comments section :)

– Giuseppe – 2018-03-28T18:40:02.113

5

BASIC (ZX Spectrum), 4 2 bytes

crossed out 4 is still regular 4

Saved 2 bytes thanks to @ShaunBebbers.

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.

Neil

Posted 2017-01-24T23:33:03.143

Reputation: 95 035

or 0 REM produces the same error – Shaun Bebbers – 2019-08-13T15:52:39.257

1@ShaunBebbers Does that even pass syntax checking? – Neil – 2019-08-13T19:13:20.473

yes it does on a real Spectrum. – Shaun Bebbers – 2019-08-13T20:36:18.060

5

Forth, 5 bytes

WORDS

Try it online

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.

mbomb007

Posted 2017-01-24T23:33:03.143

Reputation: 21 944

5

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).

Dane

Posted 2017-01-24T23:33:03.143

Reputation: 291

12 Bytes: a.. Prints the alphabet, which obviously includes 'J'. Definetly not as cool though :/ – Bolce Bussiere – 2018-03-26T16:47:06.063

Gotta golf it. :-) That said, I am attached to my original answer. – Dane – 2018-03-28T17:47:45.710

5

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<

Try it online!

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!

Sunny Pun

Posted 2017-01-24T23:33:03.143

Reputation: 821

4

Vim, 3 bytes

:h<CR>

Try it online!

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:

James

Posted 2017-01-24T23:33:03.143

Reputation: 54 537

4

C 24 20 Bytes (Clang 3.8.1)

Thanks to @squeamish ossifrage for helping me save 4 bytes.

main(){putchar(67);}

Wade Tyler

Posted 2017-01-24T23:33:03.143

Reputation: 261

How about putchar(67);? – r3mainer – 2017-01-25T01:36:38.800

@squeamishossifrage yep, thanks – Wade Tyler – 2017-01-25T01:40:26.747

Just curious, but wouldn't printf('c') also be valid? You're not allowed to use uppercase "C", but you are lowercase, and the result is case-insensitive. – Jocie – 2017-01-25T09:51:15.317

Sure sounds like it would, @jocie, but 67 is shorter than 'c' :-) – Cody Gray – 2017-01-25T10:34:42.347

and printf is shorter than putchar :-) – Jocie – 2017-01-25T10:51:23.097

1@Jocie printf needs a char * so I need to use "" – Wade Tyler – 2017-01-25T12:30:22.163

1if result is not case sensitive, then puts("c") saves a few bytes, and does not use uppercase C... Rules might need an edit then – Florian Castellane – 2017-01-26T15:16:30.697

4

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.

Frédéric

Posted 2017-01-24T23:33:03.143

Reputation: 2 059

3"The output of the programming language name is not case sensitive." So why not just "r"? Or depending on strict "You can have "junk output" before or after the name of the language." you could also just do T. – Billywob – 2017-01-25T11:00:13.120

2Following on @Billywob 's comment, all that is needed to output is an r or R, so another approach is to output to STDERR via a syntax error. ) outputs Error: unexpected ')' in ")", which contains an r. – rturnbull – 2017-01-25T11:56:59.137

@Billywob I agree to your comment, as well as rturnbull's. I wrote this answer quickly earlier and should have precised that, even though it makes the code and the answer futilely long, I find it funny to output all this junk just to make "R" appears. Moreover, it's the shortest way to my knowledge to write make R write its name on purpose. – Frédéric – 2017-01-25T17:36:33.823

4

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.

simbabque

Posted 2017-01-24T23:33:03.143

Reputation: 487

Technically, I think perl -v satisfies the constraints of the challenge, but this is much more interesting :) Although it makes assumptions that don't hold on all systems (e.g. $^X is /home/foo/.plenv/versions/5.16.3/bin/perl5.16.3 for me, but it could just as well be /home/foo/python if I were twisted like that). – ThisSuitIsBlackNot – 2017-01-25T23:22:41.003

@this not sure if that would be within the rules. They say pick a language and do stuff. But perl -v is not anything in Perl. So I think it doesn't count. But I do think there are easier ways. About the different systems, I think we can fix it with a bit more regex magic. – simbabque – 2017-01-25T23:36:05.293

There are a bunch of zero-byte solutions already that rely on default behavior (e.g. printing of version numbers). Nothing in the rules explicitly prohibits it. But it's definitely boring and feels "cheaty." – ThisSuitIsBlackNot – 2017-01-26T00:18:33.390

Looking at the rules again, you could actually just do the uber boring perl -E'say$^X'. – ThisSuitIsBlackNot – 2017-01-26T21:50:34.740

@this indeed. I thought it's case sensitive. I obviously had that first, but it's boring. – simbabque – 2017-01-26T22:14:50.983

I managed it in 22 bytes :)

– Zaid – 2017-01-29T17:32:43.583

2How about -E'say\$^X -v`'` ? That's indisputably a program. – hobbs – 2017-01-29T18:02:18.923

4

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.

Zaid

Posted 2017-01-24T23:33:03.143

Reputation: 1 015

That's awesome. – simbabque – 2017-01-30T08:08:11.177

I believe this updated 2-byte solution should qualify – Zaid – 2017-01-30T08:48:31.853

1This must be the shortest answer in Perl ever! – simbabque – 2017-01-30T08:49:26.263

@simbabque I'm trying to figure a way to get perl -x to spit out "No Perl script found in input"

– Zaid – 2017-01-30T09:13:30.043

perl -x . says Can't open perl script ".": Is a directory. But that's not a program. – simbabque – 2017-01-30T09:21:18.503

1@Zaid perl -x -e1 – ThisSuitIsBlackNot – 2017-01-30T15:16:33.767

(Although if you use that, you may want to add it to this answer, since it's not clear whether outputting to stderr is allowed.)

– ThisSuitIsBlackNot – 2017-01-30T15:51:31.877

@ThisSuitIsBlackNot all of my solutions in their present form are abusing STDERR. If that isn't allowed, the 18 byte solution is the best I can do with version strings: say+80.101.14.108 – Zaid – 2017-01-30T15:55:25.493

That one is pretty ingenious in itself. – ThisSuitIsBlackNot – 2017-01-30T16:03:22.863

3

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.

Arnauld

Posted 2017-01-24T23:33:03.143

Reputation: 111 334

Commandline php would be php -v, which is 6 :) – Martijn – 2017-01-26T15:31:22.560

@Martijn You're right. Thanks! Because we need php anyway, I wonder if it's not just 2 bytes for the -v flag... – Arnauld – 2017-01-26T15:39:07.290

You could skip the opening <?= and just print php, which in a webserver context would end up being rendered inside <body> in your browser; 3 bytes – Sleavely – 2019-11-18T14:19:15.790

3

Jelly, 4 bytes

“Ẏṃ»

Try it online!

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.

user62131

Posted 2017-01-24T23:33:03.143

Reputation:

Nitpick, but this outputs 'jelly' without a capital J. – steenbergh – 2017-01-30T13:18:57.467

2@steenbergh The output of the programming language name is not case sensitive. – Mego – 2017-01-31T19:47:24.743

@Mego Huh, my bad. Could've sworn that it was... – steenbergh – 2017-01-31T19:53:45.720

@steenbergh: this technique works to output a capital J just as well, but it's a byte longer. Because the question allows case-insensitive output, I had to exploit that to bring the byte count down. – None – 2017-02-01T00:16:49.393

3

Labyrinth, 31 28 bytes

76.65.66.89.82.73.78.84.72.@

Try it online!

Prints LABYRINTH.

Martin Ender

Posted 2017-01-24T23:33:03.143

Reputation: 184 808

3

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 ...

Gurupad Mamadapur

Posted 2017-01-24T23:33:03.143

Reputation: 1 791

3

Pyke, 1 byte

v

Try it here!

Outputs file path to stderr. Only guaranteed to work on online interpreter.

2 bytes

~f

Try it here!

Outputs every permutation of alphabetical characters

Blue

Posted 2017-01-24T23:33:03.143

Reputation: 26 661

The online interpreter times out before reaching pyke (on the second solution) :( – devRicher – 2017-01-25T11:02:22.760

@devRicher I'd be surprised if it didn't. That would use far too much memory in my browser to even display that many permutations (think about 450000 lines of output) – Blue – 2017-01-25T17:18:14.390

3

Brachylog, 1 byte

e

Try it online!

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.

Fatalize

Posted 2017-01-24T23:33:03.143

Reputation: 32 976

@mbomb007 Completely forgot about that, fixed. e does the exact same thing. Thanks. – Fatalize – 2017-01-25T14:57:29.633

3

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_@

Try it online!

The string "Befunge" has just been offset by 6 bytes to avoid using any of the characters in the name.

James Holderness

Posted 2017-01-24T23:33:03.143

Reputation: 8 298

3

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.

UTF-8

Posted 2017-01-24T23:33:03.143

Reputation: 153

3

COMMODORE 64 BASIC, 8 bytes

1sY64738

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.

Mark

Posted 2017-01-24T23:33:03.143

Reputation: 2 099

You don't require the line number here as you can execute any sys call in direct mode. – Shaun Bebbers – 2019-08-13T16:01:53.240

1@ShaunBebbers, the line number is what makes it a program rather than an immediate command. – Mark – 2019-08-13T21:38:33.963

Yes you are right; If it specifically says you need it in a program or as an executable in the rules then you require the line number; if not, you have saved one PETSCII character on your submission. – Shaun Bebbers – 2019-08-13T21:46:24.680

2

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.

Try it online!

Boring Cheaty Way

`rpROGn

Because the text output isn't case sensitive but the characters is...

ATaco

Posted 2017-01-24T23:33:03.143

Reputation: 7 898

14The Boring Cheaty Way isn't allowed because you're using R and r. – flornquake – 2017-01-25T16:17:50.120

2

Python 2, 25 bytes

exec"pri\156\164'pYTHON'"

Try it online!

Prints pYTHON. Uses octal codes for the banned characters n and t.

If functions are allowed, we can just do:

lambda:"pYTHON"

xnor

Posted 2017-01-24T23:33:03.143

Reputation: 115 687

2Very nice! Of course, I have bias towards my import this solution for the creativity factor, but you can take the shorter answer :P – Value Ink – 2017-01-25T00:44:35.970

@RaisingAgent Rule 4 says The output of the programming language name is not case sensitive. – None – 2017-01-25T15:12:09.107

2

Python 2, 15 bytes

exec"\150elp()"

Takes part of my Python 3 answer and @xnor answer to make this

user63571

Posted 2017-01-24T23:33:03.143

Reputation:

2

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.

Suever

Posted 2017-01-24T23:33:03.143

Reputation: 10 257

2

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....

Robert Columbia

Posted 2017-01-24T23:33:03.143

Reputation: 121

2

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 in it.

RaisingAgent

Posted 2017-01-24T23:33:03.143

Reputation: 131

Perhaps I'm missing something, but I only see the word bash in the command itself and not the output. I don't think that counts. – Digital Trauma – 2017-01-25T15:46:08.637

I'm pretty sure this is valid if you call it a REPL answer. When I run x from the REPL, I get the following output: DJ@DJ-PC:~$ x; bash: x: command not found; DJ@DJ-PC:~$; (Note that the semicolons are newlines) (Also note that I tested it on git-bash) – James – 2017-02-15T17:26:41.877

changed it completely now, the new version is reproducible – RaisingAgent – 2017-02-21T09:54:35.570

2

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
~
~
~
~
~
~

Noodle9

Posted 2017-01-24T23:33:03.143

Reputation: 2 776

2

><>, 8 bytes

f4*:2+oo

Try it online!

Prints the string >< repeatedly.

Emigna

Posted 2017-01-24T23:33:03.143

Reputation: 50 798

2

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

Try it online!

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.

Martin Ender

Posted 2017-01-24T23:33:03.143

Reputation: 184 808

2

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

Alex Howansky

Posted 2017-01-24T23:33:03.143

Reputation: 1 183

-i doesn't run a program. Not sure if this is valid – aross – 2017-01-30T09:38:17.980

3<shrug> If actually running a program is a requirement then all the answers which rely on a compile error are not valid as well. :) – Alex Howansky – 2017-01-30T15:09:51.683

2

Bash (+ coreutils), 8 3 bytes

env

Try it online!

Output is

  .
  .
  .
SHELL=/bin/bash
  .
  .
  .

Mitchell Spector

Posted 2017-01-24T23:33:03.143

Reputation: 3 392

Note that on Unix this is your login shell, not the running shell. So bash may not be listed. – Jakob – 2018-03-25T04:47:52.130

2

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).

ThisSuitIsBlackNot

Posted 2017-01-24T23:33:03.143

Reputation: 1 050

say%:: is good enough to meet the specs :) – Zaid – 2017-01-29T20:45:37.830

@Zaid I see you were reading my comments on simbabque's answer :) But what a stupid rule that is...filtering out extra output makes the challenge much more fun. – ThisSuitIsBlackNot – 2017-01-30T15:19:10.597

2

chicken (not scheme), 1 byte

The language name might also be chicken chicken, see here

a

outputs:

Error on line 1: expected 'chicken'

hcorion

Posted 2017-01-24T23:33:03.143

Reputation: 143

Downvoter please explain. This seems perfectly valid to me – aross – 2017-01-30T09:46:55.720

2

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.

Nelz

Posted 2017-01-24T23:33:03.143

Reputation: 321

2

Python 2, 44 bytes

exec('pRINt'.upper().swapcase()+' "pYTHON"')

Try it online!

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.

Comrade SparklePony

Posted 2017-01-24T23:33:03.143

Reputation: 5 784

38 bytes – Jo King – 2018-03-25T01:20:21.407

2

KoopaScript, 0 bytes (non-competing?)

When opening the online interpreter, this is printed to STDout:

KS_Main_(version) installed
Loading script ksscripts/init.kss...
Command executed: "ldsr,ksscripts/init"
Executing command 0: set KoopaShell.input._visible %btrue...

because it loads an init script by default. The user doesn't input this, it's literally the interpreter. However, because a program is running, I don't feel that it counts.

Though, KoopaScript is shortened to KS by me for basically everything, so the 'KS' printed right at the start no matter whether the init script is loaded is technically the language name...

Jhynjhiruu Rekrap

Posted 2017-01-24T23:33:03.143

Reputation: 61

Noncompeting isn't necessary. :) – moonheart08 – 2018-03-27T13:12:24.660

2

><>, 9 bytes

"-o_!\ _!

Try it online!

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! !

Try it online!

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`

Jo King

Posted 2017-01-24T23:33:03.143

Reputation: 38 234

2

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'
  • try it online

  • not like this! echo "\x7a\x73\x68", as Gamma pointed out

roblogic

Posted 2017-01-24T23:33:03.143

Reputation: 554

NB: csh and tcsh don't do this STDERR trick.. – roblogic – 2019-08-12T04:58:55.177

1You can't use echo, "h" is in zsh. <<<$'\x7a\x73\x68' works for -1 byte though. – GammaFunction – 2019-08-13T03:27:12.860

The challenge popped up again on active, so hi again. zsh and bash can use $'\x73'et for stdout. – GammaFunction – 2019-10-02T18:29:33.153

2

MathGolf, 10 bytes

ÿ∙╤Æⁿ½]$╦y

Try it online!

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.

maxb

Posted 2017-01-24T23:33:03.143

Reputation: 5 754

More boring 10 bytes alternative (using MathGolf's strength of implicitly joining and printing the stack) which would be 2 bytes shorter once we can remove the $s. :)

– Kevin Cruijssen – 2019-08-12T09:42:28.163

@KevinCruijssen Haha, of course... didn't even think to test the simpler method. Nice catch. I still have to check how dictionary fetching using strings should work when mapped to lists, but once I have verified that there should be a new version coming to TIO. – maxb – 2019-08-12T09:47:48.807

2

05AB1E, 7 bytes

•₄)í•hÁ

Try it online.

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.

Kevin Cruijssen

Posted 2017-01-24T23:33:03.143

Reputation: 67 575

2

Go, 0 bytes

Try it online!

Output: package main: code.go:1:1: expected 'package', found 'EOF'

Rajan Kumar

Posted 2017-01-24T23:33:03.143

Reputation: 71

2

Whitespace, 94 bytes

   
  		 
  		  
   	 		
   			 
   
   				
   	  
   		
  				 

  
   		  	 	
	   	
  
 



Try it online!

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

Dorian

Posted 2017-01-24T23:33:03.143

Reputation: 1 521

1

CJam, 8 6 bytes

"cjAM"

Try it online!

Old version

"BI`l":)

Try it online!

"BI`l"    e# Push this string
:)        e# Add 1 to the code point of each char. Implicitly display

Luis Mendo

Posted 2017-01-24T23:33:03.143

Reputation: 87 464

1

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.

steenbergh

Posted 2017-01-24T23:33:03.143

Reputation: 7 772

1

Ruby, 3 bytes

p$:

Try it online!

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.

G B

Posted 2017-01-24T23:33:03.143

Reputation: 11 099

I had this thought too, but I was wondering if it was too platform dependent. Granted any standard installation should work, but I could create a platform that wouldn't. – Alexis Andersen – 2017-01-25T20:25:15.617

1

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

cookie

Posted 2017-01-24T23:33:03.143

Reputation: 271

1

05AB1E, 11 bytes

¾4>'§ÅX69çJ

Try it online!

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

Emigna

Posted 2017-01-24T23:33:03.143

Reputation: 50 798

1

Chicken, 1 byte

g

This could be pretty much any character and it would be the same.

Outputs Error on line 1: expected 'chicken'.

Try it here.

Business Cat

Posted 2017-01-24T23:33:03.143

Reputation: 8 927

1

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

Credit where credit is due.

Mr.Burns

Posted 2017-01-24T23:33:03.143

Reputation: 101

Welcome to PPCG! For further reference, you don't need to CW-ify an answer if you didn't make it. Simply linking to the source works. Also, you should probably post the plain VBA answer separately. – Rɪᴋᴇʀ – 2017-01-25T16:13:10.403

@EasterlyIrk Ok, I didn't know if it was necessary or not to CW an answer but I wouldn't feel right if I didnt .. the plain VBA answer I will leave, I made that within the first minute of reading the question and found it uninteresting – Mr.Burns – 2017-01-25T16:18:36.873

1

C++, 84 44 bytes

#import<stdio.h>
main(){puts("\103\53\53");}

Thanks to @Clearer for saving a lot of bytes.

Steadybox

Posted 2017-01-24T23:33:03.143

Reputation: 15 798

This isn't a valid C++ program. Try this instead: #include<cstdio> int main(){char c[]={67,43,43,0};printf(c);} It's shorter and correct C++. – Clearer – 2017-02-14T01:51:58.747

@Clearer Yes, that's what I would have done, but like I said, I wanted to completely avoid using the character c, upper or lower case. As this does compile on the MinGW compiler I'm using, and I don't think there is any undefined behaviour, it is valid at least on one implementation. (Which is enough for code golf) – Steadybox – 2017-02-14T14:46:05.470

It's not valid just because it compiles on a particular compiler. You're lacking the return type of your main function, which is the only thing that's a problem -- it is a valid C program though. You can shave off a byte by writing uint8_t l[] =..., instead of uint8_t l[4]=... – Clearer – 2017-02-15T12:24:33.010

#include<stdio.h> int main(){puts("\103\53\53");} only has the problem that it depends on being able to print ASCII compatible text. It's just 50 bytes long. If you allow c in the program, you can shave it to 49 and be equal to the Java 8 version but include a newline in the output :-) – Clearer – 2017-02-15T12:43:30.980

Thanks for the shorter version. I'm still omitting the return type of main, since that is allowed by certain compilers, and in code golf, languages are defined by their implementation: http://meta.codegolf.stackexchange.com/questions/7832/whats-the-policy-on-interpreter-bugs/7833#7833

– Steadybox – 2017-02-20T11:56:54.133

1

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.

user18932

Posted 2017-01-24T23:33:03.143

Reputation:

1You can change println to print – FlipTack – 2017-01-25T18:15:36.123

1@FlipTack I have had problems in previous challenges with flushing of stdout, where a program will print nothing and exit. I will take the two byte hit to the score for a guarantee that the program will actually output something. – None – 2017-01-25T18:16:34.440

print seems to work fine for me, but nvm – FlipTack – 2017-01-25T18:33:45.013

Since you're just printing a String you can use octal escapes instead of unicode escapes. Saves 8 bytes. System.out.println("\112\141\166\141"); – Poke – 2017-06-29T21:03:09.897

1

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.

Alexander - Reinstate Monica

Posted 2017-01-24T23:33:03.143

Reputation: 481

Isn't S in both Swift and Set? – boboquack – 2017-01-26T02:26:24.463

@boboquack Whoooops. I'll have to find another generic type with a short name – Alexander - Reinstate Monica – 2017-01-26T02:27:38.050

1

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.

Proof of the output, Juggle's on the linked Github.

Zavada

Posted 2017-01-24T23:33:03.143

Reputation: 189

1

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.

Nacht - Reinstate Monica

Posted 2017-01-24T23:33:03.143

Reputation: 481

1

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

Thriller

Posted 2017-01-24T23:33:03.143

Reputation: 91

1

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

2xsaiko

Posted 2017-01-24T23:33:03.143

Reputation: 699

1

Quetzalcoatl, 0 + 1 for -n flag = 1 byte

<no code>

NoOneIsHere

Posted 2017-01-24T23:33:03.143

Reputation: 1 916

1

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'

RenderSettings

Posted 2017-01-24T23:33:03.143

Reputation: 620

1

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")

Taylor Scott

Posted 2017-01-24T23:33:03.143

Reputation: 6 709

1

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.

aross

Posted 2017-01-24T23:33:03.143

Reputation: 1 583

1

dc, 6 bytes

A0P99P

Prints the ASCII values 100 and 99, i.e. dc.

daniero

Posted 2017-01-24T23:33:03.143

Reputation: 17 193

1

,,,, 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                []

totallyhuman

Posted 2017-01-24T23:33:03.143

Reputation: 15 378

1

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+"

streetster

Posted 2017-01-24T23:33:03.143

Reputation: 3 635

1

Noether, 15 bytes

"n"UP"OETHER"_P

Try it here!

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

Beta Decay

Posted 2017-01-24T23:33:03.143

Reputation: 21 478

1

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'.

Uriel

Posted 2017-01-24T23:33:03.143

Reputation: 11 708

1

Ly, 10 bytes

(76)(89)&o

Pretty easy with Ly, due to the short name and little use of letters.

Outputs:

LY

Try it online!

LyricLy

Posted 2017-01-24T23:33:03.143

Reputation: 3 313

1

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.

12Me21

Posted 2017-01-24T23:33:03.143

Reputation: 6 110

1

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...

BlackCap

Posted 2017-01-24T23:33:03.143

Reputation: 3 576

1

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]);

famous1622

Posted 2017-01-24T23:33:03.143

Reputation: 451

What is eb? I'm using Firefox and it doesn't seem to exist. – 12Me21 – 2018-11-24T15:39:06.300

1

brainfuck, 79 bytes

-[>++>++>++<<<-----]>----.>++++++++++++.<-.>>+++.+++++.<<+++++.>+++.<---.>>---.

Try it online!

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

X1M4L

Posted 2017-01-24T23:33:03.143

Reputation: 1 586

1

Very good simple answer, using a relatively short yet easy to understand algorithm. I believe you can save two bytes by using ABCF IKN RU instead: Try it online!

– ETHproductions – 2018-03-26T03:00:00.167

1

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;

Try it online!

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).

LambdaBeta

Posted 2017-01-24T23:33:03.143

Reputation: 2 499

1

Stax, 2 bytes

V?

Run and debug it

Outputs version info.

Weijun Zhou

Posted 2017-01-24T23:33:03.143

Reputation: 3 396

1

Ruby, Not 31 but 28 bytes

p'Qtax'.chars.map(&:next)*""

Thanks @iamnotmaynard for the improvements

Try it online!

AJFaraday

Posted 2017-01-24T23:33:03.143

Reputation: 10 466

I noted that it does, I'm just trying out the older version of ruby, to see if I can get a solution which doesn't. It's not going well. – AJFaraday – 2018-03-27T09:33:33.283

Maybe .chars instead of .bytes? p 'Qtax'.chars.map{|x|x.next}.join – manatwork – 2018-03-27T09:36:15.223

@manatwork I'm afraid not. String#chars returns an array of strings, each one of which is 1 character long. 'R' + 1 returns TypeError: no implicit conversion of Fixnum into String – AJFaraday – 2018-03-27T09:37:35.020

That is why I used .next. (Same as .succ, but that is forbidden because “u”.) Or shorter: p'Qtax'.chars.map(&:next)*'' – manatwork – 2018-03-27T09:39:15.907

@manatwork AAARRRGGGHHH! I forgot about succ. That's so much better! Thanks! :@) – AJFaraday – 2018-03-27T09:40:20.057

@manatwork And then there's a u... Ugh! – AJFaraday – 2018-03-27T09:41:42.753

Gimme de succ – qwr – 2018-03-27T15:50:50.130

*"" saves 2 over .join – Reinstate Monica -- notmaynard – 2018-03-27T21:54:36.057

and %w{Q t a x} saves 1 over 'Qtax'.chars (though then it needs a space after p, so I guess it's a wash) – Reinstate Monica -- notmaynard – 2018-03-27T21:55:59.590

1

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.

qwr

Posted 2017-01-24T23:33:03.143

Reputation: 8 929

1

@, 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: -

user85052

Posted 2017-01-24T23:33:03.143

Reputation:

1

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

TIO

user85052

Posted 2017-01-24T23:33:03.143

Reputation:

1

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:

  • putchar is not allowed (contains c). Then puts is used.

Esc Điệp

Posted 2017-01-24T23:33:03.143

Reputation: 121

1

Linux, Unix Shell (sh/bash...) (6 bytes)

find /

Esc Điệp

Posted 2017-01-24T23:33:03.143

Reputation: 121

1

MarioLANG, 212 bytes

+>+>+>+>+>->->-
+"+"+"+"+"-"-"-
+++++++++-----.
+++++++.+-.-.-
+++++++-+-+-+-
+++++++-+-+-+-
+++++++-+-+-+-
+++++++-+-+-+.
++++++.-+.+-++
++++++--+++-++
++++++--++..++
++++++--++--++
+!+!+!-!+!-!+!
=#=#=#=#=#=#=#

Try it online!

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.

CoedRhyfelwr

Posted 2017-01-24T23:33:03.143

Reputation: 272

1

Rail, 35 bytes

$ 'main'
 -[q]?3c(!!)2co\
  #oc1?n(!!)oc5?-&

Try it online!

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 type
  • 3: 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 turn
  • n: 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.

IMP1

Posted 2017-01-24T23:33:03.143

Reputation: 510

1

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

user85052

Posted 2017-01-24T23:33:03.143

Reputation:

0

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

Value Ink

Posted 2017-01-24T23:33:03.143

Reputation: 10 608

As all kind of garbage is accepted around the name: p:rUBY. – manatwork – 2017-01-25T14:54:26.100

0

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())

Arnauld

Posted 2017-01-24T23:33:03.143

Reputation: 111 334

@ETHproductions This turns out to be more complicated than I expected. Here is a fixed (but weak) version. – Arnauld – 2017-01-25T00:27:04.863

Huh, none of the hex values contain a letter, except for J. Perhaps that could be useful in some way (though I highly doubt it...) – ETHproductions – 2017-01-25T00:30:39.493

Abuse case-insensitive requirements for output to print jAVAsCRIPT? – Value Ink – 2017-01-25T00:48:13.103

@ValueInk I supposed I could do that but I actually wish this rule didn't exist. It kinda ruins the game. – Arnauld – 2017-01-25T01:03:03.293

2How about just _=>'\x45\x53'+(5+1)? It is technically ECMAScript6 – Flambino – 2017-01-25T01:20:35.167

@Arnauld ok then, good job, carry on. – Mindwin – 2017-01-25T12:16:57.043

0

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.

user2428118

Posted 2017-01-24T23:33:03.143

Reputation: 2 000

5Your code is invalid, it contains t & a – TrojanByAccident – 2017-01-25T01:31:44.917

@TrojanByAccident I deleted the invalid solution. – user2428118 – 2017-01-25T12:56:35.137

3Isn't this still invalid as the code contains both A and t which are found in ECMAScript? – Emigna – 2017-01-25T14:03:20.517

1and the c in EMCAScript – TrojanByAccident – 2017-01-25T20:33:07.893

2@Emigna Apologies, I seem to keep overlooking those invalid characters. Case in point: I just wasted another 45 minutes on a solution that turned out to be invalid... So for now I'll just go for the boring-but-valid solution. – user2428118 – 2017-01-26T15:17:09.253

1@TrojanByAccident The console.log fragment was not part of the solution, I just put it there so you could see the output using the Stack Snippet. Anyway, I updated my submission. After writing a new solution that turned out to be also invalid, with the valid (but boring) solution above. – user2428118 – 2017-01-26T15:18:49.343

0

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$

Ash

Posted 2017-01-24T23:33:03.143

Reputation: 101

You can't use P, A, S, C, A or L in your source code. – Clearer – 2017-02-14T01:49:14.573

0

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).

nigel222

Posted 2017-01-24T23:33:03.143

Reputation: 109

1I think you have to mark this as "Python (REPL)", because we've decided that a REPL is a different language from the language itself. Apart from that, though, I don't see why it wouldn't work; "REPL" is not part of the language's name. – None – 2017-01-25T13:51:18.327

You're not allowed to use the characters contained in the language's name. – mbomb007 – 2017-01-25T14:56:20.370

x or xyzzy don't use characters contained in the languages name. I thought a little explanation was in order. Maybe cheating though, in that the python interpreter prints its own name by default. – nigel222 – 2017-01-25T15:33:38.563

This is what I considered to submit, but decided for something else. IMHO this is valid, because invoking the programming language itself does not mean you are using the name as part of the code - (almost) any other answer needs to call the interpreter or compiler anyway if you want to actually run the program! – Radovan Garabík – 2017-01-25T16:01:12.683

0

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

corvus_192

Posted 2017-01-24T23:33:03.143

Reputation: 1 889

0

Del|m|t, 25 bytes

TIO

= : 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

MildlyMilquetoast

Posted 2017-01-24T23:33:03.143

Reputation: 2 907

0

Brainelly, 36 bytes

ƑA$ƒṃƁẸḷ-ṚżƁẸH/ƑKƁƊṄ$Ƒ9$⁾ṃmṚỤ$Ƒ7EṢṘ{

Original Brainfuck code:

++++[++++>---<]>-.---[----->+<]>-.+++[->+++<]>++.++++++++.+++++.---------.+++++++..-[--->+<]>.

With a no-op inserted to avoid the character restriction:

++++[++++>---<]>-.---[----->+<]>-.+++[->++++-<]>++.++++++++.+++++.---------.+++++++..-[--->+<]>.

Julian Lachniet

Posted 2017-01-24T23:33:03.143

Reputation: 3 216

0

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'

Conor O'Brien

Posted 2017-01-24T23:33:03.143

Reputation: 36 228

0

8th, 4 bytes

.ver

Output is as follows:

8th 16.14 WIN64 Free (6362ab32) custid: ########

I blanked my custid with ########

Chaos Manor

Posted 2017-01-24T23:33:03.143

Reputation: 521

0

JavaScript (REPL), 42 bytes

'\x6a\x61\x76\x61\x73\x63\x72\x69\x70\x74'

ioseph

Posted 2017-01-24T23:33:03.143

Reputation: 101

0

JAVA, 21 byte

throw new Exception();

print

Exception in thread "main" java.lang.Exception

Full program :

public class OutputProgrammingLanguageName {

  public static void main(String[] args)throws Exception {
    throw new Exception();
  }
}

Walfrat

Posted 2017-01-24T23:33:03.143

Reputation: 117

1This isn't a complete program or function. – Pavel – 2017-01-27T18:26:19.010

Also the complete program contains a and v – Metoniem – 2017-02-21T10:34:20.413

@Metoniem then that would means it's impossible in java since you always have main – Walfrat – 2017-02-21T11:40:51.627

0

Pyth 8 bytes

r"pYTH"2

Try it online

Nick the coder

Posted 2017-01-24T23:33:03.143

Reputation: 96

0

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.

Neil

Posted 2017-01-24T23:33:03.143

Reputation: 95 035

0

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

Matthew Roh

Posted 2017-01-24T23:33:03.143

Reputation: 5 043

Good use of gcc arguing when theres absolutely nothing. – Matthew Roh – 2017-02-05T14:45:25.060

0

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

idrougge

Posted 2017-01-24T23:33:03.143

Reputation: 641

0

Erlang, 0 bytes

As many other languages, starting the interactive interpreter shows the language name and version.

G B

Posted 2017-01-24T23:33:03.143

Reputation: 11 099

0

Rexx (Regina), 32 bytes

say d2c(82)d2c(69)d2c(88)d2c(88)

Try it online!

theblitz

Posted 2017-01-24T23:33:03.143

Reputation: 1 201

0

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.

cp.fe.cp

Posted 2017-01-24T23:33:03.143

Reputation: 141

You can use TeX's ^^ replacing mechanism to insert characters without explicitly typing them (see full explanation here). This leads to \^^54^^%^^58\^^%nd as the shortest full TeX document solution, IMO.

– siracusa – 2018-03-27T10:16:36.680

0

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

Goysa

Posted 2017-01-24T23:33:03.143

Reputation: 91

2i is a part of Julia. you can't use it in your answer. – Uriel – 2017-07-27T19:14:04.340

0

Bean, 8 bytes

xxd-style hexdump

00000000: 2381 00e2 e5e1 ee20                      #..âåáî 

Try it online!

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)

Patrick Roberts

Posted 2017-01-24T23:33:03.143

Reputation: 2 475

0

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.

eaglgenes101

Posted 2017-01-24T23:33:03.143

Reputation: 577

0

Perl 5, 1 bytes

Includes +1 for -v

Try it online!

(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

Try it online!

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"

Try it online!

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

Try it online!

This one clean but long

Ton Hospel

Posted 2017-01-24T23:33:03.143

Reputation: 14 114

0

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.

TheOnlyMrCat

Posted 2017-01-24T23:33:03.143

Reputation: 1 079

0

jq, 1 byte

a

Output:

jq: error: a/0 is not defined at <top-level>, line 1:
a
jq: 1 compile error

nyuszika7h

Posted 2017-01-24T23:33:03.143

Reputation: 1 624

0

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

Try it online!

Little surprised I didn't see this here already.

ouflak

Posted 2017-01-24T23:33:03.143

Reputation: 925

0

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:

ǨƐƓ

Try it online!

Prints:

keg

A 6 byte answer:

L;f;h;

Try it online!

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.

Lyxal

Posted 2017-01-24T23:33:03.143

Reputation: 5 253