IRC channel logs


back to list of logs

<mwette>civodul: Is there a written guide for helping to fix bugs. Do I checkout master git and send someone patch, or what?
<rlb>mwette: I've been git-send-email-ing patches (or just attaching) to either the bug tracker or guile-devel, but I was also thinking about asking what's "preferred".
<mwette>brendyyn: Thanks for that!
<brendyyn>mwette: when you get stuck you can put your code on and ask for help her
<mwette>brendyyn: awesome -- thx
<brendyyn>mwette: sorry i thought we were in the guix channel. oops. i should link here
<mwette>civodul, wingo: I'm working on 29001: configure flag to disable tmpnam. I was thinking to also make use of tmpnam deprecated. WDYT?
<mwette>brendyyn: that one is a little less clear; I will work on something and start poking this channel
<brendyyn>Value out of range: 36
<brendyyn>my code loads and runs fine in the repl, but i get that when i guile tries to compile it
<brendyyn>in procedure primitive-load-path
<brendyyn>Why does * with no arguments output 1, but - with no arguments doesn't output 0?
***drakonis1 is now known as drakonis
<wleslie>brendyyn: x - 0 = x yet x * 1 = x
<wleslie>it's nice to be able to rely on standard group properties
<brendyyn>so this is more correct?
<wleslie>not only more correct, it's expected by the traditional definitions of + and *
<brendyyn>but this is with no x
<brendyyn>+ outputs 0
<wleslie>sure, but 0 + x + y + z = x + y + z, it doesn't matter how many elements are involved
<wleslie>0 is the identity in any group where + is the operator
<brendyyn>same with -?
<wleslie>- is a special case of +
<brendyyn>i believe you are right, but do not understand how that implies - shouldnt also output 0
<brendyyn>if - output 0, what would be an undesirable consequence?
<wleslie>didn't you say - outputs 0?
<brendyyn>wleslie: no, check my initial question and test in your guile repl. (*) => 1, (+) => 0, (-) => error
<brendyyn>do you believe this behaviour is correct? a bug? or is unimportant?
<oni-on-ion>same with common lisp
<wleslie>look, I don't know, really. nary (-) in scheme is kind of wierd. it doesn't associate with itself, for example, as + and * do.
<wleslie>making it an error forces you to declare what you mean.
<brendyyn>with +, you could imagine summing up some things, and if there was a case where there were none, you assume it adds up to 0. thats why i assume its 0. but the same logic seems to hold for -?
<brendyyn>assume its a reasonable choice*
<wleslie>the trouble is that the first argument is wierd, right
<brendyyn>what's weird?
<wleslie>(= (+ x (+ y z)) (+ x y z)); (!= (- x (- y z)) (- x y z))
<wleslie>the first argument isn't treated as a negative
<brendyyn>but -0 = +0 anyway
<wleslie>the first argument is not the 0. 0 is the hidden argument.
<brendyyn>well now we have two hidden arguments ;)
<wleslie>then you're not talking about -
<brendyyn>if there are no arguments, then you could assume its like (- 0 0)
<wleslie>can you though? given that it isn't associative?
<brendyyn>why does that matter since there are no arguments
<oni-on-ion>some answers have been collected:
<wilfredh>howdy folks :)
<wilfredh>I noticed a few missing parens in the guile docs: (cons 3 '(2 1)
<wilfredh>what should I do with docs bugs?
***apteryx_ is now known as apteryx
<lloda>hi, how do you debug issues with dynamic-link not finding a file that's 'obviously there'?
<civodul>lloda: LD_DEBUG=files :-)
<civodul>or strace
<janneke>or running 'file' to find out it's the wrong ELF
<lloda>thx civodul
<lloda>LD_DEBUG reports .so being loaded but then dynamic-link still fails with a message of 'file not found'
<lloda>I have to assume the message is bogus somehow
<civodul>yes, the message is bogus
<civodul>it's an old and terrible issue with ltdl
<lloda>do you know what the actual cause is? or could be
<lloda>I have it fail on one machine and succeed on another fwiw
<civodul>there are many reasons why dlopen could fail
<civodul>file not found, symbol not found, etc.
<civodul>LD_DEBUG=files should give you a hint, at least
<civodul>and then you can try LD_DEBUG=bindings or similar
<civodul>perhaps it's a dependency of your .so that couldn't be found
<Zelphir>Hi : )
<Zelphir>@lloda: I took a short look at and did not see anything sticking out, except, that there only the name of the library is used, as in "libm", but not a whole path.
<lloda> yeah Zelphir that's why the default name is just 'libcblas'
<lloda>so if that's on the dynamic library load path, you shouldn't need to set any variables
<dsmith-work>Morning Greetings, Guilers
<lloda>have you tried LD_DEBUG=files as per civodul suggestion?
<Zelphir>Could it be somehow installed the wrong way? So that it is not dynamic or something?
<Zelphir>Ah ok let me see ...
<Zelphir>lots of output, should I post it here or in the issue (more persistent)?
<Zelphir>(I have a feeling it has to do with installing Guile through Guix package manager.)
<Zelphir>I just noticed, even with libm it does not work, when I use the example from the docs :O
<Zelphir>Also "cannot find" it.
<lloda>seems to be dying on this line
<lloda> 6069: [0]; needed by /usr/lib/ [0]
<lloda>but I cannot really interpret this :-/
<Zelphir>I could compile Guile into some user directory as prefix and try using that, to see if it is about Guile being installed via Guix.
<rlb>We finally have 3.0 (3.0.1) building on all the debian release architectures -- should be eligible to propagate to testing now:
<civodul>yay, congrats, rlb!
<rlb>(And 2.2.7 should start building soon.)
<Zelphir>sounds great
<lloda>civodul if you have minute to look at Zelphir logs I'd really appreciate it
<rlb>civodul: thanks -- and that's still with the jit disabled on arm* and x32. I can try relaxing the restriction, but I might wait until the current version propagates first.
<civodul>Zelphir: the problem here is that you're loading /usr/lib/ from a Guix-provided Guile
<civodul>Guile is linked against Guix's libc, whereas is linked against the host distro's libc
<civodul>that cannot work
<rlb>("jit disabled" just means we have --enable-jit=no set there.)
<civodul>instead, you need to use Guix for everything
<civodul>(or the host distro, but hey ;-))
<civodul>IOW, you need to use libcblas from Guix
<Zelphir>Ah, OK, thanks, but how would I use "libcblas from Guix"? (So far I've only used Guix as a package manager, to get more up to date versions and not mess with the system.)
<Zelphir>I will check if it exists as package in Guix
<civodul>Zelphir: there's openblas for instance
<lloda>thx civodul
<Zelphir>And I found lapack. Which one should one use?
<civodul>hmm, that's probably a quest for lloda actually :-)
<lloda>you don't need lapack for guile-ffi-cblas
<lloda>but if you install lapack it will have a dependency on blas
<Zelphir>OK I will try with openblas first : )
<lloda>openblas should be good I think
<Zelphir>I also initially considered using schemetran, but when I looked at the source, I realized, that I would need to know how to write Fortran code. I never wrote any, so I looked further and found guile-ffi-cblas.
<Zelphir>OK, after installing openblas using `guix install openblas`: Without environment variables, it still says, that it cannot find libcblas. I think I need to find out where libcblas in the Guix directories is now, so that I can try it with setting the environment variables.
<civodul>Zelphir: probably you'll need to export LTDL_LIBRARY_PATH=$HOME/.guix-profile/lib
<civodul>so that dynamic-link searches for blas in your profile
<civodul>it's not called "", though, so perhaps you need to adjust guile-ffi-cblas
<Zelphir>OK, What does LTDL stand for? Link target dynamic link?
<oni-on-ion>LD_ is all ive seen on that
<lloda>there is GUILE_FFI_CBLAS_LIBNAME to set a non-default library name
<civodul>Zelphir: libltdl (part of GNU Libtool) is a portability wrapper around dlopen
<civodul>and LTDL_LIBRARY_PATH is its environment variable
<Zelphir>There is `` in that directory :) I guess that could work. I will try with libname and the LTDL var
<Zelphir>Ha, the error changed! Getting closer perhaps.
<Zelphir>I guess the name of the functions is now different, because it is openblas. Perhaps now the names are all prefixed with "openblas"?
<lloda>the old blas fortran77 bindings have names like crotg_ while the cblas bindings have names like cblas_crotg
<Zelphir>Ah, here is better output:
<lloda>guile-ffi-cblas uses the latter, but openblas should provide those too
<Zelphir>The openblas I installed is version 0.3.7
<lloda>can you paste nm /home/user/.guix-profile/lib/ ?
<lloda>the binding names are standard, otherwise nothing would work :-(
<Zelphir>Too long for the ^^ I will need to cut it in pieces.
<lloda>can you check that it has cblas_crotg or any cblas_ symbols really
<Zelphir>There are some cblas_ ... but not cblas_crotg.
<Zelphir>I can post all those starting with cblas perhaps.
<Zelphir>So I guess only for double (d) and single (s) the rotations are there, but not for complex? (c)
<lloda>I guess
<Zelphir>If I interpret those names correctly.
<lloda>I'm not sure why they aren't there tho
<Zelphir>OK, how about I try the other library, lapack?
<lloda>I guess there's no harm in trying
<lloda>if some functions aren't supported widely I could patch them out
<lloda> rotg etc aren't as important as gemm etc. I guess
<lloda>still it's annoying to need these workarounds
<Zelphir>For my actual use case (implementing linear regression) I guess I also would not need complex numbers usually, but I don't know about other use cases.
<lloda>you could try BLIS :-)
<lloda>it's nicer and there's only one source so no disagreements over what's included or not
<lloda>but not as widely available as BLAS on repos etc.
<lloda> I digress
<lloda>lmk if installing lapack gives you those functions and if not I can find a way to not require them
<Zelphir>:D in that installed lapack now the cblas_srotg is not found ... I guess I cannot have all^^'
<Zelphir>Actually there are no cblas_ symbols in there at all. Just checked using `nm ...`
<Zelphir>OK, I mean, I could still try and compile CBLAS from netlib.
<civodul>we should add a netlib package
<civodul>it could be that gsl would work
<Zelphir>I tried that before, but had issues there as well, because `blas_LINUX.a` does not exist on my system, and I need to set the path to it in some `` according to the web and there is an error exactly about that path being wrong when I don't -.-
<Zelphir>(I mean, I tried compiling CBLAS before, not making a netlib package)
<civodul>"objdump -T $(guix build gsl)/lib/|grep crotg" turns up nothing
<lloda>I've pushed a branch norotg
<lloda>could you try that?
<Zelphir>I will try.
<Zelphir>It passes many tests and shows errors on some only.
<Zelphir>I think I can make a paste of all the errors and the other ones all pass.
<Zelphir>Ah actually I think the errors are all before the tests.
<Zelphir> There you can see everything up to the first test and all tests afterwards pass up to 2104 and then there is some more output from LD_DEBUG=files.
<lloda>that looks good those are all the tests
<lloda>I'll see if I can support rotg conditionally then
<Zelphir>Should I try the BLIS test as well?
<lloda>if you want
<lloda>it's independent
<lloda>I like BLIS better because it has better support for strides & the like
<lloda>but you would use one or the other
<Zelphir>OK, I guess BLIS needs another library from guix installed, because it starts again with "file not found".
<Zelphir>There is blis on guix, lets see.
<Zelphir>"It's compiling" (Guix is compiling BLIS) ^^
<Zelphir>uff, that 'check' phase takes its time
<civodul>Zelphir: yeah these things take an awful lot of time
<Zelphir>aha, it is running its test suite
<str1ngs>hello nlyy
<nly>greetings str1ngs
<str1ngs>how goes things nly?
<Zelphir>(Check phase took 1h45min approximately on my X200 :D)
<nly>str1ngs: great, i am reviving guile-torrent
<str1ngs>nly: nice doe that handle downloading torrents?
<nly>nah, just reads .torrent files
<nly>i just found out a great solution to a problem in metainfo. I'll use first class macros
<nly>it's good fun
<Zelphir>@lloda: Do I need to set a different environment variable for BLIS or is it GUILE_FFI_CBLAS_LIBNAME for BLIS too?
<Zelphir>Nevermind, I already figured it out: replace CBLAS with BLIS. I think it might need to be added to the readme though.
<Zelphir>All successful using: GUILE_FFI_BLIS_LIBNAME=libblis GUILE_FFI_BLIS_LIBPATH=${HOME}/.guix-profile/lib guile -L mod -s test/test-ffi-blis.scm
<Zelphir># of expected passes 19752
<lloda> nice
<lloda>I think libblis is the default so it should work w/o that
<lloda>and if you set the path for guix as civodul explained then the other shouldn't be needed either
<lloda>GUILE_FFI_BLIS_LIBPATH and GUILE_FFI_BLIS_LIBNAME are already mentioned in the README that I see
<Zelphir>Ah now I see it.
<Zelphir>Setting LTDL_LIBRARY_PATH=$HOME/.guix-profile/lib also works.
<lloda>thx for checking it out Zelphir. I started these bindings long ago and I haven't received feedback really
<lloda>there should be some examples, and more of the functions should be covered
<lloda>I just wrapped what I needed myself I suppose
<Zelphir>It is great, that there is such a library at all. Otherwise I would probably have implemented some naive matrix multiplication in Guile and an interface, so that someone else can replace it with performant solution.
<Zelphir>Now I already have a chance to implement a performant library.
<Zelphir>Thanks for all your help! And also thanks to civodul!
<Zelphir>Oh I will try the version from master branch with BLIS as well.
<str1ngs>nly: nice, sounds intresting.
<nly>amen, thanks civodul. I use Guile everyday, i forget to thank the maintainers
<nly>thanks wingo and mark
<Zelphir>(Yep, also works with the version from master.)
<nly>i'm making (some) money using Guile!
<nly>(not a lot, lol)
<mwette>lloda: I was getting the same thing. Are you on fedora,redhat,centos by chance?
<mwette>I found the problem in libguile/dynl.c. Patch
<mwette>s/found/found a fix for/
<lloda>I'm on debian mwette
<lloda>doesn't lt_dlopenext try no ext first, then the extensions?
<lloda>if your patch works that looks like a bug in libltdl
<mwette>check both with
<mwette>I think it just adds extensions.
<lloda>I'll check tomorrow
<lloda>I've been alternating office days with wfh this week
<lloda>ty for looking into it