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
.ltxfile 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
- Check our docs: documentation.
- Join the team: Contact us to become a member and get write access.
- Work on a branch: Create a new branch for your changes (
mainis protected). - 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 traverses the AST and outputs easy-to-read LaTeX.
- IR: A fully binary Intermediate Representation.
- Runtime: Rust based
no_stdruntime 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mathsys-1.2.7.tar.gz.
File metadata
- Download URL: mathsys-1.2.7.tar.gz
- Upload date:
- Size: 53.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32ac9f4a09769c0b50b9dbeec81d6639d5b415e828b38c7f4202eaacadd0f0cd
|
|
| MD5 |
9b478edf3904659267fe25f87e916492
|
|
| BLAKE2b-256 |
c278ea972bcf4ecfb7dad66641115fc6c1e0f2f006e5836556541d34fed7a4d6
|
File details
Details for the file mathsys-1.2.7-py3-none-any.whl.
File metadata
- Download URL: mathsys-1.2.7-py3-none-any.whl
- Upload date:
- Size: 66.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47dcdd5eb2d32fc811ed0c3f8d78ad071bc660567a71ee4b9401483d1c69fdcb
|
|
| MD5 |
26ad85c99af7039a52a223009819c633
|
|
| BLAKE2b-256 |
7b899e65cf7b2b82cb6de0b63ed417aaa27a385fe814122ba739098dd7a05a65
|