Live data from Hacker News

Native all the way, until you need text

justsitandgrin.im

231–240 of 328 posts

Re: Native all the way, until you need text

#231
post #227

Earlier quoted context omitted.

Because predicting the future roughly as well as everyone else doesn't make you rich. Predicting a surge in RAM supply after a surge in RAM demand and a huge increase in RAM margins is economics 101.

We are still bound by natural resources, as much as economics 101 loves to ignore this simple fact.

Scarcity of natural resources is squarely within the realm of economics 101.

The open question in my mind is for how long semiconductor demand will continue to grow faster than we can increase production capacity.

Re: Native all the way, until you need text

#232
post #23

I once tried mobile development in semi early days android. At the time I made a free Hackaday reader app because I was a daily reader and loved it. I remember spending 4 hours to make a scrollable element that wasn't jumpy or buggy. There were several stackoverflow answers full of gotchas explaining all you had to do. I finished and published the app but never again. Native stuff has terrible developer experience.

> "I once tried mobile development in semi early days android."

Yeah those early days ~2010ish were very painful. Things got much better as early as 2016 and they have improved each subsequent year since.

I'd say there has never been a better time than now, in terms of tooling, to pick up native Android.

Plenty of rough edges still around though.

Re: Native all the way, until you need text

#233

Earlier quoted context omitted.

> Browser rendering engines are pretty mature at this point, with significant GPU acceleration, and over a decade stress-testing by bloated web apps. Even so, there is a stark difference, even more so on low-powered devices, between native apps and even the lightest of browser apps. I'm traditionally a web developer, but started developing native cross-platform applications the last 6-12 months, and the performance g…

My experience too, and that's not even touching the disproportionately high RAM usage of frameworks like Electron. Sure, "unused RAM is wasted RAM", until the system starts swapping heavily because of the high RAM usage. It doesn't even have to be old devices, there are still laptops being sold with 8GB of RAM in 2026.

Electron would be fine… if most of us were running just one electron app.

In reality we’re stuck with 2-5 electron/CEF apps plus whatever is running in browser tabs as well as whatever webviews system stuff are running, which all quickly pushes into VM paging territory on low memory devices.

Re: Native all the way, until you need text

#235
post #217

I recently launched a text editor for iOS that uses TextKit 2 and is highly performant with files of 5,000 lines (I tested with Moby Dick from Project Gutenberg). I made it between Aug 2025 and Apr 2026, development is ongoing. Every keystroke is restyled in under 8ms: no debouncing, no delayed rendering. 20 rapid keystrokes are processed in 150ms with full restyling after each one. Tag and boolean searches complete…

It makes sense when the editor is a core feature of your paid product. I understand the sentiment. But is not it strange that I would need 8 months & a "development is ongoing" mindset just to render Markdown (which is very secondary to the main app features, and mostly just a user convenience people expect in 2026) with a custom low-level solution, effectively playing hardcore engineer instead of building what I act…

> just to render Markdown

Rendering text beyond ASCII is famously difficult to do; rendering formatted text is sometimes difficult to even make sense of (e.g. what should a style change in the middle of an Arabic word do? how about a selection boundary being moved with arrow keys?); rendering honest-to-goodness Markdown, which can technically include arbitrary HTML tags, is nowhere in the vicinity of a small project.

None of which is to say that you shouldn’t demand that a toolkit solve it for you, only that I understand why the RichEdit control reportedly had a separate team allocated to it in turn-of-the-millenium Microsoft. Working with a large amount of formatted text feels like it should be the most complicated feature of any UI toolkit and I shudder at the thought of even designing the API for it.

(A web browser is good at all this. It also has the API surface of a web browser.)

And some things will still be on you regardless. Did you know Android has two modes for text wrapping, one that won’t reflow the entire paragraph after a single-word change at the end and a different one whose results embarrass a typographer from half a millenium ago? That’s very much the correct way to do things, but if you’re streaming text in, it’s on you to decide whether you want subpar wrapping throughout or a layout jump whenever a paragraph break arrives. Most importantly, it’s on you to know the question exists; there are more, some more important than this one.

(Modern toolkits aren’t the only ones that can be bad at scaling to large amounts of data, either. Notably, Microsoft had to write an entire new “windowless” one to replace USER’s heavyweight window-based one so that Access wouldn’t collapse under its own weight. They then reused it for IE, for similar reasons. Raymond Chen’s response[1] to complaints about that toolkit staying private to Microsoft amounted to “fuck off”.)

[1] https://devblogs.microsoft.com/oldnewthing/20050211-00/?p=36...

Re: Native all the way, until you need text

#236
For rich text rendering HTML and browsers are simply the best. Highly optimized. For simple layouts (like rendered markdown) they are incredibly fast.

On most platforms it's quite easy to embed a browser in a frame (show a changelog, an email, or a page of interactive charts). With a few tweaks this can feel completely seamless.

It becomes really painful (or impossible) though, if you need those complex text rendering on multiple places scattered over the native UI. Or if the native UI should interact with the HTML somehow (drop-downs, edit text, add native controls inside html).

Thats why everyone is building Electron/etc apps.

Re: Native all the way, until you need text

#237
post #227

Earlier quoted context omitted.

Because predicting the future roughly as well as everyone else doesn't make you rich. Predicting a surge in RAM supply after a surge in RAM demand and a huge increase in RAM margins is economics 101.

We are still bound by natural resources, as much as economics 101 loves to ignore this simple fact.

Supply of RAM isn't really limited by natural resources - silicon is literally one of the most abundant materials on the planet. It's limited by the construction of billion dollar factories.

Re: Native all the way, until you need text

#238

Earlier quoted context omitted.

Except JavaScript isn't "crazy fast". Not by a long shot. How did Microsoft just make Typescript 10x faster? Oh right, by reimplementing it in Go. https://devblogs.microsoft.com/typescript/typescript-native-... See also: https://blog.metaobject.com/2015/10/jitterdammerung.html Please don't use Electron.

I am going to miss being able to host TypeScript in a web view however.

You still can. If you port the compiler to something that runs in a web view. WASM sounds easiest.

Re: Native all the way, until you need text

#239

Earlier quoted context omitted.

If HTML engines are better than native UI libraries at rendering rich text, possibly the hardest thing UIs need to render, why would I not also use it to render easier things like buttons or text fields? Also, OS X rendered its UI with DisplayPDF/Quartz for the longest time.

The native Apple libraries are terrific at rendering rich text, it’s one of their strongest assets. The poster’s issues seem to be specifically because they want to use markdown as the backing. The native rich text backing for native Apple views is attributed strings. They could translate the markdown to attributed strings, but seems like they don’t want to.

[dead]

Re: Native all the way, until you need text

#240
post #144

Earlier quoted context omitted.

At this point on Win32 Qt might as well be the native UI. They did a better job of maintaining a coherent visual theme that says "Windows" and fits the design patterns than the actual owners of the platform.

I disagree. I use P4V (Qt-based) regularly. Its lists are quirky and sometimes don't scale property with the OS DPI settings.

I'd be more curious about that specific app. Niche bespoke commercial apps have this habit of being permanently stuck on old versions of Qt that don't handle these things as well as the newer versions. And until they are totally broken on Windows, the developers will never be motivated to lift a finger to fix this.

I have no idea if this is the case with P4V, but it absolutely is the case with a few other things I use.

Post reply on HN