Skip to main content

A Calcium language interpreter

Project description

calcium-py

A Calcium language intepreter on Python

What is Calcium language?

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.

How to create the interpreter and run Calcium code

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.'

Applications using Calcium

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

calciumlang-0.0.3.tar.gz (21.3 kB view details)

Uploaded Source

File details

Details for the file calciumlang-0.0.3.tar.gz.

File metadata

  • Download URL: calciumlang-0.0.3.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for calciumlang-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4d737932c68e483f735cddfe824eeef06584f173cd395ef3e09af6fa8e743564
MD5 2a78176fbc7577c38343cd08ac25bd44
BLAKE2b-256 a0d2ed8eba363c5beeadfd56b7265f807ec9ce92868bf8b704beb7ceea11d6dc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page