Skip to content

sefk/cs193p-rpncalc

Repository files navigation

Dumb little RPN calculator, learning project for CS 193P, taught by Paul 
Hegarty.  Don't try to use for anything useful.  Not well tested.

For more info, see http://cs193p.stanford.edu/

- Sef Kloninger


TODO

- I now getting these warnings from the Operator class.
  "PerformSelector may cause a leak because its selector is unknown"
- Not sure if saving/loading defaults is actually working.  How to
  test? Debugger seems to get confused
- When we don't have the right number of operands, consider going
  into an "error mode" and displaying a red "E" or something like 
  that.  Now it just assumes zero and runs with that, which is a 
  little presumptuous.
- Same with divide-by-zero case.  Currently just evals to zero.
  Infinity makes more sense, error makes even more sense.


Icon courtesy of PSD Graphics (http://www.psdgraphics.com/), free for non-commercial 
use.  Thanks guys!


Profiling data, iPad, complicated function with lots of panning and pinching:

Running      Time    Self        Symbol Name
7178.0ms   34.8%    7178.0      -[GraphView drawLineBetweenPointA:andB:inContext:]
3751.0ms   18.1%    3751.0      +[CalculatorBrain popAndEvaluate:usingVariableDict:]
1639.0ms    7.9%    1639.0      -[Operator evaluateOperand:withOperand:]
1341.0ms    6.5%    1341.0      +[CalculatorBrain isOperator:]
1186.0ms    5.7%    1186.0      +[CalculatorBrain runProgram:usingVariableDict:]
891.0ms      4.3%    891.0      +[Operator operatorFromOpname:]

About

RPN Calculator from CS193P

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published