Skip to main content

The Domain Specific Language for math.

Project description

Mathsys

Pepy Total Downloads NPM Downloads

Mathsys is a DSL (Domain-Specific Language) aimed to make math writing easier on computers, and something machines can actually understand.

Mathsys bridges the gap between traditional mathematical notation and programming languages. It provides a hybrid syntax that maintains mathematical readability while adding programming language features like multi-character variables and structured expressions.

Installation

Install the latest version via pip:

pip install mathsys

Package

To use the package, simply import it:

import mathsys

It is recommended that you import a version specifically, versions available now are v1, v2 and dev:

import mathsys.dev as mathsys

The latter way ensures you always use that version, no matter the updates that the package receives.

CLI

Compile a Mathsys file to different targets with:

python -m mathsys <target> <filename>.msX

where .msX stands for .ms1, .ms2 ... and .msd.

You will need rustc installed with the target you are compiling to. If that feels too cumbersome (it really is), try it out first on Abscissa.

[!NOTE] Targets available are: validate, latex, web and unix-x86-64.

Project Status

Mathsys is actively developed with regular releases every 1-3 weeks. This project is still in its early stages, so expect major shifts and changes. Most features aren't close to being developed yet.

If you want to get involved in the project, learn how to contribute.

Technical Background

  • Parser: A lark parser based on Earley that tokenizes the source and builds the AST.
  • LaTeX: Our custom LaTeX generator that traverses the AST and outputs easy-to-read LaTeX.
  • IR: A fully binary Intermediate Representation.
  • Runtime: Rust based no_std runtime which interprets the IR embedded into it and implements control-flow for low-level operations.
  • Assembly: For low-level operations that require speed and don't need memory safety.

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

mathsys-3.9.10.tar.gz (133.2 kB view details)

Uploaded Source

Built Distribution

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

mathsys-3.9.10-py3-none-any.whl (172.6 kB view details)

Uploaded Python 3

File details

Details for the file mathsys-3.9.10.tar.gz.

File metadata

  • Download URL: mathsys-3.9.10.tar.gz
  • Upload date:
  • Size: 133.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for mathsys-3.9.10.tar.gz
Algorithm Hash digest
SHA256 cb80ac0f227b4f63cfe93e4732a7434eebbb1516faf7c064dafec140975a83ea
MD5 7ad80b02bb9838de04e9d1e1b43c4b79
BLAKE2b-256 0111ef23f8c058e9419efa1a1a572d88334abf981aa4a507c7fdf6393684fba5

See more details on using hashes here.

File details

Details for the file mathsys-3.9.10-py3-none-any.whl.

File metadata

  • Download URL: mathsys-3.9.10-py3-none-any.whl
  • Upload date:
  • Size: 172.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for mathsys-3.9.10-py3-none-any.whl
Algorithm Hash digest
SHA256 6d9755c23e4a6ccb1947a3f85d253da5307dc0d6ac0956299766c27a84a00423
MD5 badd5c0eba80e445cc170c24a1bfe9e5
BLAKE2b-256 3b470f5a30b9922ed78d32de4078e98528409659b0c2932eae66e3c3139b8b0a

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