ObjGTK: Learned a lot and still bad at giving up
Six years ago I discovered GNUstep and the world of Open Source implementations using Objective-C as programming language. Just a little later I discovered ObjFW and immediately was haunted by the idea to write apps that would run on at least two platforms: macOS (Mac OS X) and Linux, elementary OS particularly.
=> https://git.nil.im/ObjFW/ObjFW ObjFW
This was when ObjGTK was begun in 2021. The beginnings were really easy because Tyler Burton had written CoreGTK and I only had to port it to ObjFW. Turned out, that was a quick and easy task and Tyler's examples worked almost immediately.
=> https://github.com/coregtk/coregtk CoreGTK
I released that changes as ObjGTK 0.1 and 0.1.1.
=> https://codeberg.org/ObjGTK/gir2objc/src/tag/0.1.1 ObjGTK 0.1.1
But that was only the start and the point where I started learning GTK, or to be more precise, the GObject runtime and type system. It was a great way of learning, because I discovered bits and pieces missing in ObjGTK (or its generator gir2objc), learned about implementation details of GObject C and then wrote the translation to ObjC.
It was a nice community work because especially Sergey Bugaev taught me a lot of the GObjects internals and helped me to implement even the very basic beginner tasks like memory management.
It took some years and in the beginning of this year 2025 some bits and pieces fell together that after 4 years (of admittingly seldom and short spare time work during some evenings) I eventually started writing the GTK interface for my app βcontacts2phoneβ.
=> https://codeberg.org/Letterus/contacts2phone/src/branch/add-gtk-view GTK branch of my app βcontacts2phoneβ
Well I did that, to then learn that still a lot more was missing for gir2objc / ObjGTK. That was the time when I eventually started to consider whether to proceed writing that bindings. Not because it couldn't be done, but because I was questioning if I should do it in my very limited spare time.
ObjGTK was my project to learn GObject and C, but apparently there really is a lot more to learn. The issue tracker tracks what I know is missing and it's missing all the pieces that I don't know about.
=> https://codeberg.org/ObjGTK/gir2objc/issues gir2objc issue tracker
Implementing that listed required features would require some major refactoring of gir2objc, because it's based too much on guessing types out of strings instead of using type qualifiers parsed from XML/gir files directly.
So much about the tech side.
For me over that past 4 years it became clear I didn't even finish one app, not to speak about the bindings. And I really wanted to write at least one app since years.
This year two more things happened: Tim Cook made a vassal gift to the big dictator at the other side of the Atlantic Ocean. And Apple released macOS 26 Tahoe, looking like Windows 7 back in the days.
=> https://www.bbc.com/news/videos/cp8zyyygxv7o
Both events made me finally loose any interest in the Apple platform that practices peak capitalism, uglyness and missing ethical values. I love the old golden tech of the 2005 to 2012 era, but I don't want to use any of this company's stuff today (I still have to and do, but that's a different story). I don't want them to earn money and I am not interested any more to earn any money using their platform.
To summarize:
- I've got no more interest in the Apple platform(s), my cross platform aim from the beginning of ObjGTK vanished.
- I didn't complete a single app featuring an UI using the Objective-C only approach.
- I really don't manage to learn all that stuff about GObject and C implementation details.
Speaking reasonably that's enough for me to finally give up that approach and choose a different one. But, I'm really bad at giving up. I seldom admit a task is too big for me, but this one is. And I liked the approach of writing apps, I really enjoy writing Objective-C (a language I really learned quite a bit) and I really like ObjFW. Jonathan is doing great work since many years to keep ObjFW working on a multitude of platforms and he ensures that it's a joy to use. Using ObjFW you may use a compiled, fast and clean object oriented language without the need to know too much about C implementations details.
But one more thing I learned over the years: Free Software is not about how nice or well done a certain technology or library is. There are approaches seemingly very haunting, because they are done so well. But eventually Free Software is about how strong communities are to actually perceive the goal of delivering working and useful software. That task most often won't be done by individuals alone, it's done by communities.
As a conclusion: It's hard, but I'm giving up ObjGTK and leaving it as is β as a learning project that brought a lot of joy to me. It may be picked up by whoever likes to further improve it. Contact me, I am happy to get you going.
For me I'm now in need to consider how to βfinishβ contacts2phone (read: make it actually work like I want it to).
Will I try a complete rewrite using Vala? Will I try to replace ObjGTK/GObjects bindings in ObjC for the recently published peel (from Sergey)? The latter would require me to learn C++, but at least I could keep some core business logic written in ObjC. Currently that seems most interesting to me.