Yet another calculator in a sea of countless calculators? How absurd!
Equali, The Calculator
How cliché! How trite! Yet how obligatory! No self-respecting GUI toolkit can call itself born without one of these things!
Equali is an arithmetic calculator that supports complex mathematical expressions (well, at least with parentheses) and can undo mistakes. It will have memory buttons in the future.
Features
- Evaluates arbitrary arithmetic expressions with parentheses
- Undo history
- Supports copy and paste
- Lets you know instantly when your expression is invalid before you click equals
- Will hopefully support history, undo, and standard functions in the future
Note
Currently uses Ruby’s parser to evaluate, with illegal characters filtered out. If I can find out how to prevent uncontrollable things like method calls (or how to write my own expression parser!), Calky may support built-in and simple custom functions in the future.
License
Copyright © 2008 Joshua Choi. This software is licensed under the CC-GNU GPL version 2.0 or later. Logo icon remixed from an icon by the Tango Desktop Project. It is licensed under Creative Commons Attribution-Share Alike 3.0
Speak now or forever hold your peace:
Joshua — I’ve removed the password on Equali for you. Go ahead and edit the description and upload versions.
Wonderful! Thank you, omygawshkenas! (Would it be possible to contact you further? I want to add a password again. :) )
0.0.0 RELEASED: Only tested on Shoes r925 Mac OS X. Supports arbitrary arithmetic expressions with parentheses, but without any letters or symbols other than those in the buttons. Uses Ruby’s eval to evaluate expressions. Has an Undo Clear button that holds one expression in its history. Has status text on the bottom that changes as the expression is entered and evaluated
Sure, sure, look in the shoebox at the bottom of the page for an email address.
0.1.0 RELEASED: Still only tested on Shoes r925 Mac OS X. Added a general undo history, not just for clearing. It currently saves up to 10—might make a persistent preference for this later, if it’s worth it.
A call for help to anyone:
I’ve been trying to figure out a way to implement a custom simple syntax parser in Ruby for this little app, so that instead of using Ruby to directly evaluate expressions, I could evaluate expressions with arbitrary functions in a controlled manner.
Searching for Gems turned up no living projects. Googling for methods for creating simple parser turned up nothing either.
If anyone could direct me to a good resource or tutorial on how to create a simple parser, that would be dandy.
“If I can find out how to prevent uncontrollable things like method calls (or how to write my own expression parser!), Calky may support built-in and simple custom functions in the future.”
You don’t need your own expression parser. Use TreeTop, a wonderful little gem that lets you easily build up a “grammar” which can apply to any syntax (including arithmetic, easily) using a nice DSL it provides.
In fact, one of the developers gave a talk about it that kinda blew me away. He does a live 20-minute or so demo in which he actually makes a grammar for arithmetic, which can understand arbitrarily complicated arithmetic. And you can arbitrarily add other rules to the “grammar” which would allow you to process functions and whatnot. Here’s the talk:
http://rubyconf2007.confreaks.com/d1t1p5_treetop.html
Alternatively, an easier and hackier way of doing it would be to just recognize certain sequences of characters as valid, while filtering out all other illegal characters. So it would recognize “AVG” etc, but not other strings, which would be filtered out. Easy to pull off.
Seriously, the “hacky way” is a pain. I just tried to see how I’d do “AVG”, and still allow arbitrarily complex arithmetic with parentheses and whatnot. It’s possible, but what a pain. Treetop is cool, though there’s not much documentation I think.

Unfortunately, I’m currently unable to add the app’s file to this page, because it’s not recognizing the password I though I put in. When I registered this project, I must of mistyped the password. Sorry!
For now, I’m trying to get the password reset or something, but until then, no files! :(