Live data from Hacker News

Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

github.com

111–120 of 281 posts

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#111
post #71

I've been following react-nodegui since it was announced and I really like it. In terms of memory usage it's the cat's meow; now there's a question of adoption and component / UI libraries for the ecosystem. Perhaps a way to bootstrap that would be to align closer to react-native; at that point, we could use (js) components and libraries from react-native land. The QT licensing question is also somewhat iffy; you nee…

Since you seem to be familiar with both, can you say something about what react-nodegui offers compared to react native?

Is it just way simpler to use, like electron? Or does QT offer a more consistent cross platform experience? Or is it more mature than react-native-macos? Or for when you want to run on linux?

All things that could be appealing to me if it did that.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#112
post #94
post #14

This looks nice ! However... "Low CPU and memory footprint (...) memory usage is under 20 MB for a Hello World program" : I am the only one who still thinks this is huge ? (-> https://tonsky.me/blog/disenchantment )

20 MB is less than 0.25% of my desktop machine's memory, and 2% of a 2010-era netbook. 20 MB, while much larger than what it has to be, is tiny even by the standards of decade-old computers. RAM is cheap and plentiful. If you don't use it, its value is almost zero (the "almost" comes from OS-level caching of files and CPU-level cache misses of code).

> If you don't use it, its value is almost zero

Yet if you use all of it, its value is also zero - to every other program on the same computer. Don't be a dick; Use what you need, not all you can.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#113
post #70
post #14

This looks nice ! However... "Low CPU and memory footprint (...) memory usage is under 20 MB for a Hello World program" : I am the only one who still thinks this is huge ? (-> https://tonsky.me/blog/disenchantment )

That actually sounds kinda impressive, considering [0] says a minimal standard Qt hello world app is ~5mb and stock node.js is ~100MB. I'm curious what kind of magic is happening where node.js is in the picture yet the executable comes out at ~20MB. Is it simply a bundle of wrappers for most of Qt with Node.js being required to be installed separately? Is it purely UPX compression? [0] https://stackoverflow.com/quest…

Poked a bit more. It seems the 20Mb claim is indeed mostly only about runtime memory, and doesn't translate to equivalent disk usage.

The entry point in ther starter kit calls qode (a fork of node), which talks to qt via napi (node's API for c++ bindings). It can be distributed as binaries via the *-deployqt toolchains.

So for distributable binary size in disk, we're probably looking at something in the ~100mb range with no UPX shenanigans.

So, tl;dr not as magical as I initially assumed. The trade-off between "bloat" vs ability to use web paradigms feels like a reasonable one. Overall pretty cool stuff.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#114
post #70
post #14

This looks nice ! However... "Low CPU and memory footprint (...) memory usage is under 20 MB for a Hello World program" : I am the only one who still thinks this is huge ? (-> https://tonsky.me/blog/disenchantment )

That actually sounds kinda impressive, considering [0] says a minimal standard Qt hello world app is ~5mb and stock node.js is ~100MB. I'm curious what kind of magic is happening where node.js is in the picture yet the executable comes out at ~20MB. Is it simply a bundle of wrappers for most of Qt with Node.js being required to be installed separately? Is it purely UPX compression? [0] https://stackoverflow.com/quest…

A node OS X build is 13mb, 20mb on Linux.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#115
post #104

Earlier quoted context omitted.

The larger point is ease of use

Fine, "What does Electron offer in terms of easy portability that SDL2 doesn't have?"

Accessibility would be my immediate thought, although I'm not massively experienced in terms of GUI programming, so I could be off the mark here.

With something like SDL2, I would have to interface with each operating system's accessibility API directly, in such a way that's not easily portable, unless I bring in a separate library. Even something like GTK has this problem on platforms other than Linux. With Electron, I know that my program will be accessible wherever Chromium's rendering of HTML is accessible, which is a lot more places than anything I'm going to be able to bodge together.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#116
post #111
post #71

I've been following react-nodegui since it was announced and I really like it. In terms of memory usage it's the cat's meow; now there's a question of adoption and component / UI libraries for the ecosystem. Perhaps a way to bootstrap that would be to align closer to react-native; at that point, we could use (js) components and libraries from react-native land. The QT licensing question is also somewhat iffy; you nee…

Since you seem to be familiar with both, can you say something about what react-nodegui offers compared to react native? Is it just way simpler to use, like electron? Or does QT offer a more consistent cross platform experience? Or is it more mature than react-native-macos? Or for when you want to run on linux? All things that could be appealing to me if it did that.

react-nodegui is much simpler to use and more compatible because there's just node underneath, whereas react-native has varying js engines per-platform and a large library straddling the native-js bridge that reinvents things like Promise or XHR (it also cannot use native node modules). This reinvention also adds to the bloat (the calculator sample uses around 50Mb RAM with react-native-windows vs. 15Mb with react-nodegui, but it's a Store / UWP app whereas nodegui is win32 so it's not apples-to-apples).

However, react-native does have a sizeable addon ecosystem including UI frameworks (nowhere near web, but definitely more than nodegui's zero).

I didn't try react-native-macos, but I am using react-native-windows, which is functional enough and lets us share code between iOS, Android and Windows (I want to try react-native-macos but it looks like it doesn't get as much investment as windows).

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#117
post #87

Earlier quoted context omitted.

Even putting that aside, just showing text on a screen is much slower on modern PCs then older ones, since you have a far more complicated graphics stack and latency at several added steps. I remember an article a couple of years ago where someone rigged up a camera to measure key press to screen update on different machines and the results were eye opening. edit: found it http://danluu.com/input-lag/ . The Apple ][…

Related, my favourite thread to come out of the queer tech circles: "Almost everything on computers is perceptually slower than it was in 1983" https://threadreaderapp.com/thread/927593460642615296.html

Google Maps is a truly horrendous interface. It's pretty, it's well built, but it's fundamentally a horrible UX.

I find myself frequently bamboozled until I stop and try and determine which mode I'm in. Navigation behaves differently to browsing, which behaves differently to searching, which behaves differently to viewing an individual result. I'll be thrown from one mode to another and never feel in control of the app.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#118
post #114
post #70

Earlier quoted context omitted.

That actually sounds kinda impressive, considering [0] says a minimal standard Qt hello world app is ~5mb and stock node.js is ~100MB. I'm curious what kind of magic is happening where node.js is in the picture yet the executable comes out at ~20MB. Is it simply a bundle of wrappers for most of Qt with Node.js being required to be installed separately? Is it purely UPX compression? [0] https://stackoverflow.com/quest…

A node OS X build is 13mb, 20mb on Linux.

Are you looking at tar.gz files in nodejs.org/dist? Those are compressed. "Get info" on the actual binary on my OSX gives me a number closer to 80MB.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#120

Earlier quoted context omitted.

I just made hello world window in qt. It's 28 kB. edit: typo

The thing is nobody actually uses hello world programs, by the time you build a real application the difference in RAM usage between that and a good Electron app for example blurs significantly.

Looking at a few things on my machine right now:

- Emacs (with 251 open files and IRC running): 100MB

- Activity Monitor: 98MB

- Word: 227MB

- Spotify: 465MB

- Slack: 526MB

- Thunderbird (not Electron, but a similar weird browser hybrid thing): 663MB

- Teams (which appears to be Electron): 747MB

I'm not seeing too much of a blur here. The worst chat app (Teams) is using ~7x the RAM of my primary code editor that also is doing chat :).

Post reply on HN