Sep 04 2024
rpcalc - reverse polish notation calculator
calc [values...]
A postfix calculator built in rust, with a companion bash script for a CLI. When ran with no arguments, it enters a calculator “shell” which can exited with “q”.
When inside this shell, you can save functions or constants by starting a line with “def”, and you can then recall this saved value with “fn”.
$ calc 2 2 +
> 4
$ calc pi 2 / sin
> 1
$ echo "entering calc shell"
> entering calc shell
$ calc
calc$ 2 2 +
==> 4
calc$ pi 2 / sin
==> 1
calc$ def 2 * 1 +
calc$ 4 fn
==> 9
calc$ 10 fn
==> 21
calc$ q
$ echo "back in normal shell now"
> back in normal shell now