Stuck with simple patching

does VL count? :)

elektromeiers plugin is very short in code, it was interesting to re-code it in VL to see how short one can express the same in a visual language. here an interesting new feature of the Loop called ‘Alive’ was used to filter out invalid combinations.

anyone knows other old and complicated patching threads?

if your interested, needs latest alpha of course: (15.9 kB)

Hello tonfilm,

could you please explain how the output values are generated?
I understand that values are sent to Contains HashSet, and if both are not already contained, then they are sent to Add HashSet (this operation is ruled by Add’s Enabled pin); but how Add influences the content of Item and Item 2’s output? Is it because they share the same type?
Please consider that I’m literally fighting to create another foreach loop that accepts as input Input and Input 2, so please be patient.
A few words about Alive would be great, too.

Thank you.

I was so determined to patch this that I spent a not insignificant amount of time before node.
I ended up with needing an obscene amount of swapdims and the likes and it just exploded in complexity, but I think it is possible… I would have loved to have gotten that huge drink at NODE, but I failed.

the For Each runs for all slices of the two inputs and the ‘Alive’ pad in the loop decides whether the slice of the current iteration will be in the output or not. its very similar to a Select node or the Where method in C#. By default it is invisible and always true, so all iterations of the loop will generate one slice of the output spread.

in this example it is only true if none of the input items of this iteration was found in the ‘Used List’.

you can create an ‘Alive’ pad by creating an output or accumulator writer and then click on replace->Alive in the context menu.

yeah this is the perfect example for vl, its possible in vvvv(see patch) but not without framedelay.
btw: is the triangle in the foreach-region a field? why it is not a dot? whats the difference to the dots?

first combination from list.v4p (51.3 kB)

the triangle is called accumulator, which is something like an internal field of the loop, you can input an initial value like the Empty (HashSet) in this case and then access it and modify it in each iteration of the loop. the final value is then available at the output.

your solution unfortunately still does not work with any combination.

Your solution:

VL + elektromeier solution:

Anyway, I’d say that a way to achieve this is to dynamically create groups of nodes performing determined tasks through SetPatch. This would probably avoid the framedelay.


Ok, it’s the Alive feature. Thanks.
Note to myself: the visual part of VL is more like an “helper” then an accurate definition of the logic, as opposed to vvvv.