From: Simon Strandgaard Date: 2003-11-21T04:07:14+09:00 Subject: Re: [ann] iterator 0.1 On Fri, 21 Nov 2003 03:11:28 +0900, ts wrote: >>>>>> "N" == Nikolai Weibull writes: > > N> * Simon Strandgaard [Nov, 20 2003 17:40]: >>> We are curios to hear what your first-impression are, What do >>> you want from 'iterator.rb'? What are your requirements? > N> my first impression is that you must really, really love iterators ;-) > N> anyway, may be interesting to see how useful this is. this may be > N> something to integrate into (or other way around perhaps? ;-) RDSL You are welcome to use 'iterator.rb' in RDSL.. However 'iterator.rb' are under Ruby license and RDSL are under LGPL. I think you can make a vendor-branch, and import 'iterator.rb' into your cvs-repository: http://www.loria.fr/~molli/cvs/doc/cvs_13.html#SEC98 > Well, the problem is that it exist something similar in 1.8.1 > > # == Overview > # > # This library provides the Generator class, which converts an > # internal iterator (i.e. an Enumerable object) to an external > # iterator. In that form, you can roll many iterators independently. I wasn't aware of 'generator.rb'. The 'Generator from a block' idea is good, I will rip it. I started working on the iterator before Ruby-1.8.1 were released, because I needed it for my regexp-engine in order to iterate over many different kinds of input-streams. Also because I needed a robust-iterator. 'generator.rb' cannot replace 'iterator.rb'. I originally tried out Horst Duchene's 'stream' package, but found it too counter-intuitive. I don't believe there are other iterator packages ? -- Simon Strandgaard