News for hackers. Stuff that matters.
Re:Happy Birthday GNOME! 25 years today by pjmlp on Tuesday August 16, 2022 @06:00AM (#32480965)
In 2001 I got an article published on The C/C++ User's Journal as introduction to GNOME development with Gtkmm.

In those days I still believed that GNU/Linux would eventually gather around one main desktop solution.

Nowadays I focus on Apple, Google and Microsoft platforms, while GNOME does yet another reboot with Gtk4, leaving behind Glade, extensions and whatever else.

That C++ code for the article has nothing to do with "modern" Gtk.

Re:Happy Birthday GNOME! 25 years today by rleigh on Tuesday August 16, 2022 @07:14AM (#32481387)
Likewise. Very sad to see it all start with such promise, and then end up where it is today. If I read your username right, you also helped me get a tutorial published in CVu on GTK+ development around 2005 (which lives on at https://gitlab.com/codelibre/ogcalc). I ceased to maintain it when GTK+ stopped being usable for professional application development (not that, in retrospect, it was ever that great in the first place).

I invested a significant amount of time and effort developing C and C++ applications with GTK+ and Gtkmm. The consideration given to application developers when making repeated incompatible changes, along with a seemingly endless stream of bugs in both, forced me to move to Qt, and I've been using that exclusively for GUI work since the Qt5 timeframe. There's no upgrade path for older Glade project files. Basic widgets have been deprecated and removed. A fairly trivial maintenance cost has instead been imposed upon the entire developer base, in most cases for little or no tangible benefit.

In 2022, where are the "network objects"? GNOME started with a fairly revolutionary and interesting premise of interconnected services using CORBA. CORBA of course died a slow death, but there are modern replacements (not dbus), which could be used to great effect. Over the last 15 years, GNOME seems to have been primarily driven by appearance and usability (by their definition), but the technical underpinnings of the whole thing are fairly shallow and limited compared with what might have been.

Re:Happy Birthday GNOME! 25 years today by Crysstalis on Tuesday August 16, 2022 @09:57AM (#32482792)
>not dbus

In practice D-Bus is functionally similar to many other IDL schemes and can be trivially tunneled over SSH. But yes, it has mostly become used for local applications to communicate with system daemons, and the networked case is not particularly relevant.

The modern replacement for networked objects is to write a web server and communicate using XMLHttpRequest/fetch/websockets, which is outside the scope of a desktop environment.

Re:Happy Birthday GNOME! 25 years today by badsectoracula on Tuesday August 16, 2022 @08:45AM (#32482060)
If you feel like it you can probably run that 2001 code in Gtk 1.2 fixed to work in modern Linux[0] :-P.

At least the lower levels of the desktop stack hasn't succumbed (yet) to the backwards compatibility breakage found in the higher levels.

[0] http://runtimeterror.com/pages/badsector/gtk12/

Re:Happy Birthday GNOME! 25 years today by Crysstalis on Tuesday August 16, 2022 @09:48AM (#32482675)
The only reasons anything has compatibility breakage is because things have not been back ported, or because no one has built a compatibility layer. GTK1, and most other programs using Xlib, are able to work because XWayland was built as a compatibility layer. If there are other areas where things have broken, then I suggest you try to build additional compatibility layers.
Re:Happy Birthday GNOME! 25 years today by badsectoracula on Tuesday August 16, 2022 @10:16AM (#32483037)
As i already wrote twice in other replies, Gtk breaking backwards compatibility is not due to a force of nature, but due to the Gtk developers deciding to break it.

The backwards compatibility i refer here is having libraries, binaries and code work with the very latest version of Gtk (not Gtk1, Gtk2, Gtk3 or Gtk4, but *Gtk*, no numbers or anything) always work, just like a Win32 binary made in Windows 95 using the Win32 API can work in Windows 11 and even get new functionality introduced in the same APIs since then or just like an ELF binary compiled in a 1997 Linux i386 distribution can work on a modern x86_64 Linux distribution (assuming no dependencies to broken userland libraries, of course) and use new functionality introduced to the same APIs in kernel since then.

Re:Happy Birthday GNOME! 25 years today by Crysstalis on Tuesday August 16, 2022 @10:23AM (#32483136)
Not all features of Windows 11 can be bolted on to legacy Win32 APIs. Some features can but others cannot. GTK is not different in this regard. Some features have stayed the same but others have changed and require porting.

If the suggestion is that GTK should somehow get the same budget that Microsoft has to put towards backwards compatibility, you know very well this is not possible. It would probably not even be wanted, GTK is a lot less popular than Windows.

Re:Happy Birthday GNOME! 25 years today by badsectoracula on Tuesday August 16, 2022 @10:30AM (#32483220)
Win32 programs from 2000 work on the latest Win32 and get new functionality that is exposed through the APIs they used at the time, where that applies.

Gtk programs from 2000 do not work on the latest Gtk, regardless of if the functionality they used from the APIs they relied on would be found in the latest Gtk. Instead they have to be "ported" to the new Gtk, assuming the source code is available, the developers are available and someone is willing to waste effort and time to do the porting.

Re:Happy Birthday GNOME! 25 years today by Crysstalis on Tuesday August 16, 2022 @10:41AM (#32483375)
This is a nonsensical comparison though. New versions of GTK are actually new APIs. So what you are saying is more like "WPF programs do not work if you delete WPF and try to compile it against only the Win32 API" which is also correct. GTK1 programs will continue to work on GTK1, it has not changed.
Re:Happy Birthday GNOME! 25 years today by badsectoracula on Tuesday August 16, 2022 @10:49AM (#32483503)
> This is a nonsensical comparison though. New versions of GTK are actually new APIs.

Which has been my entire criticism! Gtk major versions being "new APIs" is what breaks backwards compatibility and causes existing applications, libraries to waste time keeping up.

It actually worse than Win32 vs WPF because the latter is something you can ignore as Win32 is still receiving improvements with bug fixes and new functionality, but Gtk development for any previous major version eventually stops all development. Not only that but even with new APIs, under Windows there is always some official way to use the previous APIs together with the new (e.g. mix Win32 with WPF) but there isn't anything like that for GtkN-1-with-GtkN (and even if there was it'd be pointless in long term as GtkN-1 would eventually stop working, unlike Win32).

Re:Happy Birthday GNOME! 25 years today by Crysstalis on Tuesday August 16, 2022 @10:58AM (#32483647)
>but Gtk development for any previous major version eventually stops all development.

Then your actual criticism is that those previous versions have stopped development, not that backwards compatibility was broken. The whole thing about "backwards compatibility" is a distraction. And again, it is not a waste of time keeping up if they actually want the new features. If they do not want them then they are free to spend their time maintaining the old versions.

Re:Happy Birthday GNOME! 25 years today by badsectoracula on Tuesday August 16, 2022 @11:19AM (#32483958)
No, my actual criticism is that backwards compatibility was broken, not that previous versions stopped development - such a concern about stopping development only exists because the newer versions were not backwards compatible.
Re:Happy Birthday GNOME! 25 years today by Crysstalis on Tuesday August 16, 2022 @11:30AM (#32484138)
That does not follow. WPF is also not backwards compatible and you have no issue with that, because Win32 is still being maintained so that makes you feel you can ignore WPF. Am I wrong here?
Re:Happy Birthday GNOME! 25 years today by badsectoracula on Tuesday August 16, 2022 @11:44AM (#32484353)
I have issues with WPF too since i think Microsoft should have focused on improving Win32 instead of wasting their resources (and, most importantly, the time of everyone who felt at the time they had to keep up - see the Joel article i linked elsewhere), but bringing up WPF doesn't serve anything aside from muddling the discussion.

The only areas where i see WPF doing better is that at least it allows merging Win32 and WPF code, so an application can improve partially if they see WPF as a valid path forward - and it doesn't present itself as Win32 v2 so that Win32 development can continue independently (remember that i wrote that WPF is something you can at least ignore). None of these are the case with Gtk though.

But again, mentioning WPF here serves no purpose, what i wrote so far should be clear enough by itself.

Re:Happy Birthday GNOME! 25 years today by Crysstalis on Tuesday August 16, 2022 @11:49AM (#32484436)
I only mention WPF because you brought up Win32. If you can acknowledge it is not completely the same then maybe do not bring that up at all. The drawing part of the Win32 API is actually probably closer to Xlib and Xaw than it is to GTK. And those libraries have not really changed in 30 years or so. With some hacking I bet you could get Xaw widgets to display in a GTK4 window.

That Joel article is more of a rant than a coherent statement, it is not reasonable to ask developers to stop working on new APIs and libraries.

>None of these are the case with Gtk though.

But this is incorrect, development can continue independently on old versions of GTK.

Re:Happy Birthday GNOME! 25 years today by badsectoracula on Tuesday August 16, 2022 @12:21PM (#32484968)
> I only mention WPF because you brought up Win32.

I brought up Win32 because it retains backwards compatibility for decades and still gets bug fixes and new features, WPF is as relevant to the discussion as Qt would be.

> The drawing part of the Win32 API is actually probably closer to Xlib and Xaw than it is to GTK.

The Win32 API provides way more functionality than Xlib (Xaw is a separate toolkit and unrelated to Gtk) and is closer to a toolkit like Gtk.

> That Joel article is more of a rant than a coherent statement, it is not reasonable to ask developers to stop working on new APIs and libraries.

What Joel asked (well, he didn't ask, jut put forward) was about wasting developers' time chasing new APIs that do the same things like the old APIs because they are afraid they're going to remain behind and the old APIs will stop getting any form of support or development.

Like what Gtk does to older major versions, basically.

> But this is incorrect, development can continue independently on old versions of GTK.

The entire idea of having an "old version of Gtk" that some 3rd party developer(s) continue on to keep backwards compatibility could only be a possibility because the actual Gtk developers do not care about keeping backwards compatibility.

Re:Happy Birthday GNOME! 25 years today by malermeister on Tuesday August 16, 2022 @06:28AM (#32481135)
There's a new Glade-like for gtk4! https://gitlab.gnome.org/jpu/cambalache

I haven't read anything about them leaving behind extensions yet, do you have any more info?

Re:Happy Birthday GNOME! 25 years today by pjmlp on Tuesday August 16, 2022 @06:37AM (#32481185)
Yes, it uses Web rendering for what is supposed to be a native toolkit and is years behind to be feature complete, not worth waiting for.
Re:Happy Birthday GNOME! 25 years today by 72deluxe on Tuesday August 16, 2022 @08:06AM (#32481716)
What's with the modern obsession of using web rendering for everything? It's actually insane.
Re:Happy Birthday GNOME! 25 years today by pjmlp on Tuesday August 16, 2022 @08:47AM (#32482074)
I really don't get it, when I do native I want native tooling, when I do Web, I expect no more than whatever the user has installed as their main browser.

I was never found of MSHTML and Active Desktop, nor of its FOSS clones.

See the readme on the repo, they basically use Gtk rendering into browsers.

Re:Happy Birthday GNOME! 25 years today by malermeister on Tuesday August 16, 2022 @09:03AM (#32482208)
From what I understand they're basically doing this as an abstraction layer so as to support both Gtk3 and 4? I'm still not sure why it needs to involve a browser though..
Re:Happy Birthday GNOME! 25 years today by Crysstalis on Tuesday August 16, 2022 @09:36AM (#32482512)
It is using a webkit view because currently it is the easiest way to display content from an external process in a cross-platform way. It does not have to be that way though: https://blogs.gnome.org/xjuan/2021/05/18/merengue-cambalache...

>Ideally I would use an embedded Wayland compositor widget instead of a webview and broadway, but unfortunately there is only an old non working prototype called Wakefield and finishing it is a project on its own. In any case replacing the webview with a wayland compositor widget would be trivial.