Live data from Hacker News

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

github.com

21–30 of 281 posts

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

#21
post #16

So is it Chromium-based or not? "which makes it CPU- and memory-efficient when compared to other Chromium-based solutions like Electron"

They're making use of yoga (a layout engine) so I assume that it is not web based (because why would you use yoga otherwise).

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

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

It's definitely not. It's just a different toolkit that the one you already have in memory, so it can't "cheat".

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

#23
post #16

So is it Chromium-based or not? "which makes it CPU- and memory-efficient when compared to other Chromium-based solutions like Electron"

The word "other" probably shouldn't be there. It seems to wrap Qt. From the NodeGUI page: "it is a wrapper for a native C++ widget toolkit QT".

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

#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 somewhere in the middle.

OT but a bone to pick with that article:

> Modern text editors have higher latency than 42-year-old Emacs. Text editors! What can be simpler? On each keystroke, all you have to do is update a tiny rectangular region and modern text editors can’t do that in 16ms. It’s a lot of time. A LOT.

That isn't what my text editor is doing, though. It's doing autocomplete suggestions, linting code as I type... all sorts of things we never had a couple of decades ago and are huge productivity boosters. Sometimes I feel like people forget that.

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

#25

Earlier quoted context omitted.

That’s the case, yes – the UI runtime is Qt5 (which is rendered using low-level graphics APIs, so we class it as “native” – mostly in contrast to WebView-based UIs), and it’s the same API regardless of which platform you’re running on.

I saw Qt and immediately understood what you were trying to say, but for the record: That’s not what native means. Native means “uses the platform widgets and drawing/theming api” and Qt is not native: it actually draws its own widgets (for the most part with certain exceptions on certain platforms) that are drawn to mimic the system UI with subtle differences. If the system UI implementation suddenly changes (say wi…

Real question, what do some people mean with native C++? Or stuff like react native? Seems like it just equals more performance / peels away an abstract layer.

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

#26
post #15

Earlier quoted context omitted.

I saw Qt and immediately understood what you were trying to say, but for the record: That’s not what native means. Native means “uses the platform widgets and drawing/theming api” and Qt is not native: it actually draws its own widgets (for the most part with certain exceptions on certain platforms) that are drawn to mimic the system UI with subtle differences. If the system UI implementation suddenly changes (say wi…

Is Qt considered native when you use KDE and not native when you use GNOME? Is Qt 3 considered not native when you use a KDE release that uses Qt 4 under the hood?

I would say so. Just like GTK is native on GNOME but definitely not on Windows. "native" (to me) really just means whatever the system is designed for.

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

#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's project by Electron standards. If NodeGUI was pruned a bit more, it wouldn't be too far off from where Go is at right now for Hello World on the console. Although one does have to take into consideration that it assumes external dependencies are available such as V8 I assume? Does it statically build? One thing I'm curious about is I looked at the yarn lock file and I couldn't find Qt so I have no idea where it comes from.

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

#29
Is there a way to have some small application that talks to the machine via a set of HTTP apis?

I envision something where you can just use your regular web app, have the user install the "Desktop Connector" which would be listening at say, port 8000 - then your web app can talk to the desktop via those APIs, instead of installing an Electron or related.

I must be missing/forgetting something crucial since that seems like the most straightforward solution imaginable.

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

#30

Maintainer here – Happy to answer any questions!

I know QT is dual licensed for application development. How's the licensing here?

Some clarification on that from the maker of the parent project, NodeGUI, here: https://twitter.com/a7ulr/status/1225498258233053184?s=21

Atul is licensing NodeGUI as MIT, so I’m licensing Svelte NodeGUI as MIT accordingly.

Post reply on HN