News for hackers. Stuff that matters.
Re:Show HN: Figr.app – a multi-user, notepad style calculato... by armchairhacker on Monday September 19, 2022 @08:31PM (#32906072)
I wish there were more apps like this which let you just type text and make/do things. Just make everything a sort of real-time coding. It's often much faster to do stuff with text and keyboard than any fancy GUI.

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.

Re:Show HN: Figr.app – a multi-user, notepad style calculato... by jklp on Monday September 19, 2022 @09:18PM (#32906453)
Agree about the "just type in text" paradigm though I feel they suffer from the "empty state" problem. You can see I tried to mitigate with the "blank sheet" placeholder text, and on web there're templates available. Unfortunately it appears only a fraction of users use the templates, and of course users never read the placeholder text!

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!

Re:Show HN: Figr.app – a multi-user, notepad style calculato... by avdlinde on Tuesday September 20, 2022 @02:48AM (#32908512)
How about using something like NaN instead of 0? To not have a small set of calculations being all 0 and missing from a larger end result (which would go to NaN instead).
Re:Show HN: Figr.app – a multi-user, notepad style calculato... by alsajjad on Tuesday September 20, 2022 @06:13AM (#32909858)
Nice!
Re:Show HN: Figr.app – a multi-user, notepad style calculato... by 4silvertooth on Tuesday September 20, 2022 @12:35AM (#32907698)
I had been looking for such an application, but than I decided to build one myself that suffice my needs, here is the repo https://github.com/4silvertooth/QwikTape
Re:Show HN: Figr.app – a multi-user, notepad style calculato... by medv on Tuesday September 20, 2022 @05:31AM (#32909569)
Nice, I created my own: https://numbr.dev
Re:Show HN: Figr.app – a multi-user, notepad style calculato... by lake_vincent on Tuesday September 20, 2022 @08:38AM (#32910831)
"Figr", "Numbr"...

I'm starting to think you guys don't like vowels at the end of your words.

Next up: Calculatr

Re:Show HN: Figr.app – a multi-user, notepad style calculato... by codetrotter on Tuesday September 20, 2022 @10:37AM (#32912201)
> starting to think you guys don't like vowels at the end of your words

Naming reminds me of the mid to late 2000's.

Flickr, created in 2004.

Tumblr, created in 2007.

Re:Show HN: Figr.app – a multi-user, notepad style calculato... by medv on Tuesday September 20, 2022 @09:22AM (#32911304)
True. I also have a nice naming for: zx and https://fx.wtf
Re:Show HN: Figr.app – a multi-user, notepad style calculato... by danielvaughn on Tuesday September 20, 2022 @09:30AM (#32911405)
Nah they're just heavily inspired by the Welsh :p
Re:Show HN: Figr.app – a multi-user, notepad style calculato... by trafnar on Monday September 19, 2022 @09:06PM (#32906360)
My app https://www.tasktxt.com is a text based todo list with timers. Similar in spirit.
Re:Show HN: Figr.app – a multi-user, notepad style calculato... by xixixao on Tuesday September 20, 2022 @10:26AM (#32912074)
Looks awesome, congratz!
Re:Show HN: Figr.app – a multi-user, notepad style calculato... by feifan on Monday September 19, 2022 @09:42PM (#32906623)
The hard thing about plain-text is that you quickly run into domains/problems that are too complicated to easily represent as plain-text. When that happens, you run into problems: the text representation becomes really verbose (e.g. XML) or exhaustingly terse/unergonomic (e.g. LaTeX, IMO), and you can only build anemic tooling.
Re:Show HN: Figr.app – a multi-user, notepad style calculato... by armchairhacker on Tuesday September 20, 2022 @01:12AM (#32907903)
one solution to this is to make an editor which is almost text but has snippets like inline images, controls, and fancy decorations. e.g. Racket snips, JetBrains MPS

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

Re:Show HN: Figr.app – a multi-user, notepad style calculato... by jklp on Tuesday September 20, 2022 @12:07AM (#32907542)
Oh yeah completely agree. I've been working (on and off) on some designs embedding other non-text items into the sheet e.g. tables, graphs, etc. Still in the early phases but the difficulty is balancing the complexity / simplicity.
Re:Show HN: Figr.app – a multi-user, notepad style calculato... by escot on Tuesday September 20, 2022 @08:26AM (#32910734)
If you'd like a flowchart editor that's keyboard-first you can try what I've made here: https://www.knotend.com.
Re:Show HN: Figr.app – a multi-user, notepad style calculato... by illiac786 on Tuesday September 20, 2022 @06:10AM (#32909843)
Well, top of my mind, there’s Numi and Soulver which are quite similar. There’s lot of such apps I have the impression.