Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

ADSP: Algorithms + Data Structures = Programs

ADSP: Algorithms + Data Structures = Programs artwork

Episode 217: Pragmatic vs Inspiring Talks, A Bug and More

Jan 17, 202521 minAudio

In this episode, Conor and Ben chat about different styles of talks, diagnose a bug and more! Link to Episode 217 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: 2024-12-16 Date Released: 2025-01-17 13: Foreign Function in J Pointfree.io C++Now 2017: Ben Deane & Jason Turner "constexpr ALL the things!" Ben Deane's blog post "Six languages worth knowing" 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.

BenWhen I when I stand up and give a talk, I don't want people to see that talk and think, you know, wow, that was cool, but I could not approach that. Uh what I want people to take away is like, that was cool, I'm gonna go try that in my code base.

ConorMy name is Connor, and today with my co-host Ben, we chat about different styles of talks, we diagnose a bug, and more.

BenA question that occurred to me earlier is there a way uh you mentioned that a lot of things a lot of times in your videos you show building up a function and then converting it to tacit form. I assume there's an automatic way to convert it to tacit form that's because that exists in other functional languages, I'm pretty sure.

ConorYes, I don't know if it exists for BQN. I definitely know that there not only does it exist for J, but there is an actually built-in what they call a foreign function in J that goes from explicit to tacit. I know Haskell has point-free.io that goes from explicit to tacit as well. I would imagine there's a BQN one out there. I don't actually know because by the time I started learning BQN, I was already enough of like a tacit uh expert to like I don't need ever to go to those tools.

ConorIn fact, like that's one of my biggest worries. And is that, you know, I've the evolution of whatever my algorithmic combinatory path is that like I love the combinator stuff so much, is that like I've come I've become that teacher that has lost all sense of like how complicated a thing is because they they swim in the topic, and it's been so long since they s they struggled with forks and the basic stuff that like uh I'm harming, I'm harming the reputation of array languages by showing this cool trickery stuff that is not practical.

ConorAnd I like I I've heard folks that say, you know, we we actually need to focus more on the practical array languages, like use of array languages, not the highfalutin um combinatory stuff.

BenWell, you can still show the shining beacon on the hill, right? You can still show that you know, and this this this hits me with um you know something I think about when I give talks, is that when I when I stand up and give a talk, I don't want people to see that talk and think, you know, wow, that was cool, but I could not approach that. Yeah. Uh what I want people to take away is like that was cool, I'm gonna go try that in my code base.

ConorYes. You want you want there to be takeaways for folks. And uh which is why I some of your talks are just you know, they're in my all-top.

BenI mean, I always mention the uh I I have sometimes like I don't always hit that mark. Sometimes I give talks and they are kind of out there. Sometimes and sometimes that's a good thing. It depends on the crowd, right? Like when Jason and I did did Concept for All the Things at C now, that was a great example of a talk which was like here's exploring what's possible. Like no one in their right mind would would write what we did that way or use it really use it in production.

BenBut for that crowd, it was like lighting a fire under the standardizing context, bruh.

ConorYeah. And I well, I was I was gonna say before, like I always mention the easy to use, hard to misuse. But then right when you said, Oh, some of my talks are out there, it's I is is it funny that I mentioned that talk all that time? It's the talk that hit the hardest for me where I was on my learning path, which is why I I think it's it's okay to give talks at different levels because depending on where everyone is on their learning journey journey, like they're gonna watch that talk and be like, oh, this isn't really anything new under the sun. And it's like, well, okay, it's because you learned that stuff already.

ConorBut like for where I was, it was like m mind exploding. Yeah, I I probably at some point, not anytime soon, we'll have to rein it in on uh on the talks that I give these days.

BenEven the folks that know the material, sometimes um what people say a lot to me these days is like thanks for getting up there and saying that, because I've been arguing this to my boss to my colleagues, whatever, and now I can point at something.

ConorYeah. Yeah, now I'm in research, so I don't really have to ha I write my own code and not many folks look at it. They look at what it does. So I haven't had to have many of those arguments, but definitely I've been on Teams before where I'll I'll reference, oh, Kotlin something or Haskell something, and they'll be like, what are you talking about? And I'm like, uh I'm saying I'm not making this stuff up. Like other languages, this is like a pattern. And then it's like Ben gives a talk and it's like, okay, now Ben, now there's someone in the C world other than me that that's saying the same stuff.

BenRight, right. And it's funny because people in the, you know, people in the functional world who who the stuff some of the stuff I presented in C, they've been doing it for years. And they look at the talk and they're like, Oh yeah. That's nothing special. Oh, finally C is getting this big whoop, you know.

ConorYeah, there's some memes online of whatever Lambda comes to insert language and then everyone's going, rah, and it's like, you know, half a century ago. Lisp uh, you know, already had it. But hey, it's better late than never, folks.

BenUm better late than never. Talking of, let's wrap up. I mentioned to you earlier that you had a bug in the solutions to advent of code. Talking about going full circle. I believe day seven. Now, when you solved day seven, actually you showed building up part one, but then the code you showed for uh you you you had a reworking for part two, and then you solved both part one and part two with the reworking. Mm-hmm. Which happened to be correct.

BenBut I think in your what in your part one work you had a bug, and the bug was in the evaluation. So day seven was the thing that um put the plus and the multiply combinations in between the expression, right? I was watching that video, and there was a point where you went from showing the lists, showing the strings to evaluate, and then and then you changed to showing the evaluation. There's a point in the video where it flips over. And that had me scratching my head because I'm like, that string does not evaluate to that number.

BenI think, and I think there was a bug, therefore. Like I think BQN is doing, does it do right to left evaluation? Oh, yes. I think that and I think that's the bug. Because you have to do left-to-right evaluation in that problem without operator precedence. It's very strict, and that is not the same. Uh, you get different answers doing right to left.

ConorInteresting. Uh well, let's here. I'll quickly just so that we can both get the reveal. Uh share my screen for a couple more seconds. So I can just do this. Right. So that I have both solutions still in my code. Value is the one that builds up a string, and value two is the one that has a list of actual operations. And value two, if I'm looking at this, what is it doing with okay, this is a block.

ConorSo uh we need to get rid of our list of operations that value two takes as a left argument. And so now we're just calling value on our list of numbers. And I'm curious to see um what happens if we go to BQN code AOC and let me hide this so I can see what I'm typing. And we go BQN test. Oh, except it's taking time because I've got part B uncommented. This shouldn't take this long to run.

ConorOr maybe it actually does take. So actually, let's get rid of this.

BenOkay.

ConorSo this supposedly well, at least for the mini input.

BenIt might pass by accident. Because because for the mini input, the ones that work might just be simple additions or something else. Um there's only two that work in in the sample, first and last, and I'm not sure there might be ways to evaluate those, which are most of the so the first one is trivial, like like it's ten times nineteen is one ninety. There's only two terms.

ConorSo days I actually do recall it saying that it's um it comments on the evaluation left to right.

BenAnd and not according to precedents.

ConorSo the question is, did I I think this is where the bug is not. So I have with the single glyph reversed my numbers and made the tail uh backwards.

BenThere was still a part in your video where you go from the video shows. This is gonna be annoying for the video.

ConorHere I I can I can bring it up and scroll it online. Um We're doing a deep dive.

BenSo I mean There's a point in your video where you show here's the um here's the strings to be evaluated. And the next beat is you showing the evaluations of them. Uh I think it's maybe another minute or so.

ConorOh yeah, so I am live coding it. And technically I think you're correct then. So in my video, there might be a bug because I'm actually skipping the parsing code and I've just copied and pasted a single example. And then definitely what you so that is you were paying super close attention. Uh I'm surprised well, I'm not surprised no one else caught that because that's a comment there. That's such a narrow thing to catch. But yes, on the the video version, I'm just doing it in BQMpad, which is just a web editor.

ConorAnd I I just assign to a single local variable called line uh input and skip all the parsing. And therefore, the solution that I've coded up misses the fact that you've actually need to reverse the tail portion of your line. And Ben clearly was uh paying attention to that and noticed that.

BenYeah, so just after this, but yeah, you form the matrices and then you uh rotate, uh transpose, unravel them, and then yeah, so here we've got the expressions list. Now if we look at, for example, the third one, six plus eight times six plus fifteen, evaluated strictly left to right, it's gonna be six plus eight, fourteen, times six, uh eighty-four plus fifteen ninety-nine, is that right? Or eighty-four. Six fourteen's are eighty-four, right? Yeah, seven twelve.

BenUm, plus fifteen ninety-nine. So the third number should be ninety-nine when evaluated. But in fact, it comes out to 174. And 174 is 15 plus 621 times eight, 168, plus 6, 174.

ConorYeah, and what's funny, even while you were working through that math, I was evaluating it, right? And I was like, what is he doing six plus eight for? And I lost you for a sec, because I was like, it's 21. And I was like, oh right, the point being is that uh I'm evaluating a BQN expression, not a math expression. Um well, it's not even math, it's left to right. It's technically small talk because if we're using PedMass, we do the eight times six first.

BenYeah, yeah. But it's left to right versus right to left, yeah.

ConorSo you are correct. There is a bug not in my bug in the video.

BenYeah. You got the right answer because you you must have got the right answer to part one, or you wouldn't have been doing part two. Yeah.

ConorExactly, yeah. And if it skips to VS Code like 30 seconds later, where the parsing happens and silently there is a a both a rotate and a reverse glyph, because they are the same thing, but in this case it's the it's the reverse glyph. Have you and so how many so you said you've solved a a couple problems?

BenI've solved like 1, 2, 3, 7, and 11. That's all I've done this year.

ConorOkay.

BenI'm kind of resting on my Laurels. The first I've I've solved one complete year back when it was and I'm even on the leaderboard at like 98, I think, finally. In 2015, when almost no one was doing it and it was brand new, I was I did the whole I did all the puzzles that year. Because I happened to have free time. Although at about day 15, so in the early my leaderboard stacking, not that I really go in for competitive coding or fast coding, but um I was using the technique of, you know, do the puzzle by whichever is the best way to do it.

BenI think one of them was literally just it was like find the matching paren, and it was like, okay, well, I'll just open up this file, do forward S expression, do and find where the point is. That's the answer. So it was like do that in your editor. Um But yeah, I think after on on one of the teen days, 14, 15, 16, I I went from California to England, and so suddenly I was going from puzzles at nine o'clock in the evening to puzzles at five a.m.

BenUm, which was the reason why my my my leaderboard really tailed off after that.

ConorYeah, that's a bit rough. I yeah, I'm jealous of the folks on the Pacific Coast. It's uh a much nicer time. Maybe not in the first couple days. I think I'd solved them in less than ten minutes. And actually the servers were down. Um on the open on the opening night, uh I couldn't get access to the problem for I think three minutes. Um and I it it was uh I can't remember what the error that I got was, but the last couple nights have been totally fine. But yeah, I think I solved it at the 10 minute mark, but it had been like three or four minutes before I I got to the problem.

ConorUh but yeah, at 9 p.m., once the problems take like an hour-ish to do, doing that until 1 a.m. in the morning.

BenYeah, if you're doing that in the small hours, that's tough. At some point, probably you're like, you know, I just need to go to bed because it's not working out. If I like continuing is not actually getting me any closer to solving it.

ConorYeah. And it's interesting, I've never actually done a full year. I'm not sure if I'll do all 25, but I'm at 28 stars, 14 days so far. And I'm almost all of these are just like grid-based path searching. There hasn't been a ton of like algorithmic um, which to be honest, I'm not complaining because BQN, it's brilliant. Like, as soon as you have X, Y coordinates, you can do like point addition by just you add, you know, oh, I need to do a hundred moves. And it's like, well, I I can just literally generate an IOTA sequence and then add my points to that.

ConorAnd so it works fine, but uh I thought I thought in years past it it gets more tricky, but maybe it's now that I just have parsing functions, and as soon as you can parse things.

BenYeah. But once you have the function to parse the input.

ConorYeah. It gets rid of honestly like 40% of the work sometimes.

BenYeah, I think last year one of my colleagues, I think it was Michael, who said like he was doing it, and then around about day 10, he got sidetracked by building like a parser combinator library to to deal with AOC.

ConorCompletely reasonable. Anyways, uh, we will leave links for everything we mentioned uh in the show notes. I would encourage folks, even if even if you only solve a single day, it doesn't need to be BQN, choose a language that's on Ben's list. He had a tweet about it and a blog post about it in a different paradigm.

BenYou know, that tweet is now deleted.

ConorOh yeah I mean, we said last comment or last topic or last thing a couple different times. You mentioned Blue Sky. Are you on Blue Sky now?

BenIn as much as I'm on any social network, I am on Blue Sky. I have zero posts, but I exist.

ConorI see. Uh because now this is like three months after I joined Mastodon. It's like and this is why I held off for so long. It's because there's continues to be this proliferation. And uh I just I don't need more. I just I just need one. I don't want I don't want three. And uh, but you're on Blue Sky. And are you are you off of Twitter now? Because you said it might be deleted, or is it everything's gone?

BenUh my Twitter account exists, so no one can impersonate me, but there's nothing there. And to be fair, there I had not I hadn't tweeted anything since 2020. You know, the pandemic was a good time to quit social media.

ConorYeah. I'm try I'm trying to think. Well, so your some of your tweets live on in my talks because I've uh screenshotted them, but but the ones that I've retweeted, that means they're gone now.

BenBut your favorite one, the one about I mean, it still it still exists in in Idealand, right? Yeah, well you still have the blog. Yeah, I started the blog post. Although the blog, you know, I I blog I I blog recently actually. I blog about once or twice a year these days. Yeah, and the idea is learn languages that will increase the the paradigms, increase your toolkit. So you know C and Java and Rust and Python, they're all at some level the same language.

BenUm as distinct from APL, BQN, that's an entirely different family, you know. Uh Haskell, Lisp, different family, small talk, Prolog.

ConorProlog, yeah. There's uh a bunch of different ones, and you'll know, you'll know when you stumble into a new one.

BenYeah, because everything will be really difficult and you'll be wondering how to do things, and how on earth are these people getting things done in this language, it's not all like how I expect.

ConorBut also it can be freeing, you know? Whenever I'm in a language where I feel like I'm an expert in, I'm always, oh, you know, I can never just do something, you know, the wrong way just to get things done because then people are watching. But then you come to a new paradigm and it's like, well, I don't know what I'm doing. People can't judge me. You know, I I right at the top of my t-shirt says, I don't know what I'm doing here. So uh every anything goes. And uh yeah.

BenAbsolutely. And with Avma Code, like we said, any route to a solution counts. There's no there's no cheating, there's no gatekeeping here. If you can solve it in whatever language, great. If you can't solve it, look up a solution and learn from it.

ConorYeah.

BenStill works.

ConorThey only ask for the answer, not for the code. Alrighty. Well, I guess we'll say happy holidays to both you and the listeners. I can well at this point, I'm not sure what what uh at what point this the the happy holidays portion will actually come out. Um so maybe I'll have to cut this to cut this into a sooner episode.

BenWe've recorded at least three, if not four, episodes here, and uh we'll be saying happy holidays in second week of January.

ConorThis was supposed to this was supposed to be an hour, and it's gone almost twice as long as that because I budgeted more than an hour, I have to say.

BenBecause, you know, we get together we only talk to each other once a month or so, and we always have interesting things to talk about.

ConorYeah. Yeah, especially if you're gonna ask questions that are algorithmic plus APL plus BQN central, then yeah, I'm gonna I'm gonna loop we're gonna lose track of time. You add Haskell in there, C. Anyways, we I might try to insert this little happy holidays.

BenYeah, happy holidays.

ConorAnd uh if not, then it maybe it's happy new year to the to the listener as well. 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 Bryce. Um

Open the transcript file

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. Episode 313: C++26 Reflection vs CRTP, AI, Kids & More with Zach Laine

    Nov 20, 202647 minAudio

    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:...

    • Apple Podcasts

    Credit the people on this episode

  2. Episode 312: The C++26 Contracts Fiasco

    Nov 13, 202652 minAudio

    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:...

    • Apple Podcasts

    Credit the people on this episode

  3. Episode 311: Career Changes, GPUs & More with Zach Laine

    Nov 6, 202628 minAudio

    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...

    • Apple Podcasts

    Credit the people on this episode

  4. Episode 310: Leaving NVIDIA for... ?

    Oct 30, 202624 minAudio

    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...

    • Apple Podcasts

    Credit the people on this episode

  5. Episode 309: Default Construction & CppCon 2026 with Jason Turner

    Oct 23, 202629 minAudio

    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:...

    • Apple Podcasts

    Credit the people on this episode