Skip to content

πŸ“ Write your code in emojis! πŸ€ͺ Compiles to JavaScript πŸš€

Notifications You must be signed in to change notification settings

samkcarlile/umuju

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

umuju

Overview

umuju is a programming language that you write using emojis. It compiles to Javascript code.

Examples

hello_world.umu

πŸ’¬ The clap requires a module
πŸ‘ πŸ“Ÿ

πŸ“ŸπŸ—£ "Hello World!"

user_input.umu

πŸ‘ πŸ“Ÿ

πŸ’¬ Variables can be any emoji (be careful not to overwrite a module 😬)
🏷 = πŸ“ŸπŸ‘‚ β€œWhat’s your name?”

πŸ’¬ You can use ✨ for templating strings
πŸ“ŸπŸ—£ `Hello ✨🏷✨!`

fetch_todo.umu

πŸ‘ πŸ“Ÿ
πŸ‘ πŸ“‘
πŸ’¬ This is the module that lets you work with JSON
πŸ‘ πŸ“‡

πŸ’¬ Convert a string to a number using the πŸ”’ function
πŸ’¬ The ⬅️ is used to chain function calls.
πŸ†” = πŸ”’ ⬅️ πŸ“ŸπŸ‘‚ "Which todo would you like to get?"

πŸ’¬ An if statement to make sure the number is between 1 and 200
πŸ’¬ (Code blocks and expressions are surrounded by any number of
πŸ’¬  any tree emoji)
πŸ€” β—οΈπŸŒ²πŸŒ² πŸ†” πŸŒ– 0 && πŸ†” 🌘 200 🌲🌲 🌳
  πŸ“ŸπŸ—£ "ID must be between 1 and 200 (inclusive)"
  πŸ’¬ The πŸ‘‹ emoji exits the program
  πŸ‘‹
🌳

πŸ’¬ Send a GET request to a url, checking for an error
βœ‰οΈ,⛔️ = πŸ“‘πŸ€ `https://jsonplaceholder.typicode.com/todos/βœ¨πŸ†”βœ¨`
πŸ€” ⛔️ 🌴
  πŸ“ŸπŸ—£ "There was an error! βœ¨β›”οΈβœ¨"
  πŸ‘‹
🌴

πŸ’¬ Convert the response body to JSON
πŸ“„ = πŸ“‡πŸ‘ˆ βœ‰οΈπŸšΉ

πŸ’¬ We take the "completed" property from the body
πŸ’¬ and convert it to a boolean
βœ… = ☯️ ⬅️ πŸ“„πŸ”‘ "completed"

πŸ’¬ An if/else statement checking if the "completed" property is true
πŸ€” βœ… πŸŽ„
  πŸ“ŸπŸ—£ `Todo #βœ¨πŸ†”βœ¨ is complete!`
πŸŽ„ πŸ™ƒ 🌴
  πŸ“ŸπŸ—£ `Todo #βœ¨πŸ†”βœ¨ is not complete. πŸ˜”`
🌴

About

πŸ“ Write your code in emojis! πŸ€ͺ Compiles to JavaScript πŸš€

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published