Been busy adding more docs & examples/snippets for the revamped https://thi.ng/csp package, the readme and core operators. Still more to come, but the most important parts & operations are covered now. Please gimme a shout if anything is unclear... I'm aware #CommunicatingSequentialProcesses is yet another fringe technique for many JS/TS devs, but that shouldn't make it any less interesting or elegant, especially these days where async features are fully supported everywhere and there's so much more than ye basic async/await patterns...

(The attached ping-pong example is taken from the updated readme, but barely scratches the surface of what's possible...)

#ThingUmbrella #CSP #CommunicatingSequentialProcesses #Async #OpenSource #Documentation #TypeScript #JavaScript

ES6 promise based CSP primitives & operations

thi.ng
Process algebra and JSONPath descendant segment semantics

One question the JSONPath Working Group had to wrestle with in specifying RFC 9535 was how much non-determinism to allow in the semantics...

underlap

After some friendly inquiry by @computersandblues, I spent a few hours today adding basic CSP (#CommunicatingSequentialProcesses) primitives for https://thi.ng/fibers and writing some preliminary documentation. I'm amazed how simple (and easy!) it was this time around (compared to https://thi.ng/csp) and it's giving me big hopes for the fiber based approach in general...

Readme section:
https://github.com/thi-ng/umbrella/blob/develop/packages/fibers/README.md#csp-primitives-communicating-sequential-processes

2-channel ping/pong example:
https://github.com/thi-ng/umbrella/blob/develop/packages/fibers/README.md#csp-pingpong-example

Source code & doc strings:
https://github.com/thi-ng/umbrella/blob/develop/packages/fibers/src/csp.ts

#ThingUmbrella #TypeScript #Coroutines #CSP #CooperativeMultitasking