nevalang / neva

🌊 Dataflow programming language with static types and implicit parallelism. Compiles to machine code and Go
https://nevalang.org
MIT License
130 stars 8 forks source link

Sub-stream adapters #69

Closed emil14 closed 2 years ago

emil14 commented 2 years ago

Is it possible to have an "adapter" that is able to transform e.g. sub-stream to array-ports or batch-structures?

emil14 commented 2 years ago

To sub-stream

It's not clear how (and is it even possible) to translate sub-streams to array-ports, but it's possible vice versa

Array-port to sub-stream

Send 'opened bracket' message to sub-stream when first slot gets message and then send that message itself. When last slot gets message send that message and then send 'closed bracket' message.

Nesting

There are nested sub-streams in FBP but no nested array-ports. Possible solutions:

Batch-based structures to sub-streams

It's not as bad as it may seem to call them "batch-based" structures. Lists, structs and dicts are also may be translated to sub-streams.

TODO think about list/dict/struct to substream adapter