Skip to main content
added 283 characters in body
Source Link

!@#$%^&*()_+, 11 bytes

^*( *)+(*@) 

Try it online!

Loses to BF :( Space represents a \x01.

EOF in !@#$%^&*()_+ is -1, so this adds 1 to each character and put them to the stack until a zero is pushed (^*( *)). Then it removes the zero by adding it to another number (+), and output the stack, decrementing each element ((*@)).

This uses * the input command nicely:

  • It adds the input with the stack top, so to add 1 to the input, push 1 and then input saves one byte.
  • EOF is -1, so after you finished reading the input, * can be used for decrement which would otherwise be expensive (_^_).

!@#$%^&*()_+, 11 bytes

^*( *)+(*@) 

Try it online!

Loses to BF :( Space represents a \x01.

EOF in !@#$%^&*()_+ is -1, so this adds 1 to each character and put them to the stack until a zero is pushed (^*( *)). Then it removes the zero by adding it to another number (+), and output the stack, decrementing each element ((*@)).

!@#$%^&*()_+, 11 bytes

^*( *)+(*@) 

Try it online!

Loses to BF :( Space represents a \x01.

EOF in !@#$%^&*()_+ is -1, so this adds 1 to each character and put them to the stack until a zero is pushed (^*( *)). Then it removes the zero by adding it to another number (+), and output the stack, decrementing each element ((*@)).

This uses * the input command nicely:

  • It adds the input with the stack top, so to add 1 to the input, push 1 and then input saves one byte.
  • EOF is -1, so after you finished reading the input, * can be used for decrement which would otherwise be expensive (_^_).
Source Link

!@#$%^&*()_+, 11 bytes

^*( *)+(*@) 

Try it online!

Loses to BF :( Space represents a \x01.

EOF in !@#$%^&*()_+ is -1, so this adds 1 to each character and put them to the stack until a zero is pushed (^*( *)). Then it removes the zero by adding it to another number (+), and output the stack, decrementing each element ((*@)).