hkaiser changed the topic of #ste||ar to: STE||AR: Systems Technology, Emergent Parallelism, and Algorithm Research | stellar-group.org | HPX: A cure for performance impaired parallel applications | github.com/STEllAR-GROUP/hpx | This channel is logged: irclog.cct.lsu.edu
<gonidelis[m]>
>The implicitly-defined special member functions are typically incorrect if the class manages a resource whose handle is an object of non-class type (raw pointer, POSIX file descriptor, etc), whose destructor does nothing and copy constructor/assignment operator performs a "shallow copy" (copy the value of the handle, without duplicating the underlying resource).
<gonidelis[m]>
trying to trigger this behavior.
<gonidelis[m]>
K-ballo: hkaiser why isn't my example doing what the statement says
<gonidelis[m]>
statement is from the "rule of three"
<hkaiser>
gonidelis[m]: what do you expect it to do?
<gonidelis[m]>
shallow copy
<hkaiser>
what is shallow copied?
<gonidelis[m]>
if the pointer is not duplicated
<hkaiser>
huh?
<gonidelis[m]>
then when i change one's pointer, the other pointer should be affected too, no?
<gonidelis[m]>
i
<gonidelis[m]>
i, is supposed to be shallow copied
<hkaiser>
with struct foo {int* i; }; , foo a; foo b = a; will copy the whole foo, wouldn't it?
<hkaiser>
so b.i == a.i
<gonidelis[m]>
well since i copy assignment is implicit i thought it wasn't done correctly, per cppref
<hkaiser>
why should the implicit copy ctor/assignment do something wrong?
<gonidelis[m]>
... a resource whose handle is an object of non-class type (raw pointer, POSIX file descriptor, etc), ...
<gonidelis[m]>
The implicitly-defined special member functions are typically incorrect
<hkaiser>
sure, copying foo will copy all it's members, so it will copy the pointer
<gonidelis[m]>
just trying to parse cppref here
<gonidelis[m]>
so what is cppref suggesting that is wrong with implicit copy assignments?
<hkaiser>
well, they are incorrect because you don't know which of the two (or more) instances of foo should delete the memory referred to by i
<hkaiser>
(if any)
<gonidelis[m]>
alright....
<gonidelis[m]>
but you jsut said i have two i's, right?
<gonidelis[m]>
so each foo is deleting its own i
<hkaiser>
yes, but they point to the same address
<gonidelis[m]>
then why when derefencing them i get two different values?
<hkaiser>
because you set the second one to a different address (value2)
<hkaiser>
remove line 16 and they will both print 1
<gonidelis[m]>
wow
<gonidelis[m]>
wow!
<gonidelis[m]>
so the problem is not about what the handle (pointer) contains, but rather who (of the two) will delete it
<hkaiser>
gonidelis[m]: didn't your mother tell you not to use pointers?
<gonidelis[m]>
wow
<gonidelis[m]>
well...i wanna point out the deficiency
<gonidelis[m]>
thanks mom
<hkaiser>
gonidelis[m]: the easiest way is to visualize what's happening in memory, in your case you bitwise copy temp into temp2
<gonidelis[m]>
yes
<gonidelis[m]>
right!
<gonidelis[m]>
nice
<gonidelis[m]>
yes
<hkaiser>
so you copy one pointer-sized memory location (the bits representing the pointer) into a different pointer-sized memory location
<hkaiser>
after that, since the bits are identical, both pointers refer to the same address
<gonidelis[m]>
raw pointers are disgusting
<hkaiser>
gonidelis[m]: same happens with int's or other build-in data types
<gonidelis[m]>
yes but that does not cause any problems
<gonidelis[m]>
i mean, int's for example
<hkaiser>
correct
tufei_ has joined #ste||ar
tufei__ has quit [Remote host closed the connection]
Yorlik_ has joined #ste||ar
K-ballo1 has joined #ste||ar
K-ballo has quit [Ping timeout: 246 seconds]
K-ballo1 is now known as K-ballo
Yorlik has quit [Ping timeout: 260 seconds]
tufei__ has joined #ste||ar
tufei_ has quit [Remote host closed the connection]
tufei_ has joined #ste||ar
tufei__ has quit [Remote host closed the connection]
hkaiser has quit [Quit: Bye!]
RostamLog has quit [Ping timeout: 268 seconds]
RostamLog has joined #ste||ar
emanuele-em has joined #ste||ar
emanuele-em has quit [Client Quit]
emanuele-em has joined #ste||ar
emanuele-em has quit [Client Quit]
Aarya[m] has joined #ste||ar
<Aarya[m]>
Hi I'm Aarya and I would like to contribute to Stellar group for GSoC'23 :)
<Aarya[m]>
Going through your ideas list I found "HPX threading system for LLVM OpenMP" interesting and something which I would like to know more about too. Also another idea "Conflict (Range-Based) Locks" was pretty exciting. Can you please guide me how I can learn more about Stellar group and the projects.
nanu1605 has joined #ste||ar
tufei__ has joined #ste||ar
tufei_ has quit [Remote host closed the connection]
nanu1605 has quit [Read error: Connection reset by peer]
tufei__ has quit [Remote host closed the connection]
tufei__ has joined #ste||ar
Scofield has joined #ste||ar
K-ballo1 has joined #ste||ar
K-ballo has quit [Ping timeout: 248 seconds]
K-ballo1 is now known as K-ballo
Yorlik__ has joined #ste||ar
Yorlik_ has quit [Ping timeout: 256 seconds]
hkaiser has joined #ste||ar
Scofield has quit [Quit: Client closed]
hkaiser has quit [Quit: Bye!]
Guest7968 has joined #ste||ar
hkaiser has joined #ste||ar
diehlpk_work has joined #ste||ar
tufei_ has joined #ste||ar
tufei__ has quit [Remote host closed the connection]
<Yorlik__>
hkaiser: YT?
Yorlik__ is now known as Yorlik
Yorlik_ has joined #ste||ar
Guest7968 has quit [Ping timeout: 260 seconds]
Yorlik has quit [Ping timeout: 264 seconds]
Yorlik_ has quit [Read error: Connection reset by peer]
Nei| has joined #ste||ar
<Nei|>
Hey , YT?
<Nei|>
Hey, any GSOC participant online?
Yorlik has joined #ste||ar
<satacker[m]>
(past participant here)
Nei| has quit [Quit: Client closed]
Nei| has joined #ste||ar
Nei| has quit [Quit: Client closed]
Nei| has joined #ste||ar
Nei| has quit [Client Quit]
<Aarya[m]>
Hi
<hkaiser>
Aarya[m]: hey
<Aarya[m]>
Hi
<Aarya[m]>
So can anyone tell where to start 😅
<satacker[m]>
You can ask any doubts you have about the project that interests you
<satacker[m]>
doubts/questions
<satacker[m]>
Meanwhile can any of you work on adding fetching boost through fetch_content in the top CMakeLists so that we can have options and not depend on system installed boost
tufei__ has quit [Remote host closed the connection]
<Aarya[m]>
No args passed to cmake for now
tufei__ has joined #ste||ar
scofield_zliu has quit [Ping timeout: 248 seconds]
<hkaiser>
Aarya[m]: uhh, I have never seen this
<satacker[m]>
What branch are you on/ have you modified/experimented with anything (git diff) / have you checked /run/media/aarya/D/GSOC/23/stellar/hpx/build/CMakeFiles/CMakeOutput.log ?
<hkaiser>
TanishqJain[m]: do you run inside a Developer Command Prompt for VS?
<TanishqJain[m]>
I ran the command through command prompt and windows powershell
<hkaiser>
TanishqJain[m]: you need to use the 'Developer Command Prompt for VS' command prompt
<hkaiser>
that sets up the correct environment to find the 'cl' compiler
<Yorlik>
hkaiser: YT?
<hkaiser>
Yorlik: here
<Yorlik>
Hello!
<Yorlik>
hkaiser: I just wanted to ask when you might be able to waste some time - I guess I just need to go through some basic conceptual questions as a refresher for this spatial search thing.
<Yorlik>
managing 6D space can get a bit confusing - though I guess I sorted most of it out already.
<hkaiser>
Yorlik: I'm running around all weekend again :/
<hkaiser>
we can try to play it by ear Sunday afternoon (my time)
<Yorlik>
hkaiser: There's not hurry. I'll try to catch you sunday.
<TanishqJain[m]>
<hkaiser> "Tanishq Jain: you need to use..." <- hkaiser: Sure I will run it through VS
Guest79 has joined #ste||ar
Guest797 has joined #ste||ar
<hkaiser>
TanishqJain[m]: just VS's command prompt would be sufficient