Live data from Hacker News

Ask HN: How to make a native GUI with a modern language?

news.ycombinator.com

121–130 of 145 posts

Re: Ask HN: How to make a native GUI with a modern language?

#121

One unusual alternative you may not have thought about is using Godot Game Engine. Before dismissing it, consider this: Godot engine is shockingly small for what it does. The download is about 30-40 MB. The GUI designer tool is second to none, and you can make highly interactive advanced GUIs using a language that looks very much like Python called GDScript. It is very quick to learn. It does make GUI which are nativ…

Wouldn’t that seriously hurt laptop battery life to use a discrete gpu to render the UI? Or is there someway to tell the OS that a non-discrete gpu is fine?

No, GPUs are more power efficient than CPUs to render graphics, so it'll save battery.

Re: Ask HN: How to make a native GUI with a modern language?

#122

Earlier quoted context omitted.

Wouldn’t that seriously hurt laptop battery life to use a discrete gpu to render the UI? Or is there someway to tell the OS that a non-discrete gpu is fine?

No, GPUs are more power efficient than CPUs to render graphics, so it'll save battery.

So, my laptop is dumb for turning off the discrete GPU when I unplug it?

Re: Ask HN: How to make a native GUI with a modern language?

#123

> HN has strong opinions against Electron Beware the bias of the loud minority. For every 1 noisy user, there may be 50 quiet users who are fine with the decision to use Electron. Shipping beats not shipping every time, and if Electron is what you need, then do it. I say this as someone who does not like Electron, but also as someone who knows that writing comments on HN is 100x easier than actually shipping producti…

I hate to say it, but I agree - I dislike the number of Electron apps I have to use, however...

I spent a few hours last night on a personal project trying to get something relatively simple working as a SwiftUI macOS app. I needed to customise a bunch of components to get it close to what I wanted.

I decided to give Electron a go, and had what I wanted up and running quite literally in 5 minutes, and it starts and is responsive within 500ms. It's taken longer to figure out how to ship it as a .app package than to write the code. That's nothing short of amazing.

Re: Ask HN: How to make a native GUI with a modern language?

#124
post #95

Having a native looking GUI and being cross platform is almost contradictory. The only way to make truly native looking and feeling GUIs is to use native tools. That means Cocoa on macOS, Gtk or Qt on Linux, and Win32/Winforms/WPF/WinUI on Windows. Most cross platform frameworks won't really look 100% native. The only exception I know is wxWidgets, which provides an abstraction layer over the native toolkits. It's wr…

> More important than native looking is to have a GUI that is fast, efficient and accesible. The best option that provides this in a cross platform way is QT. Java Swing and JavaFX are also good options. I would echo this. Consider applications like Photoshop or Blender, these don't really have a 'native' feel anywhere but their UX is generally responsive. On the other hand you have Electron applications that don't f…

Blender's UI is rendered with openGL and it's glorious. Photoshop is getting really slow in my opinion since 2015. I see all those Chromium processes running with it and wonder just how much of its stuff is being replaced with this slow shitty code. Everything 'modern' that has rounded edges feels just slow and laggy.

Re: Ask HN: How to make a native GUI with a modern language?

#125
Another unusual alternative could be the V-language [1], depending on if you consider this a "sane language" ;-). Not having used it myself and obviously you have to consider other arguments as well (community, developers, development activity, documentation etc.), but I was caught on all the features it promises, e. g. a "Native cross-platform GUI library": "V has a ui module that uses native GUI toolkits: WinAPI/GDI+ on Windows, Cocoa on macOS. On Linux custom drawing is used."

[1] https://vlang.io/

Re: Ask HN: How to make a native GUI with a modern language?

#126

Earlier quoted context omitted.

No, GPUs are more power efficient than CPUs to render graphics, so it'll save battery.

So, my laptop is dumb for turning off the discrete GPU when I unplug it?

They didn't say discrete GPU, they said GPUs, which includes integrated GPUs.

Re: Ask HN: How to make a native GUI with a modern language?

#127

Earlier quoted context omitted.

I can't use jpackage on Windows to build Mac binaries, but not having FX installed is what kind of problem? Just use jpackage to create an .app for Mac, an installer or portable build for Windows, and a .deb or executable binary for Linux. It bundles all dependencies and users can just click and run it.

That's indeed what we do in our CI but it gets very hairy and the end result is often subpar in nuanced ways. E.g. signing a bundle which required us to upgrade our whole CI infrastructure because we had to move to a newer VM. The bundle is huge because it needs to include a JRE and JavaFX. The install process and bundle building is complex. Especially with signing. And you need to do it all for every platform.

I see, thanks for the insights.

Re: Ask HN: How to make a native GUI with a modern language?

#128
I’m shocked to not see Flutter supported here. It’s not truly truly native I guess. But Dart is very modern and capable and the Flutter framework is better for building native UIs than nearly anything else out there. It’s also ridiculously developer-friendly to get builds going for all your target platforms quickly.

Re: Ask HN: How to make a native GUI with a modern language?

#129

One unusual alternative you may not have thought about is using Godot Game Engine. Before dismissing it, consider this: Godot engine is shockingly small for what it does. The download is about 30-40 MB. The GUI designer tool is second to none, and you can make highly interactive advanced GUIs using a language that looks very much like Python called GDScript. It is very quick to learn. It does make GUI which are nativ…

How is accessibility? best thing about Electron is we get accessibility of Browser

Re: Ask HN: How to make a native GUI with a modern language?

#130

> HN has strong opinions against Electron Beware the bias of the loud minority. For every 1 noisy user, there may be 50 quiet users who are fine with the decision to use Electron. Shipping beats not shipping every time, and if Electron is what you need, then do it. I say this as someone who does not like Electron, but also as someone who knows that writing comments on HN is 100x easier than actually shipping producti…

The "minority" may be loud but their comments are usually heavily upvoted.
Post reply on HN