Skip to main content
Commonmark migration
Source Link

Explanation

###Explanation### HowHow this works:

###Explanation### How this works:

Explanation

How this works:

Added explanation
Source Link
user3094403
  • 8.4k
  • 7
  • 46
  • 71
[' '(..4/++][' '(3*)))))][6`(2*.]['1'..++~][8 2?2/][' '(4/.(`\`\++~]['1'`\`\+~]['1'.+~2?10-][13( 1)?8(( 0)))))*-][6`(1)*]['('(4/2?][' '()]+++++++++++ 

Test onlineTest online

###Explanation### How this works:

  1. [' '(..4/++]
    1. ' '( converts the space to its ASCII code: 32.
    2. .. duplicates 32 twice. Now you have three times 32.
    3. 4/ divides the top 32 by 4. Now you have twice 32 and once 8.
    4. ++ adds up the 32, 32 and 8. You get 72, which is the ASCII code for H.
  2. [' '(3*)))))]
    1. ' '( converts the space to 32.
    2. 3* multiplies the 32 with 3: 96
    3. ))))) increases 96 with 5, you get 101, which is the ASCII code for e.
  3. [6`(2*.]
    1. 6`( gives the ASCII code of the char 6: 54
    2. 2* multiplies it with 2, you get 108, which is the ASCII code for l.
    3. . duplicates the l
  4. ['1'..++~]
    1. '1'.. puts the char 1 on the stack and duplicates it twice.
    2. ++ concatenates the three chars and returns the string 111
    3. ~ converts it to the integer 111, which is the ASCII code for o
  5. [8 2?2/]
    1. 8 2? calculates 82, you get 64
    2. 2/ divides it by 2, you get 32, which is the ASCII code for a space.
  6. [' '(4/.(`\`\+~]
    1. ' '( converts the space to 32.
    2. 4/. divides it by 4, you get 8. The . duplicates it.
    3. (` decrements the second 8 and converts it to a string.
    4. \ swaps the top two elements. The 8 becomes the top element.
    5. ` converts the 8 to a string.
    6. \ swaps the top two elements. The 7 becomes the top element.
    7. + concatenates the two strings. You get 87 (as a string).
    8. ~ converts the string 87 to the integer 87, which is the ASCII code for W.
  7. ['1'.+~2?10-]
    1. '1'. puts the char 1 on the stack and duplicates it.
    2. +~ concatenates the two chars to the string 11 and converts it to an integer.
    3. 2? calculates 112, you get 121.
    4. 10- decreases 121 with 10, you get the ASCII code for o: 111.
  8. [13(1)?8((0)))))*-]
    1. 13( puts 12 on the stack.
    2. 1) puts 2 on the stack.
    3. ? calculates 122, you get 144.
    4. 8(( puts 6 on the stack.
    5. 0))))) puts 5 on the stack.
    6. * multiplies 6 and 5, you get 30.
    7. - substracts 144 with 30, you get 114, which is the ASCII code for r
  9. [6`(1)*]
    1. 6`( converts 6 to a char and takes its ASCII code: 54
    2. 1)* multiplies 54 with 2, you get 108, the ASCII code of l
  10. ['('(4/2?]
    1. '('( converts ( to its ASCII code, 40.
    2. 4/ divides 40 by 4, you get 10.
    3. 2? calculates 102, you get 100, which is the ASCII code for d
  11. [' '()]
    1. ' '( converts the space to its ASCII code: 32
    2. ) increments the 32, you get 33, which is the ASCII code for !
  12. +++++++++++ concatenates all ASCII codes to one string.
[' '(..4/++][' '(3*)))))][6`(2*.]['1'..++~][8 2?2/][' '(4/.(`\`\++~]['1'.+~2?10-][13( 1)?8(( 0)))))*-][6`(1)*]['('(4/2?][' '()]+++++++++++ 

Test online

[' '(..4/++][' '(3*)))))][6`(2*.]['1'..++~][8 2?2/][' '(4/.(`\`\+~]['1'.+~2?10-][13(1)?8((0)))))*-][6`(1)*]['('(4/2?][' '()]+++++++++++ 

Test online

###Explanation### How this works:

  1. [' '(..4/++]
    1. ' '( converts the space to its ASCII code: 32.
    2. .. duplicates 32 twice. Now you have three times 32.
    3. 4/ divides the top 32 by 4. Now you have twice 32 and once 8.
    4. ++ adds up the 32, 32 and 8. You get 72, which is the ASCII code for H.
  2. [' '(3*)))))]
    1. ' '( converts the space to 32.
    2. 3* multiplies the 32 with 3: 96
    3. ))))) increases 96 with 5, you get 101, which is the ASCII code for e.
  3. [6`(2*.]
    1. 6`( gives the ASCII code of the char 6: 54
    2. 2* multiplies it with 2, you get 108, which is the ASCII code for l.
    3. . duplicates the l
  4. ['1'..++~]
    1. '1'.. puts the char 1 on the stack and duplicates it twice.
    2. ++ concatenates the three chars and returns the string 111
    3. ~ converts it to the integer 111, which is the ASCII code for o
  5. [8 2?2/]
    1. 8 2? calculates 82, you get 64
    2. 2/ divides it by 2, you get 32, which is the ASCII code for a space.
  6. [' '(4/.(`\`\+~]
    1. ' '( converts the space to 32.
    2. 4/. divides it by 4, you get 8. The . duplicates it.
    3. (` decrements the second 8 and converts it to a string.
    4. \ swaps the top two elements. The 8 becomes the top element.
    5. ` converts the 8 to a string.
    6. \ swaps the top two elements. The 7 becomes the top element.
    7. + concatenates the two strings. You get 87 (as a string).
    8. ~ converts the string 87 to the integer 87, which is the ASCII code for W.
  7. ['1'.+~2?10-]
    1. '1'. puts the char 1 on the stack and duplicates it.
    2. +~ concatenates the two chars to the string 11 and converts it to an integer.
    3. 2? calculates 112, you get 121.
    4. 10- decreases 121 with 10, you get the ASCII code for o: 111.
  8. [13(1)?8((0)))))*-]
    1. 13( puts 12 on the stack.
    2. 1) puts 2 on the stack.
    3. ? calculates 122, you get 144.
    4. 8(( puts 6 on the stack.
    5. 0))))) puts 5 on the stack.
    6. * multiplies 6 and 5, you get 30.
    7. - substracts 144 with 30, you get 114, which is the ASCII code for r
  9. [6`(1)*]
    1. 6`( converts 6 to a char and takes its ASCII code: 54
    2. 1)* multiplies 54 with 2, you get 108, the ASCII code of l
  10. ['('(4/2?]
    1. '('( converts ( to its ASCII code, 40.
    2. 4/ divides 40 by 4, you get 10.
    3. 2? calculates 102, you get 100, which is the ASCII code for d
  11. [' '()]
    1. ' '( converts the space to its ASCII code: 32
    2. ) increments the 32, you get 33, which is the ASCII code for !
  12. +++++++++++ concatenates all ASCII codes to one string.
Source Link
user3094403
  • 8.4k
  • 7
  • 46
  • 71

GolfScript

[' '(..4/++][' '(3*)))))][6`(2*.]['1'..++~][8 2?2/][' '(4/.(`\`\++~]['1'.+~2?10-][13( 1)?8(( 0)))))*-][6`(1)*]['('(4/2?][' '()]+++++++++++ 

It was quite challenging to create and debug this. It doesn't contain strings, only chars.

It outputs:

Hello World!

Test online