December 31, 2020
On Sunday, 13 December 2020 at 15:49:47 UTC, Paulo Pinto wrote:
> On Sunday, 13 December 2020 at 15:18:53 UTC, Sebastiaan Koppe
>> If we do want coroutines, we should just steal it all, it is pretty great work.
>
> If you want to bring that into D I advise many of the great talks done by Gor Nishanov, one of the main contributors to the co-routines design, for example
>
> “C++ Coroutines: Under the covers"
>
> https://www.youtube.com/watch?v=8C8NnE1Dg4A

Thanks, I will take a look.

I recently went down the rabbit hole of some C++ proposals around senders/receivers and cancellation of async tasks. They have some really good ideas. Most of them I am reusing for work. It really all comes together: IO, async, cancellation, nursery, structured concurrency, streams, etc. There are plenty of different approaches in various languages. It would be good to do a thorough review of the landscape and look at how those concepts could be implemented in D, and pick the one that naturally fits the language.

D is really lagging in this respect. It has fibers, but they generally use too many resources and aren't portable to platforms like WebAssembly.

I really wish I had more time, but I need to finish stuff I started.
January 04, 2021
On Monday, 14 December 2020 at 01:04:26 UTC, Ola Fosheim Grostad wrote:
> On Sunday, 13 December 2020 at 16:17:32 UTC, IGotD- wrote:
>> On Sunday, 13 December 2020 at 09:55:29 UTC, Ola Fosheim Grostad wrote:
>>>
>>> It should be possible on MIPS, which doesn't use a stack...
>>
>> All general purpose CPUs have stacks one way or the other so I'm not sure what you mean that MIPS doesn't use a stack.
>
> By design, RISCish activation frames.  Basically a linked list IIRC.
>
> Very common in high level runtimes too. Allows for massive concurrency.

Hm, tried to look for it now, but didn't find anything on it for MIPS. Might have been another architecture, but probably not worth it with caches that came in the 90s and then 64-bit.

Anyway, the basic idea is that you don't require a contiguous stack, so that you can have many threads without running into address space problems. So, useful for simulations, but also for the ability to detach a computation from one thread and sending it to another one.


1 2
Next ›   Last »