« first day (3675 days earlier)      last day (1497 days later) » 

01:31
 
4 hours later…
05:11
Is it cool to act like you're apathetic? (I need to know.)
 
2 hours later…
07:08
so i installed raspios on a rpi4 and also a rpi3...the 3 has xorg and lightdm running..what gives
07:24
and the rpi4 doesn't?
no..confirmed with htop: pi3 is using loke 40 more megs of ram (what caused me to notice) and has xorg + lightdm running..
tested ssh with -X and i can run a gui app and it pops up on my machine.
same image installed to both pis.. :/
 
3 hours later…
10:50
I find both rPi3 & rPi4 are fairly powerful for the things I need to do - connecting to the web, self driving a toy car. But not fast enough to train a neural network.
 
2 hours later…
12:35
Hello
13:20
I'm trying to conditionally use std::identity but there doesn't seem to be a feature-test macro
It should be __cpp_lib_concepts since it's from the same paper, but it definitely doesn't feel right and apparently isn't even respected in standard libraries
Looks like I will have to go the "check every compiler" road
 
2 hours later…
15:25
Hi
Hello
is this the place to cry about C++ multithread programming?
If you're there to cry and complain it's definitely the right room
If it's for technical questions and help there is another room :p
that's great
the other room is just for the Élite
now going to the actual prayer
how to pass an atomic<bool> var to an async thread?
The help & questions one? Not really, it was just to redirect the help content to another room because this lounge was already crowded enough without trying to help people
15:28
std::async(std::launch::async, apiCall, param1, param2, run); where run is the atomic bool
in prayers we ask for forgiveness, praise our fait and forecast future knowledge. That's exactly what my question is all about. After all, we're talking about C++ futures
Does std::async involve futures?
it returns a future
Wow, it does, I realize I've not used the "evolved" parallelism and concurrency futures of the standard library
Just std::thread and std::atomic
std::async is a good abstraction for threads
however somehow it doesn't accept an atomic parameter
std::ref maybe?
15:34
nop
std::string apiCall(std::string url, std::string data, std::atomic<bool> run);
I thought that booleans were mostly used for lockless inter-thread synchronization there, copying them feels odd.
if you need to exit a thread that's the only way
Why pass an atomic and not just a bool?
Not judging btw, I just have poor intuition about parallelism and easily get confused
16:09
I would need to use a mutex
What I mean is why don't you pass a reference or a pointer to the atomic bool? If you have a copy in each thread it seems that you can't synchronize between threads since it's then two different objects.
16:35
the compiler doesn't accept that somehow
it says async cannot have an atomic parameter
Interesting
 
3 hours later…
19:59
@Washery it can't have a non-movable/copyable parameter
both std::thread and std::async enforce value semantics into them
20:27
@Morwenn It returns a future that blocks in its destructor. So calling async is blocking if you don't store the future in a variable.
It's a big mistake. Or at least controversial.

« first day (3675 days earlier)      last day (1497 days later) »