async await as basic paradigm - relation to delimited continuations ?
Hi everyone, I have been working on distributed programming for a while now, however I was away from python land, and didnt get into the twisted/tornado/asyncio train until few years ago. While writing asyncio code and exploring different abstract computing paradigm (my recent hobby seems to be exploring new ways to do computing), I recently discover curio. I read a few github issues, and although I do enjoy experiments, I am also aware of the need for mathematical fundations in order for a project to be able to compose between projects and groups of people and ultimately scale and persist. As well as finding its own roots to support an ecosystem. I was wondering if there was someone on this mailing list versed enough in maths and computer science who could see some kind of association/relation between async/await and delimited continuations... and hopefully fomalize it somehow ? As a side effect, this might give some improvement ideas to curio ... The way I see it so far, very rough and naive : - the event loop is "doing the work", that is a sequence of delimited continuations. - async/await denotes how the work to be done can be composed (wrapping functions that already could compose by themselves to add additional runtime semantics), - tasks are like delimited continuations, and they will be ordered at runtime to execute in a specific sequence. Or am I completely misleaded ? If we scale this up and "distribute" it (actor model style), one actor can match one event-loop, and there are probably many association to draw there, that could indicate for curio (or libraries using it) if it is sensible or not to completely identify the event_loop to a thread... As a broad overview : 1) imperative concepts can be implemented from functional/math concepts (haskell - do notation, relation with category theory) 2) functional concept are currently implemented with imperative languages ( scheme interpreters, haskell compiler, etc. ) 3) looking as async programming and functional/math concepts these days, I am wondering how these relate, and how far down goes the rabbit hole... Thanks a lot for sharing your views on this :-). -- AlexV
participants (1)
-
Asmodehn Shade