IRC channel logs

2025-08-16.log

back to list of logs

<kyuvi>@mwette thanks a lot for that
<kyuvi>when I try it is complaining about (system foreign-library)
<kyuvi>is this supposed to be in guile iteslf?
<kyuvi>aha this is in a newer guile, I am still on 3.0.5
<mwette>You are on fedora, right? Redhat does not seem to love Guile.
<mwette>Lemme think ...
<kyuvi>no on an old debian it is a bit complicated
<mwette>try to comment out #:use-module (system foreign-library) and replace the search with (define (foreign-pointer-search name) (let loop ((dll (cons (dynamic-link) dl-lib-list))) (cond ((null? libs) (error "no linkie")) ((false-if-exception (dynamic-func name (car dll)))) (loop (cdr ddl)))))
<mwette>also define dl-lib-list with the list in the file (but not #f)
<mwette>sorry list of strings needs to be list of (dynamic-link <string>)
<kyuvi>is this in the c99/ffi-help-cd.scm
<kyuvi>I managed to get 3.0.9 through guix but after producing glib.scm , it states it can not find it
<kyuvi>when compileing gobject.ffi
<kyuvi>compiling `.local/opt/gu//ffi/gobject.ffi' ...
<kyuvi>compile-ffi: error: compiled dependent (ffi glib) not found
<mwette>The #:use-ffi-module opt's are commented out in my last .ffi above
<mwette>So you should'nt need those now, since no glib stuff is referenced anymore.
<mwette>(define dl-lib-list (map dynamic-link '("libwnck-3" "libgtk-3" ...)))
<kyuvi>my mistake sorry
<kyuvi>what is the dl-lib-list about? which file should it be put in?
<mwette>The mlibwnck.scm, after you create it, before the replacement foreign-pointer-search code I provided above.
<kyuvi>ok got the mlibwnck.scm file
<mwette>guild compile-ffi -X ffi/mlibwnck.ffi will generate ffi/mlibwnck.scm and not try to generate the .go file; then you edit the .scm and guild compile -O0 ffi/mlibwnck.scm
<kyuvi>aha yes I will need that to run it on the fedora machine
<mwette>or -O1 now
<kyuvi>sorry can you look at the code above, should "libs" be "dl-lib-list"?
<kyuvi>ddl is dll right
<kyuvi>no it should be dll
<kyuvi>yep no warnings now
<mwette>(null? libs) should be (null? dll) i think;
<kyuvi>should there not be an else in the cond?
<kyuvi>i.e (else (loop (cdr dll)))
<mwette>that is essential
<mwette>I think.
<kyuvi> https://paste.gnome.org/5RgHOhTE5
<kyuvi>should it look like that finally?
<mwette>can't see it; is the link right?
<kyuvi> https://pastebin.com/wPwypum2
<user>@mwette thanks that will be really helpful
<old>I failed to expand a syntax transformer in a match pattern. any possibility of doing so?
<old>(define-syntax-rule (or-files) (or "--file"))
<user>sneek: later tell mwette, Thanks for all the help, it will be really helpful
<sneek>Will do.
<old>(match ... ((or-files) ...)))
<user>sneek: later tell mwette, here is the link of the foreign function https://pastebin.com/wPwypum2
<sneek>Will do.
<AwesomeAdam54321>hi
<AwesomeAdam54321>Hi
<AwesomeAdam54321>Does Guile have a library for parsing IFF files?
<dsmith>sneek, software?
<dsmith>sneek, guile-software?
<sneek>I could be wrong, but guile-software is http://sph.mn/foreign/guile-software.html Send an email to tantalum, <sph at posteo dot eu> to make changes or post a new project.
<hadderly>How does op work in
<hadderly>(array-index-map!
<hadderly> (apply make-shared-array (make-array #t) (const '()) frame)
<hadderly> (lambda i (apply op (map (lambda (x) (apply array-slice x i)) x))))
<hadderly>I'm trying to adapt sort from array-slice-for-each but I can't figure it out. I understand everything else beside const. Documentation: https://www.gnu.org/software/guile//manual/html_node/Arrays-as-arrays-of-arrays.html#index-array_002dslice_002dfor_002deach
<mwette>Kyuvi: my internet went out for a bit; for 2.03 I'm adding an option to avoid (system foreign-library) as you now have
<sneek>Welcome back mwette, you have 2 messages!
<sneek>mwette, user says: Thanks for all the help, it will be really helpful
<sneek>mwette, user says: here is the link of the foreign function https://pastebin.com/wPwypum2
<dariqq>hi, is there a convenient way to have one module reexport submodules automatically? i.e. i have (foo bar) and (foo baz) and want both to be reexported in (foo) without keeping track of the exports manually
<identity>dariqq: you could (module-use! (module-public-interface (current-module)) (resolve-interface module)), where ‘module’ is the module you want to re-export, though this is pretty ugly
<dariqq>yeah i found in serveral guile packages sometimes. In the root guix.scm is is even in a 'eval-when (eval load compile)' and now I dont know if I should add that as well?
<dariqq>* the guix.scm inside the guix repository
<dariqq>i made it a syntax rule inspired by some of the similar ones i found. It works great thanks
<rlb>hadderly: you were just asking what const does? If so, "info guile 'higher-order functions'" should find it.
<rlb>i.e. https://www.gnu.org/software/guile/manual/html_node/Higher_002dOrder-Functions.html
<Kyuvi>mwette``you mean to the main repository? that will be useful as some systems are stuck on guilie 2.0.14 (for security reasons maybe?) I think I should ask them about that
<rlb>...hmm, wondering about us passing through libunistring iconveh.h enum values (in strings.h) -- means a change in a libunistring major version could break our ABI, and also means we can't easily/safely add our own failed-conversion-handler values without risking collision?
<rlb>Was thinking about it wrt the "noncharacters" r7rs proposal, where I'm thinking we'd need an additional handler.
<mwette>Kyuvi: yes `guild compile-ffi -w ffi/mlibwnck.ffi'
<mwette>ACTION afk