Live data from Hacker News

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

github.com

51–60 of 281 posts

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

#51

Earlier quoted context omitted.

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.

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_.

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

#52
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'…

I can't remember the precise mechanism, but IIRC the base NodeGUI pkg downloads and builds a minimal QT, and then links into it using NodeGUI/qode which hooks up the Node and Qt event loops.

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

#53

Earlier quoted context omitted.

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.

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.

> Electron does not provide that much more desired features than apps from 25 years ago.

That's true, but advanced GUI features aren't Electron's selling point. It's used because it offers easy portability and the ability to leverage web-dev skills.

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

#54

Maintainer here – Happy to answer any questions!

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

From Qt's page https://www.qt.io/licensing/open-source-lgpl-obligations:

"In case of dynamic linking, it is possible, but not mandatory, to keep application source code proprietary as long as it is “work that uses the library” – typically achieved via dynamic linking of the library."

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

#55
post #48
post #39

Earlier quoted context omitted.

Then Windows 10 apparently lacks a native GUI toolkit, because it's certainly not "designed for" just one. A similar thing happened to Android.

One could argue Win32 is still the de-facto GUI toolkit in Win10. Things like .NET Windows Forms and (non-WinUI3) UWP are actually rendered with Win32 common controls.

WIN32 isn't de facto it is the canonical API for Windows. It always has been, since like the 1980's.

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

#56
post #39

Earlier quoted context omitted.

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.

Then Windows 10 apparently lacks a native GUI toolkit, because it's certainly not "designed for" just one. A similar thing happened to Android.

> Then Windows 10 apparently lacks a native GUI toolkit, because it's certainly not "designed for" just one.

Windows 10 has several native GUI toolkits. The same thing happened in MacOS, which transitioned from Carbon to Cocoa.

If the widgets are drawn by a toolkit that isn't bundled with the OS, it's a non-native GUI. Of course, this isn't always a bad move.

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

#59
post #44
post #24

Earlier quoted context omitted.

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…

However, most of that should be done in the background — it shouldn’t affect your actual text input speed. Auto-format is more along the lines of something that could be blocking, but we’re not dealing with latex problems as to be significant

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 ][ ties for first place with an iPad Pro.

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

#60

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…

the HTML5 JS APIs provide most desktop functionality you could want to access from the browser - does that cover what you mean? Reading location, video & audio, interacting with local files, that sort of thing.

Stuff like global keyboard shortcuts still isn't possible though. And you're stuck with the browser's notification system.
Post reply on HN