|
2L (the Two Language) is an esoteric programming language derived loosely from the PATH programming language and Brainfuck. Among some hackers and hobbyists, an esoteric programming language is a programming language designed as a test of the boundaries of computer programming language design, as a proof of concept, or as joke, and not with the intention of being adopted for real-world programming. ...
PATH is an esoteric programming language derived from the Brainfuck language. ...
Brainfuck is a minimalistic computer programming language created by Urban Müller around 1993. ...
Like PATH and Befunge, it's two-dimensional. Like BrainFuck, it operates on a tape. However, it only has two symbols. It manages this by overloading the * symbol by direction. Your data pointer starts at location 2, not 0 as in BrainFuck, because 0 and 1 are significant. The tape is filled with 0s, as in BF. Your program pointer starts at 0,0 moving down, and ends when the program pointer goes below 0 left or up. Symbols
| SYMBOL | FUNCTION | | * | All IO and tape operations. This operation has a different function for all four cardinal directions: Up: Move the data pointer to the right (> in BF) Down: Move the data pointer to the left (< in BF) Left: Decrement the value at the data pointer (- in BF) Right: Increment the value at the data pointer (+ in BF) | | + | if the value the data pointer points to is nonzero, turn right, otherwise turn left | IO Tape locations 0 and 1 (TL0, TL1) are significant. 1 doesn't actually hold a value, it mearly causes an IO operation if you attempt to increment or decrement it. If the value at TL0 is 0, and you attempt to change the value of TL1, a character will be read from input into TL0. If TL0 is not 0, and you attempt to change the value of TL1, a character will be outputted from the value of TL0.
Hello World Because of the extreme level of overloading, even the simplest program (Hello World!) is incredibly complex in 2L. + + + + + + + + * + + + + * + + * + + + + * + + + *********+ + *****************************+ + + * + + * + ********+ + * **+ + + + + + + + + + + + + + + + * + + + + * + + * ++* * + * ++* * * *+ * * * *+ * * * * * * * * + * + * ++ + ++ + + + + + + + + + + + + + + + + * + + + + + + * + + + + * + + + + * + + **********+ + + + * + **********+ + + + + + ***********+ + + + * + + **********+ + * + + + + +* * + + * * + + * + * * + * + + * *+ + * +* * + * + + + + * * * * + + + * + * * + + + * *+ + * + + + * + + + + * * + + + + + + + + + + + + * + + + + * + + + + + + * + + + + ************+ + * + + + * + + *********+ + + + + + *******************+ + + + * + ******+ + + + + + + + + * + + + + * + +* + * ++* * + * * * *+ * * + + * +* * * * + + + + * + * + * +* + ++ + *++ * + + * + + + + * + + + + + + + + + + + + + + + + * + * + + * ++* * + * + + * + * * * + + * ++ + + + + + ************+ + + + + * + + *********+ + + + + + + + + + + + * + + + + * + + + * ++* * + * + * *+ * * + * * * + * + ++ + + ***********+ + + + + * + + + **********+ + + + + + + + + + + + + * + * + +* * + + * * + * + + * + * * + + + * *+ + * + **********+ + * + + + + + * * * + + + **********+ + + + + + + + + + + + + + + * + + + * ++* * + + * *+ * * + + * * * * + + * + ++ + + * + + + + + + + + + ****+ + + * + ********+ + + + + + + + + + + + * + + + + * + + + * ++* * + + * + * *+ * * + ***********+ + * * * + + * + * + * **+ ++ + + + + + + + + ****** **** + + + + +* * + + + + * + + + * ++* * + + *+ * * + + + * * * + + + * ++ + + + + + + + * + + That outputs "Hello World!"
Links - The 2L page (http://www.befunge.org/fyb/2l/)
|