Emoji-gramming

From Esolang
Jump to: navigation, search

Emoji-gramming (proper name πŸ’») is a simple emoji-based esolang.

Variables

There are 24 normal variables, each indicated by a specific emoji:
β™ˆ ♉ β™Š β™‹ β™Œ ♍ β™Ž ♏ ♐ β™‘ β™’ β™“
πŸ• πŸ•‘ πŸ•’ πŸ•“ πŸ•” πŸ•• πŸ•– πŸ•— πŸ•˜ πŸ•™ πŸ•š πŸ•›
All 24 store unbounded, signed, integers and are initialized to 0.

There is 1 special variable: 🚨
It is the Instruction Counter and stores the current line number being run.
Lines without commands are still counted.
It can be used like any other variable.
Setting it to another value jumps code execution to that line.
The Instruction Counter starts at 0 and increases by 1 after each command.

Commands

There are four commands; each command must be on its own line.
Any line that doesn't start with a command is treated as a comment.
The first command is on line 0.
In all commands, replace πŸ”³ and πŸ”² with variables.

πŸ˜ŠπŸ”³πŸ”² Set πŸ”³ to πŸ”².
πŸ˜‡πŸ”³πŸ”² Set πŸ”³ to πŸ”³ plus πŸ”².
πŸ˜ˆπŸ”³πŸ”² Set πŸ”³ to πŸ”³ minus πŸ”².
πŸ˜΅πŸ”³πŸ”² If πŸ”³ equals πŸ”², skip the next command.

Constants

Hearts can be used as constants, as desired.
Use a constant instead of variable πŸ”².

πŸ’” is 0
πŸ’œ is 1
πŸ’• is 2
πŸ’ž is 4
πŸ’– is 8

Input/Output

Input and Output can only be used as part of 😊 commands, replacing the indicated variable. Using both in the same command is forbidden.
🎀 Replace πŸ”²; input one ASCII character and store value into variable πŸ”³.
πŸ“’ Replace πŸ”³; output the ASCII character matching variable πŸ”².

Interpreter

Python Interpreter

Cheat Sheet

πŸ’»: (emoji-gramming)
Variables: (24 unbound/signed integers; start at zero)
β™ˆ ♉ β™Š β™‹ β™Œ ♍ β™Ž ♏ ♐ β™‘ β™’ β™“
πŸ• πŸ•‘ πŸ•’ πŸ•“ πŸ•” πŸ•• πŸ•– πŸ•— πŸ•˜ πŸ•™ πŸ•š πŸ•›
Special Variable: 🚨 Instruction Counter (πŸš¨β¬…οΈ?=GOTO ?)
Commands: (one per line; replace πŸ”³/πŸ”² with variable)
πŸ˜ŠπŸ”³πŸ”² = πŸ”³β¬…οΈπŸ”²; πŸ˜‡πŸ”³πŸ”² = πŸ”³β¬…οΈπŸ”³+πŸ”²
πŸ˜ˆπŸ”³πŸ”² = πŸ”³β¬…οΈπŸ”³-πŸ”²; πŸ˜΅πŸ”³πŸ”² = If πŸ”³=πŸ”², πŸš¨β¬…οΈπŸš¨+1
Constants: (use as πŸ”²) πŸ’”0;πŸ’œ1;πŸ’•2;πŸ’ž4;πŸ’–8
I/O: (only 😊 commands, one ASCII character)
🎀: Input (use as πŸ”²); πŸ“’: Output (use as πŸ”³)

Image version; for those with font issues