HigherOrderCO / HVM

A massively parallel, optimal functional runtime in Rust
https://higherorderco.com
Apache License 2.0
10.52k stars 400 forks source link

Suggested changes to file IO #375

Closed developedby closed 4 months ago

developedby commented 5 months ago

I think we can make file IO operations be simpler than they are.

For read and seek, we can either receive a U24 or a pair of U24, not sure which is better. Unless there's some difference between a generic read and reading a char that I'm not aware of, we can implement it directly in Bend. Also, we can implement read_line in Bend instead of in HVM.

I think with this we can do all the operations while commiting to the minimum set of HVM functions.

It would be nice if all the IO functions were documented somewhere.