Flobnar, 6 bytes
~,_@
e
Suggested by Esolanging Fruit, this solution is much shorter, but ends in an error. Thanks!
Below is my old solution, which terminates correctly, but doesn't handle EOF correctly.
Flobnar, 15 bytes
|\<@:
:~
,0
_ ^
###Explanation:
Explanation:
We start at the @, going left. The \ evaluates below it, and stores it in the call stack. This is either the next byte of input from ~, or 0 if it is EOF. Next, it passes through the | to check if the top value of the call stack (:) is non-zero. If it is not, the pointer goes down from the | and returns the top value of the call stack. Otherwise, it goes up and wraps around to the _. This is also a conditional, which first evaluates printing (,) the top of the call stack. Printing always returns 0, so it goes right to the ^ which starts the loop all over again.
Flobnar, 6 bytes
~,_@
e
Suggested by Esolanging Fruit, this solution is much shorter, but ends in an error. Thanks!
Below is my old solution, which terminates correctly, but doesn't handle EOF correctly.
Flobnar, 15 bytes
|\<@:
:~
,0
_ ^
###Explanation:
We start at the @, going left. The \ evaluates below it, and stores it in the call stack. This is either the next byte of input from ~, or 0 if it is EOF. Next, it passes through the | to check if the top value of the call stack (:) is non-zero. If it is not, the pointer goes down from the | and returns the top value of the call stack. Otherwise, it goes up and wraps around to the _. This is also a conditional, which first evaluates printing (,) the top of the call stack. Printing always returns 0, so it goes right to the ^ which starts the loop all over again.
Flobnar, 6 bytes
~,_@
e
Suggested by Esolanging Fruit, this solution is much shorter, but ends in an error. Thanks!
Below is my old solution, which terminates correctly, but doesn't handle EOF correctly.
Flobnar, 15 bytes
|\<@:
:~
,0
_ ^
Explanation:
We start at the @, going left. The \ evaluates below it, and stores it in the call stack. This is either the next byte of input from ~, or 0 if it is EOF. Next, it passes through the | to check if the top value of the call stack (:) is non-zero. If it is not, the pointer goes down from the | and returns the top value of the call stack. Otherwise, it goes up and wraps around to the _. This is also a conditional, which first evaluates printing (,) the top of the call stack. Printing always returns 0, so it goes right to the ^ which starts the loop all over again.
Flobnar, 6 bytes
~,_@
e
Suggested by Esolanging Fruit, this solution is much shorter, but ends in an error. Thanks!
Below is my old solution, which terminates correctly, but doesn't handle EOF correctly.
Flobnar , 15 bytes
|\<@:
:~
,0
_ ^
###Explanation:
We start at the @, going left. The \ evaluates below it, and stores it in the call stack. This is either the next byte of input from ~, or 0 if it is EOF. Next, it passes through the | to check if the top value of the call stack (:) is non-zero. If it is not, the pointer goes down from the | and returns the top value of the call stack. Otherwise, it goes up and wraps around to the _. This is also a conditional, which first evaluates printing (,) the top of the call stack. Printing always returns 0, so it goes right to the ^ which starts the loop all over again.
Alternatively, this works for 16 bytes:
\#\<@:!_
, ~
: 0
Flobnar, 15 bytes
|\<@:
:~
,0
_ ^
###Explanation:
We start at the @, going left. The \ evaluates below it, and stores it in the call stack. This is either the next byte of input from ~, or 0 if it is EOF. Next, it passes through the | to check if the top value of the call stack (:) is non-zero. If it is not, the pointer goes down from the | and returns the top value of the call stack. Otherwise, it goes up and wraps around to the _. This is also a conditional, which first evaluates printing (,) the top of the call stack. Printing always returns 0, so it goes right to the ^ which starts the loop all over again.
Alternatively, this works for 16 bytes:
\#\<@:!_
, ~
: 0
Flobnar, 6 bytes
~,_@
e
Suggested by Esolanging Fruit, this solution is much shorter, but ends in an error. Thanks!
Below is my old solution, which terminates correctly, but doesn't handle EOF correctly.
Flobnar , 15 bytes
|\<@:
:~
,0
_ ^
###Explanation:
We start at the @, going left. The \ evaluates below it, and stores it in the call stack. This is either the next byte of input from ~, or 0 if it is EOF. Next, it passes through the | to check if the top value of the call stack (:) is non-zero. If it is not, the pointer goes down from the | and returns the top value of the call stack. Otherwise, it goes up and wraps around to the _. This is also a conditional, which first evaluates printing (,) the top of the call stack. Printing always returns 0, so it goes right to the ^ which starts the loop all over again.
Flobnar, 15 bytes
|\<@:
:~
,0
_ ^
###Explanation:
We start at the @, going left. The \ evaluates below it, and stores it in the call stack. This is either the next byte of input from ~, or 0 if it is EOF. Next, it passes through the | to check if the top value of the call stack (:) is non-zero. If it is not, the pointer goes down from the | and returns the top value of the call stack. Otherwise, it goes up and wraps around to the _. This is also a conditional, which first evaluates printing (,) the top of the call stack. Printing always returns 0, so it goes right to the ^ which starts the loop all over again.
Alternatively, this works for 16 bytes:
\#\<@:!_
, ~
: 0
Flobnar, 15 bytes
|\<@:
:~
,0
_ ^
###Explanation:
We start at the @, going left. The \ evaluates below it, and stores it in the call stack. This is either the next byte of input from ~, or 0 if it is EOF. Next, it passes through the | to check if the top value of the call stack (:) is non-zero. If it is not, the pointer goes down from the | and returns the top value of the call stack. Otherwise, it goes up and wraps around to the _. This is also a conditional, which first evaluates printing (,) the top of the call stack. Printing always returns 0, so it goes right to the ^ which starts the loop all over again.
Alternatively, this works for 16 bytes:
\#\<@:!_
, ~
: 0