Hello

From Esolang
Jump to navigation Jump to search

Hello programming language is a minimal programming language with only one instruction, 'h', which will print out the string "Hello World". Hello was created by Anne Veling.

The language was designed to be very easy to learn and implement.

Example program

The following program prints out "Hello World".

h

Important note

This language is a joke language.

Notes on quines

If it was case insensitive, and all unknown characters were ignored, then it would be easy to make a quine using this program. (Maybe even two quines. Or an infinite number.)

Hello World

One consideration is that if we require exactly the source string as output from the quine, then this is the only possible one. If, on the other hand, we did not mind if the case were changed (after all, the output would still compile and run just fine), there would be 210 = 1024 quines: one for each possible combination of capitalised and uncapitalised letters (actually, it's a permutation with repetition). All this, of course, also assumes that we only call h once in the programme; in reality we can just write a quine twice in a row and get another, making the actual number of quines infinite:

Hello WorldHello World

However, this example (and the previous one) would not work due to the fact that Hello doesn't understand "H" as a command, unlike Hello++, which was invented for this purpose; thus, it is impossible to make a true (i.e. case-sensitive) quine in Hello.

Interpreter

i = input("Enter Command: ") 
if i != 'h':
	print("ERROR!")
else:
	print("Hello World")

This interpreter of Hello was written by Zayne in Python3.5

This interpreter by User:A (golfed and optimized) prints error instructions as True, which is currently the shortest interpreter:

print('h'!=input()or"Hello World")

In Python 2:

print'h'!=raw_input()or"Hello World"

User:B has dramatically improved the memory and disk footprints of the first interpreter written in Python 3:

if'h'==input(">"):print("Hello World")

and has ported it to Python 2 at the cost of increased mass storage usage:

if'h'==raw_input(">"):print"Hello World"

See also

External resources