eggplant πŸ†

April 29, 2018 Β· View on GitHub

A stack-oriented interpretted language created using Felix Plesoianu's "Make Your Own Programming Language" (http://scratch-lang.notimetoplay.org/index.html).

πŸ† is written entirely with emojis

Printing

  • πŸ“ : prints top of stack
  • πŸ“ πŸ“‘: prints whole stack (stack remains in tact)

Math

  • βž•: Addition
  • βž–: Subtraction
  • βœ–οΈ:Multiplication
  • βž—: division
  • βœ”οΈ: square root
  • ❇️: mod
  • 0️⃣1️⃣2️⃣3️⃣4️⃣5️⃣6️⃣7️⃣8️⃣9️⃣: numbers

Stack Operations

  • πŸ”‚πŸ“‘: duplicate top of stack
  • πŸ“€πŸ“‘: throw away top of stack
  • πŸ”€πŸ“‘: switch top of stack with second item on stack
  • πŸ”‚πŸ”‚πŸ“‘:copy second item on stack and place copy on top of stack
  • β«πŸ“‘: bring third item on stack to top

Variables, Constants, Strings

  • πŸ†: define variable
  • πŸ›„πŸ†: save value into variable
  • πŸ›…πŸ†: get value of variable
  • πŸ˜πŸ†: define constant
  • ✏️: declare string
    • ex: ✏️ hello world✏️

Functions

  • ♻️: declare function
  • 🚫: declare end of function
  • ex:
    • ♻️ πŸ‰ ✏️ 🌍✏️ πŸ“  🚫
    • defines a function πŸ‰, which prints the string 🌍

Arrays

  • 🌜: beginning of array
  • πŸŒ›: end of array
  • πŸ“: length of array
  • πŸ“¬: reference item in array