Re: smob gc protection, and inheritance

2013-09-05 Thread Andrew Gaylard
On 09/04/13 23:13, Ludovic Courtès wrote: Hi Doug, Doug Evans skribis: 3) The docs aren't as clear as they could be on whether the "smob" free function needs to scm_gc_free all results of calls to scm_gc_malloc made when constructing the smob. IIUC, this is not necessary. The ‘scm_gc_free’ f

guile-dbi cores in mark_db_handle

2013-08-30 Thread Andrew Gaylard
Hi guile people, I'm experiencing cores in guile-dbi. This is on Solaris-10u10 on SPARC, with guile and guile-dbi compiled with -O2. When compiled with -O0, the problem disappears. I've also been unable to replicate the problem on Linux x86_64. This suggests to me that the underlying cause co

Re: Persisting GOOPS objects

2013-01-25 Thread Andrew Gaylard
Hi Andy, That did the trick! Many thanks for your help with this. I'm now happily persisting and re-materialising objects, with the proviso that they aren't derived from . (That was a red herring in the whole exercise; my classes derive from anyway.) - Andrew

Re: Persisting GOOPS objects

2013-01-23 Thread Andrew Gaylard
I made another attempt using strings instead of numbers, to get an idea of whether save.scm is usable: $ cat persistence-test.scm (use-modules (oop goops)) (use-modules (oop goops describe)) (use-modules (oop goops save)) ;; Apply Andy's fix to the readable? function (set! (@@ (oop goops save) re

Re: Persisting GOOPS objects

2013-01-21 Thread Andrew Gaylard
y assumptions derive from these comments in oop/goops/save.scm: *;;; Save OBJECT ... to PORT so that when the data is read and evaluated ;;; OBJECT ... are re-created under names NAME ... . * What am I missing? - Andrew On Sun, Jan 20, 2013 at 10:15 PM, Andy Wingo wrote: > Hi, > >

Persisting GOOPS objects

2013-01-18 Thread Andrew Gaylard
Hi, I'm trying to persist a GOOPS object. I've found oop/goops/save.scm, which defines save-object. That looks like what I need. However, I can't get it to work. Below is an example of what I'm seeing. I'm sure I'm doing something dumb here -- but what? Many thanks for your help, - Andrew $ /

Threads deadlock in select

2011-09-02 Thread Andrew Gaylard
Hi, I am experiencing a problem where my application hangs on occasionally (1 in 5 times) on startup. There are two threads, one is C++'s main(), the other is created from scheme directly. The scheme thread implements a TCP listener, using conventional socket/bind/listen/accept logic: (define (r

Re: Valgrind warnings with -1.8.6

2009-04-30 Thread Andrew Gaylard
On Mon, Apr 6, 2009 at 5:05 PM, Andrew Gaylard wrote: > Hi, > > I'm linking with libguile on Linux, built from source, to extend my > C application with Scheme. I'm seeing a lot of warnings from > valgrind.  The same warnings appear when using Guile standalone. > Shou

Valgrind warnings with -1.8.6

2009-04-07 Thread Andrew Gaylard
Hi, I'm linking with libguile on Linux, built from source, to extend my C application with Scheme. I'm seeing a lot of warnings from valgrind. The same warnings appear when using Guile standalone. Should I be worried? The following steps show the problem: Use this as hello-world.scm: #!/usr/lo

Valgrind warnings with -1.8.6

2009-04-07 Thread Andrew Gaylard
Hi, I'm linking with libguile on Linux, built from source, to extend my C application with Scheme. I'm seeing a lot of warnings from valgrind.  The same warnings appear when using Guile standalone. Should I be worried? The following steps show the problem. Use this as hello-world.scm: #!/usr/lo