6 ms·
Gpiozero Flow
- frumiousirc 2mo agoA 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.
- codetiger 2mo agoThis 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 https://github.com/GoPlasmatic/datalogic-rs Disclaimer: I am the maintainer of the datalogic-rs project
- nottorp 2mo ago> It can become a complete coding platform. ... everything evolves until it can read mail^H^H^H becomes Turing complete?
- arto 2mo agoFYI, the general paradigm here is named flow-based programming (FBP): https://github.com/flux-doctrine/awesome-fbp https://github.com/flux-doctrine/awesome-fbp
- embedding-shape 2mo agoTechnically, 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 2mo agoHi ben :)
- amelius 2mo agoSomehow these visual programming tools never seem to get much traction. Are there any exceptions?
- Garlef 2mo agonode-RED for PLC programming
- ViscountPenguin 2mo agoBlender shaders maybe?
- grufkork 2mo agoTouchdesigner, VVVV, (Notch?) too. The big benefit here (besides dataflow programming working better for more pipeline-like programs) is that it's always runtime. This is a pretty big selling point for design where quick iteration and tweaking is important
- embedding-shape 2mo agoHoudini (VFX/3D tool), virtually unchallenged in some of its domains, it's basically visual programming. Very basic what you'd do inside of Houdini when working with it (with screenshots): https://www.sidefx.com/docs/houdini/basics/intro.html https://www.sidefx.com/docs/houdini/basics/intro.html Unreal Engine also have "Blueprints" for game logic that remains fairly popular, maybe not always as the underlying systems, but at least as a control surface for game designers, like a "API" kind of. If you're curious how out of control and wacky these sort of graphs can get, https://blueprintsfromhell.tumblr.com/ https://blueprintsfromhell.tumblr.com/ has a bunch of fun examples.
- effnorwood 2mo agoI am totally pressed. What now?
- luciana1u 2mo ago[flagged]
- whynotmaybe 2mo agoShould we call this luciana1u's law? If BizTalk has it, why shouldn't my visual programming tool have it?
- bbqbbqbbq 2mo ago[dead]
- rickdeckard 2mo agoand then the evolution of the whole tool slows down as the answer for most limitations in native functions becomes "just use the 'code node' and write the function there" :)
- mbreese 2mo agoI don't think this is for people that would just write code. Maybe you need that pressure release to get some edge cases, but for the most part, if you're using a visual programming tool, you are trying to avoid the code part for some reason. So, I don't see that limit as something that's all that bad.
- m463 2mo agoas someone who writes code, examples 2/3 are non-intuitive (maybe more context would help)
- seemaze 2mo agoIt's a good onramp to building a programmatic intuition, but you're correct that it very quickly gets left behind once the 'magic' is understood. If you do a quick image search for , e.g. Rhino3D Grasshopper, Blender Geometry Nodes, Vectorworks Marionette, Autodesk Dynamo, ComfyUI, you'll quickly see the implementations of the real world procedures users are crafting become unwieldy rather fast. I can't tell you why an 80 column wall of characters is easier to reason about than a visual graph, but I assume it has something to do with the reason Mitch Hedberg does not like arrows[0]; look, a function.. let's got that way. [0] https://youtu.be/EI1DBRz3JLk?si=DCLNkbeCGWyw-Ceu https://youtu.be/EI1DBRz3JLk?si=DCLNkbeCGWyw-Ceu
- hn5nw0vcqg 2mo agoGood stuff, keeping it
- faangguyindia 2mo agoI had a similar thought while building a visual workout programming system for bodybuilding. One thing I keep running into is that workout programs are essentially state machines progression rules, deloads, conditional branches, different exercise substitutions, autoregulation etc... That made me wonder whether a visual programming model would make these systems more approachable. I'm still unconvinced, though. Unlike automation workflows where the graph itself reveals the logic, I'm not sure what the right visual abstraction is for training programs without making them even more overwhelming. So far i've a workout programming language and bunch of sample programs and an app which can help you execute these workout plans, all free ofc: https://symbiote-studio.macrocodex.app/?builtin=gzclp https://symbiote-studio.macrocodex.app/?builtin=gzclp
- pseudosavant 2mo agoI think this looks like a great idea for the kind of automation people often use GPIOs for. I wonder what the complexity would be to make gpiozero that is compatible with Pi Pico 2 or ESP32 devices? A full Linux OS can be overkill for just controlling some GPIOs. That said, a Pi Zero 2 W is only marginally larger than a Pico 2.
- greatony 2mo agoi think there are two patterns of programming: control flow, and data flow. this visual programming tool is actually a data flow approach. the good part is, it will be easier to express simple logic. as a tradeoff, it will be awkward to express complex logics