PyBQN: a BQN implementation in python
A(n incomplete) BQN VM implementation in python.
$ python3 -m pybqn
bqn> <⟜'a'⊸/ "Big Questions Notation"
"B Q N"
This is a toy interpreter to better understand the language and VM. If you're looking for more performant BQN from python consider the BQN↔NumPy bridge or writing your own interface to CBQN.
- Only implements the bare minimum core runtime and is slow.
- Missing some opcodes/features: namespaces, headers, multi-body blocks, inverses.
- Only system funcs to run
test/this.bqn
tests. - Only REP
L(without the L), missing redefinable variables and passing them into the compile (https://mlochbaum.github.io/BQN/implementation/vm.html#compiler-arguments). - Passing some tests
- Pass: bytecode, fill, identity, literal, prim, simple, token, under, undo
- Fail: header, namespace, syntax, unhead
The python code is licensed as MIT.
Some unittests used to validate the VM/runtime before it could host the compiler contain pre-compiled snippets from the https://github.com/mlochbaum/BQN repo, see the respective license there.