olli
Hi guys what does this mean: 1<<14
You shift 1 by 14 to the left. The binary representation looks like 0000 0000 0000 0001 for now. For each left shift you move 1 a position to the left so in the end you have 0100 0000 0000 0000. Each left shift doubles the value.
BinaryByter
Hi guys what does this mean: 1<<14
it shifts the number "1" by so and so many positions in the bit representation
Joe
Thank you guys very much that makes sense
Anonymous
How to calculate length of character without using " String "
Anonymous
Character word
Ludovic 'Archivist'
Ludovic 'Archivist'
Character <=> Codepoint
klimi
hi ludo
BinaryByter
Character <=> Codepoint
what's a codepoint?
Ludovic 'Archivist'
8bit
char =/= character
BinaryByter
BinaryByter
sorryyyy ;_;
Anonymous
How to count length of word without string
Ludovic 'Archivist'
How to count length of word without string
Count code points (not chars) until you find a character that matches isspace
Ariana
And then different languages :>
Raghu
R: Why do we need namespace in C++? Can we write programs without using namespace? Where do we find it's Real time application?
BinaryByter
look at the codce there
olli
R: Why do we need namespace in C++? Can we write programs without using namespace? Where do we find it's Real time application?
To separate and modularize code. You can have classes with the same name in different namespaces.
Raghu
Thank you.
Raghu
Where do we need to use Union, apart from memory saving apply?[real time application]
olli
Where do we need to use Union, apart from memory saving apply?[real time application]
To reuse memory for different purposes (saving memory). Some might answer to "map different data types", however this it neither defined by C nor by C++. I would advise against it.
Anonymous
What is Ajax (programming) ? Why HTML CSS JavaScript need Ajax code ?
Roxifλsz 🇱🇹
Marie
What is Ajax (programming) ? Why HTML CSS JavaScript need Ajax code ?
Rohit has 1/3 warnings... watch out! Reason for last warn: this isn't a web development group
Roxifλsz 🇱🇹
What is Ajax (programming) ? Why HTML CSS JavaScript need Ajax code ?
But to answer that, Ajax is asynchronous network requests, usually used by webpages to get more data from a server
Anonymous
Am just asking dude !
Roxifλsz 🇱🇹
Am just asking dude !
Sure, but this is very obviously not the group to ask webdev questions
Otumian
then, learn that you should use C# for ui
C#?? Isn't there an alternative?
BinaryByter
Qt is disgusting
klimi
because he said so
Ибраги́м
template <class T,class T2,int32_t N1,int32_t N2> inline void copy_array(T(&src)[N1], T2(&dest)[N2]) { std::copy(std::begin(src), std::end(src),std::begin(dest)); } This is a time bomb steadily ticking! Why?
BinaryByter
Why?
have you worked with it already?
Otumian
I tried once you use the win32 API and I was like why did they write it that way..
Paulo
have you worked with it already?
Yeah seems very friendly (high lvl shit)
BinaryByter
Yeah seems very friendly (high lvl shit)
no... it's not firendly
Otumian
I am supposed to take about 6 to 10 students and introduce them to the core c++ and a guide frame work.. I have started with them.. but I'm wondering about the guide framework.. a simple and easy to pick
Otumian
And c# will be a long
BinaryByter
then, gtk
Otumian
Maxi, have you tried gtk
Ибраги́м
Because out of bounds memory access
Bingo, that's why u need multiple compilers and do some runtime analysis to prevent subtle bugs. Clang Segfaults, GCC doesn't prolly stop where dest ends OR just time bomb C++17 to the rescue: template <class T, class T2, int32_t N1, int32_t N2> inline void copy_array(T(&src)[N1], T2(&dest)[N2]) { if constexpr (N1 < N2) /// rhs > lhs std::copy(std::begin(src), std::end(src), std::begin(dest)); else std::copy(std::begin(src), std::begin(src) + N2, std::begin(dest)); }
Anonymous
well , c++ isn't the best option for ( something simple )
why you would bother with cpp at all , pick js or python if you want something simple and in general , afaik there are nothing like " simple framwork " but what you can do is you can simplify the concepts of a framwork you know
Ludovic 'Archivist'
I generally present that one since it allows to do web development and is /fairly/ simple to learn for beginners
Roxifλsz 🇱🇹
Qt is disgusting
You're probably against the Qt moc? Anyway I find Qt to be the best choice in native GUI toolkits
Otumian
Why do u like Poco ?
Let me enlighten myself on poco
Ludovic 'Archivist'
C++ can generate some pretty amazing types with templates
Ludovic 'Archivist'
cl::function<cl::curry_t<test_002::test_002()::<lambda(int, int)>, int> >(cl::curry_t<test_002::test_002()::<lambda(int, int)>, int>((func, test_002::test_002()::<lambda(int, int)>()), p))
BinaryByter
which is Why I chose C#
Ибраги́м
which is Why I chose C#
Multi-Platform bites u in the butt
BinaryByter
Multi-Platform bites u in the butt
which Is why I use mono
olli
does std::min have compile-time guarantees in C++14 ?
yes, constexpr has been added in c++14
Ибраги́м
Ибраги́м
yes, constexpr has been added in c++14
if constexpr is more clearer ofr my use case, and most use cases 'cos I need the value of std::min to assigned in @ least two different places... Seems like a work for if constexpr
olli
if constexpr is more clearer ofr my use case, and most use cases 'cos I need the value of std::min to assigned in @ least two different places... Seems like a work for if constexpr
so this might be really subjective.. I like the single line better, imo it's easier and faster to read, faster to write and code duplication is minimized Depending on coding guidelines (e.g. not to omit optional {}) the if - else construct can become quite clumsy
Otumian
which Is why I use mono
Maxi.. you used mono?
BinaryByter
ye
Otumian
Ok..
Marie
Purge complete.
Dima
you’ll also need ten Ph.D s
BinaryByter
klimi stop purging!
aura_
Joking or serious ?
BinaryByter
100% serious
BinaryByter
you CANNOT program if you haven't studied
BinaryByter
😏
klimi
go OT