Hello, I just found about this nice improvement over default java.shell provided by clojure stdlib. What is current status of this project? Is it still useful or maybe there are alternatives? Does it support latest clojure versions (1.6 or even maybe 1.7-beta)?
Thanks! On Tuesday, June 25, 2013 at 5:57:58 PM UTC+2, mlimotte wrote: > > I'm announcing java.shell2 <https://github.com/mlimotte/java.shell2>. It > is backward compatible with clojure.java.shell. This is a Clojure library > to facilitate launching of sub-processes and piping (streaming) data. > > Features > - A declarative syntax for defining new processes to specify input, > output, encoding, and other behavior > - Handling for common use-cases (i.e. pass stdout/err of the process to > the same destination as the parent, merge stderr of the process to stdout, > output directly to a File, etc) > - The pipe macro handles all the complexity of managing multipe streams > and threads for streaming data through multiple processes and clojure > functions. > - Backward compatible with existing code that uses clojure.java.shell > (i.e. a drop-in replacement) > > Shell has additional predicates like :pass, which will connect STDOUT or > STDERR of the process to the STDOUT/ERR of the parent JVM. > > (sh "wc" "-l" :in input :err :pass :out (io/file "/tmp/foo")) > > So the above form reads input (which can be a file, stream, string, etc), > forwards the output to a file and redirects STDERR to STDERR of the JVM. > > And here's an example of a pipe: > > (pipe > (sh "cat" :in input) > my-filter-fn ;A clojure function -- data is streamed > (sh "wc" "-l")) > > > This library was developed at The Climate Corporation > <http://climate.com/>, so a big thank you to them for allowing me to open > source this code under an EPL license. Climate Corp has one of the largest > Clojure development teams. We are an established startup with offices in > San Francisco and Seattle; and are currently hiring full-time Clojure > developers, data scientists, product managers and more > <http://climate.com/careers>. > > See the README for more details and many examples in the unit tests. > > I know there are other shell libraries for Clojure. My main motivation is > that I wanted something closer to the clojure.java.shell api. > > Marc Limotte > > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.