At 4:47 PM -0700 1/27/04, Cory Spencer wrote:
Perhaps someone with a bit more familiarity with the Parrot IO subsystem
could give me some guidance here.  I'm currently trying to get a new
'peek' opcode working, and I'm having difficulties getting the io_unix
layer implemented correctly.

Before we go any further, could you refresh my memory? I know what the peek function's supposed to do, but I'm unclear as to the why. (You may have explained it already, but humor me--I'm overloaded with mail and a bit of jetlag)


FWIW, it's worth remembering that reading data from a filehandle may well actually be reading data from a linked list of data manipulation and generation layers, and speculative reads may well not do what you expect. Ponder a filehandle that, for bizarre reasons we won't even consider, returns a 64 bit integer representing the time in 100ns ticks since the epoch of the read request--what do you do with a speculative read (with or without pushback of unwanted data) in that case?
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to