Algorithms + Data Structures = Programs - Episode 81: C++ Should Leave ISO

Episode Date: June 10, 2022

In this episode, Bryce and Conor talk about representation in C++ and whether C++ should be an ISO language.TwitterADSP: The PodcastConor HoekstraBryce Adelstein LelbachShow NotesDate Recorded: 2022-0...6-04Date Released: 2022-06-10ADSP Episode 80: C++ Multidimensional Arrays and GPUsADSP Episode 80 Reddit Post & CommentsJames Berrow cpp.chat Episode: Colour Is Not Black and WhiteCppCastCppIndiaCon[CppIndiaCon 2021] What belongs in the C++ Standard Library by Bryce Adelstein LelbachC++ Summit (China) 2019Base Rate Neglect (Fallacy)Inbal Levi on TwitterMeetingCpp Panel on Technical Speaking about C++James Munn Tweet about RustRust Cargo (crates.io)List of ISO Programming LanguagesIntro Song InfoMiss You by Sarah Jansen https://soundcloud.com/sarahjansenmusicCreative Commons — Attribution 3.0 Unported — CC BY 3.0Free Download / Stream: http://bit.ly/l-miss-youMusic promoted by Audio Library https://youtu.be/iYYxnasvfx8

Transcript
Discussion (0)
Starting point is 00:00:00 Is it two? C++ should not be an ISO language? Or C other? I think C++ should leave ISO as a good title. C++ should leave ISO. All right. I mean, if you're listening and you've listened to this full episode, you already know what the title is 81 recorded on June 4th 2022. My name is Connor and today with my co host Bryce we talk about representation and C++ and whether C++ should be an ISO language. Sorry about that was having audio issues and I did not want to join before I resolved them. Well, it's all right because you said it would be 30 SCE, which is not a real unit of time. So you can just claim that however long you took, which is definitely longer than 30 seconds, was 30 SCE.
Starting point is 00:01:02 At least it wasn't 30 minutes. Yeah, in my defense, i have no real defense no i um i uh so i went bike riding last weekend and it's sort of like there was a huge rainstorm while i was out biking and i was like oh this is fun i like biking in the rain and there's no other people on the bike trail so i'll just keep going and that may have been uh not it it definitely killed my bike computer but uh it may have also killed my phone so i had to run around manhattan to to find a uh a place that could fix it yeah that's what you spent your beautiful saturday doing um i spent most of my saturday being lazy but then i spent like the my saturday evening running around manhattan trying to get my phone fixed yeah gotcha gotcha how's it going buddy what are we talking about
Starting point is 00:01:59 today um i don't know aren't you the one who's supposed to aren't you aren't you the the director here and i'm just uh i'm just along for the ride all right if that's the case episode 80 last week's episode today is june 4th saturday we are recording in the evening which typically is not the case i don't think we've ever have we ever recorded on on a Saturday evening? Maybe, but not that I can recall. And we usually record on Saturday mornings. But today we're recording on Saturday evening, June 4th. This will be coming out on June 10th. And it will be episode 81. Episode 80 was a week ago, and I have started occasionally. It started sort of with Ben Dean's four-part saga posting to the CPP subreddit. And up until today or yesterday, we have not gotten any comments.
Starting point is 00:03:02 We usually get, you know, 10 or 20 upvotes whatever but uh we had three comments on the first post of one of our episodes on subreddit and so i figured one we'll read them out and we'll get bryce's we'll get bryce's response because he's the expert when it comes to gpus i mean olivier geroux is the real expert but um in the absence of his presence uh bryce is the expert and um also i feel like uh i really enjoyed uh the last half of our conversation last time i wouldn't i wouldn't go so far as to claim that i'm an expert in gpus relative to me you definitely no, I think it's a different class of expertise, which is that my expertise is in parallel programming. You know, I've done a lot
Starting point is 00:03:55 of things. I've worn a lot of hats. And certainly the hats that I wear today are more in the space of like programming language design and library design. But I think the only thing that I actually have any like real expertise in is, is parallelism. Like, you know, like I'm not a library designer on par with, you know, an Eric Niebler or really a compiler expert or a language expert. But I do know a thing or two about parallel programming. And I would definitely say, relative to me, you understand the GPU programming model definitely a lot better.
Starting point is 00:04:37 Well, I actually find the GPU programming model, in particular the hardware model, how the hardware actually works under the hood, to be very challenging, especially in comparison to sort of the architecture of a CPU, which I feel like I have a good, I can wrap my head around pretty well. It may be one of those things where the more you know, the more you're aware of what you don't know. But yeah, I certainly don't feel like I'm somebody that has an expert level of knowledge about GPUs. Well, we shall proceed to talk about GPUpus today and get whatever expertise you have out of you and into mine and the listener's brain and before we do that what do i have here bryce or actually you can't see it
Starting point is 00:05:32 my cannot see my magic background screening yeah my but i know but that probably means that it's green no it is not it is, and it is a bubbly. It's been a while, listener, and your patience has been rewarded with the crisp opening of a blackberry bubbly. Let me tell you, it's the best flavor. And bubbly, if you happen to be listening, my pinned tweet on at ADSP, the podcast Twitter profile, is a fridge full of bubblies. I don't know what we're doing without a sponsorship from you still. I've had multiple people. We're talking about big names like Tony Van Eerd and not big names like other people. I mean, they don't know who Tony is anyway, so I don't know why I'm name dropping.
Starting point is 00:06:19 But anyways, multiple people have told me that they've purchased the bubblies. And I feel like the sponsorship is right around the corner, Bryce. Moving on to the comments. Episode 80 was entitled C++ Multidimensional Arrays and GPUs, where we talked about multidimensional iterators and adjacent topics. Our first comment, do you actually, I am not going to know the last name. You probably do. The Reddit user is James20k. He is the color expert and GPU expert that showed up at one of the committee meetings
Starting point is 00:06:53 with critiques of the 2D graphics proposal. Yeah. Do you know his last name? I don't off the top of my head. He's a good guy. Yeah. I mean, super, super super knowledgeable on he's probably a gpu expert james barrow if i'm pronouncing that correctly b-e-r-r-o-w at first because i
Starting point is 00:07:14 i definitely know that he published a paper but when i searched for it it did not come up but then i searched for him as a cpp cast guest and or actually no he shows up as a cpp chat our rival podcast currently the number one c++ active c++ i realized on upon editing episode 79 um that uh technically cpp cast is still the number one c++ podcast and will be for some time it's just not active anymore. So we should be we should be clear. And now that I now that I am making corrections, we should make a couple corrections here that have been 10 episodes overdue. Oh, right. First of all, I was talking to someone a couple months ago at this point, and they said, Could you do me a favor and give a shout out to Indian C++ programmers? And I said, sure.
Starting point is 00:08:07 And he was like, yeah, I just feel like at all the conferences other than C++ India, Indian C++ programmers are like severely underrepresented. I actually, I talked about this at CPP India last year when I was giving my keynote there. Yeah. I talked about this problem and how it's a problem that we should solve. I mean, statistically speaking, I would guess that based on country, the most C++ developers are either Indian or Chinese,
Starting point is 00:08:37 just on the numbers game. But just a question for you, why don't we see Indian or Chinese programmers? I mean, I don't know. That's a good question. Well, until recently, there was no Chinese delegation to the C++ committee. That's changed. Now there's a few who are participating.
Starting point is 00:08:58 And there's still no Indian delegation to the C++ committee, not for lack of trying. It's a lot of people interested, but the way that the C++ committee works, you have to go through whatever your country's process is for joining, for forming a national committee. And in some countries, that's more complicated than others. And it seems that India is a more challenging one, because basically we've not been able to get anybody to reply to emails about how they know this is the organization that we should reach out to, but they can't really get in touch with anybody. Now, why is this important? So I think I may have talked about this in the past on ADSP, but the reason that I joined the committee back in the day, I was just involved at C++ conferences in the C++ community the first few years of my career. But I realized that if you're going to be involved, if you want to make a name for yourself in a tech community, you really have
Starting point is 00:10:05 to be involved in the leadership and the decision making. And ultimately, like, where does the decision making about C++, the language, come from? Well, it comes from the committee. And so, you know, think about all the people who go and give talks at big C++ conferences. They're, you know, oftentimes they're people who are involved in the committee because being involved in the committee means that you can talk about the work that you've done in the committee. You can talk about the future direction of C++. And if you're not on the committee, it's a lot harder to give that sort of talk and to be involved in sort of the global C++ leadership. And so I think one of the reasons for this weird inequity, because there are a ton of C++ programmers in India and China, but one of the reasons why we don't see,
Starting point is 00:11:01 why we see such a Eurocentric, you know, C++ conferencing, I think, is in part because the C++ committee and sort of the structure of the international standards organization that we're involved in has not been conducive to participation from that part of the globe. So you think that there's a very strong correlation between committee representation based on country and speakers at conferences? Yeah, not only speakers at conferences, but also where we hold C++ conferences. There's a lot of tech conferences that get held in Asia, but there's not that many C++ conferences. And most of the C++ conferences that you can point to in that, those time zones, like the ones that comes to mind, like Pacific Plus Plus, which is, you know, that's in another country that has historically been very involved in standards or has had involvement in the ISO standards in the same way that a lot of the EU countries and the U.S. has. development of C++ has sort of been in some ways hindered by this odd model, which requires you to go through your national body. And as you can imagine, you know, China and India are very big countries. And so the, you know, the parts of those countries that deal with
Starting point is 00:12:47 international standards, you know, those are not going to be small agencies because they're dealing with, you know, large countries with a lot of different stakeholders and constituents. And so understandably, it's not, you know, it's a little bit more challenging to get established there. I think in a lot of other countries, and especially in a lot of, you know, smaller countries, it tends to be a bit easier. Because it's like, oh, it's like, you know, maybe it's a smaller office, and it's just easier to get in touch with the right people. Yeah, it's a real shame.
Starting point is 00:13:23 It is, yeah. I guess that's the thing, is i know that there is c++ india or india c++ i'm actually not sure which way it's pronounced but there's also i know i don't know the name of the conference but i know kate gregory and a couple other speakers have been invited and have spoken at like a c++ china conference where i think the majority of the talks are in Chinese. But yeah, it's just, I think it's surprising from like a statistical point of view when you just, I'm not sure if you've read any or the listeners have read any like behavioral economics and like sort of bias books, but one of them is called base rate neglect, where they phrase these questions in such a way that you neglect the base rate where 95% of the population,
Starting point is 00:14:07 like there's 95% of the people that you're asking about fall into one group. Like I'm trying to think what's an example of one of these questions where they ask about like, you pick a person at random from the US population. And what's more likely that you, this person at random is a female librarian or a female farmer? And I'll give dramatic pause for a couple seconds. And when they've given this quiz or, you know, sort of they've done, conducted these kinds of questions in these studies, they tap into the fact that, you know, people associate librarian as a female profession. And so most people say, and farmer as sort of a more male profession. And so they'll say, well, female librarians, it's more likely that you randomly chose that person. But it ignores the base rate of the fact that there are like, for every one
Starting point is 00:15:00 librarian, there's like 20 or 100 farmers. I can't remember the exact numbers. But like the point being is that like overwhelmingly, like farmer is a much more popular or there's way more farmers than there are librarians. So like the gender part of farmer or librarian actually does not matter in this question. It's really asking what's more likely, like farmer or librarian. And it ignores sort of the base rate statistic of, you know, what's more common. And just based on population, there's like, what, 1.6 billion people in India and 1.4 in China or something, plus or minus 200 million or something like that, compared to, you know, the United States, which is 330 million in Europe, you know, there's still a lot of, you know, Western folks. But it's just surprising that you, when this person asked me to shout out, said, shout out to C++ Indian programmers.
Starting point is 00:15:50 He was like, there's a ton of us. And like, you know, you don't see them speaking at European conferences or conferences in the United States. Yeah, well, and that's exactly one of the problems there is that C++ conferences are predominantly European and U.S. conferences. And the international C++ committee is primarily a NATO committee. If you look at who's involved in ISO, it skews towards a certain set of countries. And so, you know, that really sort of skews things. You know, another facet of this, you know, in both China and Indian nationals need a visa to go to most of the places where the C++ committee meets and also need a visa to go to most of the places where C++ conferences are.
Starting point is 00:16:54 And I just, coincidentally, last week, I happened to be looking at the wait times to get an appointment at the U.S. consulate, or I guess U.S. embassy in New Delhi for just a regular traveler's visa to the U.S. So you want to guess how, if you're an Indian national and you wanted to get an appointment to get a visa that comes to the U.S. for a conference, you want to guess how long the website says the wait is at the U.S. Embassy in New Delhi? I mean, I'll guess, ignoring the fact that you're asking this, which means that it's going to be a longer time. But if you had just asked me out of the blue, I would have said, I don't know, less than a month, three or four weeks or something. Yeah. So I believe, and I'm going to, I'm going to check it right now just to be, to be sure, because there's a little website where you can go to check this. Um, uh, so, so it, so it's down from what it was a week ago. Um, so when I checked a week ago, the time, the appointment wait time for visa visitor visa was 731 days it's it's it but
Starting point is 00:18:08 the good news is it's down now it's down now to only 291 days so if you want to go to uh to the cpp con um 2022 um uh yeah probably you should have been planning that a few months ago. But the good news is, if you start planning right now, you might be able to go to speak at CPPCon 2023. Now, I don't know whether that website is actually accurate. That is the U.S. government website that I use to check this whenever I need to help somebody with a visa appointment. Maybe the situation, the actual situation on the ground is not as bad as it sounds. But the fact is, most of the speakers from European countries who want to come to CPPCon or some other US-based conference or to a committee meeting in the US, they don't need to
Starting point is 00:18:59 worry about that because they don't need a visa. And it's, you know, it's similar situation for folks coming from China. Yeah, it's a real, it's a real problem. Yeah, hopefully, I don't really know what the solution is. But well, I mean, I think this, this, there's a few different aspects of what is the solution. One aspect of it is, you know, the, like, there's the underlying problem, which is sort of the model for membership on the C++ committee is, you know, probably not what we would want it to be and is unnecessarily restrictive. Whether or not and how you participate in C++ evolution should not depend upon your nationality. I don't think that that's a radical statement,
Starting point is 00:19:53 but the reality today is that it does. Yeah. That the role that you can play in the C++ committee depends upon what country you're a citizen of. That shouldn't be the case. But changing, making that not be the case requires, you know, very radical changes to the C++ committee and the very way in which we involve C++. And I mean, I'm personally an advocate of us making those changes, but whether or not that's practical is a different question.
Starting point is 00:20:31 So what can we do within the current system? Well, I think the easiest solution is to get national committees formed in those countries. Now, China already has one, and we've seen more and more participation from the Chinese committee in the past few years, but it's still only a few people. And because in part of some of the issues I talked about before, visa is also the issue of time zones and cost of travel. Before the pandemic, we had some participation from the Chinese committee, but we didn't have a lot of members of the Chinese committee coming to our committee meetings. And it's the same for Japan. The Japanese National Committee for C++ has actually been involved for a long time, for decades, but has not typically sent people to committee meetings. Not sure entirely the reasons
Starting point is 00:21:27 there, but one might imagine that one of the reasons is that the travel is, you know, a bit prohibitive. But getting more involvement and larger delegations from, you know, these underrepresented countries would be a good first step. And then that will help get more people from those countries involved in leadership. And then they'll have more things to talk about at a conference. And then maybe we could even have committee meetings in some of those countries. This model of like, oh, you want to build up a C++ community in your country, form a national body, it's been very successful in other countries. Israel, you know, I went to Core C++, the first one, in 2017 or 2018.
Starting point is 00:22:25 Maybe it was 2019 um and i gave a lightning talk there which was basically hey israel should form a national body and like here's the rough steps of what you need to do it um and subsequently um israel did form a national body has gotten involved in the c++ committee and now there are um people from the israeli national body who are involved in the c++ committee leadership and who regularly give talks at the c++ conferences. And they're able to go back to their user groups in their country and talk about what's going on in the committee. And that helps, you know, that helps get the local C++ developers in your country more involved. Yeah. And it definitely does. It definitely does have an impact because one of those people, I believe, that's on the Israel National Body is Imba Levy. And she was just a part of, I don't actually know what it was, but over the past couple weeks meeting C++, or maybe it was months, but like the videos went online for some kind of mini conference where folks like Kate Gregory, Andre Alexandrescu, Imbal Levy, they all gave these sort of five to
Starting point is 00:23:26 15 minute lightning talks. And there was a panel about technical speaking. So it was all focused around how to give talks and tips on talks and stuff like that. And so I think definitely your point of having people join leadership and that having an effect that these individuals from different countries will start popping up in more conference circuits. Yeah, it definitely seems to be true, at least from a couple anecdotal examples. And I just sent you a link to a tweet that I saw when I was waiting for the subway earlier, that I think illustrates sort of my first point in what we should do about this.
Starting point is 00:24:06 And it was a tweet about the Rust project. And somebody said, this is James Munn who tweeted this, said, the Rust project is bonkers, y'all. I submitted an ICE, that's internal compiler error type of compiler bug 15 hours ago. So we submitted a bug report 15 hours ago. I minimized it 14 hours ago. Someone opened a PR with a UI test 12 hours ago. They added a solid fix 10 hours ago, and it's already waiting for a roll-up merge.
Starting point is 00:24:40 Chances are it'll land in stable in Rust 1.62 in 25 days, which means our workaround won't be needed past the end of the month. I joined the C++ committee in 2015 with my primary intention being to get multidimensional array support into the library in some form. And it's 2022 and it's not, it's not certain that it'll go into 2023. It will hopefully will, but then it won't be available in compilers for another three years. And I, you know, that's, that's a difference of a feature
Starting point is 00:25:22 versus a bug fix, but I I'm aware of fixes, too, that have taken similar time frames. And, you know, you compare the development model or the evolution model for a modern language like Rust to the development or evolution model for a language like C++. And it really makes you question whether the system as it is really serves us well. Yeah, that's kind of depressing. You heard it here first, folks. Rust made two C++ developers sad today. Yeah. I mean, if Rust has many good things going for it,
Starting point is 00:26:09 but the thing that makes it most competitive with C++ is not any technical feature of Rust. The thing that makes Rust most competitive with C++ is the Rust community and the Rust model for the development of the language. I mean, you could make an argument for Cargo. It's a package manager. But I think that's maybe sort of a part of what I'm talking about.
Starting point is 00:26:35 Okay. All right. Continue then. Yeah. But really, I think the Rust community and the ability to work far more efficiently and to have a much better stakeholder model where people can participate regardless of their national origin without having to travel around the world to physical meetings. You know, that means that Rust can move faster than C++. So it doesn't
Starting point is 00:27:37 matter where Rust is today and where C++ is today. The important thing is that Rust will be able to evolve and get better faster. And that is, that ultimately spells trouble for a language like C++. And I mean, I say spell, I say spells trouble. It's not like they're, it's not like they're in a competition and we should use whatever the best tool is. But C++ will not be able to be the best tool if it is not able to evolve in a modern fashion. Do you think there's any chance of a governance model change? I think it's a lot more likely than one or two years ago. What does that mean numerically? Like, are we talking still low single-digit percentages kind of thing?
Starting point is 00:28:35 I'm not going to comment on that. I mean, I think that for C++ to survive, C++ must leave ISO. There's simply no way around it. ISO is the wrong organization to evolve a technology standard like C++. This has been proven time and time again. I think almost everybody on the committee and in the C++ community would agree with that. Most people also believe that that's not possible for a variety of reasons. I think some people may believe that it's possible, may believe that it could be a good thing, but have serious misgivings or concerns about, you know, that a potential, you know, different thing could be worse than the status quo. But I think that almost everybody would agree that the status quo is not optimal.
Starting point is 00:29:51 And I think is increasingly getting worse as time goes on. And the pandemic, I think, has really demonstrated that. So, yeah, I think C++ must leave ISO. I mean, I would even go so far as to say I think all of the programming languages standards that are currently developed by SC22 should leave ISO for some better model. You know, they could continue to be ISO standards, but they should be developed by some other organization, as many ISO standards are. All right, so we'll start to wrap up this episode that clearly did not become about our Reddit comments on episode 80. The question is, though, Bryce, what should the title of this episode be?
Starting point is 00:30:37 Is it A, where are all the Chinese and Indian C++ developers? I mean, I said that out loud, and I realized they're in China and India mostly probably. So maybe that's a bad title. Is it two C++ should not be an ISO language or C other? I think C++ should leave ISO. C++ should leave ISO. All right. I mean, if you're listening
Starting point is 00:31:02 and you've listened to this full episode, you already know what the title is, but we decided it live here. And yeah, is there anything we should say to potential folks in India that are interested in having more representation on the global C++ scale? Is there anything they can do in order to get their national body created? So the, there's the, you know, I, I about a year or two ago, I'm always, I'm always trying to recruit more national bodies because I believe having more countries involved is good. Um, and like I, I was trying the most recently, I think India and Mexico were the two I was trying to help out. And both of those countries have faced the same problem where there was, there were vibrant, active user groups with lots of people who, you know, could
Starting point is 00:31:53 serve as experts. But, and we've, you know, we've gone through the process, we've figured out what is the, you know, the national standards organization within their country. And the problem in both cases have been getting in contact with that organization and actually figuring out, getting in touch with somebody who can actually make it happen. And I believe that remains the holdup in both cases. I'd say if you're interested, that C++ India um user group i think there's one or two big ones but i believe the leaders of both of those user groups are involved um but ultimately it's going to take you know somebody at the i forget the name of the the standards organization in India, but somebody at that standards organization has to, has to,
Starting point is 00:32:46 you know, check some email inbox. Yeah. Um, and it's often the problem just not being in touch with the right people. Um, but there's also probably, you know,
Starting point is 00:32:55 there's a lot of paperwork and bureaucracy involved in forming one of these, uh, national committees, depending on the country that you're in. Um, so I'd say get it, get involved with your user group is probably the, one of the better ways. Also, if you're country that you're in. So I'd say get involved with your user group is probably one of the better ways. Also, if you are in India but work for a U.S.-based company,
Starting point is 00:33:12 you could get your U.S.-based company to join the committee and then, you know, make you one of their representatives. And then, you know, it would still be through the US, but at least we would have more people in India that are involved in the C++ committee. Yeah. And C++ committee meetings will, you know, right now have been all virtual and all remote for the past two years and will be at the very least hybrid going forward. So you should be able to participate without having to worry about travel or visas or, you know, waiting 291 days to get a visitor visa appointment at the U.S. Embassy in New Delhi. All righty. Well, stay tuned over the next several years. Maybe we'll have updates for you um if and stuff ends up happening all right with that
Starting point is 00:34:07 we will wrap up episode 81 thanks for listening we hope you enjoyed and have a great day

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.