Live data from Hacker News

Cross-Platform GUI Toolkit Trainwreck (2016)

blog.johnnovak.net

31–40 of 177 posts

Re: Cross-Platform GUI Toolkit Trainwreck (2016)

#31
post #10

Earlier quoted context omitted.

Why does electron have broken text rendering? Surely the Chrome browser’s tendering does a good job? Or do you mean something like “it doesn’t match system defaults”?

Not matching system settings (not just defaults, but the setting, i set the settings for a reason) is broken!

This. It's a bug to use a different text renderer than the system, because it will never look the same and with text this is very noticeable and irritating even to some people. You do _not_ want your core visual to be irritating.

Re: Cross-Platform GUI Toolkit Trainwreck (2016)

#32
post #19
post #15

Earlier quoted context omitted.

AKA useful software that actually does something users want, rather than some kind of ascetic practice exercise. Yes, yes it does.

Well, not really. I hate on Electron not because of its size on disk, but its runtime memory footprint. Things like Skype in the background using 500MB, an Autodesk update notifier sitting silently in the tray using 350MB etc. all add up to a few GB of main memory you suddenly don't have. And these numbers are real, by the way.

It's kinda weird how little you have to do with 32 GB (!) of RAM until Windows starts to complain about not having enough free memory and you-better-close-some-applications-right-now! I remember when a 1 GB memory upgrade was something, and back then I could even play a game on 512 MB of memory and occassionally alt-tab to a web browser for cheats... nowadays a web browser on 512 MB RAM is virtually impossible.

(Edit: I realize this complaint is quite old, but from the age where hundreds-of-MB main memory were mainstream we have seen very little actual improvement in GUI fancyness, yet a massive explosion in CPU and memory use, and often even heavily deteriorated responsiveness. That doesn't hold going from the "couple of megs" to "hundreds of megs" age.)

Re: Cross-Platform GUI Toolkit Trainwreck (2016)

#33
post #11

What is this ridiculous obsession with executable size? How much time did this author spend chasing down alternatives to a measly 120MB? If they're working on art project then fair enough, but if they're working on a useful program then surely anything else they could have done with that time would have brought more value to end users than shaving off 3 cents' worth of disk space.

Believe it or not there are countries where people trade sex for power to charge their phones. I'm sure the resources wasted by bloated apps are precious to them.

Re: Cross-Platform GUI Toolkit Trainwreck (2016)

#34
post #20

Earlier quoted context omitted.

> If personal storage units were given away for free, you might argue that it doesn't make sense to organize your stuff, or remove stuff you don't need anymore, and you would be wrong. The least important reason to consider is to conserve disk and bandwidth; the most important is to reduce risk by reducing surface area. Small, sleek and efficient is mostly about reducing cognitive load, even if it had it's roots in m…

120 MB would be enough for me to choose an alternative to your application.

Why? There are computers older than I am for which that's an insignificant amount.

Re: Cross-Platform GUI Toolkit Trainwreck (2016)

#35
post #11

What is this ridiculous obsession with executable size? How much time did this author spend chasing down alternatives to a measly 120MB? If they're working on art project then fair enough, but if they're working on a useful program then surely anything else they could have done with that time would have brought more value to end users than shaving off 3 cents' worth of disk space.

Electron usage has forced me to spend some of my yearly dev budget on a 32GB machine; this comes to an extra $400 if purchased preinstalled. Now, had I not relied on so many Electron apps I probably wouldn't have required a new laptop at all. Memory management (or what I like to call memory hygiene in cases like these) is a concern. For far too long developers have brushed aside the memory usage of their applications not thinking of the cost on their end users. This has real negative effects on the user experience. This isn't confined to Electron though; many other apps also use an enormous amount of memory as well. It is a general problem.

Re: Cross-Platform GUI Toolkit Trainwreck (2016)

#36

Wonder how the author didn't come across Qt or wxWidgets in his research?

The first google hit for “qt nim” is [1] from 2017, so I think it’s safe to say it did not exist yet. The first hit for "wxwidgets nim" is [2], which has one open issue (since 2016): "Trouble building wxnim on win7".

Yes, time travel would solve most software development problems.

[1]: https://github.com/nim-lang/Nim/issues/6043 [2]: https://github.com/Araq/wxnim

Re: Cross-Platform GUI Toolkit Trainwreck (2016)

#37

Wonder how the author didn't come across Qt or wxWidgets in his research?

He does not like Qt because a simple window with a few buttons and sliders will end a big (in term of MB) application. He did not realize that one but another reason not to like Qt is that fact that they recreate the native look on each platform it's highly inefficient on macOS.

Re: Cross-Platform GUI Toolkit Trainwreck (2016)

#38
post #34

Earlier quoted context omitted.

120 MB would be enough for me to choose an alternative to your application.

Why? There are computers older than I am for which that's an insignificant amount.

Curiously, there are only a handful of computers, ever, that were older than I am. And I'm not that old :)

Re: Cross-Platform GUI Toolkit Trainwreck (2016)

#39

To date, the best solution to this problem that I have seen is to write all your core code in a shared library using something like C++, and then hooking it up to a thin layer of completely native, platform-specific code for the UI. It’s fast, lightweight, looks good, and requires minimal extra code if you do it right.

MVP (Model View Presenter) is one approach to decouple the UI from the interaction logic to achieve that goal. Only the view implementation has to be platform specific. The viewmodel is also shared among platforms.

Is that the pattern React implements? I've seen it being used for mobile and VR for example, but IIRC you need to use different components for those targets. I do recall someone replacing the renderer output from HTML to err, text or XML I believe.

Re: Cross-Platform GUI Toolkit Trainwreck (2016)

#40
post #37

Wonder how the author didn't come across Qt or wxWidgets in his research?

He does not like Qt because a simple window with a few buttons and sliders will end a big (in term of MB) application. He did not realize that one but another reason not to like Qt is that fact that they recreate the native look on each platform it's highly inefficient on macOS.

> another reason not to like Qt is that fact that they recreate the native look on each platform it's highly inefficient on macOS.

Given how everyone jumps on Electron these days, I don’t think thats a particular concern for anyone who just wants something to “simply be” cross-platform.

Post reply on HN