This is a repost of Evolution of “Hello World!”, originally written by user Helka Homba
It should not be closed as a duplicated, due to meta consensus here.
The original was asked over two years ago and was last active more than six months ago. I have permission from Helka Homba to post this here
Since the original, many languages have been invented, and many people have joined the site who have never had an opportunity to answer the original, so I feel that this repost is acceptable.
The challenge is to make a program that prints
2^n to stdout, where
n is the number of your program. The catch is that your program must have a Levenshtein distance of 10 or less from the program in the answer submitted before yours.
How This Will Work
Below I will submit the first answer using C#, which prints 2^(n=1)=
The next person to answer must modify the code with up to 10 single character insertions, deletions, or substitutions so that when it is run in the language of the new answer, it prints
n being the answer number). For example, the 25th answer (let's say it's in Pyth) would print 2^25, or 33554432.
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 10 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).
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 10.
If you answer in some language or the resulting code is just a mess, do please explain what you did and why it works, though this isn't required.
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.
- 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.)
- Try to avoid posting too many answers in a short time frame.
- Each answer must be in a different programming language.
- You may use different major versions of a language, like Python 2/3
- 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 do not have to stick to ASCII, you can use any characters you want. Levenshtein distance will be measured in unicode characters.
- The output should only be
2^nand no other characters. (Leading/trailing whitespace is fine, as is unsuppressible output like
- If your language doesn't have stdout use whatever is commonly used for quickly outputting text (e.g.
- When the power of two you have to output gets very large, you may assume infinite memory, but not an infinite integer size. Please be wary of integer overflows.
- You may make use of scientific notation or whatever your languages most natural way of representing numbers is. (Except for unary, DO NOT output in unary)
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.
Once things settle down, the user who submits the most (valid) answers wins. Ties go to the user with the most cumulative up-votes.
Edit these when you post an answer:
Erik the Outgolfer
Languages used so far:
- C# (Pavel)
- /// (boboquack)
- Retina (Dennis)
- Jelly (Jonathon Allan)
- Pyth (boboquack)
- ><> (Destructible Watermelon)
- Minkolang (Kritixi Lithos)
- Perl (Pavel)
- Python (Qwerp-Derp)
- dc (R. Kap)
- Charcoal (Jonathon Allan)
- Self Modifying BrainFuck (Leo)
- SOGL (dzaima)
- ShapeScript (Jonathon Allan)
- Pyke (boboquack)
- Ruby (Nathaniel)
- 05AB1E (ovs)
- STATA (bmarks)
- bc (Kritixi Lithos)
- Japt (Okx)
- 2sable (Kritixi Lithos)
- Cheddar (Jonathon Allan)
- Pylons (Okx)
- Bash (zeppelin)
- Pushy (Okx)
- CJam (Erik the Outgolfer)
- MATL (Okx)
- MATLAB (Tom Carpenter)
- Octave (Kritixi Lithos)
- R (ovs)
- Convex (Okx)
- Mathematica (ghosts_in_the_code)
- Pip (Okx)
- Stacked (Conor O'Brien)
- GolfScript (Okx)
- Actually (Lynn)
- RProgN (Okx)
- Scheme (bmarks)
- Element (Okx)
- J (Blocks)
- Cubix (ETHproductions)
- zsh (zeppelin)
- VBA (Taylor Scott)
- Fish (zeppelin)
- Reticular (Okx)
- Perl 6 (Pavel)
- RProgN2 (ATaco)
- PHP (Matheus Avellar)
- Jolf (Conor O'Brien)
- Haskell (nimi)
- Befunge-98 (Mistah Figgins)
- Gnuplot (zeppelin)
- QBIC (steenbergh)
- FOG (Riker)
- Qwerty-RPN (Okx)
- Korn Shell (ksh) (zeppelin)
- Julia (Riker)
- Python 3 (Pavel)
- Vimscript (Riker)
- Dash (zeppelin)
- Vitsy (Okx)
- csh (zeppelin)
- Ohm (Okx)
- Bosh (zeppelin)
- es-shell (Riker)
- Gol><> (PidgeyUsedGust)
This question works best when you sort by oldest.