IRC channel logs

2022-05-30.log

back to list of logs

<lechner>Hi, how do I interpret this error from 'guild compile-ffi' please? http://ix.io/3YVh
<drakonis>it seems you didnt pass a pair?
***taiju` is now known as taiju
<lechner>drakonis: i just ran the command on these three files. it failed on the last one http://ix.io/3YVo/text
<lechner>maybe this odd inline comment, or the continuation lines confused nyacc? https://github.com/linux-pam/linux-pam/blob/master/libpamc/include/security/pam_client.h#L189-L191
<lechner>#define PAM_BPC_FOR_CLIENT(/* pamc_bp_t */ prompt)
<mwette>lechner: probably c preprocessor issue, can you file a bug report? https://savannah.nongnu.org/bugs/?group=nyacc&func=additem
<mwette>much of the challenge in coding FFI helper has been the C preprocessor
<lechner>mwette: wow, having reached the author i'm in the right place. thanks so much for the great FFI module! will do on the bug
<lagash>lechner: it's not Guile (it's CL), but if you like "consfiguring" you should check out Consfigurator :-)
***Guest8848 is now known as roptat
***ecraven- is now known as ecraven
<mwette>lechner: I think I fixed: one liner: https://paste.debian.net/1242471/
<lampilelo>mwette strikes again with quick fixes
<lechner>mwette: looks great! will test and get back to you.
<lechner>mwette: on a sidenote, why does the order of the header files here matter, please? https://paste.rs/nIB symbols like PAM_SUCESS from _pam_types.h are not included when that file is listed last https://github.com/linux-pam/linux-pam/tree/master/libpam/include/security
***chris is now known as Guest3456
<mwette>lechner: maybe not the way it's intended to be done (in pam); if pam usually wants you to include one file, but you want to suck in the dep's then it's better to use #:include on the intended ones and use a #:inc-filter to suck in the files under security/. See some examples in examples/ffi for how to use.
<mwette>FYI, nyacc-1.07.0 was released today
<civodul>mwette: congrats!
<mwette>ty
<stis>mwette: \o/
<mwette>took some time; I've been working microcontrollers and also guile debugging
<mwette>There is a lot there (traps, dwarf support, etc) but getting a full debugger will take some time: need to understand what's there and then adding on top
<lechner>mwette: Hi, did your one-liner make it into 1.07? I only saw it on the dev branch https://git.savannah.nongnu.org/cgit/nyacc.git/commit/?h=dev-1.07&id=098ecc12ff91839a8ce96216e301fc23779e49ec
<lechner>maybe i looked in the wrong branch. did you switch from 'master' to 'main' recently?
<lechner>mwette: thanks for the quick fix, and also for the hint about #:inc-filter !
***yewscion is now known as Guest7325
***yewscion20 is now known as yewscion
<lechner>Hi, do i have to do anything other than (use-modules (ffi pam)) to get access to PAM_SUCCESS, please? http://ix.io/3YXY
<lechner>I also tried (ffi-pam-symbol-val PAM_SUCCESS)
<mwette>(ffi-pam-symbol-val 'PAM_SUCCESS)
<mwette>the one liner is in 1.07
<mwette> yes in main -- I still have to merge into master
<mwette>merged to master now, commig 88da7e
<lechner>mwette: thanks! sorry, i'm a Guile noobie but with great enthusiasm. why do you have master and main? btw, i now name all my development trunks "history"
<mwette>master is deprecated (e.g., at github.com, etc); the guile repo is using main as well
<mwette>for git, master is the old convention, main is the new convention
<Noisytoot>No, git still uses master as the default branch, it's just GitHub (and some other forges) that use main by default.
<mwette>Oh. Thanks for the clarification.
<lechner>Hi, is there a state monad in Guile?
<mwette>monads in guix: https://git.savannah.gnu.org/cgit/guix.git/tree/guix/monads.scm
<lechner>mwette: thanks!
<lechner>They monads look great! Why are they only in Guix?
<lilyp>Because Guix foud them useful :)
<lilyp>s/foud/found/
<lechner>lilyp: Thanks! Do they bring a specific advantage to Guix?
<lilyp>Well, in some aspects Guix is more purely functional than generic Scheme stuff, but I don't want to start a lengthy debate at this hour.
*lilyp → bed
<lechner>lilyp: Thanks!
<lechner>Hi, is the shorted 'define' syntax for procedures widely accepted, or do some folks still prefer the long form with lambda? In other words, is it pedantic to like the latter? Thanks! https://www.gnu.org/software/guile/docs/master/guile.html/Lambda-Alternatives.html
<rekado>a good reason to use the long form is when doing memoization or including private state via closure
<mwette>Yes. Shortened form is widely used. I use the long form for private var's , like rekado says. (define foo (let ((counter 0)) (lambda () (set! counter (+1 counter)) counter)))