<div class="gmail_quote">On Mon, Nov 2, 2009 at 05:13, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:SeeWebsiteForEmail@erdani.org">SeeWebsiteForEmail@erdani.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Philippe Sigaud wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
(Uh, first time poster, so hi to all!)<br>
</blockquote></div>
[snip]<br>
<br>
Hi and welcome. This is very interesting work -<br></blockquote><div><br>Thanks! And thank you for your good work there, and for the nuggets I found while perusing std.* code.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
if you want to contribute it to Phobos at least for inspiration, you may want to put it in the public domain on your website or really anywhere on the Net.<br></blockquote><div><br>Yes, I see that. I'll open an account on <a href="http://dsource.org">dsource.org</a> tonight (It's 7 am where I'm sitting).<br>
<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I'm thinking of factoring some of your APIs a bit, for example bimap is really an application of a binary function over two streams, one of which is a delay of the other.<br></blockquote><div><br>You're perfectly right. Damn, and I saw that somewhere else. It's a way to transform what a called array ranges into tuple-ranges.<br>
Yes OK, the subjacent segmentation of ranges could be done by delaying some copy. Um, it's more uniform this way, as everything could be zips and such and it's even more general : you can create disjoint segments. Thanks!<br>
<br>That shouldn't be too difficult to code: make copies, drop first elements in a ramp, zip them into a tuple-range, iterate on them, eventually with stride.<br><br>By the way, if you know any easy/elegant way to transform a standard function into a typecons.Tuple-accepting one, I'd be quite interested to see it. I return tuples everywhere and, though doable, I don"t find that to easy to plug another range on it. It's my main point of ugliness in the code, from my pov.<br>
At the begining, I just wanted to have some map!(tuplify!foo)(zip(ranges)), but somehow it didn't work. I'll try that again.<br><br>Anyway, I'll go public, clean it somewhat and let this on the backburner from some time, see what comes out of it.<br>
<br>And I've some bugs for std.range (mainly in chain). I gather the right way to do that would be to put it on bugzilla? Is it OK to propose some slight code change? (chain assumes opIndexAssign or .length I think, and has some trouble if there is an infinite range somewhere, hasLength does not work for ranges with .length enclosed in static if, which is a common case, etc.)<br>
<br>Bye,<br><br> Philippe<br><br></div></div>