back to indexfast.ai APL study session 10
00:00:39.360 |
>> Doing good. Got another blog post out so that always feels good. 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:10.560 |
>> I just moved away from Minnesota about a year ago. 00:01:15.040 |
What part of Minnesota are you in? >> In the Twin Cities area. 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:32.880 |
seven years and moved last year. >> I went to college in Duluth, actually. 00:01:48.000 |
How's the weather in Australia? >> Not very good today. 00:01:54.320 |
Best time in a while, it's, yeah, really not very good. 00:01:59.040 |
>> Is it raining? >> Yeah, you see it raining? 00:02:14.320 |
>> I saw that it looks like the course is coming along in terms of getting it ready. 00:02:25.120 |
not too terrifying. It's like, good to have things finished, but then, 00:02:32.240 |
it's like, what if people hate it? So, hopefully, people don't hate it. 00:02:40.560 |
>> Were those pictures all Dali 2-generated? >> Uh-huh, yeah. 00:02:45.920 |
>> Did you try with Dali Mini instead? >> No. 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.400 |
>> Yeah, it was, but it's also like, much less trained. So, it's not normally very good. 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: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:57.840 |
All right, this picture is sick, so I'm, hopefully you will be okay. 00:04:20.480 |
>> I posted a kind of a statistics blog post and APL on the forum a little bit ago. 00:04:39.280 |
>> We were just talking about that a little bit. It's very interesting going through that. 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: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: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:58.640 |
Online access for $10. You need the $30 Dover edition. 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:37.840 |
Oh, was it so solutions manual? Oh, my gosh. Okay. Right. Hardcover $363. 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: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: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: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: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: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:21:12.400 |
This to be the dyadic one, and then you want to post process it with plus slash. 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:06.960 |
You want X equals Y and then post process with plus equals. 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:23:11.200 |
Okay, F equals plus slash and what's this button? 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:25.120 |
And I believe not is Tilda. I think I saw that on the news. 00:25:12.160 |
And then that's what is applied to the whole thing. 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:59.120 |
I think you said you have to log in for you to save your correct answer if you. 00:26:05.680 |
You can submit now and then you can put the trophy. 00:26:11.280 |
Yeah, I just found very fun and busy and I can learn and practice. 00:26:18.000 |
So, so your list of things were the things that they were saying would be needed. 00:27:41.840 |
I feel like I've heard people talk about Key a few times. 00:28:36.080 |
I really wish this bookmarklet gave the whole hover over that the dialogue editor gave you, 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: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: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: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:03.280 |
I think it's okay if we look at how to do some of the phase one stuff together. 00:30:13.040 |
Yeah, I can say it's okay if we just walk through. 00:30:31.920 |
So, right argument that's a character vector representing DNA string and we want to count 00:30:45.120 |
So maybe we should start with like banana and count each symbol banana. 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:22.400 |
I see, and here they've got a function which is just inserting colon between things. 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:33:12.240 |
So, this banana example might be an even simpler one, that one potentially. 00:33:26.480 |
I guess it's basically the same thing, but... 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:26.800 |
These are the positions of, it's kind of slightly backwards to what I expect. 00:34:38.080 |
Oh, and they're in, maybe it would be easier actually if we did... 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:03.360 |
Though the I in mine is not an iota, so it should be. 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:37:02.720 |
I think it will pass the iota six on both sides of it 00:37:07.680 |
I think the iota six will be alpha and omega. 00:37:22.160 |
Gosh, I thought you meant only something on the right side of the quad equals, 00:37:35.040 |
I wonder how you can do this without the D funds. 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: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: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:07.040 |
The K operator applies the function to each unique key. 00:39:14.160 |
It's the same as this, but we haven't done this yet, have we? 00:39:24.000 |
Maybe we should do that because it actually comes up quite a lot. 00:39:53.760 |
Presumably the dyadic form of this is not match, it is, so that's easy. 00:41:04.240 |
Oh, we haven't done equal underbar yet either. 00:41:41.040 |
That's interesting, now why are these different? 00:42:19.280 |
I wish they had the simplest possible examples first. 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:11.440 |
Which presumably there might be one somewhere to get that using the rank operator and not equals. 00:43:36.480 |
So one is equal to one and one is equal to one. 00:43:57.680 |
Um, is there somewhere to say, okay, we want to take the... 00:44:06.400 |
Left hand side is a scalar and the right hand side is a vector. 00:44:21.600 |
Okay, I guess I don't know how to do that then. 00:44:26.800 |
Anyways, so I guess I think this is fair enough. 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: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: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:56.800 |
Yeah, I was trying to get that to be the same as the 00:46:44.560 |
who are remembering that this is how you get counts, 00:46:50.000 |
It looks like tallying stuff on a whiteboard or a chalkboard or whatever. 00:47:03.040 |
So that should be, that's three, got three things. 00:47:29.520 |
Yeah, so imagine rotating that by 90 degrees. 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: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:05.920 |
And in the case where it's not always two, then it makes it negative. 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:40.720 |
Uniform depth, if all its items are the same depth. 00:50:02.160 |
Okay, so I guess that's, hopefully gets us back to where we were, 00:50:13.120 |
Oh, we were doing quad equal, and I guess that mentions, 00:50:28.000 |
here. Okay, so that is the number of elements in Y. 00:50:42.880 |
So this is iota of the number of elements of A. 00:50:51.920 |
Yes, iota six is iota of the number of elements of A. 00:51:10.880 |
Did we want to have a go at trying to do this thing? 00:51:21.920 |
So to jump back, I just looked at what that quadML does. 00:51:26.800 |
Kind of cool, kind of don't think I'll ever use it. 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:41.200 |
And apparently you can change which definition you're using. 00:51:56.560 |
It's the little C, I think it's called left shoe. 00:52:06.160 |
I guess we'll come back to that, then we look at that cliff then. 00:52:20.880 |
So if we did this quady thingy, what's it called? 00:52:36.240 |
That tells us the locations of each of these things. 00:53:12.000 |
So do we need to have a function and apply tally only to the Omega argument? 00:53:23.440 |
Was it like doing it diatically or something like... 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:57.840 |
So we need the tally to apply to the Omega, but not the Alpha, right? 00:54:37.120 |
Is there a better way to say we want the monadic version? 00:54:51.600 |
Did you come across a shorter answer to this, Serato? 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:36.080 |
Which I think is easily fixed by telling it what order we want it in. 00:56:15.520 |
It's going to go through each of the unique things on the left. 00:56:37.360 |
Yeah, the problem has been entered in that order, right? 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: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:16.320 |
We haven't actually used those yet, but yeah, okay. 00:57:20.880 |
There should be an easier way, I would think. 00:57:26.960 |
All right, well, we can get it in the wrong order. 00:57:38.240 |
And so the particular order that's going to be in is going to be... 00:58:00.240 |
Yes, we could sort that list before we send it in. 00:58:13.440 |
And the way we sort things, it's like a grade thing, right? 00:58:26.400 |
Oh, I see. This is how you sort things, is it? 00:58:29.440 |
Yeah, now it returns the index locations that you should... 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:59:40.880 |
So this is the location of each of these things. 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:51.200 |
I think it's an interesting question again to think about. 01:01:00.800 |
I mean, that's why we're trying to do all the glyphs. 01:01:05.600 |
We don't have the, yeah, the raw stuff we want. 01:01:20.960 |
Why can't we just sort the array, and then do it on the sorted array? 01:01:28.800 |
We just haven't learned the glyphs to sort with yet. 01:02:13.360 |
So outer product is jot dot, so if I do jot dot comma... 01:02:40.560 |
So if instead I use equals, there's that, right? 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:28.800 |
Do you know of any reason why the tacit stuff is better? 01:03:39.280 |
Okay, so that's like asking, "Is wildcard import in Python better?" 01:03:48.400 |
Yeah, I asked that on the APL Discord, and I realized... 01:03:54.880 |
I was hoping I could get a better answer here. 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: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:33.840 |
Aaron Hsu, who is the creator of Code Defunds, the GPL compiler written in /4APL, 01:04:42.400 |
So Henry Rich's view was like, "Oh, it's too hard, and it gets just too complicated, 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: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: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:20.880 |
But the reason I wanted to do it was just to test my understanding of APL. 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: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:07:01.920 |
Oh, consider cases like A as a right argument. 01:07:41.120 |
So if you think about the outer product, well, you can see it. 01:07:55.200 |
You don't have each of the rows represented there. 01:08:09.280 |
Anyway, I feel like we've had a good go at it. 01:08:25.760 |
That would also probably be an issue with the other approach of using the key. 01:08:33.760 |
Like if we were to sort the array and then use key on it, 01:09:00.080 |
I guess you could look at ACGT, check if it's a member of your 01:10:14.160 |
So you want to go through each of A, C, G, T. 01:10:21.760 |
So A equals, well, C equals A, and I want to do that... 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:38.720 |
We've got to be a bit careful when we sum it up, but I think... 01:11:57.120 |
So I think what we need to make sure is just that the rank... 01:12:25.840 |
Oh, because that's not a list of characters, right? 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: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:13:00.480 |
I actually think, you know, I need to write this to say a list containing the letter A. 01:13:28.720 |
And then I think it should be a case of making that into a function. 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:14:28.640 |
Could you just do like comma and then again empty string? 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:23.220 |
Um, the only other thing I'm thinking is like 01:15:30.740 |
particularly because the kernel's so slow for dialogue. 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