Evolution of Powers of Two

34

7

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

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 2^n (with 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).

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

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 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^n and no other characters. (Leading/trailing whitespace is fine, as is unsuppressible output like >>> or ans=)
  • If your language doesn't have stdout use whatever is commonly used for quickly outputting text (e.g. console.log or alert in JavaScript).
  • 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.

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.

Edit these when you post an answer:

Leaderboard

13 languages

Okx

8 languages

zeppelin

4 languages

Pavel
Jonathan Allan
Kritixi Lithos
Riker

3 languages

boboquack

2 languages

bmarks
Conor O'Brien
Destructible Watermelon
ovs
Tom Carpenter

1 language

ATaco
Blocks
Dennis
dzaima
Erik the Outgolfer
ETHproductions
ghosts_in_the_code
Leo
Lynn
Matheus Avellar
Nathaniel
Qwerp-Derp
R. Kap
Taylor Scott
nimi
Mistah Figgins
PidgeyUsedGust
steenbergh

Languages used so far:

  1. C# (Pavel)
  2. /// (boboquack)
  3. Retina (Dennis)
  4. Jelly (Jonathon Allan)
  5. Pyth (boboquack)
  6. ><> (Destructible Watermelon)
  7. Minkolang (Kritixi Lithos)
  8. Perl (Pavel)
  9. Python (Qwerp-Derp)
  10. dc (R. Kap)
  11. Charcoal (Jonathon Allan)
  12. Self Modifying BrainFuck (Leo)
  13. SOGL (dzaima)
  14. ShapeScript (Jonathon Allan)
  15. Pyke (boboquack)
  16. Ruby (Nathaniel)
  17. 05AB1E (ovs)
  18. STATA (bmarks)
  19. bc (Kritixi Lithos)
  20. Japt (Okx)
  21. 2sable (Kritixi Lithos)
  22. Cheddar (Jonathon Allan)
  23. Pylons (Okx)
  24. Bash (zeppelin)
  25. Pushy (Okx)
  26. CJam (Erik the Outgolfer)
  27. MATL (Okx)
  28. MATLAB (Tom Carpenter)
  29. Octave (Kritixi Lithos)
  30. R (ovs)
  31. JavaScript ES7 (Tom Carpenter)
  32. Convex (Okx)
  33. Mathematica (ghosts_in_the_code)
  34. Pip (Okx)
  35. Stacked (Conor O'Brien)
  36. GolfScript (Okx)
  37. Actually (Lynn)
  38. RProgN (Okx)
  39. Scheme (bmarks)
  40. Element (Okx)
  41. J (Blocks)
  42. Cubix (ETHproductions)
  43. zsh (zeppelin)
  44. VBA (Taylor Scott)
  45. Fish (zeppelin)
  46. Reticular (Okx)
  47. Perl 6 (Pavel)
  48. RProgN2 (ATaco)
  49. PHP (Matheus Avellar)
  50. Jolf (Conor O'Brien)
  51. Haskell (nimi)
  52. Befunge-98 (Mistah Figgins)
  53. Gnuplot (zeppelin)
  54. QBIC (steenbergh)
  55. FOG (Riker)
  56. Qwerty-RPN (Okx)
  57. Korn Shell (ksh) (zeppelin)
  58. Julia (Riker)
  59. Python 3 (Pavel)
  60. Vimscript (Riker)
  61. Dash (zeppelin)
  62. Vitsy (Okx)
  63. csh (zeppelin)
  64. Ohm (Okx)
  65. Bosh (zeppelin)
  66. es-shell (Riker)
  67. Gol><> (PidgeyUsedGust)

This question works best when you sort by oldest.

Pavel

Posted 2017-02-26T05:36:14.223

Reputation: 8 585

2A snippet would really be nice – user41805 – 2017-02-26T06:58:20.433

@KritixiLithos I don't know how to do those, feel free to edit one in though! – Pavel – 2017-02-26T06:59:24.127

For a snippet, you'd need to specify a default answer heading format – boboquack – 2017-02-26T07:06:38.073

Does it matter if there is ans = in the output - i.e. like: https://i.stack.imgur.com/Asn1g.png? I should have checked that before I posted and subsequently deleted 26 (apologies Okx). If it doesn't then 26/27 could be put back unless somebody does another one before we find out.

– Tom Carpenter – 2017-02-26T11:42:43.870

@TomCarpenter the question states that The output should only be 2^n and no other characters. (Leading/trailing whitespace is fine) – Okx – 2017-02-26T12:55:33.277

Can the output be like so: 1.07374e9 instead of instead of a really long number? – Blocks – 2017-02-26T18:44:20.400

@Blocks That is acceptable, I'm editing the question to reflect that. – Pavel – 2017-02-26T18:53:28.983

1@TomCarpenter that is acceptable, I'm going to make the edit. – Pavel – 2017-02-26T18:53:49.607

1Does "Levenshtein distance will be measured in UTF-8 characters" mean that the edit distance is computed between strings of Unicode codepoints (and the "UTF-8" is a red herring, since in this sense it doesn't matter whether you use UTF-8, UTF-16, UCS4 or something else)? – Sami Liedes – 2017-02-27T17:19:53.577

1@SamiLiedes pavel responded in chat, it's just unicode codepoints yeah. (i.e. if the code point is different, it's a character difference) – Rɪᴋᴇʀ – 2017-02-28T23:17:33.013

I extracted the codes. I believe the edit distance of #18 is 12 and that of #44, #47, #52, #57, #60 and #66 is 11. Turns out computing edit distances by hand is error prone. – Sami Liedes – 2017-03-02T22:25:43.883

@SamiLiedes why is 18 a distance of 12? 10 chars were added. I think your code borked. – Rɪᴋᴇʀ – 2017-03-13T23:56:46.847

@TomCarpenter also, I know it's much belated, but meta says that's ok as long as it's part of your default answer format. (i.e. you can't print 'ans =', but if returning a value automatically outputs that it's ok) – Rɪᴋᴇʀ – 2017-03-14T00:03:12.960

@Riker: Yeah, it counted whitespace differences at ends of line too. – Sami Liedes – 2017-03-14T14:23:46.480

@SamiLiedes ah, though I'm pretty sure that's unintentional. Oh well. – Rɪᴋᴇʀ – 2017-03-14T14:24:54.667

Answers

5

Answer 64, Ohm, distance 10

64º,;S)1'a"bc"<<x
2^63 
x
#??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ 
exit
 @n.out (*2 32#e#a44******O@) //2 25)
"e
"2ej
:py print(2**60)
"%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Added 64º,;S)1'a

Only the 64º, is actual code, the rest is just junk.

This program will print the correct output, but it will also ask for some STDIN after it has printed 264.

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

How in the world has this gone on? Nice job. – David Archibald – 2017-04-17T04:54:59.060

5

Answer 17: 05AB1E, Distance of 3

#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
#1024p#rint(512);
#0}}//4|
#β”6904”±r«"$2 
puts 16384 8*

Try it online!

ovs

Posted 2017-02-26T05:36:14.223

Reputation: 21 408

Well done on exploiting the fact the 05AB1E doesn't throw errors. – Okx – 2017-02-26T11:32:35.623

5

Answer 24: Bash, distance 8

#23#2ej
printf $[2**24]
#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
#1024p#rint(512);
#0}}//4|
#ß”6904”±r«"$2 
#puts 16384 8*di 2^18o8*'

Try It Online !

zeppelin

Posted 2017-02-26T05:36:14.223

Reputation: 7 884

5

Answer 51, Haskell, distance 10

--2@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`(expt 2 39); ^ exit @n.out (*2 32#e#a44******O@)//2 25)#e#2ej#printf("% $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024
print(2^51)--;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Remove 2 NL, replace ^ at the beginning with -, prepend another -, delete * within the print, replace 2nd * with ^, overwrite 49with 51, insert -- after the print.

nimi

Posted 2017-02-26T05:36:14.223

Reputation: 34 639

You removed the newlines...i cri evry tim – Pavel – 2017-02-27T03:53:07.940

seriously why did you remove the newlines – Destructible Lemon – 2017-02-27T03:53:52.350

Because haskell comments are --, so it's a lower edit distance than prepending -- twice. – Pavel – 2017-02-27T03:54:38.213

@DestructibleWatermelon: line comment -- is 2 bytes, removing NL just 1 – nimi – 2017-02-27T03:54:53.983

5

Answer 67, Gol><>, distance 6

We van use the trampoline # to just append the code in reverse. By removing S)1'a the ; can be reused, needing only 6 characters to be added.

#64º,;n*:"C"
"bc"<<x
2^66
x
#??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ 
quit()
@n.out (*2 32#e#a44******O@) //2 25)
"e
"2ej
:
py 
p
riker
i
n
t
(2**60)
"%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#

Try it online!

I think keeping the # allows for some other languages to use it as a commented line.

PidgeyUsedGust

Posted 2017-02-26T05:36:14.223

Reputation: 631

Just FWIW, if a bounty is given for the last answer your answer probably won't get it. The general winner of answer chaining challenges is either the last answerer that remains last for 1-2 wks, or the person with the most answers. – Rɪᴋᴇʀ – 2017-03-14T14:16:11.413

1Don't really care for the bounty — just thought it'd be a shame to let this die. – PidgeyUsedGust – 2017-03-14T16:14:15.900

4

Answer 3: Retina, distance 3

/class HelloWorld {static void Main() {
    System.Console.Write(2);
}}//4|
8

Appended |\n8 (distance 3).

Try it online!

Dennis

Posted 2017-02-26T05:36:14.223

Reputation: 196 637

4

Answer 4: Jelly distance 3

/class HelloWorld {static void Main() 0{
    System.Console.Write(2);
0}}//4|
8Ḥ

Try it online!

all insertions: 00Ḥ.

0{ and 0} are there to suppress parsing errors (pop from empty list due to the { and } being quicks that turn monads into dyads using the left and right argument respectively).

"unhalves" 8 to make 16.

Jonathan Allan

Posted 2017-02-26T05:36:14.223

Reputation: 67 804

1Why does the first { (after class HelloWorld) not need a 0 before it, but the other two do? – Pavel – 2017-02-26T06:28:12.353

Each line is parsed as a link (function) before anything runs, the final one being the entry point to the program. The parser would be fine without the () before the second open brace on the first line. The third line cannot start with a brace as there is no monad on which to act. – Jonathan Allan – 2017-02-26T06:36:49.043

4

Answer 5: Pyth

32 "/class HelloWorld {static void Main() 0{
    System.Console.Write(2);
0}}//4|
8Ḥ

Prints the numeric literal 32, then the space between the 2 and the " suppresses printing of the (auto-completed) string literal.

+4 characters - 32 "

Try it on herokuapp

boboquack

Posted 2017-02-26T05:36:14.223

Reputation: 2 017

4

Answer 6 - ><>

32""/class HelloWorld {static void Main() 0{;n***~
    System.Console.Write(2);
0}}//4|
8Ḥ

replaced a space with ", the code pushes 3, 2, 4, then reverses, pushes 4,2,3, then pops 3 off the stack, and multiplies 2, 4, 4, 2, for 64, outputs it and halts

Try it online

maybe use https://www.fishlanguage.com/playground

Destructible Lemon

Posted 2017-02-26T05:36:14.223

Reputation: 5 908

3

Answer 8: Perl

#327;N.""/class HelloWorld {static void Main() 0{;n***~
#    System.Console.
print(256);
#0}}//4|
#8Ḥ

Exactly distance of 10: +4 # for comments, +1 newline after System.Console., +3 for transforming write into print, +2 for turning 2 into 256.

I wasn't going to participate, but I wanted to make sure some regular langs were added before anything got too insane.

Try it online!

Pavel

Posted 2017-02-26T05:36:14.223

Reputation: 8 585

3

Answer 20: Japt, distance 8

2**20$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
#1024p#rint(512);
#0}}//4|
#ß”6904”±r«"$2 
#puts 16384 8*di 2^18*/

Try it online!

Modifications:

Changed 2^19 to 2**20 at the start of the program, to calculate the power (4)

Replaced # with $ on the first line so that everything past it is interpreted as JS (1)

On the last line, removed the / and added a */ at the end of the program, so the comment takes up the whole program (3)

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

Sorry, my answer above was incorrect. The last digit should be 8 instead of 7. – bmarks – 2017-02-26T09:35:05.343

@bmarks Thanks, edited. – Okx – 2017-02-26T09:35:52.557

3

Answer 27: MATL, distance 4

27W%2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß”6904”±r«"$2 #puts 16384 8*di 2^18o8*'

Try it online!

Added 27W%

Explanation:

  W   2 to the power of
27    27
   %  Start of single line comment

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

3

Answer 42: Cubix, distance 8

2^41 NB.`(expt 2 39); ^ exit @ⁿ.óout (*2 32#e#a44******O@)//2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Try it online!

The lert(2**31 in the middle was changed to 44******O@.

ETHproductions

Posted 2017-02-26T05:36:14.223

Reputation: 47 880

3

Answer 49: PHP, distance 6

<?#"#28@P2*Jp;math 2\^45#2^41 NB.`(expt 2 39); ^ exit @n.óout (*2 32#e#a44******O@)//2 25)#e#2ej#printf("% $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.#1024
print(2**49);#0}}//4|
#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Added <? and ?> to open and close PHP tags, respectively.

Replaced 48 with 49.

# starts a comment on PHP, so nothing is considered except for

<? print(2**49); ?>

Here's a screenshot of proper syntax highlihgting and output to help visualize:

screenshot

Matheus Avellar

Posted 2017-02-26T05:36:14.223

Reputation: 273

3

Answer 50: Jolf, distance 10

^2@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`(expt 2 39); ^ exit @n.out (*2 32#e#a44******O@)//2 25)#e#2ej#printf("% $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.#1024
print(2**49);#0}}//4|
#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Try it here!

Prepended ^2@2( (+5)

Removed ± and ß from #ß6904±r (+2)

Removed ó from óout (+1)

Removed <? from <?#"#28@P2* (+2)

Total: 10. Remove all the non-ASCII characters!

Explanation

( stops parsing, so the code looks like:

^2@2
^      exponentiate
 2     two
  @2   to the 50 (char code of 2)

Conor O'Brien

Posted 2017-02-26T05:36:14.223

Reputation: 36 228

3

Answer 52. Befunge-98, distance 8 + 2

Thanks to @DestructibleWatermelon for golfing a byte!

--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`(expt 2 39); ^ exit @n.out (*2 32#e#a44******O@)//2 25)#e#2ej#printf("%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024
print(2^51)--;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Try it Online!

Added '3k before the 2, and '2k*. between the 2 and @.

-- does nothing,
'3k2 puts 52 2s onto the stack, and
'2k*.@ multiplies them together, prints the number, and exits

Also, I added a d" after printf("% to make other people's lives easier, as I had 2 extra characters. It doesn't affect the Befunge-98 program.

MildlyMilquetoast

Posted 2017-02-26T05:36:14.223

Reputation: 2 907

3

Answer 60, Vimscript, distance 10

"bc<<<2^57 #x??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ exit @n.out (*2 32#e#a44******O@) //2 25)
"e
"2ej
:py print(2**60)
"%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Changed the 2 # on the start of the middle two lines to ", added a " in front of the first line, and :py<space> in front of the last line.

For clarification:

" is a line comment in vimscript (at least at the start of a line), and doesn't need to be matched.

Vim can run python code, so this is really equivalent to asking python for the answer.

Rɪᴋᴇʀ

Posted 2017-02-26T05:36:14.223

Reputation: 7 410

If this is running Python code, why doesn't this error, like everywhere? – Pavel – 2017-02-27T19:27:38.360

@Pavel only the last line is run as python code. – Rɪᴋᴇʀ – 2017-02-27T19:27:56.663

Sorry, made that comment before you fixed it. – Pavel – 2017-02-27T19:29:24.640

2

Answer 2: ///

/class HelloWorld {static void Main() {
    System.Console.Write(2);
}}//4

+4 chars - ///4

Try it online!

boboquack

Posted 2017-02-26T05:36:14.223

Reputation: 2 017

Regarding the answer you deleted: I changed the 8 hour requirement to a more subjective "Just try not to post too much". Feel free to undelete. – Pavel – 2017-02-26T06:47:59.570

@Pavel I want to post another answer again! :P – boboquack – 2017-02-26T07:16:12.723

@boboquack In regards to the edit to the question you just proposed: Different versions of the same language count as the same language. Listing "Python" alone under "Languages used..." seems to be good enough. – R. Kap – 2017-02-26T08:05:33.353

@R.Kap Thanks, that actually wasn't what I intended to edit in. The browser just auto-saved an earlier unproposed edit of the post where I copied language names, just to notice you already edited in the language names. When I went to add the multi-posters to the list, my saved version came up without my knowing. – boboquack – 2017-02-26T08:08:02.337

2

Answer 7: Minkolang, Distance: 4

327;N.""/class HelloWorld {static void Main() 0{;n***~
    System.Console.Write(2);
0}}//4|
8Ḥ

Try it online!

I added 7;N. to the program. Basically 3, 2 and 7 are pushed to the stack and then 2 is raised to the seventh power using ;. This is then outputted as a Number and then the program stops on the .

user41805

Posted 2017-02-26T05:36:14.223

Reputation: 16 320

2

Answer 10: dc, Distance of 5

#327;N.""/class HelloWorld {static void Main() 0{;n***~
#    System.Console.
1024p#rint(512);
#0}}//4|
#8

Here is a valid dc program which outputs 1024.

Try it online!

R. Kap

Posted 2017-02-26T05:36:14.223

Reputation: 4 730

That's not how the challenge works, yours is the 10th answer and should print 2^10 – Leo – 2017-02-26T07:30:45.467

@Leo Oh, sorry about that. That's what I get for not reading the post properly. EDIT: It has been updated – R. Kap – 2017-02-26T07:33:26.393

2

Answer 11: Charcoal, distance 5

A#327;N.""/class HelloWorld {static void Main() 0{;n***~
#    System.Console.
1024p#rint(512);
#0}}//4|
β2048

Try It Online!

The uppercase Greek letters and β are variables which are assigned the ASCII characters following. The final value is implicitly printed.

Jonathan Allan

Posted 2017-02-26T05:36:14.223

Reputation: 67 804

Wait, why did you change yours to answer 10? Mine was the 10th answer. – R. Kap – 2017-02-26T07:35:10.707

@R.Kap I have moved back to 11 with an edit like I made before. – Jonathan Allan – 2017-02-26T07:39:56.040

Just a note, if you happen to use Charcoal in the future (clear) is shorter – ASCII-only – 2017-05-19T11:34:43.817

@ASCII-only Ah, right - thanks! – Jonathan Allan – 2017-05-19T17:35:31.613

2

Answer 12: Self-modifying Brainfuck

A#327;N<.""/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
1024p#rint(512);
#0}}//4|
#β6904

Try it online!

SMBF is just like brainfuck, except the source code is available on the tape to the left of the starting position. Here we have the number to print in reverse at the end of the code, and we do <. four times to print all four digits.

I added a < before each . in the code (there were 3 of them), an extra <., and modified the final number. Distance should be 8.

Leo

Posted 2017-02-26T05:36:14.223

Reputation: 8 482

2

Answer 29: Octave, Distance: 1

disp(2^29)%2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß”6904”±r«"$2 #puts 16384 8*di 2^18o8*'

Try it online!

All I had to do was to change the 28 to 29

user41805

Posted 2017-02-26T05:36:14.223

Reputation: 16 320

2

Answer 31: JavaScript ES7, Distance 7

alert(2**31)//2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß”6904”±r«"$2 #puts 16384 8*di 2^18o8*'

ES7 supports the ** operator for power.

You can try online here.

Tom Carpenter

Posted 2017-02-26T05:36:14.223

Reputation: 3 990

2

Answer 33: Mathematica, distance 9

2^33 (*2 32#e#alert(2**31)//2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß”6904”±r«"$2 #puts 16384 8*di 2^18o8*'*)

Explanation

Puts everything inside comments and outputs 2^33

Please verify that this answer is valid before putting your own because I am new at this and don't want to end up breaking the chain.

ghosts_in_the_code

Posted 2017-02-26T05:36:14.223

Reputation: 2 907

2

Answer 37: Actually, distance 7

2:37@ⁿ.óout (*2 32#e#alert(2**31)//2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Replaced   36?# with :37@ⁿ.ó.

Try it online!

Lynn

Posted 2017-02-26T05:36:14.223

Reputation: 55 648

2

Answer 38: RProgN, distance 10

2 38 ^ exit @ⁿ.óout (*2 32#e#alert(2**31)//2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Try it online!

Replaced 2:37 with 2 38 ^ exit (10) (note the trailing space)

Explanation:

2            2
     ^       to the power of
  38         38
       exit  Stop the prgram

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

2

Answer 47: Perl 6, distance 10

#28@P2*Jp;math 2\^45#2^41 NB.`(expt 2 39); ^ exit @n.óout (*2 32#e#a44******O@)//2 25)#e#2ej#printf("% $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.#1024
print(2**47);#0}}//4|
#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Perl 6 is considered distinct from Perl. I tried to set up C down the road by adding "% after printf, hopefully someone uses that.

Try it online!

Pavel

Posted 2017-02-26T05:36:14.223

Reputation: 8 585

2

Answer 48: RProgN2, distance 9

"#28@P2*Jp;math 2\^45#2^41 NB.`(expt 2 39); ^ exit @n.óout (*2 32#e#a44******O@)//2 25)#e#2ej#printf("% $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.#1024
print(2**47);#0}}//4|
#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^

Added a " to the start which stopped everything from breaking, the [[[ at the end clears the memory, and 268*^ calculates the new answer. Implicitly printed.

Try it online!

ATaco

Posted 2017-02-26T05:36:14.223

Reputation: 7 898

Are you sure this counts? I already posted an RProgN version 1 answer, and I don't think multiple versions of the same language are allowed. – Okx – 2017-02-27T00:05:28.680

RProgN 2 is a full rework of RProgN 1, Much like how Perl 6 is considered different enough from Perl 5, this is considered valid. – ATaco – 2017-02-27T00:11:12.283

2

Answer 66, es (shell) + bc, distance 8

#64º,;S)1'a
"bc"<<x
2^66
x
#??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ 
quit()
@n.out (*2 32#e#a44******O@) //2 25)
"e
"2ej
:
py 
p
riker
i
n
t
(2**60)
"%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Changed exit to quit(), and added iker after the first r. I couldn't resist and I wanted to add 4 more characters.

Rɪᴋᴇʀ

Posted 2017-02-26T05:36:14.223

Reputation: 7 410

But we need to work towards a goal ;_; – Destructible Lemon – 2017-03-01T00:19:39.393

That sounds like a distance of 8 to me. – Sami Liedes – 2017-03-01T08:42:25.533

@SamiLiedes you're right, fixing. – Rɪᴋᴇʀ – 2017-03-01T14:31:40.900

1

Answer 1: C#

class HelloWorld {static void Main() {
    System.Console.Write(2);
}}

Pro tip: comment out what you don't need.

Try it online!

Pavel

Posted 2017-02-26T05:36:14.223

Reputation: 8 585

1

Answer 9: Python 2

#327;N.""/class HelloWorld {static void Main() 0{;n***~
#    System.Console.
print(512);
#0}}//4|
#8

A very simple port of Perl to Python, with a distance of 4.

Try it online!

clismique

Posted 2017-02-26T05:36:14.223

Reputation: 6 600

1Just saying, you could have done *2 for a distance of 2 – user41805 – 2017-02-26T07:19:14.940

1@KritixiLithos True, but it's below 10 anyway and Python 2 complained about the non-UTF8 char at the end. – clismique – 2017-02-26T07:19:53.633

@Qwerp-Derp Don't you mean non-ASCII character? is a UTF-8 character – Okx – 2017-02-26T11:30:22.577

1

Answer 15: Pyke

"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
1024p#rint(512);
#0}}//4|
#β”6904”±r«"$2 16384*s

Substitutes two ' for two ", adds two $, substitutes 0* for 2(space) and adds *s. (8)

"A#327;N<." String literal, put on stack "..."$ Is it all lower? No, so put 0 on the stack instead
"/class HelloWorld...#β”6904”±r«" String literal, put on stack
"..."$ Is it all lower? No, so put 0 on the stack instead
2 16384 Numeric literals, put on stack
* Multiply top two numbers on stack, put 32768 on the stack instead
s Sum the whole stack: replace whole stack with 32768
(implicit print stack)

Try it online!

boboquack

Posted 2017-02-26T05:36:14.223

Reputation: 2 017

This has been an exercise in learning a language just enough to get past the challenge :D – boboquack – 2017-02-26T08:38:54.360

1

Answer 18: STATA, distance 10

/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
#1024p#rint(512);
#0}}//4|
#ß”6904”±r«"$2 
puts 16384 8*/di 2^18

Added /* and /di 2^18

bmarks

Posted 2017-02-26T05:36:14.223

Reputation: 2 114

1

Answer 19: bc, 165 bytes, distance: 6

2^19#/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
#1024p#rint(512);
#0}}//4|
#ß”6904”±r«"$2 
#puts 16384 8*/di 2^18

Try it online!

Distance:

  • Hashes on the first and last line (2)
  • 2^19 (4)

user41805

Posted 2017-02-26T05:36:14.223

Reputation: 16 320

Sorry, my answer above was incorrect. The last digit should be 8 instead of 7. – bmarks – 2017-02-26T09:34:44.840

@bmarks Edited the change – user41805 – 2017-02-26T09:36:27.577

1

Answer 21: 2sable, 161 bytes, distance: 3

2**20$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
#1024p#rint(512);
#0}}//4|
#ß”6904”±r«"$2 
#puts 16384 8*di 2^18o8*

Try it online!

Distance:

  • Inserted o (evaluates 2**a where a is the value on top of stack)
  • Inserted 8
  • Removed /

user41805

Posted 2017-02-26T05:36:14.223

Reputation: 16 320

1

Answer 22. Cheddar, distance 10

print 2**22
'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
#1024p#rint(512);
#0}}//4|
#ß”6904”±r«"$2 
#puts 16384 8*di 2^18o8*'

Try it online!

inserted print, changed a 0 to a 2 to print the evaluation of 2**22; inserted a new line and a ' and added a trailing ' wrapping the rest into an unused string.

Jonathan Allan

Posted 2017-02-26T05:36:14.223

Reputation: 67 804

1

Answer 23: Pylons, distance 7

#23#2ejprint 2**22
'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
#1024p#rint(512);
#0}}//4|
#ß”6904”±r«"$2 
#puts 16384 8*di 2^18o8*'

Try it online!

Added #23#2ej to the start of the program.

Explanation:

#23#     Push the number 23 to the stack
    2    Push the digit 2 to the stack
     e   Calculate 2^23
      j  Print stack as a string and terminate the program

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

1

Answer 25: Pushy, distance 4

2 25e#2ej
printf $[2**24]
#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
#1024p#rint(512);
#0}}//4|
#ß”6904”±r«"$2 
#puts 16384 8*di 2^18o8*'

Try it online!

Added 2 25e# to the start of the program, and removed #23#.

Explanation:

2       Push 2
  25    Push 25
    e   Power
     #  Print

I don't have a clue why this works... it just does.

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

I think you've misunderstood how the distance measurement works. – Nathaniel – 2017-02-26T11:56:56.623

Yeah, just noticed the distance is 5, not 4. – Okx – 2017-02-26T11:58:09.073

I think that's correct. (Sorry, it looked like you were subtracting the length of #23# from that of 2 25e#N, but I see now that you weren't doing that at all, my mistake.) – Nathaniel – 2017-02-26T12:00:54.687

2Wow, someone used Pushy... and the reason this doesn't print other things is because it hits the i, which exits the program, before it can spew out anything else. – FlipTack – 2017-02-27T19:31:22.277

@FlipTack I'll try and use it more ;) – Okx – 2017-02-27T19:51:48.647

1

Answer 26: CJam, distance 9

2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß”6904”±r«"$2 #puts 16384 8*di 2^18o8*'

Try it online!

That e# at the start saved me much hassle.

Explanation before the e#:

2 25)# e# Program.
2      e# 2.
  25   e# 25.
    )  e# Increment.
     # e# Power.

Added: )#
Removed: \n\n\n\n\n\n\n

Erik the Outgolfer

Posted 2017-02-26T05:36:14.223

Reputation: 38 134

1

Answer 28: MATLAB, distance 9

disp(2^28)%2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß”6904”±r«"$2 #puts 16384 8*di 2^18o8*'

Helpfully in the last answer, all of the extraneous code was converted into a MATLAB style comment (%) leaving just 27W as code. This can be converted into code for MATLAB using the disp function to display 2^28 without including ans=.


I used this calculator for the Levenshtein distance because it nicely handles multi-line inputs.

Tom Carpenter

Posted 2017-02-26T05:36:14.223

Reputation: 3 990

1

Answer 30: R, Distance of 9

cat(2**30)#2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß”6904”±r«"$2 #puts 16384 8*di 2^18o8*'

Try it online!

ovs

Posted 2017-02-26T05:36:14.223

Reputation: 21 408

1cat(2^30) would have reduced the distance to 7 and is more idiomatic. – Dason – 2017-02-26T15:50:43.490

1

Answer 34: Pip, distance 5

2**34  (*2 32#e#alert(2**31)//2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß”6904”±r«"$2 #puts 16384 8*di 2^18o8*'*

Try it online!

Changed 2^33 to 2**34 (3)

Added a space (1)

Accidentally removed a trailing ) while copying (1)

Explanation:

2**34 is pretty obvious.

Pip counts two spaces as a comment.

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

The mathematica answer had a trailing )--did you remove that? – Conor O'Brien – 2017-02-26T16:00:54.617

That must have been a mistake copying. I'll edit the distance, so as not to force others' answers to change. – Okx – 2017-02-26T16:06:35.087

1

Answer 35: Stacked, distance 10

2  35^out (*2 32#e#alert(2**31)//2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Try it online! Changelog:

changed (+3): 2**34 => 2  35
inserted (+4): 35 => 35^out
removed: (+3): ”6904”±r« => 6904±r

Conor O'Brien

Posted 2017-02-26T05:36:14.223

Reputation: 36 228

1

Answer 36: GolfScript, distance 3

2  36?#out (*2 32#e#alert(2**31)//2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Try it online!

Explanation:

Changed 35 to 36 (1)
Changed ^ to ? (1)
Added # (1)

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

1

Answer 39: Scheme, distance 9

(expt 2 39); ^ exit @ⁿ.óout (*2 32#e#alert(2**31)//2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Added (expt (with trailing space)

Changed 8 to 9

Added );

bmarks

Posted 2017-02-26T05:36:14.223

Reputation: 2 114

Doesn’t this need a print call or something? Or do top-level values get printed in Scheme? (I think that e.g. an answer like 2**39 would be invalid in Python, and this looks similar to that.) – Lynn – 2017-02-26T21:46:50.120

1@Lynn Top level values get printed (or so it appears when I click run in Dr. Racket). – bmarks – 2017-02-27T06:45:32.063

1

Answer 40: Element, distance 6

2 40^`(expt 2 39); ^ exit @ⁿ.óout (*2 32#e#alert(2**31)//2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Try it online!

Added 2 40^`

There are no comments or program terminators added, because Element will only print when it comes across a ` character.

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

1

Answer 41: J, distance: 6

2^41 NB.`(expt 2 39); ^ exit @ⁿ.óout (*2 32#e#alert(2**31)//2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Changed from 2 40^ to 2^41 NB.

Blocks

Posted 2017-02-26T05:36:14.223

Reputation: 141

2This outputs perfectly fine on the official J Android app – Blocks – 2017-02-26T19:17:04.013

Alright then, it counts! – Pavel – 2017-02-26T19:30:03.313

2Looking at this, it also works like echo program|jconsole, which is another way to invoke J code. So it's valid even by that measure. (It has 3 leading spaces, which is fine as per the challenge definition.) – Conor O'Brien – 2017-02-26T19:34:27.003

1

Answer, 43: Zsh, distance 10

#2^41 NB.`(expt 2 39); ^ exit @ⁿ.óout (*2 32#e#a44******O@)//2 25)#e#2ej#
printf $[2**43]
bye
'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n*
**~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Try It Online !

zeppelin

Posted 2017-02-26T05:36:14.223

Reputation: 7 884

Well darn, you beat me to it :P – Taylor Scott – 2017-02-26T19:21:12.567

@ConorO'Brien thanks for the clarification – Jonathan Allan – 2017-02-26T19:40:54.550

1

Answer 44: VBA, Distance 10

Anonymous immediate window routine that takes no input and outputs to the VBE immediate window.

?2^44'#2^41 NB.`(expt 2 39); ^ exit @n.óout (*2 32#e#a44******O@)//2 25)#e#2ej#printf $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Added ?2^43'and recondensed lines

Taylor Scott

Posted 2017-02-26T05:36:14.223

Reputation: 6 709

3Argh, you removed my beloved line breaks again !! – zeppelin – 2017-02-26T19:26:06.710

1

Answer 45: Fish (shell), distance 10

Finally, a command line shell for the 90s

(c) fishshell.com

math 2\^45#2^41 NB.`(expt 2 39); ^ exit @n.óout (*2 32#e#a44******O@)//2 25)#e#2ej#printf $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.#1024p#rint(512);#0}}//4|
#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Note that this does not work on TIO Nexus due to lack of white space in ...45#2..., but works just nice on my fish, version 2.0.0.

zeppelin

Posted 2017-02-26T05:36:14.223

Reputation: 7 884

1

Answer 46: Reticular, distance 9

28@P2*Jp;math 2\^45#2^41 NB.`(expt 2 39); ^ exit @n.óout (*2 32#e#a44******O@)//2 25)#e#2ej#printf $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.#1024p#rint(512);#0}}//4|
#ß6904±r"$2 #puts 16384 8*di 2^18o8*'*

Added 28@P2*Jp;

Explanation:

2         Push 2
 8@P      Push 8th prime 0-indexed (23)
    2     Push 2
     *    Multiply (46)
      J   Exponentiate
       p  Print
        ; Terminate progrma 

Try it online!

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

1

Answer 55: FOG, distance 8

?92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ exit @n.out (*2 32#e#a44******O@)//2 25)#e#2ej
#printf("%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

? does nothing, 92a5* makes 55, 2p@ powers and ends the program, auto-outputting. Also added a newline before #printf.

I inserted 9 before the first 2, 5*2p@ after it.

Rɪᴋᴇʀ

Posted 2017-02-26T05:36:14.223

Reputation: 7 410

1

Answer 54, QBIC, distance 8

?2^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ exit @n.out (*2 32#e#a44******O@)//2 25)#e#2ej#printf("%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>
  • Removed newline
  • Added # after the `
  • Prepended ?2^54┘
  • Removed Herobrine

for a total Levenstein distance of 8.

The # at the start of the previous answer creates a 'silent string literal' in QBIC: it declares and fills A$, but doesn't use it right away. All the code up until the backtick is placed into that string. There is a backtick in that code, so we need to manually add another # to repeat this trick (with B$).

steenbergh

Posted 2017-02-26T05:36:14.223

Reputation: 7 772

1

Answer 57: Korn Shell (ksh), distance 10

bc<<<2^57 #x??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ exit @n.out (*2 32#e#a44******O@) //2 25)
#e
#2ej
#printf("%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Try It Online !

zeppelin

Posted 2017-02-26T05:36:14.223

Reputation: 7 884

1

Answer 61, Dash, distance 10

"bc"<<x
2^61 
x
#??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ 
exit
 @n.out (*2 32#e#a44******O@) //2 25)
"e
"2ej
:py print(2**60)
"%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Changes:

  • Added " after "bc +1
  • Replaced < with a newline +1
  • Appended x +1
  • Replaced 57 with 61 +2
  • Removed # +1
  • Added newline after x +1
  • Added # +1
  • Surrounded exit with newlines +2

Total: 1+1+1+2+1+1+1+2=10

zeppelin

Posted 2017-02-26T05:36:14.223

Reputation: 7 884

Can you add an explanation for what you did? – Pavel – 2017-02-27T19:51:53.003

1

Answer 62: Vitsy, distance 9

297*1-^N;"bc"<<x
2^61 
x
#??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ 
exit
 @n.out (*2 32#e#a44******O@) //2 25)
"e
"2ej
:py print(2**60)
"%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Try it online!

Added 297*1-^N; (9)

Explanation:

2           2
      ^     to the power of
 9          (9
   *        multiplied by
  7         7
     -      minus
    1       one)
       N    print as integer
        ;   terminate program

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

1

Answer 63, C Shell (csh), distance 10

"bc"<<x
2^63 
x
#??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ 
exit
 @n.out (*2 32#e#a44******O@) //2 25)
"e
"2ej
:py print(2**60)
"%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Erased answer #62 by @Okx (sorry !), changed 61 to 63.

zeppelin

Posted 2017-02-26T05:36:14.223

Reputation: 7 884

Dang it, I should've added another character to mess you up :P – Okx – 2017-02-27T20:29:02.520

1

Answer 65, Bosh (Schily Bourne Shell), distance 10

#64º,;S)1'a
"bc"<<x
2^65 
x
#??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ 
exit
 @n.out (*2 32#e#a44******O@) //2 25)
"e
"2ej
:
py 
p
r
i
n
t
(2**60)
"%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Added #, newline in front of bc, replaced 63 with 65, the rest are dummy newlines.

zeppelin

Posted 2017-02-26T05:36:14.223

Reputation: 7 884

1

Answer 68, Jellyfish, distance 10

PC68º,;n*:"C"
BBc"<<x
2**66
x
#??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ 
qut()
@n.out (*2 32#e#a44******O@) //2 25)
"e
"2ej
:
py 
p
r1ker
s
n
t
(2**60)
"%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#

Try it online!

Destructible Lemon

Posted 2017-02-26T05:36:14.223

Reputation: 5 908

0

Answer 13: SOGL 0.8.2, distance 5

A#327;N<.""/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
1024p#rint(512);
#0}}//4|
#β”6904”±r«

A little explanation:

A#327;N<.               do some random stuff
         "...”          push that string
              6904”     push "6904"
                   ±    reverse
                    r   convert to number
                     «  bitshift left

note: to run this you'll have to replace the newlines to ¶ because that's how the interpreter was made to work.

dzaima

Posted 2017-02-26T05:36:14.223

Reputation: 19 048

0

Answer 14 ShapeScript, distance 9

'A#327;N<.""/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
1024p#rint(512);
#0}}//4|
#β”6904”±r«'0*16384

Try it online!

Place everything in a string by enclosing between two 's, multiply that string by 0 with 0* then push the integers 1, 6, 3, 8, and 4 onto the stack, which then gets implicitly printed.

...should be ripe for a change to ...2*16384.

Jonathan Allan

Posted 2017-02-26T05:36:14.223

Reputation: 67 804

0

Answer 16: Ruby, distance 8

#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~
#    System<.Console<.<.
#1024p#rint(512);
#0}}//4|
#β”6904”±r«"$2 
puts 16384*4

added 2 #'s, a newline and puts, and changed s to 4.

Nathaniel

Posted 2017-02-26T05:36:14.223

Reputation: 6 641

1Glad to see I didn't stuff it up! :D – boboquack – 2017-02-26T08:40:26.310

0

Answer 32: Convex, distance 7

2 32#e#alert(2**31)//2 25)#e#2ej#printf $[2**24]#'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024p#rint(512);#0}}//4|#ß”6904”±r«"$2 #puts 16384 8*di 2^18o8*'

Try it online!

Added 2 32#e#.

Explanation:

2       Push 2
  32    Push 32
    #   Power
     e# Line comment

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

0

Answer 53, Gnuplot, distance 5

#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`(expt 2 39); ^ exit @n.out (*2 32#e#a44******O@)//2 25)#e#2ej#printf("%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024
print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

zeppelin

Posted 2017-02-26T05:36:14.223

Reputation: 7 884

0

Answer 56: Qwerty-RPN, distance 7

2 56^#x??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ exit @n.out (*2 32#e#a44******O@)//2 25)#e#2ej
#printf("%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Added 2 56^#x (7)

Explanation:

2       Push 2
 56     Push 56
   ^    Calculate exponent
    #   Print
     x  Terminate program

Unfortunately, there is no online interpreter for this language.

Okx

Posted 2017-02-26T05:36:14.223

Reputation: 15 025

This should be answer 56. – Rɪᴋᴇʀ – 2017-02-27T16:44:51.727

I didn't see the because if I look at the answer above, it says 54. Apparently 55 was posted before 54? It goes 50-55-51-52-53-54 sorted by oldest first. – Okx – 2017-02-27T16:46:18.800

I posted a bad answer, then deleted it. I edited it into a good answer after, but that was after 4 other answers. Look at the rev history. – Rɪᴋᴇʀ – 2017-02-27T16:47:22.757

@Riker well, I guess you messed up the order there! I'll edit my answer anyway. – Okx – 2017-02-27T16:48:04.900

0

Answer 58: Julia, distance 10

#bc<<<2^57 #x??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ exit @n.out (*2 32#e#a44******O@) //2 25)
#e
#2ej
print(2^58) #"%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Try it online!

Rɪᴋᴇʀ

Posted 2017-02-26T05:36:14.223

Reputation: 7 410

0

Answer 59, Python 3, Distance of 3

#bc<<<2^57 #x??92a5*2p@^54┘#--2'3k:'2k*.@2(#"#28@P2*Jp;math 2\^45#2^41 NB.`#(expt 2 39); ^ exit @n.out (*2 32#e#a44******O@) //2 25)
#e
#2ej
print(2**59) #"%d" $[2**43]bye'$/*#"A#327;N<."$"/class HelloWorld {static void Main() 0{;n***~#    System<.Console<.<.#1024print(2**53)--0;#0}}//4|#6904r"$2 #puts 16384 8*di 2^18o8*'*[[[268*^?>

Pavel

Posted 2017-02-26T05:36:14.223

Reputation: 8 585