hsbt_away changed the topic of #ruby-core to: check the latest release candidate for 1.9.1 release ftp.ruby-lang.org:/home/yugui/ruby-1.9.1-r26021+1.tar.bz2
n0kada_ has joined #ruby-core
n0kada has quit [Read error: Connection reset by peer]
n0kada has joined #ruby-core
n0kada_ has quit [Read error: Connection reset by peer]
nari has joined #ruby-core
nari has quit [Ping timeout: 272 seconds]
nagachika has joined #ruby-core
shinnya has quit [Ping timeout: 240 seconds]
kosaki2_ has joined #ruby-core
kosaki2 has quit [Ping timeout: 272 seconds]
kosaki2_ has quit [Ping timeout: 272 seconds]
marcandre has joined #ruby-core
marcandre has quit [Remote host closed the connection]
Glass_saga has quit [Remote host closed the connection]
<drbrain>
it would be nice if Enumerator had an "ungetc"-like method
<drbrain>
it would make implementing token streams for parsing easy
<drbrain>
#peek already exists
<zzak>
rdoc uses peek right?
<zzak>
i dont know ungetc :(
<zzak>
its reverse of getc?
<drbrain>
yes, for IO
<drbrain>
for reading a token stream you typically have get_token, unget_token, peek_token
<drbrain>
Enumerator has next, <nothing>, peek
<nurse>
closed
<zzak>
so we need #unnext
<zzak>
lol
<zzak>
nurse: ありがとう!
<drbrain>
I think an acceptable name will be harder than the implementation
<nurse>
どういたしまして
<drbrain>
the new name cannot be confused with #feed
<zzak>
what about unsign?
<zzak>
or shiftc
<nurse>
It is unshift for Array, but
<nurse>
I feel Stream is different from Enumerator.
<drbrain>
nurse: yeah
<nurse>
Enumerator only moves its cursor to the next item.
<nurse>
It doesn't have shift/getc method.
<zzak>
it has #next tho
<zzak>
but #previous or #prev is not the same as #unget
<nurse>
next is not getc.
<zzak>
that too
<drbrain>
nurse: I think the only thing Stream and Enumerator share is use of fibers to switch between "generating" an entry and letting the user use it
<nurse>
In other words, next doesn't change original array or something
<zzak>
push/pop do tho
<nurse>
push/pop is for stack LILO
<drbrain>
maybe I'll write a Stream library using fiber tonight