IRC channel logs


back to list of logs

<kjell>i'm having problems with dynamic-link: running (dynamic-link "libc") in the repl gives me ERROR: In procedure dynamic-link: file: "libc", message: "file not found"
<davexunit>kjell: for libc, you just want to use (dynamic-link)
<davexunit>pretty sure, anyway.
<kjell>ok, but what i really want is another library
<kjell>i get the same problem
<kjell>trying the same in a script and stracing it gives: open("/usr/lib/x86_64-linux-gnu/", O_RDONLY|O_CLOEXEC) = 5
<davexunit>is the library directory on your library path?
<kjell>but still guile (or is it ltdl?) continues to look for libc, and eventually fails
<davexunit>guile calls ltdl, I believe.
<kjell>'grep /usr/lib/x86_64-linux-gnu /etc/*' says it is
<kjell>i see in the guile-user mailing list that people have had this problem, but that was early this millenium
<davexunit>could it be that you need to install the -dev version of a package?
<davexunit>I'm too knowledgable about how all this stuff works.
<kjell>this fails:
<kjell>i don't think so, that would make it hard for all users of programs dynamically linking libraries i guess
<davexunit>that fails for me, too
<kjell>glad it's not just me :)
<kjell>i'm using GNU Guile 2.0.9-deb+1-1 on a recent LMDE system
<davexunit>I'm not familiar with dynamic-args-call, I use pointer->procedure and dynamic-func
<kjell>i copy-pasted that example from this page:
<kjell>(which is from 1998/04/29, so...)
<davexunit>this is the guile 1.2 manual...
<davexunit>check out
<kjell>but from the recent documentation i read it doesn't seem to be different
<davexunit>for the current manual
<kjell>been there
<davexunit>from what I'm reading, you do not want to use dynamic-args-call
<kjell>and following that link to i find (define libm (dynamic-link "libm"))
<davexunit>it's not even documented in the current manual, leading me to believe it's deprecated.
<kjell>and that works fine
<kjell>well, apparently it's still there
<davexunit>it is
<kjell>but libm is probably already loaded as a dependency by guile
<kjell>i can see it opened early from the strace log
<davexunit>(pointer->procedure int (dynamic-func "rand" libc-obj) '())
<davexunit>that will give you a procedure that calls the "rand" function in libc
<davexunit>keep in mind that to use libc, use (dynamic-link), not (dynamic-link "libc")
<fantazo>what is the moste recent interesting thing done in guile?
<davexunit>fantazo: gnu guix
<davexunit>there's plenty of other great guile projects. stay awhile and take a look around. :)
<davexunit>people are writing web frameworks, learning software, game engines, etc.
<kjell>davexunit: replacing (dynamic-link) for libc-obj in your example works
<kjell>but only the first when executing it as a script
<davexunit>kjell: what do you mean by "only the first"?
<kjell>i put it in the script and executed it, that worked, the second time it didn't, but that was something else, my bad
<kjell>davexunit: it's moving in the right direction i think :)
<kjell>i guess i need to read up on foreign type/pointers now
<kjell>davexunit: getting random numbers from libc using ffi now, thanks! :)
<davexunit>kjell: woohoo! do not that guile has procedures for generating random numbers, as well.
<davexunit>like 'random' and 'random:uniform'
<kjell>yeah, it was only for testing, i'm planning to use libao and libmpg123 to (hopefully) play an mp3
<davexunit>oh cool
<kjell>davexunit: thanks again, always helpful to have someone that listens and helps out
<davexunit>you're welcome! I received a lot of help myself when I first started using Guile.
<kjell>those first steps can be really hard without help :)
<kjell>good thing is i'm on track again, bad thing is i'll probably screw up tonights sleep as well :)
<davexunit>here's a project of mine that uses the FFI to wrap a C library:
<davexunit>could be helpful for reference
<kjell>i'll check it out if (_when_ :)) i run in to the next problem
<davexunit>happy hacking
<kjell>davexunit: your project has already been helpful (figuring out return and parameter types for functions)
<davexunit>kjell: glad it's useful :)
<kjell>i'm probably going to borrow heavily from your use of define-syntax-rule in the near future
<davexunit>I borrowed that myself. :)
***karswell` is now known as karswell
<nalaginrut>morning guilers~
<civodul>Hello Guilers!
<dsmith-work>Happy Friday, Guilers!!
<dsmith-work>civodul: What kind of machine is needed for the guix arm build farm?
<civodul>Happy Friday!
<civodul>dsmith-work: it's a machine that would be used full time, so it needs to be able to handle it
<civodul>and techincally, some kind of an ARMv7 box i guess
<civodul>with quite a bit of RAM
<wingo>happy new year :)
<sneek>wingo, you have 1 message.
<sneek>wingo, mark_weaver says: language/cps/verify.scm:132:7: warning: wrong number of arguments to `visit-entry'
*wingo rewriting goops to be in scheme only
<wingo>as much as possible anyway, given our compat restrictions
<davexunit>ooh, that's pretty big news.
<civodul>howdy, wingo
<wingo>greets :)
*wingo looked at guix-devel today -- quite active!
<davexunit>it's getting hard to keep up with.
<civodul>heh :-)
<davexunit>a good problem to have
<paroneayea>anyone here use ido and figure out a way to have .scm files take priority over .go files when picking files?
*wingo still on iswitchb :P
<civodul>paroneayea: (setq ido-ignore-files (cons "\\\\.go$" ido-ignore-files))
<ft>No fun if you plan on writing code in Go, the language. :)
<paroneayea>ft: yeah, that's why I was hoping to just switch priorities :)
<civodul>better not to write in Go :-)
<cluck>civodul: congratulations on the ARM port :)
<civodul>well, it's mark_weaver
<civodul>but that's cool stuff, indeed :-)
<cluck>civodul: yes, i realize that but i haven't seen him around today and afaik you're the project head so..
<davexunit>civodul: thanks for that elisp snippet! I've been wondering the same thing as paroneayea.
<paroneayea>oh wait
<paroneayea>civodul: arm port of... guix?
<paroneayea>I was thinking of running my backup server with guix but figured that was a blocker :)
<paroneayea>since it's on a beaglebone black
<davexunit>you can't run the guix distro standalone yet, but mark_weaver has done the bootrstrapping because he's awesome.
<cluck>paroneayea: rejoice ye mortals =)
<paroneayea>cluck: davexunit: civodul: awesome :D
<paroneayea>civodul: well done
<cluck>davexunit: i hope he keeps at it, it's great work. this could only get better if it got to the point one could run it from android (possibly using something like proot/gnuroot) walled gardens suck and there's no real alternatives (not unless one's planing on shelling €500+ for a phone)
<cluck>paroneayea: all credit goes to the braves of the GUIX team, i just happen to be the lucky bringer of good news
<cluck>davexunit: also, an easy to reach guile for android would rock so there's that too ;)
<davexunit>guile on android would be great
<dsmith-work>civodul: Will the new arm guix run on the beaglebone black?
*dsmith-work is confused by all the arm variations
<civodul>i must admit i'm confused as well ;-)
<civodul>i don't know for sure
<dsmith-work>civodul: np. Thanks
<civodul>we'll have to make it clear on the web page
*davexunit is confused, too
<paroneayea>I didn't realize that Guy L Steele was both the main founder of scheme and co-founder of teco emacs
<civodul>and Java
<cluck>arm has all sorts of crazy these days :(
<cluck>paroneayea: and he didn't stop there!
<dsmith-work>Don't forget H&S
<dsmith-work>(C: A Reference Manual)
<mark_weaver>The Guix armhf port should run on Beaglebone Black, yes. More generally, it aims to support the same set of processors as Debian's armhf port.