(no title)
mhomde | 8 years ago
someobject => doThis() => doThat() => dontForgotToFinishUp()
then you could also possible send multiple objects into that pipe: obj1, obj2 => doThis() => doThat() => dontForgotToFinishUp()
you'd have to have some semantics for sending them separately, as an ienumerable or as parameters but perhaps that could be done (obj1, obj2) => doThis() => doThat() => dontForgotToFinishUp()
[obj1, obj2] => doThis() => doThat() => dontForgotToFinishUp()
add on top of that something that could abstract away multithreading/tasking in certain cases (automatically assigning them to tasks) and I'd be a happpy coder :)
kortex|8 years ago
`data | groupby, "author" | mean`
Would create a graph object, which could be lazily evaluated, run in Dask, TF, etc.
It started to get ugly when passing in multiple parameters into a function. I had to watch out for left and right associativity, and manage casting of arguments.
It was a fun little experiment but I'm not sure how much it would actually improve workflows. If that sounds interesting, let me know and I'll poke at it again.
wenc|8 years ago
1) Coconut: http://coconut-lang.org/
2) https://github.com/JulienPalard/Pipe
3) Pandas also has a new dataframe pipe method. https://pandas.pydata.org/pandas-docs/stable/generated/panda...
I would look at those before rolling out a custom solution.
DonHopkins|8 years ago
My point is that FORTH is point-free!
https://en.wikipedia.org/wiki/Tacit_programming
Tacit programming, also called point-free style, is a programming paradigm in which function definitions do not identify the arguments (or "points") on which they operate. Instead the definitions merely compose other functions, among which are combinators that manipulate the arguments. Tacit programming is of theoretical interest, because the strict use of composition results in programs that are well adapted for equational reasoning. It is also the natural style of certain programming languages, including APL and its derivatives, and concatenative languages such as Forth. The lack of argument naming gives point-free style a reputation of being unnecessarily obscure, hence the epithet "pointless style."
https://en.wikipedia.org/wiki/Concatenative_programming_lang...
A concatenative programming language is a point-free computer programming language in which all expressions denote functions, and the juxtaposition of expressions denotes function composition. Concatenative programming replaces function application, which is common in other programming styles, with function composition as the default way to build subroutines.
iterati|8 years ago
hedora|8 years ago
(
grep stuff file | wc -l &
expensive_task in/ out/&
)
join
ls out/ | parallel reducers > result
roywiggins|8 years ago