<div dir="ltr"><div>Hi Dave,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 7, 2020 at 10:14 PM David T. Lewis <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Actually, I think that the new ReadStreamTest>>testPeekBack is not in<br>
agreement with the existing RWBinaryOrTextSteamTest>>testPeekBack.<br></blockquote><div><br></div><div>Looks like I got too excited and neglected to run the full test suite, apologies!<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
If I understand correctly, peek means "show me the next element that<br>
has not yet been read from the stream", and peekBack means "show me the<br>
element before the one that was most recently read from the stream".<br>
So I expect that peekBack would mean to skip back 2 from the current<br>
position, not skip back 1.<br></blockquote><div><br></div><div>I see what you are saying and that makes sense to me. My thinking was that stream positions are always "between" the elements, and that a "peek forward" just means "grab the element but don't advance the position. In that case, peeking backward would do the same in the reverse direction: look one element back but not decrement the position.</div><div><br></div><div>Because there are no senders I guess this isn't a big deal and we can trash the changes. It came up because I'm thinking of porting my refactor of GIFReadWriter and animated image parsing that I did for Pharo about a year ago. I use peekBack in a couple of places there but can definitely figure out another way to achieve the same result. (I'll save the GIF discussion for a later email because it's ... complicated).</div><div><br></div><div>Thanks!<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Dave<br></blockquote></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Eric</div></div></div></div>