IRC channel logs

2020-08-18.log

back to list of logs

<daviid>dsmith-work: hello! I so far did not understand, from what you wrote 'back then' and what i read from you today, what happend, what actually causes/caused the for-each proc, in your exprerience/environment, while porting the scheme part of the bot code to 3.0.4 - what caused for-each to be unbound and how you solve the problem - if you do know, please share,
<daviid>dsmith-work: asking because, as you probably did read here, re-exporting the public interface of a module (which merely calls module-use!) does not work in 3.0.4 and either needs to be patched or the code that uses it to be adapted - therefore, I am gathering all knowledge and experience(s) I can from other guilers ... tx
<daviid>the re-export-public-interface was first introduced by andy, in guile-gnome, I snarfed and used it 'as is' for as long as I can remember, where I neede t of course ... here http://git.savannah.gnu.org/cgit/guile-gnome.git/tree/glib/gnome/gobject/utils.scm#n183 - I just changed the name
<daviid>the code is actually defined in two places in guile-gnome, probably for bootstrap reason, I don't remember - http://git.savannah.gnu.org/cgit/guile-gnome.git/tree/glib/gnome/gw/support/modules.scm
<daviid>I probably can fix this, at least I hope I can :), but I am asking for help, so I can focus on other g-golf missing things/features ... if anyone beats me, that would be wonderful - you do need to know quite a bit about module introspection, all these proc/syntax are in (ice-9 boot) - i will paste a super tiny code sample in a sec, so who's interested can reproduce and work on a solution ...
<daviid>here - https://paste.gnome.org/p6tasyf73 (I made the paste valid for one week)
***catonano_ is now known as catonano
<peanutbutterandc>daviid, Mr. David, I am a beginner, who is interested in guile and gtk. But looking at g-golf, it seems that it is a gnome thing.... should I be looking for something else or will g-golf do all gtk thingies too?
<peanutbutterandc>also, are there any resources that you would like to recommend for me so that I can, someday, do bright and shiny stuffs with guile?
<daviid>peanutbutterandc: g-golf will let you 'play with' any gnome library(ies) that have a so called GObject Introspection typelib, Gtk, WebKitGtk, and many others ... so yes, you may use g-golf to build a gtk app - fy, there is another guile project that will let you dfo that to, called guile-gi
<peanutbutterandc>daviid, I see. Now, for a beginner like me, how should I go about learning gtk? Should I first poke around with C, and then go to reading the manuals for g-golf (or guile-gi)? Or should someone like me start from g-golf, etc. ?
<daviid>wrt to the last question, maybe others may help - you'd need to be a bit more precise on the kind of app/lib/technology you are interested in though
<peanutbutterandc>daviid, I hope to be able to do some GUI extensions to some free software packages, someday (for my non tech-savvy friends who can't use my script-ed extensions)
<peanutbutterandc>daviid, GNUCash, in particular. And since it seems to have guile support, I hope that I will be able to write an add-on-like thingy that will plug-in to it (?)
<peanutbutterandc>might take me 6 more months though...
<daviid>peanutbutterandc: i would read the 'Basic' part of the Gtk manual, and ask here for ome help when you need some ... there are a few g-golf users here, not many but better then none :) - and i can paste a few tiny example to get you start with
<peanutbutterandc>daviid, I see... Thank you very much. I will do just that then. GTK manual first and then g-golf. tiny examples would be great help, too.
<daviid>peanutbutterandc: ah, gnucach actually doesn't use g-golf - it uses guile as an extension, but the gui part is in C, afaict - the gnucach 'guile maintainer' is here, chrislck is there nick in this channel
<daviid>*their nick
<peanutbutterandc>daviid, Hmmm..... I see. Well, I am a beginner. And a 'freetard'. And because guile seems to be available to gnucash. And because g-golf seems to make gtk thingies available in guile, and because I am not that well-versed in C, I was hoping I'd be able to write the plug-in in guile
<peanutbutterandc>even if that is not possible... I'll just have a new skill up my sleeve... and in scheme, too!
<peanutbutterandc>I will bother chrislck once I learn enough of gtk and g-golf, then. (:
<daviid>peanutbutterandc: if you wan't to try g-golf, the first thing is to install :), we may help you here as well - what distro are you using?
<peanutbutterandc>daviid, Linux Mint. But I have guix. And I have seen g-golf in guix, too. (:
<brendyyn>how does it differ from guile-gi?
<peanutbutterandc>I will go read those stuffs that you told me to, and then will guix install it sometime today (hopefully)
<daviid>if you're using guix, there is a package - I must warn you that g-golf is beeing actively devloped, and in a so called 'experimental' stage
<daviid>peanutbutterandc: here is 'hello world' example using g-golf - https://paste.gnome.org/pzogd6t3m - copy and save the content for later, the paste is valid 6h only ...
<peanutbutterandc>daviid, Thank you very much. I have saved it. And it does look quite neat. I wonder if I could find the same thing in guile-gi somewhere, for comparison...
<daviid>peanutbutterandc: also, make sure you read the 'Using G-Golf', 'Before you start' [the user manual is largely incomplete, but what is there is good and will help you, i hope]
<peanutbutterandc>daviid, Thank you very much. I will. You have been most helpful. (:
<daviid>peanutbutterandc: you should try the guile-gi website, it has a manual or a wiki, i don't remember - i can't help much about guiler-gi i am afraid, not that i wouldn't want to, it's just that i don't know
<peanutbutterandc>daviid, I see. I will take a look at that too. Thank you very much
<daviid>welcome
<peanutbutterandc>:)
<roelj>How would I define a symbol from C, so that I can do scm_is_eq (<parameter passed as SCM>, <my-self-created-symbol>);?
<leoprikler>roelj: symbol as in (eq? param 'my-symbol)
<leoprikler>If so, you probably want scm_from_utf8_symbol
<leoprikler>brendyyn: g-golf and guile-gi have made different design decisions
<leoprikler>the former is (almost?) purely Scheme, whereas the latter has quite a sizable C extension
<leoprikler>the former uses <library>-<class>-<short-name>, whereas the latter uses <class>-<short-name>
<leoprikler>(both also expose <short-name>)
<leoprikler>the latter exposes accessors and signals as methods, which can lead to a lot of confusion
<leoprikler>the former is in the process of being made compatible with Guile 3, whereas the latter (supposedly) already has that
<leoprikler>And the latter troublingly has some bugs, that only manifest themselves on Guix (related to the greater GI_ troubles there)
<peanutbutterandc>sneek, tell daviid: I tried to take a quick poke at running the hello-world g-golf script and then ran into the following issues: 1. g-golf isn't guile3.x ready yet. worked around that issue using: `guix environment --ad-hoc guile@2.2.7 g-golf` but then encountered 2. this error: https://termbin.com/myt5 (I also had to make a small change to how the script itself was called: https://termbin.com/cjds ) Thought you might like the reports. P.S: I
<peanutbutterandc>changed the error log to have $HOME.
<sneek>daviid:, peanutbutterandc says: I tried to take a quick poke at running the hello-world g-golf script and then ran into the following issues: 1. g-golf isn't guile3.x ready yet. worked around that issue using: `guix environment --ad-hoc guile@2.2.7 g-golf` but then encountered 2. this error: https://termbin.com/myt5 (I also had to make a small change to how the script itself was called: https://termbin.com/cjds ) Thought you might like the rep
<peanutbutterandc>wait, I thought sneek was going to wait till daviid was online
<peanutbutterandc>sneek help
<peanutbutterandc>sneek later tell daviid I tried to take a quick poke at running the hello-world g-golf script and then ran into the following issues: 1. g-golf isn't guile3.x ready yet. worked around that issue using: `guix environment --ad-hoc guile@2.2.7 g-golf` but then encountered 2. this error: https://termbin.com/myt5 (I also had to make a small change to how the script itself was called: https://termbin.com/cjds )
<sneek>Will do.
<peanutbutterandc>sneek, botsnack
<sneek>:)
<leoprikler>peanutbutterandc: you need gtk+ in your environment and adjust GI_TYPELIB_PATH
<peanutbutterandc>leoprikler, lol I knew I was doing something wrong. Thank you very much. That makes much more sense. I am a n00b. Sorry for the inconvenience.
<peanutbutterandc>sneek, later tell daviid sorry false alarm `guix environment --ad-hoc guile@2.2.7 g-golf gtk+` worked just great (thanks to leoprikler for pointing my foolish mistake). Shiny!
<sneek>Will do.
<peanutbutterandc>sneek, botsnack
<sneek>:)
<peanutbutterandc>leoprikler, could you please tell me why `guix environment --ad-hoc guile guile-gi gtk+` doesn't work? Error: https://termbin.com/09kl
<leoprikler>the guile-gi recipe in Guix is broken, use the one from upstream
<peanutbutterandc>leoprikler, :(
<rekado_>do we have a bug report about guile-gi in Guix?
<rekado_>I only see one which isn’t relevant: https://issues.guix.gnu.org/search?query=guile-gi+is%3Aopen
<leoprikler>I don't think so, but upstream has this: https://github.com/spk121/guile-gi/issues/84
<leoprikler>The upstream recipe differs heavily from that being used in Guix, specifically w.r.t. inputs, so I think it would need a bit more review
<rekado_>peanutbutterandc: with my changes I can enter an environment containing guile guile-gi and gtk+. Is there anything else I need to do to reproduce the error?
<peanutbutterandc>rekado_, Hey there: `guile this-script` https://termbin.com/y0cp did it for me
<rekado_>the good news is that it doesn’t crash
<rekado_>the bad news is that it doesn’t seem to do what it’s supposed to
<rekado_>all I see is this: https://dpaste.com/8QCD9JRG9
<peanutbutterandc>rekado_, I see. g-golf does work. But it only runs on guile2.x.
<leoprikler>rekado_: That is a typical GI_ env-related issue, that you only see in Guix
<leoprikler>Try using a pure environment and exporting XAUTHORITY as well as XDG_*
<rekado_>with this I get In procedure connect: Wrong type argument in position 1 (expecting open file port): #<<GtkButton> 7f0f98c66500>
<leoprikler>hmm, guile-gi should provide a connect override for GObjects
<leoprikler>(connect button print-hello) → (connect button clicked print-hello)
<rekado_>yes, that did it
<rekado_>to summarize: I patched the definition of guile-gi, ran ./pre-inst-env guix environment --pure --ad-hoc guile guile-gi
<rekado_>then ran export XAUTHORITY=/run/user/1000/gdm/Xauthority
<rekado_>and then ran the application with guile this.scm
<rekado_>a window with a button pops up
<rekado_>when clicking the button it prints “Hello World”
<rekado_>I’ll push my patches to the guile-gi package definition
<dsmith-work>Hey Hi Howdy, Guilers
<roelj>Hi dsmith-work!
<dsmith-work>sneek: later tell daviid I never got to the bottom of the mising for-each issue. I assumed it was some interaction with the way bobot++ was messing with modules. I just used srfi-1 and moved on.
<sneek>Got it.
<dsmith-work>roelj: Hey.
***terpri__ is now known as terpri
<dsmith-work>str1ngs: So let me get this straight, You want to use map. You use-modules some other module that uses srfi-1, and that makes your access to the core map go away?
***hugh_marera_ is now known as hugh_marera
***apteryx_ is now known as apteryx
<random-nick>hello, how come mit scheme is faster than guile 3 on those scheme microbenchmarks? https://ecraven.github.io/r7rs-benchmarks/index.html