Skip to main content
add explanation
Source Link
sporkl
  • 6.9k
  • 1
  • 27
  • 63

Explanation:

The basic idea is to translate it into 05AB1E code and eval it.

0[„>>,I"idsoxdkc"©Ãε®skн}"><n="sè"Džz1(‚såi0}"ý.V
0                                                    Set the accumulator to 0.
 [                                                   Do this forever.
  „>>,                                               Print ">>"
      I                                              Read input
       "idsoxdkc" Ã                                  Keep only "idsoxdkc" characters.
                 ©                                   Also put "idsoxdkc" in the register.
                   ε    }                            For each character in the filtered input:
                    ®skн                             Find it's index in "idsoxdkc"
                         "><n="sè                    Index into "><n="
                                 "Džz1(‚såi }"ý      After each command, check if accumulator = -1 or 256
                                           0         If it does, change it to 0
                                               .V    Evaluate as 05AB1E code.

Explanation:

The basic idea is to translate it into 05AB1E code and eval it.

0[„>>,I"idsoxdkc"©Ãε®skн}"><n="sè"Džz1(‚såi0}"ý.V
0                                                    Set the accumulator to 0.
 [                                                   Do this forever.
  „>>,                                               Print ">>"
      I                                              Read input
       "idsoxdkc" Ã                                  Keep only "idsoxdkc" characters.
                 ©                                   Also put "idsoxdkc" in the register.
                   ε    }                            For each character in the filtered input:
                    ®skн                             Find it's index in "idsoxdkc"
                         "><n="sè                    Index into "><n="
                                 "Džz1(‚såi }"ý      After each command, check if accumulator = -1 or 256
                                           0         If it does, change it to 0
                                               .V    Evaluate as 05AB1E code.
Source Link
sporkl
  • 6.9k
  • 1
  • 27
  • 63

05AB1E, 50 bytes

0[„>>,I"idsoxdkc"©Ãε®skн}"><n="sè"Džz1(‚såi0}"ý.V 

Try it online!