
Gio: Portable, Immediate Mode GUI in Go - todd8
https://git.sr.ht/~eliasnaur/gio
======
deforciant
Gio looks really neat (from the demos), I will definitely try it out as I have
been looking for a nice way to build desktop app for quite some time.

Other projects that I am considering to use:
[https://github.com/wailsapp/wails](https://github.com/wailsapp/wails) (looks
very decent and I would be happy to use Vue.js for a UI bit) and Flutter with
desktop support ([https://github.com/google/flutter-desktop-
embedding](https://github.com/google/flutter-desktop-embedding), in this case
it's not directly using Go but you can bind them together).

If this would mean that I can just use Go for everything - that's great but
the only concern for me I guess is just the availability of examples and
widgets. I don't consider myself a good UI designer so relying on libraries is
important :)

~~~
synw
For Flutter desktop support consider [https://github.com/go-flutter-
desktop/go-flutter](https://github.com/go-flutter-desktop/go-flutter) : imho
it works better than the official Google lib actually to compile Flutter
desktop guis

~~~
deforciant
Looks fantastic, thanks!

------
tiborsaas
No screenshots for a GUI library?

~~~
yourapostasy
Watch his Gophercon talks, around minutes 4-7 show what it’s capable of.
Screenshots simply show native interfaces, so it isn’t some kind of skin
that’s readily apparent from screenshots. The more interesting action happens
in the code and his philosophy towards multi-platform UI.

~~~
tiborsaas
That's a lazy excuse, sorry :) The talk is not even linked in the readme.

Display me what this awesome philosophy is capable of. I understand that this
is somebody's side project, but come on, grab my attention, since we have a
sea of GUI libraries out there. He must have built something amazing in it,
just throw it there. It took me quite a while to find the slide deck link in
the readme and I only kept looking because I couldn't believe that I can't see
this thing in action.

------
mythz
Basically this is the UI FX used to build
[https://scatter.im](https://scatter.im)

Best way to view a preview of it:
[https://youtu.be/9D6eWP4peYM?t=113](https://youtu.be/9D6eWP4peYM?t=113)

------
coldtea
A GUI library with no screenshots, no widget gallery, and no (easily found)
reference?

"Hosting Gio on Sourcehut is an experiment just as Gio itself is."

Yeah, nice experiment. Now maybe try GitHub?

~~~
pferde
Why further strenghten Microsoft's monopoly on developers? With several great
alternatives available today, I say steer clear and as far away from Github as
possible.

~~~
mellosouls
This M$ = bad trope is really tired and outdated and not representative of its
value to devs.

By all means encourage different hosting platforms, but maybe in a tone more
relevent to the current decade.

~~~
pferde
No. After the decades of sustained bad behavior, they do not get a pass so
easily. Not for several more decades at least.

Also, please quit it with the $ instead of S trope, it's really immature.

~~~
mellosouls
So don't use the tone.

------
pferde
Very badly chosen name. GIO is already GLib's filesystem abstraction API:
[https://developer.gnome.org/gio/](https://developer.gnome.org/gio/)

~~~
tasogare
Tons of programming projects has the name of an existing project. Go itself is
an illustration of that fact.

------
vfclists
Is it just me or do are there a lot of developers who don't believe in the
saying "One picture is worth a 1000 words"? Is it a Linux thing, something
peculiar to developers in the Github era?

If you go to a forum such a the Lazarus forums, any announced projects show
pics on the forum itself, or on the websites linked.

It makes me long for the bad old day so of windows when showing pics of your
project was all the rage and still is.

This is not just in relation to Gio, but I see so many GUI projects on Github
with nary a picture in sight.

Do their developers want those intrigued to go to the effort of setting up a
development environment (if that succeeds) only to find that the project is
half-baked mush of an apple pie?

------
giancarlostoro
Love the idea not a fan of the tough to google name. I had issues googling for
it a couple of times to show people Gio.

~~~
coldtea
How about "Gio golang UI library"?

What exactly is hard about that (or several similar variations) -- which give
me a first page full of relevant results?

Does the term have to be "Gio" or bust?

~~~
giancarlostoro
Should I really be forced to memorize word soup to find what I am looking for
though? Thats just absurd to me.

~~~
Crinus
To me it is more absurd that you act as if it is impossible to search for what
you are looking for using more than one word.

You aren't supposed to memorize a word soup. You are supposed to search for
what you are looking for based on some hints you may remember - e.g. gio gui
library for golang. Even duckduckgo which isn't always the best when it comes
to searching vague stuff gives gio as the third result (google shows the gio
repository as the first result).

~~~
giancarlostoro
I probably typed into Google several things, and I'm not sure if the filter
bubble Google has around me was screwing it up, or not getting the right word
soup. Sometimes it shows up, other times it does not. Maybe Gio is finally
getting enough attention.

------
todd8
It appears to support Windows, MacOS, Linux, IOS, and Android. See also this
youtube video from GopherCon 2019 on this ui library:

[https://www.youtube.com/watch?v=9D6eWP4peYM&t=636s](https://www.youtube.com/watch?v=9D6eWP4peYM&t=636s)

------
wilt
No x11 support?

~~~
vhodges
It IS being worked on but in the meantime, gio apps can be run on X using
[https://github.com/Hjdskes/cage](https://github.com/Hjdskes/cage) (a very
simple wayland compositor)

------
jamil7
This looks really interesting to me but I'm a bit lost on how exactly it'd
work in practise. Are there anymore docs somewhere?

~~~
yourapostasy
His GopherCon talks are pretty gentle tutorials. In practice, looks like your
program becomes responsible for quite a bit of scaffolding that UI coders take
for granted these days, in exchange for multi-platform write-once. Kind of
reminds me of GUI programming back in the 80’s, where your program is
responsible for managing every state refresh and screen update. It’s
efficient, but I’ve seen larger teams without sufficient discipline have a
challenge coping with this style. For a lot of useful problem domains however,
it’s really tough to beat its time to market and efficiency. Lots of startups
would probably love this.

~~~
pixelrevision
At this point electron will beat something like this on a time to market
front. I suspect this framework would work better for people who want to do
real-time drawing but stick with go and not setup a bunch of OpenGL
boilerplate.

------
chmike
On Ubuntu 19.04 I get the error message "wayland: wl_display_connect failed".
Can’t run the hello program to see something.

~~~
Cogitri
Do you use X11? Only Wayland is supported AFAICS

~~~
Crinus
Until they add X11 support that makes it pretty much useless for a desktop GUI
(if you care about Linux anyway).

------
remon
That'll be fun to get Google results for. I suppose we can be glad they didnt
go for Go + UI, you know, GUI.

------
pier25
First time I hear about immediate mode GUI. Here's a previous HN coversartion
about it:
[https://news.ycombinator.com/item?id=19744513](https://news.ycombinator.com/item?id=19744513)

------
pier25
Off topic but...

In the web world we have benchmarks for UI libraries. Is there anything
similar for the native world?

I remember a couple of years ago there was the bunny mark benchmark for 2d
game engines (OpenFL, Flash, Pixi, etc).

------
pier25
Vector shapes and text can go a long way but what about rendering images,
video, or even SVG for icons and such?

------
rob74
I wanted to try this out right away, but stumbled over the fact that I don't
know how to use "go get" with Sourcehut, or even if it's supported. Of course
it's probably easy to find out, but a "getting started" section wouldn't hurt.
The "installation" page only describes the installation of the dependencies...

~~~
Sir_Cmpwn
go get has nothing to do with github. Why wouldn't it work? Just use it the
usual way. The readme directs you to a hello world program:

[https://git.sr.ht/~eliasnaur/gio/tree/master/example/hello/h...](https://git.sr.ht/~eliasnaur/gio/tree/master/example/hello/hello.go)

~~~
rob74
Ok, after I noticed that the URL of the git repo is at the top of the page
(somehow I managed to overlook it), I tried "go get git.sr.ht/~eliasnaur/gio",
only to find out that wasn't correct, because the project uses a "vanity URL",
so apparently I have to use "go get gioui.org/gio" or something like that. My
point was that even if it's pretty straightforward for a reasonably
experienced Go developer, it doesn't hurt to mention it...

------
marcus_holmes
this looks great, exactly what I need. I'll go try it out and see if it lives
up to the promise :)

I guess, though, that there aren't any widget libraries for it, yet? Anyone
know different?

