A Calcium language intepreter on Python
Calcium is a programming language that takes a JSON array as input. It is interoperable with the Python language, allowing you to utilize Python's standard libraries and more. It is primarily designed as a subset of Python.
from calciumlang.runtime import Runtime
# Calcium code is given as a JSON array.
calcium_code = [
[1, [], "#", "0.0.3"],
[1, [], "expr", ["call", ["var", "print"], ["Hello, World."]]],
[1, [], "end"],
]
# The Runtime executes Calcium code.
r = Runtime(calcium_code)
r.run() # outputs 'Hello, World.'
With Blockly, you can generate Calcium code in a visual environment (for Japanese and Python syntax). This editor produces Calcium code (a JSON array) that can be executed by the calcium-py runtime.