Fingerprint ID: | 0x4943414c |
---|

New in version 0.5-rc2.

This fingerprint, from RC/Funge-98, implements INTERCAL-esque operations. It provides the following commands:

`A`:*a*— &*a*- Performs unary AND operation, defined as
`a AND ror(a, 1)`where`ror`stands for bitwise rotate-right operation. `F`:*n*—- Works like INTERCAL’s FORGET command. It discards
*n*vectors from the address stack. Reflects if*n*is negative; it is no-op when*n*is zero. This command doesn’t change delta. `I`:*a**b*—*a*$*b*Performs mingle operation.

Mingle interleaves bits from

*a*and*b*, so if*a*=*a*_{3}*a*_{2}*a*_{1}*a*_{0}and*b*=*b*_{3}*b*_{2}*b*_{1}*b*_{0}then*a*$*b*=*a*_{3}*b*_{3}*a*_{2}*b*_{2}*a*_{1}*b*_{1}*a*_{0}*b*_{0}.`N`:*target*^{v}—- Works like INTERCAL’s NEXT command. It pushes the position of IP to the address stack, and jumps to
*target*so for next time that cell is executed. Reflects if the address stack contains 79 entries already. (This is original INTERCAL-72 behavior, indeed.) `O`:*a*— V*a*- Performs unary OR operation, defined as
`a OR ror(a, 1)`where`ror`stands for bitwise rotate-right operation. `R`:*n*—- Works like INTERCAL’s RESUME command. It pops
*n*vectors from the address stack, and jumps to last popped vector so for next time that cell is executed. Reflects if*n*is negative. If*n*is larger than the size of address stack, the address stack will be emptied and the position won’t change. This command doesn’t change delta. `S`:*a**b*—*a*~*b*Performs select operation.

Select collects bits from

*a*, such that corresponding bit from*b*is set. Collected bits are left-padded and stored in the order: for example`1100 ~ 101`is`10`, since*b*has bit 2 and 0 set.`X`:*a*— ∀*a*- Performs unary XOR operation, defined as
`a XOR ror(a, 1)`where`ror`stands for bitwise rotate-right operation.

INTERCAL uses the fixed integer size but PyFunge doesn’t, so it uses certain heuristics. If an operand of unary commands (`A`, `O`, `X`) is larger than 16 bits, it assumes the integer size of 32 bits; if it is larger than 32 bits, it assumes the integer size of 64 bits; and so on. This is consistent with RC/Funge-98’s behavior too.