Python
What it is
A CPython extension: import ose, vm = ose.VM(), and the machine is in
the process. vm.eval runs osen, vm.exec runs instructions, vm.recv
takes bytes off a socket, vm.parse turns source into the bundle that is
the program without running it. The same repository, osepy, holds the
other direction — o.se.python, a module that lets the machine call
Python.
Get it running
In the workspace:
cd osepy/host && make # builds the extension in place
As a standalone clone:
git clone --recursive https://github.com/asomadev/osepy
cd osepy/host && pip install .
First program
>>> import ose
>>> vm = ose.VM()
>>> vm.eval('(21, 2) /o/add')
': 23\n'
python3 -m ose.repl is the same machine at a prompt.
What it adds
Python objects, by name: vm.bind("/py/reverse", f) puts a Python
function in the host register, callable from any bundle that reaches the
machine, and python3 -m ose.repl --load udp.py makes every function in
an ordinary Python file an address.