# Evolution of “Hello World!”

This contest is officially over, the winner is jimmy23013. Congratulations!

The challenge is to make a program that prints Hello World! to stdout. The catch is that your program must have a Levenshtein distance of 7 or less from the program in the answer submitted before yours.

# How This Will Work

Below I have already submitted the first answer using Python: print("Hello World!").

The next person to answer must modify the string print("Hello World!") with up to 7 single character insertions, deletions, or substitutions so that when it is run in any language that hasn't been used so far (only Python in this case) the output is still Hello World!.

For example the second answerer might use 1 substitution (r -> u), 2 deletions (in), and 1 insertion (s) to make the string puts("Hello World!") which prints Hello World! when run in Ruby.

The third person to answer must do the same thing in a new language, but using the program of the second person's answer (e.g. puts("Hello World!")) as their starting point. The fourth answer will be in relation to the third answer and so on.

This will continue on until everyone get stuck because there is no new language the last answer's program can be made to run in by only changing 7 characters. The communal goal is to see how long we can keep this up, so try not to make any obscure or unwarranted character edits (this is not a requirement however).

# Formatting

#Answer N - [language]

[code]

[notes, explanation, observations, whatever]


Where N is the answer number (increases incrementally, N = 1, 2, 3,...).

You do not have to tell which exact characters were changed. Just make sure the Levenshtein distance is from 0 to 7.

# Rules

There should never be two answers with the same N. If two people happen to simultaneously answer for some N, the one who answered later (even if it's a few seconds difference) should graciously delete their answer.

Furthermore...

• A user may only submit one answer per 8 hour period. i.e. Each of your answers must be at least 8 hours apart. (This is to prevent users from constantly watching the question and answering as much as possible.)
• A user may not submit two answers in a row. (e.g. since I submitted answer 1 I can't do answer 2, but I could do 3.)
• Each answer must be in a different programming language.
• Different versions of the same language count as the same language.
• Languages count as distinct if they are traditionally called by two different names. (There may be some ambiguities here but don't let that ruin the contest.)
• You may only use tabs, newlines, and printable ASCII. (Newlines count as one character.)
• The output should only be Hello World! and no other characters (a leading/trailing newline is not an issue).
• If your language doesn't has stdout use whatever is commonly used for quickly outputting text (e.g. console.log or alert in JavaScript).

Don't edit answers unless absolutely necessary.

# Scoring

Once things settle down, the user who submits the most (valid) answers wins. Ties go to the user with the most cumulative up-votes.

(user must have at least 2 valid answers)

### Languages used so far:

(Feel free to edit these lists if they are incorrect or out of date.)

This question works best when you sort by oldest.

NOTE: This is a trial question for a new challenge type I have in mind where each answer depends on the last and increases in difficulty. Come discuss it with us in the chatroom for this question or in meta.

• "Sort by oldest" is useful here. – xnor Oct 27 '14 at 6:39
• chatroom for discussion on this question – Justin Oct 27 '14 at 7:04
• @Mew HQ9+ prints the wrong message. But this one... esolangs.org/wiki/Huby – Sp3000 Oct 27 '14 at 13:55
• Maybe this can be interesting : migl.io/projects/hw. This list automatically the answers and display their life time. – Michael M. Oct 27 '14 at 15:00
• @gerrit Cause I could really use 350 more answer notifications... – Calvin's Hobbies Nov 4 '14 at 1:39

#class jux{//-ta][static void main(String[]){System.out.println(;\#//Hello*}}print,
"Hello World!"#;write"putsx;//-##[;]#bye</>%"


1. remove ;
2. remove /
3. remove /
4. removed \n (newline) to have print on above line
5. added # after "Hello World" to comment out the rest of the trash.
6. u int out
7. t in out (hoping to see that java answer)

At this point I'm just looking through EVERY language in esolangs.org... haha

#class jux{public static void main(String[]){System.out.println(;\#//Hello*}}print,
"Hello World!"print"putsx;//-##[;]#bye</>%"


Distance 7 from answer 148 (6 necessary, 1 for the space after public).

Io supports both write("...") and "..."print, but not print("...") or "..."write unfortunately.

This question has most answers in this site now.

#B00class jux{public static void main(String[] h){
#System.Cont.Wrintln(//;\#//Hello*}}print,
cat<<<"Hello World!" #;}}//print#putsx;//-##[;]#bye</>%"


Distance 7 from answer 155 (5 necessary, 2 change the single quotes to double quotes, to make next answers easier).

I'll stop looking for new languages now. And I'll be no longer answering so fast. I'll only post answers with languages that I have found but yet didn't have chance to use.

I also found apt-cache search useful. And if you want more languages that only a few people use, you can try something like this. If you want it to be uninteresting, you can also see here.

There are also many esolangs and serious languages in those long lists not have been used yet, I think.

• – Vlo Nov 5 '14 at 14:35

//#class jux{public static void main(String[] h){
System.out.println(//;\#//Hello*}}print,
'Hello World!');//}}//print#putsx;//-##[;]#bye</>%"


Note due to incorrect syntax the last line was changed... 2014-11-18 (OP)

• ... Anyone has ideas fixing answer 154? – jimmy23013 Nov 20 '14 at 2:57
• About that.. :3 – Timtech Nov 20 '14 at 19:24

## Answer 170 - Minkolang 0.9

03w!(*#class jux{public static void main(String[] h){#
#System.Console.Writeln(//@\//Hello*}}print,cat<<#*)
pint)(!
"Hello World!"(O).g!)S(#X ;}}//printputsx;//-##E;]bye</>%#*)


The two additions are 03w at the beginning, which jumps it to the beginning of the fourth line and (O). after "Hello World!", which prints out the whole stack as characters. Very, very, very conveniently, this is exactly 7 characters!

• Rise of the new golfing langs! – Conor O'Brien Oct 26 '15 at 22:54

"#03w(*#class jux!{public static void main(String[] h){#\
#System.Console.Writeln(//@\//Hello*}}print,cat<<#*)\
put"
a"Hello World!'#(O).g!)S(#X ;}}//printputsx;//-##E;]bye</>#*)


Guide:

• Five insertions; "s at beginning and after put; \ after first two lines; a before "Hello World!
• 1 substitution; ' to " on the last line
• 1 deletion; the % towards the end.

Try it here!

• Are languages newer than the challenge allowed? – mbomb007 Feb 24 '16 at 21:37
• @mbomb007 Yes, they are. – Conor O'Brien Feb 24 '16 at 21:49

Distance 7 from answer 173. Try it here!

"4mrZ""#03w(*#class jux!{public static void main(String[] h){#\
#System.Console.Writeln(//@\//Hello*}}print,cat<<#*)\
put"

^
"Hello World!"gx;#(O).g!)S(#X ;}}//printputs;//-##E;]bye</>#*)


Surrounded 4mrZ with quotes (2); added two characters gx after "Hello, World!". Added a newline after put", replaced the a with a ^, removed the x from printsputsx;// on the last line. Both 4mrZ and the long text after it are quoted and pushed to the stack; ^ probably does something, but nothing relevant, "Hello World!" pushes that sting to the stack, and g prints one item from the stack. x terminates the program. Fun fact: removing the x gives infinite "Hello World!"s because of the X, which wraps around to the beginning of the section.

• @mbomb007 my pleasure! – Conor O'Brien Feb 24 '16 at 22:24

x4mrZ"#03w(*#class jux!{public static void main(String[] h){#\
#System.Console.Writeln(//@\//Hello*}}print,cat<<#*)\
put"

^
Hello World!
gx#(O).g!)S(#X ;}}//printputs;//-##E;]bye</>#*)
<empty>


The last line is simply an empty line, so the next person should remove <empty>. I used free-spacing mode so that # starts a comment. This takes care of the unmatched brackets and parentheses. I guess the g is the last replace's configuration string is ignored?

Try it online

4mrZ"#03w(*#class jux!{public static void main(String[] h){#\
#System.Console.Writeln(//@\//Hello*}}print,cat<<#*)\
put"
a
"Hello World!";#(O).g!)S(#X ;}}//printputsx;//-##E;]bye</>#*)


Oh, geez, that was easier than I expected it to be.

Explanation:

4mrZ inserted (4 chars), which calls the 4th index of code (the 5th line), reverses the stack, and then outputs everything in the stack as a char. I can get away with no newline due to the # character, which will teleport to the 90th character in the first line (which doesn't exist) (Z in ASCII), throwing an error and exiting the program.

Newline inserted before "Hello... (one char) to designate a new method line.

" substituted for ' at the end of World!' (one char) to end the quotes.

; inserted after the newly substituted " (one char), which is a return character. This leaves Hello, World! on the stack.

More interestingly, if you want to know what Vitsy is actually reading, here's the verbose mode version (any lines starting with : designate a newline):

push 4;
goto top method;
reverse stack;
output stack as chars;
toggle double quote;
teleport to top instruction;
push 0;
push 3;
wait top seconds;
if (int) top is 0;
multiply top two;
teleport to top instruction;
push 12;
push length of stack;
push 10;
push inverse sine of top;
push inverse sine of top;
;
j;
flatten top two stacks;
x;
!;
rotate stack left;
push whether (int) top item is prime;
flatten top two stacks;
push 11;
push length of stack;
push input item;
push 12;
;
push inverse sine of top;
push inverse tangent of top;
push 10;
push inverse tangent of top;
push input item;
push 12;
;
save top as temporary variable;
capture stack as object with next;
push input item;
push 13;
;
goto top method;
push 10;
push input item;
eval(stack);
if (int) top is 0;
push sine of top;
push inverse tangent of top;
reverse stack;
push input item;
eval(stack);
g;
begin recursive area;
end recursive area;
;
factorize top item;
if (int) top is not 0;
rotate stack left;
teleport to top instruction;
repeat next instruction set top times;
:teleport to top instruction;
push sine of top;
push number of stacks;
push inverse sine of top;
push inverse tangent of top;
push 14;
goto top method;
.;
push cosine of top;
capture stack as object with next;
eval(stack);
push inverse sine of top;
capture stack as object with next;
push length of stack;
push 14;
.;
STDIN;
reverse stack;
push input item;
push inverse tangent of top;
push 14;
push length of stack;
eval(stack);
if (int) top is 0;
divide top two;
divide top two;
get top specified item;
repeat next instruction set top times;
divide top two;
divide top two;
push all ints between second to top and top;
push 14;
push length of stack;
push length of stack;
capture stack as object with next;
multiply top two;
rotate stack right;
rotate stack right;
push whether (int) top item is prime;
reverse stack;
push input item;
eval(stack);
push inverse tangent of top;
,;
push 12;
push 10;
push inverse tangent of top;
go backward;
go backward;
teleport to top instruction;
multiply top two;
if (int) top is not 0;
repeat next instruction set top times;
:push whether (int) top item is prime;
flatten top two stacks;
push inverse tangent of top;
toggle double quote;
:push 10;
:toggle double quote;
push all ints between second to top and top;
push 14;
push length of stack;
push length of stack;
capture stack as object with next;
;
STDIN;
capture stack as object with next;
reverse stack;
push length of stack;
push 13;
!;
toggle double quote;
generic exit;
teleport to top instruction;
if (int) top is 0;
output top as character;
if (int) top is not 0;
.;
g;
!;
if (int) top is not 0;
push sine of top;
if (int) top is 0;
teleport to top instruction;
remove top;
;
;
generic exit;
rotate stack right;
rotate stack right;
divide top two;
divide top two;
push whether (int) top item is prime;
reverse stack;
push input item;
eval(stack);
push inverse tangent of top;
push whether (int) top item is prime;
flatten top two stacks;
push inverse tangent of top;
push inverse sine of top;
x;
generic exit;
divide top two;
divide top two;
subtract top two;
teleport to top instruction;
teleport to top instruction;
push e;
generic exit;
end recursive area;
push 11;
push number of stacks;
push 14;
go backward;
divide top two;
go forward;
teleport to top instruction;
multiply top two;
if (int) top is not 0;

Try it Online!

H.4mrZ"#03w(*#class jux!{public static void main(String[] h){#\
#System.Console.Writeln(//@\//Hello*}}print,cat<<#*)\
put"

^
disp"Hello World!")
gx#(O)X.g!)S(#X ;}}//printputs;//-##E;]bye</>#*)kX
<empty>


The last line is intended to be empty; SE doesn't like blank lines at the end of code blocks.

Modifications:

+ H. (at the start, prints "Hello, World!")
+ X  (before the first . on the last line; prevents extraneous printing by clearing the stack)
+ kx  (at the end, finishes a function definition and clears the stack to prevent printing)

• @mbomb007 This solution is intended to also have the empty line; SE apparently doesn't like blank lines in code blocks (which I didn't realize). – user45941 Mar 8 '16 at 21:08
• ^ yeah. It's annoying. It allows them if you use <code><pre> or something like it, but then it removes any < or >, which sucks for copy-paste purposes... – mbomb007 Mar 8 '16 at 21:54

#ah="*#[.>]trac";cat<<
println("Hello World!")#\


Distance 7.

I haven't actually run this. It may be that # comments must only have whitespace in front of them, in which case this is invalid, but I really doubt that.

• I wonder if we could work backwards with unused languages and make the first two lines useable again. The second doesn't seem too hard, the first one is a different story though. – Etheryte Oct 27 '14 at 21:58

#//echo o[.>]tac;cat<<;#&&alert
(printf "Hello World!");


• Missing name for redirect. Too many )'s. – jimmy23013 Oct 27 '14 at 23:42
• It doesn't work. The first line gives Missing name for redirect. The second gives Too many )'s. It never prints Hello World! – Gavin S. Yancey Oct 27 '14 at 23:49
• Not my day. It should work now. – Dennis Oct 28 '14 at 0:03
• The first error is still there. But it doesn't have any messages if it is in a script. I think this is acceptable. – jimmy23013 Oct 28 '14 at 0:07
• @user23013: Interactive tcsh doesn't seem to have comments. – Dennis Oct 28 '14 at 0:41

## Answer 55 - Pixie; fallback option: ClojureCLR

"//echo o[.>]c;cat<<;#&&alert"(printf
"Hello World!")


The language is in early alpha and seem to have only REPL. Example session:

$./pixie-vm Pixie 0.1 - Interactive REPL (linux, gcc) ---------------------------- user => "//echo o[.>]c;cat<<;#&&alert"(printf //echo o[.>]c;cat<<;#&&alert user => "Hello World!") 12 Hello World!user =>$


When run outside REPL, I expect it to output just "Hello World!", without additional things.

The language is inspired by Clojure. The script works in Clojure too (without messy additional REPL output)

Here is example of ClojureCLR session (used clojure-clr-1.3.0-Debug-3.5.zip):

$mono Clojure.Main.exe hello.clj ; echo Hello World!$

• (Question "Why 12?") -> Result of printf - 12 bytes outputted. – Vi. Oct 28 '14 at 1:31
• Is 12 also in the output? If so, it doesn't qualify: "The output should only be Hello World! and no other characters (a leading/trailing newline is not an issue)." – Etheryte Oct 28 '14 at 1:38
• 12, //echo o[.>]c;cat<<;#&&alert and user =>  are printed by REPL, not by the program. But as the language currently have only REPL so far, I can't test in "in real". – Vi. Oct 28 '14 at 1:39
• I'll say this is allowed since it seems the best Pixie can currently do. But I would prefer you to change the language if possible. – Calvin's Hobbies Oct 28 '14 at 1:45
• Note: now Pixie can run the program properly: ./pixie-vm hello.clj -> Hello World!. – Vi. Dec 11 '14 at 13:29

//echo o[.>]c;cat<<;#&&alert"(
> "Hello World!"//)


Distance: 7

# %;dnl<vsh  o[.]c;cat;#&&alert" ">w ".(
"Hello World!"!#bye";dnl</vsh>


%# %;dnl<vsh  o[.]c;cat;#&&alert" ">w ".(
put "Hello World!" %!#bye";dnl</vsh>


Distance: 7

;<vsh  o[.]c;cat;#&&alert" ">w "
(princ "Hello World!");%!#bye";dnl</vsh>~


Distance of 7 from Answer 71 (3 deletions of random stuff).

P.S. For those who argue about invalidity of different dialects of Lisp, you should post on the first dialect..

• I don't think this should qualify as 1) AutoLISP is just a dialect of LISP and 2) it's practically identical to the already existing LISP answer. The question's author will be in a better position to say if it's okay or not though. – Etheryte Oct 28 '14 at 18:39
• This will be the 4th version of LISP. Practically identical is not identical, given the princ instead of print. Many many other answers are practically identical, hell, some are even are identical. Where do we draw the line? – agweber Oct 28 '14 at 19:10
• @agweber The plain Lisp answer also uses princ. The question isn't how similar (or different) it is to other language answers, but to that answer. If we allow answers like this then I got at least 10 identical Lisp dialect answers coming right up. – Etheryte Oct 28 '14 at 19:39
• @user3490 yes.. – Optimizer Oct 28 '14 at 20:34
• There is no plain Lisp. Answer 48 did not specify which "Lisp". If it was Common Lisp, then there are many Lisps that are not Common Lisp. – kernigh Nov 21 '14 at 20:14

;<vsh  o[.]c;cat;#&&alert"  "
print "Hello World!";%!#bye";dnl</vsh>~


Distance from Answer 73 - 7

Anything followed by ; till newline is comment in Rebol

#sh  o[.]c;cat;#&&alert"  "print
"Hello World!";#bye";dnl</vsh>~


#sh  o[.]c;cat;#&&alert"  "
echo -en "Hello World!"
#";#bye;dnl</vsh>~


//[]([.]c;main()    {
print("Hello World!");
//#[;]#bye;dnl</>


• Undeleted again, since it's now clear what answer 93 is. – Emil Oct 29 '14 at 20:13

//[]([.]#i
main()    {
print('Hello World!');}
//#[;]#bye;dnl</>


Distance: 7

It's about time we got an #include of some sort.

• What will you do with #include ? C answer is already done. – Optimizer Oct 29 '14 at 20:35
• @Optimizer include and import both start with i, and lots of languages use them. – archaephyrryx Oct 29 '14 at 20:36

--#[][.]#i
--#main()    {
Print("Hello World!");
--#[;]#bye;dnl</>


• I know, I just commented on this post because it was the latest one at the time that I made the comment, just so that future posters would see it. Sorry if I made it seem like I was commenting on your post specifically. – archaephyrryx Oct 30 '14 at 2:36

--#[][.]#i
--#main()    {
Print('Hello World!');
--#[;]#bye;dnl</>"%


--#[][.]#i
--#main()    {
put("Hello World!")
--#[;]#bye;dnl</>"%


should be run from the message box in multiline mode

--#[][.]#i
--#main()    {
puts(1,"Hello World!")
--#[;]#bye;dnl</>"%


$--#[][.]#i--#main() {puts(1, "Hello World!"$ --#[;]#bye;dnl</>"%


Distance from Answer 105 : 7

--##[][.]#i--#main(){puts(select"
Hello World!
--##[;]#bye;dnl</>%


Distance 7 from Answer 110: moved select " to the line above and removed the space (2 deletion2), changed --# to --## on both lines (2), removed the "; from the end of the second line (2), and changed the space between select and " to a newline (1). As my sed post was deleted, I am assuming that I can post without waiting 8 more hours. This doesn't print "Hello World!", but displays it instead. If this is an unsatisfactory answer, let me know.

• I count 8. changed the space between select and " to a newline isn't quite what you did. – Muqo Oct 30 '14 at 19:12
• @Muqo what do you mean? – archaephyrryx Oct 30 '14 at 19:37
• Moving select " from the second line to the first line takes 2, and removing the space takes 1. You're counting only 2 (your first step and your fourth step). – Muqo Oct 30 '14 at 20:40
• OOPs. I will put back the period and let Timtech know. At least that won't actually break his answer. – archaephyrryx Oct 30 '14 at 21:02

"--##[][.]#i--#main(){puts(select"
" Hello World! "
"--##[;]#bye;dnl</>%"


Yes the spaces are required and no they're not printed

• @Oriol Fixed ;) – Timtech Oct 30 '14 at 19:07
• It helps if people explain their answers some. Without research, one can't tell if this outputs leading or trailing spaces. The problem statement says: "The output should only be Hello World! and no other characters (a leading/trailing newline is not an issue)." so if there is (for instance) a rule by which leading and trailing spaces are stripped somehow that would be nice to point out the nuances of. Or whatever mad science is happening to meet the requirements; if " Hello World! " isn't a string constant but the quotes mean something else, etc. – HostileFork says dont trust SE Oct 30 '14 at 19:36
• The wiki page says like Forth, quotes must be space separated so I think the lines with out the space separation are ignored and the Hello World! line prints correctly. Now mine finally fits I login and I can't answer cos it's protected! Noooooooooooooooo – Matt Oct 30 '14 at 20:17
• Yes the spaces are required and no they're not printed – Timtech Oct 30 '14 at 20:20

a/-##[][/]#i--#main(){pu/s(
sel/.*/Hello World!/
b/"-##[;]#bye;nl</>%"


Distance from Answer 114 : 7

RegXy is based on Regular Expressions, perl styled.

label/regex/target_label means if the regex matches, go to the target_label line

label/regex/replacement/ means replace the regex match with replacement text.

• Is there a working interpreter? The first line in your code doesn't seem valid. It has 3 /s. – jimmy23013 Oct 31 '14 at 2:16
• The second / is inside a regex. -##[][/]#i--#main(){pu – Optimizer Oct 31 '14 at 2:18
• The VB interpreter (from archive.org) seemed not parsing [/]` correctly, although I don't know how to compile it. It will be better if there is another good interpreter. (But it also ignores invalid lines so your code works anyway.) – jimmy23013 Oct 31 '14 at 2:27