Ludovic 'Archivist'
I will repeat it again, but c++ is actually 5 languages hidden under a trench-coat
Anonymous
Virtual private networks
Anonymous
yes if citations are there
There's no citation to this one
Anonymous
There is a difference in "being an extension" and "started as an extension"
数学の恋人
lol Bjarne meant verbally, people are taking it literally
Prince Of Persia
Good conversation guys I learned a lot
Prince Of Persia
Thank you all
Ludovic 'Archivist'
What best book to read as a programmer?.
Clean code by Robert Martin The Pragmatic Programmer by Dave Thomas
Ludovic 'Archivist'
What best book to read as a programmer?.
No language specified triggered a language agnostic answer
数学の恋人
You mean snake_case or CamelCase ?
I used to prefer snake_case, but Go made me use CamelCase
Shvmtz
GNU is not an only compiler for C or C++
Can gcc support compilation for latest standard C ?
Ludovic 'Archivist'
I am salty at gcc because its optimizer has an annoying bug
mov $22, %rax
You mean snake_case or CamelCase ?
That depends, I mean that generally the first letter is lower case
Prince Of Persia
Which languages are support in GCC?
Ludovic 'Archivist'
Which languages are support in GCC?
C, c++, d, go, ada, fortran, and some others
Prince Of Persia
Ludovic 'Archivist'
C, c++, d, go, ada, fortran, and some others
Objective-c is the one I forgot
Prince Of Persia
I thought g++ is for C++
Ludovic 'Archivist'
Prince Of Persia
g++ is part of gcc
Oh I didn't know
Ludovic 'Archivist'
Gcc means GNU Compiler Collection
Shvmtz
Yes
Which compiler do you prefer to use for C++ ? @unterumarmung @QNeko
Anonymous
Clang, MSVC and GCC
Ludovic 'Archivist'
Which compiler do you prefer to use for C++ ? @unterumarmung @QNeko
Because of this bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42587 Because of that, Clang
Ludovic 'Archivist'
frigging GCC making a first byte of an union a bitfield ref fucking the optimizer over
Ludovic 'Archivist'
fun fact, this bug was fixed in a release in 2016 for an entire month, then was reverted
Anonymous
Because of this bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42587 Because of that, Clang
As much as I loathe Apple, I must admit that CLang is a great tool
Ludovic 'Archivist'
As much as I loathe Apple, I must admit that CLang is a great tool
Clang is not an Apple project, and they mostly use an outdated version of it
Ludovic 'Archivist'
Check llvm
AFAIK llvm is not apple it is uni of illinois
Ludovic 'Archivist'
Saying llvm is apple is like saying gcc is a Linux foundation project
Igor🇺🇦
Clang is not an Apple project, and they mostly use an outdated version of it
Clang and was started by Apple when gcc moved to GPL3. and because of architecture that makes adding new backends very difficult.
Anonymous
GCC is a terrible compiler
Anonymous
Half the time the optimizer breaks code
Anonymous
Debugging is a slippery slope
Anonymous
Security is nonexistent. Modern exploit mitigations are absent
Igor🇺🇦
GCC is a terrible compiler
Why do people like you make shit up? 🤦‍♂️
Anonymous
Anonymous
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<time.h> #include <curses.h> int** allocArrayMatrix ( int nl, int nc); void showArrayMatrix(int ** a, int nl, int nc); void formArray(int ** a, int nl, int nc); int SumArray(int ** a, int nl, int nc); void freeMemoryArray(int** a, int nl); int main() { int **a, nl=10, nc=10; int f; int *p; a = allocArrayMatrix(nl, nc); if (a == NULL) { puts("Memoria p/u tabloul 2-D nu a fost alocata"); } else { puts("Memoria a fost alocata cu succes"); } formArray(a,nl,nc); printf("\nTablul bidimensional format:\n "); showArrayMatrix(a,nl,nc); p = SumArray(a, nl,nc ); for (f=0;f<nc;f++){ printf("%d\t",*(p+f)); } freeMemoryArray(a,nl); } int ** allocArrayMatrix( int nl, int nc) { int i; int** a=(int **)malloc(nl*sizeof (int*)); if (a==NULL) return a; for (i=0; i<nl ;i++) {a[i] =(int*)malloc(nc*sizeof(int)); if (a[i]==NULL) return NULL; } return a; } void showArrayMatrix(int ** a, int nl, int nc) { int i,j; for (i=0;i<nl;i++){ for (j=0;j<nc;j++) { printf ("%d\t", a[i][j] );} printf("\n"); } return; } void formArray(int ** a, int nl, int nc) { int i,j; for (i=0;i<nl;i++){ for (j=0;j<nc;j++) a[i][j] = rand()%100-50 ; } return; } int SumArray(int ** a, int nl, int nc) {int i,j, Sum; static int b[10]; for (i=0; i<nc; i++){ Sum = 0; for (j=0;j<nl;j++){ Sum = Sum + a[j][i]; } b[i] = Sum; } return b; } void freeMemoryArray(int** a, int nl) { int i,j; for (i = 0; i < nl; i++) { free(a[i]); } free(a); } I have a problem, Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
use a paste site
Ludovic 'Archivist'
Clang and was started by Apple when gcc moved to GPL3. and because of architecture that makes adding new backends very difficult.
Absolutely wrong. Clang was created by Vikram Adve and Chris Lattner at the University of Illinois, Apple started using it after hiring Lattner
Ludovic 'Archivist'
Security is nonexistent. Modern exploit mitigations are absent
You have the same hardening as on clang since gcc 7
Ludovic 'Archivist'
But I have to say that the optimizer of gcc indeed is broken tbh
Igor🇺🇦
When, where... And what?
Why are you asking for any facts when you have an "expert" opinion from @clannad? 😂 Apparently, the most popular compiler in the world, breaks software half of the time 🤷‍♂️
Ludovic 'Archivist'
More than 70% market share
Ludovic 'Archivist'
And terrible too, with the worst optimizer on the market
Anonymous
More than 70% market share
How do you measure compiler market share?
Ludovic 'Archivist'
How do you measure compiler market share?
Number of developers using it according to the devs themselves, stackexchange tags, tiobe and other indices
Ludovic 'Archivist'
Link it
You should find more than enough if you read through this page http://blog.davidecoppola.com/2018/02/market-share-most-used-c-cpp-ides-in-2018-statistics-estimates/
Igor🇺🇦
The most popular C/C++ compiler is actually msvc
No it's not! Yet another facts on the spot maker. Providing numbers for IDE does not support your claim you know
Anonymous
Estimating the number of users of each C/C++ IDE The  starting point of this estimate is assuming the total number of software developers is at least 22 millions. That number comes from a study of Evans Data which considers the 40 different countries in 2017.
Ludovic 'Archivist'
Anonymous
Read through, not just superficially
There is not written anywhere that msvcc is the most used one
Anonymous
Davidecoppola.com is not a good source
Anonymous
Find something better
Ludovic 'Archivist'
Davidecoppola.com is not a good source
So his survey of 1800 devs is moot, good luck finding more data
Anonymous
Yes. There are millions of developers
Ludovic 'Archivist'
It may not be obvious but a vast majority of software is written for Ms Windows
Ludovic 'Archivist'
Yes. There are millions of developers
Learn about p-value and come back
Anonymous
If visual studio is 20%
Anonymous
Where is the other 80%?
Ludovic 'Archivist'
Read the entirety of the page instead of skimming around it. If you read the 5% that confirm what you think you miss the rest of the picture. As much as I would love to be wrong, the vast majority of software people write is for Windows and relies on the Microsoft ecosystem, and is written for Microsoft dumpster fire of a system
Anonymous
Check GitHub and see for yourself
Igor🇺🇦
Out of 3.7M developers in C++ 1.7 own a license for Visual Studio C++
https://www.daxx.com/blog/development-trends/number-software-developers-world And according to this random site there are 5.4 million C++ developers. So....
Anonymous
Roshan
How to reverse a binary number and print its decimal form. Do we have to totally do it using arrays or is there any shortcut?
olli
Don't think so... 1111 reversed is still 1111 and not 0000
Roshan
Well, the program converts 6 to 3 *Input is actually a decimal...
olli
How to reverse a binary number and print its decimal form. Do we have to totally do it using arrays or is there any shortcut?
You can do it using an array but you don't have to, since you could consider an int to be a "bit array". Shifting and masking should be enough