Re: Proposal: clojure.io

2010-01-02 Thread ianp
I wonder if it would be a good idea to include a clojure.io namespace in Clojure itself. +1. read-lines was left out since ... On the basis that it's less painful to add new stuff in later than to remove stuff I agree that erring on the side of caution in the correct approach. Overall I

Re: Proposal: clojure.io

2010-01-01 Thread Konrad Hinsen
On 01.01.2010, at 03:58, Phil Hagelberg wrote: I welcome discussion about this proposal. Do you think it's necessary? Are there any functions we should leave out? Any others we should promote from contrib? I am very much in favour of a clojure.io library. It's difficult to do much

Re: Proposal: clojure.io

2010-01-01 Thread Stefan Kamphausen
Hi, On Jan 1, 3:58 am, Phil Hagelberg p...@hagelb.org wrote: I've been looking over our use of contrib in our large-ish project at work. About 90% of the invocations of contrib functions are I/O-related. evil mutable little bastards, these files ;-) I wonder if it would be a good idea to

Re: Proposal: clojure.io

2010-01-01 Thread Sean Devlin
Phil, Overall I think this is a good idea, but I get the feeling duck- streams isn't quite ready, at least not today. However, this isn't to say that it couldn't be ready if we worked hard on it over the next few months. Here are some things to look into off the top of my head 1. I'd recommend

Re: Proposal: clojure.io

2010-01-01 Thread Stuart Sierra
On Dec 31 2009, 9:58 pm, Phil Hagelberg p...@hagelb.org wrote: I wonder if it would be a good idea to include a clojure.io namespace in Clojure itself. I've mentioned the idea a few times on IRC, and people seemed to be very much in favour. I've considered this too, but I know Rich Hickey has

Re: Proposal: clojure.io

2010-01-01 Thread Phil Hagelberg
Sean Devlin francoisdev...@gmail.com writes: 1. I'd recommend adding support for general unix file utilities. I've written some of them myself, and you can review/borrow/steal code from here: http://github.com/francoisdevlin/devlinsf-clojure-utils/blob/master/src/lib/sfd/file_utils.clj

Re: Proposal: clojure.io

2010-01-01 Thread Kevin Downey
I think something more abstract would be good. A function or macro where you pass it an IO Spec and it takes care of all the class stuff. (io/read [:bytes :from SOMETHING :as p] (do-stuff-with-a-byte p)) (io/read [:lines :from SOMETHING :as p] (do-stuff-with-a-string p)) (io/read [:lines

Re: Proposal: clojure.io

2010-01-01 Thread Steven E. Harris
Kevin Downey redc...@gmail.com writes: (io/read [:lines :from SOMETHING :as p] (do-stuff-with-a-string p)) (io/read [:lines :from SOMETHING]) ;no :as binding or body, results in a lazy-seq of lines And it's important to specify whether p in the former or the head item in the sequence in

Re: Proposal: clojure.io

2010-01-01 Thread Alexander Kjeldaas
My 2c. In any clojure.io library, make sure none of the warts that are planned to be fixed in NIO2 are codified. JDK7 includes work on Path, large directory traversal, event notifications etc. See http://java.sun.com/developer/technicalArticles/javase/nio/ Alexander 2010/1/1 Phil Hagelberg

Re: Proposal: clojure.io

2010-01-01 Thread Sean Devlin
On Jan 1, 4:34 pm, Phil Hagelberg p...@hagelb.org wrote: Sean Devlin francoisdev...@gmail.com writes: 1.  I'd recommend adding support for general unix file utilities. I've written some of them myself, and you can review/borrow/steal code from here:

Proposal: clojure.io

2009-12-31 Thread Phil Hagelberg
I've been looking over our use of contrib in our large-ish project at work. About 90% of the invocations of contrib functions are I/O-related. I wonder if it would be a good idea to include a clojure.io namespace in Clojure itself. I've mentioned the idea a few times on IRC, and people seemed to