From Esolang
Jump to: navigation, search

Programming languages we created

Common concepts

In the majority of our programming languages, we use similar ideas and solutions for some common problems.

I/O format

Almost all our languages use the following I/O format. Both input and output are streams of bits, not bytes. If the number of output bits is not divisible by 8, the output is padded with 0s to form a byte. There is no EOF check, which means that programs can read after all input bits are consumed (exception is Functional(), but it still allows reading after EOF). In that case all bits after the last input bit are treated as zeros.

Input buffer gets converted to bit array in little endian form on the bit level, then each bit is prepended with 1. For example input string '12' gets converted to array of bits 11101010111110101011101011111010 and program reads one bit at a time. Output format is similar. However, some languages insert 1s in the output (like the input format), while some languages don't. Usually, if a programming language can terminate by itself (means: it is possible to write a program that terminates by itself), there is no need to insert 1s in the output, while if the language must be terminated from outside, then program must insert 1s before each output bit (the first time when 0 appears at the even position in the output stream (0-indexed), the engine terminates the program).

Integer representation

The algorithm explained in Bitwise Trance address parsing is the way most our languages represent integers (if applicable in the given context). Negative integers are represented in the same way, with the exception that if the number is non-zero then after the bit representation of the number append 0 for positive numbers and 1 for negative numbers. For example 5 is represented as 101100 and -5 as 11101. Zero is represented as 0.