Skip to main content
added 389 characters in body
Source Link
Martin Ender
  • 198.3k
  • 67
  • 455
  • 999

MarioLANG, 1111 8 bytes

;>;:[< =====[^ =: 

This prints a space after each 0 or 1 (as has been clarified is acceptable). The program was tested in the Ruby interpreter. It's not clear whether this behaviour of ^ is according to spec, but it works consistently in this implementation.

As usual, = is just some ground for Mario to walk on.

  • ; reads an integer from STDIN into the current tape cell.
  • > ensures Mario walks right (doesn't do anything at this point).
  • : prints the integer in the current tape cell to STDOUT.
  • [ is a conditional. If the tape cell is 0, Mario skips the next cell (the ^), which will make him fall through the : (printing the 0), off the rightbottom edge and terminate the program (poor Mario). If the tape cell is 1, this does nothing, and execution continues.
  • <^ ensures Mario walks left, i.eis a jump command. turnsIt stops Mario from moving forward and sends him aroundstraight up one cell before he falls back down.
  • [ still does nothing For some reason (at least in this implementation) Mario can jump in mid-air provided there's another cell (even a space) below the jump.
  •   That means Mario repeatedly jumps into the top : prints, printing the 1 again.
  • , falls back down onto the >^ turns Mario around.
  • And now we repeat.and performs another jump. This must be a feature from the popular Super Ninja Brothers spin-off.

MarioLANG, 11 bytes

;>:[< ===== 

This prints a space after each 0 or 1 (as has been clarified is acceptable).

As usual, = is just some ground for Mario to walk on.

  • ; reads an integer from STDIN into the current tape cell.
  • > ensures Mario walks right (doesn't do anything at this point).
  • : prints the integer in the current tape cell to STDOUT.
  • [ is a conditional. If the tape cell is 0, Mario skips the next cell, which will make him fall off the right edge and terminate the program (poor Mario). If the tape cell is 1, this does nothing, and execution continues.
  • < ensures Mario walks left, i.e. turns him around.
  • [ still does nothing.
  •  : prints 1 again.
  • > turns Mario around.
  • And now we repeat...

MarioLANG, 11 8 bytes

;: [^ =: 

This prints a space after each 0 or 1 (as has been clarified is acceptable). The program was tested in the Ruby interpreter. It's not clear whether this behaviour of ^ is according to spec, but it works consistently in this implementation.

As usual, = is just some ground for Mario to walk on.

  • ; reads an integer from STDIN into the current tape cell.
  • [ is a conditional. If the tape cell is 0, Mario skips the next cell (the ^), which will make him fall through the : (printing the 0), off the bottom edge and terminate the program (poor Mario). If the tape cell is 1, this does nothing, and execution continues.
  • ^ is a jump command. It stops Mario from moving forward and sends him straight up one cell before he falls back down. For some reason (at least in this implementation) Mario can jump in mid-air provided there's another cell (even a space) below the jump. That means Mario repeatedly jumps into the top :, printing the 1, falls back down onto the ^ and performs another jump. This must be a feature from the popular Super Ninja Brothers spin-off.
it was a left bracket! (and minor changes to ensure 6 characters were changed)
Source Link

MarioLANG, 11 bytes

;>:[< ===== 

This prints a space after each 0 or 1 (as has been clarified is acceptable).

As usual, = is just some ground for Mario to walk on.

  • ; reads an integerinteger from STDIN into the current tape cell.
  • > ensures Mario walks right (doesn't do anything at this point).
  • : prints the integer in the current tape cell to STDOUT.
  • ][ is a conditional. If the tape cell is 0, Mario skips the next cell, which will make him fall off the right edge and terminate the program (poor Mario). If the tape cell is 1, this doesn't do anythingdoes nothing, and execution continues.
  • < ensures Mario walks left, i.e. turns him around.
  • [ still does nothing.
  • : prints 1 again.
  • > turns Mario around.
  • And now we repeat...

MarioLANG, 11 bytes

;>:[< ===== 

This prints a space after each 0 or 1 (as has been clarified is acceptable).

As usual, = is just some ground for Mario to walk on.

  • ; reads an integer from STDIN into the current tape cell.
  • > ensures Mario walks right (doesn't do anything at this point).
  • : prints the integer in the current tape cell to STDOUT.
  • ] is a conditional. If the tape cell is 0, Mario skips the next cell, which will make him fall off the right edge and terminate the program (poor Mario). If the tape cell is 1, this doesn't do anything, and execution continues.
  • < ensures Mario walks left, i.e. turns him around.
  • [ still does nothing.
  • : prints 1 again.
  • > turns Mario around.
  • And now we repeat...

MarioLANG, 11 bytes

;>:[< ===== 

This prints a space after each 0 or 1 (as has been clarified is acceptable).

As usual, = is just some ground for Mario to walk on.

  • ; reads an integer from STDIN into the current tape cell.
  • > ensures Mario walks right (doesn't do anything at this point).
  • : prints the integer in the current tape cell to STDOUT.
  • [ is a conditional. If the tape cell is 0, Mario skips the next cell, which will make him fall off the right edge and terminate the program (poor Mario). If the tape cell is 1, this does nothing, and execution continues.
  • < ensures Mario walks left, i.e. turns him around.
  • [ still does nothing.
  • : prints 1 again.
  • > turns Mario around.
  • And now we repeat...
Source Link
Martin Ender
  • 198.3k
  • 67
  • 455
  • 999

MarioLANG, 11 bytes

;>:[< ===== 

This prints a space after each 0 or 1 (as has been clarified is acceptable).

As usual, = is just some ground for Mario to walk on.

  • ; reads an integer from STDIN into the current tape cell.
  • > ensures Mario walks right (doesn't do anything at this point).
  • : prints the integer in the current tape cell to STDOUT.
  • ] is a conditional. If the tape cell is 0, Mario skips the next cell, which will make him fall off the right edge and terminate the program (poor Mario). If the tape cell is 1, this doesn't do anything, and execution continues.
  • < ensures Mario walks left, i.e. turns him around.
  • [ still does nothing.
  • : prints 1 again.
  • > turns Mario around.
  • And now we repeat...