Input/Output of data to/from a system. This usually implies file storage or network communication, but may also mean interaction with a user through a user interface.

learn more… | top users | synonyms

40
votes
5answers
4k views

Critique of the IO monad being viewed as a state monad operating on the world

The IO monad in Haskell is often explained as a state monad where the state is the world. So a value of type IO a monad is viewed as something like worldState -> (a, worldState). Some time ago I ...
5
votes
2answers
731 views

Design pattern for an automated mechanical test bench

Background I have a test fixture with a number of communication/data acquisition devices on it that is used as an end of line test for a product. Because of all the various sensors used in the ...
0
votes
3answers
229 views

Reading input all together or in steps?

For many programming quizzes we are given a bunch of input lines and we have to process each input , do some computation and output the result. My question is what is the best way to optimize the ...
3
votes
1answer
2k views

How to read from a database, and write to a file asynchronously / non blocking way in Java

I'm trying to modify a serial program that reads from a database, and writes results to a file, this is done in a blocking way and I think we can get performance boost of there is a memory buffer and ...
3
votes
5answers
6k views

Sharing buffer between multiple threads

I had a job process that was executing a lot of IO to read and write temporary files. Now I want to (need to) reduce the quantity of IO executions. So I want to create a sort of circular buffer ...
0
votes
1answer
566 views

Reading a character from a file stream in c++ (AKA: Why no C++ standard equivalent of old conio.h)?

This is a question of about design decisions. I find that there are so many different things I work on where reading a _kbhit() is amazingly useful but I can't find (read: there isn't) any ...