IRC channel logs

2017-10-21.log

back to list of logs

<reed_>Hi all, is there a standard way to use modules that don't come with guile by default?
<bgamari>In which configurations can guile be cross-compiled?
<bgamari>is --host=A --build=B --target=B supported?
***b4283_ is now known as b4283
<stratotanker>Hello, I have strange error with a guile program using FFI. That's the output: http://paste.lisp.org/display/359158
<daviid>stratotanker: so, as stated in #scheme, you have to narrow down the cause of this bug, which probably comes from your code, not from guile, and post a snipset of code (10 lines o so) that reproduce it, then we can (try to) help...
<stratotanker>Sorry, get's disconnected
<stratotanker>daviid: I'm pretty sure it's not a guile bug, I think it's related to dynamic/static memory allocation in the library
<stratotanker>I'm using libparted function ped_disk_new_fresh throught this: http://paste.lisp.org/display/359160
<stratotanker>If I comment out the last line (make-pointer) everithing works, but with memory leak
<daviid>stratotanker: (a) when you are askng for help, you have to take your time provide a self 'executable' snipset; (b) it seems to me that you're doing things in a very unorthodox way: try to read and learn from other code that use the ffi and binds a C lib, there are tons of examples, grab a simple and easy one to learn ...
<stratotanker>can you suggest a simple example?
<stratotanker>I read guile-gnome but it's hard for me (I'm a beginner)
<daviid>oh no, guile-gnome does not use dynamic ffi
<daviid>the manual has a dead siple example to start with: 6.21.6 Dynamic FFI
<daviid>a couple of examples actually, try all these, till they work for you on your machine... my recommendation
<stratotanker>Daviid is the same way I'm doing it. Please take a look at the complete source: https://bitbucket.org/_Christian/gnufdisk/src/d0c42d2bd00a2b5a02cc1ec353c48fc0648d7625/src/libparted.scm?at=default
<stratotanker>Code is in progress don't hate me
<daviid>stratotanker: your 5 lines snipset is totally different from these 3 guile's manual example
<daviid>and not complete, I cn't try it here ...
<stratotanker>You can download the full repository if you want, its free
<stratotanker>In the snippet I paste the sorce where I think the error comes from
<daviid>stratotanker: 10 lines complete self exacutable snipset, then maybe someone will look at it ... I'm off this subjct now, sorry
<stratotanker>Okay daviid, sorry to disturb.
<stis>check out http://www.c-lambda.se/functional-python-ii.html that's how functional classes should work
<mwette>Yay! I now have geiser working. Gave up a couple years ago w/ v0.6. Just tried again and working.
<codemac>Is there any documentation on what environment the reader has when reading a scheme file?
<codemac>I'm having to use some really weird hacks in a macro to make a binding available via local-eval, and I think I don't understand the intersection of define-syntax macros and environments
<codemac>if anyone has docs/reading that could help, because I know I'm doing awful things :P