Software calculators

Bacal
a basic calculator

Screenshot of a terminal emulator showing an interactive work session involving math and multicolored text.

Welcome to Bacal: a simple, friendly expression calculator for the Linux console. There are many like it; Bacal is mostly just an exercise, though it also tries to bring a little color into a world that's still pining for the teleprinter era in some ways. To use, fire it up and follow the prompts. The -h command line option shows how to change program behavior.

Features

Download

Bacal is open source under the MIT license. See inside the archive for full text, as well as how to contact the author and such.

Special thanks to the BaCon community for the interest and encouragement.

Technical details

Bacal is implemented in 111 lines of BaCon, relying on the new EVAL function, itself powered by the TinyExpr library. See the source code for more information. You can compile it anywhere BaCon itself runs, which is in theory any Unix-like platform with a C compiler and modern shell (preferably Bash).

Note: Bacal 1.0 is written for BaCon 3.9.x, and won't work with newer versions of the compiler due to the overhaul of EVAL since then.