Live data from Hacker News

Gio UI – Cross-platform GUI for Go

gioui.org

121–130 of 224 posts

Re: Gio UI – Cross-platform GUI for Go

#121

The amazing thing is that 30 years ago there were cross platform toolkits like Neuron Data and the toolkit under OpenOffice(called StarOffice originally), and yet today the options are still fragmented and imperfect. We have far better compilers and even languages for cross-platform work, so it should be easier by now.

I really think that the Lazarus Component Library took the right approach: https://en.wikipedia.org/wiki/Lazarus_Component_Library I wonder why the idea of widgetsets never really went anywhere: https://en.wikipedia.org/wiki/Widgetset You could take a program that says you need a button in the window and it would make one for you on Qt, GTK or whatever else was supported, on any platform that you were compiling for.…

Now there is a generation of software developers who grew up with web technology, and they aren’t old enough to recall the days of native apps - they don’t know any way other than HTML.

Re: Gio UI – Cross-platform GUI for Go

#122
post #63

Earlier quoted context omitted.

Why would it be easier now? What does a better compiler get you in terms of building a cross-platform UI toolkit? We now have GPUs, mobile OSs with their own separate UI abstractions, the web, WebAssembly, etc. And people want write-once deploy anywhere. You didn’t have any of that 30 years ago.

The compilers of 30 years ago had incompatible behaviors between OSes, for instance C or C++ had a great deal of variation. And 30 years ago you had pre-OSX MacOS as well. Now you can just choose 1 compiler such as GCC and it works the same on all platforms; even cross-compiling to a different CPU architecture works well and is far easier to setup (before it was a black art).

In what way does GCC play any role in cross platform GUIs whatsoever? It’s a very small niche on Windows, macOS, iOS and Android. Visual C++, respectively LLVM/clang are much more dominant on those, and even then they are barely the right tools for GUI (maybe except Windows, but even then competing with .NET).

Re: Gio UI – Cross-platform GUI for Go

#123
post #63

The amazing thing is that 30 years ago there were cross platform toolkits like Neuron Data and the toolkit under OpenOffice(called StarOffice originally), and yet today the options are still fragmented and imperfect. We have far better compilers and even languages for cross-platform work, so it should be easier by now.

Why would it be easier now? What does a better compiler get you in terms of building a cross-platform UI toolkit? We now have GPUs, mobile OSs with their own separate UI abstractions, the web, WebAssembly, etc. And people want write-once deploy anywhere. You didn’t have any of that 30 years ago.

Pre-Java there was a need to have UI applications that ran on Windows NT as well as Solaris and HP-UX. I worked with a commercial software package called Visix Galaxy. We developed in C++. It included libraries for each platform. It also had an interface builder very similar to those today (like the one in XCode). These were polished tools that made it easy to build beautiful GUIs.

Re: Gio UI – Cross-platform GUI for Go

#124
post #7

Earlier quoted context omitted.

The best option is probably Flutter right now: https://flutter.dev/ If you don't mind writing the UI native, sharing only business logic code, Kotlin is an option: https://kotlinlang.org/docs/multiplatform.html#kotlin-multip... Kotlin also can do the UI if you use Compose: https://www.jetbrains.com/lp/compose-multiplatform/ ... however, iOS support is still in alpha, and Web is "experimental". If you're not willing t…

[flagged]

Quit spreading lies about Flutter. It’s one of the most popular cross platform development environments, if not THE most popular, out there and that’s not going to change anytime soon.

Re: Gio UI – Cross-platform GUI for Go

#126
post #7
post #2

A bit off-topic, but what's the best method to build cross-platform mobile & web apps nowadays ? I'm talking either business logic + UI , or just business logic ? like gomobile, rust, typescript, etc ? At some point i thought about using typescript for all business logic, as it seemed the most portable tech, but i realized there's no good way to have decent performance running javascript on iOS.

The best option is probably Flutter right now: https://flutter.dev/ If you don't mind writing the UI native, sharing only business logic code, Kotlin is an option: https://kotlinlang.org/docs/multiplatform.html#kotlin-multip... Kotlin also can do the UI if you use Compose: https://www.jetbrains.com/lp/compose-multiplatform/ ... however, iOS support is still in alpha, and Web is "experimental". If you're not willing t…

I would also add Tauri to the list as they now support mobile as well https://v2.tauri.app/blog/tauri-2-0-0-beta/

I think all cross platform frameworks come with some kind of drawbacks and in most cases, learning about the underlying native platforms is unavoidable (like widgets, visionOS support etc).

So I wouldn’t worry too much or get into a FOMO decision block - I’d pick the one that feels most fun and fits your use case.

Re: Gio UI – Cross-platform GUI for Go

#127

I built a small app in Go using Fyne. Never again. Both Gio and Fyne lack tons of polish and features Flutter provides. I built my core logic in Golang, and then decided to wrap it in an Android app. The GUI feels like it came out of 2003 with limited ways to fix it.

Sounds interesting. How did you wrap it in an Android app if you could elaborate?

Simple, I basically wrote a script to figure out probabilities for gambling ( I won't open source it since I don't want someone angry at me when they lose money). Then you basically have the UI layer call the script.

It's really hacked together, but it works.

Re: Gio UI – Cross-platform GUI for Go

#128

The amazing thing is that 30 years ago there were cross platform toolkits like Neuron Data and the toolkit under OpenOffice(called StarOffice originally), and yet today the options are still fragmented and imperfect. We have far better compilers and even languages for cross-platform work, so it should be easier by now.

Yes, as a longtime software developer people have been trying to solve this problem different ways my entire career. The closest we got was Java swing. And it works well enough for things like eclipse but for some reason, nobody wants to use it and they want to use things like Electron instead

Regarding the "for some reason": Java Swing (and JavaFX, and Windows Forms for that matter) all suffer from lack of integration with modern web browsers. It is near impossible to find a way to combine these model-view-controller based user interfaces with the DOM in a reasonable way.

Horrible as it is, web browsers have managed to provide a common platform for user interface delivery. The browser wars have been fierce, and getting this foot between the door has cost several companies a lot of money. This technological monopoly is far from optimal, but I fear that we are stuck with it, as we are with QWERTY keyboards, USB thumb drives that must be unmounted manually, and the hopeless misery that is Bluetooth.

Re: Gio UI – Cross-platform GUI for Go

#129

The amazing thing is that 30 years ago there were cross platform toolkits like Neuron Data and the toolkit under OpenOffice(called StarOffice originally), and yet today the options are still fragmented and imperfect. We have far better compilers and even languages for cross-platform work, so it should be easier by now.

Building a cross-platform GUI toolkit takes an incredible amount of work & time, especially at the systems level.[0] A robust cross-platform ecosystem for the underlying programming language is a necessary but insufficient piece of the puzzle. Given the proliferation of HTML and WebView/web-tech wrappers (Electron, Tauri, React Native etc.) there are now enough "good enough" solutions that most organizations that wou…

Exactly. Many programmers don’t want to worry about edge cases, and cross platform GUI frameworks are essentially coding an “oops all edge cases” project.

Re: Gio UI – Cross-platform GUI for Go

#130
post #89

The amazing thing is that 30 years ago there were cross platform toolkits like Neuron Data and the toolkit under OpenOffice(called StarOffice originally), and yet today the options are still fragmented and imperfect. We have far better compilers and even languages for cross-platform work, so it should be easier by now.

I'm still super disappointed that javafx died.

It's not dead. I just launched an app this year with it. Users love it.
Post reply on HN