C structures

2005-12-30 Thread Leonardo Lopes Pereira
I would like to know if is there any way to convert C structs to any type of Guile data. ___ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user

Re: JIT compiler

2005-12-30 Thread Neil Jerram
Leonardo Lopes Pereira <[EMAIL PROTECTED]> writes: > I would like to know if there is any Just-in-time compiler related > resourse on Guile. There is guile-hobbit, which is a normal compiler, but I'm not sure if it is working with all features of current Guile. I'm not aware of any JIT compiler

Re: C structures

2005-12-30 Thread Neil Jerram
Leonardo Lopes Pereira <[EMAIL PROTECTED]> writes: > I would like to know if is there any way to convert C structs to any > type of Guile data. You need to be more precise about your requirements. For example, at the most basic level, we could say "yes, of course, the C structure struct point {

Re: C structures

2005-12-30 Thread Mike Gran
Leonardo- A "list" can hold any type of data, so it shouldn't be a problem to unpack a struct into a list. There really isn't a way to automatically convert a C struct into a list. You'd have to convert each element of the struct into a Guile type, then assemble them into a list. Converting a

Re: C structures

2005-12-30 Thread Leonardo Lopes Pereira
Em Fri, 30 Dec 2005 07:58:30 -0800 (PST) Mike Gran <[EMAIL PROTECTED]> escreveu: > Leonardo- > > A "list" can hold any type of data, so it shouldn't be a problem to > unpack a struct into a list. > > There really isn't a way to automatically convert a C struct into a > list. You'd have to conve

Re: C structures

2005-12-30 Thread Mike Gran
Leonardo- This isn't exactly what you what but, the code in the attached text file shows how to declare a Guile function "c-func-wrap" takes a list as an argument. The function "c-func-wrap" converts that list into a variable length C array of doubles which is passed to the C func "c_func". I ju

Smobs & garbage collecting

2005-12-30 Thread Christian Mauduit
Hi all, Currently hacking on http://www.gnu.org/software/liquidwar6/ I've had 2 problems with Guile and smobs. Hopefully the problems are solved and I've found solutions which although not 100% satisfying have the merit of "working". I'm just writing here to keep you informed of the potential diff

Re: C structures

2005-12-30 Thread klaus schilling
Leonardo Lopes Pereira writes: > > To be more clear. I want to be able to call a C function from guile. > The problem is that this function has a struct as an arg and this > struct has variable members. So, I need to create a list on > scheme/guile and convert it to a C struct that will be us

Re: ANN: SDOM project development release 0.4

2005-12-30 Thread klaus schilling
Why is SDOM not part of the guile-lib, whereas SSAX is? Klaus Schilling ___ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user

Re: ANN: SDOM project development release 0.4

2005-12-30 Thread Julian Graham
Well, I would imagine because Andy Wingo (or whoever it is that's maintaining guile-lib these days) doesn't know about it / doesn't think it's a mature enough piece of code -- which it probably isn't. On 12/29/05, klaus schilling <[EMAIL PROTECTED]> wrote: > Why is SDOM not part of the guile-lib,

memoizing interpreter

2005-12-30 Thread Leonardo Lopes Pereira
I read that guile is a "memoizing interpreter", what that means? ___ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user

Re: Smobs & garbage collecting

2005-12-30 Thread Han-Wen Nienhuys
In article <[EMAIL PROTECTED]>, Christian Mauduit <[EMAIL PROTECTED]> wrote: >The funny thing is that if I stop calling (display %my-smob) then all >the smobs are correctly freed when calling scm_gc(). There was a memory leak in the display routines, which was recently fixed in the CVS branch. F