Open zippy opened 9 years ago
94e2ea2cc adds an instruction STREAM_AVAILABLE that returns a BOOLEAN if the stream hasn't reached EOF.
This code still has significant issues in that if EOF is reached during a STREAM_READ, especially on the first call of fgetc() then the read will return an empty string symbol. It's not clear what we want to do in that case.
Realized that it makes lots of sense to just generalize the STREAM instructions to multiple types of streams, and add UNIX streams as just one case. The surface of a STREAM structured object would then be ceptr c struct that can hold stream state data (like EOF stuff). Also, in the case of UNIX streams (and other non-semantic streams) we can use the structure of the RESULT_SYMBOL to infer how to interpret the stream's data.
generalized streams in 48d3e032
this is for things like moving the current position on a stream, resetting a stream, etc.