Re: foreign objects and the garbage collector

2021-09-21 Thread Maxime Devos
adriano schreef op di 21-09-2021 om 16:26 [+0200]: > > [...] > Well, it'd be wonderful to have an example of what you're describing > here ! 🙂️ > > The new exceptions system is still quite obscure 🤷️ Ignoring with-throw-handler, raise-continuable and pre-unwind handlers, it's the same mechanism

Re: foreign objects and the garbage collector

2021-09-21 Thread adriano
Il giorno mar, 21/09/2021 alle 10.25 -0400, Olivier Dion ha scritto: > On Tue, 21 Sep 2021, adriano wrote: > > Hi Olivier, > > > > thank you very much for your reply > > > > Il giorno dom, 19/09/2021 alle 14.11 -0400, Olivier Dion ha > > scritto: > > > On Sun, 19 Sep 2021, adriano wrote: > > >

Re: foreign objects and the garbage collector

2021-09-21 Thread adriano
Hi Maxime, Il giorno dom, 19/09/2021 alle 20.23 +0200, Maxime Devos ha scritto: > Olivier Dion via General Guile related discussions schreef op zo 19- > 09-2021 om 14:11 [-0400]: > > On Sun, 19 Sep 2021, adriano wrote: > > > > If you want to avoid the problem, you should explicitely bind > > > >

Re: foreign objects and the garbage collector

2021-09-21 Thread Olivier Dion via General Guile related discussions
On Tue, 21 Sep 2021, adriano wrote: > Hi Olivier, > > thank you very much for your reply > > Il giorno dom, 19/09/2021 alle 14.11 -0400, Olivier Dion ha scritto: >> On Sun, 19 Sep 2021, adriano wrote: >> > >> > > > > > >> > It'd be so nice to have an example >> >> (define (with-my-resource tok

Re: foreign objects and the garbage collector

2021-09-21 Thread adriano
Hi Olivier, thank you very much for your reply Il giorno dom, 19/09/2021 alle 14.11 -0400, Olivier Dion ha scritto: > On Sun, 19 Sep 2021, adriano wrote: > > > > > > It'd be so nice to have an example > > (define (with-my-resource token proc) >   (let ((resource #f)) >     (dynamic-wind >

Re: foreign objects and the garbage collector

2021-09-19 Thread Maxime Devos
Olivier Dion via General Guile related discussions schreef op zo 19-09-2021 om 14:11 [-0400]: > On Sun, 19 Sep 2021, adriano wrote: > > > If you want to avoid the problem, you should explicitely bind and > > > call the gps-close function and not rely on the garbage collector to > > > do it for yo

Re: foreign objects and the garbage collector

2021-09-19 Thread Olivier Dion via General Guile related discussions
On Sun, 19 Sep 2021, adriano wrote: >> If you want to avoid the problem, you should explicitely bind and >> call the gps-close function and not rely on the garbage collector to >> do it for you. You can use dynamic-wind to open and close >> resources as needed. > > It'd be so nice to have an examp

Re: foreign objects and the garbage collector

2021-09-18 Thread adriano
Il giorno sab, 04/09/2021 alle 15.35 +0200, Vivien Kraus via General Guile related discussions ha scritto: > Hello, > > Le samedi 04 septembre 2021 à 07:41 -0500, Tim Meehan a écrit : > > I'd rather not compile anything in C, and just use the tools in > > Guile to > > interact with libgps. Is ther

Re: foreign objects and the garbage collector

2021-09-04 Thread Tim Meehan
Thanks Vivien, I had not considered dynamic-wind. I'll look into that a bit more. Cheers, Tim On Sat, Sep 4, 2021 at 8:35 AM Vivien Kraus wrote: > Hello, > > Le samedi 04 septembre 2021 à 07:41 -0500, Tim Meehan a écrit : > > I'd rather not compile anything in C, and just use the tools in Guile

Re: foreign objects and the garbage collector

2021-09-04 Thread Vivien Kraus via General Guile related discussions
Hello, Le samedi 04 septembre 2021 à 07:41 -0500, Tim Meehan a écrit : > I'd rather not compile anything in C, and just use the tools in Guile to > interact with libgps. Is there a way to get Guile's garbage collector to > call "gps_close" on the opaque structure returned by "gps_open"? I think it