- This is still a work in progress. It may be changed in the future.
|Computational class||Turing complete|
|Reference implementation||Greentext Github|
Greentext is a work-in-progress esoteric scripting language based off of the trademark greentext format (or "Meme Arrows") of the anonymous forum site 4chan. Every line in the language begins with a
A Basic Rundown
:^) = true :^( = false
>mfw "Hello World!"
>be foo # Declare unassigned variable "foo" >be bar like 1234 # Dclare variable "bar" and assign it the value 1234
>implying foo is bar # if "foo" is equal to "bar" >mfw "True" >Or not # else >mfw "False" >done implying
("else if" statements have not been implemented as of November 12, 2015)
>inb4 i from 10 to 0 by -2 # Variable decrement variable i from 10 to 0 with step counter -2 >mfw i # Prints 10, 8, 6, 4, 2 on separate lines >done inb4
>dank memes # Main function #Code n stuff >tfw # Return
>wewlad foobar (n,m) # Declare function >be barfoo like n + m # Define variable "barfoo" >tfw barfoo # Return barfoo
>wew foobar(2,3) # wew is an internal variable that contains the value returned by the last function used. >be baw like wew # Assign the value in "wew" to "baw" >mfw baw # 5
>dank memes >inb4 i from 0 to 100 by 1 >implying i % 15 is 0 >mfw "fizzbuzz", i >or not >implying i % 3 is 0 >mfw "fizz", i >done implying >implying i % 5 is 0 >mfw "buzz", i >done implying >done implying >done inb4 >tfw
>wewlad factorial(n) >be result like 1 >implying n > 1 >be m like n - 1 >wew factorial(m) >be result like wew >done implying >tfw n * r >dank memes >be n like 10 >wew factorial(n) >mfw wew # Outputs n! >tfw