Algorithms + Data Structures = Programs - Episode 129: Circle is Charizard! 🔥

Episode Date: May 12, 2023

In this episode, Conor and Bryce chat about the new pipeline operator in Circle!Link to Episode 129 on WebsiteDiscuss this episode, leave a comment, or ask a question (on GitHub)TwitterADSP: The Podca...stConor HoekstraBryce Adelstein LelbachShow NotesDate Recorded: 2023-05-10Date Released: 2023-05-12Circle CompilerCircle Implements |> OperatorP2672 Exploring the Design Space for a Pipeline OperatorHow to Implement Your First Compiler Feature:The Story of Concepts in Clang - Saar Raz - CppCon 2019P0931 Structured bindings with polymorphic lambasAdvice to replace g++ with circle for CMake projectsCircle Godbolt LinkIntro 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 C++ is either Charmander or Charmeleon, whereas Circle is Charizard. And like, that's the thing, I know about Charizard because it was one of the cards that everyone was after. Welcome to ADSP The Podcast, episode 129, recorded on May 10th, 2023. My name is Connor, and today with my co-host Bryce, we chat about the exciting new pipeline operator that is implemented in the most recent release of Circle. I did. I did reach out to and get a reply from the special guest that you have been desiring. We can tell the listener. No, no, no. We're not going to say it yet.
Starting point is 00:00:53 We're not going to say it yet. Can we say what the project was, though? Because this was a listener request. Okay, we won't mention the project, but there's an exciting new project. People can put it together. And someone requested it. If you are that person, we did reach out to a person involved. We won't say how important they were.
Starting point is 00:01:12 But they are a little bit pressed for time, correct? But we're going to – we got a reply. And we're going to circle back in a couple weeks or months, and I think eventually it'll happen. Perfect segue. We're going to circle to circle. I'm not sure if you have a topic to talk about today, but we could spend the whole next 30 minutes that you have talking about the latest and greatest features in Circle. I do have to warn you that the dog and the girlfriend is going to come back at some point, and noise is going to be made. That's all right. We can record one episode now, and we'll set something up next week.
Starting point is 00:01:54 All right, but so I'm not going to screen share. We're just going to talk about it because we don't screen share anymore. People that follow me on Twitter, and I think actually I mentioned this last episode that... All two of them. So funny, Bryce. We get it. You got more Twitter followers than most people. And I mentioned it last episode that Sean Baxter,
Starting point is 00:02:17 the man, the myth, the legend behind the Circle C++ compiler, was working on implementing the pipeline operator along with the placeholder. That is now complete. It is now available on Godbolt. And it's never been a more exciting time. I don't even want to say in C++ because this isn't C++. This is Circle. Circle.
Starting point is 00:02:39 I think Circle, it doesn't have a logo. So you don't think post-release of C++11 was a more exciting time? I wasn't programming in C++ back then. I didn't start programming in C++ until 2000. Back in mod day, we didn't have no variadic templates. We had to stamp those out by hand. And you know what? We were happy about it.
Starting point is 00:03:11 I don't think people were. I don't think people were. Nobody was happy about it. But it got the job done. You know that's how that used to work, like, pre-C++11? Like, if you wanted to do something variadic template, like the the person who wrote the library they would just stamp out all the overloads and normally there would be
Starting point is 00:03:31 some pre-processor magic and you would you would you would define some macro that would say how many up to what already do you want it to support and and as you went to higher rd of course compile time would get slower and slower that's how that worked that's unfortunate but uh the improvement upon that in c++ 11 was not as exciting as this i i agree i think circles the most exciting thing yeah what's exciting about this is like this is a proposal that i was told by zach lane was dead in the water that makes me sad because this rust traits thing is is not going to entirely supersede what would have been possible with this pipeline operator. And now I offhandedly mention it to Sean.
Starting point is 00:04:12 I wouldn't say I was trying to nerd snipe him, but I did make a comment being like, I'll basically turn all my C++ talks over the next two months into circle talks if you can make this happen. Poof, three days later, he has it basically working. And then less than a week later he's got an instance of it on godbolt that people can play around with and it also works
Starting point is 00:04:30 with c++ 23 works with all the libraries it's absolutely phenomenal and so you're gonna revive this proposal and also i gotta say sean brilliant guy so easy to nerd snipe so easy to nerd snipe i mean this is like uh it's nerd sniping but also too like i'm thinking about there's a couple internal projects that i'm working at in nvidia and i'm using c++ 23 how how amazing is it that like like c++ programmers have been conditioned for so many years that a new feature takes years to deliver to you. And then you go to Sean and you're like, hey, Sean, could you implement this thing? And it's like three days later, he's like, yeah, here, this is done. Yeah, it's phenomenal. But does that say more about Sean or about the stagnation state of c++ compilers than it does about any any particular
Starting point is 00:05:46 special you know uh thing about him or circle i think it's obviously both i mean i don't think you would disagree that uh if sean is listening maybe he'll interested to hear his thoughts on this but sean strikes me as like a savant level like he operates at a very very high level i agree i agree but at the end of the day he is he is just one man and if one man even a savant level man like sean can make a compiler where he can so rapidly implement new features in unlike like three days versus the you know years that it would take for and and to be fair i think it was actually more like 24 hours and then the extra 48 hours was like him asking me for test cases and then he ran into like two or three bugs and then by ran into two or three bugs.
Starting point is 00:06:47 And then by the end of that three-day period, he was basically finished. Right. And then just waiting for some PRs to get pushed through on Gobbolt. I think that this says a lot about the state of the clang in GCC and MSVC code bases. And it's not to say that there aren't there aren't brilliant folks working on uh those three different compilers but like i have to say like i have
Starting point is 00:07:11 not been more excited about the people it's about it's about the code bases and it's about the process yeah but just like having this i had been in the back of my head thinking about like oh yeah it'd be really cool because i i have a pretty clear idea of I've already got probably 50 to 75 percent of my C++ talk done. And I've had the idea of what I wanted to do for, you know, since basically the beginning of the year when I started submitting talks or proposals. And I had thought in the back of my head, it would be really cool if I could have an actual working compiler to link people to the possible version of the solutions to these problems I'm going to be showing with the pipeline. But like, the only way that that's possible is through Circle. There's no way that MSVC, GCC, or Clang, unless if I forked Clang myself and did my own compiler hackery, but
Starting point is 00:08:07 Lord knows... We'll link in the description, show notes. I'm not going to remember his name, but he, I believe, lives in Israel, and he gave a talk at CppCon 2019, and he implemented concepts, and he just... I will now
Starting point is 00:08:24 attempt to nerd snipe anybody here who's a clang developer i believe that clang is is great if you think that clang is so great and if you think that circle is just a bunch of hot air then one of you goes go implement the pipeline operator in 24 hours and you get an extra 48 hours for bugs and tests. Go do it. You know what? You can even all team up. A group of you can go do it. I dare you to go do it in Clang.
Starting point is 00:09:00 I dare somebody. You get three days to go and implement this thing see if you can do it you know what it has me thinking now too is this is a feature that um i think for a while you didn't care about but then once you started using some ranges stuff you were like oh we need this and i was like i told you that like three years ago was the uh the papers called polymorphic lambdas with structure bindings or something that like that They don't call them generic lambdas. They call them polymorphic lambdas for some reason. Somebody once told me that the mark of a smart person is their willingness to rapidly change
Starting point is 00:09:34 their position when they realize they're wrong. Flexibility of thought. And I flip-flop like the best of them. Yep. But like now, that's got me thinking because there's this one code example. I actually haven't modified it to get it working but it's actually it's an example that barry uses in his proposal uh the iso c++ paper and that that solution will be enhanced even a little bit more if we have that uh generic lambdas with uh structure bindings so that you can unpack it right in the parameter list.
Starting point is 00:10:06 Yes. And like now I'm thinking like, I don't even know if that's possible. Like I think some things need to be figured out, but now I'm, Sean, if you're listening, if you need something else. Please, Sean. And now this just makes me think like I have,
Starting point is 00:10:19 Sean doesn't have time to listen to this podcast. We can safely say whatever we want about Sean. He's not listening. But the point is, is like I'm just over the moon that now, not only do I have access to this and I can use it, but like I basically, my talk is going to be a C++ talk for like the first two examples. And then I'm just going to switch.
Starting point is 00:10:41 I've even made my own circle logo. But circle is C++. It is, but C++ doesn't get me this excited. Yeah, but I want to drive this point home because I think this is a point that Sean would make. Circle is not a successor language to C++. It's not trying to be a different language. Circle is trying to chart a better path forward for C++ and specifically a better path forward for how we develop and evolve C++ would be better off if we just appointed Sean the dictator of C++. And we just closed up the ISO shop. And, you know, just the future evolution of C++ was all done through Circle.
Starting point is 00:11:41 And Circle was the official reference language. But what Sean really means by that, when he says that Circle is C++ is that it's, you know, it's extensions and proposals to C++, but that it's all built on top of C++ itself. That it's not meant to be a new language, it's not meant to be a thing from scratch. That he feels that it's not not meant to be a new language it's not meant to be a thing from scratch um that he feels that it's important um and also he feels that that we can't evolve c plus plus into a better language and he's trying to show us how to do that and he thinks that that's a better idea than going and building these successor languages. So I went and looked up Pokemon Evolution because I wasn't allowed to follow Pokemon or watch it
Starting point is 00:12:31 or have the card story for a different day. Yeah, you had an interesting childhood. But so I'm not sure if Charmander is like pre-C++11 and then Charmeleon is like C plus plus 11 slash 20 like all the new additions but like charizard is definitely circle it's like so that's that's what i mean is that like i don't want to put a c plus plus logo in the top corner of my circle code because c plus plus is either charmander or charmelian whereas circle is And, like, that's the thing. I know about Charizard because it was one of the cards
Starting point is 00:13:07 that everyone was after. I couldn't... Not in a million years would I have been able to tell you Charmander and Charmeleon. Like, I know Pikachu and Bulbasaur. I mean, Charmander's pretty good, I gotta say.
Starting point is 00:13:17 Like, you know, he was pretty good back in the day. Back in the day. But now... And so that's the thing, is I just... I know that Circle was C++. Because, like, he's, like,
Starting point is 00:13:24 good against, like, the first couple of gym bosses. I think in the original games, I think Squirtle was really the one that struggled. Yeah, I mean, I know Squirtle is the little toad looking one, right? No, no, no. Maybe it was... Where's that Bulbasaur? Maybe it was the grass one.
Starting point is 00:13:46 Anyways, one of them had difficulty against the first few gym bosses. The point is, Charizard, aka Circle, is the evolved C++. And so even though they are the same thing in some respects, and I think that's how sean wants to market it is like this has me so excited now and like although i i will say i sean is not somebody who does marketing sean sean is telling you genuinely what he thinks and believes i've i've never heard a man with less bullshit in me. Okay, I'm sure. And I say that as a person with a great deal of bullshit in me. I knew how that sentence was going to end. And I say that. Fill in the blank.
Starting point is 00:14:33 Oh, I have a dog. And she's going to come right over to me right now. Yes, she is. She has to say hi. Because she just went outside. All right. Let's wrap up wherever this is going. So what did you want to talk about?
Starting point is 00:14:53 I mean, just basically announcing that there will be links in the description for folks that want to go check this out. And in general, it just has me more excited about, like, I think last episode i said using some of the other features like language tuples and variants would have me a little bit concerned because then it becomes like a lot less compatible with like existing c++ compilers and now i'm thinking to myself what what version of me is saying that like i want language tuples why why do i even care if i'm if i'm veering a little bit away from C++ if I'm just going to be compiling with Circle? Anyways, the point is Circle's amazing and super excited about it. Yeah.
Starting point is 00:15:32 So stay tuned, folks. My C++ talk is now a Circle talk. Thank you to Sean. Super excited. And also, too, like I don't mean to say this, too, that like, you know, C++ is done. Like I think the folks in the C++ ISO committee should be like... I know that the template metaprogramming group, which I think actually is temporarily shut down from what I've heard. I mean, I don't
Starting point is 00:15:51 really follow the ISO ins and outs. Well, I mean, honestly, no. But I mean, your point about you're not saying that C++ is done, I mean, I think that's Sean's whole point is that C++ isn't done, that the future of C++ should be
Starting point is 00:16:08 circle, a point with which I wholeheartedly agree. I just, I feel like I'm going to be testing out all of my personal projects that I have, because I already was going to, I kind of was waiting for C++ 23 so I could just get rid of a lot of the range
Starting point is 00:16:24 V3 stuff that i was depending on and now that i'm doing that i just i feel like let's check let's check on circle laying do they have cmake um i would almost oh i googled cmake and it doesn't actually say anything but i imagine i mean if you can get this to work on the command line you can get this to work with CMake, correct? yeah, well as somebody who has spent some amount of time
Starting point is 00:16:53 trying to get CMake to work with new compilers it's not trivial let's go to the github circle github Let's go to the GitHub. Circle, GitHub. Circle CI is the first thing that comes up. Sean. Have we ever done an episode where we talked about how we like to present?
Starting point is 00:17:18 Like at conferences? Yeah. I don't think so. We've done like meta conversations one of them came up with Sean Parent who we have to have on we apologize Sean I can't even when's the last time we've had him on it's been way too long
Starting point is 00:17:33 I don't know we're gonna reach out Sean we'll see if we can that's what we'll do he's at C++ now we're supposed to talk to Tristan Brindle oh yeah I gotta say because like He's at C++ now. We're supposed to talk to Tristan Brindle. We're going to have Tristan at home. Oh, yeah.
Starting point is 00:17:45 I got to say because, like, I am not at C++ now. Yeah. Okay. I'm not there this year. There's no particular reason. I just have a lot of travel. This one, this was the trip that got cut. But I am not there i'm getting like three or
Starting point is 00:18:08 four messages a day from people being like hey where are you we're we're going to dinner or like other various inquiries it's like i'm fine i am not i am not in a hospital i am not sick it's just simply not at the conference. I feel very sad. Nobody's asked me why I'm not at the conference. You're not as important as me. It's clearly not. Clearly not. That's not true. I may be a more prominent person right now, Connor, my my velocity may be greater but your acceleration is definitely greater i feel like in 10 years from now i'm gonna be telling people oh yeah i knew connor
Starting point is 00:18:51 back when he was a little what do you what do you mean this this podcast is still gonna be happening you're gonna be telling people i know him we're still gonna be co-hosts buddy uh i i definitely will be telling people i know you do you tell people that you know me uh i mean people people just know that we know each other because most people that know that's true actually i mean i don't i don't know like because what are the circumstances where i'm at some event it's always a conference and typically the crowd at the conference except for c plus plus now which is a conference that i am not attending yeah i don't think i'll be ever ever be able to make it back unless if i skip because i am in the midst of three races two one that i had a couple days ago and one that i had a
Starting point is 00:19:39 week ago and then there's one on the 14th So like basically the conference is bookended by like two of my favorite races. Yeah. Anyways, back to us. So there are a couple issues on the Circle GitHub that are entitled. They're closed. So we can go read them. We'll link them in the show notes. Advice to replace G++ with Circle for CMake projects.
Starting point is 00:20:01 And there's been a couple other CMake fixes. So it looks like there is CMake support. Probably there should be a bullet point on the homepage that says something about that. It may not support all the flags, or it may not have built-in support for setting the features, and I don't know whether
Starting point is 00:20:17 Circle CUDA is fully supported by CMake and things like that. Yeah. But I'll be testing it out. So stay tuned listener. And yes, Sean, we'll have you on. What is it today? We can have both Sean's on. Wait, have we had
Starting point is 00:20:33 Sean Baxter on? Oh yeah. When you recorded in your apartment. We did a three-part episode. Which is so unfortunate because that I think is one of our best episodes of all time. But because you recorded in an apartment, it was super echoey. So, like, that's, like, one of our best episodes and one of our worst quality audio qualities. But it's still, I think, people loved it.
Starting point is 00:20:54 It's just would have been amazing if. Well, this episode is not going to be one known for our audio. Like, I don't know how I sound right now. No, you sound decent. I mean, it's not as crispy clear, but's like 60 70 is good so i'm gonna get a travel mic just so that wherever i am in the world i can always can always do something yeah and uh yeah we'll have sean we'll reach out and so yeah what, the date today is the 10th. We're releasing this.
Starting point is 00:21:27 Don't tell me that. I don't want to know that. This is getting released on the 12th. As far as my mind is concerned, it's the start of May. It's not May 10th. It's the start of May. I've still got a month ahead of me. Okay?
Starting point is 00:21:44 Glad we're all on the same page. Oh, yeah. We probably, let's see if we can record with either tristan and ben so we're gonna have a just to let the listener know we got to record we got to record next week because then i got my mom in town um so let's do well we we have to record like i guess we're gonna to record in Slovenia. Yeah, well, let's try and do it early because I'll be in New York Wednesday to Saturday, so I can't do it then. And once again, to clarify, you are not coming to see me, even though you, my closest friend, are coming to New York. I'm going to Montauk. Instead?
Starting point is 00:22:22 I'm going to Montauk. You can come to Montauk. Instead. I'm going to Montauk. Instead. You can come to Montauk. Oh, at the last New York C++ meetup, I told multiple people about your trip to Montauk and the ridiculous mechanisms by which you are using to get from the airport to Montauk, and everybody agreed that... Hey, it's not my fault.
Starting point is 00:22:40 Google Maps said there was no transit to the Gurney Resort, and I didn't think to change the location. As my girlfriend will happily tell you, you should not rely on Google Maps as much as you do. What? What else should I rely on? I don't know. Common sense? I thought you were going to say me, Connor.
Starting point is 00:23:00 You should have asked me. No. Connor, you should have asked me. No, I used to think I had an excellent sense of direction, but I didn't know I was clumsy, and I didn't know that I didn't have an excellent sense of direction. These are things that I feel like your parents should tell you, but I did not learn those until recently, and I have no table manners. We live, we learn.
Starting point is 00:23:26 Yes. Yeah. We're going to see each other lots, though. We're going to see each other for like a week. Also, yeah. I still have to book hotels. But that is, yes. I'm working on finalizing the travel plans.
Starting point is 00:23:43 Yeah. I haven't booked half of my hotels. I got all my flights booked finally just like a couple days ago. Almost messy. Who are you flying out of Venice? I'm going to Dublin, so I'm pretty sure there was only two options that were direct. One was Ryanair and one was Aer Lingus, and the Aer Lingus one was – Please, please tell me you took the Aer Lingus one yeah I I've heard okay I've heard that Ryanair is kind
Starting point is 00:24:09 of the equivalent of flare I'm not sure if you've heard of that airline but I like to say if you don't care fly flare yeah um but honestly it was more because of the time of day one of them was like eight in the morning the other one was at noon so so you took the eight in the morning one no i took the noon one okay well mistakes mistakes why you should i mean you should prefer to to take the first flight in the morning because it's delays accumulate throughout the day and also if you take the first flight in the morning or the like the last flight of the day then you get to spend like the full day at your destination if you travel in the middle of the day then like it's it's just a full transit day now if it's a full transit day if you're on like an eight hour flight that doesn't matter but if you're flying somewhere
Starting point is 00:24:59 that's like two or three hours away if you take the 8 a.m flight you get in like 10 11 and then like it's just like you you know had like a slightly late morning getting up whereas if you take the noon flight then like you just you've lost that whole day i don't know if i'd agree with that i'm just saying you denied yourself anyways anyways that that the air lingus flight Aer Lingus flight. I'm taking an 8 a.m. flight out of Venice to go to London Heathrow. My flight to New York is like at 5 p.m., but I'm going to go to some lounges. Anyways, I got to go. I'm so sorry. What were you saying about the Aer Lingus flight?
Starting point is 00:25:38 Oh, no. I was going to say you told me not to take Ryanair, and the Aer Lingus one was the one at noon. So you're giving me conflicting – what do I do? Better airline at noon or worse airline at 8, you're giving me conflicting, you know, what do I do? Better airline at noon or worse airline at 8 a.m.? You made the correct decision. But the bigger problem is why are you booking flights without still, like, talking to me? You know, there's a short answer to this, Bryce. And it's because I've had literally book all my accommodation and travel on my list of things to do since back in March.
Starting point is 00:26:03 And we're now – That's fair, it's now May 10th. And I just like, I'm so, it just, it doesn't take a ton of time, but it takes like a couple hours to book like a few different flights and look around. You know that I love playing. I know, but I procrastinate so much on it that like finally when it gets to like an 8 p.m. on a Monday and I'm like, okay, I'm actually going'm actually gonna do this i'm not gonna message you to then find out oh i can't let's do it tomorrow morning i would drop everything and just go do it now you might open up a few credit cards in the process okay i gotta go though all right it's been a blast we will yeah chat next week and uh all the
Starting point is 00:26:41 listeners have a good have a good week be sure to check your show notes either in your podcast app or at ADSPthepodcast.com for any of the topics that we mentioned in today's episode, as well as a link to a GitHub discussion where you can leave any thoughts, questions, or comments on today's episode. 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.