Mon Oct 30 13:05:43 EST 2006

write and stdlib streams

maybe i should completely get rid of all stlib streams since mixing
both fd I/O and stream I/O gets very confusing. i can't guarantee much
if things pass through different gates.. so:

- stream_read/write have the same semantics as system read/write
- get rid of all stream references
- printf prints to string first
- get rid of putbackchar (ungetc)

something about putbackchar.. the parser really needs this, since ( "
and # are word terminators.. this means i need a real buffer.

what about making file streams a 'subclass' of string streams?
-> bad idea: it's not the same thing..

buffering.. how to do this
-> check code.. seems to work.

still need to fix the packet read/write code
-> ok

so the final word is:
- input is buffered for small reads ( < 512 )
- output is only buffered for 'write-atom-buffered'
- all output is tied to VM

* sometimes an extra xxx sleep is necessary to send out a packet?? 
  -> done
* check stream.h for cruft
  -> done
* slurp on program output needs to read until EOF
  -> done

looks like i'm done. nope. still to do:
- emacs (reader plugin)
- sleep time delay -> no output poll during sleep now = wrong

fix sleep time first. it's not too hard.
-> done

for the emacs thing, i'm going to open another entry.