Example implementation for the filters#282
Conversation
|
I'll look at this more after #265 gets merged since I'm assuming that will change at least some of this PR |
Not really. This is atomic and only the "filter" part. There's still so much to do. |
|
I can take a look after I'm no longer sick |
|
Get better soon! |
|
Sorry for taking so long to give feedback I think the main fundamental thing that will cause problems and have to be addressed is how to handle streaming in this model. Like in the case of something like $ sd --pretend-we-have-a-line-mode 'bar' 'baz'
foo
bar
baz <-- output by `sd`we need to be able to stream the output line by line which I think means that we'll need to have an api that looks more like the Some various other thoughts:
All that out of the way that doesn't mean we need something that can fit all of those needs now, but I think it does limit how |
There's still a lot to do and think. This is just a draft to have an example to think about and work on.
This just is a list of composable filters that fit into another. This is really extensible, but there are a few things left to think.
There are many optimizations possible with this model.
I don't like having possible failures inside of the filters, everything should have been figured out by this time, but I've implemented it just in case