Live data from Hacker News

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

github.com

61–70 of 281 posts

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

#62
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"

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

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

#63

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…

Yep, you could make an HTTP server using Express.js, and a minimal GUI to go with it!

Of course, it could run headless, too. But there is attraction in making it an app that opens like familiar executables.

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

#64

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…

I mean you are basically just describing a standard local development setup, so in a lot of ways this is trivial. The trouble would be trying to package that up in user-friendly manner. It's definitely more work than it's worth, in a world where most people have computing resources to spare on a heavy framework like Electron.

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

#65
post #50

Very cool, I've been following React-NodeGUI for about a year now and I love Svelte. I especially love the idea of Svelte (compiling to imperative JavaScript code), but since it's technically a "superset" of JavaScript, IDE support has been an issue for me. Also I've cut my teeth trying to find a solid UI component library. These two things have restricted my use of the framework to smaller projects. Anyone have any…

It’s unfortunate but the component library situation is really Svelte’s weak point currently. At Monitoro[0] we bit the bullet and implemented the vast majority of our components from scratch. Apart from the obvious time to develop and test, and the trailing bugs that are hard to solve for small closed source projects, the experience wasn’t that bad. Ultimately what helped us the most is writing our components using…

Word, thanks! I think it's interesting because Svelte community support is pretty big. The repo's consistently been on Github's Trending repos for the past 2.5 years and it has an impressive number of stars

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

#66

Looks really good! At first glance, this seems like probably the best Electron alternative I've seen posted on HN. Apart from the consistent GUI layer, I think an underrated reason that many teams stick with Electron is the mature tooling for cross-platform builds and upgrades. It's pretty painful to DIY. It looks like NodeGUI doesn't currently support cross-compilation--is that something that's on the roadmap? How a…

Strongly agree. Hello World apps are great but it would be even better to see a Hello World tutorial that can actually be distributed to customers. You probably also need auto-update, native installers, code signing (notarization on Mac) and the ability to build native modules cross-platform.

This is a super-interesting project though.

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

#67
post #58

Would it be possible to use Deno for JS runtime? That should add some sandboxing limitations for apps.

I’d need to pass that question on to Atul (who made the parent project, NodeGUI). As long as Deno supports the same native API bindings as Node does (does it?), I imagine that it wouldn’t be out of the question.

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

#68
post #44

Earlier quoted context omitted.

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 ][…

Are you referring to this submission? https://news.ycombinator.com/item?id=23369999 Outstanding article. Total shame it only got 100 upvotes.

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

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

If we're only interested in one/"not-Mac/Win/FreeBSD" of those platforms, how small could we get programs down to? Is forgoing certain platforms supported?

Also, there was a really fantastic question asked in the last Cosmopolitan thread, but it wasn't answered; what's the answer to it?

https://news.ycombinator.com/item?id=26294721

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

#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/questions/450455/minimal-qt-execut...

Post reply on HN