• Dmian@lemmy.world
    link
    fedilink
    arrow-up
    6
    arrow-down
    3
    ·
    edit-2
    9 months ago

    Are you talking about sending the output of one process to the input of another?

    I think the shaders I’ve mentioned are a great example of that: you do something in a block, then send the result to the input of another block.

    Sorry if it’s not what you mean, but my point is that, with some effort, you can create a visual representation of even the most abstract concepts. Physicists do this constantly. If we can make a visual representations of 4D, for example, what prevents us from doing the same for programming logic? Or for commands?

    • Avid Amoeba@lemmy.ca
      link
      fedilink
      arrow-up
      7
      ·
      9 months ago

      Yeah, and doing this would take significantly longer to use every time than typing up a chain of commands in a terminal.

      • Dmian@lemmy.world
        link
        fedilink
        arrow-up
        4
        arrow-down
        5
        ·
        9 months ago

        Agreed. But that’s not my point. My point is that it can be done.

        And in some cases, even if it’s less than ideal, and is way more cumbersome than using a CLI, you are helping non-tech-savvy people do things they couldn’t do any other way.

        • grue@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          9 months ago

          Nobody capable of defining an algorithm in a visual flowchart like that isn’t also capable of doing it in a CLI (or at least, in text in general – writing a script). It’s thinking through what you want to happen that’s the hard part; expressing it in the UI is trivial in comparison.

          • Dmian@lemmy.world
            link
            fedilink
            arrow-up
            2
            arrow-down
            4
            ·
            edit-2
            9 months ago

            Some people have problems remembering commands, for example. And it’s easier for them if they can see it.

            Yes, you can teach a kid to program (with some effort), but there’s a reason why Scratch presents logic units with shapes and colors and a GUI.

            There are many reasons why a visual representation may be easier to grasp than just resorting to memory and remembering abstract concepts.

            I mean, do you remember everything that you write? You’ve never had to visit Stack Overflow to remember how to do something, because you forgot the exact syntax of an operation? Now, how about if I put things visually in front of you? What would be easier?

            • howrar@lemmy.ca
              link
              fedilink
              arrow-up
              1
              ·
              9 months ago

              I’ve probably spent more time looking up how to access specific functions in a GUI than for CLI.

      • Buddahriffic@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        9 months ago

        Things like that have been around for a long time. It was like two decades ago that I saw this shader scheme in softimage|xsi.

        For implementing something like that, each node in that graph would have an array of inputs and outputs. Each of those would have a type like vector, scalar, colour, string. Then you only allow connections if the inputs and outputs match types (though you can also have conversion nodes or selectors that say pick the red channel of a colour to turn it into a scalar). Each input can be set to a constant value instead of connecting something else to it. Outputs don’t need to be connected, which is mostly useful if a node has multiple outputs. Then each node has an evaluation function that takes all input parameters and maybe internal configuration parameters (though you might as well make everything an input param since there’s no real functional difference) and uses them to calculate the outputs, which it then sends on to anything connected to those.

        I’m not much of a UI guy but displaying it for the GUI would just involve drawing boxes or some shape for the node, then spaces for each of the inputs on the left side and outputs on the right side maybe colour code them by type, and lines running along the connections. Then just add the name and/or other visual information you want to display and positional information to let users move it around their work area.