-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameterize a script.Pipe with a user data struct ? #185
Comments
Thanks for the suggestion, @fbaube! Can you come up with an example of the kind of program you'd like to write using this idea? That'll help me get a clearer picture of how it might work. |
This is really similar to what I was messing with but never got around to doing. Can I hit you with a use case ? I have 3 folders and each is sort of their own binary micro service I want that when one folder changes to raise a change event to a broker like nats. This is done by a fs watcher Nats broadcasts it to the other folders binaries and try do sone work and change their file system and this raise more events. this is called Choreography . It’s bottom up work flow piping where the workflow emirates from whatever file change events are being board cast and who is listening. mots simple like this project and the schema is just the file that changed in which project. |
My goal is something like a DSL for processing Lightweight DITA. LwDITA is a DITA with a greatly reduced tag set, plus support for HTML5 and Markdown. This is where script would be used, and I would create new ParamPipe functions. (As an aside, I figure that when I have M pipelines for M files, each with N processing stages, then there is a number of ways that this load could be distributed across multiple processors.) So in the CLI program, the processing for a file looks (or will look) something like this:
fred |
That sounds great! So what would the |
Good question! I already have code that looks like this:
A pure DSL tho would need to deal with how a list of N files fans out into N separate pipelines. I'm not sure whether To |
@bitfield what're your thoughts on this issue? |
A generic pipe type is an intriguing idea—I don't think it would fit into |
There's many pipeline packages "out there" but script seems to be one that gets it conceptually correct.
Question: Should it be possible to attach a data structure to a pipeline using generics ? Something like
Then a process pipeline for an instance of a user-defined struct could easily be constructed in a one-liner, and new functions could specifically process the user data.
I wish to write processing pipelines for chunks of content, and script's bash-style primitives provide a lot of helpful functionality.
The text was updated successfully, but these errors were encountered: