Algorithms + Data Structures = Programs - Episode 6: 2020 Retro (Part 1) and Fortran

Episode Date: January 1, 2021

In this episode, Bryce and Conor talk about the goals of the podcasts, highlights of 2020 and what's new with Fortran.Date Recorded: 2020-12-26Date Released: 2020-01-01Giovanni Van Bronckhorst lo...ng shot goal vs UruguayPacific++ 2018: Sean Parent "Generic Programming"https://fortran-lang.org/First year of Fortran-langThe Fortran Programming Language Githubflang CompilerMLIR: Multi-Level Intermediate Representation Overview10 MOST(LY DEAD) INFLUENTIAL PROGRAMMING LANGUAGES ArticleFortan-lang talks (GitHub)FortranCon 2020 talks (YouTube)Intro 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 It's all the podcast. The podcast is just Connor and Bryce being the best C++ buds ever. So at the risk of making this a Fortran episode... Welcome to ADSP The Podcast, Episode 6, recorded on December 26, 2020. My name is Connor, and today with my co-host Bryce, we talk about part 1 of our 2020 retro, but we mostly end up talking about Fortran. I've been thinking about, you know, first of all, I have to say, editing the last episode was a blast. The last, I don't know, it's bad. I don't know if this is bad, but I just like, I loved listening to the last episode, even though I was on all the episodes. But like I learned, I learned stuff last episode.
Starting point is 00:01:03 And also listening to my, like how excited I get. I don't think I realize, like, how excitable I am. Yes, you definitely do not realize how excitable you are. Like, I sound like a little kid. Yeah. When I was like, oh, I'll just, I'm going to reveal the big secret. Like, it's a bit silly because uh buddy you're you're you've just forced me into embarrassing you because now i gotta tell the c++ now sean parent story so for for those who do not know connor is a very big fan of sean parent who is uh one of the c++ luminaries who frequently talks about sort of elegant algorithm design, I'll say.
Starting point is 00:01:48 And the first C++ Now conference that Connor and I were at together, which was about four or five months after I met Connor. And this was the one where going into this conference, I was telling you your talk was going to win all the awards and you're like, nah, it's not going to happen. And then you won all the awards. But we're walking back from, so the conference is in Aspen, Colorado. So it's at this little hotel resort. And you often, you go into the town for dinner, for lunch, and then you walk back. And it's not like a five minute walk. It's like, you know, a 10, 20 minute walk. So you chat with people on the walk back. And it's not like a five-minute walk. It's like a 10, 20-minute walk.
Starting point is 00:02:27 So you chat with people on the way back. And so I remember there was a group of us that was walking back. And Connor was there. And I didn't hear the full context of the conversation. But I know that the word Sean Parent was mentioned and then Connor let out a yelp that sounded like the squeal of an excited 12 year old school girl that was just his guttural reaction to the idea that Sean Parent had entered into this conversation I don't even i recall i recall all of those walks back and forth i do not recall uh squealing um but i mean that's it's not surely you surely you recall me
Starting point is 00:03:13 telling this story subsequently to lots of people yes yes uh yeah i yeah well this this ties into sort of the the meta point that i was i was gonna make sort of at the beginning um of the meta point that I was going to make sort of at the beginning of the episode is that we have never – and this is true, I think, of almost every podcast I've ever listened to except for maybe a couple. At no point do podcasts ever really state like their goals. You know, I think – We have a goal? Yeah, that's the thing is We don't currently have a goal. But post-listening to last episode, I feel like implicitly we have a goal. And I think it's like two things. But we can just, what do they call it, blue sky this on the episode.
Starting point is 00:03:57 Or this is whatever people are listening to it. It's one, our podcast is just about two super super excited, passionate people, you know, talking about whatever they're excited about with, you know, with respect to tech. But then also. I definitely agree with that. And so that's our primary thing. But then I guess I didn't really have an expectation that I would be like actively learning things while on the podcast. And that's like, like when, specifically, when you sort of you, you know, one of the things was like, you asked, you know, do you know the one language, the ISO language that is, you know, internationalized? Like, I had no idea. And that's
Starting point is 00:04:35 like, it's, it's, it's not like a super, like, it's not gonna change my life. But like, I just, I love learning stuff like that. And there's been a bunch of other instances. You know, almost on every episode, actually, probably, I've learned something, you know, when we talked about the, you know, esoteric data structures, I had never heard of a ternary search tree and sort of walking through the implementation and sort of figuring that out. Like, I love learning stuff. And also, I just, I love sharing my enthusiasm for stuff. And I guess that's the thing is I guess like listening to the last episode while editing it, like I know I'm an excitable person. I just – I guess I don't – I don't – I don't really – it's not often that you're listening to your own voice while you're explaining something that you're excited about. And I just – when I was like listening to that part, was just like jesus like i need to calm down um um never calm down
Starting point is 00:05:31 connor never calm down i definitely i think i've definitely learned things too um yeah i mean you're you're you're you're constantly teaching me new things about apl there's There's no way I'm going to get out of this podcast without doing some APL programming. Yeah. But it's always interesting for me because you are, I think out of the two of us, you are the more inherently curious one. And it's nice because I don't have to be as curious as you. I just get these regular dumps of excitement about some new thing you've discovered. And it saves me all of the legwork of being a curious person. And so this was the thing. This all ties back.
Starting point is 00:06:19 You mentioned Sean Perrin. And this all ties back to something you asked two episodes ago when we had sort of, we had our quasi debate about programming languages and how many you should learn, although very quickly it didn't, it was no longer a debate and it was just us agreeing on things. You asked at one point, like, why? Why do you like, like, it was sort of a two-part why, like, why do you like learning programming languages and why do you like what like it was sort of a two-part why like why do you like learning programming languages and why do you want to solve advent of code problem problems in apl
Starting point is 00:06:50 and like honestly since and i i paused and i i gave some answer about um how haskell changed the way i thought and then apl you know if haskell changed the way i thought by an order of magnitude apl it's two orders of magnitude but like i've really been trying to reflect on why do I get so excited about learning things? It's actually a very good question because you'd think after a certain period of time, you've sort of learned all the things. And one of the things that I've, upon reflecting on that question, is that I've realized, like, the experience of watching certain people give talks and certain people share their passion and enthusiasm for, like, what it is that they're talking about, for me, is like intoxicating. Like, like, I can, I can pinpoint timestamps in talks, where like, specifically, you know, one of the best moments is in a Sean Parent talk called generic programming that he gave at Pacific C++, I believe in 2018, or 19, where he is talking about, basically, like the evolution of Alexander Stepanov and how watching his evolution,
Starting point is 00:08:10 like Sean Parent watching Stepanov's evolution, like how that impacted him and how that like it was inspiring for him to want to write code in like the fashion that Stepanov was learning to write code. And obviously, like we've mentioned, I'm a big Sean Parent fan, but listening to Sean talk about the way that Stepanov influenced him, for me, it's the equivalent of other people watching sports and seeing Michael Jordan in basketball jump from the free throw line and do a slam dunk.
Starting point is 00:08:44 I used to be a huge soccer fan. And I'll clip this in the show notes. In the 2010 World Cup, I believe it was the quarterfinal. So I'm half Dutch. My last name, Hoekstra, is a Dutch name from the Netherlands. And so I'm also half Irish. But I like to say that I associate more with the dutch side because they have a better soccer team um but but the one thing about the the dutch soccer one one
Starting point is 00:09:13 one day uh we'll tell the story of how connor claiming to be half irish nearly got him in trouble when we were in ireland uh yeah that we'll save that for another episode. But yes, I like to watch the World Cup because it only happens once every four years and it only happens for a couple weeks, so it doesn't take up too much time. And in the quarterfinal, Uruguay was playing Netherlands and a defender, Giovanni van Bronckhorst, he scored this goal.
Starting point is 00:09:49 It was just miraculous. Like it was from way outside the 18-yard box up into the top corner off of the crossbar. And this is 2010. So I'm in my second year or third year of university. And I remember I was watching this, I believe with my sister in the common room of the residence that I lived in. And I just, I went absolutely nuts like this because we went up one nothing
Starting point is 00:10:11 and Holland is the best team to have never won the World Cup. It used to be a toss up between Spain and the Netherlands, but then Spain won it in 2010 against us in the final, which is very sad. So such a large portion of our international audience is going to be in some way offended by this discussion of soccer. Yes, yes. I'm not, you know, I'm probably there's a big portion of that are offended from Europe that I'm calling it even soccer because it's football over there.
Starting point is 00:10:43 But I just the goal was amazing. I went absolutely like crazy. And like, so the way that people get excited about sports and like moments like those where you're just seeing an individual do something amazing is like the same way I feel about like watching programming talks, which like probably sounds absolutely ridiculous. But it's, I don't know, it's awesome to see that. And, like, I think a large part of, like, my enthusiasm and passion is, like, is chasing that. Like, I now want to do, like, I want to have the effect and the impact that, like, Sean Parent has had on me on other people. And I think like learning to like when my mind is learning things and it completely is bent in like a 90 degree or 180 degree angle, that gets me excited because my thought is like, oh, wow,
Starting point is 00:11:40 like if this is having this impact on the way I think, like this will translate into some like amazing moments where, you know, whether it's on a podcast now or in some future talk, I can, I can show people like, look at the elegance of this solution that like, I, I, at one point I had no idea was possible. Anyways, we've, we've been, or I've been rambling now for, I don't know how many minutes and we haven't even gotten to the, the topic of this podcast. But the point is, is I just, I like,
Starting point is 00:12:04 I like the idea of the sort of the the goal of our podcast being uh to share our excitement slash enthusiasm and then also along the way for us to learn things and then hopefully the listeners learn things as well yeah i mean i definitely i definitely think we we we went into this having this implicit goal that there were we went into this with the assumption that there was some value not just to either one of us individually sharing ideas but like that our our our combined interactions like our interactions together produced this like enthusiasm and excitement that needed to be shared with the world that could inspire people um and this this actually will so this will come up so the the idea
Starting point is 00:12:52 for today's podcast was sort of mentioned at the tail end of last week's was um to sort of reflect on uh 2020 and to um to you know talk about the highlights or, you know, what was the top five things? Obviously, you know, we should start this by saying, obviously, 2020 in all seriousness was a wreck of a year. And I think both, Bryce, you can disagree if you want to, but I'm sure you are in agreement that we are both in very privileged situations where we have not been impacted work-wise by any of the, what should we call them, things that have happened in 2020. Well, I think we shouldn't say that we haven't been impacted because there are people in tech who this has not been very easy for. Even there are those people who are in a very privileged position, but it may still be
Starting point is 00:13:52 difficult for them. And we shouldn't make that seem like that's a small thing. But, you know, obviously, many of us who are in tech have it a lot better than many people in other industries. You know, my dad is a theater director. He's run small nonprofit theaters his entire career where in a bad year, he has to, like, choose not to pay himself. And this is he's retiring next year so this is going to be his second to last season and they had to basically cancel their whole season and i was just talking with him yesterday about sort of the impact that it's had on the performing art that the pandemic's had in the performing performing arts industry and um his theater was lucky you
Starting point is 00:14:42 know they had the money to be able to withstand this, but a lot of these small community theaters are just, he said something like 99% of the actors and performing arts union in the United States are currently out of work or something like that. And yeah, I mean, this pandemic is definitely hurting some folks a lot more than it's hurting us. So I think that's a great point. I shouldn't say it doesn't impact us. Relatively speaking, it impacts us less. And I will say, like, neither of us have dependents. We don't
Starting point is 00:15:27 have kids. And I think, you know, there are a large number of people in technology that do have families and kids. And so I just, we're about to talk about the highlights of 2020 and sort of try and pull some positive things out. But I just, I don't want to do that without sort of acknowledging that 2020 has been a wreck of a year. And I'm very, very, very hopeful that 2021 will turn around. And yeah, so. Well, I actually, I think one of the highlights
Starting point is 00:16:01 for me of 2020 has been how – so I'm very involved in programming language standards. I chair the U.S. Standards Committee for Programming Language Standards, and I'm mostly – I'm most heavily involved with the C++ standard. I have a light involvement with the Fortran standard and a very late involvement with the C standard. And one thing that I've seen as a highlight of this year has been the resiliency that C, C++, and Fortran committees have shown in the face of this pandemic, we weren't really set up to be able to work remotely at the start of the year. You know, the way that all of these programming languages were evolved was we would meet a few times a year in person. And we do a lot of the work at those face-to-face meetings. And that might sound like, you know, in 2020, it may sound like in 2019,
Starting point is 00:17:14 you know, that's a little bit dated. But you have to keep in mind that's the way we've been doing things for many years. And there is a value to to face-to-face interactions and I've been very impressed at how far we've been able to come in switching to working remotely in the middle of this pandemic and I'm very grateful to all the people, you know, not only the leadership, but also the, just the participants who have really stepped up in this time. Um, and, and I'm very proud of all the things that we were able to get done this year, despite the pandemic. Yeah, no, that's, uh, I think it's great to see, um, C++ and sort of older languages, you know, C, Fortran, C++, they all have long histories. And I think a lot of newer languages are used to sort of operating more on, you know, generally speaking, GitHub.
Starting point is 00:18:17 That's not how every new programming language evolves, but a lot of them do um and it's great to see like languages with older histories uh be able to adapt um and still make progress like it's it's going to be great to still get you know an update with c++ 23 and new things in our language in our library and that's awesome um well and one one of the things that I saw sort of a status update on this on Twitter last week that there's this new thing called FortranLaying.org in a related GitHub org, which is, it was an effort started about a year ago, I think actually just before the pandemic
Starting point is 00:19:07 to sort of democratize the Fortran evolution process a little bit. You know, the Fortran has this international standards committee, but the idea here was, hey, let's create this forum and venue where Fortran users can propose ideas, can suggest what our priorities should be, et cetera. And I saw a retrospective on sort of all the good that had generated in the past year. And I was very impressed with that. You know, Fortran's a language that was created in the 1950s and has regularly released, you know, revisions since then. And it's not, you know, I think a lot of people maybe don't have the best opinion of Fortran, but I think a lot of those people maybe don't know what modern Fortran looks like and don't realize that it's not a dead language.
Starting point is 00:20:06 It's a language that's constantly evolving, and it's still going strong. And, yeah, I think it's pretty cool to see all the great things that are coming out of this sort of democratization of the Fortran standardization process. Yeah, we'll definitely link this in the show notes. This is actually quite impressive. The top repos on the GitHub page for the Fortran programming language are FPM, the Fortran package manager, which I had no idea about, and then stdlib, so there's a Fortran standard library. Yeah, and it looks like they've got a double-digit number of contributors. And, you know, a lot of C++ people have been looking forward to modules for a number of years. You know, Fortran has had modules for, I don't know exactly how long,
Starting point is 00:21:06 but definitely at least a couple of years before C++. I think it's been around since maybe Fortran 2008. But yeah, Fortran has a lot of, like modern Fortran has a lot of features that you might not expect. And there's another sort of exciting thing that has been going on this year, which is one of the things that our company NVIDIA works on is this project called Flang. And it's not quite sort of ready for its first release yet.
Starting point is 00:21:40 But what Flang is, is it is a modern Fortran compiler written in the style of Clang. So it's meant to be modular. It's meant to be like a library. It's meant to be something that you can use for tooling, something that fits into the LLVM ecosystem. And it's written in modern C++17. Like this brand new Fortran compiler, which is going to be a part of the LLVM project, is written in modern C++17. And not only that, some of you have probably heard of MLIR, which is this new sort of high-level IR framework for LLVM.
Starting point is 00:22:31 It's the sequel to LLVM, basically. It's like Chris Lattner's quasi-new project. Yeah, yeah. But it's not something that's in place of LLVM. What MLIR is meant to provide you is a way of building a high level intermediate representation that you can use. For example, you can use it to, with high fidelity, represent the structure of loops and to do things like loop optimizations that are a lot trickier to do in just, if the only
Starting point is 00:23:01 representation of your program you have is LLVM IR. And one of the first major users of ML IR has been Fortran. Our flaying Fortran compilers all based around this,izations and vectorization that makes Fortran. Do you have any sense of why Fortran has, you know, you could arguably say it's been the most successful old language. Like, you know, it was created in the 50s and is typically quoted as being, you know, one of the first two languages alongside Lisp. And Lisp has also done incredibly well um but do you have a
Starting point is 00:24:06 sense of why fortran you know there's many languages like kobol and apl that you know there was an article that will link in the show notes a year ago or so that said you know the top 10 dead languages that you've never heard of um you know small talk was on the list apl was on the list and you know you can leave your angry comments if you're a big fan of those languages, but you can't really say that Fortran has died. Do you have an idea of why that is, or did it do something right that the other languages did wrong, or do you know enough about it to... I got a theory. It's a very vague theory, but I got a theory just off the top of my head.
Starting point is 00:24:46 And my theory is that Fortran has always been very well positioned to capture an important industry and domain. Fortran's always been a really good language for numeric and scientific computing. And when Fortran was first created, it was in the 50s. And I think at the time, there was sort of roughly, let's say, two categories of computing. There was sort of business-oriented computing, the sort of things that languages like COBOL were designed and good for. Things that are, I think, similar to what we think of as like data analytics today. You know, COBOL is the language that you'd use to, you know, if you had some database of customers and you wanted to get some, generate some form letter for each of them or perform some query on your, you know, the list of all the customers that you had. Whereas Fortran was always sort of a language for these American scientific computing.
Starting point is 00:26:09 And that's always been an important use case and application. And it's always been used in this space where the priority has been on the science, where Fortran's always been a tool that's been used. You know, when you're a computational scientist, you're really a scientist first and a programmer second. And so I think there may have been more of a desire within the numerics and scientific computing community to stick with and evolve the tool that they knew instead of creating a new tool. Whereas somebody who's a computer programmer first might have a greater interest in switching to a new language. And that sort of, that user base of numeric and scientific computing has always been a constant since, you know since the start of computing um it's evolved a bit over the years
Starting point is 00:27:27 but i think that's a large chunk of it i also think that that fortran as a language um is quite well designed it has very powerful built-in arrays, and not just one-dimensional arrays, but multi-dimensional arrays, and then expressions and operations on those arrays. It's very well-suited for the domains where it is used, scientific computing, simulation, et cetera. It's a really good fit. Um, and if you're a domain scientist, it's a fairly natural language to go and learn.
Starting point is 00:28:14 Um, but, uh, yeah, that's, I mean, we, we could do a whole episode on that, I'm sure. And, and learn more about that. Um, out of, out of languages of that era, the one in which I'm really the expert is more COBOL, which is still around, but not in the same way that Fortran is. Yeah, it's interesting to think about. Fortran is not a DSL. It's not a domain-specific language.
Starting point is 00:28:44 Yet, it is like a domain targeted language. Like it is, like you said, it's it's specifically designed with scientific compute in mind. And I'm not sure really, you can say that about many programming languages, like, so that that is, that's very interesting, like that response. And it's sort of, it makes sense in my head that a domain targeted language, which many languages are not, like, and that's another thing, is I guess like sort of Erlang is another language that has, to a certain extent, lived on in the form of Elixir.
Starting point is 00:29:27 And I believe many telecom companies that require extremely fault-tolerant, scalable systems, they're still built in Erlang. If I'm not mistaken, like WhatsApp, which got acquired for, what, $19 billion? It was the company with the highest per-employee. I think they had 30 employees or 55 employees or something. And the per-employee price was in the hundreds of millions of dollars. They famously used Erlang to build their infrastructure. And Erlang, you could say, is also like a domain targeted, like they target,
Starting point is 00:30:06 although can you call fault tolerant systems and like scalable systems like that, a domain, maybe not. But like, arguably, you can even extend that to C++, you know, it sort of gets less away from the domain and more for use case, but like, you know, C++ and C, those languages are, you know, where you can't have latency, you know, you know, people say, oh, garbage collection is the future. I'm not ever going to use a language that doesn't have GC. Yet there are certain applications where you can't, you can't have that. It's not acceptable. You know, for instance, Plus you need a language to write the GC in. Yeah. You know, if I'm listening to a song, I don't want, it's so irritating if it skips,
Starting point is 00:30:46 you know, at some point it's, it's, it's just like any, anybody that's been listening to a song where it's sort of, it's, it's awful. So you're not going to write, you're not going to write some, some audio program in, in some GC language that has a risk of that. But anyways, it's, a lot, a lot of the early programming languages were more targeted at specific use cases you know cobalt was a language that was created for a specific domain fortran was a language that was created for a specific domain a lot of languages that were created after that were not targeted at a specific and when I say domain here I don't mean like systems programming or like back-end versus like front-end I mean like a um uh an an actual end user application
Starting point is 00:31:37 you know scientific computing or business computing etc um I think a lot of languages that were created after that, you know, first set in the 50s and 60s were more general purpose languages, or they were targeted, you know, at sort of how high or low level they were going to be, but they weren't aimed at suiting the needs of a particular domain. And so I think that's probably a good chunk of why languages like Fortran have such longevity, because it was built from the ground up to suit a particular need, and there weren't a lot of alternatives. The only thing that I think has really come close to supplanting fortran has only really started being
Starting point is 00:32:51 supplanted by other languages in the past 10 20 years that is yeah it's it's definitely food for thought because another thing about python that people don't realize, like Python is viewed as sort of a newer language, like alongside, you know, Rust and Swift and Elm, etc. But Python is actually an older language. It was created around the same time C++ was back in the 90s. You know, C++ has a longer history from before the 90s. Um, and a lot of certain talks in this, in the Python community, um, highlight that really the, the, you know, the curve and the hockey stick, you know, of, of the popularity of Python has been driven by, um, the, the data science and sort of, uh, machine learning and, um, like the, the balloon and the ecosystem of libraries that are NumPy and pandas.
Starting point is 00:33:45 That has really, but Python wasn't designed from the ground up for that, right? It was not. Yeah. But so that, that's, that's one of the, the creator,
Starting point is 00:33:52 Wes McKinney of pandas has claimed in his talk and has showed sort of numbers for that, you know, Python, it was, it was, you know, a language that was popular enough,
Starting point is 00:34:02 but it's, it was not, you know, in the top five or, you know, ranked as number one or number two on a lot of these charts. And if you look at sort of the numbers and the adoption of certain libraries, uh, you could argue that, uh, you know, a large, uh, contributor to the, you know, extreme popularity of Python has been sort of the focus on, uh, like you were saying, the, the scientific compute, the scientific compute and NumPy and Pandas and Scikit-learn
Starting point is 00:34:28 and the whole ecosystem of libraries that are now available in Python for people working in those domains. So it's interesting to think that trying to design a language, potentially a more successful trajectory, is to choose a target domain and focus on that and then really like develop those, the libraries and the ecosystem around that domain instead of trying to become like a general purpose language that's used for everything.
Starting point is 00:34:56 Yeah. And I mean, if you're trying to design a general purpose language, you know, like, let's say that you and I were building a new programming language that, that wasn't targeting a particular domain. In our, like the first few things we would do, like, you know, we'd look at, you know, what should we be working on? What should we be focusing? What should our priorities be? We wouldn't be prioritizing features that were specifically only going to enable this one domain of users.
Starting point is 00:35:23 We'd be like, nah, we got to, that's like a version five feature. We got to focus on these other things first. And so what that means is that for a general purpose language, like something like Python, yes, eventually it can grow to a scale where it has a rich enough ecosystem, a rich enough set of features that a dedicated ecosystem pops up within the wider Python ecosystem for that particular use case. But that requires a greater scale, a greater maturity. Whereas if you go in from the start and you say, our language is going to focus on doing this thing well, then that lets you focus better. And I think really, I think that's been a large part of what's made Fortran successful. And, you know, again, to go back to that, you know, the mindset
Starting point is 00:36:15 in the 50s, I think when languages like Fortran and COBOL were created, there wasn't yet a notion of this general purpose programmer. There were the notion of these people who needed to use these tools in their work. And in certain domains, you know, that sort of remained true to this day. If you're a computational scientist, your priority is the, you know, the science and the language is just a tool. And that's something that's sort of built into,
Starting point is 00:36:52 into a language like Fortran. So we, we took the risk and it has sort of turned into a Fortran episode. Fortran will definitely have to go on the title of this episode. And that is where we will end part one of our 2020 retro episode thanks for listening tune in next week for part two and happy new year

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