#Hexagony , (削除) 21 (削除ここまで)(削除) 13 (削除ここまで)(削除) 12 (削除ここまで) 10 bytes
Hexagony , (削除) 21 (削除ここまで)(削除) 13 (削除ここまで)(削除) 12 (削除ここまで) 10 bytes
Code:
Saved a lot of bytes thanks to FryAmTheEggman. Code:
P,<0/*;@.>
Or in a more readable form:
P , <
0 / * ;
@ . > . .
. . . .
. . .
Explanation:
The Hexagony program starts at the top-left corner, immediately setting the memory edge to the ASCII value of P, which is 80. After that, we can see that the following path is taken:
We can see that the path taken is: P,<;.P/0....;*/>. After the P, we take a byte of user input. If this is empty, the following branch (<) would direct us to the North East. If the input is non-empty, the branch directs us to the South East. After that, we output the user input using ;. We set the memory edge back to P, which is 80. The zero followed by the mirror is then concatenated to our number, resulting into 800. This is then outputted using the ; command, but first it is taken modulo 256, resulting into 32, which is the space character. After that, we reset the memory edge using the * command and return to loop over the rest of the user input. When we're done with the user input, the path is directed to the North East:
This basically goes to the @ command, which terminates the program.
Using Timwi's amazing HexagonyColorer for making the diagrams.
#Hexagony , (削除) 21 (削除ここまで)(削除) 13 (削除ここまで)(削除) 12 (削除ここまで) 10 bytes
Code:
Saved a lot of bytes thanks to FryAmTheEggman. Code:
P,<0/*;@.>
Or in a more readable form:
P , <
0 / * ;
@ . > . .
. . . .
. . .
Explanation:
The Hexagony program starts at the top-left corner, immediately setting the memory edge to the ASCII value of P, which is 80. After that, we can see that the following path is taken:
We can see that the path taken is: P,<;.P/0....;*/>. After the P, we take a byte of user input. If this is empty, the following branch (<) would direct us to the North East. If the input is non-empty, the branch directs us to the South East. After that, we output the user input using ;. We set the memory edge back to P, which is 80. The zero followed by the mirror is then concatenated to our number, resulting into 800. This is then outputted using the ; command, but first it is taken modulo 256, resulting into 32, which is the space character. After that, we reset the memory edge using the * command and return to loop over the rest of the user input. When we're done with the user input, the path is directed to the North East:
This basically goes to the @ command, which terminates the program.
Using Timwi's amazing HexagonyColorer for making the diagrams.
Hexagony , (削除) 21 (削除ここまで)(削除) 13 (削除ここまで)(削除) 12 (削除ここまで) 10 bytes
Code:
Saved a lot of bytes thanks to FryAmTheEggman. Code:
P,<0/*;@.>
Or in a more readable form:
P , <
0 / * ;
@ . > . .
. . . .
. . .
Explanation:
The Hexagony program starts at the top-left corner, immediately setting the memory edge to the ASCII value of P, which is 80. After that, we can see that the following path is taken:
We can see that the path taken is: P,<;.P/0....;*/>. After the P, we take a byte of user input. If this is empty, the following branch (<) would direct us to the North East. If the input is non-empty, the branch directs us to the South East. After that, we output the user input using ;. We set the memory edge back to P, which is 80. The zero followed by the mirror is then concatenated to our number, resulting into 800. This is then outputted using the ; command, but first it is taken modulo 256, resulting into 32, which is the space character. After that, we reset the memory edge using the * command and return to loop over the rest of the user input. When we're done with the user input, the path is directed to the North East:
This basically goes to the @ command, which terminates the program.
Using Timwi's amazing HexagonyColorer for making the diagrams.
#Hexagony, (削除) 21 (削除ここまで) (削除) 13 (削除ここまで) (削除) 12 (削除ここまで) 10 bytes
Code:
Saved a lot of bytes thanks to FryAmTheEggman. Code:
P,<0/*;@.>
Or in a more readable form:
P , <
0 / * ;
@ . > . .
. . . .
. . .
Explanation:
The Hexagony program starts at the top-left corner, immediately setting the memory edge to the ASCII value of P, which is 80. After that, we can see that the following path is taken:
We can see that the path taken is: P,<;.P/0....;*/>. After the P, we take a byte of user input. If this is empty, the following branch (<) would direct us to the North East. If the input is non-empty, the branch directs us to the South East. After that, we output the user input using ;. We set the memory edge back to P, which is 80. The zero followed by the mirror is then concatenated to our number, resulting into 800. This is then outputted using the ; command, but first it is taken modulo 256, resulting into 32, which is the space character. After that, we reset the memory edge using the * command and return to loop over the rest of the user input. When we're done with the user input, the path is directed to the North East:
This basically goes to the @ command, which terminates the program.
Using Timwi Timwi's amazing HexagonyColorer for making the diagrams.
#Hexagony, (削除) 21 (削除ここまで) (削除) 13 (削除ここまで) (削除) 12 (削除ここまで) 10 bytes
Code:
Saved a lot of bytes thanks to FryAmTheEggman. Code:
P,<0/*;@.>
Or in a more readable form:
P , <
0 / * ;
@ . > . .
. . . .
. . .
Explanation:
The Hexagony program starts at the top-left corner, immediately setting the memory edge to the ASCII value of P, which is 80. After that, we can see that the following path is taken:
We can see that the path taken is: P,<;.P/0....;*/>. After the P, we take a byte of user input. If this is empty, the following branch (<) would direct us to the North East. If the input is non-empty, the branch directs us to the South East. After that, we output the user input using ;. We set the memory edge back to P, which is 80. The zero followed by the mirror is then concatenated to our number, resulting into 800. This is then outputted using the ; command, but first it is taken modulo 256, resulting into 32, which is the space character. After that, we reset the memory edge using the * command and return to loop over the rest of the user input. When we're done with the user input, the path is directed to the North East:
This basically goes to the @ command, which terminates the program.
Using Timwi's amazing HexagonyColorer for making the diagrams.
#Hexagony, (削除) 21 (削除ここまで) (削除) 13 (削除ここまで) (削除) 12 (削除ここまで) 10 bytes
Code:
Saved a lot of bytes thanks to FryAmTheEggman. Code:
P,<0/*;@.>
Or in a more readable form:
P , <
0 / * ;
@ . > . .
. . . .
. . .
Explanation:
The Hexagony program starts at the top-left corner, immediately setting the memory edge to the ASCII value of P, which is 80. After that, we can see that the following path is taken:
We can see that the path taken is: P,<;.P/0....;*/>. After the P, we take a byte of user input. If this is empty, the following branch (<) would direct us to the North East. If the input is non-empty, the branch directs us to the South East. After that, we output the user input using ;. We set the memory edge back to P, which is 80. The zero followed by the mirror is then concatenated to our number, resulting into 800. This is then outputted using the ; command, but first it is taken modulo 256, resulting into 32, which is the space character. After that, we reset the memory edge using the * command and return to loop over the rest of the user input. When we're done with the user input, the path is directed to the North East:
This basically goes to the @ command, which terminates the program.
Using Timwi's amazing HexagonyColorer for making the diagrams.
#Hexagony, (削除) 21 (削除ここまで) (削除) 13 (削除ここまで) (削除) 12 (削除ここまで) 10 bytes
Code:
Saved a lot of bytes thanks to FryAmTheEggman. Code:
P,<0/*;@.>
Or in a more readable form:
P , <
0 / * ;
@ . > . .
. . . .
. . .
Explanation:- Outdated -
The Hexagony program starts at the top-left corner, immediately asking input usingsetting the ,. This accepts 1 byte of information. Ifmemory edge to the input is empty,ASCII value of -1P, which is given instead80. After that, we get to the branch <. If the input is true (positive), the direction will be set to south west. We getcan see that the following looppath is taken:
enter image description here enter image description here
We can see that the path taken is: P,<;P<;.0>;P*P/0....;*/>. After theP, we take a byte of user input. If this is empty, the following branch (<) would direct us to the North East. If the input is non-empty, the branch directs us to the South East. After that, we output the byteuser input using the ;. We set the current memory edge back to 80, using the P (the ASCII value of P, which is 80). We append aThe zero usingfollowed by the 0 and print thismirror is then concatenated to our number, resulting into 800. This is then outputted using the ;. This command, but first it is taken modulo 256, so 800 mod 256 = 32resulting into 32, which is the space character. After thisthat, we reset the memory egde to zeroedge using the *. This actually multiplies the neighbouring memory edges, but since they are both zero, this also returns zero. After this, we go back command and return to loop over the starting position and read another byte using ,. We keep repeating this until there are no bytes leftrest of the user input. This returns -1 as byte andWhen we're done with the followinguser input, the path is then takendirected to the North East:
enter image description here enter image description here
This basically goes to the @ command, which terminates the program.
Using Timwi's amazing HexagonyColorer for making the diagrams.
#Hexagony, (削除) 21 (削除ここまで) (削除) 13 (削除ここまで) (削除) 12 (削除ここまで) 10 bytes
Code:
Saved a lot of bytes thanks to FryAmTheEggman. Code:
P,<0/*;@.>
Or in a more readable form:
P , <
0 / * ;
@ . > . .
. . . .
. . .
Explanation:- Outdated -
The Hexagony program starts at the top-left corner, immediately asking input using the ,. This accepts 1 byte of information. If the input is empty, -1 is given instead. After that, we get to the branch <. If the input is true (positive), the direction will be set to south west. We get the following loop:
We can see that the path taken is: ,<;P.0>;P*. After the <, we output the byte using the ;. We set the current memory edge to 80, using the P (the ASCII value of P is 80). We append a zero using the 0 and print this using ;. This is taken modulo 256, so 800 mod 256 = 32, which is the space character. After this, we reset the memory egde to zero using the *. This actually multiplies the neighbouring memory edges, but since they are both zero, this also returns zero. After this, we go back to the starting position and read another byte using ,. We keep repeating this until there are no bytes left of the input. This returns -1 as byte and the following path is then taken:
This basically goes to the @ command, which terminates the program.
Using Timwi's amazing HexagonyColorer for making the diagrams.
#Hexagony, (削除) 21 (削除ここまで) (削除) 13 (削除ここまで) (削除) 12 (削除ここまで) 10 bytes
Code:
Saved a lot of bytes thanks to FryAmTheEggman. Code:
P,<0/*;@.>
Or in a more readable form:
P , <
0 / * ;
@ . > . .
. . . .
. . .
Explanation:
The Hexagony program starts at the top-left corner, immediately setting the memory edge to the ASCII value of P, which is 80. After that, we can see that the following path is taken:
We can see that the path taken is: P,<;.P/0....;*/>. After theP, we take a byte of user input. If this is empty, the following branch (<) would direct us to the North East. If the input is non-empty, the branch directs us to the South East. After that, we output the user input using ;. We set the memory edge back to P, which is 80. The zero followed by the mirror is then concatenated to our number, resulting into 800. This is then outputted using the ; command, but first it is taken modulo 256, resulting into 32, which is the space character. After that, we reset the memory edge using the * command and return to loop over the rest of the user input. When we're done with the user input, the path is directed to the North East:
This basically goes to the @ command, which terminates the program.
Using Timwi's amazing HexagonyColorer for making the diagrams.