Would you please port this to VL?

Could anyone please port the attached patch to VL?
It’s some text, with substituted chars, separated by space and finally passed to a getslice, whose indices are a spread (in a step fashion) of integers.
You can begin at any point (ie after separate). Also suggest a better way to do things vvvv-way.
I find upsetting* that there are so few threads about doing simple stuff with VL.
Simple stuff would be a nice starter, no? For everybody, no?
Thank you.

PleasePortThisToVL.zip (1.6 KB)
Solution to this porting

*as in wtf I can’t get around this vl thing. wtfiwwm. I’ll never catch up with the others. What have I become? Etc.

##If you ask for a port, it will be linked on this first post, as well as its porting. If you can, please give the patch a significative name.

1 Like

Agreed, people need to see how these implementations can be done. i thik asking questions like this are exactly how to educate people about these paterns.

That said, they need to be fairly succincty described problems, as this one is.

In the ase of the example above it ws useful that you could demonstrate what you wanted from VL, so it made it easy for me to create the solution.

I remember with 4v thinking that I’m going to have to learn what every single node is doing to be able to use it. I got past that feeling but it returned again with VL, and I certainly felt a lot of frustration and actual embarassment having to ask devs how to do simple things when that I could knock together in no time in vvvv.

The learning curve is probably a bit steeper because the language is more flexible, including concepts like pads and delgates, and its alittle hard to debug things at times. But its an interesting language. Keep asking questions about it.

What to say? Thank you… you also seem to have caught the “spirit” of this thread!
I have just one question, though: did I post a picture?

This recalls that tale of the ragman sniffing and smelling outside the king’s kitchens, enjoying the dream of a wonderful lunch. The king passes by, sees the man and asks him money for he was smelling the king’s food fragrances. The ragman takes a coin, it makes it bounce on a small wall and says: “I got the smell of your food, you get the sound of my money”. He laughed, the king laughed, everybody laughed.

But I'm not laughing.

I didn’t post a surrogate of a patch. I gave a full fledged patch. I want a patch.

No, seriously. ;)



I hear, you, but I posted a picture because it was the easiest way for people who don’t want run vvvv and the patch to see the patching pattern.

In a thread it annoys me when I have to download and look for relavent part of the patch that I only want to read it to understand. Sometimes it isn’t that easy to explain something more complicated, and you need to see how the parts fit together.

The other thing is that the act of building the patch myself gives me an inherent understanding of how people do things. If its already done for me, its kind of harder to learn.

So in future I’ll do both. PortMe.zip

Ok, thank you. I’ll make the digging this evening.

I get it, but…

… the point of this thread, which I warmly invite others to join, is to post something more than a snippet, or better, a few snippets joined together so that getslicing something with a target result is better than doing it just for the sake of doing it. Also it would prevent browsing the patch just to find the culprit. It’s easy, it’s there in the middle of the patch.

Yep, definitely. But don’t worry. I’m struggling to make another small rectangular box as “Result”, from the same Spread diamond. All in all, everything smells like success, here.

It is probably the best approach.

Thank you again, have a nice life!

@joreg thank you for tagging the thread. Still doing it the old way: if it’s in title, no need to tag it with it.

@guest Soooo… Do you know that I now understand why a patch it’s not so much of use? Because actually, unlike with vvvv, you can’t get any sort of hint and tips right\double\smash clicking nodes. But you need to understand this, feel it under your skin, while blank-staring at the full moon because your beer doesn’t taste as it any longer and reevaluating life choices, by doing it yourself for the very first time.
Anyway, leaving some stuff to fix as the starting index for the step spread, gives newbies chances to understand better, as one might think, where should I put a +. OMG. You can add pins by [CTRL,+]. OMG.
(As I saw that 4, I thought, “Here we go. Now we also get arrays starting at 1… Very good choice devvvvs, very good choice…” I was already in panic!)

VL, patching wise, does not work like regular vvvv, which is far more “relaxed”. In vvvv you can “take care of stuff later”, not in VL. This is good, because you must know what you want to do in advance, you’re not going to patch your way out of the issue along the road. Like a real adult.
Let me have a lollipop, before I can go on.
I wrote, iirc, gregsn to keep VL playful; his answer was a very elegant version of “that’s not going to happen” (I discovered today).
I already need another one, sigh.

Anyway, in the patch you gave us, there a couple more thingies I wasn’t able to fully understand (because the rest, instead…). That stringSpread: Spread <String> which is kind of a recursive stuff, since top and bottom holds the same value. @all, what’s that?

That step spread way that you found needs more operations. See picture (in which I think I replicated the logic in your patch: just try to change start position). Starts from 2 and keeps adding 7. Am I missing something?

no good, because then we cannot filter for it. if you tag it, we get this nice list: https://discourse.vvvv.org/tags/vl

Yup, just updated my routines.

Also could you please explain why I need those stringSpread n and out the if to actually make the vl bit to work? The if surrounds the picture above from guest.

If its not playful, not easier, and requires you to learn all the concepts of code design, should we just learn to code rather than learn a specific unfinished, undocumented tool? Maybe thats a little harsh, but you are asking us to invest a lot of time in learning an unproven tool created to fix some issues in the original design of vvvv. So far, the idea of importing dll’s easily does sound good, but so far, I would have preferred a way to separate sub patches to run unsynced in a separate thread without having to run multiple vvvv instances. Or integrated media playback on multiple outputs out of the box, you know given thats it a multimedia tool kit…
Dev’s you really need to start on the help patches with description of why things do what in the patches, explain and reexplain everytime what the various code-y concepts that you use are (because patchers aren’t necessarily coders, and there is some leet language involved)

PortMe2.zip (6.8 KB)
attached is a slightly simplified version of the splitting. please compare…

regarding the StringSpread: it acts as a kind of S+H. read:

  • If any of the inputs is changed, the IF region is executed. its output is stored in the StringSpread pad (the lower one).
  • If the IF region is not executed, the last spread that was stored in StringSpread will be returned unchanged. ie the upper StringSpread pad is read, bypassing the IF region, and again stored in the lower pad.

It seems I raised quite the carpet.
What follows can’t be but my 0.000000002 cents.
What I read (because of my ineptitude, for starters) that VL is capable of, is something that was absolutely needed in vvvv. I remember this thread in which a very specific operation couldn’ t be achieved if not via c#; no way to do that with existing nodes. With vl that could be instead done, inside a graphical environment.

That said, a whole new coding language (because this is what vl is), it’s quite the target.
If you read above, an IF statement, needs a sort of S+H in order to output something. No pads, no party (quite the opposite of what would commonly happen in real life); no output, no anything.
Now either that’s a sort of a default value, or anything deeply bound to bones of vl, users honestly shouldn’t manually create these elements, not like this. It makes little to no sense. This goes in the opposite direction of what vvvv has always done (facing you with your poor coding choices immediately), adds two mandatory operations, it visually adds up to the actual outlet.
Now, I’m not asking for a way so that the IF understands if it’s managing an int or a string, and manages to create automatically these elements (this seems to me the “problem”), but it wouldn’t be bad that they would at least have a different symbol they refer to. In other words, the top pad sits alone (literally two linked points), the bottom one shares a diamond with outlet and proceeds toward its twin pad. Why?
It’s actually quite difficult to understand such a design (for me). They are both required, they must be manually created, they must have the same name, they seem to be part of a single operation, yet they sit in two different contexts, they don’t explain the user what really is going on, doing a thing that’s not that immediate to get, if you want to further process data you can use IF outlet, …
Is there any example from any other language in which is required to pass, twice, (what at all effects are) its own results to an IF, in order to have it to return data?
Isn’t this a bit overconstructed? It’s like low level and high level stuff coexist on the same plane, it’s a bit weird.

Just trying to give positive critics.

A fully operating vl it’s an immensely powerful tool. So keep on: I’ll post another snippet in the future to see it ported to vl.

if i understand you correctly, you’re asking why IF doesn’t do the S+H automatically, right? you’re asking why do you have to create those 2 pads manually to achieve the S+H effect?!

the answer to this question:
because the IF doesn’t care. there are many cases where you just want the IF without it doing an S+H. in this case storing the last computed value makes sense, so you can do it using those two pads. or you can use an actual S+H if you prefer, like so:


we can do that in vl already. there is an example here: girlpower\VL_Experimental\Async please start a new thread with your usecase so we can have a look at it.

Not exactly. I’m asking why, without the two pads, which must have the same names, nothing is returned to “root” patch (or why I need to set and hold values).
The “result” outlet is just a graphical hint, with the only scope to create a pin usable in vvvv?

Edit: it may also seem everything really obvious to you, but that’s not the case for a few people, like me.

ah! the answer to that is:
removing the StringSpread pads still leaves you with the inputs and outputs ♦ on the IF region. and the input ♦ in that case, that then has nothing connected is responsible to return “nothing” in case the IF is not executed. see?

This is an output pin. it shows up in vvvv or other vl patches.

Would you please rephrase that? I can’t get everything. Thank you.

IF not executed? Mh… Why it should not be executed? Are we talking about async stuff? The whole pads ting, is about managing that?

my bad use of wording: the IF is indeed always executed of course (no async stuff, nono!). i mean basically the ELSE case. so if IF is true, the nodes inside the IF region are being executed, ELSE the input ♦ is passed through to the output ♦ unchanged.

some more on the IF region:

it took us 2 iterations to come up with the current design of the IF. the challenge here is to not optimize the region for one specific use case but for all possible use cases in the data flow context of VL.

for example, it needs to work in patches that cannot hold state, so giving the IF a data field to store something is not an option unless we would make two versions of it (hell no!). so consider this example:

no input/output needed at all.

or this:

automatic S+H would totally annoy you here, because you want to decide yourself what should be the output value in the ELSE case…

and regarding the diamonds, you only have to create one, the corresponding other will automatically created for you, easy. also, making a pad is only a shift+click after starting a link… so interaction wise also very fast. you just have to learn it once.

so as you can see, its the best and most general way to design an IF in a data flow context. only thing that is missing is patching the ELSE case. but we have ideas for that already.

bonus: you can also just patch your personal IF region with s+h inside on your own, if that is your 99% use case:

and use it like that:

if that doesn’t impress you… i don’t know what else would :)

All of this is interesting, so I’ll keep annoying.

Let’s start from the end:

So this is clear, now.

(italic bold are mine) Eh, too many scenarios to figure out… Practical case? Something in girlpower?

This hold state concept… Ok. I removed pads from these vl examples posted here. If I link a true bool on top of IF, I get, indeed, the result out. From your POV it makes sense. I still don’t know why, tho.
I… it’s just that’s not present here in the usual patching flow, so I’m trying to figure out what problem would solve to me, or chances would open, for that matter.

Thank you.

Echoing what @catweasel and @h99 are saying, VL is a language that needs more visual references to learn from, and more example of how to do things…Some small, some big. And they need to be animated.

The videos were a good resource for picking these details up in the first off. The gifs in the dev blogs were useful to understand how to use the language too. I thing that for a visual language the text of The Graybook needs visual embelishing, preferably in gifs or tiny vids.

It may mean that a different form of documenting is needed from your typical microsoft database. What do the Devs have in mind? Something embedded like vvvv? Some easy way to make video clips built into VL and easy to propagate so users can help contribute? A keylogger style recorder of actions like macros to show how-tos interactively (Zbrush-style)?

You may need to do some sort of video lecture about the concept of data flow and how VL bridges this with respect to c# or f# programming patterns.

I’ll reserve my comments about the language/UI’s ease of use for more targeted observations because the infividual issues deserve their own threads.