Code Monkey home page Code Monkey logo

Comments (6)

TobyKLight avatar TobyKLight commented on June 24, 2024 1

I added an extra case to stateful vs stateless tutorial with exactly the example you had with blur in case anyone runs into this in future.

from vl.extendedtutorials.

TobyKLight avatar TobyKLight commented on June 24, 2024

Sounds like a great idea. I may not have time to do another big video for a while but I could do a patch at least.

What would be the key messages to illustrate?

Off the top of my head
-Static Operations are stateless,
-Processes, classes and records can have state, although they don't have to.
-How the state outputs work on records and classes
-Show how running something stateful inside a stateless context will constantly recreate it
-Importance of using Create with Records and Classes to initialise inner state properly

from vl.extendedtutorials.

chkworks avatar chkworks commented on June 24, 2024

I would not have even thought of all these, and I could also greatly benefit from that.

Maybe also how stateful nodes are indicated with a bar in the node?
Also that delegates are stateless? I interpret them as kind of an inverse implementation of a static operation.

from vl.extendedtutorials.

TobyKLight avatar TobyKLight commented on June 24, 2024

Ok I added a Stateful vs Stateless patch in v1.0.4. Should be uploaded shortly. Check it out and let me know what you think.

I didn't put in the bars because records don't have bars and I consider them more on the stateful side as long as you save them somewhere, which I think is their intended use.

I also would like to deep dive to cover delegates in a future tutorial so I left that out for now.

from vl.extendedtutorials.

chkworks avatar chkworks commented on June 24, 2024

Awesome! Thank you for sharing this! Just writing down all thoughts that popped in my head while going through this.

Okay... the bars would just indicate a Process and not a stateful patch? I noticed that the first time.

Also I liked the mentioning of that stateful nodes have pads. Is the difference really just that simple?

So in that case, this warning should actually only be yellow, when the process contains at least one pad?
grafik

Also: the last frame in your patch "Providing state from outside a static operation" directly docks to the concepts in this forum thread, right?
https://discourse.vvvv.org/t/naive-questions-about-textures-and-delegates/20622

from vl.extendedtutorials.

TobyKLight avatar TobyKLight commented on June 24, 2024

Sorry for slow reply!

Yes I think the bars are just for a process.

As far as I know yes you have to have pads in order to be stateful... I didn't think of it that simple myself but I guess that is the only way to store anything without external IO. (eg write a file to disk... is that stateful? Debatable but I think probably not in the context of talking about vvvv nodes)

I like your idea of limiting the warning to when the process has pads.. Makes sense to me, although maybe the devvvs have other reasons.

In terms of the thread... I don't think the solution you are looking for is about a need to update state in a stateless context, I think you ran into three different problems:

  • Delegates are stateless, but of course the documentation for delegates is incomplete at this time so how are you meant to know that?
  • It happens to be a quirk of the graphics pipeline that blur is a stateful process.
    Conceptually I would agree with your initial approach and see blur as stateless transformation of a texture, it goes in, gets blurred, goes out.
  • Lastly the role of delegates and interfaces as providing customisable behaviour is also not well documented. In the gray book interface still says 'not officially supported'. So again how are you meant to know interface would allow you to provide stateful behaviours?

I sympathise with you. I find learning this way quite frustrating.

from vl.extendedtutorials.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.