Serial Loops [Proposal]

  • Serial Loop/ Parallel Loop
  • Repeat / Parallel

0 voters

2 Likes

Isnt it supposed to be Repeat / Loop?

1 Like

For what it’s worth, “parallel loop” sounds weird to me. “Loop” sounds like it’s going to operate many times on data, but instead it’s something that’s done only once, on many elements. Geometry nodes aren’t like any scripting language, with fields we’re already always in a loop, in a sense.

Preface, for me “Parallel Loops” and “Serial Loops” is the way to go.
Or alternatively , if “Repeat” gets choosen, just go for “Serial Repeat” and “Parallel Repeat”.

To me, as already mentioned, Loop and Repeat can be safely considered synonyms.
Using both of them is just confusing , just pick one and distinguish between serial and parallel/concurrent.

Well , it is still a loop , but parallel or concurrent , the same operation gets done many times (one per element) but there is no guarantee on the order of execution of each iteration.

That’s why it must be used in cases where there is no dependency between each iteration’s result, hence it can be parallelized taking advantage of multithreading.

In an ideal world it gets processed once (as you said) for every element of the geometry, but in reality, there probably are many batches of parallel iterations , each batch is executed in sequence. But there is no guarantee of which one gets executed first.

Yes, with fields (AFAIK, devs, correct me if I’m wrong)
We are always in a loop, a parallel loop infact. Parallel loops are supposed to do exactly the same operations in the same ways of built in GN nodes, but you can do your custom ones with more or less the same efficiency.

Even if GN aren’t like other languages, they still are a language in a sense, and to me it’s worth using some common words already well known in the coding world. For example, in unity c# , you are almost always in a loop by default. But that’s not a reason not to use loops inside the main execution loop, and not referring to the for construct as a “loop” in the documentation.

I see the point of Artists not familiar with the coding jargon, I’ve been on the other side before studying software engineering, but I’m still convinced that since GN is basically a visual programming language, it should use programming words, maybe well documented and with good tooltips for those who are not familiar with coding.

2 Likes

The names serial loop/parallel loop suggest they have something similar in their deep core. From the programming point of view, that means both are designated to modify each provided element but in a different manner. Even though parallel loop might sound nonsense, it is clearer when that node is placed nearby the serial loop to understand or guess what both are doing.

Another way to name those two nodes might be for loop and for each element, similar to programming languages operator (function) naming.

Overall we have + a few more suggestions for names:

  1. Serial loop/parallel loop
  2. For loop/for each element
  3. Serial execute/Parallel execute
  4. Parallel loop/repeat

Personally, I prefer 1. and 2.

8 Likes

I’m somewhat surprised by how much people got attached to the terms “serial” and “parallel”. It feels unlikely that these terms would have been suggested if I wouldn’t have used them in my original proposal.

I think “Repeat” is a reasonable term in this context. It’s the term I would use when I introduce the concept to someone. I start out with a manually repeated node setup and then make it smaller using a repeat zone.

I think it’s ok to call it a “Repeat Loop” (and “Repeat Loop Zone”) as well. We won’t use the term loop in the menu in the first commit, but maybe we’ll add it later if it really helps. For the parallel loop I currently tend towards the names “For Each”/“For Each Loop”/“For Each Zone”, but we’ll discuss that in more detail when we get there.

Independent of how we call them, we can make both kinds of loops discoverable when searching for “loop”.

18 Likes

Repeat loop still sounds kind of odd… It’s two synonyms next to each other. It feels like saying “vehicle car”.

It would be especially wonky if we had “Repeat Loop” next to “For Each Loop”, as “For each” directly refers to common keywords in programming and scripting languages while “Repeat Loops” naming tries to avoid it. So it seems like naming of two quite closely related nodes within the same node based system seem to target audiences of very different levels of familiarity with scripting terminology.

If the other loop was supposed to be called “For Each Loop”, then it’s all the more reason to call the serial loop “For Loop”.

On the other hand, if we are bending mainstream terminology to cater to users less familiar with basic scripting concept by calling serial loop “Repeat Loop”, then it’s all the more reason to avoid term “For Each” in the name of parallel loop.

I don’t think the idea is to stay away from naming things similar to programming languages, but rather to evaluate the clarity of the names independent of that. If the same term is used in programming that’s a plus.

“For each element do x” to me sounds quite natural and easy to grasp, and both Houdini and Bifrost use the same terminology. “Parallel” doesn’t describe the semantics of such a node well I think.

Personally I don’t really like “Serial Loop” or “Repeat Loop”, I agree the latter sounds like saying the same thing twice. So I would prefer just “Repeat” over “Repeat Loop” if there was a decision to be made between those two.

8 Likes

Fair. Just “Repeat” is what we currently use in the patch. I’m curious, do you have an opinion on what term you would use instead? The only reason the patch isn’t merged yet is that this discussion is still going on. Your input would be useful.

1 Like

I’m no native english speaker, so maybe this is different for those who are, but:

In my experience repeat and loop are not completely synonyms for non-programmers. Most (non-native english speaking) non coders I’ve met associate ‘loop’ with ‘a loop of rope’. Or some similar attachment device. When teaching programming (admittedly this was ~15 year olds and their english is not too good) I always had to explain the term ‘loop’ (using the word ‘repeat’ :slight_smile: ).

Otoh there’s probably a large overlap between blender users and people who know at least some programming terms. And there’s an advantage to ‘loop’ being a standard term. So there’s something ot be said for both approaches imho.

1 Like

Personally I think “Repeat” and “For Each” are fine.

If we add Loop to the name, I think it should be added to both. “Repeat Loop” and “For Each Loop” is not bad either, it’s just that saying “repeat loop node” and “for each loop node” out loud feels a bit tedious.

Alternatives could be “Iterate” and “While Loop”, but “Repeat” still seems more immediately clear to me.

7 Likes

I heard Repeat and I immediately understood what this new node does. It can’t get any clearer than that. I just don’t get how that is even a discussion. Jacque is right people just got attached to the name in the draft, that’s the only reason.

4 Likes

I think “repeat” and “for each” are fine, but if we wanted the word loop to be present for discoverability, how about the category in the menus being called “loops” and inside that there’s “repeat” and “for each”?

2 Likes

I think a year or two from now there will be debates about why loops are called loops everywhere else but repeats in Blender, and the constantly repeated answer will be something like “It wasn’t a great name, but few people decided it was “just fine” and now it’s too late to change it.” :slight_smile:

I think if you’re going to have the word “Loop” in each, it should be “Iterate Loop” and “For Each Loop” – It just sounds better to my ear. If not, I think “Repeat” and “For Each” sounds nice too.

1 Like

The names of the nodes Houdini are “For-Each Primitive” and “For-Loop”. In Bifrost it’s “iterate”, “for_each” and “do_while”. So only one of those actually has “Loop” in the name of the node.

The term loops is still used in the documentation, and I think that’s fine for Blender too.

9 Likes

FWIW, in C4D that node is called “Loop Carried Value”.
What a name lol

For the records, in today’s module meeting we went over the latest back and forth here and reiterated the use of the current name (Repeat).

This should get merged any day now. Thanks for everyone for pitching in. Moving forward, feedback about the usage of the Repeat nodes (showing your art :wink: is still very welcome.

14 Likes

Amen!

Just curious (maybe It’s been mentioned already and I missed it) at this point, now hat the serial iteration is called “Repeat”, is there already a plan on how the parallel version will be called?

1 Like

By the way: The Repeat zone is in main :slight_smile:

18 Likes