fiRetruck

An esoteric version of the R language.

fiRetruck uses 9 characters: \!^+()[]", and 3 functions: substr(), paste0() and parse().

Read below for a quick explainer on how fiRetruck works.

Bugs, suggestions or contributions welcome at GitHub.

Input [9 chars]

Output [1612 chars]

How does it work?

All we really need to start is ways to derive values for 1 and 2:
((!0) + (!!0)) == 1
((!0) + (!0)) == 2
Do try these out in your terminal if you'd like, but it should be fairly clear why these are true.

Next, we check whether the next character is a numeric character (0-9).
If it is, we can express it as a sum of powers of 2, using the above derived values^.
If it isn't, we can express it with Unicode with R's \Uxxxx syntax, expressing 'xxxx' again with powers of 2.

But how do we get the 'U', you ask?
We can get the third character of 'TRUE' with substr(TRUE, 3, 3) .

And there you have it - that's really all there is to it.


^using the addition form of 1 uses fewer characters than writing 2 ^ 0 in fiRetruck