Show newer

In general, this function is "read one whole message from the transit buffer":

val read_msg : Buffer.t -> msg option

Show thread

A key function we need is:

val read_available_lines : Buffer.t -> string list

Show thread

Application: receive printable data from parallel workers and print each line uninterrupted.
We need to read all the data available from each worker so they don't get stuck in the middle of a long line but only print the data one whole line at a time.

Show thread

Actually, wrapping around out_channel is possible, with a little bit of care: use a Buffer.t to accumulate bytes, and flush right after writing the contents of the Buffer.t to the out_channel. The out_channel will sometimes be flushed more than once in this operation but it doesn't matter.

Show thread

Do you know what I could use right now? A buffered output channel that flushes only when explicitly flushed by the program. Does have this? I.e. out_channels that don't get full.

All these people with tattoos will look so outdated 20 years from now. Heh, your body, your choice, or whatever.

A combination of ignorance, hatred, and lack of critical thinking in the same person is a dangerous combination even though each of these traits alone is common and widely dismissed as being no big deal. And these have nothing to do with a lack of empathy or good intentions!

Nextdoor is not a fascist social network. That would be exaggerating.

I want longer days. 26 hours at least. My optimum could be even 30 or 36 hours.

Show older
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.