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.5"],
  [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 the visual environment. 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.5.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

calciumlang-0.0.5-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for calciumlang-0.0.5.tar.gz
Algorithm Hash digest
SHA256 b7cdb40ab1f31f75733405f21533a07e69172052abdc3cccdb1c80b71bc44c0a
MD5 6dfade8241de859d5976c8672090e722
BLAKE2b-256 f9d24cf56db8ba894871854b380e41ca9042bd5fb9c479a620833a7ba7bd2b6c

See more details on using hashes here.

File details

Details for the file calciumlang-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: calciumlang-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for calciumlang-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f6193ed867081a4bc0d80a752792351bb866a5a07e48507d0c8e824d1a9f7869
MD5 318cc30df5a878ecfb513dda7bdbd311
BLAKE2b-256 7c8af847935a146ee48df63b5ca800a48ec569639643c1eeb143691297cfde6c

See more details on using hashes here.

Supported by

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