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 especifically, the only version available right now is dev:

import mathsys.dev as mathsys

That later 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>.math

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

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 which 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-1.4.124.tar.gz (52.5 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.4.124-py3-none-any.whl (63.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mathsys-1.4.124.tar.gz
Algorithm Hash digest
SHA256 dc5ef7fe4df5f28ee19eea83ef9e0dfe8f0004631c92d8c0cbbc25eb91800205
MD5 cb6a5033687476aeff7f62f677c7ac4a
BLAKE2b-256 2f84b001790c050daeef0dbe7551f359611be18c3a1e0f51e70075af24115e1d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathsys-1.4.124-py3-none-any.whl
  • Upload date:
  • Size: 63.0 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.4.124-py3-none-any.whl
Algorithm Hash digest
SHA256 b4f72abd074b8cd2ebb39466c2ad3563fb4c906ec6b0e2ac194a962833be351c
MD5 74f5f4be3a2700690ea56bcb53c1658b
BLAKE2b-256 67b7e626b5a8134cded803e65c93940a2b0051c1ffe4b14bf6fa68b8218d7a0f

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