nick ~ $ cat tools/dataflow-calculator.html

Data Flow Calculator

This calculator uses data-flow to enable slightly more advanced calculation. (show example)

Each line is an expression, ex. a = 1 + 1. Later lines can use values from earlier lines by name, ex. b = a * 3. The value of the last line is shown in the total at the bottom.

The following basic math operations are supported:

  • Add: 3.4 + 5.6
  • Subtract: -1.2 + 3
  • Multiply: 1 * 3
  • Divide: 3 / 2
  • Exponentiation: 2 ^ 4

This UX attempts to find a middle step between the classic numpad calculator and a spreadsheet / full programming environment.

The UI is inspired by a REPL, but streamlined for mobile use.

Most importantly, you can change statements, which triggers recalculating everything that depends on it.