Huh? C is fast (compared to Swift) because using it doesn't imply sprinkling lots of sugar (like ARC) into the resulting machine code.
Simpler languages like Fortran can turn into even faster code than a C implementation. UB optimizations aren't that relevant for real-world performance.
Code generated by C compilers for C64, Spectrum, Atari, Atari ST, Amiga, Mac, CP/M, MS-DOS, Windows 3.x, Nintendo, MegaDrive,... systems meant many times the code would be 80% like this:
void some_func(/* params */) {
asm {
/* actual "C" code as inline Assembly */
}
}
Lots of Swift sugar also gets optimized away, and there is plenty of room to improvement.
The code that current C compilers don't generate, many times is related to taking advantage of UB.
They also generate extra code for handling stuff like floating point emulation though.
Just as an example, IBM did their whole RISC research using PL/8, including an OS and optimizing compiler using an architecture similar to what LLVM uses.
They only bothered with C, after making the business case that RISC would be a good platform for UNIX workstations.
Why bring these ancient home computer platforms into play? Those were totally different to program for. Why not compare a C compiler from 1998 to one from 2018, on x86 (no SSE of course)? C compilers have gotten better, but not spectacularly.
>> The code that current C compilers don't generate, many times is related to taking advantage of UB
Compilers are really smart in optimizing things that aren't relevant to the real world.
For example, this code would reduce to "return 32" in most modern compilers:
int return32(){
int x=1;
for (int i=0; i<5; i++){
x*=2;
}
return x;
}
Does that make impact in real-world code? Almost certainly not, it's a contrived case. Most UB cases fall into the same category.
>> They also generate extra code for handling stuff like floating point emulation though.
> wWhy bring these ancient home computer platforms into play? Those were totally different to program for. Why not compare a C compiler from 1998 to one from 2018, on x86 (no SSE of course)? C compilers have gotten better, but not spectacularly.
To clear up the myth among young generations that C compilers always generated fast code, regardless of the platform.
As for something more modern, in 1998, C code quality was still at a similar level to other system's languages, before they started to fade away thanks to the increase in UNIX, Linux and BSD adoption
For example, given that Delphi and C++ Builder share the same backend, their generated code was quite similar, even if it would require disabling some of the Delphi's security checks.
If someone literally gets hired over some white dude by "virtue" of their gender and/or race, then they aren't there by merit. That's exactly what some ideologically (or PR) driven HR departments do. The suspicion is entirely warranted.
The thing is, such practices also damage the self-image of the hire in question. Am I being hired for my abilities, or for being a number in some statistic?
That is exactly what happened with my wife when she was a developer. She only likes coding and solving technical problems, the problem was her entire team was women and promoted this "yay sisterhood" groupthink, even to the point of openly talking about how they hired my wife so they could keep the team devoid of any males...she hated it so much and ended up going to a more technically-inclined and less sexist team before leaving the tech industry for good. She always said the "women-in-tech" groups did more harm than good and thinks its just one big "women/POC-in-tech industry" that unfortunately won't be going away anytime soon since there is now so much money involved.
Yea, I saw the women in machine learning group at NIPS and was really wondering if this is a good thing or not.
Now they are considering Black in Machine Learning too (or something like that).
This all just seems sexist and racist. Mathematics and statistics shouldn't be conditioned on race and gender! What's next, there are too many Jews who win the Nobel prize?? Doesn't this type of thinking remind people of the horrible past?
White men get advantaged over nonwhite nonmen in pretty much all aspects of society. “Preferential” treatment towards people other than white men is really just a tiny little correction against the massive social and economic advantages white men experience. How many white men have you ever heard feeling bad because they were only hired for their white maleness (“Culture fit”)? And yet that is the dominant status quo hiring practice.
"I have a dream that my four little children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character."
I guess that means nothing these days.
It scares me when people start talking racially, especially like you. You call me a person of color (basically a new version of colored people). You see race first, content second.
This scares me because it wasn't too long ago that Jews were being thrown under the bus. And it scares me because now you might hate white people, but what if you start hating brown Indians like me (who have the highest family income in America), Asians, or Jews (you probably consider them to be white anyway).
This is just scary stuff man. I wonder how many of my liberals friends view race first.
I guess I’m the real racist for pointing out that racism exists?
Racism is the systematic disenfranchisement of a group of people based on their race. Correcting that disenfranchisement, empowering people who systematically don’t have power is literally the opposite of racism...
Pointing out that white people face massive advantages in the United States isn’t “hating white people”, it’s an obvious and undeniable fact. My ideal world is one where everyone is treated equally, and the road to that world isn’t just imagining everyone is treated equally and everyone enters the world with the same advantages, it is through acknowledging and correcting socioeconomic disparities.
I am just extremely wary of people who call me a person of color and who view things firstly through the lens of race. Of course there is racism in the west but correcting that shouldn't mean more racism.
Do you also believe Indians and Asians face a massive advantage in America? They are some of the most successful racial groups in America. Should their advantage be "corrected"? I guess it already happens via college acceptances...
How about Jews? Should we correct their advantage as well?
There is nothing wrong in addressing socioeconomic disparities. The lowest of our societies should be helped to a point of self sustanence and leadership. But it's just so offensive to call us all colored people, I mean people of color. Can I suggest not labeling people with higher melanin with that phrase? It reduces me down to a racial label and it makes me super uncomfortable. No kidding, it kinda reminds me of when I used to hear "Arab" or "terrorist" by right wing nut jobs as that label was also based on my race...
>> ...the truth is that they have beautiful offices, close-knit teams, a lifestyle with time for friends, a lot of influence, and a huge impact on real people’s lives through the software they create.
That's not "the truth", that's your experience in the amusement park that has been created for the pampered developers of the current dotcom bubble at companies like Google. Enjoy it while it lasts.
Regardless of gender, I'd rather have the doubters weeded out by an unrealistic negative perception than have them lured in by an unrealistic positive one.
Fair, I apologize for generalizing. You're right that Google is an outlier in this way. But I still think that there's a perception that CS is more anti-social than it actually is, and a perception that other professions are more social than they actually are.
In my experience, programmers are generally less socially inept than people would think, while people in most other professions are less socially adept than they think they are.
The thing is, some programmers really are socially inept and CS work is one of their last refuges. That includes a bunch of socially inept women, too! Let's not disturb their natural habitat by bringing all these overly social people in, those will thrive in many other places as well.
Software development is an increasingly social job NOT because the people doing it are more social, but out of necessity. Anti-social cowboy programmers just can't produce the results the industry needs at this point it in time. Stories of success like Notch are increasingly rare.
From my experience as a programmer, while some level of communication is certainly important, most of my time and effort is spent concentrating alone at the task at hand. That's the central part of the job, communication only supports it. Communication is necessary to divide work across the team and exchange experience; it also provides some psychological relief and motivation. While all of these are important, I consider the concentrated mental effort a far more important and difficult part.
Right, but isn’t this true about many other fields that women do go into, like art, design, medicine, journalism, earth sciences, finance, research, etc? In these fields, the “meat” of the job is also analytical and done alone, but they’re still seen as more social than CS.
I used to be like that when I was younger and in earlier stages of my career. As time passed, the pride of achieving the status worn off, as did the novelty of problems I was solving. Many problems turned out to be reoccurring, so I moved on to harder and less mundane problems. I keep doing that to this day - moving away from mundane work to something new and/or more difficult.
At the same time, as I grew older, my social life improved, and I learned to understand humans, so that part became easier.
It's not about eye-candy, the Web has become an application platform (against all resistance) and it can't thrive on standards bodies to deliver every bit and piece required. Even in 2018, web applications are shunned by many professionals for their poor quality and performance.
>> The majority of game engines scene graphs are retained mode 3D abstractions.
... but they are not built on an abstract retained mode API. That would be the wrong level of abstraction for a Web API that people can build on properly. I think that's the point here.
Unfortunately, Web APIs tend to be far too high level while missing out on low-level hooks, like the disaster that is Web Audio (and media playback in general).
>> This basically assumes that there's a tree of UI objects in memory, which is the case for all mainstream toolkits as far as I know.
This is also the reason why they are a pain in the butt to use, at least from the perspective of an IMGUI advocate. Those people usually have a game development background, so they're used writing bespoke solutions for everything.
Statelessness is a strength but also a big weakness, I doubt IMGUI will ever catch on its pure form. However, tools like React provide a fairly similar experience and they do produce object trees usable for screen readers. The missing piece here is something like a lightweight DOM for C/C++ projects.
Simpler languages like Fortran can turn into even faster code than a C implementation. UB optimizations aren't that relevant for real-world performance.