# 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

# Answer 179, Fuzzy Octo Guacamole

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

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


Pretty standard.

Since # is a comment, most of the lines are skipped.

After removing the comments, you get this:

is~ob"Hello World!"@)
gx


Everything after the @ is not executed, since @ is end.

is~ob"Hello World!"@


The important parts is the "Hello World!"@ which pushes and prints (implicit output).

The rest:

i is invert, s is switch. This doesn't do anything important, moves 1 to the inactive stack (invert 0 and move).

~ob negates (bitwise) pushing -1, and sets the rest ToS (as a string) to b. This basically says b now pushes -1 to the stack.

#//;ah="*#[.>]trac":;cat<<@
? "Hello World!"


Distance 2 from 40

You can test it here

First 2 lines are just REMs and the question mark is interpreted as PRINT

• Sorry, I posted an answer before you. Also, that distance is incorrect. – Nit Oct 27 '14 at 18:05
• I'll update my answer – TecBrat Oct 27 '14 at 18:07
• Neat, nicely done. – Nit Oct 27 '14 at 18:12
• My testing link no longer works and in a quick search I have not yet found an online B.A.S.I.C. interpreter that accepts the hash and question marks the way I used them, but I'm almost entirely certain that this worked in MS QBasic. – TecBrat Aug 5 '16 at 19:13

# Answer 43 - fish shell

#ah="*#[.>]trac";cat<<
echo "Hello World!
"


Levenshtein distance from #42: 7 (2 removal, 3 substitutions, 2 additions)

I hope an extra newline is okay.

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


Distance 7 from #44
;#\ is useless but I wanted to make the future answer more challenging.

http://ideone.com/P0PqMd

• What's the point of the final comment? – Ypnypn Oct 27 '14 at 20:52
• Absolutely useless ! – Michael M. Oct 27 '14 at 20:54
• It's only challenging for a language that doesn't use # for comments ;) – user4768 Oct 27 '14 at 20:55
• I thought I can get if 0 [puts "Hello World!"] at some point... to make it not only challenging but also confusing. – jimmy23013 Oct 27 '14 at 21:39
• -1 for deliberately making future answerers' job harder. Some of us are trying to do the exact opposite, because that first line is really annoying. – nyuszika7h Oct 27 '14 at 21:40

;@echo o#[.>]trac";cat<<
(echo "Hello World!");\


Distance = 5

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


Distance from Answer 63 : 7

Try it online here

• That's too late now, and it's not a big deal, but it would have been nicer if you had edited and undeleted your previous (now deleted) answer, instead of adding a new one. There is already way too many deleted answers in that challenge. – plannapus Oct 28 '14 at 13:12
• @plannapus - The undeleted answer still tells the older timestamp, which was earlier than 8 hrs :( – Optimizer Oct 28 '14 at 13:39

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


Distance from Answer 67 : 7

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


%#[]([.]c;main()
disp 'Hello World!'
%#[;]:;#bye;dnl</>


## Answer 91 - CASIO BASIC

'#[]([.]c;main()    {Show
"Hello World!"
'}%#[;]:;#bye;dnl</>


Distance from Answer 90 : 7

• I can only get a distance of 8 with the language I am trying...curses! – archaephyrryx Oct 29 '14 at 19:17
• bwahahahahahahah – Optimizer Oct 29 '14 at 19:20
• Ack, also 8 away :/ – Sp3000 Oct 29 '14 at 19:34
• You all just got beaten by VBScript – Optimizer Oct 29 '14 at 19:38

'#[]([.]c;main()    {
MSgBox"Hello World!"
'}/#[;]:;#bye;dnl</>


• Better if you have removed the Show... – jimmy23013 Oct 29 '14 at 19:43
• @user23013 Unless there's a way to free up another 4 changes, I didn't really have the ability to do so :P – resueman Oct 29 '14 at 19:45
• You can replace the Show\n with \nMsgBox. The space isn't required in VBScript. – jimmy23013 Oct 29 '14 at 19:46
• If you have space, cleanup other stuff too! – Optimizer Oct 29 '14 at 19:48
• Okay, I made the suggested changes. Little bit of cleanup got done – resueman Oct 29 '14 at 19:50

//[]([.]#i
//main()    {
//#[;]#bye;dnl</>


Distance: 7

Does it count if it's exactly JavaScript syntax, but technically a different language?

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


• I had no idea that print was a valid command in Algoid... I thought it was just text.output. – Beta Decay Oct 30 '14 at 13:25
• @BetaDecay print and text.output seem to be equivalent when I run them, although they are documented under different sections in the reference page – Tymric Oct 30 '14 at 13:29
• Well that'll help with golfing :) – Beta Decay Oct 30 '14 at 13:31

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


Distance 7 from Answer 109: modifed ay into el, added ect followed by a space, and ;.

## Answer 113 - SQL (postgres)

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


Distance 7 from 112

• remove "
• inserted carriage return before select
• substitute " with '
• remove carriage return," and space
• insert ' after !
• I didn't know the ; can be skipped in SQL... – plannapus Oct 31 '14 at 6:53
• When I tested this in postgres it didn't seem to mind. Try it here sqlFiddle. It's probably because it's the only query – MickyT Oct 31 '14 at 16:11
• Interesting. Thanks for the tip, that's good to know! – plannapus Oct 31 '14 at 16:13

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


Opal is a Ruby dialect compiled to Javascript. Opal's stdout points to the browser console.

Changes:

• line comment (3x)
• newline (2x)
• fix puts. Putsing regexes works surprisingly well...
• right parenthesis on L4.

//-##[][/]#i--#
main(){
printf(
//sel/.*
"Hello World!")
}//"-##[;]#bye;nl</>%"


Distance from Answer 117 : 7

Try it here

• +1 for bringing main() back again. – jimmy23013 Oct 31 '14 at 12:05

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


Distance 7 from Answer 118: deleted newline, replaced fby ln, deleted } and ;nl.

• I like alliterations :) – plannapus Oct 31 '14 at 13:03
• -1 for removing main() back – Optimizer Oct 31 '14 at 13:05
• I don't get that one: isn't it here still? – plannapus Oct 31 '14 at 13:05
• I meant back in comment ;) See this – Optimizer Oct 31 '14 at 13:11
• @Luminous I'm afraid we don't have much time anymore – John Dvorak Oct 31 '14 at 17:37

//#{//-##[][/
void main(){//println(;\#//sel/.*}}
print("Hello World!");
}//#;//"-##[;]#bye</>%


Distance from Answer 125 : 4

//#clas{//-##[][/
void main(){//println(;\#//sel/.*}}
write("Hello World!");
}//#;//"-##[;]#bye</>%


//#class{//-##[][/void main(){//println(;\#//sel/.*}}
Print("Hello World!")
//#;//"-##[;]#bye</>%


Distance 7 from answer 127: deleted newline, changed w into P, inserted n, deleted e, then ; and }, and because I'm nice I used my last one to add the last s of class.

Never heard of Suneido before today but according to the language specs, Print("...") is the print statement and // the comment chars for single line comments.

# Answer XXX - Commodore BASIC

Verdict by @CalvinsHobbies, OP:

Sorry but as clever as this may be, PETSCII isn't ASCII. If this kind of shifting was allowed then arguably any 97 unique characters could be used. This is invalid.

...but for those who want the cleverness anyhow:

1dA//#{//-##[][/ void main(){println(;\#//sel/.*}}
2print("Hello World!");
3dA//#;//"-##[;]#bye</>%


The "trick" comes from the fact that there are some little-known abbreviations in C64 BASIC. There's no abbreviation for REM, but it turned out dA for DATA served just as well...as long as you never try to read it!!

Technically speaking one has to bend the rules at least a little, as the Commodore 64 doesn't use ASCII...it uses PETSCII. Here is the "shifted" PETSCII equivalent. Thus a lowercase a is actually 0x41 (dec 65)...and an uppercase A maps to 0xC1 (dec 93) in the "shifted PETSCII" character set.

Next there are some characters with no exact equivalent. For instance, ASCII open brace { 0x7B (dec 123). The PETSCII standard would show that as a cross (✚). Yet if you write it directly into screen memory (as with POKE 1024,123) you get a box in the lower left, like Unicode's "quadrant lower left" character (▖). Unfortunately there are no PETSCII equivalents for the likes of [ 0x5B (dec 91)...only screen memory codes.

Hence I've substituted the screen memory equivalents into source for the codes of the five characters that have no ordinary mapping:

• { (0x7B) => screen code 0x7B => quadrant lower left (solid) CBM+F key
• } (0x7D) => screen code 0x7D => quadrant upper left (hollow) CBM+X key
• [ (0x5B) => screen code 0x5B => cross bar no known key combo
• ] (0x5D) => screen code 0x5D => vertical line SHIFT+minus key
• \ (0x5C) => screen code 0x5C => left half filled in block CBM+J key

Because I don't actually know how on the keyboard to get the cross bar other than POKE-ing into screen memory, that's what I did. I typed the program in with a dummy character at first in the three positions where open braces existed and then wrote some poke statements as shown. You could put any character there really, but I wanted the code to be as true to the ASCII values as possible.

Voila. Of course when you're done with the POKE statements you'll have to cursor back up and hit ENTER on the code lines again so the source changes will take.

Be sure to get into shifted PETSCII mode before you run it, with CBM-shift or POKE 53272,23. How the program is produced isn't that relevant, as it could be saved and loaded, but this just gets it all on one screen.

• This has distance 13. Please delete this ASAP. – Optimizer Nov 1 '14 at 5:48
• You added 1dA, 2, 3dA and modified  void  to ]#i--# – Optimizer Nov 1 '14 at 5:52
• @Optimizer Next time, how about assume good faith instead of ordering people to delete things. Your edit came in the midst of a post, I had to delete it to fix up and accommodate, and I copied the wrong line. – Dr. Rebmu Nov 1 '14 at 5:55
• @Optimizer It's a little hard in a challenge where your entry came in during mine, and I had to delete it, and adjust it. The nature of the challenge is a little difficult and I assure you entering these things by hand in a commodore emulator are difficult and the reasoning is difficult. In any case, it's fixed, and for all the desperation you suggest about the importance of worrying about the efforts of others consider the effort this took which was...well, more than I'd planned to spend. It's a game. Be nicer. – Dr. Rebmu Nov 1 '14 at 5:59
• @Dr.Rebmu Sorry but as clever as this may be, PETSCII isn't ASCII. If this kind of shifting was allowed then arguably any 97 unique characters could be used. This is invalid. – Calvin's Hobbies Nov 1 '14 at 6:30

//#class{//-ta[][
void main(){//println(;\#//Hello*}}

print("Hello World!");}
//#;//"-##[;]#bye</>%


Distance from Answer 130 : 7

"/#class jux{//-ta[][static void main(){//println(;\#//Hello*}}

print""Hello World!"i"#!puts
#;//-##[;]#bye</>%"


Distance 7 from answer 134. (5 necessary, 2 for ic in static)

#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[] h){
#System.out.println(//;\#//Hello*}}print,
cat('Hello World!')#;}}//print#putsx;//-##[;]#bye</>%"


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


Distance 7 from 154

Im going for c# now!

• Too bad all the shells I can think of are already taken. I'd have loved to take cat<<<'Hello World!' next. – Christopher Creutzig Nov 5 '14 at 7:40

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


Distance from Answer 158 - 7

2 necessary and 5 for flowing towards C#

• Should I add two more chars to my answer so you can add them to yours? – Lynn Nov 6 '14 at 13:11
• @nooodl Please don't edit now as it will effect the other 2 answers too. – Optimizer Nov 6 '14 at 13:12

# Answer 160 - Busybox built-in shell

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


4 necessary changes, removed 3 characters to move towards C#.

• Busybox uses a modified Almquist shell (git.busybox.net/busybox/tree/shell). It seems to be almost the same language as dash (the portable Almquist shell), and Dash was taken in answer 35. – kernigh Nov 21 '14 at 21:22

#class jux{public static void main(String[] h){#
#System.Console.Wrinteln(//@\//Hello*}}print,cat<<<
RrXoX"Hello World!"X ;}}//print#putsx;//-##E;]#bye</>%"


Despite the positions of @ and E, they are necessary. Sorry for editing late. Rollback if you already started working on this.

Gammaplex is yet another 2D language. The official interpreter will ignore all new lines, then rearrange all characters into a rectangle with the same width of the first line. The above code is like this in Gammaplex:

#class jux{public static void main(String[] h){#
#System.Console.Wrinteln(//@\//Hello*}}print,cat
<<<RrXoX"Hello World!"X ;}}//print#putsx;//-##E
;]#bye</>%"
`
• you killed the chain haha... – rodolphito Nov 10 '14 at 20:01
• @Rodolvertice It is still possible with some Basic dialects... – jimmy23013 Nov 10 '14 at 22:20
• @user23013 maybe you should do it, 5 Days are over and the required wait time is only 8 hours. – Sebb Nov 11 '14 at 17:38
• There cant be 2 answers in a row by the same person. – rodolphito Nov 11 '14 at 18:44

## protected by Community♦Nov 5 '14 at 21:59

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).