I hate your bf-derivative really I do

From Esolang
(Redirected from Ihybrid)
Jump to navigation Jump to search

This language uses the same eight instructions as bf in an entirely different way for the sole purpose of causing confusion and irritating bf enthusiasts. Instead of using an infinite amount of memory spaces, Ihybrid uses two memory spaces, M1 and M2, a count-like stack that's almost an accumulator, and a toggle function. It does not have input.

The eight symbols perform the following functions initially:

+: toggles the memory space.
-: toggles the toggle.
.: copies the selected memory to the stack and resets if M1.
,: copies the stack to the selected memory and resets if M2.
<: prints the selected memory as an ASCII character.
>: prints the stack value mod 128 as an ASCII character.
[: increases the stack value by 2.
]: decreases the stack value by 1.

The first memory space can carry any number between 0 and 127 and the stack is altered mod 128 before being stored in M1 but remains as is in the stack. When the M1 is put into the stack the M1 resets. The second memory space can only contain the digits 0–9 in three separate boxes which are mixed from their position in the stack so that the ones digit of the stack becomes the tens digit in the memory, the tens digit in the stack becomes the hundreds digit in the memory, and the hundreds digit in the stack becomes the ones digit in the memory. Any other digits in the stack aren't stored in the M2, and the stack is reset to 0. When the M2 value is copied back to the stack it remains as is in M2 but the reverse process happens to mix the digits that was explained previously. The memory space is initially M1, but can be toggled initially via the +. When the toggle is toggled all of the symbols switch instructions:

+: copies the selected memory to the stack and resets if M1.
-: copies the stack to the selected memory and resets if M2.
.: toggles the toggle, clears both memories and resets the stack to 0.
,: toggles the memory space.
<: prints the stack value mod 128 as an ASCII character.
>: prints the nonselected memory as an ASCII character.
[: decreases the stack value by 2.
]: increases the stack value by 1.

The stack value can be between 0 and infinity, but may not fall below 0 (if this occurs the memories are reset and the count is set to 100).

Hello, World!

[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[>[[[[[[[[[[[[[[[]>[[[[]>>[[]>-.[[[[[[[[[[[[[[[[[[[[[[>]]]]]]]]]]]]>[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]>]]]]]]]]>[[]>]]]]]]>]]]]]]]]>-.[[[[[[[[[[[[[[[[[]>-.[[[[[>