IRC channel logs
2026-08-27.log
back to list of logs
<TheTaoOfSu>Anyone familiar with using G-Golf? I'm having trouble getting the Hello World example to run. I'm using Guix in a shell with guile, guile-g-golf, g-golf-adw-1-examples, and g-golf-gtk-4-examples in the manifest.scm. I'm new to Guix, so I may be misconfiguring something, but I think that should be good. It seems to be loading G-Golf fine and then gives an error when I try to (gi-import "Gtk") <TheTaoOfSu>The error is "GError: (72 0 "Typelib file for namespace 'Gtk' (any version) not found")" <TheTaoOfSu>Oh I bet guile-g-golf doesn't necessarily pull in the gtk stuff that I need... <rlb>TheTaoOfSu: I'm not, but if you can hang around, I suspect someone who is may be by later. <TheTaoOfSu>I'll try to hang around, or at least stay idled until I can check back again <daviid>TheTaoOfSu: the package is g-golf, but indeed, it only depens on gLib, gObject and Gobject-Introspection - the examples depends on Gtk4 and ofc libadwaita for the adwaita examples ... <daviid>TheTaoOfSu: things have recently been improved in guix, wrt to g-golf and its examples, and I think you should just be able to run the appropriate guix shell command, importing either g-golf-adw-1-examples, g-golf-gtk-4-examples or both, and then just 'cd <where-you-shoul-ask-in-guix' and then just ./<the-example-script-name> ... better ask in guix <daviid>TheTaoOfSu is guix a hosted istro? if yes, what is your main distro? just curious, maybe it ships g-golf as well <TheTaoOfSu>daviid: thanks for the advice. I was just adding gtk+ to my manifest when you started writing, I think, and that seems to have at least resolved *that* issue, though I've progressed to step 2, not the end, it seems <TheTaoOfSu>daviid: I typically use NixOS, but I'd like to migrate to Guix, so I have Guix System in a VM <daviid>ah, g-golf is still not in Nix, afaict - i use debian (testing), which ships g-golf and examples (in separate pckgs as well ... <daviid>TheTaoOfSu: what step is missing now? <daviid>i recommand you ask in guix, I am there as well if I can help ... but not a guix user, so i can only help if the problem is 'upstream' related, which is not in this case ... <TheTaoOfSu>daviid: Now, it seems to not be recognizing set-child <daviid>hum, maybe a doc not being updated .. i'll check, but can you just run the gtk4 provide example, that should definitely work <TheTaoOfSu>Yeah, but I'm not familiar with GTK in the first place, so seeing some introductory code that compiles and works was the real goal <daviid>sure, but can you try trhe provied example first <TheTaoOfSu>At least, adwaita-1-demo works. gtk4-demo doesn't seem to <daviid>then, I highly frecommend you try and read/learn using the adwaita-1-demo - no one should use Gtk 'only' any more, i'll expand on this later ... let's get you started first <TheTaoOfSu>Oh the code linked for the Hello World example online is different from in the manual <daviid>right, it coyuld be i forgot to update the manual .. i'll check <TheTaoOfSu>I think that might be the complete code from after you finish the section <TheTaoOfSu>I'm still trying to get the very first version of the example to run <daviid>the distributed gtk4 hello world example should just work <daviid>i check every distribute example before reach and every releases <daviid>are yoiu browsing the manual online, or the guix g-golf manual? <TheTaoOfSu>Maybe the gtk4-demo binary got put somewhere weird or named weird or something... <daviid>there is no gtk4-demo, rather, a list of gtk4 demo scripts <TheTaoOfSu>Ah, that'd be it, then. The guix package description for the libadwaita demo mentions adwaita-1-demo, and the description for the gtk examples is just similar enough to seem to imply the right command is gtk4-bin <daviid>right, there is also an adwaita hello-world emo, then I ported the upstream adwaita-1-emo entirely ... <daviid>for gtk4, i selected a few 'most important' examples ... <TheTaoOfSu>Okay, there we go, found it, it's just hello-world. It never quite says what the scripts actually are <daviid>'It never quite says what the scripts actually are' i don't unerstand this sentence? <TheTaoOfSu>daviid: The package description for the gtk4-demo stuff doesn't mention what binaries it provides, so I have to figure out the proper commands for the examples from somewhere else <TheTaoOfSu>They're simple, but as someone coming in with no GTK or other GUI experience, I have no idea what to expect from the package or the examples. I'm not already familiar with the standard GTK examples or anything like that <daviid>the demo scripts are the executables, those ended with '*' <daviid>so you should cd <trhere> and just try any, like ./peg-solitaire for example .. <daviid>TheTaoOfSu: but let me trepeat the advise: read an learn from the adwaita-1-demo, not from the gtk examples - no one should deveop a gtk 'only' app these days, and since you have no expewrience, then learn from the adwaita demo - and ask for help here, i'll help ofc ... <daviid> TheTaoOfSu: and be prepared that the learning curve is steep, quite steep - so be patient - and always browse the upstream doc when you read/learn from a scheme example <TheTaoOfSu>daviid: would I not want to just go through at least the Using G-Golf chunk of the manual? I want to use the adwaita stuff because I want to make something that works for mobile Linux, but I figured that section would cover stuff I'd need to know <daviid>yeah, the manual is lacking behind ... but the adwaita-1-demo is as good as possible for you to 1- explore the available features, and 2- 'copy' its structure and code parts to get you started with your app <TheTaoOfSu>Oh yeah, I forgot about the eval-when for... I think goops if I remember correctly <daviid>TheTaoOfSu: devloping a 'modern' app is quite difficult, you'll have been warned :-) <daviid>i am using g-golf myself, to evelop a musuciuan aprentice learning app, I'll paste a screencast so you can look at itr - it also 'copy' the adwaita-1-demo' structure and some of its code ... <TheTaoOfSu>Oh I see the working script is using set-content, not set-child <daviid>TheTaoOfSu: the adwaita-1-demo also has an 'adaptive preview' menu option, so you can see how it appears, and even use it, as f you'd be on a mobile <TheTaoOfSu>Nope, set-content isn't found, either. Maybe that's from one of the other imports. The script seems to be the "final" version of the example <daviid>which example are you looking at? the distributed gtk4 hello-world example uses set-child, which correct <daviid>the adwaita helo-world example uses set-content <TheTaoOfSu>This does seem to be pulling some adwaita libraries <TheTaoOfSu>Yeah, I seem to have found the Adwaita example, not the GTK4 example <daviid>if you 'guix shell ... g-golf-adwaita-examples'; cd <where-you-should>; ./hello-world it should just work <daviid>then set-content is correct, this is the <adw-application-window> api to set the content (precisely) <daviid>learn from the adwaita-1-demo now ... <TheTaoOfSu>I'm trying to untangle Guix well enough to understand where the GTK4 demos went <TheTaoOfSu>Even if I don't want to use those specifically, I dislike that I can't understand where they went or how to use them <apteryx>I'd like to limit the number of available cores/threads of java to 1; I've read I can use the OS affinity mechanism, which Guile exposes as `setaffinity'. I'd like to try this, but I'm unsure about the affinity mask value; any guidance? <apteryx>maybe... (setaffinity (getpid) (bitvector 1)) ? at least it evaluates <adanska>apteryx, oh man why dont i just RTFM first... unrelated to your issue but I spent like a whole week writing my own `sched_setaffinity` and cpu_mask types for guile for use in Guix.... and it was included in Guile all along :,( <adanska>thanks for inadvertently letting me know... <adanska>I guess the cool thing I did was write a PEG parser for linux cpu-lists... so you could pass in a string like "0,2-N" instead of a bitvector <ampinga>Hello! I’m new to Guile Scheme and have created my first project. I’d appreciate advice from experienced Guile Scheme hackers. You can find the project here: <ampinga>Please feel free to share your suggestions or improve the source code if you find the project useful.