Wim
Auch, I so get that problem!
Wim
I wanted to move too but I'm bound here due to my kids
F.AM
Hi.. Did someone have experience with R Shiny dashboard ?
Wim
Depending on the kind of bios though, you can either check the BDA/EBDA/CMOS/NVRAM for settings
Wim
Ludovic, isn't there a way they'll support you moving without being difficult or even have them move with you?
Telvin
*recommendations
Daniele°
It doesn't have stack allocation of objects
in C object are structure and you can allocate in stack. In C++ are class, a special type of structure.
Anonymous
int a = 10; int a(10); int a{10}; Which declaration type have less runtime complexity..? Means less space complexity and time complexity..
Daniele°
{ struct abc a; } If struct abc is big it's allocate on stack, otherwise in register
Ludovic 'Archivist'
{ struct abc a; } If struct abc is big it's allocate on stack, otherwise in register
Yes, but if you declare an object in C# it declares on the stack a pointer to that object, never the object itself
Wim
{ struct abc a; } If struct abc is big it's allocate on stack, otherwise in register
In register if its small enough and if your compiler is smart enough and can cope with that
Daniele°
Yes, but if you declare an object in C# it declares on the stack a pointer to that object, never the object itself
Object in C is a instance of structure. Object in C++ is a instance of classe. C and C++ are two different language with different meaning of object
BinaryByter
In register if its small enough and if your compiler is smart enough and can cope with that
also, if its a one var struct, unless you can easily unpack the var
Daniele°
struct abc{ int v; }; struct abc foo(void){ struct abc a= {.v=1}; return a; }
Daniele°
And other
Wim
Do you even know why I said Ludovic was right with his claim the first CPP was a superset of C?
Daniele°
This is valid C++
int* a = malloc(sizeof(int));
Dima
Ludovic 'Archivist'
int* a = malloc(sizeof(int));
This is not valid C++ but have nothing to do with objects
Daniele°
This is not valid C++ but have nothing to do with objects
sizeof('a') != sizeof('a')
olli
Daniele°
?
sizeof return different size between C and C++
Ludovic 'Archivist'
Daniele°
Not for primitive types
'a' is primitive?
Ludovic 'Archivist'
Actually C and C++ may actually not even use bytes of 8bits
Ludovic 'Archivist'
It is unspecified
BinaryByter
wtf are they doing in C++20?
olli
sizeof(char) is 1 in both C and C++ C++ 8.3.3 C 6.5.3.4
Ludovic 'Archivist'
'a' is primitive?
Yes, and those sizeof return both 1
Daniele°
Try
Ludovic 'Archivist'
But not sizeof('a')
My bad, both are ints
BinaryByter
sizeof(char) is 1 in both C and C++ C++ 8.3.3 C 6.5.3.4
the only type that is standardized 😢
olli
the only type that is standardized 😢
no, int and float and standardized as well. the size is not
Daniele°
int main(){ printf("%lu\n",sizeof('a')); return 0; } Build on C and C++
BinaryByter
if I remember correctly, the only constraint is that int must be bigger than short which is bigger than char
BinaryByter
or something
Ludovic 'Archivist'
Language: c Source: int main() {printf("sz=%d", sizeof('a'));} Warnings: source_file.c: In function ‘main’: source_file.c:1:13: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] int main() {printf("sz=%d", sizeof('a'));} ^ source_file.c:1:13: warning: incompatible implicit declaration of built-in function ‘printf’ source_file.c:1:13: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ source_file.c:1:20: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=] int main() {printf("sz=%d", sizeof('a'));} ^ Result: sz=4 Note: gcc assumed, other valid options are clang, visual_c, you can be more specific next time.
BinaryByter
I don't trust gcc
Mihail
...
Daniele°
1
BinaryByter
oh wait that was C
BinaryByter
okay, then nvm
BinaryByter
...
Well, you see, in C++, the size of a char is well defined, so it not behaving like it is defined, would point to gcc being shit 😉
Ludovic 'Archivist'
1
Do you know why?
Daniele°
Yes
Ludovic 'Archivist'
Because in C it is undefined behaviour
BinaryByter
😂
Ludovic 'Archivist'
*pat pat*
*headpats*
Ludovic 'Archivist'
😂
C++>1.0 is not a superset of C, C++ 1.0 is
klimi
*headpats*
Thankies
Ludovic 'Archivist'
😂
And this behavior is undefined too in C++ 1.0 btw
Ludovic 'Archivist'
If you manage to find a Unix version old enough to have that
Wim
Yes!
Well.. somewhat
Ludovic 'Archivist'
Well.. somewhat
Well, it was technically made mostly of cpp macros