Inspiration
The lack of accessible programming languages that were easy to learn and understand inspired this project. This programming language is straightforward and can be learned in about fifteen minutes. The constructs are intuitive and centered around common mathematical syntax.
What it does
The project provides a programming language with a simple syntax that is easy to learn and use. It contains a command-line shell mode and a mode for running entire files.
How we built it
Built leaning on the Santiago crate for the frontend tokenizer and parser with a backend of hand-coded ASTs and a tree-walk interpreter. It is entirely written in Rust.
Challenges we ran into
We ran into a large number of challenges, namely related to our type conversion and our utilization of Santiago. At one time, we spent thirty minutes trying to track down an error that caused 1 < 0 to evaluate to true. We determined the source of the error to be:
"expr" => rules "expr" "<" "expr" => |mut t| {Ast::Fork{left : t[0].force_bast(), right : t[2].force_bast(), op : Forkop::Gt}.pr()}; // it should be Forkop::Lt NOT Forkop::Gt
"expr" => rules "expr" ">" "expr" => |mut t| {Ast::Fork{left : t[0].force_bast(), right : t[2].force_bast(), op : Forkop::Gt}.pr()};
Accomplishments that we're proud of
We're incredibly proud of our dynamic typing system, which was very difficult to implement, but provides a seamless and implicit way to convert between our in-built types. Namely, the user never needs to worry about whether they're using decimal or integer numbers— our language takes care of it for them. Further, we're also really proud of our unlimited-precision integers (which we accomplished using a Rust port of GNU MP).
What we learned
We learned a great deal about ambiguous grammar and creating command line tools; we further gained a greater appreciation for the syntax other programming languages (like Rust) offered their users without being ambiguous.
What's next for Programming Language For Math Students
Our first priority would be error handling. Presently, our programming language will warn the user of errors, but the specifics of these errors are often unclear.
Log in or sign up for Devpost to join the conversation.