Skip to content
Rory O’Kane edited this page Feb 4, 2015 · 2 revisions

CalcuDoc is a free clone of Soulver built on the Frink programming language.

Main window with sample calculations

This program is a calculator that shows all your calculations in a text document. Its main advantage over traditional calculators is that you don’t have to explicitly ask for the answer – it is calculated as you type. What’s more, calculations are performed using the powerful Frink calculation and programming language, which is free to include as a library in other programs. Frink allows calculations to easily keep track of units and prevent you from making conversion errors, comes with built-in constants, and even contains programming constructs like loops and defining your own functions for advanced users.

Here is a one-minute video that describes and demonstrates the program:

screenshot of YouTube introduction video

You can view and download CalcuDoc’s code on GitHub.

Motivation

I like Soulver, but it’s not free. I also wanted to see what would happen if I gave Soulver a more powerful, robust language to back it. And I wanted a better environment to explore Frink with than the GUI it comes with.

Audience

There are a few types of users who might want to use this program. Someone who wants to calculate one thing quickly and easily, such as summing a few numbers. Someone who wants to calculate something with multiple steps is another case. They may be exploring a numerical situation, not knowing all the steps of the calculation ahead of time. For example, they might be calculating the cost of a Drexel meal plan and comparing it to how much they currently spend. The program is also useful for someone who wants to explore the Frink language more interactively than with the official GUI, which requires you to explicitly run calculations, and does not let you lay out your calculation history so that only important past calculations are shown.

Key features

  • live-updating calculations – you don’t have to press “=”
  • unit conversion and error checking – mix units fearlessly
  • backed by a complete programming language

Future work

  • Build the program as a standalone app. Right now, it can only be run from within an IDE. I need to fix the errors I get when I try to build it in to a standalone JAR file.
  • Highlight errors in the right margin by making their text gray instead of black. Right now, errors look a lot like actual results, which makes it harder for the user to realize when they have typed something wrong and need to fix it.
  • Change the three areas of the window from plain text fields to something that allow me to perfectly align row cells with each other, even when the cells have different heights, and to separate rows with whitespace. For example, a multi-line result should cause the calculation and line number row to be multi-line too, instead of causing all later results to be out of alignment. Swing doesn’t have any such component built-in, so this would probably require a lot of code wrapping a rich text editing component.

CalcuDoc was written by Rory O’Kane.

Clone this wiki locally