Rustic
An opinionated numeric interpreter in Rust
Rustic is a simple, opinionated and straightforward interpreted programming language, designed for performing mathematical computations.
It's written in Rust, a systems programming language known for its performance and safety guarantees.
Rustic only accepts numeric values
, making it a suitable tool for solving mathematical problems with ease.
Features
- Only numeric values are accepted as values, making it a language well suited for mathematical computations.
- Written in Rust, providing excellent performance and safety guarantees.
- Simple and easy to use syntax, making it a great tool for learning.
Installation
To use Rustic, you can download the binary from the official repository (elcharitas/rustic-lang
).
Once you have the binary, you can run it in your terminal.
No other dependencies are required to be installed. Optionally, add it to your path.
Usage
Once you have the binary, you can run it in your terminal by executing ./rustic -r
to start a REPL.
From there, you can start typing in mathematical expressions, and the result will be displayed on the screen. For example, try running print 1 + 2
to see the result.
Features
Some of the implemented features include
- factorials - E.g
2!
,3!
,190!
- pi variable - pi is predefined for use.
- grouped calculations
- printing results with print
- storing data with variables.
N/B: A variable in rustic is any alphanumeric word that can be assigned to. All variables are mutable by design. And can be reassigned even if system assigned(However, this is discouraged).
Example
myVar = 0;
print myVar
TODO
- Comments
- Constants
- Trigonometry Helpers
- TBD
Contributing
Rustic is an open-source project, and contributions are always welcome! If you would like to contribute, you can start by forking the official repository and submitting a pull request. Before making a contribution, please make sure to read the contribution guidelines.
Testing
To test Rustic, you can run the test suite by executing cargo test in the root of the repository. This will run all of the tests and check if they pass. If you find any bugs or have any suggestions for improvements, please open an issue in the issue tracker.