Forth, Factor like programming language in Python.
My main motivation is to learn more about language design, compiler construction and concatenative languages.
Very experimental
Clone the repository to your local machine. Create a virtual environment.
The code is only tested with python 3.8.
Create a link to the pactor command line tool.
ln -s src/pactor.py pactor
Run now ./pactor examples/hello.pactor
Run the complete suite.
python setup.py test
examples/recur.pactor
:print(x--) str "print(" swap + ")" + python;
:recur(x--y) 1 - dup 0 > [dup print recur] when;
10 recur
prints
9
8
7
6
5
4
3
2
1