Live data from Hacker News

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

github.com

201–210 of 281 posts

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

#201

Earlier quoted context omitted.

Another fascinating look into text on computer screens is this article: https://gankra.github.io/blah/text-hates-you/ . Just goes to show that text rendering is actually absurdly complex, unless you drastically restrict the problem space.

This sometimes makes me think we're still on the skeuomorphism phase of text. Its more and more complex to render realistic looking with proper illumination and textured faux leather for your UI until until you just admit you're rendering a ui on a screen and then you're back to colored rectangles. We're still trying to render ideas and words resembling handwriting and print press characters, until we embrace screens…

And then comes unicode and all the simplicity is gone again as the rest of the world uses more than 26 letters.

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

#202

Is there any electron like framework which uses the native webview libraries (webkit etc) instead of shipping their whole browser for each application?

I guess Tauri [1] is like what you are looking for. Was featured here a a few days ago [2].

[1] https://tauri.studio/en/

[2] https://news.ycombinator.com/item?id=26194990

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

#203
post #155

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…

Flutter isn't a good Electron alternative? Flutter 2.0 just came out with desktop support for osx, windows and linux and will be the main GUI framework for Linux.

Not yet. Or rather, I would say you can use it for simple stuff, like Etcher then it is a reasonable choice. But you wouldn't want to use it for something like Slack yet. Some basic stuff like ctrl-Z in text fields does not work yet. Doing normal desktop things like menus and file dialogs will be a pain.

That said, I am writing a Git desktop client in Flutter and I like it. But I don't expect to finish it for many years so hopefully by then they'll have ironed everything out.

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

#204

Is there any electron like framework which uses the native webview libraries (webkit etc) instead of shipping their whole browser for each application?

There is a WebKit based HTML renderer called Ultralight. It works by creating hooks and intercepting the rendering calls of WebKit in order to allow embedding it easily.

Unfortunately the license of Ultralight is questionable, and it's not open-source either by bypassing the WebKit license (which is very questionable as well since WebKit itself is BSD-licensed).

Having such a project as a free open-source variant would be a huge game changer in my opinion.

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

#205

Earlier quoted context omitted.

> been on Github's Trending repos for the past 2.5 years and it has an impressive number of stars Wow, must mean the project is real important. I agree that svelte is interesting, but focusing on metrics and popularity is the wrong approach to new technology.

You can't judge a technology by its popularity. But I was judging the ecosystem by its popularity and those things are very highly correlated. More people bookmarking a project mean in theory it should have better 3rd party library support.

You're judging the ecosystem based on the stars/trendiness of Sveltes repository? That feels even more wrong and you're doing a lot of extrapolation here.

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

#206

Maintainer here – Happy to answer any questions!

Is there a story for interop with other languages? I understand the UI probably has to be defined in JS, but what about transparently making request to a local server written in another language (bonus point if it can somehow be made less observable than that, i.e. not consuming a localhost port).

The NodeJS NAPI support binary modules written in any language that can build dynamic libraries against the C FFI. There's still a little overhead marshaling between Javascript and the guest language but it's small compared to the overhead of HTTP or WASM.

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

#207
post #3

Earlier quoted context omitted.

Any Win 10 fluent examples? Perhaps WinUI integation?

The parent project, NodeGUI, has some Windows screenshots and examples – I’m not familiar enough with Fluent or WinUI, but basically the UI runtime is Qt5, so integrating it into genuine Windows apps is out of scope (but may well be possible with the right expertise). I assume it would involve some kind of Qt-hosting view. I’m unsure whether Qt5 can host Windows UI components. Edit: NodeGUI here: https://github.com/n…

> I’m unsure whether Qt5 can host Windows UI components.

yep, basically you have to do :

    auto window = QWindow::fromWinId(reinterpret_cast(/* HWND, NSView, X11 buffer, Wayland surface... /*));
    auto widget = QWidget::createWindowContainer(window);
and then you can use the widget like any other Qt widget, put it in a layout, etc... (of course caveats may apply when you start doing transparency or other fun things).

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

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

https://twitter.com/id_aa_carmack/status/193480622533120001?...

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

#209
I'm always a bit surprised there was the space for Electron to exist in the first place. Since most operating systems have widget toolkits that have browsers effectively embedded into them.

What I would have liked to have seen instead of Electron would have been a shim API that abstracted OSX/iOS/WinForms/QT webviews, and for those webviews to have a working API that would allow DOM manipulation, and allowed native sub-views to be inserted as block elements.

Post reply on HN