BinaryByter
but it vould be equivalent to char
Ludovic 'Archivist'
but it vould be equivalent to char
In size, not in speed (on x86)
Avezy
You get sso
Ludovic 'Archivist'
You get sso
But only for a couple of DWORD to QWORD at best
BinaryByter
In size, not in speed (on x86)
why so? most compilers optimize bools to chars
Ludovic 'Archivist'
Aka, 8 to 16 bools SSOed
BinaryByter
Aka, 8 to 16 bools SSOed
kinda useless if you ask me
Ludovic 'Archivist'
why so? most compilers optimize bools to chars
No, bools are always chars BUT in a bitset or in a vector<bool>
BinaryByter
message belong together
Ludovic 'Archivist'
+kinda useless since bool has no defined size
Bool have a defined size of 8 bits
BinaryByter
Ludovic 'Archivist'
There is de facto no implementation with a size for bool inferior to 1
BinaryByter
there must be one somewhere on some madman's computer
Ludovic 'Archivist'
BinaryByter
How do you store a bool in 0 bytes?
you could store a bool in a bit
Ludovic 'Archivist'
you could store a bool in a bit
A bit is ceiled to 1 byte
BinaryByter
+ having a bool bigger than that would still make it ub
BinaryByter
Avezy
https://youtu.be/SDJImePyftY
Ludovic 'Archivist'
This means that the sizeof bool can be any value but 0
Ludovic 'Archivist'
https://youtu.be/SDJImePyftY
I sometimes use it with a class enum that inherits from uint8_t to make network packets
Avezy
Thats also in this Talk pretty unconventional solution but works pretty well
Ludovic 'Archivist'
confession time
It makes it unable to type match with a char yet makes it a neutral 8 bit element with no operations
BinaryByter
oh
Ludovic 'Archivist'
oh
Then you can make substrings of that to be used for matching flags et al without a care for endianness
Ludovic 'Archivist'
And make extractors from iterators that give you a correct endianness for network elements
BinaryByter
lmao
Ludovic 'Archivist'
String has some nice superpowers
BinaryByter
i need to learn about networking sounds fun
Ludovic 'Archivist'
i need to learn about networking sounds fun
Networking is like a vibrating butt plug, not everyone likes it
Ludovic 'Archivist'
You can quote me on that one
Anonymous
Hi
Anonymous
i click it already~
Aimal
I created a program in, that can change Windows password automatically in cpp
Hi friends, could you help me on this question?
Make a program that reads a number n and prints n lines on the screen in the following format: (example if n=6)
master
Simply using 2 for loops... Print + when i==j else *
Over-engineering
/notes
Ariana
can you recommend any books?
Trying and messing around with c++ is much better than any books once you learnt how to use it
Ariana
I created a program in, that can change Windows password automatically in cpp
i wrote a 9 character program that crashes computers
Jumanazar
coders never ask simple questions! use google for this purpose.
Stefan
if (halt) for (;;); else return;
Stefan
this a simple question?
Jumanazar
this a simple question?
Now look at it yourself. Did he ask a question like that?
Stefan
what do you mean by simple then
Stefan
nothing is simple
Stefan
there are many fundamental differences in c/c++
Stefan
the programming paradigm is already very different
Stefan
you dont have ownership in c
Stefan
there are no generic in c, which is very painful to deal with when writing a c++ parser
Jumanazar
what do you mean by simple then
asking what is the difference of a and b is a dumb question I believe. rather ask why they use classes and structure in c++ and c respectively would make some sense though it is better to search for about it on google. google is made for asking questions!
Jumanazar
I mean why does not he try first self searching the problem on the internet and then ask some specific questions?
Stefan
what's the difference between java and c#
Jumanazar
come on
Jumanazar
is this channel for discussing differences of general languages ?
Stefan
what's the difference between apple and orange then?
Jumanazar
I encourage you guys to do a self search on the internet first and then ask specific questions.
Stefan
specific question is specific, philosophical question is philosophical
Jumanazar
specific question is specific, philosophical question is philosophical
Here is an answer Have you watched "3 idiots"? I remember a short quote of the "ViruS" professor in that movie saying "You are interested in arts and languages (and phylosophy? — as it is in the same branch) ? Then change your major to humanities!" :)))))
klimi
Hello there
Anonymous
Yeah
K
Hi
K
Can anyone tell how to make software
K
How
K
M new to all this
K
Plz explain