Closed emil14 closed 5 months ago
The most generic form of +
would be array inport that accepts sub-streams. This way we can some sub-streams from several places. This is also more complicated and there's still a question whether we want to be able to work with non-sub-stream elements at the same time
To continue https://github.com/nevalang/nevalang/issues/281#issuecomment-1517282027
This (in theory) would allow to "sum all items from this sub-stream plus this non-sub-stream regular number coming from second array inport slot". There are questions ofc:
See #285
We have task for stdlib design and I don't see a reason to keep this issue open
I was thinking on https://github.com/nevalang/nevalang/discussions/280 and turns out it's not clear how to implement components that must be aware of sub-streams. Let's think of
*
component that multiplies numbers. There's several approaches to achieve that:vec
for every task and b) not FBP way (vectors is "batch" processing). Note: we omit "regular inport with array type" (not to be confused with "array inport") as they have same problem of "staticness" like array-inport)Looks like no.4 is the best (and idiomatic) solution but there are some questions.
What if I have a substream and I want (without breaking its structure) multiply its every element by 2? Not "multiply all of them from left to right and then multiply by 2" but just operate on every sub-stream item (which is BTW usual and important thing) and pass it further? Does FBP bible has the answer? Can we ask GPT?
Note that this question is crucial for stdlib implementation but not the compiler/runtime itself