# Tips for golfing in Emotinomicon

What general tips do you have for golfing in Emotinomicon? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Emotinomicon (e.g. "remove comments" is not an answer).

• Please help popularise Emotinomicon, if you can. As it stands right now, only 2 people use it AFAIK (me and Conor O'Brien). – Erik the Outgolfer Sep 25 '16 at 15:42
• While this is an interesting idea, there isn't precisely much room for golfing in this language, except for perhaps changing program flow. Other than that, a lot of the tips that would apply here would apply to other languages with similar code layouts. – Conor O'Brien Sep 25 '16 at 15:45
• @ConorO'Brien I know, but I have alerady posted 4 answers, and might post more. – Erik the Outgolfer Sep 25 '16 at 15:46
• While that's true, half of them are interpreter bugs that I might fix in the future. – Conor O'Brien Sep 25 '16 at 15:48
• @ConorO'Brien That's why I've said "right now". Also, there are currently 2 of them. – Erik the Outgolfer Sep 25 '16 at 15:54

Should be answers to respective challenges (if they exist). Note that some of these code samples might alerady be answers somewhere else.

If you just want to print undefined, use this 4-byte, 1-char program.

😨


Infinite loop (6 bytes, 2 chars).

ℹ⏩


Cat (owned by Conor O'Brien) (15 bytes, 5 chars).

⏫⏪⏬⏫⏩


This program should output the 8 phases of the moon, but it doesn't seem to work (61 bytes, 16 chars).

😭🌘🌗🌖🌕🌔🌓🌒🌑😲⏪⏬😷⏩😀😬


Hypothenuse (27 bytes, 7 chars).

😼😣😼😣➕😋😨

• It's because the string implementation grabs surrogates as well. I'll fix this sometime today, probably. – Conor O'Brien Sep 25 '16 at 18:28

If you just want a truthy value (or even just a value), without using it, use ℹ. It's 3 bytes, while the others are 4 bytes.

• I used this for the infinite loop challenge. – Erik the Outgolfer Sep 25 '16 at 15:47

If you want to output 2 chars or less, do not use ⏪⏬⏩, use the number of ⏬s needed.

# Infinite Looping

If you want to loop a program infinitely, from index n, you can use n😬 to jump behind the nth character. For example, this 34-byte, 12-char program for yes:

🔟⏪😭sey😲⏪⏬⏩🔟⏩


Becomes this 32-byte, 11-char program:

🔟😭sey😲⏪⏬⏩😀😬

• It seems like I've got the grasp of it... if anyone is wondering, the yes idea originated here. – Erik the Outgolfer Sep 25 '16 at 17:14

# Make use of built-ins.

Some cases are:

• ⁉️❕ -> ❔
• The numbers 0-10, 100 and i are 😀😅😉😍😒😗😜😡😁😆🔟💯ℹ, respectively.
• Multiplication with 2-4 is done with 😇☺️😏, respectively.
• Division with 2-4 is done with 😔😙😞, respectively.
• Exponentiation with 2-4 is done with 😣😃😈, respectively.
• Rooting:
• n-Rooting with n being 2-4 is done with 😋😐😕, respectively.
• For other n, use 😅n➗😘. n is not a literal n, but the power of rooting.

Because of a bug in the interpreter, if you want to append 1 to a number (e.g. 10 -> 101), use 😄. As it is right now, you have to use 😅➕ for the true function of 😄.

• I believe this bug is because JavaScript "123"+1 -> "1231". – Erik the Outgolfer Nov 20 '16 at 8:52