4 ms·
This is neat, but outside of a contrived ouroboros example, what’s a real world use case for this? There’s a natural flow of outputs becoming inputs and I’m st
by koolba 3y ago
This is neat, but outside of a contrived ouroboros example, what’s a real world use case for this?
There’s a natural flow of outputs becoming inputs and I’m struggling to identify a situation where I would feed things back into the source. Also, named pipes kind of solve that already.
- LatticeAnimal 3y agoAgreed -- their only example is `pipexec -l 2 -- [ LS /bin/ls -l ] [ GREP /bin/grep LIC ] '{LS:1>GREP:0}'` which appears to be `ls | grep LIC` with more steps. Seems like a (cool) solution without a real problem. (I'd love to be wrong though and see a real use case for some cool feedback loop of commands)
- sebosp 3y agoThis reminds me of MIT's open courseware, 601 SC, unit 1 with state machines, going all the way to build Fibonacci with them without recursion, tbh the moment the teacher translated the state machine to bounds to electrical circuit I felt it was a leap and I couldn't quite understand their relationship, maybe I missed a requirement course. I tried to express that course in Rust as one of my first projects learning the language here https://github.com/sebosp/rustexercises/blob/develop/ocw601sc%2FSession2%2Fstate_machine%2Fsrc%2Flib.rs https://github.com/sebosp/rustexercises/blob/develop/ocw601s... and I think a similar iteration in the direction of this project would be to build the dependencies as drag-and-drop boxes over the browser (maybe egui) and connect the state machines by clicks, maybe download the generated code as either bash or compilable rust code, you know, for kids.
- eichin 3y agoIt looks like it might be able to handle one of the tricks I do with dpipe running sshfs ( https://gist.github.com/bdmorin/5eb17828612e7d1b66e92550f42873e8 https://gist.github.com/bdmorin/5eb17828612e7d1b66e92550f428... is probably where I picked it up from) but I'm not sure (and dpipe already handles it fine.)
- CGamesPlay 3y agoI recently wanted this for some scripting over SSH. I basically want to run a script on a remote machine and read it back, but implement it as a function instead of a wrapper around SSH. Chatbots, where the bot only needs to be line-driven and you can connect it to any CLI chat interface. Or perhaps, run your AI agent attached to a shell, and have it treat standard IO as a shell session.
- geon 3y agoSomewhat related: https://github.com/joewalnes/websocketd https://github.com/joewalnes/websocketd > websocketd is a small command-line tool that will wrap an existing command-line interface program, and allow it to be accessed via a WebSocket.
- lubutu 3y agoI suppose such feedback could be used for reaching a fixpoint. Suppose you have a build system that reads targets to be built from stdin and outputs to stdout targets that are dependent on that target and must now be rebuilt. With an ouroboros, the build system will continue to run, even if the dependency graph is dynamically cyclical, until the fixpoint is reached and the build terminates.
- geon 3y agoIt can be used as client/server communication locally. I’ve done that (without pipexec) for bots in a multiplayer game. That way I could implement the bot ai independently and test them against each other.
- 8n4vidtmkvmk 3y agoI did pretty much this exact same thing too. The game runner spawns 2 bots and acts as the middleman/, piping their output to each other. I did it in node though. I wouldn't want to code this in bash.