Anonymous
If you don't know what a vector is and how to use it and what to use it for — it's not my problem, it's yours
Anonymous
Are you blind or what? i told you THE EXACT REASON why it's not correct
You gave me that reason post factum. That's pretty much what relegion does, it explains events post factum
⚛ Hz
(you can literally put RAII resources into vector.. but why "another process"?
Anonymous
Dude, please learn some stuff first :)
I can say the same to you, can't I?
Anonymous
I can say the same to you, can't I?
At least I know what a vector is lol
Anonymous
At least I know what a vector is lol
I'm really curious, would you mind to share your definition of vector?
Anonymous
I'm really curious, would you mind to share your definition of vector?
std::vector is a sequence container that encapsulates dynamic size arrays.
Anonymous
So it's banch of memory, isn't it?
Anonymous
I can say the same to you, can't I?
It's just so you "I can't use a vector for a case it's not supposed to be used to"
Anonymous
So it's banch of memory, isn't it?
No, it's a container of objects :)
Anonymous
No, it's a container of objects :)
Isn't map a container of objects?
Anonymous
You have no clue how C++ memory model works
Anonymous
Seems more than you :)
Anonymous
If you think that a vector is just a bunch of memory
⚛ Hz
If you want to use stl container as buffer, maybe string is a better choice, at least it has defined behavior for .data()
Anonymous
You have no clue how C++ memory model works
Really where did you find ANYTHING related to memory model in these comments?
⚛ Hz
(but &vec[0] for standard layout element should also be defined)
Box of
Anonymous
Now I'm tired After your statement about bunch of memory I totally don't want waste time arguing with you
Anonymous
Good night
Anonymous
Be a good boy, @dkuch_us
Anonymous
Now I'm tired After your statement about bunch of memory I totally don't want waste time arguing with you
You know the problem here is: my statement is correct (vector is a continuous peace of memory). But your statement about memory model does not have anything related to this topic
Anonymous
my statement is correct (vector is a continuous peace of memory)
Anonymous
It is not correct
Anonymous
Ok, continues peace of memory plus O(1) additional info
Anonymous
Still not correct
Anonymous
Vector is a contiguous container of objects
Anonymous
It's not about memory
Anonymous
Everything in C++ is an object (except references and functions)
Sandro
It could but not.... You can represent or as a contiguous byte of memory, but physically can be discontinuous...
Anonymous
Even this was UB until C++20 int* a = (int*)malloc(sizeof(int)); *a = 5;
Anonymous
I don't know, I want to sleep. bye
Anonymous
But if you want to share resources between processes use tools that were DESIGNED for that
Anonymous
Vector is not designed to be shared
⚛ Hz
Wait, it is about sharing memory across process, I probably know where the dispute is
Anonymous
C++ doesn't even have a definition of process
Anonymous
There is no such a term in c++ as a process
Anonymous
https://t.me/programminginc/365448
Anonymous
I gave an example
Anonymous
In Linux or Windows or any sane OS it exists
Anonymous
Your example is not correct, because you used a vector for a case it's not designed for Do you understand it?
⚛ Hz
(but in theory, you could build a *shared memory allocator* for that purpose
Anonymous
And what does it prove?
Anonymous
Signals are another example of IPC
Anonymous
So, technically some sort of external effects exist in c++
Igor🇺🇦
BTW, signals exist in c++
What signals exist in a standard C++?
Anonymous
What signals exist in a standard C++?
https://en.cppreference.com/w/cpp/utility/program/signal
⚛ Hz
(but in theory, you could build a *shared memory allocator* for that purpose
(I used use string as a general dynamic memory algorithm library for my toy JIT engine's executable memory(to make sure no memory leaks), it seems to be a completely legal usage...
Igor🇺🇦
https://en.cppreference.com/w/cpp/utility/program/signal
This is signal handler. For OS signals. not C++ signals. It's more POSIX related than C++.
⚛ Hz
https://eel.is/c++draft/support.signal
Igor🇺🇦
It's in standard C++
Yeah, I mean it's only handler. It's not like you can send a signal or something and have async flow. I was thinking more like https://theboostcpplibraries.com/boost.signals2-signals Or https://doc.qt.io/qt-5/signalsandslots.html
Igor🇺🇦
Async/await exist in c++ 20
Yes, co-routines and signal/slot are not the same. With proper signals/slot you can easily create asynchronous observer pattern. Co-routines is something different.
Akshay
Any idea about project in C
MRT
The variable defined by &, means variable is reference So what does this mean? const int& x = 50; We defined the reference variable with a number. What is this variable referring to now?a
MRT
50 🤷‍♂
Now I understand that this is only for the const
MRT
What? Why?
int &x = 50 ; not working
Hanz
int &x = 50 ; not working
Oh yeah, i just try that 😅👍
MRT
One can give an example of this book sentence with a code (It is important to remember that there is no guarantee that an object pointed to by a pointer to const won’t change.)
Prince Of Persia
is C-- is a good language?
Prince Of Persia
I'm not joking!
Hanz
is C-- is a good language?
Is that even a language
Prince Of Persia
Prince Of Persia
Is that even a language
https://en.wikipedia.org/wiki/C--
Hanz
https://en.wikipedia.org/wiki/C--
I dont see that related to C++ though
Prince Of Persia
I dont see that related to C++ though
that is low leveler than C
Hanz
that is low leveler than C
So? You want to teach me eh?
Prince Of Persia
So? You want to teach me eh?
I just asked is it good for programming?