esolang

πŸ‘€

Every command is an emoji, called like a function, with its arguments between a slash and a backslash.

Kloodi Β· Turing complete: yes Β· ●○○ easy Β· esolangs.org

Tested with 2 known programs Β· Test method

Run it

Expected: Hello, World!

The idea

Kloodi wrote πŸ‘€ and its interpreter in Python. A program reads like nested function calls in which each function name is one emoji and each argument sits in / and \. Arguments can be calls themselves, so πŸ‘€/❓\ prints what ❓ reads.

Read the story

There are ten emoji and one loop. Values are strings and numbers. A string is true when it is not empty and a number when it is greater than 0, so a negative number is false.

The machine

EmojiDoes
πŸ‘€/v\Print v
❓Read a line of input as a string
πŸ•³Halt
πŸ“©/name\/v\Store v in a variable
πŸ“¨/name\Read a variable
βž• βž– βœ– βž— /a\/b\Add, subtract, multiply, divide
πŸƒ/n\Jump to line n
{code}exprRun code while expr is true

A variable's name is a value too, so the empty string "" is a fine name. This implementation does what Python would where the specification is silent. πŸ‘€ ends with a line feed, βž— gives a decimal such as 3.5 or 2.0, and lines count from 1.

Example

The truth machine, πŸ“©/""\/❓\{πŸ‘€/1\}πŸ“¨/""\πŸ‘€/0\, stores the input under the name "", prints 1 while it is…
Expected: cat
Expected: 3.5

The truth machine, πŸ“©/""\/❓\{πŸ‘€/1\}πŸ“¨/""\πŸ‘€/0\, stores the input under the name "", prints 1 while it is true and then prints 0. The specification says it prints 0 once on 0. But ❓ returns a string, and the string "0" is not empty, so it is true. Run by the specification's own rules, it prints 1 forever on 0 as well, and this implementation does that.

A countdown keeps n in a variable and subtracts 1 inside the loop.

Expected: 3 2 1 liftoff

Further

Ideas it shows

Also in Jokes

Write your own in Run Convert a program from πŸ‘€

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: u1f440.

Command line

shib run u1f440 -e 'πŸ‘€/❓\' --input 'cat'
shib manual u1f440

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/u1f440.js

Docs: Kernel instructions Β· The .shib format Β· Command line Β· Adding a language

Source esolangs.org (CC0) Β· Edit on esolangs.org