vvvv / VL-Language

The official repo for the design of the VL programming language
31 stars 0 forks source link

[Proposal] Make use of the Fabric of 2d Space #16

Closed gregsn closed 4 years ago

gregsn commented 4 years ago

Alright. I have to admit that the headline is clickbait. I needed to somehow make the quest #15 sound more complicated and the proposal more genius. While it isn't.

The proposal is simple:

That way we don't have to rely on new ways of expression (e.g. execution order links #17). If we'd introduce those explicit ordering helpers, we'd still need to tell the user that the execution order is undefined for the case that you don't use those explicit ordering constructs.

Undefined doesn't mean random

(and "undefined" probably currently means that nodes get preferred that got added to the patch earlier; which is like saying: it is not defined, but deterministic, and yes, it is determined in some non-visual way.)

Positioning + data-flow = implicit execution order links

We should end up with one perfectly defined order. We now could offer a patch editor option that visualizes the found ordering via arrows. And these are implicit execution order links. In a more advanced proposal, you'd be able to pin those and make them explicit (#17). And by that be able to freely move nodes around and be sure that the execution order stays the same as it is now.

In another mode, we could only show those implicit execution order links that stem from positioning. (Reasoning here: the dataflow dependencies already are visualized via lines).

Easy to understand

Critique: too Fragile when refactoring?

I will give you the opportunity to fill out this section. I am just too happy with the intrinsic properties of 2d space.

Doesn't contradict other approaches

As shown above we could come up with explicit execution order links later on and combine it with this approach.

The language and the UI don't have to be changed

We just change the specification and probably 12 lines in the code.

TODO

gregsn commented 4 years ago

Cons:

gregsn commented 4 years ago
this will turn into this
image image

according to the specification. That doesn't sound too clever with regards to minimizing the amount of EOLs... :(

gregsn commented 4 years ago

It also doesn't sound too clever regarding the use of CPU caches. Both branches (left/right) might operate on more complex data than in this stupid example and by that come with the need to access certain data on the heap. Typically switching between unrelated computations doesn't sound like a good default ordering idea for when no explicit hints got placed by the user.

gregsn commented 4 years ago

this is a too bold proposal. it leaves the compiler no choice but to order the calls in a potentially inefficient way.