More concurrency constructs (xargs, gnu parallel, nonlinear pipelines)
andychu opened this issue · comments
andychu commented
We have a nascent xargs here:
https://github.com/oilshell/oil/tree/master/tools
I mentioned xargs here:
and it's hidden in the help as each
:
https://www.oilshell.org/release/0.8.3/doc/oil-help-topics.html#builtin
andychu commented
Basically I want us to have something like:
find --qtsv . | each {
echo "$name --- $size"
}
andychu commented
Also, with Oil blocks, I imagine instead of
diff <(sort left.txt) <(sort right.txt)
You could factor it out like:
var p1 = &(sort left.txt)
var p2 = &(sort right.txt)
diff $stdout(p1) $stdout(p2)
andychu commented
Random idea here: https://news.ycombinator.com/item?id=25939152
grep FOO *.py | wc -l | sort -n
pipeline {
pipe :p1 # variables that are pipes
pipe :p2
# this syntax isn't great but shows the idea
grep FOO *.py > &p1
< &p1 wc -l > &p2
< &p2 sort -n
}