Skip to main content

The Domain Specific Language for math.

Project description

Mathsys

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

CLI

Compile a Mathsys file to different targets with:

python -m mathsys <filename> <target>

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] Compiling via command line will also output a .ltx file with the LaTeX.

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.

I say we but I'm indeed a solo developer for now, so if you want to get involved learn

How to contribute

  1. Check our docs: documentation.
  2. Join the team: Contact us to become a member and get write access.
  3. Work on a branch: Create a new branch for your changes (main is protected).
  4. Submit PR: Create a pull request with updated changelog and version numbers.

[!NOTE] If there's already a branch developing the next version, branch from that instead of branching from main.

Technical Background

  • Parser: A lark parser based on Earley that tokenizes the source and builds the AST.
  • LaTeX: Our custom LaTeX generator that transverses 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 which require speed and don't need memory safety.

License

All rights reserved. See LICENSE.md for details.

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-1.0.0.tar.gz (48.7 kB view details)

Uploaded Source

Built Distribution

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

mathsys-1.0.0-py3-none-any.whl (62.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mathsys-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a93634aac5660d19446422319117fcee17348922413b975f0740756380701ead
MD5 21832bce8f8841342d7f376ce13577b5
BLAKE2b-256 77474c9a3ff8d132ed86710ff3bc0aa0365e01be54d0e904d116647ee9671147

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathsys-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 62.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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4bbec98c4ffe2eab3309bdec5627e9f1f54e66387b24ec8b1db42d9d24c3058a
MD5 02faac66a1392a61c63f2c9830eda0cb
BLAKE2b-256 7e7f97f77b563b7fabb76b1f32c02a896e1298327a0c03f3b49faebdcfabc971

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