> On Apr 20, 2017, at 4:06 PM, denisgolovan wrote:
>
> Another example is network-related code (both client and server code).
> Break your huge finite state machines into pipeline stages via coroutines and
> it gets pretty modular, extensive and simple to reason about.
Nicely encapsulated in t
On 20/04/17 09:00, Marco van de Voort wrote:
In our previous episode, Mark Morgan Lloyd said:> > I don't know. Such effort should
chiefly come from the people interested init I guess.> > Turning it around a little: are
there still FPC targets that don't have > threads? Having coroutines would a
20.04.2017, 11:43, "Ryan Joseph" :
>> On Apr 20, 2017, at 3:01 PM, Bernd Mueller wrote:
>>
>> it would be really nice to have coroutines for the embedded targets like
>> AVR and ARM.
>
> What are people using this for btw? Personally I wanted them to solve some
> problems in game programming w
On 20/04/17 08:30, Bernd Mueller wrote:
On 04/20/2017 09:40 AM, Mark Morgan Lloyd wrote:>> Turning it around a
little: are there still FPC targets that don't have> threads? Having
coroutines would allow a native thread mechanism to be> implemented,
without relying on the underlying OS.
it would b
> On Apr 20, 2017, at 3:01 PM, Bernd Mueller wrote:
>
> it would be really nice to have coroutines for the embedded targets like AVR
> and ARM.
What are people using this for btw? Personally I wanted them to solve some
problems in game programming where I lots of nested loops that need to be
In our previous episode, Mark Morgan Lloyd said:
> > I don't know. Such effort should chiefly come from the people interested
> > init I guess.
>
> Turning it around a little: are there still FPC targets that don't have
> threads? Having coroutines would allow a native thread mechanism to be
>
On Thu, 20 Apr 2017 07:40:44 +
Mark Morgan Lloyd wrote:
> Turning it around a little: are there still FPC targets that don't have
> threads?
Last month Karoly added one: WASM.
Mattias
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
ht
On 04/20/2017 09:40 AM, Mark Morgan Lloyd wrote:
Turning it around a little: are there still FPC targets that don't have
threads? Having coroutines would allow a native thread mechanism to be
implemented, without relying on the underlying OS.
it would be really nice to have coroutines for the
On 19/04/17 20:00, Marco van de Voort wrote:
In our previous episode, Daniel Gaspary said:> So..> > Any chance of an
Official implementation ?
I don't know. Such effort should chiefly come from the people interested init I
guess.
Turning it around a little: are there still FPC targets that do
In our previous episode, Daniel Gaspary said:
> So..
>
> Any chance of an Official implementation ?
I don't know. Such effort should chiefly come from the people interested in
it I guess.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http:
So..
Any chance of an Official implementation ?
On Wed, Apr 19, 2017 at 10:50 AM, Marco van de Voort wrote:
> In our previous episode, Ryan Joseph said:
>> > Your example is simply broken. A few points:
>>
>> Thanks for the description. Yeah, I assumed the stack would be restored but
>> that is
In our previous episode, Ryan Joseph said:
> > Your example is simply broken. A few points:
>
> Thanks for the description. Yeah, I assumed the stack would be restored but
> that isn?t the case apparently.
>
> I think the coroutine implementation in the link below tries to manage the
> stack fr
> On Apr 19, 2017, at 5:37 PM, Karoly Balogh (Charlie/SGR)
> wrote:
>
> Your example is simply broken. A few points:
Thanks for the description. Yeah, I assumed the stack would be restored but
that isn’t the case apparently.
I think the coroutine implementation in the link below tries to man
Hi,
On Wed, 19 Apr 2017, Ryan Joseph wrote:
> yes, I?d like to see that so I know why my example doesn?t work as I
> expected. Everything I?m hearing makes me think ?i? should keep
> incrementing after I call SetJmp and then return with JongJmp but
> there?s something I?m missing obviously.
Your
> On Apr 19, 2017, at 5:17 PM, Michael Van Canneyt
> wrote:
>
> It's a variable which the compiler does not put on the stack, it exists just
> in a register.
That kind of defeats the purpose then if you can’t rely on function scoped
variables to be restored. Maybe that’s what the code in the
On Wed, 19 Apr 2017, Ryan Joseph wrote:
On Apr 19, 2017, at 4:33 PM, Michael Van Canneyt wrote:
Your reasoning contains a wrong assumption, namely that I is on the stack.
If I is a register variable, then it is not on the stack, and will be reset
with each longjmp.
I thought all variabl
> On Apr 19, 2017, at 4:33 PM, Michael Van Canneyt
> wrote:
>
> Your reasoning contains a wrong assumption, namely that I is on the stack.
>
> If I is a register variable, then it is not on the stack, and will be reset
> with each longjmp.
I thought all variables declared inside a function (l
> On Apr 19, 2017, at 4:57 PM, Mark Morgan Lloyd
> wrote:
>
> SetJmp records the current state, LongJmp reverts to it. There's some
> common-sense limitations.
>
> I've got an example program of about 100 lines that would demonstrate what
> I've hacked together, I could tack it onto a messag
On 19/04/17 09:30, Ryan Joseph wrote:
On Apr 19, 2017, at 3:28 PM, Mark Morgan Lloyd
wrote:> > It is possible to partially-simulate coroutines with setjmp/longjmp, but
you need to store state outside the function. The key thing about coroutines, at least as
implemented by Wirth in Modula-2, i
On Wed, 19 Apr 2017, Sven Barth via fpc-pascal wrote:
Am 19.04.2017 11:26 schrieb "Ryan Joseph" :
On Apr 19, 2017, at 4:14 PM, Sven Barth via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:
Those functions simply store (setjmp) and restore (longjmp) register
values (and setjmp als
Am 19.04.2017 11:26 schrieb "Ryan Joseph" :
>
>
> > On Apr 19, 2017, at 4:14 PM, Sven Barth via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:
> >
> > Those functions simply store (setjmp) and restore (longjmp) register
values (and setjmp also returns the value passed to longjmp if it had bee
On Wed, 19 Apr 2017, Ryan Joseph wrote:
On Apr 19, 2017, at 4:14 PM, Sven Barth via fpc-pascal
wrote:
Those functions simply store (setjmp) and restore (longjmp) register values
(and setjmp also returns the value passed to longjmp if it had been reached by
a longjmp). Nothing more, noth
> On Apr 19, 2017, at 4:14 PM, Sven Barth via fpc-pascal
> wrote:
>
> Those functions simply store (setjmp) and restore (longjmp) register values
> (and setjmp also returns the value passed to longjmp if it had been reached
> by a longjmp). Nothing more, nothing less. So while the stack regis
Am 19.04.2017 06:35 schrieb "Ryan Joseph" :
>
>
> > On Apr 19, 2017, at 2:34 AM, Daniel Gaspary wrote:
> >
> > Using SetJmp and LongJmp?
> >
> > I believe some months ago it was a discussion on the list on why this
> > was not really the way to implement coroutines.
> >
> > Searching for longjmp/
> On Apr 19, 2017, at 3:28 PM, Mark Morgan Lloyd
> wrote:
>
> It is possible to partially-simulate coroutines with setjmp/longjmp, but you
> need to store state outside the function. The key thing about coroutines, at
> least as implemented by Wirth in Modula-2, is that you can transfer
> ar
On 19/04/17 05:00, Ryan Joseph wrote:
On Apr 19, 2017, at 2:34 AM, Daniel Gaspary wrote:> > Using SetJmp and
LongJmp?> > I believe some months ago it was a discussion on the list on why this> was not really
the way to implement coroutines.> > Searching for longjmp/setjmp you can find the thre
> On Apr 19, 2017, at 2:34 AM, Daniel Gaspary wrote:
>
> Using SetJmp and LongJmp?
>
> I believe some months ago it was a discussion on the list on why this
> was not really the way to implement coroutines.
>
> Searching for longjmp/setjmp you can find the thread, I guess.
I never heard of t
On Sat, Apr 15, 2017 at 6:20 AM, Ryan Joseph wrote:
> I was curious about possible ways coroutines could work in FPC and found this
> example that claims to implement just that. It appears to be designed for
> Windows though and makes use of a function called VirtualAlloc which I don’t
> unders
28 matches
Mail list logo