Giter Site home page Giter Site logo

Comments (2)

jonathanhogg avatar jonathanhogg commented on May 30, 2024

OK. New plan for dealing with grafting.

Each Node has a weak-set of parents instead of a single parent pointer as now. Nodes that pop out of the top-level statement without any parent nodes are appended to the graph root, otherwise they are ignored – this way top-level queries work as before and there's no need for a new "discard" operator.

Instead of having a smash-append operator, have a stealing version of Query: so maybe {#foo} searches for tagged nodes, but {{#foo}} searches-for and removes the nodes from the place they are found. Note that this latter part is key if the node actually has multiple parents: {{#foo > #bar}} should only steal the #bar node from below the #foo node – it may still be parented somewhere else.

So our standard window shader graft could be:

{window}
    let contents={{window>*}}
    !shader fragment=read("feedback.frag")
        contents

This works, but is kinda ugly. A possible alternative is a delayed-append operator that builds the complete node before appending it to the parent, i.e., waits for the execute() generator to complete before appending the yielded results. Something like:

{window} ?
    !shader fragment=read("feedback.frag")
        {{window>*}}

from flitter.

jonathanhogg avatar jonathanhogg commented on May 30, 2024

Note that if I ditch queries, a la #17, then most of this is moot. In that case, references would need to stay so I might have to think a bit harder about whether they need to be improved / made more orthogonal.

from flitter.

Related Issues (20)

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.