57
\$\begingroup\$

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.

\$\endgroup\$
15
  • 8
    \$\begingroup\$ The 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. \$\endgroup\$ Commented Jan 24, 2017 at 23:47
  • 9
    \$\begingroup\$ Obligatory "Just having your code be blank but have a flag like --version isn't allowed"? \$\endgroup\$
    – Value Ink
    Commented Jan 25, 2017 at 0:00
  • 106
    \$\begingroup\$ Have case-insensitive output while banning the language name case-sensitively allows boring solutions that just output the language name case-swapped. \$\endgroup\$
    – xnor
    Commented Jan 25, 2017 at 0:47
  • 20
    \$\begingroup\$ You 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 \$\endgroup\$
    – Lynob
    Commented Jan 26, 2017 at 8:23
  • 3
    \$\begingroup\$ This 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. \$\endgroup\$
    – Bill K
    Commented Jan 26, 2017 at 18:30

169 Answers 169

1 2 3 4 5
6
0
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ 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. \$\endgroup\$
    – siracusa
    Commented Mar 27, 2018 at 10:16
0
\$\begingroup\$

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

\$\endgroup\$
1
  • 3
    \$\begingroup\$ i is a part of Julia. you can't use it in your answer. \$\endgroup\$
    – Uriel
    Commented Jul 27, 2017 at 19:14
0
\$\begingroup\$

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)

\$\endgroup\$
0
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$

Rockstar, 8 bytes

Probably the only time Rockstar will ever come close to being competitive!

rOCKSTAR

Try it here (Code will need to be pasted in)

\$\endgroup\$
0
\$\begingroup\$

CSASM v2.1.2.3, 108 19 bytes

func main:
abs
ret
end

The abs instruction throws the following error if no values were on the stack:

StackException thrown in compiled code:
   Stack underflow detected. Cannot pop more objects from the stack.
   at CSASM.Core.CSASMStack.Pop()
   at CSASM.Core.Ops.func_abs()

Any of the 3-character instructions that pop a value from the stack would also work for this answer.

\$\endgroup\$
0
\$\begingroup\$

Branch, 21 bytes

66.114.97.110.99.104.

Try it on the online Branch interpreter!

Not the most exciting answer. An answer with no numbers though:

Branch, 74 bytes

/^\^'/;c;^+/;c;^'/;c;^*N/;^*}}./;c;^+/;cn^-{{.O/;cn^-{./o{{{{.^}}./{{{{{{.

Try it on the online Branch interpreter!

\$\endgroup\$
0
\$\begingroup\$

x86 machinde code - 12 bytes

Borrowed code from qwr's answer.

 8048054:   b8 1a dd 2c 11          mov    eax,0x112cdd1a
 8048059:   2d de c0 11 11          sub    eax,0x1111c0de
 804805e:   d1 e0                   shl    eax,1
\$\endgroup\$
0
\$\begingroup\$

A0A0, 15 bytes

P65
P48
P65
P48

P prints the character corresponding to the ASCII value next to it. Luckily for me, none of the ASCII values needed have a zero in them. If the requirement of not containing the characters of your language wasn't there, this could be improved by two bytes by swapping out the P48 for O0 which prints the numeric value after it, so zero.

One column is the most optimal layout for this text. Two columns would add 2 bytes to the total.

\$\endgroup\$
0
\$\begingroup\$

JSFuck (JScrewIt Firefox), 1053 bytes

(+(!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+[+[]]+(+!![])+(!![]+!![]+!![])+(+!![])+(!![]+!![]+!![]+!![]+!![])+(+!![])+(!![]+!![]+!![])+(!![]+!![])))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[+[]]]+([]+[])[([]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[+[]]]+(!![]+[])[+!![]]][([][[]]+[])[+!![]]+(![]+[])[+!![]]+([]+(+[])[([]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[+[]]]+(!![]+[])[+!![]]])[+!![]+[+!![]]]+(!![]+[])[!![]+!![]+!![]]]](!![]+!![]+!![]+[!![]+!![]+!![]+!![]])

Try it online!

Requires Firefox nightly for Array.prototype.at, or you can use the following polyfill on any browser:

Array.prototype.at = { constructor: Function.prototype.constructor, toString: () => "function at() {\n    [native code]\n}" };
\$\endgroup\$
0
\$\begingroup\$

Jelly, 1 byte

`

Try it online! This just throws an error that outputs

Traceback (most recent call last):
  File "/usr/local/bin/jelly", line 74, in <module>
    raise SystemExit(main(code, args, end))
  File "/usr/local/lib/python3.7/site-packages/jelly/__init__.py", line 10, in main
    output(jelly_eval(code, args[:2]), end)
  File "/usr/local/lib/python3.7/site-packages/jelly/interpreter.py", line 422, in jelly_eval
    return variadic_chain(parse_code(code)[-1] if code else '', arguments)
  File "/usr/local/lib/python3.7/site-packages/jelly/interpreter.py", line 1247, in variadic_chain
    return niladic_chain(chain)
  File "/usr/local/lib/python3.7/site-packages/jelly/interpreter.py", line 683, in niladic_chain
    return monadic_chain(chain, 0)
  File "/usr/local/lib/python3.7/site-packages/jelly/interpreter.py", line 622, in monadic_chain
    ret = monadic_link(chain[0], ret)
  File "/usr/local/lib/python3.7/site-packages/jelly/interpreter.py", line 637, in monadic_link
    return link.call(arg)
  File "/usr/local/lib/python3.7/site-packages/jelly/interpreter.py", line 2988, in <lambda>
    call = lambda z: dyadic_link(links[0], (z, z))
IndexError: list index out of range

Real time: 0.080 s
User time: 0.063 s
Sys. time: 0.014 s
CPU share: 96.62 %
Exit code: 1

The name of the language, jelly, being contained in the second line of the error.

\$\endgroup\$
0
\$\begingroup\$

PICO-8, 22 bytes

?"\112\73\67\79\45\56"

Outputs "Pico-8"; I feel that this should be fine, as it is acknowledged as an alternative in the PICO-8 FAQ:

How should the name be written and pronounced?

The preferred style is all caps with a dash: PICO-8. If you feel like you're shouting in the middle of a sentence, Pico-8 or pico-8 is also fine.

And here's the all-caps version (24 bytes), if needed:

?"\112\105\99\111\45\56"

Fun fact: I didn't realize that ?, escape characters, or lowercase letters were useable going into this, and due to just how much the restriction limited my options, I had to resort to modifying the memory directly in order to produce the same result as cls() print("PICO-8"). That ended up looking like this:

memset(24576,0,0x2000)
b=0x66
l=0x06
r=0x60

//line 1
memset(0x6000,b,1)
memset(0x6001,l,7)
memset(0x6002,b,1) // +8
memset(0x6004,r,1) // +8
memset(0x6006,r,1) // +8
memset(0x600a,b,1) // +8
memset(0x600b,l,1) // +8

//line 2
memset(0x6040,l,2)
memset(0x6042,r,1)
memset(0x6044,l,1)
memset(0x6046,l,2)
memset(0x604a,l,2)

//line 3
memset(0x6080,b,1) //8
memset(0x6081,l,1)
memset(0x6082,r,1)
memset(0x6084,l,1) // 8+8
memset(0x6086,l,2)
memset(0x6088,b,1)
memset(0x6089,l,1)
memset(0x608a,b,1)
memset(0x608b,l,1)

//line 4
memset(0x60c0,l,1) //c+8
memset(0x60c2,r,1)
memset(0x60c4,l,1)
memset(0x60c6,l,2)
memset(0x60ca,l,2) //c+8

//line 5
memset(0x6100,l,1)
memset(0x6102,b,5)
memset(0x6103,l,3)
memset(0x6104,r,1)
memset(0x610a,b,1)
memset(0x610b,l,1)

A compliant/golfed version of this would be ~500 bytes.

\$\endgroup\$
0
\$\begingroup\$

Fortran (GFortran), 52 bytes

Since Fortran is case insensitive and the case of the output doesn't matter we can abuse this and just code the program in sArCaSm CaSE.

pROgRAm fORTRAN
pRiNT*,"fORTRAN"
eNd pROgRAm fORTRAN

Try it online!

\$\endgroup\$
0
\$\begingroup\$

Go, 54 bytes, prints to STDERR

Prints GO.

package main
func main(){print(string([]rune{71,79}))}

Attempt This Online!

Go, 67 bytes, prints to STDOUT

Also prints GO.

package main
import."fmt"
func main(){Print(string([]rune{71,79}))}

Attempt This Online!

\$\endgroup\$
0
\$\begingroup\$

Aheui (esotope), 61 bytes

받바밢타밝밤밝밝따붒
밦밦받따땨히파타먛타

Try it online!

Prints "Aheui".

>>>>>>>>>v
.........>  Push 3, -9 (0 - 9), 7, 4, 43 (7 * 7 - 6) to the stack

>>>>».>>».  Loop: Push 108 (6 * 6 * 3), swap, subtract, print as char

.....X<...  On swap, movement is reversed if not enough items on the stack;
            go to halt instruction

Aheui (esotope), 87 bytes

받발따빠따빠따빠발발발따따타맣밝밣밢밢따따따다밦타밝타맣히

Try it online!

Prints "아희", the original Korean name of this language.

>>>>>>>......................  Push 15^4=50625
       >                       Dup
        >>>>>>>                Subtract 5^3=125 and print 50500 as char (아)
               >>>>>>>>        Add 7*8*9*9=4536 to 50625 = 55161
                       >>>>>X  Subtract 6 and 7 and print 55148 as char (희)
\$\endgroup\$
0
\$\begingroup\$

Thunno, \$ 10 \log_{256}(96) \approx \$ 8.23 bytes

"tHUNNO"zV

Attempt This Online!

"tHUNNO"    # Push the string "tHUNNO"
        zV  # Convert to title case
            # Implicit output
\$\endgroup\$
0
\$\begingroup\$

GolfScript, 18 12 bytes

I skipped over the "case insensitive" part of the challenge description initially.

"gOLFsCRIPT"

Try it online!

\$\endgroup\$
0
\$\begingroup\$

JSFuck, 6369 bytes

[][((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]]((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+([]+ +([]+[][+[]]))[(+!+[])]+((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]]((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))][([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]](([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[+[]]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+![])[(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])])()[([]+![])[(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]](([]+{})[(+!+[])+(+!+[])+(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+![])[+[]]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]]((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])))

Explanation

_0 = +[];
_1 = +!_0;
_2 = _1 + _1;
_4 = _2 + _2;
_8 = _4 + _4;
_16 = _8 + _8;
_32 = _16 + _16;
_35 = _32 + _2 + _1;

_objectObject = [] + {}; // Here [object Object]
_undefined = [] + [][_0];
_NaN = [] + +_undefined;
_false = [] + ![];
_true = [] + !![];

a = _NaN[_1];
c = _objectObject[_4 + _1];
e = _undefined[_2 + _1];
f = _false[_0];
i = _undefined[_4 + _1];
j = _objectObject[_2 + _1];
l = _false[_2];
n = _undefined[_1];
o = _objectObject[_1];
r = _true[_1];
s = _false[_2 + _1];
t = _objectObject[_4 + _2];
u = _undefined[_0];

_space = _objectObject[_4 + _2 + _1];
_functionString = [] + ([]+[])[c+o+n+s+t+r+u+c+t+o+r];

S = _functionString[_8 + _1];
g = _functionString[_8 + _4 + _2];

h = (_16 + _1)[t+o+S+t+r+i+n+g](_35);
k = (_16 + _4)[t+o+S+t+r+i+n+g](_35);
m = (_16 + _4 + _2)[t+o+S+t+r+i+n+g](_35);
p = (_16 + _8 + _1)[t+o+S+t+r+i+n+g](_35);

[][m+a+p][c+o+n+s+t+r+u+c+t+o+r](r+e+t+u+r+n+_space+c+o+n+s+o+l+e)()[l+o+g](j+s+f+u+c+k)

Try it:

[][((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]]((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+([]+ +([]+[][+[]]))[(+!+[])]+((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]]((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))][([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]](([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[+[]]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+![])[(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])])()[([]+![])[(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]](([]+{})[(+!+[])+(+!+[])+(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+![])[+[]]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+[][+[]])[(+!+[])]+([]+([]+[])[([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+[][+[]])[(+!+[])]+([]+![])[(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+!![])[(+!+[])]+([]+[][+[]])[+[]]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]+([]+{})[(+!+[])]+([]+!![])[(+!+[])]])[(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])]]((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])))

\$\endgroup\$
0
\$\begingroup\$

ZX81 BASIC, ~60 Tokenised BASIC bytes

1 PRINT CHR$ 191; CHR$ 189; CHR$ 164; CHR$ 157; CHR$ 128; CHR$ 167; CHR$ 166; CHR$ 184; CHR$ 174; CHR$ 168

Some notes: the ZX81 default character set does not have upper and lower case characters, in fact, all of the BASIC tokens, such as PRINT are included in the character set. It does however have normal and reversed characters in which all of the bits are flipped per character (except for keywords). So this prints ZX81 BASIC with the reversed characters.

I've included the machine name as ZX BASIC is pretty distinct amongst 8-BIT basics, of which there are three revisions, ZX80, ZX81 and ZX Spectrum (the latter being commonly called ZX BASIC).

I will properly work out the byte count later. This may be entered online into the JtyOne ZX81 emulator here

Output programming language name, program for the Sinclair ZX81

Output programming language name, the result of running the program on the ZX81

\$\endgroup\$
1 2 3 4 5
6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.