Re: undo()?

2004-07-03 Thread Jonadab the Unsightly One
Juerd [EMAIL PROTECTED] writes: I thought temp replaced local. temp is dynamic scoping, the same thing as Perl5's local. Hypotheticals are the ones that turn permanent if everything succeeds according to plan but revert to the old value if stuff fails -- a rollback mechanism, basically. I

Re: undo()?

2004-07-03 Thread Jonadab the Unsightly One
Brent 'Dax' Royal-Gordon [EMAIL PROTECTED] writes: Actually, I think you're underestimating the little guys. After all, if they rolled back *all* of your changes, all they could do was repeatedly execute the same code! Except that you can pass the continuation some arguments, possibly

Re: undo()?

2004-07-03 Thread Jonadab the Unsightly One
Luke Palmer [EMAIL PROTECTED] writes: Oh no! Someone doesn't understand continuations! How could this happen?! :-) Yes, well, I've only just started reading up on them recently... A continuation doesn't save data. It's just a closure that closes over the execution stack Ah. That helps

Re: undo()?

2004-07-02 Thread Brent 'Dax' Royal-Gordon
Rod Adams wrote: Well, that's another explanation that jives with my understanding of them. But I still don't have an idea of when I would actually want to use them in something I'm writing. You can use them to implement all sorts of interesting control flow constructs. For example, here's

Re: undo()?

2004-07-01 Thread David Storrs
On Tue, Jun 29, 2004 at 05:31:29PM -0600, Luke Palmer wrote: Oh no! Someone doesn't understand continuations! How could this happen?! :-) You need two things to bring the state of the process back to an earlier state: undo and continuations. People say continuations are like time

Re: undo()?

2004-07-01 Thread Michele Dondi
On Tue, 29 Jun 2004, Jonadab the Unsightly One wrote: If we have $foo.undo(), then we will want a multi-step undo to go with it, probably $foo.undo($n), with $n able to be negative for redo. Are Definitely! I didn't add that to the point that it wuld have been obvious, and I wanted to keep

Re: undo()?

2004-07-01 Thread Brent 'Dax' Royal-Gordon
David Storrs wrote: Well, at least that's a nice simple explanation. Why couldn't anyone have explained it to me that way before? Unfortunately, it means that continuations are a lot less useful than I thought they were. : Actually, I think you're underestimating the little guys. After all, if

Re: undo()?

2004-07-01 Thread Rod Adams
Brent 'Dax' Royal-Gordon wrote: David Storrs wrote: Well, at least that's a nice simple explanation. Why couldn't anyone have explained it to me that way before? Unfortunately, it means that continuations are a lot less useful than I thought they were. : Actually, I think you're

Re: undo()?

2004-07-01 Thread Austin Hastings
--- Rod Adams [EMAIL PROTECTED] wrote: A guess from my current understanding: You're wanting to play with a database. You take a continuation. You see if have a database handle open and good to go, if so you do your thing. (can you then dismiss the continuation? do uninvoked

Re: undo()?

2004-07-01 Thread JOSEPH RYAN
- Original Message - From: Luke Palmer [EMAIL PROTECTED] Date: Tuesday, June 29, 2004 7:31 pm Subject: Re: undo()? Oh no! Someone doesn't understand continuations! How could this happen?! :-) You need two things to bring the state of the process back to an earlierstate: undo

Re: undo()?

2004-07-01 Thread Rod Adams
Austin Hastings wrote: --- Rod Adams [EMAIL PROTECTED] wrote: A guess from my current understanding: You're wanting to play with a database. You take a continuation. You see if have a database handle open and good to go, if so you do your thing. (can you then dismiss the continuation? do

Re: undo()?

2004-06-29 Thread Rafael Garcia-Suarez
Michele Dondi wrote: I must say I've still not read all apocalypses, and OTOH I suspect that this could be done more or less easily with a custom function (provided that variables will have a method to keep track of their history, or, more reasonably, will be *allowed* to have it), but I

Re: undo()?

2004-06-29 Thread Mark A. Biggar
Rafael Garcia-Suarez wrote: Michele Dondi wrote: I must say I've still not read all apocalypses, and OTOH I suspect that this could be done more or less easily with a custom function (provided that variables will have a method to keep track of their history, or, more reasonably, will be *allowed*

Re: undo()?

2004-06-29 Thread Juerd
Mark A. Biggar skribis 2004-06-29 9:07 (-0700): Besides we already have MTOWTDI with local() and hypotheticals. I thought temp replaced local. If not, how do they differ? (is temp for lexicals, local for globals (and why would that make sense?)) Juerd

Re: undo()?

2004-06-29 Thread mark . a . biggar
Sorry I did mean temp. -- Mark Biggar [EMAIL PROTECTED] -- Original message -- Mark A. Biggar skribis 2004-06-29 9:07 (-0700): Besides we already have MTOWTDI with local() and hypotheticals. I thought temp replaced local. If not, how do they differ? (is temp

Re: undo()?

2004-06-29 Thread Michele Dondi
On Tue, 29 Jun 2004, Rafael Garcia-Suarez wrote: Difficulties: define history of a function w.r.t. threads; closures; and system side-effects (writing to files, locking them etc.) On Tue, 29 Jun 2004, Mark A. Biggar wrote: Besides we already have MTOWTDI with local() and hypotheticals.

Re: undo()?

2004-06-29 Thread Jonadab the Unsightly One
Michele Dondi [EMAIL PROTECTED] writes: I must say I've still not read all apocalypses, and OTOH I suspect that this could be done more or less easily with a custom function (provided that variables will have a method to keep track of their history, or, more reasonably, will be *allowed* to

Re: undo()?

2004-06-29 Thread Luke Palmer
Jonadab the Unsightly One writes: Michele Dondi [EMAIL PROTECTED] writes: I must say I've still not read all apocalypses, and OTOH I suspect that this could be done more or less easily with a custom function (provided that variables will have a method to keep track of their history, or,

Re: undo()?

2004-06-29 Thread Luke Palmer
Michele Dondi writes: On Tue, 29 Jun 2004, Rafael Garcia-Suarez wrote: Difficulties: define history of a function w.r.t. threads; closures; and system side-effects (writing to files, locking them etc.) On Tue, 29 Jun 2004, Mark A. Biggar wrote: Besides we already have MTOWTDI