Hacker News new | ask | show | jobs
by armchairhacker 1369 days ago
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.

6 comments

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!

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).
Nice!
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
Nice, I created my own: https://numbr.dev
"Figr", "Numbr"...

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

Next up: Calculatr

> 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.

True. I also have a nice naming for: zx and https://fx.wtf
Nah they're just heavily inspired by the Welsh :p
My app https://www.tasktxt.com is a text based todo list with timers. Similar in spirit.
Looks awesome, congratz!
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.
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

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.
If you'd like a flowchart editor that's keyboard-first you can try what I've made here: https://www.knotend.com.
Well, top of my mind, there’s Numi and Soulver which are quite similar. There’s lot of such apps I have the impression.