Emojicode: Difference between revisions

From Hackers & Designers
No edit summary
No edit summary
Line 36: Line 36:
Β Β  🏁 πŸ‡
Β Β  🏁 πŸ‡
Β Β  Β  πŸ˜€ πŸ”€Hello world!πŸ”€
Β Β  Β  πŸ˜€ πŸ”€Hello world!πŸ”€
Β  πŸ‰
Making a variable...first the "frozen" type.Β  Frozen means you can never change it.Β  Here we make a variable called "a"
  🍦 a 10
You can also compare two numbers with this program.
Β  🏁 πŸ‡
    🍦 a 10
    🍦 b 4
Β  Β  🍊 ▢️ a b πŸ‡
Β  Β  Β  πŸ˜€ πŸ”€a is bigger than bπŸ”€
Β  Β  πŸ‰
Β Β  πŸ‰
Β Β  πŸ‰


Line 43: Line 57:
Β Β  Β  🍦 input πŸ”·πŸ”‘πŸ˜― πŸ”€Ask something here?πŸ”€
Β Β  Β  🍦 input πŸ”·πŸ”‘πŸ˜― πŸ”€Ask something here?πŸ”€
Β Β  Β  πŸ˜€ πŸͺπŸ”€You said: πŸ”€ inputπŸͺ
Β Β  Β  πŸ˜€ πŸͺπŸ”€You said: πŸ”€ inputπŸͺ
Β  πŸ‰
Convert integers to strings and back.
Β  πŸπŸ‡
Β  Β  🍦 a 🍺 πŸš‚ πŸ”€9πŸ”€ 10
Β  Β  🍊 ▢️  a 0 πŸ‡
Β  Β  Β  πŸ˜€ πŸ”€a is bigger than 10πŸ”€
Β  Β  Β  πŸ˜€ πŸ”‘ a 10
Β  Β  πŸ‰
Β Β  πŸ‰
Β Β  πŸ‰

Revision as of 15:46, 10 September 2017

Emojicode Workshop

About

Emojicode is an open-source, full-blown programming language consisting of emojis.

Workshop

Please note that lines that begin with $, should be executed with the Terminal and are NOT program syntax. This workshop also assumes you have completed the Emojiterm workshop. The $ should not be pasted in the terminal.

All other code blocks should be considered valid Emojicode syntax.

Create a file.

  $ πŸ“ myprog.emojic

The simplest Emojicode program looks as follows.

  🏁 πŸ‡
  πŸ‰

To save and exit the text editor (nanoπŸ“), first do Cntl+O, and then Cntl+X.

You can run it by first compiling it.

  $ emojicodec greeter.emojic

Running it.

  $ emojicode myprog.emojib

This program is so simple, it doesn't do anything.

The famous "Hello world!" example.

  🏁 πŸ‡
    πŸ˜€ πŸ”€Hello world!πŸ”€
  πŸ‰

Making a variable...first the "frozen" type. Frozen means you can never change it. Here we make a variable called "a"

  🍦 a 10

You can also compare two numbers with this program.

  🏁 πŸ‡
    🍦 a 10
    🍦 b 4
    🍊 ▢️ a b πŸ‡
      πŸ˜€ πŸ”€a is bigger than bπŸ”€
    πŸ‰
  πŸ‰

User input.

  🏁 πŸ‡
    🍦 input πŸ”·πŸ”‘πŸ˜― πŸ”€Ask something here?πŸ”€
    πŸ˜€ πŸͺπŸ”€You said: πŸ”€ inputπŸͺ
  πŸ‰

Convert integers to strings and back.

  πŸπŸ‡
    🍦 a 🍺 πŸš‚ πŸ”€9πŸ”€ 10
    🍊 ▢️  a 0 πŸ‡
      πŸ˜€ πŸ”€a is bigger than 10πŸ”€
      πŸ˜€ πŸ”‘ a 10
    πŸ‰
  πŸ‰