Gpiozero Flow

(bennuttall.com)

42 points | by benn_88 1 hour ago

5 comments

  • frumiousirc 46 minutes ago
    A key feature about data-flow programming that seems too often missed is that it is (or can be) hierarchical.

    Define a subgraph of atomic nodes as itself a node with its ports formed from as-yet unconnected ports of its atomic constituents. Compose yet higher subgraphs of subgraphs and atomic nodes. Package all this in some way.

    This is directly analogous to syntactic programming where functions aggregate other function calls and all that packaged into a library with an API.

  • amelius 10 minutes ago
    Somehow these visual programming tools never seem to get much traction.

    Are there any exceptions?

  • codetiger 36 minutes ago
    This is amazing work. I've used GPIOZero in my RPi projects before. In the future, you can introduce conditional operators in the flow. It can become a complete coding platform.

    See JSONLogic UI for similar implementation: https://github.com/GoPlasmatic/datalogic-rs Disclaimer: I am the maintainer of the datalogic-rs project

  • arto 33 minutes ago
    FYI, the general paradigm here is named flow-based programming (FBP):

    https://github.com/flux-doctrine/awesome-fbp

    • embedding-shape 12 minutes ago
      Technically, it seems to have three different paradigms that it exposes:

      > Procedural/Event-based/Declarative - These three snippets achieve the same thing in different ways. One repeatedly asks the button if it is pressed; one tells the button to control the LED; and one tells the LED to follow the button's state.

      Much of the article seems to focus on the latter "Declarative" way, which they created a Node-RED-like UI for, which is indeed flow-based. But other approaches seemingly can be used too :)

  • adds68 20 minutes ago
    Hi ben :)