VTFF
VTFF is an esoteric programming language created by User:Programmer5000. It uses only 2 characters, 0x0b
and 0x0c
, which are Vertical Tab, and Form Feed respectively.
Intepretation
Pre-intepreting
First, all non VT or FF characters are removed from the code.
Then the code is separated into chunks of VTs (eg, the code is split on FFs).
For example, if the code is VVFVFV
(replacing V with a vertical tab and F with a form feed), than it would be converted into VV
, V
and V
.
Char converting
Next each chunk of VTs is converted into the UTF-8 codepoint of its length plus 31.
For example, for the chunk is VV
, than it is converted to the UTF-8 character at 2 + 31, which is !
(0x21
).
The result is a list of UTF-8 characters, in this case !
,
, and
.
Evaling
Lastly, the code is joined to form a string (!
in this case) and eval
uated as Javascript. In this case, it is a syntax error.
Notes
- The empty program outputs
Hello, World!
. - The JS variable
i
contains the input. - If the program is
FF
, or it contains no VTs or FFs, it outputs 0. - If a chunk of VTs is empty (after removing non-VTs and FFS) (eg. the second chunk in
VFFV
, (replacing V with a vertical tab and F with a form feed)), than it is treated as if it wasVVVVVVVVVVVVVVVVV
,0
.
Example (prints "Hello World")
The empty program, or this (replaced VTs with "VT" and FFs with "FF":
VTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTFFVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTFFVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTVTFFVTVTVTVT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