227
55
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
oralert
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
- Optimizer - CJam, Groovy, HTML, Forth, Rebol, Markdown, CASIO BASIC, SpeakEasy, REXX, RegXy, Pawn
- jimmy23013 - GNU dc, Zsh, Burlesque, bc, Hack, GDB, QBasic, MediaWiki Markup, itflabtijtslwi, Squirrel, AGOL 68
7 Answers
- Nit - APL, Clipper, Falcon, MUMPS, FreeBASIC, csh, Dart
- Timmy - Lua, Lisp, Oz, Algoid, KTurtle, Alice, OCaml
6 Answers
- Stacey - VHDL, GNU Octave, M4, Logo, Microsoft Batch, Matlab
- Dennis - Dash, tcsh, TeX, ///, HQ9+-, Alore
5 Answers
4 Answers
- ypnypn - NetLogo, Mouse, Salmon, Maple
- resueman - Clojure, Emacs Lisp, Vimscript, VBScript
- Timtech - AutoLisp, Geom++, BogusForth, owl
3 Answers
- BrunoJ - CoffeeScript, F#, Betterave
2 Answers
- Mig - Extended BF Type III, TCL
- Calvin's Hobbies - Python, E
- Sp3000 - Racket, Pyth
- grc - Haskell, Turing
- es1024 - Nimrod, ksh
- FireFly - FALSE, mIRC script
- g-rocket - AppleScript, LiveCode
- Oriol - AMPL, PARI/GP
- nneonneo - Boo, Caché ObjectScript
Languages used so far:
- Python
- CJam
- PHP
- Pyth
- Perl
- Befunge 98
- Bash
- Nimrod
- Ruby
- GNU dc
- Golfscript
- Mathematica
- R
- Lua
- Sage
- Julia
- Scilab
- JavaScript
- VHDL
- HyperTalk
- Haskell
- LOLCODE
- APL
- M30W
- Stata
- TI-BASIC (NSpire)
- ActionScript 2
- J
- PowerShell
- K
- Visual FoxPro
- VBA
- Extended BF Type III
- Zsh
- Dash
- Clojure
- NetLogo
- Groovy
- CoffeeScript
- Clipper
- B.A.S.I.C.
- FALSE
- fish (shell)
- GNU Octave
- TCL
- E
- newLisp
- Lisp
- SMT-LIBv2
- Racket
- Batsh
- tcsh
- AppleScript
- Mouse
- Pixie
- F#
- Falcon
- Burlesque
- HTML
- SGML
- M4
- MUMPS
- TeX
- Forth
- Salmon
- Turing
- bc
- Betterave
- Scheme
- Emacs Lisp
- Logo
- AutoLISP
- ///
- Rebol
- Maple
- FreeBASIC
- Vimscript
- ksh
- Hack
- mIRC
- Batch
- Make
- Markdown
- sh
- GDB
- csh
- HQ9+-
- Postscript
- Matlab
- Oz
- CASIO BASIC
- VBScript
- QBasic
- Processing
- C
- Rust 0.13
- Dart
- Kaffeine
- Algoid
- AMPL
- Alore
- Forobj
- T-SQL
- LiveCode
- Euphoria
- SpeakEasy
- MediaWiki
- SmallBASIC
- REXX
- SQLite
- TPP
- Geom++
- SQL (postgres)
- itflabtijtslwi
- RegXy
- Opal.rb
- Squirrel
- Pawn
- Scala
- Rebmu
- Boo
- PARI/GP
- Red
- Swift
- BeanShell
- Vala
- Pike
- Suneido
- AWK
- Neko
- AngelScript
- gosu
- V
- ALAGUF
- BogusForth
- Flaming Thunder
- Caché ObjectScript
- owl
- Cardinal
- Parser
- Grin
- Kitten
- TwoDucks
- Asymptote
- CAT
- IDL
- Tiny
- WTFZOMFG
- Io
- MuPAD
- Java
- Onyx
- JBoss
- S+
- Hexish
- yash
- Improbable
- wake
- brat
- busybox built-in shell
- gammaplex
- KTurtle
- AGOL 68
- Alice
- SML/NJ
- OCaml
- CDuce
- Underload
- Simplex v.0.6
- Minkolang 0.9
- Fexl 7.0.3
- Jolf
- Vitsy
- Y
- Retina
- Codename Dragon
- Seriously
- Reng v.3.3
- Fuzzy Octo Guacamole
(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.
@Calvin'sHobbies I think user23013 has more answers, so he is a clear winner here. You can give the bounty to him if you can do me a favor and help me in getting the Populist badge :) Simply accept any of his answer with upvotes > 10 but < 18 – Optimizer – 2015-01-05T23:22:17.183
@Optimizer Very Well, seems like a fair request. – Calvin's Hobbies – 2015-01-06T04:33:36.400
There's a very minor typo- 'Guacamolea' – Matthew Roh – 2017-03-19T15:43:33.883
2I can already see it's going to be really difficult to get a Whitespace answer in here. – Tal – 2014-10-27T06:29:55.307
The only problem I can see with this type of challenge is that it might encourage incremental answer - post an incomplete answer, then edit it to be a proper answer shortly after... – Sp3000 – 2014-10-27T06:39:05.773
61"Sort by oldest" is useful here. – xnor – 2014-10-27T06:39:15.287
@Sp3000 True, but I think that would fall under the "standard loophole" category. – Calvin's Hobbies – 2014-10-27T06:40:38.823
I'm not convinced you're going to get anything interesting here. It's hard to do anything except your language's print command followed by "Hello world." Maybe silly changes like
"Hello"+" world"
. But we'll see... – xnor – 2014-10-27T06:40:51.723How will you know that things got settled down ? :P – Optimizer – 2014-10-27T06:42:33.417
@Quincunx If someone has posted after you already, then no. – Optimizer – 2014-10-27T06:43:08.077
@Quincunx You can but if it is valid it would be better if you didn't. – Calvin's Hobbies – 2014-10-27T06:43:24.370
@xnor That's quite possible. I was trying to make this a lot more interesting but I couldn't think of anything good. I believe this kind challenge could have potential if it asked for the right things. – Calvin's Hobbies – 2014-10-27T06:48:28.127
@Optimizer See? Things have already settled...for 8 hours at least :P – Calvin's Hobbies – 2014-10-27T06:51:55.680
@Calvin'sHobbies - More new users can still answer. Specially the main ones are still sleeping ;) – Optimizer – 2014-10-27T06:52:51.200
8chatroom for discussion on this question – Justin – 2014-10-27T07:04:19.013
4I was hoping to do some HQ9+ here, but... That may be hard. – Kaz Wolfe – 2014-10-27T09:08:49.723
Does changing capitalization increase the distance? – Nit – 2014-10-27T09:42:12.237
1@Nit Yes,
H
andh
are still different characters. – Calvin's Hobbies – 2014-10-27T09:43:23.440Thanks, @Calvin'sHobbies. The answers are coming in so fast that it's hard to get one in. – Nit – 2014-10-27T09:57:24.213
5
@Mew HQ9+ prints the wrong message. But this one... http://esolangs.org/wiki/Huby
– Sp3000 – 2014-10-27T13:55:56.40017
Maybe this can be interesting : http://migl.io/projects/hw/. This list automatically the answers and display their life time.
– Michael M. – 2014-10-27T15:00:30.373@Mig that's neat. but it seems there is a problem with the times given: one would assume they would be increasing (from one answer to the next), or am I wrong? – plannapus – 2014-10-27T15:14:51.240
@plannapus, this is the time elapsed until a next answer is posted. – Michael M. – 2014-10-27T15:30:31.270
@Mig yes I understood that, but then Next Answer = previous answer + 8hours, no? – plannapus – 2014-10-27T15:31:06.903
Does it have to be stdout? That pretty much makes a TeX answer impossible. :( – nyuszika7h – 2014-10-27T18:42:44.577
TeX does have stdout via the
\typeout
macro, but the cost is too big. – nyuszika7h – 2014-10-27T19:31:30.083@nyuszika7h Well, it's only slightly too big. With the right previous answer it could work. – Calvin's Hobbies – 2014-10-27T19:34:26.560
What do you think about the idea of allowing new answers per user once every n answers in addition to the time limit? Not sure how that would work out, just throwing the idea out there. One downside is that it would seriously handicap people who find the question later, however it might prove for a more interesting competition once there's already quite a few answers. – Nit – 2014-10-27T20:14:58.893
@Nit That might work in a future similar question but I'm not changing anything now since the current rules are too well established. Come to chat if you want to discuss more. Comments aren't for extended discussion.
– Calvin's Hobbies – 2014-10-27T20:25:42.663Do multibyte chars count as one or two? – Nit – 2014-10-28T02:07:25.533
3@Nit You can't use them. See rules about printable ASCII. – Calvin's Hobbies – 2014-10-28T02:09:23.633
3C, Java, etc. usually requires some huge prologue
#include <stdio.h>
static final void Main()
etc. Are these required, or could just the print statement (printf
/System.out.println
) be needed? – kennytm – 2014-10-28T13:16:05.147@KennyTM So far, the comments, chat, and answers seem to point to requiring a full program. – Ypnypn – 2014-10-28T15:35:20.697
@KennyTM
#include <stdio.h>
isn't required if you can find at least one compiler which can compile without this line. – jimmy23013 – 2014-10-28T17:06:15.410@Ypnypn I don't think the VHDL answer is a full program – Tymric – 2014-10-28T17:14:54.653
this might be useful – archaephyrryx – 2014-10-29T20:24:42.427
1I think that if anyone has less than 7 distance in their solution, they should dedicate the remaining swaps/removes/adds to cleaning up the code so that it is more portable, just as a public service. – archaephyrryx – 2014-10-30T11:05:41.517
It would be amazing if we could steer this towards the Malbolge "Hello World!" program, which luckily prints that exact text. – archaephyrryx – 2014-10-30T11:24:00.417
5@archaephyrryx Or, alternatively, Java - which would be just as hard. – Sp3000 – 2014-10-30T11:36:40.477
1So now it has come to this that I am unable to answer anymore ;) – Optimizer – 2014-10-31T10:11:56.580
@Optimizer Have you been answering every 8 hours? Wow! – Calvin's Hobbies – 2014-10-31T10:20:12.203
@Mig migl.io/projects/hw is showing only 100 records. Can you fix that? – jimmy23013 – 2014-10-31T12:14:23.510
@user23013, fixed – Michael M. – 2014-10-31T13:14:04.113
1Kinda sucks I can't submit the JRuby answer. It's the same as the Ruby one. At the very end you should display a list of the journey this "Hello World" challenge has taken....and then write a script that implements all of the answers, make a video, and post it on youtube. – Luminous – 2014-10-31T15:07:39.777
I know it's Levenshtein distance, but I keep memorising it as Leiningen distance. – None – 2014-11-03T21:25:57.807
If we reach 500 answers, this question becomes community wiki. Let's go for it!
– gerrit – 2014-11-04T00:06:45.163@gerrit Actually, auto-CW has been removed entirely. Still, 500 wouldn't be a bad milestone ;) – Doorknob – 2014-11-04T01:34:10.810
6@gerrit Cause I could really use 350 more answer notifications... – Calvin's Hobbies – 2014-11-04T01:39:25.910
2@Sp3000 Java is done. ✓ Now for BF and Malbolge … – Christopher Creutzig – 2014-11-05T07:29:34.547
1@Sp3000 I read the spec of Malbolge and found it much harder, since it doesn't have a comment character. It is probably possible if the previous one is WhiteSpace. – jimmy23013 – 2014-11-05T09:36:44.397
Does pseudocode count as a language? – Chase Roberts – 2014-11-13T18:11:09.430
@ChaseRoberts Of course not. – Calvin's Hobbies – 2014-11-13T20:01:34.710