Page namespace (page_namespace) | 0 |
Page title (without namespace) (page_title) | 'Hello' |
Full page title (page_prefixedtitle) | 'Hello' |
Old content model (old_content_model) | 'wikitext' |
New content model (new_content_model) | 'wikitext' |
Old page wikitext, before the edit (old_wikitext) | ''''Hello''' programming language is a minimal programming language with only one instruction, 'h', which will print out the string "[[Hello, world!|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 list|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 2<sup>10</sup> = 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 Plus Plus|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 [[User:Zayne|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==
* [[HQ9 Plus|HQ9+]]
* [[Hello, world!]]
* [[HelloWorld]]
* [[Hello Plus Plus|Hello++]]
==External resources==
* [http://www.veling.nl/anne/lang/hello/ Hello programming language page]
* [http://www.codepanel.net/showthread.php?tid=840 Hello / Hello++ to C converter]
[[Category:Languages]]
[[Category:Joke languages]]
[[Category:Unusable for programming]]
[[Category:Output only]]
[[Category:Unknown year]]' |
New page wikitext, after the edit (new_wikitext) | ''''Hello''' programming language is a minimal programming language with only one instruction, 'h', which will print out the string "[[Hello, world!|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 list|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 2<sup>10</sup> = 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 Plus Plus|Hello++]], which was invented for this purpose; thus, it is impossible to make a true (i.e. case-sensitive) quine in Hello.
==Interpreter==
print(['Hello World', 'Error!'][input('Enter Command: ')!='h'])
This interpreter of Hello was written by [[User:Zayne|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==
* [[HQ9 Plus|HQ9+]]
* [[Hello, world!]]
* [[HelloWorld]]
* [[Hello Plus Plus|Hello++]]
==External resources==
* [http://www.veling.nl/anne/lang/hello/ Hello programming language page]
* [http://www.codepanel.net/showthread.php?tid=840 Hello / Hello++ to C converter]
[[Category:Languages]]
[[Category:Joke languages]]
[[Category:Unusable for programming]]
[[Category:Output only]]
[[Category:Unknown year]]' |
Unified diff of changes made by edit (edit_diff) | '@@ -24,9 +24,5 @@
==Interpreter==
- i = input("Enter Command: ")
- if i != 'h':
- print("ERROR!")
- else:
- print("Hello World")
+ print(['Hello World', 'Error!'][input('Enter Command: ')!='h'])
This interpreter of Hello was written by [[User:Zayne|Zayne]] in Python3.5
' |