#glib — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #glib, aggregated by home.social.
-
Should we drop GLib? 🤔 @swick asking big questions at GUADEC.
Follow along live in track 1: https://www.youtube.com/live/HnduDRyFsZ0
-
Heads up: folks using #lgi with #glib might run into this issue. #Lua #Linux
lgi crashes with error "bad argument #1 to 'fromarray' (lgi.record expected, got table)"
This is the fix:
ffi: Adapt load_enum to glib 2.87 changes
--- lgi/ffi.lua.orig 2026-07-08 08:32:43.919979810 -0700 +++ lgi/ffi.lua 2026-07-08 08:48:20.173243433 -0700 @@ -76,16 +76,22 @@ -- Creates new enum/flags table with all values from specified gtype. function ffi.load_enum(gtype, name) - local GObject = core.repo.GObject + local GLib, GObject = core.repo.GLib, core.repo.GObject local is_flags = GObject.Type.is_a(gtype, GObject.Type.FLAGS) local enum_component = component.create( gtype, is_flags and enum.bitflags_mt or enum.enum_mt, name) local type_class = GObject.TypeClass.ref(gtype) local enum_class = core.record.cast( type_class, is_flags and GObject.FlagsClass or GObject.EnumClass) - for i = 0, enum_class.n_values - 1 do - local val = core.record.fromarray(enum_class.values, i) - enum_component[core.upcase(val.value_nick):gsub('%-', '_')] = val.value + if GLib.check_version(2, 87, 0) then + for i = 0, enum_class.n_values - 1 do + local val = core.record.fromarray(enum_class.values, i) + enum_component[core.upcase(val.value_nick):gsub('%-', '_')] = val.value + end + else + for _, val in ipairs(enum_class.values) do + enum_component[core.upcase(val.value_nick):gsub('%-', '_')] = val.value + end end type_class:unref() return enum_component -
My adventures of writing GTK programs in Rust took a turn this this time.
https://gitlab.com/guystreeter/rgdbus-server
is a server and client example of using glib's D-Bus interface in Rust. I discovered a few things that haven't been implemented, but was generally successful.
#glib #Rustlang #programming -
Looks like it's a problem with the XDG Template directory being set to the home directory, and it now just recurses and recurses and recurses and gets FAR too busy.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1118444#38
Specifically, it's about `$HOME/` not being recognised as the home directory because of the trailing slash.
https://gitlab.gnome.org/GNOME/glib/-/issues/3811
So either edit your config as per the Debian comment, or wait for your distro to release the fix.
-
#DailyBird 🤖
Glossy Ibis (Plegadis falcinellus), 8th May 2024
es: Morito Común, fr: Ibis Falcinelle
Cape Henlopen State Park, The Glade, Delaware
Lenapehoking (Lenni-Lenape) & Pocomoke-Assateague traditional territory
Canon EOS R5, Canon RF 200-800mm f/6.3-9 + 1.4x teleconverter @ 1120mm, 20% crop, 1/400s, f/14, ISO 1250
#Birds #GlossyIbis #GLIB #BirdOfTheDay #HopeIsTheThingWithFeathers #DescribeYourImages -
First a bit of context for the GLib project, which is comprised of three main parts: GLib, GObject and GIO. #GLib contains things you'd generally get from a standard library, #GObject defines the OOP semantics (methods/properties/signals, inheritance, etc), and #GIO provides reasonably high-level APIs for everything from sockets and files to D-Bus and Gio.DesktopAppInfo.
-
Well that's something new. Must be a circular dependency between glib-2.82.4,2 and gobject-introspection@bootstrap, but I'm not entirely sure which port to file a bug against; I suspect gobject-introspection.
-
I have not blogged or talked about the follow-up work to my "GType Next" blog post that I've been doing in my spare time, mainly because it is happening *in my spare time*, and I don't want to give false impressions to people; the other reason is that the time consuming bit is not writing a bunch of code, but it's planning ahead, because the goal is to avoid breaking stuff at all costs…
-
Ciekawostka: jeżeli różne programy sypią się z błędami typu:
(…): GLib-GIO-ERROR **: 20:46:27.286: Settings schema '…' does not contain a key named '…'
a macie pewność, że schematy skompilowane, i definitywnie zawierają taki klucz, to może okazać się, że z jakiegoś powodu w waszym katalogu domowym siedzi dodatkowy plik ze skompilowanymi schematami, i jest używany zamiast systemowego.
Czyli:
rm ~/.local/share/glib-2.0/schemas/gschemas.compiled
-
Fun fact: if random applications are crashing with errors like:
(…): GLib-GIO-ERROR **: 20:46:27.286: Settings schema '…' does not contain a key named '…'
and you've already verified that you've compiled the schemas, and that the schema contains the listed key, then it may mean that for some reason you have another compiled schema file in your home directory, and it's taking precedence.
In other words:
rm ~/.local/share/glib-2.0/schemas/gschemas.compiled
-
Play FlappyBird, but written in #vala !
https://gitlab.com/nda-cunh/flappyvala
Using only #SFML and #glib as dependencies.
The code is object oriented and a very good example for a non-gtk Vala app. Check it out! -
CW: old cat yells about packaging and cross-compiling
Feels like I got into shaving a whole herd of yaks when I just wanted to access NetworkManager over D-Bus from Python on a certain embedded system. :neocat_laugh_sweat:
* The only non-deprecated, non-systemd way to do that (short of handwriting a client library) seems to be python-gobject and introspection.
* The #Buildroot packages for python-gobject and gobject introspection are marked as glibc-only, but I'm using musl. And I know they work on Alpine just fine.
* The GLib, gobject-introspection, and python-object versions in Buildroot are very old. And Alpine actually dropped a musl-compatibility patch with the most recent gobject-introspection version. So… update time.
* The #GLib build process changed and now requires a bootstrap step to support introspection.
* Turns out… Bootstrap or not, introspection isn't supported when cross-compiling. :neocat_scream_stare:
We'll see where it goes from here, the gobject-introspection package in Buildroot does some wild things with Qemu to work around a similar limitation. And there are some somewhat recent changes related to cross-compiling upstream. :neocat_think: -
@eniko C is a very incomplete language. The C std lib is nothing compred to a "proper" one from modern languages like C++ or rust. That is why for example #glib exists, an additional library to provide more functions and utilities, also for working with strings. (It is used heavily in the #GNOME desktop environment)
-
Important security update for GLib and D-Bus, thanks to @pwithnall
https://discourse.gnome.org/t/security-fixes-for-signal-handling-in-gdbus-in-glib/20882
If you are a downstream distributor of GLib, GTK, or GNOME-related projects, remember to follow the distributor tag on Discourse.
-
Does anyone happen to know why GUnixInputStream doesn't implement GSeekable? #glib
-
Greetings Programs!! Doing a hopefully quick but late night stream on Xeme our new #XMPP library for @pidgin Come on by! #OpenSource #OpenSourceLive #C #GLib #Gtk https://twitch.tv/rw_grim/ https://youtube.com/@rw_grim/