back to index

fast.ai APL study session 10


Whisper Transcript | Transcript Only Page

00:00:00.000 | [BLANK_AUDIO]
00:00:10.000 | [BLANK_AUDIO]
00:00:20.000 | Hi. >> Hello.
00:00:32.560 | >> Hello. >> How is everyone doing?
00:00:36.400 | >> I'm good, how are you? >> I'm doing good.
00:00:39.360 | >> Doing good. Got another blog post out so that always feels good.
00:00:43.680 | >> All right. Nice job.
00:00:46.400 | [BLANK_AUDIO]
00:00:53.120 | What's New Year's?
00:00:53.920 | [BLANK_AUDIO]
00:01:00.640 | >> I see the- >> It's very warm here in Minnesota.
00:01:02.720 | >> Warm in Minnesota, I didn't know that happened.
00:01:05.360 | >> Yeah, a little bit in the summer.
00:01:08.640 | [BLANK_AUDIO]
00:01:10.560 | >> I just moved away from Minnesota about a year ago.
00:01:13.040 | [BLANK_AUDIO]
00:01:15.040 | What part of Minnesota are you in? >> In the Twin Cities area.
00:01:19.520 | >> Okay, I moved- >> The suburb.
00:01:21.760 | [BLANK_AUDIO]
00:01:23.840 | >> Yeah, I lived there for, I guess, 15 years. I just moved to DC from there about a year ago.
00:01:30.080 | [BLANK_AUDIO]
00:01:30.640 | >> Gotcha. >> I was there for
00:01:32.880 | seven years and moved last year. >> I went to college in Duluth, actually.
00:01:37.520 | [BLANK_AUDIO]
00:01:38.000 | >> Oh, yeah. >> Yeah.
00:01:39.840 | [BLANK_AUDIO]
00:01:42.560 | >> A little colder up there.
00:01:43.600 | [BLANK_AUDIO]
00:01:48.000 | How's the weather in Australia? >> Not very good today.
00:01:52.000 | [BLANK_AUDIO]
00:01:54.320 | Best time in a while, it's, yeah, really not very good.
00:01:57.360 | [LAUGH]
00:01:59.040 | >> Is it raining? >> Yeah, you see it raining?
00:02:00.880 | >> It's raining.
00:02:01.680 | [BLANK_AUDIO]
00:02:04.720 | It's raining, it's windy.
00:02:06.240 | [BLANK_AUDIO]
00:02:10.880 | Still, I guess that's fine.
00:02:12.560 | [BLANK_AUDIO]
00:02:14.320 | >> I saw that it looks like the course is coming along in terms of getting it ready.
00:02:19.120 | [BLANK_AUDIO]
00:02:19.920 | >> Yeah, it's like,
00:02:21.840 | [BLANK_AUDIO]
00:02:25.120 | not too terrifying. It's like, good to have things finished, but then,
00:02:30.320 | [BLANK_AUDIO]
00:02:32.240 | it's like, what if people hate it? So, hopefully, people don't hate it.
00:02:38.960 | [BLANK_AUDIO]
00:02:40.560 | >> Were those pictures all Dali 2-generated? >> Uh-huh, yeah.
00:02:44.160 | [BLANK_AUDIO]
00:02:45.920 | >> Did you try with Dali Mini instead? >> No.
00:02:49.200 | [BLANK_AUDIO]
00:02:49.440 | >> Because I thought it might be more interesting because a lot of,
00:02:53.280 | that was developed by a lot of fast AI people, right? So, it could be interesting too.
00:02:58.160 | [BLANK_AUDIO]
00:02:58.400 | >> Yeah, it was, but it's also like, much less trained. So, it's not normally very good.
00:03:06.640 | [LAUGH]
00:03:07.120 | >> I mean, it's good for what it is, but. >> Yeah, because I think one of the things,
00:03:12.160 | it depends on the, I guess, the sort of what your prompt and stuff, because some people say like,
00:03:16.560 | especially with like, I guess more pop culture and stuff,
00:03:20.320 | Dali Mini is better because, yeah, in Dali 2, they filter all that stuff out, so.
00:03:25.760 | [BLANK_AUDIO]
00:03:26.000 | >> Mm, that's interesting.
00:03:27.360 | [BLANK_AUDIO]
00:03:28.160 | >> Yeah, a lot of people. >> I didn't spend time on it, honestly,
00:03:31.600 | I was just like, it'd be fun to show in some examples. Yeah.
00:03:38.800 | [BLANK_AUDIO]
00:03:43.120 | >> Oh, just a moment, I've got a message.
00:03:47.840 | [BLANK_AUDIO]
00:03:57.840 | All right, this picture is sick, so I'm, hopefully you will be okay.
00:04:09.200 | [BLANK_AUDIO]
00:04:12.240 | Any APL news?
00:04:14.720 | [BLANK_AUDIO]
00:04:20.480 | >> I posted a kind of a statistics blog post and APL on the forum a little bit ago.
00:04:27.280 | [BLANK_AUDIO]
00:04:39.280 | >> We were just talking about that a little bit. It's very interesting going through that.
00:04:44.640 | [BLANK_AUDIO]
00:04:45.920 | Tell us about it, does it?
00:04:46.880 | [BLANK_AUDIO]
00:04:49.360 | >> Yeah, so calculating some simple statistics, confidence intervals, and p-values through
00:04:56.400 | bootstrapping. I've got a little monologue on why-
00:05:02.480 | >> For those who don't know what bootstrapping is, do you want to mention what that is?
00:05:05.280 | [BLANK_AUDIO]
00:05:06.560 | >> Yeah, so there's kind of a couple of ways you can calculate most statistics.
00:05:12.320 | Kind of like the classical statistical formulas that I think most people are more familiar with
00:05:18.720 | as you have a formula that can calculate a p-value and you have kind of assumptions baked in,
00:05:26.800 | like you're gonna assume the normal distribution and if these assumptions are true, you can
00:05:30.640 | calculate your value. Bootstrapping does a little bit of a different approach instead of kind of
00:05:38.320 | approximating the statistic by kind of assuming normal distribution. It says, well, we're just
00:05:46.240 | gonna randomly sample over and over and over again. So rather than creating a kind of an
00:05:53.280 | artificial sampling distribution based on what we believe the distribution to be,
00:05:57.600 | we'll just create it by randomly sampling a thousand times. And so there's less assumptions
00:06:05.520 | baked in. And then if you calculate a confidence interval, you can say a confidence interval on
00:06:12.480 | the mean. You can sample it a thousand times, get the mean of all these small samples. And if you
00:06:21.120 | want a 90% confidence interval, you just chop the lowest 5% off, chop the highest 5% off,
00:06:27.520 | and 90% of the time, your data will fall in those bounds. And you know that's the case
00:06:35.040 | because you did it a thousand times and you looked at where 90% of them fell.
00:06:38.160 | So it's kind of a more elementary, I think more flexible approach that kind of gets the same
00:06:49.440 | answer. Yeah, so, you know, when I used to do consulting 25, 30 years ago, this was my, one of
00:07:03.120 | my two big tricks was to use this kind of sampling all the time for creating simulations. I basically
00:07:12.800 | almost never used assumed distributions, but yeah, it would always basically get some real data and
00:07:20.640 | then randomly pick from a column. Yeah, it made life a lot easier and generally made things more
00:07:28.640 | accurate. Well, and I think it's the other trick. My other big trick was using pivot tables all the
00:07:35.120 | time. Back when pivot tables had just come out, it played people's minds. Nice. They still blow
00:07:43.600 | people's minds, by the way. It's a little less, a little more surprising, it blows people's minds
00:07:56.000 | today, I guess. But yeah, and so, you know, I think the biggest value for me in this bootstrapping is
00:08:03.600 | you can kind of think and reason and it's very intuitive, right? Like where will 90% of my data
00:08:08.960 | points fall? Well, I don't know. Let me try it a thousand times and see where 90% of my data
00:08:13.360 | points did fall. If you want to do, you know, a hypothesis test, you can sample it a bunch of
00:08:23.520 | times and see how many values, how many, how many values were more extreme than what you saw. And
00:08:29.040 | you can you can actually sample it and look. And the nice thing about that is, you know, you can
00:08:33.920 | compare your means, but it's very easy to say, not just let me validate that the means are different,
00:08:40.480 | but eventually you want to actually say, let me validate. Can I validate to see if the means are
00:08:48.960 | different by a certain amount? So you can start to do statistical tests on magnitude, because
00:08:54.560 | just because two things are different doesn't mean it means anything. Normally, as an about,
00:09:00.160 | it has to be different before it matters. And you can kind of keep talking.
00:09:05.120 | So these when you sample it, I feel it's just a way of doing it just based on kind of intuition
00:09:14.960 | and experimentation that I find is just a lot easier to work with and customize and understand
00:09:24.160 | what's going on. And you don't have to be as careful about what assumptions you're making versus not
00:09:29.200 | making. So so Isaac, have you used that a lot? I'm sorry, you might have said that I was I might not
00:09:45.600 | have been might not have heard it. Yeah, I pretty much exclusively use use bootstrapping. I don't
00:09:51.760 | really see. I mean, I think the situations where I wouldn't would be if I'm completely certain of
00:10:03.280 | what the assumptions of a given formula are, I'm completely certain my data set fits those
00:10:08.560 | and bootstrapping for whatever reason is not feasible. Like if I if I really needed to
00:10:16.560 | calculate the statistic on some enormous, ginormous data set than than maybe these formulas are really
00:10:23.600 | just kind of shortcuts. They're not they're not different. They're not giving different values.
00:10:28.960 | They're just a way to do it, you know, more computationally efficient. And so
00:10:35.280 | when I'm kind of just testing and developing things, I'd rather have something that I can
00:10:41.600 | think about and is a little bit more intuitive. But I mean, I don't really need to I mean, this
00:10:51.360 | these these drawing a random sample is usually not, you know, computationally prohibitive. So I can
00:10:58.400 | usually just just do it on my laptop. And it's not a big deal. So I almost never use the traditional
00:11:05.840 | formulas. I don't say never, but bootstrapping is on my default. If you can say, what are the
00:11:14.080 | applications that you like just a handful or like one or two of what you've used it on?
00:11:20.560 | Yeah, I mean, I mean, really, I mean, what what's the data from? Pretty much anything you would do
00:11:28.160 | any normal statistical test or confidence interval on so you know, you you've got some data and you
00:11:34.080 | run maybe you're doing an A/B test, you have a control group and you're testing sending fewer
00:11:40.000 | emails to another group and you want to know, did it have an impact on revenue or their level
00:11:46.480 | of engagement or whatever we do. Okay, sure. I used it a lot for simulations. So it'd be like,
00:11:53.920 | you know, in consulting, it'd be like, okay, what's the possible outcomes of this company
00:11:59.760 | under different scenarios, and you would need to make a bunch of assumptions about what might
00:12:03.840 | happen. And generally, it's not the idea to do a point assumption because you don't know. So then,
00:12:08.880 | you know, the normal thing might be to say, oh, well, let's assume it's a, you know, standard
00:12:13.840 | deviation around our assumption of whatever, right, that kind of often like to find him some
00:12:19.680 | historical data of like past results or something like that. And then basically just do a random
00:12:27.680 | vocab into that list of values. There's a really great introductory statistics book that is
00:12:39.120 | a bootstrap first approach. I'll put that in the chat if anyone is interested.
00:12:46.560 | Yeah, that'd be great. Thank you. It's not APL, but it's a, I think it teaches things in a really
00:12:54.880 | intuitive and useful way. And it covers things like just because something is statistically
00:13:02.320 | significant doesn't mean it's practically significant, which I think is something that's
00:13:06.000 | sometimes missed in statistics, right? Feels like remembering the author names won't be too hard.
00:13:11.600 | Yeah. Yeah, it's a, it's a freak family of, I think like four of them have PhDs in statistics.
00:13:21.120 | But it's, yeah, it's interesting. Gotcha. Thank you.
00:13:27.520 | I haven't seen this before. Add to cart.
00:13:35.760 | Oh my God, $112. What is it about books? Wait, the A-book's $112 or the print book's $48.
00:13:46.000 | That's interesting. Oh, that's a wrench for the book.
00:13:49.920 | Well, the rental. Yes. Oh, God, I hate textbooks.
00:13:55.520 | And what's this? Yeah.
00:13:58.640 | Online access for $10. You need the $30 Dover edition.
00:14:06.000 | The what?
00:14:09.920 | $30. I'm sorry. What did you say?
00:14:16.800 | You know, Dover, Dover Publications, they don't have these kind of pseudo textbooks.
00:14:24.160 | So I have a buddy that I went to college with. He's a physics professor over here in the States. And
00:14:31.360 | he was trying to find a Dover publication on physics that he could use for one of his classes
00:14:38.480 | because the books only cost like $30. You know, it's not hard bound, but it's an actual physical
00:14:46.720 | text or physical book. But unfortunately, a lot of them, you know, for at least he was
00:14:52.320 | saying for the stuff he was looking at, they left out too much detail. Because, you know, they're
00:14:58.560 | they're usually at least the ones I've seen are, you know, in that kind of standard 200 to 220 page
00:15:04.880 | realm. But so that that's what I was referencing. I see. But Dover Publications has a lot of
00:15:14.960 | technical books. Maybe I'll find their, you know, their their website and put it on the thing.
00:15:23.680 | And some of the books are really good. It's just that some of the detail isn't in there.
00:15:29.680 | The Kindle version is $47. That's weird.
00:15:33.840 | Is that is that just student solutions or?
00:15:37.840 | Oh, was it so solutions manual? Oh, my gosh. Okay. Right. Hardcover $363.
00:15:44.960 | I don't know.
00:15:50.160 | Yeah, it was more than I wanted, but my work paid for it. So I didn't feel bad for it.
00:15:56.320 | It's not just wasting somebody else's money. I'm more okay with it.
00:16:07.200 | Maybe you can find a used copy.
00:16:08.640 | Yeah, it's going to be on Amazon.
00:16:12.560 | I hope Molly's able to join because it sounded like she was going to try and
00:16:25.440 | actually do some prep for today's chat. She was asking what we're going to cover.
00:16:33.360 | And Serada, whereabouts did you list these things? Was that a previous session or something?
00:16:42.720 | No, it's in the how to buy a really short APL code. Yeah, definitely.
00:16:49.200 | Okay, so tell us about this APL problem solving competition.
00:16:56.640 | Actually, I hear from your interview in AWAYcast and Adam mentioned it at the end.
00:17:04.960 | So I just jump in and have a look under the face one, the left hand side.
00:17:14.960 | Oh, left hand side.
00:17:20.720 | So they actually give you some very easy to start with a sample and then have a platform for you to
00:17:29.200 | do it. And I find it quite easy to use some of the, I have experience in the past in Python,
00:17:37.280 | some of them I just don't know how to do the submission, but they're a very good explanation.
00:17:41.520 | And I think I've been hooked is because of the two questions. They actually using the
00:17:48.000 | APL and then solving the life science problem. They actually how to turn the different of the
00:17:55.120 | DNA and the mutation. So and the second solution actually really, really short.
00:18:01.280 | And I really impressed by what they can do.
00:18:05.360 | Oh, cool. So you can actually submit your function and test it here.
00:18:13.520 | Yeah. And then it has some edge case. So that's why I started thinking into the documentation
00:18:18.720 | and find out the slightly different. I need to do that little diamond thing in it.
00:18:25.520 | Yeah. And they cover quite a wide range of the other problem as well. So you can click through.
00:18:32.480 | Yeah, that is a bit more a multi-line question. So maybe in the future we can you can cover it here.
00:18:40.160 | Yeah. I think Felix was telling me that a lot of the phase one questions are pretty approachable.
00:18:50.320 | So just for me, it's a small exercise. I, when I learned Python, I remember I tried to find different
00:18:59.040 | problem and just try to understand the description, how to do it. So yeah, just kind of fun. And they
00:19:07.040 | give us some hints on what solution or symbol we should use and then just start looking at it as
00:19:14.880 | well. But as APO documentation sometimes can be quite hard to understand. So yeah, you can cover
00:19:21.920 | it a little bit great. And the mutation actually they point you to the Hamming distance. Actually
00:19:29.360 | very interesting when I learning how to write APL and then I also learning other knowledge as well.
00:19:35.280 | So yeah, just find it interesting. Yeah. I mean, this one seems trivially easy, right? Yeah.
00:19:43.680 | It's just. But I think that for me is very inspiring is the application.
00:19:51.440 | This one's just this, isn't it? Yeah, those are here.
00:19:54.800 | Well, I mean, presumably phase one is not.
00:20:04.720 | I think there is some prize money associated with phase one.
00:20:07.440 | Oh, you know what it is. So it's plus slash applied to each side.
00:20:11.440 | So you've got to do equals on the two sides.
00:20:18.560 | It'd be interesting actually to think about how to do this really neatly, right? Because you've got to
00:20:24.480 | have. I mean, you can obviously do it with a defund. But to do it directly.
00:20:35.440 | Oh, I guess it's like, yeah, plus slash applied to that.
00:20:46.800 | That this one. So that would be. That would give you that. No. OK, so that would give you.
00:20:59.440 | It's a slightly different case to any of the
00:21:05.760 | binds. I remember saying you want the.
00:21:12.400 | This to be the dyadic one, and then you want to post process it with plus slash.
00:21:17.200 | Is there a way to do that?
00:21:21.120 | Yep, so that's why you need to think about it.
00:21:27.360 | And yeah, they also in the example stage, they.
00:21:33.680 | They tell you that as different method in in APL can do it and just see how they actually quite
00:21:45.040 | experience it to to to operate actually really, really amazing.
00:21:49.040 | And I saw in the last year competition, they actually compare different solution and they
00:21:56.560 | actually can run the performance to compare different, not just the length of the solution,
00:22:02.640 | but also the processing time.
00:22:04.160 | It's this one.
00:22:06.960 | You want X equals Y and then post process with plus equals.
00:22:12.960 | So you want. This is your post processing.
00:22:21.280 | And this is your dyadic pre processing.
00:22:25.920 | Is there a way to.
00:22:33.440 | Like run some examples and see what happens or do you have this?
00:22:38.960 | Because your answer is not correct, that's right.
00:22:43.840 | Yeah, I was hoping I was hoping to see what it does give.
00:22:46.560 | Oh, actually, the example is all your test case.
00:22:50.240 | I see. Yeah.
00:22:54.560 | Yeah, let's try it.
00:22:57.200 | So you just need to do your function.
00:23:11.200 | Okay, F equals plus slash and what's this button?
00:23:24.320 | J applied to equals.
00:23:30.240 | That's not that.
00:23:31.680 | It's this. Okay.
00:23:43.680 | That's interesting.
00:23:44.480 | It hasn't, it hasn't ended up.
00:23:46.640 | Are you, are you trying to put F?
00:23:49.440 | Oh, I'm not going to say equals.
00:23:50.560 | I should say F. Sorry.
00:23:51.520 | Ten. And is it saying that was wrong?
00:23:59.040 | The result should have been seven with that and that.
00:24:02.320 | Oh, wait, the number of differences, that's why.
00:24:11.040 | So it's, it's the opposite of that.
00:24:25.120 | And I believe not is Tilda. I think I saw that on the news.
00:24:32.240 | It is. So that's the post processing.
00:24:44.720 | There you go.
00:24:47.680 | And would you need the parentheses?
00:24:54.880 | I'm not sure.
00:24:56.800 | Without the parentheses, it still works.
00:25:00.880 | That's interesting.
00:25:01.520 | Now, why does it still work?
00:25:02.720 | So that's the operator.
00:25:05.120 | That's the right hand side.
00:25:06.720 | That's the, oh, I see.
00:25:10.800 | That's the left hand side.
00:25:12.160 | And then that's what is applied to the whole thing.
00:25:15.520 | So I think that's correct.
00:25:22.800 | Test.
00:25:29.200 | Yeah.
00:25:30.160 | But my solution is only five.
00:25:33.280 | So one, one letter's more shorter than you.
00:25:35.760 | One, two, three, four, five. Mine's five.
00:25:38.560 | Okay. Yeah.
00:25:42.240 | Yeah.
00:25:42.400 | Nice.
00:25:43.760 | And they, for the, for them, they have the pass.
00:25:46.800 | They have a silver trophy for you or a go-go trophy for you.
00:25:51.280 | Silver just passed part of the test case and the goal, actually, you pass all the case.
00:25:55.760 | And so this is gold?
00:25:57.600 | Yeah.
00:25:58.640 | I see.
00:25:59.120 | I think you said you have to log in for you to save your correct answer if you.
00:26:04.960 | Oh, good point.
00:26:05.680 | You can submit now and then you can put the trophy.
00:26:09.440 | All right.
00:26:11.280 | Yeah, I just found very fun and busy and I can learn and practice.
00:26:16.160 | That's great.
00:26:16.960 | All right.
00:26:18.000 | So, so your list of things were the things that they were saying would be needed.
00:26:25.680 | Okay.
00:26:26.400 | So we've done this one.
00:26:27.520 | So let's do these ones.
00:26:31.440 | And this competition's called 2022 APL.
00:26:40.400 | Okay.
00:26:40.880 | So let's create a,
00:26:43.680 | [silence]
00:26:57.840 | section.
00:27:03.360 | [silence]
00:27:17.680 | Okay.
00:27:18.180 | So should we just go in order?
00:27:21.040 | [silence]
00:27:30.320 | Oops.
00:27:36.800 | [silence]
00:27:40.400 | This is called Key.
00:27:41.840 | I feel like I've heard people talk about Key a few times.
00:27:44.800 | [silence]
00:27:52.080 | And what is this cliff called?
00:28:03.440 | [silence]
00:28:08.000 | You can see it.
00:28:08.880 | This one.
00:28:10.080 | Is it an improvement of operators?
00:28:11.760 | Yeah.
00:28:12.000 | Quad equal.
00:28:13.920 | Okay.
00:28:16.660 | Quad equal.
00:28:21.200 | [silence]
00:28:23.200 | And it's spelt here.
00:28:25.360 | [silence]
00:28:28.160 | Okay.
00:28:28.660 | [silence]
00:28:33.760 | It's a monadic operator.
00:28:34.960 | [silence]
00:28:36.080 | I really wish this bookmarklet gave the whole hover over that the dialogue editor gave you,
00:28:42.560 | but oh well.
00:28:44.000 | Sorry about that.
00:28:44.640 | [silence]
00:28:45.600 | So I really wish this bookmarklet gave you the full hover over that hover effect that
00:28:52.080 | the dialogue editor gave with everything, but...
00:28:55.520 | It'd be easy enough to fork it and add that, I guess.
00:28:58.000 | [silence]
00:28:59.360 | Yeah, that's true.
00:28:59.920 | [silence]
00:29:02.160 | Yeah, maybe somebody can give that a go.
00:29:03.760 | That's a shame they're not using a nice font in here.
00:29:09.680 | Oh, we should add our boxing style equals max.
00:29:17.360 | Oh, boxing on style equals max.
00:29:21.360 | Oh, dash style equals max.
00:29:23.200 | Okay.
00:29:26.320 | [silence]
00:29:34.800 | Okay.
00:29:35.300 | [silence]
00:29:39.360 | Means key.
00:29:40.160 | It's okay.
00:29:42.640 | So the left-hand side's optional, so we know to look out for that.
00:29:45.200 | And we're going to give it a dyadic function.
00:29:48.480 | [silence]
00:29:53.200 | It applies the function to each unique key in X and the major cells.
00:29:58.640 | Okay, well maybe the best way to look at this is to look at that competition because it had an
00:30:02.320 | example.
00:30:03.280 | I think it's okay if we look at how to do some of the phase one stuff together.
00:30:08.560 | [silence]
00:30:10.720 | If that sounds reasonable.
00:30:11.840 | [silence]
00:30:13.040 | Yeah, I can say it's okay if we just walk through.
00:30:15.280 | [silence]
00:30:17.920 | Oh, don't press that button.
00:30:19.360 | [silence]
00:30:31.920 | So, right argument that's a character vector representing DNA string and we want to count
00:30:37.360 | each symbol.
00:30:40.000 | So, all right.
00:30:45.120 | So maybe we should start with like banana and count each symbol banana.
00:30:53.600 | Okay.
00:30:55.200 | [silence]
00:30:59.840 | It applies the function to each unique key in X and the major cells of Y having that key.
00:31:10.080 | [silence]
00:31:22.400 | I see, and here they've got a function which is just inserting colon between things.
00:31:26.400 | [silence]
00:31:28.880 | Each unique key in the major cell of Y having that key.
00:31:43.520 | So, if we did like, let me know if anybody's got a thought about what we could try this for.
00:31:56.000 | This is shift K, A, I don't know, what if we just did like comma, A, rank there, okay.
00:32:20.400 | [silence]
00:32:24.080 | Flies the function.
00:32:26.400 | [silence]
00:32:34.000 | Keys similar to group by.
00:32:36.400 | [silence]
00:32:48.320 | Maybe we should try their example.
00:32:50.080 | [silence]
00:33:12.240 | So, this banana example might be an even simpler one, that one potentially.
00:33:21.360 | Put it in the chat.
00:33:26.480 | I guess it's basically the same thing, but...
00:33:29.280 | Okay.
00:33:32.640 | Cool.
00:33:33.920 | Easier to see what the mapping is doing.
00:33:51.040 | So, what is it doing as X?
00:33:53.040 | So, the B, the banana goes with the three.
00:33:56.880 | Why is the A appearing with one, one, nine?
00:34:01.120 | Oh, it's selecting from like where the A's are, it's selecting these.
00:34:04.880 | Oh, and then where the N's are, it's selecting those.
00:34:12.320 | Wait, is that right?
00:34:13.360 | The banana.
00:34:16.240 | B, A, N, A, N, oh yeah.
00:34:26.080 | Oh, I see.
00:34:26.800 | These are the positions of, it's kind of slightly backwards to what I expect.
00:34:31.920 | [silence]
00:34:36.800 | There's three A's.
00:34:38.080 | Oh, and they're in, maybe it would be easier actually if we did...
00:34:44.480 | [silence]
00:34:49.680 | I6, O to 6.
00:34:51.440 | [silence]
00:34:54.800 | There's the positions of them.
00:34:56.160 | [silence]
00:35:08.240 | Which means, can we just say comma?
00:35:10.400 | [silence]
00:35:15.360 | [silence]
00:35:28.000 | A, comma, two, four, six.
00:35:31.840 | Yeah, that just concatenates things.
00:35:35.120 | [silence]
00:35:40.000 | And it's a bit like root by...
00:35:46.320 | [silence]
00:35:50.640 | Another example that shows actually applying a function other than kind of a custom function
00:35:57.760 | in there as well that I think is another functionality we might want to show.
00:36:02.960 | Okay.
00:36:03.360 | Though the I in mine is not an iota, so it should be.
00:36:09.680 | [silence]
00:36:24.880 | Oh, I see.
00:36:25.760 | So we basically are saying like this is column one and this is column two,
00:36:30.320 | and you find all the unique things that are in column one,
00:36:37.440 | and then you find the corresponding things in column two and do something to them.
00:36:43.600 | [silence]
00:36:48.400 | And what if it's monadic?
00:36:49.760 | [silence]
00:37:02.720 | I think it will pass the iota six on both sides of it
00:37:06.640 | and treat it as...
00:37:07.680 | I think the iota six will be alpha and omega.
00:37:12.880 | There you go.
00:37:13.280 | If it's monadic, it just does the results.
00:37:19.200 | [silence]
00:37:22.160 | Gosh, I thought you meant only something on the right side of the quad equals,
00:37:26.320 | like no A, no left side.
00:37:28.160 | [silence]
00:37:31.840 | So like...
00:37:32.320 | [silence]
00:37:35.040 | I wonder how you can do this without the D funds.
00:37:40.160 | [silence]
00:38:00.160 | [silence]
00:38:08.640 | [silence]
00:38:11.200 | So in that cell 22 where you have the A with the plus some...
00:38:17.840 | I mean, you can also remove the A from the left, or not the alpha.
00:38:22.480 | Oh, remove the A?
00:38:23.440 | That holds. You can move that and it'll pass that iota six as both alpha and omega to that function.
00:38:33.040 | Okay, so that's not going to be very interesting presumably.
00:38:35.680 | [silence]
00:38:47.840 | Ah, what's that doing?
00:38:49.760 | [silence]
00:38:52.960 | So that is, I guess B is the first slot, A is second and fourth, but where is...
00:38:59.920 | Okay, so I guess that just gave you the index locations for each character.
00:39:05.840 | [silence]
00:39:07.040 | The K operator applies the function to each unique key.
00:39:10.080 | [silence]
00:39:13.600 | Oh, here we are.
00:39:14.160 | It's the same as this, but we haven't done this yet, have we?
00:39:22.000 | [silence]
00:39:24.000 | Maybe we should do that because it actually comes up quite a lot.
00:39:26.960 | [silence]
00:39:29.040 | So let's just step back for a moment and...
00:39:34.640 | [silence]
00:39:40.080 | Put it underneath this.
00:39:41.520 | [silence]
00:39:53.760 | Presumably the dyadic form of this is not match, it is, so that's easy.
00:39:58.720 | [silence]
00:40:01.360 | That way we want the monadic version.
00:40:04.160 | [silence]
00:40:14.160 | So this is...
00:40:14.880 | [silence]
00:40:20.400 | A double quote and we can look at that.
00:40:22.400 | [silence]
00:40:27.200 | Okay.
00:40:27.680 | [silence]
00:40:45.680 | Okay, dyadic is not match, so I can just...
00:40:50.880 | [silence]
00:40:55.920 | Move this.
00:40:57.920 | [silence]
00:41:00.080 | Copy that from match, I guess.
00:41:01.680 | Oh, we don't have anything for match.
00:41:04.240 | Oh, we haven't done equal underbar yet either.
00:41:06.080 | All right, okay.
00:41:08.240 | [silence]
00:41:16.080 | Okay.
00:41:16.320 | [silence]
00:41:21.840 | This one should be pretty easy.
00:41:24.000 | [silence]
00:41:35.040 | So this...
00:41:35.600 | [silence]
00:41:41.040 | That's interesting, now why are these different?
00:41:43.040 | [silence]
00:41:53.520 | Oh, I guess I'm confused.
00:41:55.360 | [silence]
00:42:00.640 | They look the same.
00:42:01.520 | [silence]
00:42:05.040 | And so...
00:42:05.600 | [silence]
00:42:07.920 | Oh, because they do match, yeah, of course.
00:42:10.240 | Sorry, so yeah, so not match is false.
00:42:12.480 | [silence]
00:42:19.280 | I wish they had the simplest possible examples first.
00:42:22.560 | [silence]
00:42:34.320 | One doesn't match one is false.
00:42:36.080 | One doesn't match zero is true.
00:42:39.040 | [silence]
00:42:44.160 | Okay, now the point though is that it doesn't kind of like...
00:42:48.960 | Normally equals or not equals is element wise.
00:42:53.040 | So this would broadcast over this and the answer would be zero zero
00:42:58.240 | because one, it's not true that it doesn't match one.
00:43:01.360 | But this version with the extra line in it checks whether the ranks are the same.
00:43:09.120 | So it's operating on the whole thing.
00:43:11.440 | Which presumably there might be one somewhere to get that using the rank operator and not equals.
00:43:22.400 | Um, I don't know if that's true or not.
00:43:25.440 | So not equals is eight.
00:43:28.240 | [silence]
00:43:31.840 | So yeah, so my point is that normally...
00:43:34.400 | Well, let's just use equals, right?
00:43:35.680 | Just two examples.
00:43:36.480 | So one is equal to one and one is equal to one.
00:43:39.200 | Or we could do it like this.
00:43:41.280 | [silence]
00:43:46.000 | And then I'm wondering is there some way...
00:43:47.520 | Rank operator, was it this one?
00:43:50.720 | [silence]
00:43:52.640 | Over.
00:43:53.040 | Rank.
00:43:54.720 | Okay, shift J.
00:43:55.680 | [silence]
00:43:57.680 | Um, is there somewhere to say, okay, we want to take the...
00:44:01.280 | [silence]
00:44:06.400 | Left hand side is a scalar and the right hand side is a vector.
00:44:10.320 | [silence]
00:44:12.800 | Nope.
00:44:19.840 | [silence]
00:44:21.600 | Okay, I guess I don't know how to do that then.
00:44:23.200 | [silence]
00:44:25.120 | Um, okay.
00:44:26.800 | Anyways, so I guess I think this is fair enough.
00:44:30.320 | And so we could copy that up to match.
00:44:35.440 | [silence]
00:44:39.360 | Which is colon.
00:44:44.000 | [silence]
00:44:47.120 | Okay.
00:44:50.000 | [silence]
00:44:58.880 | Okay.
00:44:59.200 | [silence]
00:45:02.400 | Mononik.
00:45:02.960 | [silence]
00:45:07.200 | So, interestingly, I think the, um, I think the, uh,
00:45:11.760 | rank operator you have to put in parentheses.
00:45:14.480 | Because otherwise it interprets that right scalar as part of the vector on the right.
00:45:19.520 | [silence]
00:45:27.200 | At least doing that at least gets it not to error.
00:45:29.760 | It didn't give me a useful answer, but it got closer.
00:45:33.280 | [silence]
00:45:35.440 | Well, I didn't get an error.
00:45:36.560 | I got one, one, which is this, yeah.
00:45:40.560 | Oh, gosh, okay.
00:45:42.400 | Zero, one.
00:45:43.520 | I was trying to get a single result to say this is not equal to this.
00:45:49.600 | This whole thing is not equal to this whole thing.
00:45:51.680 | Oh, using just the single equals.
00:45:55.200 | Okay, I misunderstood.
00:45:56.800 | Yeah, I was trying to get that to be the same as the
00:45:58.720 | command.
00:46:01.920 | I wonder, do they say whether it's, uh,
00:46:04.880 | [silence]
00:46:06.880 | some equivalent match.
00:46:10.160 | [silence]
00:46:19.440 | Doesn't.
00:46:19.840 | [silence]
00:46:25.520 | Doesn't mention it.
00:46:26.640 | [silence]
00:46:29.360 | All right.
00:46:29.680 | [silence]
00:46:32.320 | Okay, so tally is how you get counts.
00:46:35.120 | I've come across this before.
00:46:36.560 | [silence]
00:46:40.320 | And the mnemonic I heard on ArrayCast,
00:46:44.560 | who are remembering that this is how you get counts,
00:46:46.720 | is imagine rotating it by 90 degrees.
00:46:50.000 | It looks like tallying stuff on a whiteboard or a chalkboard or whatever.
00:46:56.960 | So, tally.
00:47:03.040 | So that should be, that's three, got three things.
00:47:12.240 | What about tallying up a matrix?
00:47:25.920 | Okay, it's the number of major cells.
00:47:27.920 | There are two rows in a matrix.
00:47:29.520 | Yeah, so imagine rotating that by 90 degrees.
00:47:34.800 | It looks like you're tallying something.
00:47:37.200 | There we go.
00:47:41.120 | Yeah, number of major cells.
00:47:42.400 | Great.
00:47:42.720 | Ah, that's interesting.
00:47:50.640 | It points out that row V is a white element vector,
00:47:55.440 | where else tally V is the same thing, but it's a scalar.
00:47:59.040 | Minor difference.
00:48:02.560 | [silence]
00:48:06.880 | Might be worth pointing that out.
00:48:08.640 | [silence]
00:48:11.200 | Like so.
00:48:11.680 | Okay.
00:48:13.520 | [silence]
00:48:15.840 | And then depth.
00:48:32.240 | [silence]
00:48:46.080 | Is the, how much nesting there is, I guess.
00:48:53.360 | So this is an array of arrays, so its depth is two. This is an array, so its depth is one.
00:49:04.080 | This is a scalar, so its depth is zero.
00:49:05.920 | And in the case where it's not always two, then it makes it negative.
00:49:16.000 | [silence]
00:49:25.120 | Okay, so if all the items, the scalars, it's a simple array.
00:49:28.480 | It has a depth of one, a scalar depth of zero.
00:49:31.040 | And if they're not all scalars, it's nested.
00:49:34.480 | [silence]
00:49:40.720 | Uniform depth, if all its items are the same depth.
00:49:43.440 | Okay, and it's not uniform depth.
00:49:45.600 | It's negative.
00:49:46.240 | Okay, I don't know what quadML is.
00:49:51.520 | [silence]
00:50:02.160 | Okay, so I guess that's, hopefully gets us back to where we were,
00:50:06.800 | which I don't remember what that is.
00:50:13.120 | Oh, we were doing quad equal, and I guess that mentions,
00:50:19.200 | [silence]
00:50:28.000 | here. Okay, so that is the number of elements in Y.
00:50:32.320 | [silence]
00:50:38.080 | Okay, so iota of that.
00:50:39.760 | Yeah, okay, that's exactly what we just saw.
00:50:41.520 | [silence]
00:50:42.880 | So this is iota of the number of elements of A.
00:50:47.120 | [silence]
00:50:51.920 | Yes, iota six is iota of the number of elements of A.
00:50:56.320 | [silence]
00:50:57.920 | So that's the same as iota of tally of A.
00:51:01.280 | [silence]
00:51:03.760 | And that's why these two are the same.
00:51:05.120 | [silence]
00:51:07.920 | Cool.
00:51:08.240 | [silence]
00:51:10.880 | Did we want to have a go at trying to do this thing?
00:51:15.040 | [silence]
00:51:17.520 | Anybody have any ideas?
00:51:18.640 | [silence]
00:51:21.920 | So to jump back, I just looked at what that quadML does.
00:51:25.360 | Okay.
00:51:26.080 | [silence]
00:51:26.800 | Kind of cool, kind of don't think I'll ever use it.
00:51:29.680 | Okay.
00:51:30.240 | But I guess different versions of APL define partitions differently,
00:51:37.680 | particularly when you're doing like partitioned enclosures and stuff
00:51:40.720 | like that.
00:51:41.200 | And apparently you can change which definition you're using.
00:51:44.960 | Sorry, what do you mean by partitioned?
00:51:46.320 | I set that variable.
00:51:47.200 | What does partition mean in this case?
00:51:49.680 | Like the backtick Z or backtick capital Z.
00:51:56.560 | It's the little C, I think it's called left shoe.
00:52:00.160 | Oh, okay.
00:52:00.400 | We haven't learned that yet.
00:52:01.600 | Yeah.
00:52:01.760 | Left shoe underbar.
00:52:03.760 | So it...
00:52:04.240 | All right.
00:52:06.160 | I guess we'll come back to that, then we look at that cliff then.
00:52:09.440 | [silence]
00:52:20.480 | Okay.
00:52:20.880 | So if we did this quady thingy, what's it called?
00:52:24.480 | Quad equal?
00:52:25.360 | She's the key.
00:52:29.440 | [silence]
00:52:36.240 | That tells us the locations of each of these things.
00:52:39.120 | [silence]
00:52:42.160 | And what did it ask us?
00:52:43.280 | [silence]
00:52:49.280 | Accounts.
00:52:49.840 | Oh, okay.
00:52:52.240 | So would that just be...
00:52:54.640 | Hallie?
00:52:56.640 | [silence]
00:53:01.920 | [laughs]
00:53:03.520 | Okay.
00:53:04.000 | [silence]
00:53:10.000 | Why didn't that work?
00:53:10.880 | [silence]
00:53:12.000 | So do we need to have a function and apply tally only to the Omega argument?
00:53:18.720 | [silence]
00:53:21.440 | Or...
00:53:22.160 | Yeah.
00:53:22.480 | Was it doing something?
00:53:23.440 | Was it like doing it diatically or something like...
00:53:25.840 | [silence]
00:53:28.320 | So key... oh, it's a dyadic function.
00:53:33.040 | Right, right, right.
00:53:36.560 | It's a dyadic function.
00:53:37.840 | So we want a way to say we want to use it monetically,
00:53:45.360 | which obviously we can do in a rather ugly way by doing it like this.
00:53:54.240 | [silence]
00:53:57.840 | So we need the tally to apply to the Omega, but not the Alpha, right?
00:54:02.640 | [silence]
00:54:05.520 | That's still wrong.
00:54:06.480 | [silence]
00:54:16.480 | Are you trying to do tally?
00:54:17.680 | Isn't the tally the one with the...
00:54:20.480 | Oh, yes.
00:54:21.040 | [laughs]
00:54:21.520 | Yeah, yeah.
00:54:22.000 | Just the other one.
00:54:22.800 | Thanks.
00:54:24.080 | [silence]
00:54:26.560 | Right.
00:54:28.800 | And then...
00:54:29.600 | [silence]
00:54:32.320 | Thank you, Tanish.
00:54:33.040 | [silence]
00:54:36.640 | Okay.
00:54:37.120 | Is there a better way to say we want the monadic version?
00:54:46.800 | [silence]
00:54:51.600 | Did you come across a shorter answer to this, Serato?
00:54:54.080 | Or did you have something like this?
00:54:55.280 | [silence]
00:54:57.520 | We can't hear you.
00:54:58.240 | You're muted.
00:54:58.880 | [silence]
00:55:03.280 | I think I have a longer version.
00:55:04.560 | [silence]
00:55:05.360 | Oh, okay.
00:55:06.240 | Let's see if it works.
00:55:09.200 | Well, this is an interesting thing maybe to see if anybody can figure out is how to do this
00:55:18.880 | without the D funds, because it seems like it should be unnecessary.
00:55:24.800 | Okay.
00:55:25.600 | This 2012-1721.
00:55:28.080 | 20...
00:55:32.160 | Oh, it's got to be in a particular order.
00:55:34.320 | Right, right, right.
00:55:36.080 | Which I think is easily fixed by telling it what order we want it in.
00:55:40.000 | Is that true?
00:55:43.040 | So we want it for AGCT.
00:55:45.520 | ACGT.
00:55:48.160 | [silence]
00:55:55.360 | ACGT.
00:55:57.360 | [silence]
00:56:05.760 | Is that?
00:56:06.400 | [silence]
00:56:10.160 | That's not quite how it works, is it?
00:56:12.000 | It's going to...
00:56:12.480 | [silence]
00:56:15.520 | It's going to go through each of the unique things on the left.
00:56:18.720 | [silence]
00:56:26.480 | And the right-hand side is...
00:56:28.560 | [silence]
00:56:37.360 | Yeah, the problem has been entered in that order, right?
00:56:39.520 | [silence]
00:56:41.680 | That's why I actually quite long my answer.
00:56:44.000 | [silence]
00:56:47.040 | So actually, it really makes you think about how to approach the problem.
00:56:51.600 | I think it achieved the purpose of how to use the patient as a tool so forth.
00:56:58.560 | [silence]
00:57:02.160 | And I've got a bad solution.
00:57:03.760 | If we do both arguments, we could use that rank up and rank down the...
00:57:08.080 | I don't know, the Christmas tree looking ones to sort it.
00:57:12.400 | And then just select the last column of that.
00:57:15.520 | [silence]
00:57:16.320 | We haven't actually used those yet, but yeah, okay.
00:57:19.760 | [silence]
00:57:20.880 | There should be an easier way, I would think.
00:57:22.560 | [silence]
00:57:26.960 | All right, well, we can get it in the wrong order.
00:57:30.320 | [silence]
00:57:36.000 | Fine.
00:57:36.500 | [silence]
00:57:38.240 | And so the particular order that's going to be in is going to be...
00:57:41.280 | [silence]
00:57:43.680 | AGCT and the order we want is...
00:57:48.160 | Wait, what do we want is ACGT.
00:57:50.320 | [silence]
00:57:52.320 | Oh, AGCT, slightly wrong.
00:57:55.280 | [silence]
00:58:00.240 | Yes, we could sort that list before we send it in.
00:58:02.880 | So if we did...
00:58:04.640 | [silence]
00:58:06.720 | Oh, because that's just sorted.
00:58:09.920 | Yeah, so we could just sort that.
00:58:11.840 | That's true.
00:58:13.440 | And the way we sort things, it's like a grade thing, right?
00:58:20.720 | [silence]
00:58:21.920 | Yeah, it's to the left of Iota.
00:58:23.760 | Looks like a Christmas tree, yeah, there.
00:58:26.400 | Oh, I see. This is how you sort things, is it?
00:58:28.240 | [silence]
00:58:29.440 | Yeah, now it returns the index locations that you should...
00:58:35.120 | You have to index in.
00:58:36.480 | It doesn't actually sort the list, it returns the...
00:58:39.520 | And so then you need to use the squash quad to get back to the correct values.
00:58:47.120 | So it's not...
00:58:47.760 | [silence]
00:59:03.280 | Is there something like...
00:59:09.280 | [silence]
00:59:12.480 | Uh-huh.
00:59:12.960 | This is, this only vaguely rings a bell.
00:59:18.880 | But when we did Iota...
00:59:22.240 | [silence]
00:59:31.440 | dyadic, yeah, tells you index of...
00:59:35.360 | [silence]
00:59:40.880 | So this is the location of each of these things.
00:59:50.640 | [silence]
00:59:59.520 | I don't know if that helps.
01:00:00.640 | [silence]
01:00:09.360 | So, I mean, I guess what would we do with this?
01:00:11.680 | We could somehow get a sum by each unique number,
01:00:16.240 | and then use the quad equals to pair that up with a CGT.
01:00:24.080 | [silence]
01:00:26.640 | Maybe, kind of making stuff up.
01:00:29.840 | I don't know if that'll work, but...
01:00:31.120 | [silence]
01:00:35.360 | That's the order we want.
01:00:36.720 | [silence]
01:00:49.040 | All right.
01:00:49.440 | Well, I might leave it for now.
01:00:51.200 | I think it's an interesting question again to think about.
01:00:53.600 | [silence]
01:01:00.800 | I mean, that's why we're trying to do all the glyphs.
01:01:03.600 | Is it until you know all the glyphs?
01:01:05.600 | We don't have the, yeah, the raw stuff we want.
01:01:13.040 | [silence]
01:01:15.600 | Why can't we just sort the...
01:01:17.440 | [crosstalk]
01:01:18.480 | Yeah, go on.
01:01:19.040 | Sorry, Tanishka.
01:01:20.240 | [silence]
01:01:20.960 | Why can't we just sort the array, and then do it on the sorted array?
01:01:27.840 | We can.
01:01:28.800 | We just haven't learned the glyphs to sort with yet.
01:01:31.200 | Oh, okay, okay.
01:01:32.080 | [silence]
01:01:42.960 | They suggest using outer product.
01:01:46.800 | [silence]
01:01:49.680 | Well, maybe that's worth thinking about too.
01:01:51.920 | So outer product.
01:01:54.400 | [silence]
01:01:57.680 | So we would have AGCT down the left.
01:02:00.880 | [silence]
01:02:02.880 | And so if we did like outer product of...
01:02:08.720 | [silence]
01:02:10.160 | Oh, I can see how they're going to do that.
01:02:13.360 | So outer product is jot dot, so if I do jot dot comma...
01:02:26.400 | [silence]
01:02:36.800 | Right, there's that.
01:02:39.200 | Oh, okay.
01:02:40.560 | So if instead I use equals, there's that, right?
01:02:47.680 | [silence]
01:02:51.200 | There's that.
01:02:51.760 | [silence]
01:02:55.280 | Awesome.
01:02:55.760 | [silence]
01:02:57.120 | Okay.
01:02:57.440 | [silence]
01:03:01.360 | Now, again, it'd be nice to do this tacitly, but I don't know how.
01:03:08.800 | So this is going to be ACGT, and then we're going to have the thing that they're passing in.
01:03:19.600 | [silence]
01:03:26.720 | Let me say it'd be nice to do it tacitly.
01:03:28.800 | Do you know of any reason why the tacit stuff is better?
01:03:35.760 | [silence]
01:03:39.280 | Okay, so that's like asking, "Is wildcard import in Python better?"
01:03:44.880 | That's like a can of worms.
01:03:46.960 | [laughs]
01:03:48.400 | Yeah, I asked that on the APL Discord, and I realized...
01:03:51.200 | Oh, there you go.
01:03:52.240 | Okay.
01:03:52.560 | Not a helpful question for me to ask.
01:03:54.880 | I was hoping I could get a better answer here.
01:03:57.760 | [silence]
01:03:58.240 | Hello, Americans.
01:03:59.280 | What do you guys think of gun control?
01:04:01.200 | [laughs]
01:04:05.200 | Yeah, that was about the reaction I got.
01:04:07.440 | Yeah.
01:04:08.000 | Okay.
01:04:08.560 | So there was an early array cast with Henry Rich,
01:04:12.160 | who's the guy who mainly implements or almost entirely implements J nowadays.
01:04:17.040 | And he said he basically never...
01:04:18.640 | Not never, but he very rarely uses tacit programming.
01:04:21.120 | The tacit meaning without the curly braces and omegas and whatnot.
01:04:25.360 | [silence]
01:04:31.600 | So that's one point of view.
01:04:33.840 | Aaron Hsu, who is the creator of Code Defunds, the GPL compiler written in /4APL,
01:04:39.760 | uses a lot of tacit programming.
01:04:42.400 | So Henry Rich's view was like, "Oh, it's too hard, and it gets just too complicated,
01:04:47.600 | and so I don't want to do that."
01:04:49.680 | Or else Aaron's view was like, "Well, you know, I want my APL to look like APL,
01:04:55.360 | and I can kind of create nice, small, neat idioms, and I can combine them together."
01:04:59.760 | [silence]
01:05:04.160 | The kind of overall sense I get from listening to array cast is
01:05:08.800 | a lot of people seem to feel like stringing together four or five
01:05:13.840 | functions and operators is perfectly reasonable and normal.
01:05:18.400 | And if you go too much past that, it starts to get confusing.
01:05:21.760 | So I don't know.
01:05:24.480 | I mean, Aaron seems like a particularly smart guy who's particularly good at APL
01:05:29.520 | and writes a lot of it, and so might be just one of these comfort things that
01:05:33.440 | at some point at which tacit functions are easy.
01:05:37.520 | One of the benefits of tacit functions is that they're invertible.
01:05:41.760 | So you can use the negative power operator to get the inverse.
01:05:51.680 | Roger Hui, who implemented a lot of dialogue,
01:05:55.040 | apparently he preferred defunds, and a lot of the
01:06:03.360 | faster idiomatic versions in APL are only faster if you use defunds.
01:06:10.000 | [silence]
01:06:16.800 | For me, it's more like...
01:06:17.840 | [crosstalk]
01:06:18.720 | Reference, I guess, mostly.
01:06:20.880 | But the reason I wanted to do it was just to test my understanding of APL.
01:06:26.080 | Gotcha.
01:06:27.760 | Like, I think it's a useful exercise to try it,
01:06:31.920 | particularly because I'm really bad at understanding how these things are kind of
01:06:34.800 | passed and strung together.
01:06:36.240 | I'm just looking at this now where we're post-processing
01:06:44.960 | something, and then this is applied diatically.
01:06:50.400 | Yeah, yeah, I don't know.
01:06:59.920 | Submit.
01:07:01.920 | Oh, consider cases like A as a right argument.
01:07:10.000 | [silence]
01:07:34.160 | Ah, yeah.
01:07:34.640 | [laughs]
01:07:36.560 | That's a problem.
01:07:37.360 | [silence]
01:07:41.120 | So if you think about the outer product, well, you can see it.
01:07:44.880 | [silence]
01:07:51.840 | Why doesn't that work?
01:07:52.560 | Oh, can't plus/slash that, of course.
01:07:55.200 | You don't have each of the rows represented there.
01:08:05.520 | So, yeah, edge cases don't work.
01:08:09.280 | Anyway, I feel like we've had a good go at it.
01:08:14.320 | Interesting to hear what you folks find.
01:08:17.040 | [silence]
01:08:25.760 | That would also probably be an issue with the other approach of using the key.
01:08:30.320 | Right?
01:08:33.760 | Like if we were to sort the array and then use key on it,
01:08:36.560 | it would probably have a same issue.
01:08:39.120 | Well, you kind of want the left-hand side
01:08:43.600 | to be ACGT or something, and then...
01:08:49.680 | [laughs]
01:09:00.080 | I guess you could look at ACGT, check if it's a member of your
01:09:05.440 | in your string, and if it is not,
01:09:12.240 | then it'll give, or I guess I don't know.
01:09:18.720 | Okay, so there's slash, right, which is...
01:09:21.600 | Or was it backslash something?
01:09:24.560 | Where was that thing that was like...
01:09:25.760 | Or was it iota?
01:09:27.920 | Oh, where? iota underbar is where.
01:09:35.040 | iota underbar.
01:09:47.040 | [silence]
01:09:59.440 | If you had just A...
01:10:02.960 | Yeah, no, it still doesn't work.
01:10:14.160 | So you want to go through each of A, C, G, T.
01:10:17.600 | Is it possible to use it just with equals?
01:10:21.760 | So A equals, well, C equals A, and I want to do that...
01:10:31.600 | Is this rank?
01:10:41.280 | Yeah, I want to do that for each thing...
01:10:50.960 | No, for the whole thing on the right, left,
01:10:55.600 | and for each thing on the right.
01:10:56.880 | Can you do something like that?
01:10:57.840 | Oh, that looks interesting, doesn't it?
01:11:07.520 | Can we use epsilon for membership, kind of A, epsilon C?
01:11:11.680 | I don't remember if we've covered epsilon or not.
01:11:13.680 | Well, Iris is thinking, can we just sum this up now?
01:11:23.440 | Now, why did that not work?
01:11:35.920 | I thought it would.
01:11:38.720 | We've got to be a bit careful when we sum it up, but I think...
01:11:46.240 | Gave us the wrong rank.
01:11:51.760 | It's very close to correct, right?
01:11:53.520 | But I think if we do this, it's correct.
01:11:57.120 | So I think what we need to make sure is just that the rank...
01:12:01.920 | Okay, so...
01:12:08.080 | Consider these.
01:12:15.600 | Here's the problem.
01:12:17.360 | This is a vector.
01:12:19.600 | It's not a matrix with one row.
01:12:23.040 | So that's interesting.
01:12:25.840 | Oh, because that's not a list of characters, right?
01:12:31.200 | That's a character scalar.
01:12:33.920 | But that's okay, because I would guess that they would
01:12:36.560 | actually make it a list containing the single letter A.
01:12:39.440 | I guess ideally we'd be able to use...
01:12:43.520 | I guess I don't think row works this way,
01:12:47.120 | but we would use row to reshape to four columns.
01:12:52.080 | And in terms of rows, kind of do like the numpy negative one.
01:12:57.040 | I actually think we've already solved it.
01:13:00.480 | I actually think, you know, I need to write this to say a list containing the letter A.
01:13:05.840 | Oh, that'd be the left...
01:13:09.920 | The problem is that this is a scalar.
01:13:11.680 | Gotcha.
01:13:13.760 | So I think actually my test was wrong.
01:13:17.120 | So actually, I think we've got the answer.
01:13:20.240 | So I think that...
01:13:28.720 | And then I think it should be a case of making that into a function.
01:13:37.040 | Okay.
01:13:43.540 | So we've actually ended up not using any of their suggestions,
01:13:50.240 | which makes me think that there's a better way to do this.
01:13:52.560 | But that's okay.
01:13:55.200 | Okay.
01:13:55.700 | Test.
01:14:00.980 | So it looks like that last example...
01:14:10.720 | I would say it is this.
01:14:11.760 | I think they are pasting in a...
01:14:15.120 | Yeah.
01:14:16.720 | And that last example, we can see that.
01:14:18.720 | Can you put...
01:14:20.240 | Can we do like an enclosed left shoe?
01:14:24.560 | Is that how you do it?
01:14:25.600 | Can we just also just...
01:14:27.440 | You could just make it a list by...
01:14:28.640 | Could you just do like comma and then again empty string?
01:14:31.920 | Oh, just direct comma before it.
01:14:33.680 | Look at you.
01:14:38.080 | All right.
01:14:39.780 | Nice.
01:14:41.220 | Yeah, yeah, yeah.
01:14:42.960 | Look at you.
01:14:43.440 | So yeah, comma is in list, isn't it?
01:14:50.000 | Or ravel?
01:14:50.720 | Is that ravel?
01:14:51.360 | Ravel, I think, yeah.
01:14:53.680 | Ravel.
01:14:54.180 | Nice one, Tanish.
01:14:56.560 | I need a bit better at using comma.
01:15:02.160 | I think I end up like using the enclosure too much
01:15:06.400 | and then having to like do a bunch of reshapes
01:15:08.560 | and then so that's good for me to keep in mind.
01:15:11.760 | All right.
01:15:13.440 | Perfect.
01:15:14.900 | That was fun.
01:15:21.040 | That was actually fun.
01:15:22.000 | It was.
01:15:23.220 | Um, the only other thing I'm thinking is like
01:15:27.780 | maybe we'll split this.
01:15:28.980 | I think this notebook's getting too long,
01:15:30.740 | particularly because the kernel's so slow for dialogue.
01:15:33.860 | So I might split it into three.
01:15:38.740 | Being like operators.
01:15:42.500 | The first stuff and then operators
01:15:49.220 | and then we'll do an APL competition one.
01:15:52.260 | So anyway, look out for that when I send it in.
01:15:55.860 | Won't necessarily do that in the hierarchy though
01:15:59.700 | because I have a course to release.
01:16:01.620 | All right.
01:16:03.080 | Thanks all.
01:16:06.760 | Have a good one.
01:16:10.260 | [BLANK_AUDIO]