An emoji-based language structured on Scheme's syntax.
Check out the tests folder for Scheme (.scm) and Schemoji (.smoji) equivelent files.
Simple factorial code:
(begin
(define fact (lambda (n) (if (<= n 1) 1 (* n (fact (- n 1))))))
(print (fact 10))
)
๐ธ๐
๐ธโ๏ธ fact ๐ธ๐ ๐ธn๐น ๐ธโฏ๏ธ ๐ธ๐ n 1๐น 1 ๐ธ๐ฝ n ๐ธfact ๐ธโ n 1๐น๐น๐น๐น๐น๐น
๐ธ๐ ๐ธfact 10๐น๐น
๐น
run convertall.py or src/converter.py to convert between Scheme and Schemoji There's a --prettify flag that, when set, changes the open-close parens to be dialer keycode emojis, representing scope-depth.
e.x. python -m src.run tests/circle_area.smoji
For Scheme, these files are tested against Chicken Scheme.
The rules are defined in src/mapping.py
using conda: conda create --name schemoji --file env.txt
Peter Norvig and his wonderful walkthroughs of writing lispy.py. This project uses a lot of code from lispy.py