Ruby Pipelines

A few weeks ago I attended a Geekfest talk by Myles Byrne about shell scripting.

He talked a lot about using Unix pipelines to string together programs to manage data. The advantages of doing this include thread-safety, and that you can essentially do more than one step at a time. If you are using Ruby to perform multiple operations on a file, you cannot start a step until the first one goes through the entire file. If you are dealing with a large file, that could take a long time to get any results.

Nobody in the room could think of any Ruby gem that could act as a pipeline. I may have found one by Atomic Objects in Michigan. It’s called Piece Pipe. I have not looked at it too closely yet (I am writing about this here so I can find it easily later). They say that they want to do “pipeline-style programming”. I don’t know if it gives all the benefits of stringing together apps in a shell script with pipelines, but it is something to look at.

 

Image from prayer book owned Holy Roman Emperor Otto III (980−1002), manuscript housed at Bavarian State Library, webpage information here, image from World Document Library, image assumed allowed under Fair Use.