Skip to main content
added 789 characters in body
Source Link
FlipTack
  • 14.7k
  • 3
  • 54
  • 101

Cubix, 5 bytes

o'@)^

Explanation comingTry in the online interpreter!

Cubix is a language where (as the name implies) everything is executed on the faces of a cube. This code maps to the following cube:


  o
' @ ) ^
  .

The basic idea of this answer is to get a nearby character and increment it to what we need. In Cubix, @ is the exit command needed to terminate the program, but also conveniently right under 'A' in the ASCII table. This means we can use the character once to mean two different things, saving bytes - here's the order in which the code is run:

  • '@ pushes the character code 64 to the stack.
  • ) increments the top of stack, yielding the desired character.
  • ^ sends the instruction pointer north, wrapping around to...
  • o outputs the top of stack, A.
  • @ terminates the program.

Cubix, 5 bytes

o'@)^

Explanation coming.

Cubix, 5 bytes

o'@)^

Try in the online interpreter!

Cubix is a language where (as the name implies) everything is executed on the faces of a cube. This code maps to the following cube:


  o
' @ ) ^
  .

The basic idea of this answer is to get a nearby character and increment it to what we need. In Cubix, @ is the exit command needed to terminate the program, but also conveniently right under 'A' in the ASCII table. This means we can use the character once to mean two different things, saving bytes - here's the order in which the code is run:

  • '@ pushes the character code 64 to the stack.
  • ) increments the top of stack, yielding the desired character.
  • ^ sends the instruction pointer north, wrapping around to...
  • o outputs the top of stack, A.
  • @ terminates the program.
Source Link
FlipTack
  • 14.7k
  • 3
  • 54
  • 101

Cubix, 5 bytes

o'@)^

Explanation coming.