236
\$\begingroup\$

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

Please format your post like this:

# 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

The key thing to understand about this challenge is that only one person can answer at a time and each answer depends on the one before it.

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).

Please make sure your answer is valid. We don't want to realize there's a break in the chain five answers up. Invalid answers should be fixed quickly or deleted before there are additional answers.

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.

Leaderboard: (out of date)

(user must have at least 2 valid answers)

11 Answers

7 Answers

6 Answers

5 Answers

4 Answers

3 Answers

2 Answers

Languages used so far:

  1. Python
  2. CJam
  3. PHP
  4. Pyth
  5. Perl
  6. Befunge 98
  7. Bash
  8. Nimrod
  9. Ruby
  10. GNU dc
  11. Golfscript
  12. Mathematica
  13. R
  14. Lua
  15. Sage
  16. Julia
  17. Scilab
  18. JavaScript
  19. VHDL
  20. HyperTalk
  21. Haskell
  22. LOLCODE
  23. APL
  24. M30W
  25. Stata
  26. TI-BASIC (NSpire)
  27. ActionScript 2
  28. J
  29. PowerShell
  30. K
  31. Visual FoxPro
  32. VBA
  33. Extended BF Type III
  34. Zsh
  35. Dash
  36. Clojure
  37. NetLogo
  38. Groovy
  39. CoffeeScript
  40. Clipper
  41. B.A.S.I.C.
  42. FALSE
  43. fish (shell)
  44. GNU Octave
  45. TCL
  46. E
  47. newLisp
  48. Lisp
  49. SMT-LIBv2
  50. Racket
  51. Batsh
  52. tcsh
  53. AppleScript
  54. Mouse
  55. Pixie
  56. F#
  57. Falcon
  58. Burlesque
  59. HTML
  60. SGML
  61. M4
  62. MUMPS
  63. TeX
  64. Forth
  65. Salmon
  66. Turing
  67. bc
  68. Betterave
  69. Scheme
  70. Emacs Lisp
  71. Logo
  72. AutoLISP
  73. ///
  74. Rebol
  75. Maple
  76. FreeBASIC
  77. Vimscript
  78. ksh
  79. Hack
  80. mIRC
  81. Batch
  82. Make
  83. Markdown
  84. sh
  85. GDB
  86. csh
  87. HQ9+-
  88. Postscript
  89. Matlab
  90. Oz
  91. CASIO BASIC
  92. VBScript
  93. QBasic
  94. Processing
  95. C
  96. Rust 0.13
  97. Dart
  98. Kaffeine
  99. Algoid
  100. AMPL
  101. Alore
  102. Forobj
  103. T-SQL
  104. LiveCode
  105. Euphoria
  106. SpeakEasy
  107. MediaWiki
  108. SmallBASIC
  109. REXX
  110. SQLite
  111. TPP
  112. Geom++
  113. SQL (postgres)
  114. itflabtijtslwi
  115. RegXy
  116. Opal.rb
  117. Squirrel
  118. Pawn
  119. Scala
  120. Rebmu
  121. Boo
  122. PARI/GP
  123. Red
  124. Swift
  125. BeanShell
  126. Vala
  127. Pike
  128. Suneido
  129. AWK
  130. Neko
  131. AngelScript
  132. gosu
  133. V
  134. ALAGUF
  135. BogusForth
  136. Flaming Thunder
  137. Caché ObjectScript
  138. owl
  139. Cardinal
  140. Parser
  141. Grin
  142. Kitten
  143. TwoDucks
  144. Asymptote
  145. CAT
  146. IDL
  147. Tiny
  148. WTFZOMFG
  149. Io
  150. MuPAD
  151. Java
  152. Onyx
  153. JBoss
  154. S+
  155. Hexish
  156. yash
  157. Improbable
  158. wake
  159. brat
  160. busybox built-in shell
  161. gammaplex
  162. KTurtle
  163. AGOL 68
  164. Alice
  165. SML/NJ
  166. OCaml
  167. CDuce
  168. Underload
  169. Simplex v.0.6
  170. Minkolang 0.9
  171. Fexl 7.0.3
  172. Jolf
  173. Vitsy
  174. Y
  175. Retina
  176. Codename Dragon
  177. Seriously
  178. Reng v.3.3
  179. Fuzzy Octo Guacamole
  180. 05AB1E

(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.

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

185 Answers 185

1
2 3 4 5
7
57
\$\begingroup\$

Answer 1 - Python

print("Hello World!")

There's got to be dozens of languages this could morph into.

\$\endgroup\$
7
  • 129
    \$\begingroup\$ Why is this being up-voted but not the question? I guarantee you the question was harder to write ;) \$\endgroup\$ Commented Oct 27, 2014 at 7:13
  • 95
    \$\begingroup\$ Why is your comment being up-voted more than your answer? \$\endgroup\$
    – tomsmeding
    Commented Oct 27, 2014 at 10:49
  • 26
    \$\begingroup\$ @Calvin'sHobbies Answer upvotes are worth more, you shouldn't complain :-) \$\endgroup\$ Commented Oct 27, 2014 at 12:20
  • 33
    \$\begingroup\$ @tom Why is your comment being up-voted more than this answer? \$\endgroup\$
    – nicael
    Commented Oct 30, 2014 at 17:39
  • 27
    \$\begingroup\$ ^ All of them regretting that there are no rep awarded for comment upvotes! \$\endgroup\$
    – Optimizer
    Commented Nov 1, 2014 at 21:26
48
\$\begingroup\$

Answer 59 - HTML

What? No HTML ??

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

Distance from Answer 58 : 6

Voodoo Magic ? Nah. Here is how it works:

You can have any arbitrary tag in HTML, so the first part <echo o[.]c;cat<<;#&&alert" "> is an echo tag, which now becomes a blank tag with no CSS applied by default by the browser.

The o[.]c;cat<<;#&&alert" " part is actually two properties set on that tag separated by space. So the first property has the key o[.]c;cat<<;#&&alert" and second key is " and both the values are blank.

Second part is just plain text Hello World! which is the text contents of the echo tag.

Next up, HTML tries to find the closing echo tag, but instead, finds a closing vsh tag. It then ignores the closing vsh tag (i.e. </vsh) and auto closes the echo tag.

\$\endgroup\$
21
  • 3
    \$\begingroup\$ You can have any tag in HTML, so echo is a normal tag. o[.]c;cat<<;#&&alert" is a property on that tag and the last " is another property on that tag. You can see this using Inspector developer tool too. \$\endgroup\$
    – Optimizer
    Commented Oct 28, 2014 at 7:38
  • 3
    \$\begingroup\$ Pretty dang clever. Never would have thought of it. \$\endgroup\$
    – RubberDuck
    Commented Oct 28, 2014 at 13:33
  • 15
    \$\begingroup\$ I think this is what happens when you read standards documents at 3 am while on peyote. \$\endgroup\$ Commented Oct 31, 2014 at 17:13
  • 6
    \$\begingroup\$ @Optimizer Required reading for people recommending w3schools. ;) \$\endgroup\$ Commented Dec 18, 2014 at 15:00
  • 3
    \$\begingroup\$ Next up, HTML tries to find the closing echo tag, but instead, finds a closing vsh tag. It then ignores the closing vsh tag (i.e. </vsh) and auto closes the echo tag. This is just beautiful writing. \$\endgroup\$
    – Amory
    Commented Dec 18, 2014 at 19:16
43
\$\begingroup\$

Answer 95 - C

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

Distance 7 from answer 94

\$\endgroup\$
8
  • 41
    \$\begingroup\$ Bloody finally. \$\endgroup\$
    – Etheryte
    Commented Oct 29, 2014 at 20:18
  • \$\begingroup\$ @Optimizer I didn't get any kind of runtime error using gcc 4.7.2 on my computer. \$\endgroup\$ Commented Oct 29, 2014 at 20:21
  • 2
    \$\begingroup\$ @Emil Just vim auto-indentation; OP's call on what to do about this (if it progresses too far to fix, you can just pretend that it's a tab and make the distance 7) \$\endgroup\$ Commented Oct 29, 2014 at 20:31
  • 2
    \$\begingroup\$ @user23013 Because the program doesn't specify int as the return type for main and doesn't actually return an exit code; therefore, the return code is technically undefined behavior, hence the 13. \$\endgroup\$ Commented Nov 5, 2014 at 0:33
  • 2
    \$\begingroup\$ Some of the previous answers (starting from 85 GDB) did extra work to prepare for C. \$\endgroup\$
    – kernigh
    Commented Nov 21, 2014 at 20:27
31
+200
\$\begingroup\$

Answer 85 - GDB (GNU Debugger)

#[]([.]c;main()&alert"  "
    echo Hello World!
#[;]:;#bye;dnl</vsh>

I think this can also be qualified as a programming language. It has even if and while commands.

echo is another built in command in GDB.

To run this code:

gdb --batch -x file

Distance: 7 from answer 84.

\$\endgroup\$
15
  • \$\begingroup\$ Please revision your answer, the 85 was an invalid answer (I didn't notice the language had been used before) and I deleted it. \$\endgroup\$
    – Etheryte
    Commented Oct 29, 2014 at 11:09
  • \$\begingroup\$ Any link to GDB ? \$\endgroup\$
    – Optimizer
    Commented Oct 29, 2014 at 11:10
  • 1
    \$\begingroup\$ @Optimizer gnu.org/software/gdb The Gnu Debugger. \$\endgroup\$
    – jimmy23013
    Commented Oct 29, 2014 at 11:11
  • \$\begingroup\$ Its like running java project in Eclipse rather than Netbeans \$\endgroup\$
    – Optimizer
    Commented Oct 29, 2014 at 11:15
  • 3
    \$\begingroup\$ This answer is fine. GDB has a command language which is used to execute specific debug commands. This is done by running GDB in batch mode and specifying the command file using --batch -x <file>. This is a legit language. See here: sourceware.org/gdb/onlinedocs/gdb/Mode-Options.html (-batch flag) \$\endgroup\$
    – user4768
    Commented Oct 29, 2014 at 11:25
31
\$\begingroup\$

Answer 151 - Java

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

Distance from Answer 150 : 7

Try it here

(Thanks to Christopher Creutzig for being such a sport :) )

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Now for the C# answer! \$\endgroup\$
    – vero
    Commented Nov 5, 2014 at 1:31
29
\$\begingroup\$

Answer 22 - LOLCODE

VISIBLE "Hello World!"

Distance : 6

\$\endgroup\$
2
  • \$\begingroup\$ Looks like distance 6 to me - delete p, ut -> VI, tr -> IB, n -> E \$\endgroup\$
    – isaacg
    Commented Oct 27, 2014 at 9:58
  • 1
    \$\begingroup\$ Thanks. I think I copied different code while calculating distance. \$\endgroup\$
    – Snack
    Commented Oct 27, 2014 at 9:59
27
\$\begingroup\$

Answer 10 - GNU dc

[puts "\x48][Hello World!]p

Distance: 6

\$\endgroup\$
2
  • 8
    \$\begingroup\$ Well this is hard. Haha. \$\endgroup\$
    – Zaenille
    Commented Oct 27, 2014 at 7:51
  • \$\begingroup\$ @MarkGabriel Hint: Substring. \$\endgroup\$
    – jimmy23013
    Commented Oct 27, 2014 at 8:10
26
\$\begingroup\$

Answer 4 - Pyth

"Hello World!

This answer is a distance of 6 from the previous answer. Pyth strings do not need a closing quote if they are at the end of a line.

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Darn, I had a good one for the previous. \$\endgroup\$
    – Justin
    Commented Oct 27, 2014 at 6:36
21
\$\begingroup\$

Answer 11 - Golfscript

#[puts "\x48]
"Hello World!"

A distance of 5.

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

Answer 83 - Markdown

What ?? No Markdown ? :P

[](#[.]c;cat;#&&alert"  "
    @echo)Hello World!
[;]:;#bye;dnl</vsh>

Try it here

Distance from Answer 82 : 7

e   -> [
:   -> ]
\n  -> (
o H -> o)H
:   -> [
#   -> ]
"   -> :

Voodoo magic ?? Nah!! Here is how it works:

  • [text](link) creates a link.

So the first part of the code is

[](#[.]c;cat;#&&alert"  "
        @echo)

Which creates an empty text link with location

#[.]c;cat;#&&alert"  "
     @echo
  • Next part Hello World! is printed as is

  • Then [;]:;#bye;dnl</vsh> creates a reference link for ; which can be used anywhere in the markdown.

Ex:

[Some text][;] // Outputs a link with text "Some text" and url ";#bye;dnl</vsh>"
\$\endgroup\$
7
  • 1
    \$\begingroup\$ It's getting questionable whether that's a programming language. (Same for HTML actually.) \$\endgroup\$ Commented Oct 29, 2014 at 10:01
  • 1
    \$\begingroup\$ Well, If HTML is a language, Markdown is too. Its the same relation between JS and Closure. Also, given this challenge (1 lang per ans), these rules ought to be loosened a bit. \$\endgroup\$
    – Optimizer
    Commented Oct 29, 2014 at 10:03
  • 1
    \$\begingroup\$ As I said, I don't think HTML is a programming language either by our standards. But for the purpose of this particular challenge it's probably fine to loosen those rules (but ideally Calvin's Hobbies should state that). \$\endgroup\$ Commented Oct 29, 2014 at 10:04
  • 4
    \$\begingroup\$ Can we have this discussion somewhere else rather than on my answer ? :) \$\endgroup\$
    – Optimizer
    Commented Oct 29, 2014 at 10:52
  • 2
    \$\begingroup\$ Still pretty impressive \$\endgroup\$
    – Fabinout
    Commented Oct 31, 2014 at 9:17
19
\$\begingroup\$

Answer 15 - Sage

print("Hello World!")

Distance = 6

Full circle.

\$\endgroup\$
1
  • \$\begingroup\$ Full circle indeed. \$\endgroup\$
    – Alex A.
    Commented Mar 28, 2015 at 5:04
18
\$\begingroup\$

Answer 12 - Mathematica

#[puts];
"Hello World!"

Distance of 7. Attempting to clear up some of that mess.

\$\endgroup\$
17
+100
\$\begingroup\$

Answer 2 – CJam

"Hello World!"

This is a distance of 7 from the first answer

Try it online here

\$\endgroup\$
17
\$\begingroup\$

Answer 6 - Befunge 98

<@,kb"Hello World!"

Distance of 5 from the previous answer. There was originally a bug where the k wasn't there; I know it was there when I wrote this program, though. I guess it just didn't make it into this post.

\$\endgroup\$
12
  • \$\begingroup\$ I should have inflated this, but oh well. \$\endgroup\$
    – Justin
    Commented Oct 27, 2014 at 6:43
  • \$\begingroup\$ I'm just going to post answer 7 based on the inflated version... \$\endgroup\$
    – jimmy23013
    Commented Oct 27, 2014 at 6:44
  • 6
    \$\begingroup\$ @Quincunx I can't imagine us ever being able to get up to System.out.println... \$\endgroup\$
    – Sp3000
    Commented Oct 27, 2014 at 6:52
  • 4
    \$\begingroup\$ @Sp3000 We can firstly write the Java program in a comment. Then turn everything else into a comment. \$\endgroup\$
    – jimmy23013
    Commented Oct 27, 2014 at 6:56
  • 4
    \$\begingroup\$ I had considered allowing multiple responses per answer so it could branch out like a tree. Then you guys could go on your little Java tangent. That would be way too confusing though... \$\endgroup\$ Commented Oct 27, 2014 at 7:02
16
\$\begingroup\$

Answer 19 - VHDL

report "Hello World!";

Distance: 6

\$\endgroup\$
2
  • 1
    \$\begingroup\$ wow :) ........ stubborn huh? \$\endgroup\$
    – MAKZ
    Commented Oct 27, 2014 at 9:43
  • 3
    \$\begingroup\$ Haha, I've been waiting for a code golf question that allows me to use an HDL :p \$\endgroup\$
    – user4768
    Commented Oct 27, 2014 at 9:46
14
\$\begingroup\$

Answer 3 – PHP

<?="Hello World!"?>

This answer is a distance 5 from the second answer.

\$\endgroup\$
8
  • \$\begingroup\$ Please note that the string "Hello World!" verbatim, which is obviously distance 0 from answer 2, is a valid PHP program outputting the required string, and explicit print statement is unnecessary. \$\endgroup\$
    – hijarian
    Commented Oct 28, 2014 at 11:55
  • \$\begingroup\$ @hijarian: That's only true for the PHP shell, which makes it invalid for this challenge. \$\endgroup\$
    – Dennis
    Commented Oct 28, 2014 at 21:02
  • 1
    \$\begingroup\$ @Dennis If you write a script helloworld.php, and put the 12 symbols Hello World! in there and then you run this script with php helloworld.php, you'll get Hello World! printed to stdout as PHP treat everything outside of <?php ?> processing instruction as raw text to output. \$\endgroup\$
    – hijarian
    Commented Oct 29, 2014 at 4:30
  • \$\begingroup\$ I have realized that you'll need to remove quotation marks (which makes it Levenstein distance 2) to be fully compliant. \$\endgroup\$
    – hijarian
    Commented Oct 29, 2014 at 4:30
  • 5
    \$\begingroup\$ @Petah So? This is not code golf. We are not supposed to make it as short or as easy to continue as possible. \$\endgroup\$ Commented Oct 31, 2014 at 8:04
14
\$\begingroup\$

Answer 23 - APL

 "Hello World!"

Note there's a leading space.
Distance: 7

\$\endgroup\$
1
  • 2
    \$\begingroup\$ the W must be capitalized to print "Hello World!". \$\endgroup\$
    – user32377
    Commented Oct 27, 2014 at 10:18
13
\$\begingroup\$

Answer 5 - Perl

print"Hello World!"

This answer is a distance 6 from the fourth answer.

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

Answer 7 - Bash

echo Hello World!

This is a distance of 7 from the sixth answer.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ A lame distance zero from here would be Batch.... Quick @RandomUserViewingThisComment, go post it! \$\endgroup\$
    – Justin
    Commented Oct 27, 2014 at 6:59
  • \$\begingroup\$ @Quincunx Distance 1 with the @ character. \$\endgroup\$
    – jimmy23013
    Commented Oct 27, 2014 at 7:01
  • \$\begingroup\$ @user23013 Good point; I'm very poorly acquainted with Batch.... But it would work in commandline. \$\endgroup\$
    – Justin
    Commented Oct 27, 2014 at 7:03
  • \$\begingroup\$ @Quincunx Or it will print \nX:\Your\Working\Directory>echo Hello World!\nHello World! in a script. Or I should mean \r\n for \n. \$\endgroup\$
    – jimmy23013
    Commented Oct 27, 2014 at 7:08
  • \$\begingroup\$ @user23013 Oh, that makes sense. \$\endgroup\$
    – Justin
    Commented Oct 27, 2014 at 7:11
13
\$\begingroup\$

Answer 28 - J

]trace=:('Hello World!')

Distance = 5 from Answer 27

\$\endgroup\$
4
  • 1
    \$\begingroup\$ ] + = + : + ' + ' = 5, right? \$\endgroup\$
    – user32377
    Commented Oct 27, 2014 at 10:37
  • 3
    \$\begingroup\$ Sure. Missed it being quick... This type of question surely adds a real time feeling to code challenges :P. \$\endgroup\$
    – jpjacobs
    Commented Oct 27, 2014 at 10:40
  • \$\begingroup\$ one of the oddest notations for a language with such a simple name... \$\endgroup\$
    – CodeManX
    Commented Nov 5, 2014 at 2:15
  • \$\begingroup\$ And J could have been answer 2, by deleting the print and replacing the double with single quotes, ending up with ('Hello World!'). \$\endgroup\$
    – bcsb1001
    Commented Dec 21, 2014 at 17:10
13
\$\begingroup\$

Answer 33 - Extended BF Type III

a#="*#[.>]trac": "@Hello World!

Distance 7 from Answer 32

Well, I have not found an interpreter for that extension but the code seems to fit the specs of the language.

a //ignored
#="*# //comment
[.>] //print each character until an empty cell
trac" //ignored
: //move pointer, do not impact result
 " //ignored
@ //end of source
Hello World! //Injected in cells before execution
\$\endgroup\$
4
  • 1
    \$\begingroup\$ Just so you know, the above answer is invalid as it has a distance of 8. That should be fixable by removing some spaces though, so you might want to fix yours after the other guy does. \$\endgroup\$
    – Scimonster
    Commented Oct 27, 2014 at 12:26
  • 1
    \$\begingroup\$ It's corrected. My apologies. \$\endgroup\$
    – RubberDuck
    Commented Oct 27, 2014 at 12:29
  • 1
    \$\begingroup\$ My answer is also fixed. \$\endgroup\$
    – Michael M.
    Commented Oct 27, 2014 at 12:30
  • 1
    \$\begingroup\$ I got a neat one lined up for this, can't wait for the 8-hour timer. \$\endgroup\$
    – Etheryte
    Commented Oct 27, 2014 at 14:04
13
\$\begingroup\$

Answer 100 - AMPL

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

Distance 6 from Answer 99

\$\endgroup\$
1
  • 8
    \$\begingroup\$ WOOO. #100! Have +10 rep. \$\endgroup\$
    – Kaz Wolfe
    Commented Oct 29, 2014 at 23:04
12
\$\begingroup\$

Answer 8 - Nimrod

echo "\x48ello World!"

Distance of 6 from the last answer.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ There's not supposed to be a comma. \$\endgroup\$
    – feersum
    Commented Oct 27, 2014 at 7:04
12
\$\begingroup\$

Answer 14 - Lua

#[put
print("Hello World!")

Distance = 7

\$\endgroup\$
2
  • 8
    \$\begingroup\$ Aaand we're back to the start, good job. \$\endgroup\$
    – Etheryte
    Commented Oct 27, 2014 at 9:04
  • \$\begingroup\$ hi @Timmy, I'm sorry but I had to change my answer from print to cat. \$\endgroup\$
    – Zaenille
    Commented Oct 27, 2014 at 9:04
12
\$\begingroup\$

Answer 21 - Haskell

putStrLn "Hello World!"

Distance: 7

\$\endgroup\$
5
  • 4
    \$\begingroup\$ Am I the only one who thinks Haskell's version of print is dafter than LOLCODE's? \$\endgroup\$
    – Pharap
    Commented Oct 28, 2014 at 8:30
  • 5
    \$\begingroup\$ @Pharap: Haskell's version of print is called print, and it does something rather un-daft: print some value, of any¹ type – but in valid Haskell notation! So print 5 yields 5 as output, and print "Hello World!" yields "Hello World!"; but the challenge asked for Hello World, without quotation marks (which wouldn't be valid Haskell). \$\endgroup\$ Commented Oct 28, 2014 at 10:43
  • 3
    \$\begingroup\$ @Pharap ¹It doesn't actually work with any type, only with Showable types. \$\endgroup\$ Commented Oct 28, 2014 at 10:45
  • 1
    \$\begingroup\$ @leftaroundabout Well, suum cuique pulchrum est I suppose. \$\endgroup\$
    – Pharap
    Commented Oct 28, 2014 at 10:52
  • \$\begingroup\$ @ceasedtoturncounterclockwis data W=World;data H=Hello W; Hello World \$\endgroup\$ Commented Dec 8, 2017 at 4:27
12
\$\begingroup\$

Answer 26 - TI-BASIC (NSpire)

Disp "Hello World!"

Distance: 5 from answer 25

(Tested on a TI-NSpire calculator)

\$\endgroup\$
2
  • 2
    \$\begingroup\$ I see you have an NSpire calculator; that should be noted in the title as TI-83/84/+/SE do not have lowercase letters. \$\endgroup\$
    – Timtech
    Commented Oct 27, 2014 at 11:15
  • 3
    \$\begingroup\$ @Timtech They actually do have lowercase letters. If you have MirageOS or another custom OS, you can enable them. Here's a screenshot of a program I wrote a while ago that uses lowercase letters. \$\endgroup\$
    – wchargin
    Commented Oct 28, 2014 at 19:20
11
\$\begingroup\$

Answer 29 - MS Windows Powershell

#]trace=:(
'Hello World!'

Distance = 3 from Answer 28

\$\endgroup\$
2
  • 4
    \$\begingroup\$ Actually, I liked how the punk-haired smiley just appeared... =:( \$\endgroup\$
    – agtoever
    Commented Oct 28, 2014 at 10:59
  • 2
    \$\begingroup\$ From this point on, the answers accumulate junk (usually commented out). Answer 85 (GDB) added a "main", and the answers eventually reached C and then Java. \$\endgroup\$
    – kernigh
    Commented Nov 21, 2014 at 22:07
11
\$\begingroup\$

Answer 42 - FALSE

{#ah="*#[.>]trac";cat<<@
#&&alert 
?} "Hello World!
"

Levenshtein distance from #41 is 7. Tested with this online implementation of FALSE. I used some leftover edit-distance slots to remove some cruft...

\$\endgroup\$
2
  • \$\begingroup\$ I should have done some of that cruft cleaning myself, but I can't now. I'd break the chain. \$\endgroup\$
    – TecBrat
    Commented Oct 28, 2014 at 15:00
  • 3
    \$\begingroup\$ random upvote for being answer 42 - the answer is false :P \$\endgroup\$
    – CodeManX
    Commented Nov 5, 2014 at 2:24
11
\$\begingroup\$

Answer 150 - MuPAD

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

Distance 6 from answer 149.

EDIT: Added “ h” to move the chain forward.

\$\endgroup\$
2
  • \$\begingroup\$ Ah... If you could have just put an h after the String[], next answer would have been in Java ;) \$\endgroup\$
    – Optimizer
    Commented Nov 4, 2014 at 15:45
  • 2
    \$\begingroup\$ In the interest of getting a long chain, I guess I'll just cheat and edit that in right now. ;-) \$\endgroup\$ Commented Nov 4, 2014 at 15:47
10
\$\begingroup\$

Answer 30 - K

/#]trac
"Hello World!"

Distance: 7 from Answer 29

I think this works, an interpreter is here (Kona). / begins a one-line comment in K. I've cleaned up some of the #]trace=:( mess.

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

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.