And I think reflection is kind of a reflection of that. Is that the cold open right there? Yeah, it's it's uh it's a great talk, and I'm glad uh David got his free beer. Welcome to AD SP the podcast, episode 201, recorded on September 26, 2024. My name is Connor, and today with my co-host Ben, we recap CPPCon 2024. All right, yeah, we can hop into things. Uh I'm doing good. How are you doing? I'm alright.
BenYeah. Last week was CPPCon, which was cool. It's right here on my doorstep. I do like to get a hotel room for the week because the hallway track is what it's all about, right? Yes.
ConorAnd Aurora is, I'm not sure how far it is uh from you, but it is in general from Denver like a 30-40-minute drive, depending on traffic, correct?
BenUh give or take, yeah. It's because it's out by the airport. I mean, so I'm technically on the same side of town. I'm in the northeast quadrant, but it's about yeah, it's about 25 minutes from my house. Jason lives about halfway between my house and the hotel, the conference hotel. He's slightly closer. Okay. He's a little bit closer.
ConorSo does does he stay I'm guessing he commutes from home because 12 minutes is uh a little bit more doable than 30.
BenHe does he does commute. One day he uh he one day he did the run. One day he either Wednesday or Thursday, he decided to uh get up in the morning and and run from his house to the Rockies. To the the Gaylord of the Rockies.
ConorThat's one way to do it. I guess then did he have to run home at the end of the day as well? I don't know.
BenHe might have got a lift with one of the other locals. I don't know what he how what he did the other day. But it's about it's roughly a half marathon. It's around from his house to the Gaylord of the Rockies.
ConorMy guess is he didn't he didn't do 20k in the morning and then 20k at the end of the day. I'm guessing he didn't run home. Because that's a marathon. That's a that's a a CPP con day sandwiched inside a marathon, uh half on each side, which would be pretty intense. Anyway, so that is that is the topic of episode 201. I mean, we should uh people might be a little bit confused, but they did get a teaser. I think it was in episode 196 or something, because Bryce and I recorded for two or three, and it was the one where we were at CPP North. We teased that we might be replacing Bryce, and that's what we've done now, at least for the short term. We'll see how it goes. We've got a new co-host. So, you know, we might keep Bryce's uh Twitter info and whatnot in the in the show notes, but we're gonna have to add uh Ben's, and we're doing our first topic, which is a CPP con recap. You were there, I was not. I believe you were you speaking?
BenI did have I had one uh scheduled talk on the main program, and I did an open content session and I did a lightning talk.
ConorOkay, so maybe we'll st we'll start with recapping your talks and uh how they went, and then we can go into highlights from other talks and keynotes you saw.
BenUm so my talk was the same one I gave in Toronto, message handling with Boolean Algebra. Uh I may have titled it message handling with Boolean Implication at one point. It's the same talk, basically. And it's about, you know, it's about the open source library, one of the open source libraries we have that I work on at Intel, um, which is whose job is message handling and matching messages that come off the notionally off the wire and dispatching them. You know, this is a a topic that loads of people have in their code bases, right? Uh this is a very common sort of problem to solve. We wanted to solve it in a very generic way, and what came out of it was, I think, this really nice library where you know how sometimes when you're writing code, you just know things are composing well together. And and and that's because it's it's just Boolean algebra under the hood. But this talk suffered a bit from maybe a sort of lackluster abstract because people see, oh, message handling with Boolean algebra. What's what's exciting about that? You know, this is something everyone does message handling, everyone knows Boolean algebra. Um, but this talk had, I think, a really good pacing. It was it was kind of it was baby steps building and building and building. You know, it's one of these talks where actually I had someone tell me afterwards, they said that was a very approachable talk. They said I followed like 85-90% of it. There are some non-obvious things in the talk, um, and in particular the use of implication, which people don't, you know, it's hard to intuit as a human, Boolean implication. It's one of these operations we don't use very often, or at all, really. But I used it as a building block in the talk. So I it was a talk I was very happy with, you know. I submitted it's funny, the the the two talks I had this year, sort of that I made this year, um, were that one and the one about senders and receivers. I submitted both to CPP C now earlier in the year. Of course they only picked one. From my point of view, they picked the wrong one. They picked the senders and receivers, which is you know, which was the new is the new hotness and totally appropriate for C ⁇ . Now, unfortunately, that was the one I hadn't made yet when they picked it, so I had I had to make that talk. But I'm glad I got to give the Boolean algebra message handling one both in Toronto and just in Aurora.
ConorNice. I now we will leave show notes for for all instances of those talks. And I I can definitely agree with the approachable part. I think I recall when I watched it in Toronto and uh at CPP North that it was up until the uh implication part that like everything I was following along, and then you kind of made a statement, and I was like, I guess, and I kind of like squinted and you know, my eyes rolled up and I started thinking about it, and I was like, okay, I can kind of see that. But then like you walked through a couple different ways of looking at it and examples, and then by the end of it, I was like, okay, I completely understand now what he was saying, and I definitely didn't. The squinting of my eyes and like thinking that I understood it was like generous. I did not, and then after you walked through those couple examples, it was like very clear. Uh so yeah, I I can totally agree with that feedback that you got from someone saying that it was approachable. Um and when the word algebra is in the title of a talk, uh you know, it's not always the case that it ends up being approachable.
BenSo Right. Yes. Well, I'm anyway, I thought it went really well, and I'm happy with that talk. You know, uh perhaps you have the same thing as a speaker. Some of my talks you know, the talks vary, frankly. Some are on some are like when the topic comes together with a really good explanation and a really good, you know, and it just feels good. Other talks are more of a slog to get through, maybe the timing's not quite right, maybe you know, different things go wrong with them when I give them you know, and uh maybe it's only me who maybe it's only the speaker who notices, because at the end of the day, the audience doesn't notice what you don't say, what you leave out, or all those things you had in your head, right? But I think this is a sort of a natural uh feeling as a as a content creator of any kind, right, that um there are always things you wish you could have highlighted, said, done differently. But anyway, this talk I thought was not one of it was one where I was very happy with it, right?
ConorOverall. Yeah, it's nice when that happens. And definitely it's a true uh fact that as a speaker you have, or at least I think most speakers that I've spoken to, they have like a vision and a picture and some amount of rehearsedness to what you're gonna say. And then inevitably, in most talks, not all of them, like it sounds like this one went pretty, pretty smooth and you said all you wanted to say, but every once in a while, or you know, in half your talks, you'll s forget to say something, or you said something a little bit differently than you wanted. You will notice, but like the audience doesn't actually know what you wanted to say, right? So in your in your head, or when you go back and rewatch it, you'll be like, ah, I can't believe I forgot to say that. But what the lit the listener or the watcher, they're not thinking, oh, I wish he had said that thing, yeah, he or she didn't say. They don't know that you wanted to say something else there. So I I think it's true that you you're always a harsher critic uh watching your own talks than like someone else, right? Because only you know the delta of what you really wanted the talk to be. The listener or viewer doesn't have that. Right. Anyway, so you also said you did an open session and um a lightning talk.
BenSo the the open sessions are great. Like last year's open session, last year I came to C P Con and really enjoyed the open sessions. This year, same again. It's like hallway track plus plus. I gave an open session, and I gave an open session that was very similar to my game last year, which was just like a grab bag of oddments, was the was the title. Another grab bag of oddmonds. Just like oddities of C ⁇ , weird things, strange things, things that may be useful, or may not be, you know, or might be one day. Just I I think it's really important just to play, right? And this talk is in the spirit of play. Um so neither talk has ever been recorded. I've given them a couple of times at meetups and things, but they're never going to be recorded. Um but they are really just interactive sessions where I present snippets of code and I say, you know, here's some code, here's some code which doesn't actually compile, but we might th if it did compile, what would we think? Or, you know, what uh here's a really odd thing that I discovered, and maybe it's not useful today, but you know, if uh if C has taught me anything, it's that is that today's thing that we turn our nose up at and think is a horrible technique is tomorrow's well-accepted building block.
ConorYes, yes. I mean, so you you've teased the listener. Is is there any form it doesn't sound like a slide deck or Godbolt links that we can send, you know, one or two of them if uh people are curious, or did they just have to come to CPPCon or a different conference or next week?
BenWell, it's a good reason to go to a conference or attend a local meetup, I would say. Uh there may be slides out there. I did have slides, and I posted the slides to the CPPCon Discord. So they are semi-public. But I'll give you an example of one of the oddities here, right? So Perfect. We're aware, uh, and I think most of our listeners probably at this point have heard about the old the array indexing trick where you can swap the array and the index because it's just doing pointer arithmetic under the hood and arithmetic is commutative, right? So if you say a index of three, that is the same thing as saying three index of a. Again, because under the hood, the array decays to a pointer and it adds three to that pointer to to get the element, right? And pointer plus three is the same as three plus pointer. Right. This is uh known, right? This is not in in the context of C oddities at least, this is not a new thing, right? But uh one interesting thing is to consider uh what happens if you try and index an array and the index you're using is an immediately invoked lambda expression. Okay, so you have a open square bracket, and then your lambda expression, and then close square bracket. Well a lambda expression begins with an open square bracket. When the compiler sees two open square brackets in a row, it thinks you're starting an attribute. Because that's how an attribute starts. And the attribute f is two tokens. Then it's not one token which is double square bracket. In the grammar, it's actually two tokens of single square bracket. So any amount of white space in there doesn't matter. The compiler will not let you index a C style array with an immediately invoked lambda unless you put parens around it, perhaps, or unless you flip the indexing. So you have the immediate invoked lambda first and then you index of the array. Right? So it's a real-life use case, perhaps, for this reversed indexing.
ConorWell, yeah, for the people that are trying to use immediately invoked lambdas for the purposes of indexing. Uh okay, yeah. I I can definitely say I've never thought of that.
BenThis is the whole spirit of the talk. You know, it's all about playing with the language, seeing what happens. And like, yeah, I don't have any code that I could point to right now that uses immediately invoked lambdas for in for indexing C style arrays. But you know, that's a tool that I have in my back pocket now. That's an old that's a possibility.
ConorIt's it's almost similar in um spirit to your uh accumulate exploring an algorithmic empire where you bend algorithms, not necessarily how they should be bent, but by bending them you learn some things and learn to understand, in that case, the algorithms better, but in this case like the language better.
BenYeah. The keynotes are up online right now. You can find them on YouTube. And there were there were two keynotes in particular that I think will be very interesting to folks. Khalil Estelle gave a keynote on C exceptions for smaller firmware. This was a fantastic talk. Lots of data, surprising stuff, lots of hard measurements of like what do exceptions actually cost, and you know, he's doing work making exceptions better, quantifying and quantifying them and implementing them better. And there are some surprising conclusions in there, right? Uh it's surprising to some folks even that exceptions are part of or maybe part of embedded. They're completely defined in freestanding. Although we know that most people working in that space would typically turn them off. But this keynote, C exceptions for smaller firmware, was a real eye-opener. So fantastic talk.
ConorSo you say they're online. I myself have watched both Herb's and David's keynotes because uh they've been posted to the CPP subreddit, but they're actually unlisted. I haven't seen Khalil's talk. Do you know if that one was also so if you are a Reddit, you know, goer, you may have also seen these talks. I will make sure to find the unlisted links because they they have been made public. It wasn't me. I didn't do it first. And I I do I do know that CPPCon is uh I think they are, they're doing some kind of thing where you can get like early access.
BenThey're offering paid early access, yes.
ConorOkay, no, I actually I have found it's the it's the number 43. I must have missed this. Khalil Estel, C exceptions for smaller firmware. So all of these links that I think you're about to mention uh will be linked in the show notes, even if they're not public on YouTube yet.
BenWell, the other one I was going to recommend is David's closing keynote about reflection. And at the conference, I have to say that it was the very last talk, and as you know, like everyone is wiped out by that. So the energy in the room is fairly low. So I think the talk is worth going back to and watching a second time, at least for me. Because because David showed a ton of exciting stuff that's coming down the pipe with reflections. Not including, famously not including, uh converting an enum to a string. Andre had had words about that in the conference, Andre Alexandrescu, you know, I think he said at one point, you know, Enam to string almost killed reflection. It is it is it seems to be the one thing that everyone wants a solution to yesterday, but it is a tiny, tiny part of reflection and not very exciting at all, frankly. Um but David's keynote shows many more exciting things.
ConorYeah. What did you I mean, what did you think of not just the presentation but the proposal? I haven't gone through it in detail, but Bryce also says he's extremely excited about it after having seen the I think it was the code injection examples at the end.
BenYeah, so it's worth pointing out that the read part of reflection is one paper, and the write part, or the, you know, the the introspection and the injection are two different papers. And it looks like we're going to get introspection, and we may also get injection. Um, but the one paper is further along than the other, as I understand it. 426.
ConorOkay. I'll make sure to link both of those. Um because I I only peruse the uh the Reddit comments, but a lot of them were like, this is amazing. I can't wait. I needed this like five years ago. The other ones were saying uh this is just gonna complicate C even more, which I mean at this point it's not like C. I know Herb always says it's gonna become a simple language or 10x simpler, but I don't know. I think that ship has kind of sailed.
BenSo uh well I think it's a question of the the library slash application boundary, right? I think the application side may get a lot simpler. The library side, it's not going to get simpler. Because it's practically C's motto that you know any amount of implementation complexity in the library is acceptable as long as the API provided to the users of that library is clean and compositional and nice, right? So we don't shy away from complexity of implementation inside libraries. And I think reflection is kind of a reflection of that.
ConorIs that the cold open right there?
BenYeah, I realized I was going down that path in the sentence, but I couldn't think of another word, so I just went with it.
ConorYeah, it's it's uh it's a great talk, and I'm glad uh David got his free beer if you if you do go and watch it. Well, that's right. It uh he talks about this free beer that Andres promised him if he doesn't talk about the uh enum to string. Um before we uh you know finish with your lightning talk, any other talks that were outside of keynotes that uh you especially liked?
BenThere were a few talks about senders and concurrency in general. So Dietmar Cool showed a a senders and receivers based HTTP server creation. Uh Ian Peterson and Jessica Wong are two good folks at Meta. They presented their version of debugging code using senders and coroutines. Oh wow. And it was really cool to meet them. As you might know, I'm an implementer of Intel's bare metal senders and receivers. So it was good to uh put faces to names, right? And meet Ian and Jessica in particular. Um Andreas Weiss gave a talk, an open content session and a main schedule talk about uh coroutines. If if anyone needs a grounding in coroutines, uh an introduction uh uh uh to the technical aspects so that they understand them, I'd recommend Andreas' talks. And then Michael Case, my good friend and colleague, gave his talk about uh it was called Sender Patterns to Wrangle Concurrency in Embedded Devices. That was a great talk. Michael and I were working on his demo up to and including the day before his talk, and uh it was a really good talk. So using senders as the title says, using senders to wrangle concurrency in embedded. Awesome.
ConorI will put all of those talks in the show notes, but admittedly, I don't think any of them out outside of the keynotes will be linked immediately, but as they do become available online, uh, if people want, they can check back. Uh because usually conferences these days they roll them out slowly.
BenUh and it's gonna be another couple of weeks, I think, before they're even available. At least another week. They won't they won't be out till beginning of October, at the earliest, f for the uh for the for the paid early access, even.
ConorAnd last but not least, your Lightning Talk, I assume they're still five minutes.
BenLightning talks are always a mixed bag, you know. Some s they're always some are funny, some are very technical, some are advertisements for libraries or companies. Um among the ones I thought stood out this year, um Cassioneri, my my accidental calendar geek friend, gave a couple of lightning talks about a fast conversion between a date and a weekday. So computing the weekday quickly, which is which was really cool. Uh and it's a it's a it's a trick that relies so dividing by seven is the basis of computing a weekday, right? Right. But seven is one less than eight, and eight is the base of octal, right, which is basically binary in disguise. So if you think about it, so the equivalent in decimal, as we humans think, is thinking about dividing by nine. And there are tricks you can play to to do that, and so there are also tricks you can play to divide by seven in an octal system or a or a binary system, right? Um and Casio Casio has a nice, a very just a couple of instructions. Uh it boils down to just a couple of instructions to compute a weak day, a multiply and a shift, basically. Interesting.
ConorOkay. Well, add that to the list.
BenUh Braden Ganetsky gave a talk which he'd given at CopusNow about it was a funny talk uh called Brain Plus, which is uh a syntactic sugaring of his parser combinator library. That's worth a watch. And then a couple of um new speakers who I want to call out because new people getting into Lightning Talks is always is always good because you know it leads to main talks sometimes. So one of the folks from my local meetup, Emily Jury Johnson, gave a talk, Coding Like Your Life Depends on It. She works at Medtronic. Um it was great to meet her at the at the conference, and and like I say, she's at my local meetup as well. That was a really interesting talk. And then Alex Mann gave a talk about her experiences um being mentored. Uh her talk was called Just the Cliff Notes, A Mentee Adventure. And her slides were great. She had made them on, I think it's called Canva. I hadn't heard of it before. Oh yeah. Uh but you may have.
ConorIt's a web uh-based thing, I think.
BenYeah, yeah. Very high-quality slides there, Alex. And how about your lightning talk? Uh my lightning talk, I forgot what it was now. Oh right! No, I remember. My Lightning Talk was not about C ⁇ . Well, only turned gently, it was about cryptic crosswords. So I made that crossword. I sent you a link to it just before the conference. You may or may not have looked at it, but I the week before the conference, I woke up in the middle of the night with a seething brain, wanting to just I just had to get things out of my head, and I made ended up making a crossword, C themed. Found a site that hosts these things. It's called Crosshair, like hair like rabbit, crosshair.org. Yeah. And uh I got a couple of my friends to test it thanks to Scott and Tristan. Tristan Brindle, friend friend of ours, um, is a bit of a cryptic crossword uh aficionado. So, anyway, my lightning talk was an introduction to that, making people aware of it, putting out this kind of C theme puzzle for people to have a go at if they wanted to have some fun. To the people who haven't met these crosswords before, they are impenetrable, uh, to say the least. But but they are fun. I had people come up to me afterwards uh or the next day say that, you know, they tried it over breakfast with some colleagues and they've managed to get a couple of answers.
ConorWell, maybe uh maybe a future episode will be uh me because I have not looked at it. I did look at the one-minute cryptic link in the show notes. Okay, and I think I've failed to do the two or three that I tried. But maybe I'll do it. I'll see how far I get, and then we can walk through. So, a future episode. Ben and I walk through solutions to the puzzle. So go ahead and try and complete it before I'll say the next four or five, and uh, we'll do that on a future episode. All right, I think we have to hop over. Uh so link in the show notes for all the lightning talks and full talks, and uh, we're gonna hop into our next recording. Cool. Be sure to check these show notes either in your podcast app or at adspthepodcast.com for links to anything we mentioned in today's episode, as well as a link to a GitHub discussion where you can leave thoughts, comments, and questions. Thanks for listening. We hope you enjoyed and have a great day. I am the anti price. Um