Live data from Hacker News

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

github.com

71–80 of 281 posts

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

#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 need to put front and center what that implies for users of your library (do they need to open source their use of react-nodegui by extension of QT's licensing requirements for example).

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

#72
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 )

A couple of years ago we switched an Electron/Cordova application to the native OS Webview (WKWebView on macOS and iOS, etc). The UI was written with Inferno + MobX and the backend in Swift/C#/Kotlin depending on the platform.

IIRC on macOS it consumed less than 15MB.

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

#74
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 )

@tonsky is right about the huge memory footprint (in terms of RAM) but 20MB for Hello World GUI program is totally fine today [0]. In my humble experience there is really hard to fit in below 10MB with a GUI app that only displays "Hello World" text, while the next 10MB are often consumed for extra resources like font, rendering cache or custom textures.

It might a bit rude to remind that, but the same person saying aforementioned words about huge memory usage promotes the Skija [1], Java-based GUI toolkit, which is even worse in memory consumption than electron (jb-compose provided examples, even in release builds).

[0] Memory Footprint of GUI Toolkits - https://szibele.com/memory-footprint-of-gui-toolkits/

[1] Graphics for JVM - https://tonsky.me/blog/skija/

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

#75

Maintainer here – Happy to answer any questions!

There are other projects like this - But what would really set it apart would be mobile (iOS and Android) support. Can we do anything to support that happening?

Qt does have an implementation that targets mobile. I don’t know how the licensing works, but in theory there should be a way to rely on Qt for mobile to extend support to iOS and Android. Way out of my own expertise, though!

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

#76

Earlier quoted context omitted.

Its UI runtime is Qt and its JS runtime is Node.js. No Chromium here :) it makes super-small, low-memory apps.

Yes, I suppose people could be understandably be confusing V8 with Chromium. It's using the same JavaScript engine as Chromium, which is of course developed by Chromium and is part of it, but without the rest of Chromium, as Node.js always has. It's a great example of synecdoche [1]. :) [1] https://en.wikipedia.org/wiki/Synecdoche

V8 is tiny compared to the operating system known as chromium.

Anyway, it was just a misunderstanding based on poor writing on the web page.

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

#77
post #24
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 blog post does speak to me, but 20MB for a program with a truly functional, modern UI doesn't outrage me that much. IMO there's a tradeoff: we could be writing all our programs in C, still. But it would be enormously difficult and there'd be way more bugs. On the other end of the spectrum we can be lazy, use web tech everywhere and never optimise our ballooning JS codebases. This feels like it's at least somewhe…

>all sorts of things we never had a couple of decades ago

We had them.

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

#78
post #27
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 )

Help me build Cosmopolitan Libc. We're using modern compilers to build programs that are tinier and more portable than anything developers even as far back as the 70's or 80's were able to produce. https://justine.lol/cosmopolitan/howfat.html I built a LISP interpreter too, which makes Altair BASIC look bloated by comparison. https://github.com/jart/sectorlisp I will say that 20mb isn't too shabby if we judge the OP'…

> built a LISP interpreter too,

Some friend of mine like it :D.

But I'd like that more if it was Scheme.

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

#79

Earlier quoted context omitted.

I disagree. I remember using lots of GUI apps within a 96MB budget 25 years ago -- even browsers. Electron does not provide that much more desired features than apps from 25 years ago.

You can make a very decent Electron app with roughly (roughly = ~2x or less) that amount of RAM too if written well, for that you get pretty much a codebase that you can use everywhere, which on it's own is _massive_.

I've noticed Signal Desktop only uses 100mb. That is quite good for an electron app. A simple server-side node process will use at minimum ~20mb, which obviously does not include a browser.

It's open source, I've been meaning to poke around and see what they are doing differently.

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

#80
post #73

I'm seeing a lot of Qt vs. Chromium in this thread. Here's your mindblown.gif of the day: Chromium is based off Webkit which is based off KDE which is based off Qt. https://en.wikipedia.org/wiki/KHTML

On GUI's, if Go had some GUI a la inferno (no, not the crap of node, the one from the Unix/C/Plan9 guys), it would be the best thing ever on interfaces.
Post reply on HN