Max Graey

Results 346 comments of Max Graey

Btw I tried do the same for `StringArray.concat` but due to some issue with inferring it seems we should delay this change: ``` ERROR TS2322: Type '~lib/array/Array' is not assignable...

It should be `valueof` becouse `T` defined in `foo` scope and doesn't visible globally. See [typescript playground](https://www.typescriptlang.org/play?#code/C4TwDgpgBAbghgGwK4QPYDMA8AVKEAewEAdgCYDOUAggE41wgAyAlgNYSZLGvGoDuxAHyCoAXijYA2gAYAugCh56LgGNgzVMSjpUqHLRp5CJCtToMW7TMSQBbAEYQawgBRw6ALgkGAlF-jIaFjYBiIA3vJQUVCgkBJisIgoGPp0ggDckdEIEMB4ObYkwF644u40MrKZ0VA0uUg0WhAFRZkAvorKxGoaWuhwzAiphgREZJQGFmwcNg5OruUlviVQETWx0KWJgSkhadXZufkQhcTF8WV0lQdRdcANTS1n7UA)

In AS malloc/free doesn't controlled by host. All memory jobs happening in WebAssembly linear memory. Wasm only can request more memory pages (`mamory.grow`) and check current number of pages (`memory.size`)....

I would like to generalize the message in such a way as to have only one error code. Thought?

I wonder is it open possibilities for doing some ARC early optimizations as well? Or this require Escape Analysis?

Interesting article about stateless and stateful (fiber) coroutines: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p1364r0.pdf

For async / await which import / export to/from host we could use binaryen's Asyncify, but for internal async / awayt just generate stateless coroutines or generators via FSM approach...

For host side I saw only [this wrapper](https://github.com/GoogleChromeLabs/asyncify). In general, you might be inspired [this blog post](https://kripken.github.io/blog/wasm/2019/07/16/asyncify.html) probably

~~`co_await`~~ `spawn` + `yield_context` from boost's asio is stackful coroutines which required to explicit handle stack which not possible in WebAssembly without [stack switch proposal](https://github.com/WebAssembly/stack-switching/blob/main/proposals/stack-switching/Overview.md) or some kind of emulation...

> Isn't co_await part of C++20 coroutines? Not sure I understand. I updated prev comment. I ment routines from `asio` like `spawn` and etc. `co_await`, `co_yield` and etc it's C++20...