And we hit shift enter, boom. Uh and the reason why it's showing four as the answer is because it's doing the last unit test. So if we do that again, we get boom. Uh that doesn't look right. Welcome to ADSP the podcast episode 60, recorded on January 8th, 2022. My name is Connor, and today with my co-host Bryce, we talk about BQNs after and construct a Twitter poll to settle the debate. Are parentheses necessary?
BryceWhat where are you? Is that a Zoom background?
ConorNo, we're in Google Meet.
BryceOr is it a g is it it you're not actually you're not actually in this like cafe that appears behind you, right?
ConorNope, I can't believe you can't even tell, man.
BryceI I could tell. Hey, there's snow here. There's snow. I want to have a snowball fight. Um and I figure there must be some way. Like, in in New York City, there must be some organization for like adults that want to have snowball fights. Um but uh I mean obviously probably not practical with COVID. Oh, maybe it is practical with COVID because like it's an outdoor activity. Anyways, if there's anybody in New York City who wants to have a snowball fight with me, please let me know. I'd love to have a snowball fight. No, like, no ice in the snow though. Like that's none of that nonsense.
ConorYou're a full-grown adult asking to have a snowball fight with your adult friends.
BryceThat is correct. I uh not even with my adult, like, not even with like specific friends. I'm just like, I'm a grown adult announcing on my podcast to the internet that I'd like to have a snowball fight.
ConorThis actually reminds me of a story. So this episode is going to be our 2021 retro talking about the highlights and a couple other things. Before we get to that, though, I will tell a story of when I lived in China in 2012, uh, which we talked about all the time.
BryceDo you know how many years ago? 2012 was?
ConorYeah, we're old men now. Um But during Christmas time, um, or maybe it was January of 2013, it snowed in Hangzhou, the city I was living in, and the locals went like crazy. They were I was at this uh lake called West Lake Shihu, and I guess it doesn't snow there very often, and it snowed like a few inches so that you could have a snowball fight, and there ended up being I just I was young at the time, and so I ended up sort of like very playfully throwing a couple snowballs at like these kids that were playing in this little grassy area that you know had a bunch of snow. And then five minutes later, I it was like this 2030 person, you know, snowball fight. Half of them were kids, and like half of them were like uh grown adults. Some some of them were bringing their umbrellas. Um why you have an umbrella while it's snowing is not entirely clear, but many folks had umbrellas, and it was uh it was uh it was one of the most wonderful memories of my life. I was there with a friend Antonio who still lives in China, and um yeah, the snowball fight of Christmas 2012, it was just like the coolest, craziest, and yeah. Anyways, snowball fights are fun.
BryceThat sounds lovely. That sounds lovely. So, so so what's with the what's with the Google Meet background? Are you just like embarrassed by your you know, closet that I've been teasing you about for Nope, nope, I'm not even I'm technically not even in the closet today because I need to screen share.
ConorAnd uh I just discovered this the other day. I was having a meeting and the person I was with had a little background. I was like, I didn't know Google Meets did that, and it's the best. So I got this little You even thought I was in a cafe.
BryceConnor, if you have the background, I can't I can't judge your interior decorating.
ConorAlright, fair enough.
BryceYou like you like the flowers in in the background of mine? Yeah, I took out the vase, I put some flowers in. Yeah. It's feeling feeling floral today. No, no, no, no, no, no, no, no, no. It's okay. You can have your Google Meet background. I don't want to ruin your fun. I'll still find ways to make fun of your interior decorating.
ConorLiterally, I turn it off and it's just white walls in the background. White walls and a white chair.
BryceWhite walls, white chair, yeah.
ConorAlright, before we get well, we're actually how's it going, man? We haven't chatted in uh a few weeks. Happy New Year!
BryceHappy New Year, yeah. How's your new year going?
ConorSo far, so good. January 8th. We're a week in, 100k down, and uh it's going pretty good so far. How's your new year going?
BryceThat's pretty good. Pretty good. Yeah. Alright, so let's uh let's do this retrospective.
ConorWait, wait, wait. So I've got a list of things. I actually have notes. It's like the first time because we haven't spoken in so long that there's all these little things that I wanted to bring up. The first thing, most importantly, and this is sort of if we've got any new listeners today, you're gonna be prepared to be confused because we're gonna be referencing an old episode and not giving a ton of context. Let me do a screen share, a window, and we shall choose this one. Do you remember the uh BQN solution? And I promise listeners, we did get a couple complaints on the Twitter about how you know all the episodes have been awesome. They love the content, but like maybe don't live code, especially in a language that is just Unicode symbols.
BryceI think in the future we're gonna save the live coding for like YouTube episodes, which which are coming, listener. They are coming sometime.
ConorAfter the Balkan tour 2023. Um so we we did we've we've heard you loud and clear. It was, I think, one individual.
BryceI I don't remember the name, but someone just I I think that one individual probably spoke for many others.
ConorYes. Um and I think even we even self-reflected in the part two of that live coding being like this is probably not- Nobody's gonna be able to follow this. Yeah, this is probably not the best function.
BryceBecause at the end of the day, the key thing here is for us to have fun, and if other people happen to have fun, that's that's fine too.
ConorIs that uh is is that the most important thing? I'm not sure. But yes, uh having fun is important. Anyways, I will link to the part one and part two of our live coding where we had a very simple problem that was called target indices. You're given a list of numbers, such as one, two, five, two, three, and then you're also given a target value, uh, which in the first example is two, and the problem asks you basically to return a list of indices that correspond to where the target value would show up in the sorted list. Um so one, two, five, two, three, sorted would be one, two, two, three, five, and because we're doing zero indexing, the target value two shows up in index one and index two. We're not gonna rehash the whole problem solving. Uh, we did it once in C. We did it once in B once in BQN. And the only thing I want to highlight is in our final solution, we had this beautiful combinator overloaded uh galore, and even Bryce said the sad thing is that he could actually understand this where you had sort of two binary transforms, and then you were doing a reduction on both of them. And then uh once you had basically the count of your target values and the number of values that was less than that, you could create your list of indices. And at one point we had this five-character expression, left plus range composed with right. And then what that was basically doing is it was applying iota to the number of values, target values that show up. So in our case, with two, you're gonna go basically range two or iota two to get one, two, and then you're adding the number of values that are less than it. And I made some, so you don't really need to fully understand what I said, but we have this five-character expression thing, and if you go back to the episode and listen to it, I said, you know, in J, I think actually there's a thing called the dyadic hook, and this is exactly what it's doing. Well, guess what? On episode 17 of Arraycast, my other podcast, I brought this problem up, or not exactly this problem, but it came, it came to in the middle of the podcast that I discovered you can actually do this in BQN. It is a glyph called uh if I get this right before. Or actually, it's it's called after. And if we zoom out a tiny bit and we hit shift enter, boom. Uh and the reason why it's showing four as the answer is because it's doing the last unit test. So if we do that again, we get boom. Uh that doesn't look right. Is it after? Is it before? Oh, right, right, wait, wait, wait. Right.
BryceIs it right?
ConorWhat's going on here?
BryceWatching Connor fail in in real time is something else.
ConorNope. Nope. Alright.
BryceYou are gonna have to liberally edit this.
ConorWe're going to We're going to go to the place where I have the pre-coded solution. We're coming back to BQN. What am I doing wrong here? Oh, right, right, right, right. Yes, yes. Because the way it is is that we're doing. So that's actually what I had before. Why isn't this working? Why isn't this working? It is after. It is after. Oh, god damn. There's one more there's one more test that I didn't come. I am gonna have to make some editorial decisions here.
BryceYou are gonna have to liberally edit this section.
ConorI might just leave it all in. Who knows? Um, because it's somewhat funny. But I had it right before, so it's the after glyph. And literally what this does.
BryceBut I want to note, I want to note, I think we we got feedback on the internet that the internet agrees with me that the pre that having the parentheses is better than not having the parentheses. That that that they help clarify what's going on instead of relying implicitly on order of evaluation rules that only like Connor and the two other BQN programmers in the world know.
ConorSo actually, I said I would take that poll, and you're saying that the Twitter agreed.
BryceI never actually I never actually uh I'm not saying I have quantitative data, but I do have qualitative data based on we got some some tweets when we posted these. We got some tweets.
ConorWe got some tweets that said where's the poll? Um it they didn't actually say lean left or right.
BryceBut here's what I'm gonna fine, fine. Then let's then let's make the poll. Let's make the poll right now.
ConorYou want to make okay, we'll make the poll. We'll make the poll right now. So wait. We'll use this final solution and it's you know what's also valid? Huh? We get rid of these parentheses right here. And the problem is, actually, no. The problem is is I kind of agree that the parentheses help here. Um, you do not get to get out of this.
BryceWell, no, no, no. Let's let's pick another one where let's know.
ConorLet's do the one, let's do the one where it was. Let's just go find the problem because it was in. We can just go to we can just go to our show notes.
BryceSo amazing.
ConorWhen were we talking?
BryceOh my god, you actually put links to my talk in the show notes.
ConorOh yeah, and I also went and found your slide deck because that oh yeah, so this was on the slide deck from my first conference talk ever. This is uh actually, so this is episode 55, the part one of our live coding. And you actually said that your first talk was supercomputing, and then I asked, was at supercomputing, and then I asked, oh, is it couldn't have been it couldn't have been supercomputing.
BryceMy first talk. I I I think if I said that I misspoke. My first talk was that way, my first talk was not supercomputing. I said it wasn't BoostCon, it was a Linux Foundation collaboration summit a week before BoostCon. Like a week, okay.
ConorI remember while editing, I realized that I was saying that, oh, I'll get your I'll find the link to your first talk, but there was no recording of it. But I did go and find the first recorded talk that Bryce ever gave, which was at BoostCon 2011. Um, so even before the snowball fight of Hangzhou 2012. Um and uh it's really poor slide deck quality, like the recording is here. Let's just take a let's take a brief um Oh no, please! Oh please, you can barely make out and is this the highest? Yeah, but it's the highest is 480p, which we're on.
BryceYeah, that's that's how we recorded it back then.
ConorAnd uh cute little Bryce. Um 10 years ago, Bryce.
BryceI think the slides were actually like not terrible slides, though. So yeah, like it's I did I did stay up until like 4A. Like I was up at 4 a.m. the the night before, like preparing the talk and rehearsing the talk. I got like no sleep.
ConorYeah, but so I actually I haven't fully watched it, but what I I did want is I wanted the user to actually enjoy the full talk experience. So I went and dug up the actual slide deck PDF, and so I linked both. I linked both the talk and then the slides, uh, which I think is yeah, PDF.
BryceHow many slides? Let's let's look, how many slides were that in that deck? Because I know I know I guess over under. I only used like half of my time. Um, and I think maybe I had between 20 and 30 slides.
ConorReally? Oh, I I like my first boost or C now talk had like 180.
BryceYes, but Connor, you gave your first talk at like a different point in your career. I was like a little 19-year-old shit. Oh wow, there's more okay, there's like 57.
Conor51. 52 Bryce Lelback GitHub.com slash Bryce Lellback slash Prana. Let's take a look.
BryceNo, no, no, we're not looking at like stuff that I stuff that I started building like many, many, many, many moons ago. Nope, nope.
Conor23 stars, pretty good, ma'am. Alright, um Oh, actually Yeah, yeah, yeah.
BryceWe we had we had a thing, we were creating a Twitter poll.
ConorYeah, yeah. So well, what happened is we went to the show notes to find the original um BQN, and the original is actually the first solution as I switched back to this uh BQN tab. It's the first solution, and I believe, so let's let's delete these. So the point is is uh BQN is awesome, and uh there is a Unicode symbol called after that is the dyadic hook, and also before is also like a flipped dyadic hook. So I'll leave a link. Go listen to that arraycast if you care. Now we're gonna create this Twitter poll. Clearly, this is gonna, as this never happens before, this is gonna be two episodes. You'll hear uh you'll hear the 2021 retro in episode uh what are we on now? 50. This is 60, so you'll hear the 2021 retro in episode 61. Um currently we're building this. So the three train, I believe, is here. And then the B1 combinator is here. So this is gonna give one to, and so there's which what what parenthesized version would you like? My version will be the five Unicode symbols. You want this version?
BryceYeah. Okay. So this is Let's take it to the Twitter.
ConorThis is Bryce's. Uh what do we want to call it? We'll just we'll call it Bryce's. And then uh I'll delete all the parentheses. And we'll call this Connors.
BryceAnd first we're gonna- Who do you think's gonna who do you think's gonna win?
ConorI honestly, I think that it's I mean the question the question is, uh, what are people gonna vote based on? Are they gonna vote based on the comment with a name next to it? Is it who's your favorite host? Or is it actually gonna be based on the content?
BryceWait, wait, wait, wait, if it's who's your favorite host, who's gonna win?
ConorOh, I think that's me for sure. I think that's me for sure.
BryceOh, oh I think you're you're so very wrong about that. So very wrong about that. I have a very loyal following.
ConorOh man. Should we we should do multiple polls here? We'll do uh we'll do a BQ. Here we go. Ooh, that's um that's very nice. Alright, so now we're going to do a little screen capture. Oh, actually. Oh no, yeah. We'll just um we'll copy the text into the the poll as well. Alright, now we're going to uh Twitter. Am I actually logged into um but do I have access to ADSP from here? I don't. I think I have to go to Firefox.
BryceWhy, why?
ConorUh because I have like seven Twitter accounts, and um you can only log into five at any one time. Uh on a screen.
BryceSo get rid of some Twitter accounts. You don't need seven Twitter accounts. I'm sure JF also has this problem.
ConorI'm gonna reshare just because I don't want Bryce to be left out on this experience of uh or yeah, I guess I can just share my entire screen.
BryceUh I don't know, then I might see I might see stuff.
ConorThat's true. It's a risk.
BryceHang on, I'm looking for I'm looking for anything juicy, but there's nothing juicy.
ConorAlright, so here is the photo. Oh, snap. You can't post photos alongside a poll.
BryceAlongside a poll.
ConorAbsolute garbage. Well, we will post that photo in a sec.
BryceYou can retweet the poll with the photo, I think.
ConorI'll just comment on it.
BryceAnd now we need to go back to I guess I should get ready to retweet this with my substantially higher Twitter uh Twitter follower game.
ConorYeah, yeah, yeah. That's true. That's true. You do have more Twitter followers.
BryceYeah. 10.5k! That's what I'm talking about. Oh no, no, actually, JF is JF is like a good 400 Twitter followers behind me. Like he that is the largest gap that we've had in a while. Woo! That's nice. That's nice. Yeah, JF, you're just you're just falling behind. You're just falling behind. See, I think the problem is it's the new JF Twitter um profile picture, which makes him look like um he's got a very substantial beard. And it sort of make him makes him look like uh Jack Dorsey. It's not as good as his previous profile picture, in my humble opinion. Sorry, JF, if you're listening to this. Should we leave the target indices part out? Yeah, that's what I was thinking, to emphasize more. Yeah, yeah, I think so. Because and I say that mostly because it is an amusing uh an amusing fact of like like languages like BQN and APL that literally the name of the function that we're defining is more characters than the function itself.
ConorAnd that is the that is the beauty.
BryceThe name of the function might be twice as many characters as the uh um uh as the function definition itself.
ConorThat's the beautiful thing. Like whenever you're competing in leak code, they always give their uh so function names to the problem, like something very similar to the name of the problem, which can be you know four or five words. So half the time it's like a six-character solution, and then to spell out the name of the function, it's like 20 characters, um, which is the best. So, what is the preferred BQN solution to target indices? Uh parentheses from episode 56. See comment in the photo below. Uh, we'll do this for what? We'll do it for we'll do it for the weekend. So three days?
BryceSure, sure.
ConorOr actually, wait. Oh yeah, this is this is gonna go out, and um and also two, yes, so I I actually haven't put our names.
BryceSo yeah, no, no, we're not putting our names. We're not putting our names. We're not, yes, of course.
ConorWe will at a later date, maybe when the uh 2021 retro goes out, although this is gonna be an episode 50. So maybe next uh fro uh Friday when the episode drops, we'll do a who's your favorite host, and then that's gonna be pretty contentious. Although, should we allow retweets? Because I feel like just we'll figure it out, folks. We'll figure it out.
BryceWe're gonna do retweets, we're gonna do retweets because we need the reach.
ConorAlright, alright. I feel like half of your followers might vote against you anyways.
BryceUm just I mean, look, look, look, look. Knowing knowing my um my brash and over-the-top personality, it is it is quite common for even even my devoted followers to troll me incessantly. As evidenced, I don't know if you saw JF's little prank that he pulled on me.
ConorI did. I did. Very nice. Well done, JF. I know you will have a rival podcast.
BryceWhat JF did was J JF sent me a link that appeared to be a link to a Wikipedia article about me, um, but was actually a a subtly constructed link to a To something else. And um, yeah, he got me. He got me. Not gonna lie, he got me.
ConorOkie dokes. Um 50-50 right now, folks. You're listening to this probably on January yesterday, the 7th 14th.
BryceBy the time you're listening to this episode, it's too late. Like, it's over. Um the the results of this poll have come in. And I have clearly been victorious. Connor has lost and has agreed to uh to put parentheses in reasonable places in his uh BQN code.
ConorOh, I'm not gonna. Um we what did I say last time is that the listener is misinformed if they get this poll wrong. But I honestly I've got I've got good I've got hopes for myself here.
BryceI I I I think that your hopes are misfamed. Woo wait wait, wait, wait. You have to delete the poll.
ConorWhy?
BryceI'm gonna let you read the poll again and figure out why you need to delete the poll.
ConorI don't know.
BryceLook at the two options and tell me whether those are valid code.
ConorOh. Do I really? Is there one?
BryceYou do. It's wrong. Connor forgot a parentheses. And you were like copy pasting, so that shouldn't have even been a possible problem.
ConorAlright, we're gonna do this in less than 60 seconds. Here we go.
BryceReally? Okay. I'm timing you.
ConorOkay, time me.
BryceCan Connor do it? Can Connor actually do all of the necessary retweeting in the case?
ConorShould we should we let's let's let it last for seven days then?
BryceIt's you it's your call, but you promised to finish this within 60 seconds, and right now you're just using some of that time. You are over the time. I'm done.
ConorI was done I was done three seconds ago.
BryceYou it doesn't matter because I started recording like five seconds in. You you took more than sixty seconds. You're done. You're out of here.
ConorUm, let me go delete the old one now.
BryceYeah, yeah. Oh, you didn't even delete the old one already. It doesn't count if you haven't deleted the old one.
ConorAnd let's just check. There are the right number of parentheses. Am I am I allowed to vote?
BryceI don't know.
ConorI can't vote, no.
BryceYou have to vote from your from your actual account, not the like what is this episode gonna be called? Bryson Connor use Twitter.
ConorI was that's garbage. So there was four votes before, and we were tied, and at one point I was ahead by a little bit, and now I'm losing.
BryceYeah, yeah, yeah. No, there are no recounts in this election.
ConorUm, okay, so seeing as we haven't gotten to the retro yet, um, let's look at a couple of my other notes, and my notes say um that we should announce NVIDIA's GTC conference has gone virtual, thanks to Omicron.
BryceAre we is that a thing that's public yet?
ConorAlright, we won't be announcing that. Actually, let's check.
BryceI'm gonna check. I'm gonna check whether that's public. But uh in the interest of us still.
ConorI know the speakers were informed.
BryceI I I suspect the speakers were informed.
ConorUm F-A-Q. What is GTC? GTC will be an online event. Woo!
BryceOkay, alright, alright. I guess we can say it. I guess we can say it.
ConorUm, so yeah, that's that's uh that's sad. I was really looking forward. That might have been the first time we had seen each other in over two years at that point.
BryceWell, you you can you you we live like a short distance away. You should just come visit me.
ConorUh Ontario's back in lockdown. All non-essential travel is uh not encouraged.
BryceIn the spring. In the spring. You can come crash on this glorious couch behind me.
ConorAnd GTC was gonna be in the spring. Anyways, the call for papers for CPP North will be opening on uh January 24th, which I believe is a Monday. Um so get your talk proposals ready for a hopefully in-person conference in Toronto, Canada, the first ever C Canadian uh conference. Um hopefully that it is still planning to go on, but you know, obviously we will monitor what's going on. We will see. And yeah, I think that's where we'll wrap out, wrap up episode sixty. Thanks for listening. We hope you enjoyed and have a great day.