|
| 1 | +<div align="center"> |
| 2 | + |
| 3 | +<h1 style="display: flex; justify-content: center; align-items: center; gap: 0.2em;"><img src="./logo.svg" width="30"> MathScript</h1> |
| 4 | + |
| 5 | +[](https://github.com/foxypiratecove37350/MathScript/releases) |
| 6 | + |
| 7 | +<p>A Math programming language, by foxypiratecove37350</p> |
| 8 | + |
| 9 | + |
| 10 | +</div> |
| 11 | + |
| 12 | +## What is MathScript? |
| 13 | + |
| 14 | +MathScript is a simple, yet powerful, programming language designed with mathematics in mind. It offers a clean and intuitive syntax, making it ideal for: |
| 15 | + |
| 16 | +* **Mathematical calculations:** Perform complex operations, and work with maths effortlessly. |
| 17 | +* **Data analysis:** Analyze and visualize data, perform statistical calculations, and build data models. |
| 18 | +* **Algorithm development:** Develop algorithms, solve equations, and create simulations. |
| 19 | + |
| 20 | +## Features |
| 21 | + |
| 22 | +* **Intuitive Syntax:** Inspired by mathematical notation, MathScript's syntax feels natural and easy to learn. |
| 23 | +* **Data Structures:** Supports integers, decimals, complex numbers, strings, lists, and functions. |
| 24 | +* **Control Flow:** Includes `if`, `elif`, `else`, `for`, `while`, and `func` statements for structured programming. |
| 25 | +* **Built-in Functions:** Provides a collection of useful built-in functions for mathematical operations, input/output, and more. |
| 26 | +* **Extensibility:** The language is designed to be extensible with user-defined functions. |
| 27 | +* **Cross-Platform:** Runs on Windows, Linux, macOS and other platforms. |
| 28 | + |
| 29 | +## Getting Started |
| 30 | + |
| 31 | +1. **Install MathScript**: |
| 32 | + - From the GitHub release |
| 33 | + - Or fork the repsitory and then [build](#build) |
| 34 | +2. **Run a program**: |
| 35 | + ```bash |
| 36 | + mathscript <your_program.mscr> |
| 37 | + ``` |
| 38 | + Or **start an interractive shell**: |
| 39 | + ```bash |
| 40 | + mathscript |
| 41 | + ``` |
| 42 | + |
| 43 | +## Build |
| 44 | + |
| 45 | +MathScript uses `cx_Freeze` for building the binaries. |
| 46 | + |
| 47 | +You can build the binaries by running the following command in the root directory of the repository: |
| 48 | +```bash |
| 49 | +python setup.py build |
| 50 | +``` |
| 51 | + |
| 52 | +This will create a `build/` directory containing the binaries for your platform in a subdirectory. The MathScript executable will be in the subdirectory of your platform and will be named `mathscript`. |
| 53 | + |
| 54 | +## Example |
| 55 | + |
| 56 | +Here's a simple MathScript program to calculate the area of a circle: |
| 57 | + |
| 58 | +```mathscript |
| 59 | +func circle_area(radius) => pi * radius ^ 2 |
| 60 | +print(circle_area(5)) |
| 61 | +``` |
| 62 | + |
| 63 | +## Documentation |
| 64 | + |
| 65 | +<!-- You can find the full documentation of MathScript here: [Docs link](Docs link) --> |
| 66 | + |
| 67 | +## Contributing |
| 68 | + |
| 69 | +Contributions to MathScript are always welcome! Feel free to submit issues, pull requests, or suggest new features. |
| 70 | + |
| 71 | +1. Fork the repository. |
| 72 | +2. Create a new branch for your feature or fix. |
| 73 | +3. Make your changes. |
| 74 | +4. Test your changes thoroughly. |
| 75 | +5. Submit a pull request. |
| 76 | + |
| 77 | +## License |
| 78 | + |
| 79 | +MathScript is licensed under the GNU General Public License v2.0. See the [`LICENSE`](./LICENSE) file for details. |
0 commit comments