Hacker News new | ask | show | jobs
by nakkaya 3232 days ago
Author here. Did not knew about Céu till now, just watched the intro video. I maintain a behaviour tree [1] library called alter-ego [2] (code needs cleanup) which already contains some of the constructs. In behaviour tree terms par/or is parallel selector and watching is a interrupter node. [3] So it can be done in Ferret on a general purpose PC using C++11 concurrency constructs, for embedded targets it will require co-operative multitasking which is on the roadmap.

[1] https://nakkaya.com/2010/06/29/alter-ego-a-reactive-ai-libra... [2] https://github.com/nakkaya/alter-ego [3] http://aigamedev.com/open/article/parallel/

1 comments

> In behaviour tree terms par/or is parallel selector and watching is a interrupter node.

I see the resemblance, but I'm not sure if that's a perfectly right analogue. The description in your third link says the parallel code truly runs in parallel. However, Céu is concurrent but not parallel, making the concurrent code deterministic and easy to reason about: if multiple blocks in a par/-- construct await on the same event, they will execute in lexical order (which is similar to the behaviour described in the first link).

For real parallelism, you'd basically have to have multiple Céu programs (devices) communicate through external inputs/outputs.

I guess the real question I'm asking is whether the library follows the model of a synchronous programming language.

https://en.wikipedia.org/wiki/Synchronous_programming_langua...

BTW, the intro video is very outdated: on top of the basic par/--- and await construct, the "organism" is replaced with cleaner code/tight and code/await forms to create more complex abstractions:

http://fsantanna.github.io/ceu/out/manual/v0.20/statements/#...