3 ms·
It looks nice, although I wonder why you'd treat each line as an independant calculation? Generally I'd enter an expression, look at the result, then stop. If
by stevekemp 6y ago
It looks nice, although I wonder why you'd treat each line as an independant calculation?
Generally I'd enter an expression, look at the result, then stop. If I wanted to run multiple things I'd use a repl, which would let me copy/paste.
That said it might be useful if you allowed variables to be defined, I updated my own little repl/calculator to allow that recently and found it very useful:
calc> rent = 700.00
700
calc> fee = 92.00
92
calc> ( rent - fee ) * 12
7296
Allowing that makes your multiline input more useful, although I guess you would need to decide if you'd recalculate all lines using a given variable if it's value changed ..
- perryizgr8 6y agoThanks for the feedback! I like the idea of being able to define variables and use them in subsequent lines. Originally I wrote this purely to try out nearley.js, I was very intrigued by that library. Then I added the IP addresses function because I need to convert IPs to ints fairly frequently in my work. For that the line evaluation made sense.