Emotilang (short for "emoticon language") is a versatile scripting language where every character is emoji. Because of this, there are no language barriers. Printing text to the command line is just ๐จ๏ธ, and the curly braces of most programming languages are replaced with a far more intuitive ๐ and ๐. By having every command have a physical connection, Emotilang is extremely intuitive and easy to learn.
Download Emotilang from the Github Repository. To run, enter ./emotilang.exe <filename>
into the command line, where <filename> is the name of the emotilang file.
Alternatively, you can use the experimental online interpreter.
Hello, World
๐จ๏ธ๐โ๏ธ๐ง๐ข๐ข๐ พ๏ธ๐งจโจใฐ๏ธ๐ พ๏ธยฎ๏ธ๐ขโฉ๏ธโ๐
FizzBuzz
โพ๏ธ ๐ฆโ๏ธ๐ฏ๐๐ฏ <- initialize num ๐ (is num divisible by 3?) โ๏ธโ๏ธ๐ฆ๐๐ฏ๐๐ฏ โ๏ธโ๏ธโ๏ธโ๏ธ๐ฏ๐๐ฏ (is num divisible by 5?) ๐๏ธโ๏ธ๐ฆ๐๐ฏ๐๐ฏ ๐๏ธโ๏ธ๐๏ธโ๏ธ๐ฏ๐๐ฏ ๐งชโ๏ธ๐๐ <- initialize answer variable ๐คโ๏ธ ๐งชโ๏ธ๐งชโ๐๐๐ฏ๏ธโก๏ธโก๏ธ๐ <- add "fizz" to ans if num is divisible by 3 ๐ค๐๏ธ ๐งชโ๏ธ๐งชโ๐๐ ฑ๏ธโโก๏ธโก๏ธ๐ <- add "buzz" to ans if num is divisible by 5 ๐๏ธโ๏ธโ๏ธ๐๐๏ธ ๐คโ๐๏ธ <- if num isn't divisible by 3 or 5, set ans to num ๐งชโ๏ธ๐ฆ ๐จ๏ธ๐งช ๐ฆโ๏ธ๐ฆโ๐ฏ๐๐ฏ <- increment num ๐ค๐ฆ๐งฒ๐ฏ๐๐๐๐ฏ <- stop loop once we reach 100 โ ๐
"How Are You" Asker (repeatedly asks "how are you" until you reply "good")
โพ๏ธ ๐ ๐ฆโ๏ธ๐ฌ๐โ๏ธ๐ พ๏ธใฐ๏ธโจ๐ ฐ๏ธยฎ๏ธ๐งโจ๐น๐ พ๏ธโโโจ๐ ๐ค๐ฆโ๏ธ๐โฝ๏ธ๐ พ๏ธ๐ พ๏ธโฉ๏ธ๐ ๐ โ ๐ ๐จ๏ธ๐ใฐ๏ธยฎ๏ธ๐ พ๏ธโ๏ธโฝ๏ธโจ๐ ฐ๏ธโ๏ธ๐ฒใฐ๏ธ๐งยฎ๏ธ๐ ๐ ๐จ๏ธ๐โ๏ธ๐ฏ๏ธยฉ๏ธ๐งโจโ๏ธ๐ พ๏ธโจโ๏ธ๐ง๐ ฐ๏ธยฎ๏ธ๐
Fibonacci Calculator
๐ฆโ๏ธ๐ฏ๐๐ฏ ๐๏ธโ๏ธ๐ฏ๐๐ฏ ๐๏ธโ๏ธ๐ฌ๐โ๏ธ๐ พ๏ธใฐ๏ธโจโ๏ธ๐ ฐ๏ธโ๏ธ๐นโจโ๏ธโโ๏ธ๐ ฑ๏ธ๐งยฎ๏ธ๐ฒโโจ๐ ๐๏ธโ๏ธ๐งฎ๐๏ธ ๐งชโ๏ธ๐ฏ๐๐ฏ โพ๏ธ ๐ ๐จ๏ธ๐ฆ ๐๏ธโ๏ธ๐ฆโ๐๏ธ โ๏ธโ๏ธ๐ฆ ๐ฆโ๏ธ๐๏ธ ๐๏ธโ๏ธโ๏ธ ๐ค๐งช๐งฒ๐๏ธ ๐ โ ๐ ๐งชโ๏ธ๐งชโ๐ฏ๐๐ฏ ๐
Emotilang can handle two types of data: string and integer. Strings are always lowercase. Each character is represented as an emoji:
a | b | c | d | e | f | g | h | i | j | k | k | m |
๐ ฐ๏ธ | ๐ ฑ๏ธ | ยฉ๏ธ | โฉ๏ธ | ๐ง | ๐ | โฝ๏ธ | โ๏ธ | ๐ฏ๏ธ | ๐พ | ๐ | ๐ข | โ๏ธ |
n | o | p | q | r | s | t | u | v | w | x | y | z |
โ๏ธ | ๐ พ๏ธ | ๐ ฟ๏ธ | ๐งถ | ยฎ๏ธ | ๐ฒ | โ๏ธ | โ | โ๏ธ | ใฐ๏ธ | โ | ๐น | โก๏ธ |
space | ? | ! | . | , | ||||||||
โจ | โ | โ | ๐งฟ | ๐งจ |
Strings are always enclosed with ๐ characters. For example, โhello worldโ is represented as the string ๐โ๏ธ๐ง๐ข๐ข๐ พ๏ธโจใฐ๏ธ๐ พ๏ธยฎ๏ธ๐ขโฉ๏ธ๐.
Integers are written out as digits enclosed with ๐ฏ characters, where each digit is represented as a clock symbol:
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
๐ | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ | ๐ |
The same characters are used to represent numbers inside a string.
To convert from a string to an integer, use the ๐งฎ function:
๐งฎ๐๐๐๐ returns ๐ฏ๐๐๐ฏ
To convert from an integer to a string, use the โ๏ธ function:
โ๏ธ๐ฏ๐๐๐ฏ returns ๐๐๐๐
All non-emoji characters are ignored by the interpreter and thus can be used for comments.
The valid variable names are ๐ฆ,๐บ,โ๏ธ,๐งช,๐๏ธ,๐,๐งด,๐งบ,๐ข๏ธ and ๐๏ธ (these are all emoji of containers). Assignment is done with the โ๏ธ operator. The following code creates a variable with a value of 1337:
๐ฆโ๏ธ๐ฏ๐๐๐๐๐ฏ
Emotilang supports addition (โ), subtraction (โ), multiplication (โ๏ธ), division (โ), and modulo (๐). Only one operation can be done per line, because Iโm too lazy to write a proper parser. Example:
๐ฏ๐๐๐ฏโ๐ฏ๐๐ฏ returns 15 ๐ฏ๐๐๐ฏโ๐ฏ๐๐ฏ returns 5 ๐ฏ๐๐๐ฏโ๏ธ๐ฏ๐๐ฏ returns 50 ๐ฏ๐๐๐ฏโ๐ฏ๐๐ฏ returns 2 ๐ฏ๐๐๐ฏ๐๐ฏ๐๐ฏ returns 0
Two values can be compared with the ๐งฒ (greater than), โ๏ธ (equals), and โ (not) operators. A comparison statement cannot contain any arithmetic operations, and only one comparison statement can be done per line for now. Examples:
๐ฏ๐๐๐ฏ๐งฒ๐ฏ๐๐ฏ returns True ๐ฏ๐๐๐ฏโ๏ธ๐ฏ๐๐ฏ returns False ๐ฆโ๏ธ๐ฏ๐๐๐ฏ๐งฒ๐ฏ๐๐ฏ โ๐ฆ returns False
Input is done via the ๐ฌ command. For example, this code queries โhow are youโ and stores the result in variable โ๏ธ:
โ๏ธโ๏ธ๐ฌ๐โ๏ธ๐ พ๏ธใฐ๏ธโจ๐ ฐ๏ธยฎ๏ธ๐งโจ๐น๐ พ๏ธโ๐
Note that the ๐ฌ function returns a string.
Printing to the terminal is done via the ๐จ๏ธ command. Example:
๐จ๏ธ๐โ๏ธ๐ง๐ข๐ข๐ พ๏ธโจใฐ๏ธ๐ พ๏ธยฎ๏ธ๐ขโฉ๏ธ๐
Emotilang has forever loops (โพ๏ธ), if commands (๐ค), and break commands (โ).
IF commands (๐ค) cause code inside them (starting with ๐ and ending with ๐) to be executed if the statement after the ๐ค mark evaluates to true. For example, the following code prints โhiโ if 5+4 = 9:
๐ฆโ๏ธ๐ฏ๐๐ฏโ๐ฏ๐๐ฏ ๐ค๐ฆโ๏ธ๐ฏ๐๐ฏ ๐ ๐จ๏ธ๐โ๏ธ๐ฏ๏ธ๐ ๐
FOREVER loops (โพ๏ธ) cause the content inside of them to run until program execution is manually stopped, or until a โ command is sent. The following code asks โhow are youโ repeatedly until the user answers โgoodโ:
โพ๏ธ ๐ ๐ฆโ๏ธ๐ฌ๐โ๏ธ๐ พ๏ธใฐโจ๐ ฐ๏ธยฎ๏ธ๐งโจ๐น๐ พ๏ธโ๐ ๐ค๐ฆโ๏ธ๐โฝ๏ธ๐ พ๏ธ๐ พ๏ธโฉ๏ธ๐ ๐ โ ๐ ๐ ๐จ๏ธ๐โ๏ธ๐ฏ๏ธยฉ๏ธ๐งโจโ๏ธ๐ พ๏ธโจโ๏ธ๐ง๐ ฐ๏ธยฎ๏ธ๐
Emotilang is still in the early stages of its life. Here are the current plans for the future:
Made with โค๏ธ by knosmos