Conor

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?

Bryce

What where are you? Is that a Zoom background?

Conor

No, we're in Google Meet.

Bryce

Or is it a g is it it you're not actually you're not actually in this like cafe that appears behind you, right?

Conor

Nope, I can't believe you can't even tell, man.

Bryce

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

Conor

You're a full-grown adult asking to have a snowball fight with your adult friends.

Bryce

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

Conor

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

Bryce

Do you know how many years ago? 2012 was?

Conor

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

Bryce

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

Conor

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

Bryce

Connor, if you have the background, I can't I can't judge your interior decorating.

Conor

Alright, fair enough.

Bryce

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

Conor

Literally, I turn it off and it's just white walls in the background. White walls and a white chair.

Bryce

White walls, white chair, yeah.

Conor

Alright, before we get well, we're actually how's it going, man? We haven't chatted in uh a few weeks. Happy New Year!

Bryce

Happy New Year, yeah. How's your new year going?

Conor

So 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?

Bryce

That's pretty good. Pretty good. Yeah. Alright, so let's uh let's do this retrospective.

Conor

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

Bryce

I think in the future we're gonna save the live coding for like YouTube episodes, which which are coming, listener. They are coming sometime.

Conor

After the Balkan tour 2023. Um so we we did we've we've heard you loud and clear. It was, I think, one individual.

Bryce

I I don't remember the name, but someone just I I think that one individual probably spoke for many others.

Conor

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

Bryce

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

Conor

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

Bryce

Is it right?

Conor

What's going on here?

Bryce

Watching Connor fail in in real time is something else.

Conor

Nope. Nope. Alright.

Bryce

You are gonna have to liberally edit this.

Conor

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

Bryce

You are gonna have to liberally edit this section.

Conor

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

Bryce

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

Conor

So actually, I said I would take that poll, and you're saying that the Twitter agreed.

Bryce

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

Conor

We got some tweets that said where's the poll? Um it they didn't actually say lean left or right.

Bryce

But here's what I'm gonna fine, fine. Then let's then let's make the poll. Let's make the poll right now.

Conor

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

Bryce

Well, no, no, no. Let's let's pick another one where let's know.

Conor

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

Bryce

So amazing.

Conor

When were we talking?

Bryce

Oh my god, you actually put links to my talk in the show notes.

Conor

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

Bryce

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

Conor

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

Bryce

Yeah, that's that's how we recorded it back then.

Conor

And uh cute little Bryce. Um 10 years ago, Bryce.

Bryce

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

Conor

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

Bryce

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

Conor

Really? Oh, I I like my first boost or C now talk had like 180.

Bryce

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

Conor

51. 52 Bryce Lelback GitHub.com slash Bryce Lellback slash Prana. Let's take a look.

Bryce

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

Conor

23 stars, pretty good, ma'am. Alright, um Oh, actually Yeah, yeah, yeah.

Bryce

We we had we had a thing, we were creating a Twitter poll.

Conor

Yeah, 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?

Bryce

Yeah. Okay. So this is Let's take it to the Twitter.

Conor

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

Bryce

And first we're gonna- Who do you think's gonna who do you think's gonna win?

Conor

I 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?

Bryce

Wait, wait, wait, wait, if it's who's your favorite host, who's gonna win?

Conor

Oh, I think that's me for sure. I think that's me for sure.

Bryce

Oh, oh I think you're you're so very wrong about that. So very wrong about that. I have a very loyal following.

Conor

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

Bryce

Why, why?

Conor

Uh because I have like seven Twitter accounts, and um you can only log into five at any one time. Uh on a screen.

Bryce

So get rid of some Twitter accounts. You don't need seven Twitter accounts. I'm sure JF also has this problem.

Conor

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

Bryce

Uh I don't know, then I might see I might see stuff.

Conor

That's true. It's a risk.

Bryce

Hang on, I'm looking for I'm looking for anything juicy, but there's nothing juicy.

Conor

Alright, so here is the photo. Oh, snap. You can't post photos alongside a poll.

Bryce

Alongside a poll.

Conor

Absolute garbage. Well, we will post that photo in a sec.

Bryce

You can retweet the poll with the photo, I think.

Conor

I'll just comment on it.

Bryce

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

Conor

Yeah, yeah, yeah. That's true. That's true. You do have more Twitter followers.

Bryce

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

Conor

And that is the that is the beauty.

Bryce

The name of the function might be twice as many characters as the uh um uh as the function definition itself.

Conor

That'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?

Bryce

Sure, sure.

Conor

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

Bryce

So yeah, no, no, we're not putting our names. We're not putting our names. We're not, yes, of course.

Conor

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

Bryce

We're gonna do retweets, we're gonna do retweets because we need the reach.

Conor

Alright, alright. I feel like half of your followers might vote against you anyways.

Bryce

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

Conor

I did. I did. Very nice. Well done, JF. I know you will have a rival podcast.

Bryce

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

Conor

Okie dokes. Um 50-50 right now, folks. You're listening to this probably on January yesterday, the 7th 14th.

Bryce

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

Conor

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

Bryce

I I I I think that your hopes are misfamed. Woo wait wait, wait, wait. You have to delete the poll.

Conor

Why?

Bryce

I'm gonna let you read the poll again and figure out why you need to delete the poll.

Conor

I don't know.

Bryce

Look at the two options and tell me whether those are valid code.

Conor

Oh. Do I really? Is there one?

Bryce

You do. It's wrong. Connor forgot a parentheses. And you were like copy pasting, so that shouldn't have even been a possible problem.

Conor

Alright, we're gonna do this in less than 60 seconds. Here we go.

Bryce

Really? Okay. I'm timing you.

Conor

Okay, time me.

Bryce

Can Connor do it? Can Connor actually do all of the necessary retweeting in the case?

Conor

Should we should we let's let's let it last for seven days then?

Bryce

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

Conor

I was done I was done three seconds ago.

Bryce

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

Conor

Um, let me go delete the old one now.

Bryce

Yeah, yeah. Oh, you didn't even delete the old one already. It doesn't count if you haven't deleted the old one.

Conor

And let's just check. There are the right number of parentheses. Am I am I allowed to vote?

Bryce

I don't know.

Conor

I can't vote, no.

Bryce

You have to vote from your from your actual account, not the like what is this episode gonna be called? Bryson Connor use Twitter.

Conor

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

Bryce

Yeah, yeah, yeah. No, there are no recounts in this election.

Conor

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

Bryce

Are we is that a thing that's public yet?

Conor

Alright, we won't be announcing that. Actually, let's check.

Bryce

I'm gonna check. I'm gonna check whether that's public. But uh in the interest of us still.

Conor

I know the speakers were informed.

Bryce

I I I suspect the speakers were informed.

Conor

Um F-A-Q. What is GTC? GTC will be an online event. Woo!

Bryce

Okay, alright, alright. I guess we can say it. I guess we can say it.

Conor

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

Bryce

Well, you you can you you we live like a short distance away. You should just come visit me.

Conor

Uh Ontario's back in lockdown. All non-essential travel is uh not encouraged.

Bryce

In the spring. In the spring. You can come crash on this glorious couch behind me.

Conor

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