These are chat archives for ChaiScript/ChaiScript

22nd
Oct 2015
Jason Turner
@lefticus
Oct 22 2015 01:43
@hia3 my current thought process is basically to wait until coroutines are officially a part of C++ then use that support...
hia3
@hia3
Oct 22 2015 15:13
@lefticus I see, ChaiScript has no external dependencies, so it could be hard to do without std suppot. But if they are going to add only stackless coroutines (proposed by Gor Nishanov) then... I can't stop laughing. Microsoft tried to convince developers to return HRESULT everywhere. Now they want us to return task<>. This is not going to work - my poor function has to have only one result type. :smile:
Jason Turner
@lefticus
Oct 22 2015 17:10
I still need to watch Gor's talk. I missed it at cppcon because I was giving my own at that time
hia3
@hia3
Oct 22 2015 17:12
I've seen your awesome talk at youtube :+1:
Jason Turner
@lefticus
Oct 22 2015 17:16
I did a talk on ChaiScript, I wish that one had been recorded, but it was not
Jason Turner
@lefticus
Oct 22 2015 17:24
I have tried to figure out how to save and restore the current execution stack in ChaiScript to implement coroutines but I didn't quite figure it all out.
hia3
@hia3
Oct 22 2015 17:35
Gor's talk might be misleading for people unfamiliar with coroutines. He is saying "coroutine" when he is actually have to say "stackless coroutine". They are not composable with existing code (for example, if you have C++ code calling C code calling C++ code - you can't use them in a lower level). Stackful coroutines on the other hand can be used in any software layer.
Jason Turner
@lefticus
Oct 22 2015 17:39
So, did you see the proposal for a continuation idea I put on the discourse site? https://gist.github.com/lefticus/0358b6450cc994c71c70 basically providing some syntactic sugar to help the programmer return a function that contains the next state they want to execute?