Re: Fwd: new function

2021-09-21 Thread Maxime Devos
Damien Mattei schreef op di 21-09-2021 om 15:04 [+0200]: > i have tested define-once > http://www.gnu.org/software/guile/docs/master/guile.html/Top-Level.html > (the defvar of Lisp)and idea are: > -unfortunately it is considered by scheme as a define,so there is some > context where it is not allow

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: Fwd: new function

2021-09-21 Thread Damien Mattei
i have tested define-once http://www.gnu.org/software/guile/docs/master/guile.html/Top-Level.html (the defvar of Lisp)and idea are: -unfortunately it is considered by scheme as a define,so there is some context where it is not allowed in my code -seems to work fine at toplevel (as mentioned in doc)