hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

8.9K
active users

questions that can really derail a sunday evening:

is std::cout thread-safe?

(not in the way you'd want it to be, no)

Consider this code. One thread repeatedly prints the number 100 in decimal to std::cout. Another thread repeatedly prints the number 0x100 in hex (which will output as '100') to std::cout.

You might reasonably expect that the output will simply be '100' over and over and over.

Unfortunately, the calls to operator<< can get interleaved so you end up with crosstalk of the format specifiers:

Cassandrich

@luna The whole modal formatting thing is gratuitously stupid. It's slower, uglier, and had awful gotchas like this compared to printf.