<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". <brendyyn>mwette: when you get stuck you can put your code on paste.debian.net and ask for help her <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>my code loads and runs fine in the repl, but i get that when i guile tries to compile it <brendyyn>Why does * with no arguments output 1, but - with no arguments doesn't output 0? ***drakonis1 is now known as drakonis
<wleslie>it's nice to be able to rely on standard group properties <wleslie>not only more correct, it's expected by the traditional definitions of + and * <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>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? <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? <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 -? <wleslie>the trouble is that the first argument is wierd, right <wleslie>(= (+ x (+ y z)) (+ x y z)); (!= (- x (- y z)) (- x y z)) <wleslie>the first argument isn't treated as a negative <wleslie>the first argument is not the 0. 0 is the hidden argument. <brendyyn>well now we have two hidden arguments ;) <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 <wilfredh>I noticed a few missing parens in the guile docs: (cons 3 '(2 1) ***apteryx_ is now known as apteryx
<lloda>hi, how do you debug issues with dynamic-link not finding a file that's 'obviously there'? <janneke>or running 'file' to find out it's the wrong ELF <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>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 <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 <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>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 <lloda>seems to be dying on this line <lloda> 6069: file=libatlas.so.3 [0]; needed by /usr/lib/libcblas.so [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>(And 2.2.7 should start building soon.) <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/libcblas.so from a Guix-provided Guile <civodul>Guile is linked against Guix's libc, whereas libcblas.so is linked against the host distro's libc <rlb>("jit disabled" just means we have --enable-jit=no set there.) <civodul>instead, you need to use Guix for everything <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 <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 "libcblas.so", though, so perhaps you need to adjust guile-ffi-cblas <Zelphir>OK, What does LTDL stand for? Link target dynamic link? <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 `libopenblas.so` 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 <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/libopenblas.so ? <lloda>the binding names are standard, otherwise nothing would work :-( <Zelphir>Too long for the paste.debian.net ^^ 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) <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>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>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. <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 `Makefile.in` 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/libgslcblas.so|grep crotg" turns up nothing <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. <lloda>that looks good those are all the tests <lloda>I'll see if I can support rotg conditionally then <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>"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>(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 <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 <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>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. <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! <mwette>lloda: I was getting the same thing. Are you on fedora,redhat,centos by chance? <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>I think it just adds extensions. <lloda>I've been alternating office days with wfh this week