Skip to main content
Commonmark migration
Source Link

[Cubix]Cubix, 19 bytes

.@o?A^;/|?$oqBA.UW.

[Try it online!][TIO-k0vdtrq1]Try it online!

Cubified

    . @
    o ?
A ^ ; / | ? $ o
q B A . U W . .
    . .
    . .
  • A^ get all the input and enter the loop
  • o? output the TOS of stack and test
  • @ exit if it tests to negative
  • /;^ reflect back, pop TOS and re-enter loop

All other commands are avoided.

Reversed

.WU.ABqo$?|/;^A?o@.

Try it online!

Cubified

   . W
    U .
A B q o $ ? | /
; ^ A ? o @ . .
    . .
    . .

[Cubix], 19 bytes

.@o?A^;/|?$oqBA.UW.

[Try it online!][TIO-k0vdtrq1]

Cubified

    . @
    o ?
A ^ ; / | ? $ o
q B A . U W . .
    . .
    . .
  • A^ get all the input and enter the loop
  • o? output the TOS of stack and test
  • @ exit if it tests to negative
  • /;^ reflect back, pop TOS and re-enter loop

All other commands are avoided.

Reversed

.WU.ABqo$?|/;^A?o@.

Try it online!

Cubified

   . W
    U .
A B q o $ ? | /
; ^ A ? o @ . .
    . .
    . .

Cubix, 19 bytes

.@o?A^;/|?$oqBA.UW.

Try it online!

Cubified

    . @
    o ?
A ^ ; / | ? $ o
q B A . U W . .
    . .
    . .
  • A^ get all the input and enter the loop
  • o? output the TOS of stack and test
  • @ exit if it tests to negative
  • /;^ reflect back, pop TOS and re-enter loop

All other commands are avoided.

Reversed

.WU.ABqo$?|/;^A?o@.

Try it online!

Cubified

   . W
    U .
A B q o $ ? | /
; ^ A ? o @ . .
    . .
    . .
  • ABq Get all input, reverse and drop TOS to bottom of stack
  • o$?|? output TOS, skip the test and relect back onto test
  • @ halt if test if negative
  • WUq change lane, u-turn onto drop TOS start of loop
Source Link
MickyT
  • 12.2k
  • 2
  • 26
  • 48

[Cubix], 19 bytes

.@o?A^;/|?$oqBA.UW.

[Try it online!][TIO-k0vdtrq1]

Cubified

    . @
    o ?
A ^ ; / | ? $ o
q B A . U W . .
    . .
    . .
  • A^ get all the input and enter the loop
  • o? output the TOS of stack and test
  • @ exit if it tests to negative
  • /;^ reflect back, pop TOS and re-enter loop

All other commands are avoided.

Reversed

.WU.ABqo$?|/;^A?o@.

Try it online!

Cubified

   . W
    U .
A B q o $ ? | /
; ^ A ? o @ . .
    . .
    . .