an intuitive scripting language

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.

installation

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.

examples

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

๐Ÿ“ฆโœ๏ธ๐Ÿ’ฏ๐Ÿ•๐Ÿ’ฏ
๐Ÿ—ƒ๏ธโœ๏ธ๐Ÿ’ฏ๐Ÿ•›๐Ÿ’ฏ
๐Ÿ›๏ธโœ๏ธ๐Ÿ’ฌ๐Ÿ“œโ™“๏ธ๐Ÿ…พ๏ธใ€ฐ๏ธโœจโ™๏ธ๐Ÿ…ฐ๏ธโ™‘๏ธ๐Ÿ’นโœจโ™‘๏ธโ›Žโ™๏ธ๐Ÿ…ฑ๏ธ๐Ÿ“งยฎ๏ธ๐Ÿ’ฒโ“โœจ๐Ÿ“œ
๐Ÿ›๏ธโœ๏ธ๐Ÿงฎ๐Ÿ›๏ธ
๐Ÿงชโœ๏ธ๐Ÿ’ฏ๐Ÿ•‘๐Ÿ’ฏ
โ™พ๏ธ
๐Ÿ
    ๐Ÿ–จ๏ธ๐Ÿ“ฆ
    ๐Ÿ—ƒ๏ธโœ๏ธ๐Ÿ“ฆโž•๐Ÿ—ƒ๏ธ
    โš—๏ธโœ๏ธ๐Ÿ“ฆ
    ๐Ÿ“ฆโœ๏ธ๐Ÿ—ƒ๏ธ
    ๐Ÿ—ƒ๏ธโœ๏ธโš—๏ธ
    ๐Ÿค”๐Ÿงช๐Ÿงฒ๐Ÿ›๏ธ
    ๐Ÿ
        โœ‹
    ๐Ÿ›‘
    ๐Ÿงชโœ๏ธ๐Ÿงชโž•๐Ÿ’ฏ๐Ÿ•๐Ÿ’ฏ
๐Ÿ›‘

            

documentation

DATA TYPES

Emotilang can handle two types of data: string and integer. Strings are always lowercase. Each character is represented as an emoji:

abcdefghi jkkm
๐Ÿ…ฐ๏ธ๐Ÿ…ฑ๏ธยฉ๏ธโ†ฉ๏ธ๐Ÿ“ง๐ŸŽโ›ฝ๏ธโ™“๏ธ๐Ÿ•ฏ๏ธ ๐Ÿ—พ๐ŸŽ‹๐Ÿ‘ขโ™๏ธ
nopqr stuvwxyz
โ™‘๏ธ๐Ÿ…พ๏ธ๐Ÿ…ฟ๏ธ๐Ÿงถยฎ๏ธ ๐Ÿ’ฒโœ๏ธโ›Žโ™ˆ๏ธใ€ฐ๏ธโŽ๐Ÿ’นโšก๏ธ
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:

0123456789
๐Ÿ•›๐Ÿ•๐Ÿ•‘๐Ÿ•’๐Ÿ•“๐Ÿ•”๐Ÿ••๐Ÿ•–๐Ÿ•—๐Ÿ•˜

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 ๐Ÿ“œ๐Ÿ•๐Ÿ•‘๐Ÿ“œ

COMMENTS

All non-emoji characters are ignored by the interpreter and thus can be used for comments.

VARIABLES

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:

๐Ÿ“ฆโœ๏ธ๐Ÿ’ฏ๐Ÿ•๐Ÿ•’๐Ÿ•’๐Ÿ•–๐Ÿ’ฏ

ARITHMETIC

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
            

COMPARISON

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

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.

OUTPUT

Printing to the terminal is done via the ๐Ÿ–จ๏ธ command. Example:

๐Ÿ–จ๏ธ๐Ÿ“œโ™“๏ธ๐Ÿ“ง๐Ÿ‘ข๐Ÿ‘ข๐Ÿ…พ๏ธโœจใ€ฐ๏ธ๐Ÿ…พ๏ธยฎ๏ธ๐Ÿ‘ขโ†ฉ๏ธ๐Ÿ“œ

CONTROL FLOW

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โ€:

โ™พ๏ธ
๐Ÿ
    ๐Ÿ“ฆโœ๏ธ๐Ÿ’ฌ๐Ÿ“œโ™“๏ธ๐Ÿ…พ๏ธใ€ฐโœจ๐Ÿ…ฐ๏ธยฎ๏ธ๐Ÿ“งโœจ๐Ÿ’น๐Ÿ…พ๏ธโ›Ž๐Ÿ“œ
    ๐Ÿค”๐Ÿ“ฆโš–๏ธ๐Ÿ“œโ›ฝ๏ธ๐Ÿ…พ๏ธ๐Ÿ…พ๏ธโ†ฉ๏ธ๐Ÿ“œ
    ๐Ÿ
        โœ‹
    ๐Ÿ›‘
๐Ÿ›‘
๐Ÿ–จ๏ธ๐Ÿ“œโ™‘๏ธ๐Ÿ•ฏ๏ธยฉ๏ธ๐Ÿ“งโœจโœ๏ธ๐Ÿ…พ๏ธโœจโ™“๏ธ๐Ÿ“ง๐Ÿ…ฐ๏ธยฎ๏ธ๐Ÿ“œ
            

roadmap

Emotilang is still in the early stages of its life. Here are the current plans for the future:


Made with โค๏ธ by knosmos