Dima
yo guys maybe you should hire admins kinda only seniors or strong middles?
BinaryByter
@roxifas
Mat
yo guys maybe you should hire admins kinda only seniors or strong middles?
If you notice a bad behaviour from an admin, /report it :)
BinaryByter
Can you please try to write something?
BinaryByter
I tested something
Mat
We're near 3.9k :D
In 12 minutes 2 people left
Mat
We were 3898, now we are 3896
Dima
Can you please try to write something?
xXTel3gr4m_H4ckB0tXx.cpp ?
Roxifλsz 🇱🇹
I tested something
What did you actually test?
BinaryByter
I've heard rumors on reddit that mary bans globally
BinaryByter
so I banned you in a test group
BinaryByter
but appearently it doesnt do that
Dima
anyone know a trick for removing last messages using telegram bot? (not just simple api, but bot api).. this is kinda ot but it’s in cxx so kek
Roxifλsz 🇱🇹
but appearently it doesnt do that
No idea actually, Marie wouldn't be able to ban me here anyway
Roxifλsz 🇱🇹
I have been added by the OG group owner, so I'm kind of untouchable
Dima
nah I don’t have ids
Dima
thats why I asked
Marie
Notes in chat: - cpp - cppbook - goodcodingmentality - goodgoogling - googleit - hownottoask - ide - learn - meta - noendl - offtopic - ot - projects
Mat
Not so much imho for basic stuff
Ariana
When you realize your integer is overflowing
Ariana
and pretty sure that long wont
BinaryByter
enable integer errors
Roxifλsz 🇱🇹
enable integer errors
Woah woah, first time I hear of this
Roxifλsz 🇱🇹
Brb googling the shit out of that
Ariana
integer overflows are quite useful actually, subtraction using overflow
BinaryByter
Woah woah, first time I hear of this
there are floating point errors as well
BinaryByter
mind = blown ?
Roxifλsz 🇱🇹
enable integer errors
Are they actually called "integer errors"? I can only seem to find articles about ways of manually detecting over/underflow stuff
BinaryByter
https://www.gnu.org/software/libc/manual/html_node/FP-Exceptions.html
BinaryByter
https://www.gnu.org/software/libc/manual/html_node/Signal-Handling.html#Signal-Handling
BinaryByter
this SHOULD be it
Roxifλsz 🇱🇹
https://www.gnu.org/software/libc/manual/html_node/FP-Exceptions.html
Oh nice, so I see it's from the GNU libc, so it should work with any compiler as long as that lib is used?
BinaryByter
just remove those warning triggers before releasing
BinaryByter
else you might run into issues
Roxifλsz 🇱🇹
GAHNOO/lunix
BinaryByter
klimi
Hey
Anonymous
Thanks
Ariana
Usually you don’t need such large numbers
Ибраги́м
I hate those ppl who ask for pdf
The idea of asking for pdf* Hating pple cos they asking for pdf far too much.
Ariana
Memory usage
Ariana
Anyways working with large integers just use gnu bignum
olli
Be aware long can have the same size as int
Ariana
Yeah cuz int is just at least 2 byte, long at least 4 byte. Typically int is like 4 bytes?
olli
The standard says " There are five standard signed integer types :“signed char”, “short int”, “int”, “long int”, and “long long int”. In this list, each type provides at least as much storage as those preceding it in the list" http://eel.is/c++draft/basic.fundamental#2
olli
If you need a fixed sized integer of 64bit use int64_t, if you need at least 64 bits you can use int_fast64_t or int_least64_t
数学の恋人
hey everyone, can someone tell the major difference between C++ and Java, as my friend is in misery that Java is better than C++.
Ariana
Java syntax is just painful to read Main difference though, ignoring syntax, is java compiles to java byte code which can be run anywhere as long jvm is installed. C++ compiles to an executable, which may work for one os but not another. Elf, exe, macho, all the arm varients
olli
hey everyone, can someone tell the major difference between C++ and Java, as my friend is in misery that Java is better than C++.
They are completely different. Regarding execution C++ is compiled to an executable, Java instead is compiled to a bytecode that a virtual machine (JVM) executes On language level, java is object oriented, even your main function needs to be inside a class. C++ however is multi-paradigm, it can be e.g. procedural, functional or object oriented. Syntax wise both are c-like languages. Java has no deterministic object lifetimes and does not support pointer
Ariana
oh yeah java is forced oop
数学の恋人
Ariana
Actually recent java updates makes java’s speed and memory comparable to c++, though c++ should be more memory efficient. Compiler optimisation is another thing to take care of
olli
yeah I think so, but still C++ is more memory efficient right?
Yes, the memory management in Java is performt by the JVM. Since every object, even wrapper classes around primitive types need to be heap allocated the JVM is likely to allocate huge amounts of memory. Since the huge amount of memory belongs to the JVM allocating new objects is very fast since it can place them in this block.
数学の恋人
and on low level
olli
While C++ does everything in raw manner
Well the thing is C++ allows you to do it your way. You can also use memory pools in c++. Allocate a huge block of memory and place objects there. Depending on the use case this might be way faster then many small allocations
数学の恋人
I got that point
olli
Which I think make C++ faster than Java
Java has a JIT compiler that allows optimizations during runtime. But execution speed depends on several things, the best way would be to measure. In most cases I measured C/C++ was faster
数学の恋人
oh
Ariana
Similar to how arrays are faster than linked list i think also memory allocation for small chunks uses fast bins, which are just linked lists
olli
An advantage of Java might the the platform and system independent ABI. Compiling a pure Java library on Linux, the binary can be reused on Mac and Windows. Through the use of the JVM snd the defined bytecode you can possibly mix different JVM languages as well. Using C++ you might even have to recompile your library for each compiler since their ABIs differ
olli
Btw, why does your friend think java is better?
数学の恋人
Btw, why does your friend think java is better?
I don't understand that myself. He says that Java is better for learning purpose that's all
Ariana
It’s quite inflexible imo
数学の恋人
Thanks I'll explain him later on