Scheme, now written with emojis. Install it on your computer by downloading escm.py
and editing your shell's configuration path to include:
escm() {
if [ -z "$1" ]; then
echo "Usage: escm [path_to_file].escm"
else
if [[ $1 == *.escm ]]; then
python3 /path/to/escm.py "$1"
[your_scheme_interpreter] "${1%.escm}.scm"
else
echo "Usage: escm [path_to_file].escm"
fi
fi
}
Here's an example snippet that prints the 21st number in the Fibonacci sequence:
(๐ฐ (fibonacci n) (๐คท (< n 2) n (+ (fibonacci (- n 1)) (fibonacci (- n 2)))))
(๐จ๏ธ (fibonacci 21))
Usage is fairly simple, write Scheme as you usually would but use emojis for actions / command words instead of words.
Here's the list of currently available aliases:
Emoji | Function | Emoji | Function |
---|---|---|---|
begin | ๐ฐ | define | |
๐คท | if | ๐ | length |
๐ | apply | ๐จ๏ธ | display |
๐ | displayln | error | |
๐ | eval | ๐ช | exit |
๐ | load | โฉ๏ธ | newline |
๐จ๏ธโ | ๐? | atom? | |
๐ข? | integer? | ๐ฆ? | list? |
๐ฅ? | pair? | ๐ก? | procedure? |
๐ฎ? | promise? | ๐ค? | string? |
๐ฃ? | symbol? | ๐๏ธ? | null? |
๐โ | append | ๐ฅ | car |
๐ค | cdr | โ๏ธโ | cons |
๐ | list | ๐บ๏ธ | map |
๐ต๏ธ | filter | ๐ | reduce |
1๏ธโฃ! | set-car! | 2๏ธโฃ! | set-cdr! |
โ | + | โ | - |
โ๏ธ | * | โ | / |
๐ | abs | โฌ๏ธ | expt |
๐ | modulo | ๐ | quotient |
โซ | remainder | ๐ | acos |
๐ | acosh | ๐ | asin |
๐ | asinh | ๐ | atan |
๐ | atan2 | ๐ | atanh |
๐ | ceil | ๐ | copysign |
๐ | cos | ๐ | cosh |
๐ | degrees | ๐ | floor |
๐ | log | ๐๐ | log10 |
๐ | log1p | ๐2๏ธโฃ | log2 |
๐ | radians | ๐ | sin |
๐ | sinh | ๐ | sqrt |
๐ | tan | ๐ | tanh |
๐ก๏ธ | trunc | ๐ฐ? | eq? |
๐ค? | equal? | โ | not |
๐ต? | even? | ๐ด? | odd? |
0๏ธโฃ? | zero? | ๐ | cond |
๐ค | and | ๐ | or |
๐ท๏ธ | let | ๐ | begin |
๐ | lambda | ๐ | quote |
๐ฐ-๐ค | define-macro | ๐ | expect |
๐-โ๏ธ | unquote-splicing | ๐ | delay |
๐-๐ | cons-stream | ๐! | set! |