Re: dynamic-wind

2017-07-17 Thread Catonano
I'm so glad for all the people who intervened in this discussion As this made the subtleties of the issue clearer. Thank you people ! 2017-07-09 16:49 GMT+02:00 Chris Vine : > On Sun, 9 Jul 2017 11:09:25 -0300 > Vítor De Araújo wrote: > > unwind-protect is a dynamic-wind wit

Re: dynamic-wind

2017-07-09 Thread Chris Vine
t; > >> Trouble is, Scheme's continuations make it impossible to know when > >> something is really final. > >> > >> In fact, implementing coroutines and cooperative multitasking using > >> continuations almost guarantee a repeated back-and-fort

Re: dynamic-wind

2017-07-09 Thread Vítor De Araújo
gt; something is really final. >> >> In fact, implementing coroutines and cooperative multitasking using >> continuations almost guarantee a repeated back-and-forth through >> dynamic-wind. >> >> I strongly suspect Scheme's continuations are more trouble th

Re: dynamic-wind

2017-07-09 Thread Chris Vine
ting coroutines and cooperative multitasking using > continuations almost guarantee a repeated back-and-forth through > dynamic-wind. > > I strongly suspect Scheme's continuations are more trouble than they > are worth. I disagree with that. On the first point, you know that a dynamic

Re: dynamic-wind

2017-07-09 Thread David Kastrup
Marko Rauhamaa writes: > Amirouche Boubekki : > >> I consider dynamic-wind an advanced concept not required for usual >> hacking. > > Hm. Python's try/finally has several uses in virtually every program. > > Trouble is, Scheme's continuations make it impos

Re: dynamic-wind

2017-07-08 Thread Marko Rauhamaa
Amirouche Boubekki : > I consider dynamic-wind an advanced concept not required for usual > hacking. Hm. Python's try/finally has several uses in virtually every program. Trouble is, Scheme's continuations make it impossible to know when something is really final. In fa

Re: dynamic-wind

2017-07-08 Thread Amirouche Boubekki
Héllo all! On Wed, Jul 5, 2017 at 8:14 AM Catonano wrote: > My point is that the manual does not a good job of _introducing_ people to > the concept of dynamic wind > > Especially people wo have not clear in mind a complete map of the use cases > with relative possible solutions.

Re: dynamic-wind

2017-07-05 Thread David Kastrup
Catonano writes: > Chris, > > thank you for your remarks. > > Yo're right that I was being caught up by continuations AND that I was > probably missing the generality of the concept of dynamic wind > > And yet, I still want to clarify my point > > My point is n

Re: dynamic-wind

2017-07-04 Thread Catonano
Chris, thank you for your remarks. Yo're right that I was being caught up by continuations AND that I was probably missing the generality of the concept of dynamic wind And yet, I still want to clarify my point My point is not that the manual is incomplete or inaccurate My point is tha

Re: dynamic-wind

2017-07-02 Thread Chris Vine
> > (enter-context) > > (action) > > (leave-context)) > > > > you simply change it to > > > > (define (within-context action) > > (dynamic-wind > > (lambda () (enter-context)) > > action > > (lambda () (leave-context

Re: dynamic-wind

2017-07-01 Thread Catonano
Thank you !!

Re: dynamic-wind

2017-07-01 Thread Catonano
ed. I don't understand it >> >> How is it supposed to be used ? >> >> > It's very simple (at least from the point of view of a user) > When it is tempting to write something like > > (define (within-context action) > (enter-context) > (actio

Re: dynamic-wind

2017-06-30 Thread Panicz Maciej Godek
very simple (at least from the point of view of a user) When it is tempting to write something like (define (within-context action) (enter-context) (action) (leave-context)) you simply change it to (define (within-context action) (dynamic-wind (lambda () (enter-context)) action

dynamic-wind

2017-06-30 Thread Catonano
(freexl-open "path/to/my/xls-file.xls" handler-ptr) (freexl-do-something handler-ptr) (freexl-do-something-more handler-ptr)) (freexl-close handler-ptr) Do I need dynamic-wind at all ?

Re: `lazy-catch' and `dynamic-wind'

2008-11-24 Thread Ludovic Courtès
Hi, "Neil Jerram" <[EMAIL PROTECTED]> writes: > Could you make that change? Yes, done: http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=7635043239e9ac2786fec54df3eff73c7f213518 Thanks! Ludo'.

Re: `lazy-catch' and `dynamic-wind'

2008-11-23 Thread Neil Jerram
2008/11/23 Ludovic Courtès <[EMAIL PROTECTED]>: > > Exactly, thanks! Now, I was actually using SRFI-34's > `with-exception-handler', which I expected to behave like > `with-throw-handler'. Should we change `with-exception-handler' to use > `with-throw-handler' instead of `lazy-catch'? Yes, I thi

Re: `lazy-catch' and `dynamic-wind'

2008-11-23 Thread Ludovic Courtès
Hi Neil, "Neil Jerram" <[EMAIL PROTECTED]> writes: > This is as expected. Note that there is nothing like dynamic-wind > inside fluid-set! Did you perhaps mean with-fluids instead? If you > used with-fluids, I would expect the same behaviour as you've > descr

Re: `lazy-catch' and `dynamic-wind'

2008-11-23 Thread Neil Jerram
> (lazy-catch #t > (lambda () >(fluid-set! fl 'inside) >(throw 'foobar)) > (lambda (key . args) >(format #t "fluid = ~A~%" (fluid-ref fl)) >(exit 1))) > > =>

`lazy-catch' and `dynamic-wind'

2008-11-23 Thread Ludovic Courtès
(lazy-catch #t (lambda () (parameterize ((fl 'inside)) (throw 'foobar))) (lambda (key . args) (format #t "fluid = ~A~%" (fl)) (exit 1))) => PRINTS: fluid = outside This comes fro