Or, A Pointlessly Complex Calculator Prompt
Performs basic integer math without using numbers or operations by simulating logic gates and arithmetic circuits.
With Rust 1.29+ and cargo
installed:
git clone https://github.com/kevlarr/rusty-calc
cd rusty-calc
cargo run -- -i
for an interactive prompt, orcargo run -- '4,000 + 12 * 3'
for a single calculation- Make fun of it
- Support float
- Parse simple binary arithmetic operations
- Support operator precedence without requiring parentheses
- Support nested expressions via parentheses
- Add
- Subtract
- Multiply
- Divide
- Exponentiation
- Modulo