https://news.ycombinator.com/item?id=31817997
After a couple of user requests (and having a good think about it) I decided to migrate the web UI to create a Mac and Windows desktop app. After using it a little bit, I feel this is a much better experience than the webapp, and reduces a lot of the friction if I wanted to run a few small calculations.
You can find the download links below:
For context, Figr was a side project I worked on to get back into coding after being in management for the last few years. It's kind of a cross between popular notepad style calculators (like Soulver, Numi, etc), but also has multi-user editing (like Google Docs). I've got some example templates below which hopefully show what it can do, and hopefully is relevant to the community:
- https://www.figr.app/s/RUNWAY - An example to work out your burn rate / runway
- https://www.figr.app/s/LTVCAC - An LTV/CAC calculator
- https://www.figr.app/s/CONTRACTOR - Hourly rate calculator for contractors
Opened to feedback, or technical questions if others are in the process of moving, or thinking about moving their webapps to desktop apps, as it's been quite a journey!
Thanks!
Other examples: sequencediagram.net, SwiftUI and React to some extent, vim directory managers (e.g. some let you rename files just by editing text and delete them just by deleting lines)
The only issue is, I've worked on building these, and it's a lot harder than it looks. You can either do immediate mode, which requires fast parsing and rendering and supporting all sorts of illegal values; or you can try to do retained mode, but there are insane #s of edge cases and the effort to compute diff usually makes it slower anyways. Furthermore if you want a really fancy text view, you need to build it yourself, which is a huge project on its own.
I haven't heard of immediate / retained mode before - interesting concept! Figr is more straight forward and evaluates a line as "0" if there's an error (the opposite of "be conservative in what you send, be liberal in what you accept"!) so they are problems where entire calculations are "wiped out" if there's an error on a line, but I think that's the trade of to having accurate results.
As for a custom text view completely agree! I did do that initially though switched over to draftjs later and (despite it's lack of good guides) has been a huge time saver!
another which is more of a workaround is to make the preview editable. So when the text is hard to understand or manipulate you just edit the preview, and when it’s easier you just input text. i believe this is what SwiftUI does and what people have tried with HTML and React.
of course both of these are exponentially hard. The former means you have to write your own editor and the UI for the widgets and think about a lot of problems (text wrapping? cursor movement?) The latter means you have to write a UI on freely-editable content which is really challenging and then have it sync with the text which also brings up a lot of problems (AST formatting? How fast to update?)
In fact I haven’t yet seen a single good example of either type of editor, maybe SwiftUI is good although i haven’t used it. Many existing ones are buggy with ugly unintuitive GUIs or produce bloated AST
Figr, ignoring the lack of mobile apps, doesn’t really scratch this itch either though, as I want to self host my sync.
1: https://github.com/nortakales/vs-code-qalcIt works really great on mobile too (even their website is not updated it works fine on latest OSs).
I played around with porting my Numi sheets over, and the only thing that's tripped me up so far is using underscores as numerical separators, eg: 1_000_000 for 1000000. All my Numi values are written this way, so that's my only feature request. I guess I could just use commas in this context.
Great work!
Edit: And dark mode :)
From the OP
However, in my opinion, you need different examples to show the strengths of this app. A lot of the examples on your page look kinda clunky and error-prone to me, and better solved with a spreadsheet.
Take the "personal finance" one. The "total expenses" row lists out all the expenses adding them out one at a time. In a spreadsheet you'd just type =sum(A1:A5). Imagine it wasn't just 5 but 20 items. Now your sum gets pretty unweildy. How confident can you be from looking at that sum that you haven't missed one of the expense items? In a spreadsheet you know pretty clearly that =sum(A1:A20) has all those rows. Better still, if you insert a row to add another item, it'll update the sum for you.
The "Investment returns" sheet is another example. What if I wanted to extend that to 30 years? In a spreadsheet I'd just copy the last row and past it in the the next 10 cells and I'm done. Here's I have to paste it 10 times, and then manually update each row and hope I didn't make a typo anywhere. What if I didn't want my savings to be constant but assume that I'm going to increase savings a year over time?
The unit conversion is somewhat neat though, so maybe examples that use that a bit more?
As a mitigation I did add row highlighting (if you hover over a var it'll highlight the row it was defined at), but the underlying problem of dynamic sums is still there.
I was working on a TOTAL() function (which someone also mentioned in this thread), but conceptually I also think some of the calcs are better in a tabular format, so have been toying around with designs with tables etc.
Are you using OT or CRDTs for real-time editing?
Are you using any specific cross-desktop platform? (Electron?)
Thanks! This was an intentional design decision on the desktop too so I'm glad someone noticed!
> Are you using OT or CRDTs for real-time editing?
You know this is embarrassing - it's the first time I've heard of those terms and from a quick google I really needed this a few months ago! A lot of the problems described I actually had to battle with and if you try hard enough, you can get the calcs to break state between the users.
I'll definitely dive deeper into this, thanks!
> Are you using any specific cross-desktop platform? (Electron?)
Yeah sure - the app was initially written in React.js for web, and I just did a few modifications to get it deployed via Electron. Tbh the migration was quite straight forward (there were a few design tweaks and UI elements I had to make) but surprisingly the most difficult part was creating the binaries and submitting them to the app stores!
There was also some issue with CORS (due to Electron using local .html file) but managed to find some code to rewrite the headers which fixed it!
Example
$ python
>>> weeklyprice=4000
>>> dailyprice=weeklyprice/7
>>> februaryprice=dailyprice\*28
>>> februaryprice
15988Neither is as approachable for a non-programmer as the OP, however.
I'm still looking for the perfect text-based solution.
Some UI/UX remarks...
- I would expect to find the 'new sheet' option near the sheet list (on top or on the bottom perhaps?).
- Creating a new sheet does not give an empty sheet (instead it presents the same info as in the preloaded example).
- How do you deal with different notations for numbers? Can I switch somewhere from #,###.## to #.###,##?
- Operators and currency is now displayed in gray, just like the comments. This hurts legibility more than it helps focus.
- When you can detect unit indicators, maybe allow users to click on them to change the unit to another (compatible variant). For example change kilometers to yards.
- Header and sub-header styles are quite similar, makes them hard to discern.
- Would it be possible to edit the sheet title when clicking on the title itself (in the right panel)? Maybe show a pencil indicating this possibility.
- Local time format is not reflected in the sheet's modification time. What will happen if I share the sheet, will it reflect the latest modification time for all users or my latest modification / view? What I am trying to say is: is there a way for me to see if there are changes I have not seen?
- A little bit of hierarchy or tagging might help those with lots of sheets in the future.
- Exporting and printing options? :)
> What I am trying to say is: is there a way for me to see if there are changes I have not seen
Currently I have a red "dot" on the cloud icon in the navbar when it's lost server sync - but there are certain cases where it doesn't show. I do need to spend more time on the multi-user aspect, though it's quite a large piece of work and unfortunately not a lot of users seem to use it.
I also think a hierarchy / folder structure would be super useful. Using it regularly I have an unwieldy large number of sheets and it's difficult to find older ones / search!
Can you address the elephant in the room: why use Figr instead of Excel?
Why Excel? I feel there's a gap between a "desktop calculator" (like the default calculator in most OSes) and Excel.
E.g. Desktop calculators I can say, "calculate tax for a single item", but sometimes I need to calculate tax or multiple sums in a list. You can probably break out Excel at this point - though I feel there's a bit of inertia in this. I.e. Thinking of how to structure the sheet, where to put values / formulas / etc.
I feel with a notepad calculator, it's a bit closer to how my brain thinks and I can get simple calcs out quicker. I may be biased too, but I find it easier to read my results the next time I load the sheet in Figr vs Excel.
Btw I'm not saying this is an Excel replacement - there's always going to be a place for that, though I think this is a nice middle ground.
K for Thousands, M for Million, B for Billion and T for Trillion.
Some Calculators either dont offer these, or they do but with different Letters representation because M, B and T are used for something else. IMO this seems backwards because those are the most common unit in analysis.
Other Units including PB for Petabytes, TB. GB, MB, KB, as well as Mbps to Gbps unit conversion. us, ms, ns, for Latency calculation.
Getting Market Cap, P/E data etc from Yahoo Finance.
It's on the roadmap though and good to see others have the same idea!
For example I want to do a comparison between certain period of time, so Market Cap are specific to those Date.
In another example I want to keep an eye on Big Tech's current market Cap, and the list would update every day. Giving me an overview of current situation.
Just some quick feedback from the first things I tried in the app (which did not work). It has to do with currency conversion: https://user-images.githubusercontent.com/93975/191202587-9b...
I think it should be quite straight forward but it's more the deployment and maintenance I'm conscious of.
Mac and Windows (to an extent) both have app stores which can handle hosting, auto-updates, etc, though for Linux I'd have to build a bit of that myself. That also complicates platform specific dev / testing / deployment, and as this is a side project I'm conscious of time.
But if there's demand and things go well, I could be persuaded to release on another platform!
Testing should also be simpler as most of your dependencies will bundled and testing in one distribution should suffice.
If you are looking for an iOS/iPadOS app my own Kalkyl 3 includes support for shared documents with real-time collaboration.
You don’t input text (but there’s of course keyboard support), instead you input tokens so that e.g sin is one token just like the digits. WYSIWYG editing with raised exponents, root-overbars. Arbitrarily complex unit conversions (e.g USD/ft^2 to EUR/m^2 is a single conversion) and dimensional analysis.
The app is free, but the document features are for pay (with a free trial):
Just imagine speaking the name of your product to a family member who asks what you’re working on, or the cashier at the grocery store asks what your startup is.
I know you don’t know me and it’s none of my business. I just thought better to rebrand sooner than later. Maybe ask someone you trust wrt marketing kinds of questions?
Thanks for the work! Waiting for a Linux version :) (Flathub autoupdates, if you were thinking of appimages)
Just out of curiosity, what's the aversion to app stores? I know for paid apps there's a large commission to Apple / Microsoft (I try to download direct when I can) though for free apps I'm a bit more forgiving.
Numi:
+ lightweight
+ very fast start
- tabs are a paid feature
Figr:
+ variables
+ tabs
- slow start compared to Numi
- cannot customize the icon bar
What both apps dont have and what I am looking for: A super lightweight excel-like tables app to do basic calculations with formulas behind the cells. Do you know anything like that, guys?
It's on the list though but unfortunately due to how integral mathjs is to the app it might not be an easy change to make!