Re: Coroutines

2006-06-19 Thread Ross Ridge
Ross Ridge wrote: >Hmm? I don't see how the "Lua-style" coroutines you're looking are any >lightweight than what Maurizio Vitale is looking for. They're actually >more heavyweight because you need to implement some method of returning >values to the "coroutine" being yeilded to. Dustin Laurence

Re: Coroutines

2006-06-18 Thread Dustin Laurence
On Sun, Jun 18, 2006 at 11:10:14PM -0400, Ross Ridge wrote: > Dustin Laurence wrote: > >Yeah, though even that is more heavyweight than coroutines, so your job > >is harder than mine. > > Hmm? I don't see how the "Lua-style" coroutines you're looking are any > lightweight than what Maurizio Vita

Re: Coroutines

2006-06-18 Thread Ross Ridge
Maurizio Vitale wrote: > I'm looking at the very same problem, hoping to get very lightweight > user-level threads for use in discrete event simulation. Dustin Laurence wrote: >Yeah, though even that is more heavyweight than coroutines, so your job >is harder than mine. Hmm? I don't see how th

Re: Coroutines

2006-06-18 Thread Dustin Laurence
On Sat, Jun 17, 2006 at 09:50:29AM -0400, Maurizio Vitale wrote: > I'm looking at the very same problem, hoping to get very lightweight > user-level threads for use in discrete event simulation. Yeah, though even that is more heavyweight than coroutines, so your job is harder than mine. On the

Re: Coroutines

2006-06-17 Thread Maurizio Vitale
I'm looking at the very same problem, hoping to get very lightweight user-level threads for use in discrete event simulation. It would be very nice if it was possible to write an inlined piece of assembler that saved the program counter and the stack pointer and then be able to say to GCC t

Re: Coroutines

2006-06-17 Thread Gabriel Dos Reis
Andrew Haley <[EMAIL PROTECTED]> writes: | Dustin Laurence writes: | > On Fri, Jun 16, 2006 at 02:05:13PM -0700, Mike Stump wrote: | > | > > If every language were going to have the feature, then, moving it | > > down into the mid-end or back-end might make sense, but I don't think | > >

Re: Coroutines

2006-06-17 Thread Andrew Haley
Dustin Laurence writes: > On Fri, Jun 16, 2006 at 02:05:13PM -0700, Mike Stump wrote: > > > If every language were going to have the feature, then, moving it > > down into the mid-end or back-end might make sense, but I don't think > > it does in this case. > > Personally, I'd like, an

Re: Coroutines

2006-06-16 Thread Dustin Laurence
On Fri, Jun 16, 2006 at 05:34:41PM -0500, David Nicol wrote: > On 6/16/06, Dustin Laurence <[EMAIL PROTECTED]> wrote: > >... > >is. :-) OTOH if it is possible I'd consider trying to write it, if my > >GCC-fu ever reaches the requisite level (my rank is somewhere below > >"pale piece of pigs ear"

Re: Coroutines

2006-06-16 Thread Dustin Laurence
On Fri, Jun 16, 2006 at 02:05:13PM -0700, Mike Stump wrote: > On Jun 16, 2006, at 1:41 PM, Dustin Laurence wrote: > >I'm pretty sure this is stepping into deep quicksand > > No, just hard work. It is only quicksand, if you start, but never > finish. It's quicksand if it turns out to vastly exc

Re: Coroutines

2006-06-16 Thread Geoffrey Keating
Dustin Laurence <[EMAIL PROTECTED]> writes: > I'm pretty sure this is stepping into deep quicksand, but I'll ask > anyway...I'm interested in writing an FE for a language that has > stackable coroutines (Lua-style, where you can yield and resume > arbitrarily far down the call stack). I'm trying

Re: Coroutines

2006-06-16 Thread David Nicol
On 6/16/06, Dustin Laurence <[EMAIL PROTECTED]> wrote: I'm pretty sure this is stepping into deep quicksand, but I'll ask anyway...I'm interested in writing an FE for a language that has stackable coroutines (Lua-style, where you can yield and resume arbitrarily far down the call stack). I'm try

Re: Coroutines

2006-06-16 Thread Mike Stump
On Jun 16, 2006, at 1:41 PM, Dustin Laurence wrote: I'm pretty sure this is stepping into deep quicksand No, just hard work. It is only quicksand, if you start, but never finish. The mechanism I might favor would be to handle all the fun inside the language front end. Objective-C does t