In this episode, Conor and Ben chat about a yet to be named algorithm, potentially multi_transform or for_each_but_last. Link to Episode 229 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP: The Podcast: Twitter Conor Hoekstra: Twitter | BlueSky | Mastodon Ben Deane: Twitter | BlueSky Show Notes Date Generated: 2025-04-09 Date Released: 2025-04-11 Haskell init Common Lisp butlast ADSP Episode 36: std::transform vs std::for_each Intro Song Info Miss You by Sarah Jansen https://soundcloud.com/sarahjansenmusic Creative Commons - Attribution 3.0 Unported - CC BY 3.0 Free Download / Stream: http://bit.ly/l-miss-you Music promoted by Audio Library https://youtu.be/iYYxnasvfx8
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
BenIf we only stick to random access, then we are leaving some algorithmic insight on the table because we're not genericizing the algorithms beyond what's in front of us.
ConorWelcome to ADSP the Podcast, episode 229, recorded on April 9th, 2025. My name is Connor, and today with my co-host Ben, we chat about an unnamed algorithm potentially multi-transform or for each but last and more. Have you been? Yeah, are we are we popping into things and then we'll we'll the topics will come up as they come up? Well, I have some questions.
BenI have some potential topics. Um that uh I've you know I made a short list of questions for you a while ago. Or topics that we could talk about less uh more so than questions. I I think the questions have uh been answered from our previous talks. But did you have something?
ConorNot really anything uh lined up. When you said you'll bring some short topics, I figured we would just pick from the if we run out of stuff to talk about. I do have some stuff we can talk about. I mean, uh but I I I doubt that we will run out of stuff. But anyways, we yes, we can start with how how how have you been? I've been good, how about you? Uh good.
BenYeah, pretty good. We had uh we had a fake spring here in Denver and then it turned cold again. So I I turned my sprinklers on and then I had to turn them off again um last week. But uh they're back on now. It's gonna be warm again. Spring weather this week. Wow. How long did the um the winter rematerialize for? Well, it didn't get super cold. Um it was about a week of like cloudy days and freezing nights. I mean it got down to minus five, minus six Celsius.
BenWow. Which is not real cold, but it's cold enough that it's cold enough.
ConorIt's cold enough, yeah. You're not wearing shorts outside. There was a one night, I mean it it's it's below zero in Celsius right now in Toronto, but it was really nice for like a week or two, so it's kind of similar, but it it um for one night overnight, I guess it it was blizzarding for like it started at like 2 p.m. There was no snow on the ground a couple days before it had been like above zero Celsius, and then started blizzarding, dropped to like minus five, but then like popped up above freezing for the evening, so then it just turned into this like slush, like freezing cold nightmare.
ConorAnd uh and then the next day by like 4 p.m. in the afternoon, 3 p.m. in the afternoon, it was like 18 degrees Celsius, which I don't know what that is in Fahrenheit, but it's like shorts weather and t-shirt weather. And there was a bunch of parks that just had like flooded with because it you know, you got all this precipitation, and then uh anyways, it's just like one second it's nice, the next second it's blizzarding, the next second it's freezing rain. Anyways, enough about weather.
BenYeah, it's nice here in Denver today. It's like sunny and twenty-two degrees or something. It's back to spring. Celsius, yeah. Yeah, yeah. That is very nice. Back to spring. Whether it will be a f another fake spring, who can tell?
ConorYeah. I mean, fingers crossed, we're we're recording this April 9th, and uh this will be coming out over the rest of April, probably. Okay. So hopefully this is gonna be springtime, no more snow, but you know, time will tell.
BenUm anyways. So I have been thinking recently about an algorithm that I actually asked you and Tristan about a while back. Um which is well, there are a couple of algorithms. Actually, I'm surprised we don't already have them in the standard, and not even I've looked, they're not in Boost algorithms, they're not in ASL Adobe source library. Adobe's, yeah. Yeah. But one of the patterns I had noticed, because I work in embedded now, one of the patterns I'd noticed in interfacing with hardware is that sometimes you have a range, you have an array, let's say, of integers or integral types.
BenThe first one of those you write to one register, and then the the body of them you write that countless data that you write to a different register, and then the last one you do something else again. Um, maybe writing back to the first register, maybe writing to a different register, but there's this idea of like you're you're trisecting the data, you're doing an initial thing and a final thing, and in between you're doing a medial thing for all of the elements. And so this would be nice to have an algorithm to do that, and it and that was what I originally asked you and Tristan about.
BenIt struck me that a building block algorithm for that, because it's quite easy, it's trivial to um take off the head of a sequence, right? But it's less trivial to do all but one or all but n of a sequence, right? So you you do something so so for everything in the sequence except the last one, right? So you stop at the last one. And that's kind of the building block algorithm, an algorithm we might call for each but last or for each but last n, perhaps.
BenUh and what brought me to mind, what brought this algorithm to mind for me was this this is an algorithm in Common Lisp, and it's called but last. Um but I but it's not an algorithm in C that I've ever seen anyone use.
ConorWhen you say but last, uh that's minus the transformation, right?
BenThat's just the destructuring of the Yeah, it's Common Lisp calls it but last. You can think of it as like four each but last. Right. Actually, actually, in Common Lisp, it's in Common Lisp, it just returns a list minus the last element. Right, right.
ConorI mean Haskell does Haskell does have this as well. Um there's four of them, right? There's head, tail, uh knit, and last, I think. And so I think a knit is the one that is the n minus one first elements.
BenOkay, okay. But uh yeah, now you mention it, that I that does ring a bell. There is I'm sure a way to do this in Haskell. Um so the question in C ⁇ is how we would how we would do this. Would we do it? It seems natural to have for each but last, for each but last n. These seem like natural interfaces at least that we could think about. Would it be appropriate to do this? I mean, we could do this by like a a reverse, a take, uh, a reverse, a drop and a reverse or something, you know, in in ranges.
BenUm or we could just do the old style two iterator algorithm, right? And it's sort of trivial for random access iterators. Uh it is less trivial for bidirectional iterators, and it's less trivial yet for forward iterators.
ConorRight. I mean, and so uh we're just talking about the the simplified version. We're not talking about, you know, first, middle, and last. We're just talking about the.
BenYeah, no, I'm just talking about for the moment the the but last algorithm.
ConorYeah. I mean, my first thought, which is odd because I didn't have this thought when you asked Tristan and I via email, was you asked us like what would you call this kind of algorithm? And I think, if my memory serves correctly, I said something like multi-transform.
BenYeah. That was for the higher level algorithm I think I was asking about. Yeah, the three-pronged one.
ConorYeah. And the I don't think that's a great name, but it does capture the essence of like, if you want to talk about the three partitioned one, it is kind of a transform that's bundled with three different unary operations that's being applied to three different segments. And my thought that I had just now is is it useful to kind of uh genericize or like I don't know, abstract it a level higher and not necessarily have the first and the last, but just like three different segments.
ConorSo it's like similar to the rotate API that has three iterators, you could give this one uh four iterators, that is the uh begin. End of begin.
BenYeah, begin, start of medial, start of final, and end. Yeah, yeah.
ConorAnd that would suit your need. And then also it would, in the reason that I had this thought now, and I'm not sure why I had it earlier, maybe maybe it was the problem was phrased. I don't know. Sometimes you just your brain has different thoughts, is that multi-transform then becomes a better name because it's not specifically this pattern where it's like the first, last, and then the middle chunk. What there's no real like what are you gonna what are you gonna call that? Tail, middle, head transform? Like that's a terrible name, right? But like that's closely matches the semantics of what you're transforming. Whereas multi-transform, if if you have like variable length segments, it then matches that.
ConorBut then my question to you is because you're the one that actually has the use case, is that um does that make the usefulness of it just like more confusing? Like really all you want is that first, last, and middle one, and you'd never have a use case for the variable length segments ones.
BenWell, there are there are a couple of things to say. I think I think yes, the use case I have is the it I've been calling them initial, medial, and final to try to find a better name because first and last tend to be used by iterators, and begin and end also mean other things.
ConorRight.
BenUm so at the moment I've settled on initial, medial, final as the designators. But yes, the use case I have is first one, last one, and and medial ones. Um and the use case I have right now involves only arrays, so random access. Um so it's fairly simple. If it becomes multi-transform, the question sort of becomes you know, uh the the how do you compute those inner iterators? Right?
BenBecause ideally you want to be able to express, there is definitely an expression there of like, I want to do everything, something for everything but the last, or or this idea of initial, medial, and final, right? Without knowing how long the range is, how how long the range is, without caring whether it's a bide range or a random access range or even a forward range. The caller doesn't want to the caller wants to specify not uh the caller doesn't want to compute the intermediate iterators, is what I'm saying. Because if you can do that, then you can just trivially split it into three ranges and call transform three times.
BenRight? That the idea of this algorithm is that you can say, I've I want to do the last n, the first n this way, the last n another way, and the intermediate ones a third way. But but like I don't want to have to compute the computation of that iterator, which is the start of the last n, and n being one in this in my case, right? I d I don't want to have to do that outside the algorithm.
ConorWait, so I I got a little bit confused there because when you said if you are able to compute the iterators, you can just call three separate transforms. I thought this was effectively an algorithm that you can just call once instead of doing that. So there's some difference here. And and then you said you don't know the end, so that like there's you want to be able to possibly use this when you don't know the length of your array or something like that? Uh well, yeah.
BenI mean, these are situations we can think about. Like if you had an iterator and a sentinel, um and it was only a forward range, right? Right. These are potential use cases in the general case.
ConorAnd in them and then in that situation, my multi-transform with like variable length segments isn't possible because you can't you can't like know and elements from the end. It's only in the case where it's you're at the sentinel now, so you now know. Interesting. Okay, so that's slightly different than what I was thinking about.
BenYeah, multi-transform if if you like if you can easily compute the iterate the start and then iterators for each transform, then we have effectively you just call three transform three times. But this this is for the case where it's the those are not easily computable, right? But you know how many you want to do at the beginning and how many you want to do at the end.
ConorWait, so can you do it? Can you do it when you know how many you want to do at the end where n is greater than one? Is that possible?
BenUh it's possible. I'm I at the moment I'm still exploring this kind of design space and thinking about how we might do it, right? You can go backwards or you can see, you know, how many steps it would take you to reach the end. You know?
ConorRight. Right. I'm thinking I'm thinking of just like single pass, you apply your first op, then your second op, and your third op, which now doesn't work in this like you'd have to determine where the end is and then potentially like do the do the start, do it reverse from the back, and then go do the middle section last. Or that you know, you don't need to do it that way, but that could be a potential potentially.
BenThere in my use case, there is an ordering that the yeah, you have to do initial, then medial, then final. But but so it's not three independent transforms. I see. Yeah. Um but it's something, yeah, it's something like um find last. You know, we have find last now um in C ⁇ , and I believe it was Zach who worked a bunch on that. And you have to basically it involves iterating to the end, because you need to only by iterating to the end can you tell that you've that you found the last thing, right?
BenAnd there's something similar going on here in this but last algorithm, or the initial, media, final, you know, higher level version, which is we need to know even in a forward range, we need to iterate to the end in order to know how far away from the end we are for those last for that last set.
ConorYeah, this is interesting. It there is more to it than meets the eye at first glance, for sure. I uh I totally misunderstood the subtlety of what you were asking for in the initial email. And yeah, I think I think I uh simplified the problem into I just want a nicer way to spell three transforms, um, which is not what you're looking for. Right. If you can just spell those, spell those, um, is what is what you're saying.
BenYeah, and my current use case, I can just spell them because I'm only using random access. Exactly. And it's fine. And and and this algorithm is you know, even that even then, I would like to have the abstraction power of an algorithm, right? So I I might like to say do initial, medial, final, but it's not terribly difficult to write that algorithm with random access iterators. Right. Um at the moment the code is full of raw loops which implement exactly that algorithm, so it's just a case of abstracting that a little bit.
ConorYeah, it's interesting too, because I've been spending a lot more time thinking about iterators because I finished um or we finished, I should say, because we were doing it as uh the virtual meetup, the from mathematics to generic programming, and I think it's chapter ten uh called Fundamental Programming Concepts, where he talks about iterator category tag dispatch. And I had never, you know, I mean, you know that that's a thing if you program well, maybe maybe not everybody knows that's a thing, but uh most folks that have spent any time studying C know that that's a thing.
ConorBut it wasn't really until our conversation with Sean Parent, and I should also say for our new ADSP listener, Zach is uh previous guest, Zach Lane, who's a member of the ISO committee and has worked on algorithms and uh does he work on unit? I think he works on Unicode.
BenBoost Text. I think uh he recently worked a bunch on Unicode with Boost Text. Yeah.
ConorAnd um yes, we had our our a couple podcast recordings with Sean back in October, and we're talking about the different rotate algorithms, the three different rotate algorithms. Link in the description. We're not rehaving that conversation. But I read somewhere that Stepanov, I think it might have been in this article that he had with some online um website after from mathematics to generic programming, or maybe it was EOP, and he said that he had overemphasized the importance of like the uh bidirectional and forward iterators that typically are mapped to like the linked list and doubly linked lists and things like that.
ConorAnd and I've been kind of thinking about like how does this fit into like an array language? Because really, I I think that that array languages, for the most part, we just assume random access.
BenLike, it's in the name, I suppose. Yeah.
ConorYeah, yeah. Um and that makes you know, what is the importance of these this kind of iterator abstraction? And there's also some really interesting comments. I'm not sure if you picked up on this or if you recall from having um gone through all the lectures uh back in the day. But he he has uh like beef basically with Andre Alexandrescu, because I think he gave a talk back in 2009 called Iterators Must Go. And then he said that like, you know, that that was he completely disagreed with that. It's it's this idea of right now you have an algorithm that kind of works for random access, and it's like how important is it that for C, I guess, that we have this ability to abstract over different iterator types and like what do you lose in an array language where you just assume random access for everything, basically?
BenWell, I think it's really important. I I it's not necessarily important, you know, from ultimately from an efficiency point of view, because most of the time we do want to use array, we do want to use vector, we want to use at least on desktop, we want to use the cache efficiently, right? Um most of the processes in the world don't have caches, but but but most of the ones we talk about at conferences do. But uh it is uh it's important to to to go through this exercise beyond random accessories iterators, I think, to gain insight into what the algorithm's true nature is, you know.
BenUh and Stepanov's original idea, I think, was this forward, by die, and random, right? And then he realized that input iterators exist, right? So in other words, there's a class of forward iterators where you can only traverse the sequence once. And so we have basically the three categories plus the input it. Input iterators are a bit strange in some ways, but but you know, it's important to genericise the algorithms, right? If we only stick to random access, then then we are leaving some algorithmic insight on the table because we're not genericizing the algorithms beyond what's in front of us.
BenUm there's also the fact, of course, that we can learn from not just C or array languages, but you know, the original Lisp, right? Lisp has lists and they are essentially forward iteration.
ConorYeah, that makes sense. It leaves some algorithmic insight on the table. Yeah, it's it's a shame that Stepanov is kind of retired and or he's retired a long time ago, but uh I would love to get his thoughts on like the state of the world today, including like Tristan's work, right? Like Tristan's given a number of talks about iteration revisited, and still all of the APIs we have today, um, you know, because they live in C provide APIs that, you know, give you begin and end. And I think there's some story too that Eric Niebler, you know, individual former guest as well on the podcast, um, behind Range V3 and what's in the standard, I think at one point was kind of moving away from iterators, but then he talked to Sean, and Sean basically like convinced him that like you still need uh this.
BenI thought you were gonna say like Sean hit him upside the head and made him realize the error of his ways.
ConorWell, I don't know. Maybe that is the story. We'll have to get Sean back on and uh and maybe we'll get Eric on at the same time and uh we can or I also maybe this story is apocryphal. I I don't know who I I feel like I heard it's from Sean, but um I you know, anyways, it's just because that I I went through I went through FM to GP and now have been thinking about this like a lot more. And also like, you know, how how does this apply to like you know languages like Rust? Rust have traits now, which is you know superficially different in many ways, but superficially at some level the same thing as concepts now.
ConorAnd I I assume actually I haven't looked at the the standard implementations of C20 algorithms uh and and on, but I assume that those don't use iterator uh category tag dispatch anymore. They now use con like that's the whole pitch that Stepanov is making is that you know we don't have a way to uh do this kind of dispatch, but like luckily I can just create like a a version of these functions that the last parameter is a tag, and I can basically dispatch on that. And like behind the scenes, that's what's happening.
ConorBut really, I would like a language feature that that would give me the ability to do that. And concepts.
BenOh, so you mean yeah, so tag dispatch in in this view was a a hack to achieve what concepts can achieve better. Exactly.
ConorAnd he he said as much and then went up went on to say that like it's a good hack because at least the language lets me do it. There are many languages where I have to do this at runtime, um, whereas at least in C this all melts away. Right. Sure, it maybe adds a bit of compile time, but at least in terms from an efficiency like runtime point of view, I'm not losing anything here. But in certain languages, like not only do I not have a language facility, but like I don't have anything that gives me the ability to do like compile time dispatch based on you know the quote unquote iterator type.
BenWell, uh uh yes. First of all, I agree. But but I I wouldn't be I haven't looked at the uh implementations in MSSTL or the or any of the other standard libraries. But I wouldn't be too quick to assume. That they're written in terms of concept, so I I would imagine that they, you know, are still using uh tag dispatch here and there, maybe. Um things did change a bit, I think, from 17 to 20 in terms of the way iterators are specified, certainly.
BenUm, but I at the end of the day, if you have one compile-time way to choose uh versus another, then um I don't know that you'd go rewriting everything in terms of the quote unquote better way if the cogen was identical. You know, it's sort of there's enough work to do besides that.
ConorWell, I mean, uh assumably they're writing that stuff from scratch, right? Everything in the std colon colon ranges namespace. Oh, in std ranges? Um Yeah, well, maybe. Well, when I s I I should clarify, when I say ranges, I mean the the C20 uh range version of the algorithm.
BenThe so-called constrained algorithms. Yes. Yes. Yes. Uh I would yeah, I okay, so I I would expect I would expect that those do use the concepts, yeah. But um but I don't know uh you know how much of how much synergy there is between those algorithms and the existing iterator algorithms. There might be some underlying uh common things that both use. Yeah.
ConorYeah, I'll have to go look. Stay tuned, listener. Uh if if I remember to, which I probably will when I'm editing this, I will go and take a look at the uh C. Or you know what? I'm sure there's at least one library implementer either working on GCC, MSVC, or I mean, uh there's also folks at NVIDIA, and I I know David who works on the MVC ⁇ uh compiler. Uh I know he um listen, or at least at one point was listening to this podcast. Uh he probably has the answer as well. So feel free uh to on social medias or privately um DM me with the answer.
ConorAnd if not, if I don't get a DM or a public tweet or post, I will go look myself. Um anyways, we should get back to the the multi-transform. So what is your is your current solution that you you just have uh random access and you're working with arrays, so you have a solution for your specific kind of narrow.
BenI yeah, I coded something up. Well, I've been thinking about this a while, and it's not been a high priority in my day job, so I haven't really done much about it, but I did uh I coded something up last night. And so the interesting the another interesting thing to throw in the mix here is that I already have a variadic version of for each and for each n. Right? So what that means is that basically it's like a a zipping together multiple ranges with a foreach. Um and so the for for each the the signature looks like taking an iterator pair and then an enery function, and then the remainder uh the remaining begin iterators.
ConorReally?
BenI was gonna assume that. So for each in the standard takes iterator pair and function, right? Unary function. The interesting part is what it returns. It returns the function that you give it, or the function object, right? Because you could pass it a mutable lambda, which ha or something similar that has state, and so it returns the the lambda you give it, or the the function object that you've given it.
ConorOkay, I actually I've got a really stupid question that I actually it's okay that I have forgotten how for each works, because I hate for each. Um and uh I mean I think Bryce and I had that whole argument of transform versus foreach and the naming at one point where for 30 or 40 minutes we just refuse to agree on the naming of something. Uh just because you said that your fore each implementation takes an N ARI object. Um does for each take like the the one in the standard take a unary ob uh function?
BenA unary, yeah, yeah.
ConorDoes it? So what's the difference between for each? I thought so in my head when you were saying that, it just takes the iterators and then you apply some operation in the body. Oh no, it has to, because it's an algorithm.
BenYeah, the idea of for each is that you're just doing something for side effects, right? So you're doing IO or something. That's the kind of primary use case. You're not really transforming. I mean, you could view it as a transform, except that the output iterator would be something that does IO that you write to, right? It doesn't write back to the iterator.
ConorYeah.
BenRight. So there's no output iterator.
ConorOkay. Okay, we're back on the same page. And so you're saying that your API is that you put the the the begin and end pair of your first range, then the n area object, then the n minus one begin iterators in a in a pack.
BenFor the underscore n version, where does the integer go? Um For the for the n version, the the size goes in place of the the last iterator, right? The the end iterator. Right.
ConorRight. And this is an unfortunate API, in my opinion, unfortunate because with variatics, you have to always put the variadic stuff at the end. So a lot of the times, yeah.
BenIt's kind of constrained by what I can do. Yeah.
ConorOkay, so that's the API.
BenBut it nevertheless it's useful. It's also unfortunate because we don't get to provide the the end iterators for every range. So it's assumed that all the ranges at least cover that first range, or at least as long as that. Because if they're not, you're in undefined behavior territory. You're running off the end of a range.
ConorYeah, yeah, that makes sense. Okay, and so uh I've I've totally lost track. When you started talking about this and then I got confused by foreach, uh were you saying that you use one of these two.
BenOkay, so I already have variadic for each and variatic for each n. Mm-hmm. Okay. Now the interesting part about those is what they return. Um for each in the standard, like I said, returns the function object you give it, because you might give it something stateful, which evolves over the course of the foreach. And so it returns that. It does not, however, uh oh, and and the standard for each, you just give it the iterator pair, right? But whenever you're talking about the n versions, like for each n or transform n or whatever it might be, where they take uh iterator and size, then you're entering the realm of, well, if it's an forward iterator or even an input iterator, then you want to return, or even perhaps a bidirectional iterator, right?
BenIf it's not a random access iterator, you probably want to return the iterator as it is after you've stepped it, stepped it by n, right? Because that would take work for the caller to recover, and in some cases would be impossible for the recaller to recover in the input iterator case. So you enter the world of returning a tuple of things. You're returning multiple things. You're returning for the variadic case, you're returning n input iterators and the function object which itself has potentially evolved.
ConorOkay, that makes sense.
BenRight. The law of useful return sort of dictates this. Um these things cannot be recovered by the caller unless you return them.
ConorRight.
BenUm so you know, carrying that forward, I'm thinking about the for each but last algorithm, right, as the building block algorithm for the initial, medial, final. And I'm thinking about it in terms of variadic, right? Because we can do for each but last over n ranges with an n ary function object. And we would stop at the last well, we'd stop at the la at the last element of the first range, and the range the variadic ranges would be assumed to at least go up to that point.
ConorRight. So you technically wouldn't you don't need to have uh all your range having equal lengths, technically. They just need to be at at minimum. Yeah, they need to cover the space. Right.
BenRight. And then the return values have the same kind of constraints. Um if we're looking at this as an algorithm that work that can work on forward iterators or even input iterators, um, you need to return uh the iterators in in the in the state they've evolved to. Right. In a tuple, once again. Yeah. And likewise, the function object, maybe. And all of this is not really considering so unlike your normal conversations with Bryce, we are not considering any parallelism here.
BenUm we're thinking about this as a as an algorithm which has to proceed linearly, right? Which indeed for each in the standard is. It has a parallel version, but the parallel version I think returns void, right? There's a difference there.
ConorYeah. I honestly had no idea that for each returned anything. Because well, I like I said, I've I don't I cannot remember the last time, if ever. Uh I mean, I don't check C code into production, but back when I did, I don't know if I ever used a foreach, because I was like philosophically uh opposed to it.
BenUh and and that's a fine argument, right? Uh again, I for each is like the lowest common denominator. It's kind of like you can do everything with for each, just like you can do everything with the raw loop. Right. Um but uh and most of the time, a lot of the time, if you're transforming data, of course, you want to use transform or accumulate or reduce or whatever. Um right. It's usually there's usually some better way of expressing what you want to do. But sometimes you do really want to do for each, and it is the best way to express that you just want to print all these things out or whatever it might be.
BenSome typically some kind of I.O. And in my world of embedded, 90% of everything is I.O.
Conorso yeah. I guess back when I was checking C into production, I was working on like the core calculation actuarial stuff. Right. And like the UI all the time was basically like a spreadsheet that the system engineers they were doing all the scaffolding there. So really I was only I had to put stuff in some multidimensional array of results, and then it showed up on the screen, and I didn't need to worry about that. So I didn't really have like a use case where I I needed to do some side effectful uh thing.
ConorAnd if I was actually doing that in a calculation, odds are that I'm not thinking about it hard enough, right? Because it's one of my favorite quotes is that like imperative shell, functional core, and I was always working in the functional core part. So odds are uh you know, I shouldn't need to reach for a four each in those situations. But in your case, where you know you are the person doing that system scaffolding to to write to somewhere, um, you know, that that is that is the imperative shell part where you're gonna end up reaching for that all the time. Right. Interesting.
ConorWell, I mean, we've you've now got a captive audience, so uh I mean it used to just be Brindle, uh Tristan Brendel, it used to be uh Tristan and I. But if folks out uh on the interwebs uh have thoughts and comments, um feel free to reach out to Ben and uh maybe we'll come up with a a better a better name for each butt last.
BenComment on the uh show notes on GitHub.
ConorYeah, what is uh butt last?
BenSo there's a knit, there's butt last. What does knit? What's the mnemonic behind knit? So N I T or K-N-IT?
ConorI-N-I-T. Oh, in it, sorry. Yeah, in it. So I think it's short for like initial, uh, but that's just an educated guest. Yeah, yeah, yeah. That makes sense. I wonder, I know that um Pharaoh, although I probably I'm not sure also because you don't spend much time on the socials anymore. Or maybe this can be um part two now. We're now on episode two thirty. Be sure to check these show notes either in your podcast app or at adsphepodcast.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.
ConorThanks for listening. We hope you enjoyed and have a great day. I am the anti Bryce. Um
In this episode, Conor and Bryce chat with Zach Laine about C++26 Reflection vs CRTP, AI, kids & more. Link to Episode 313 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP:...
In this episode, Conor and Bryce chat with Zach Laine about the C++26 contracts fiasco. Link to Episode 312 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP: The Podcast:...
In this episode, Conor and Bryce talk with Zach Laine about his career and the career changes he has made. Link to Episode 311 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials...
In this episode, Conor and Bryce talk about Bryce's next chapter and where he is leaving NVIDIA for. Link to Episode 310 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP: The...
In this episode, Conor and Ben chat with Jason Turner about default construction in C++. Link to Episode 309 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP: The Podcast:...