WEBVTT
00:00:14.160 --> 00:00:18.640
Welcome to episode 127 of Arraycast.
00:00:18.640 --> 00:00:22.480
I am your host, Connor, and today with us we have two panelists.
00:00:22.480 --> 00:00:24.879
I guess we can actually call that a panel.
00:00:24.879 --> 00:00:31.440
I've got Adam and Rich with us, so we're gonna go around and do brief introductions, and after that, we'll have uh a couple announcements, maybe just one.
00:00:31.440 --> 00:00:33.359
So we'll start with Adam and then we'll go to Rich.
00:00:34.320 --> 00:00:44.000
Right, I'm Adam Bossewski, and I do lots of APL things at Dialog Limited, where they gave me the title Head of Language Design 2.
00:00:44.640 --> 00:00:46.000
I'm Rich Park.
00:00:46.000 --> 00:00:50.880
I also do some APL things, uh including training and media at Dialogue Limited.
00:00:51.200 --> 00:00:54.479
And as mentioned before, my name's Connor, host of ArrayCast.
00:00:54.479 --> 00:00:59.679
Massive fan of all the array languages, and I think that's it for introduction.
00:00:59.679 --> 00:01:03.280
So I believe we've got just the one announcement, and we'll go over to Rich for that.
00:01:03.679 --> 00:01:15.120
Yeah, so this spring we hosted the Dialogue North America user meeting in New York, and recently we've been releasing recordings of the presentations from that conference.
00:01:15.120 --> 00:01:20.079
So if you go to the Dialogue User Meeting YouTube channel, I'm sure we'll put links in the appropriate places.
00:01:20.079 --> 00:01:28.400
Uh, you can watch presentations from myself and a couple of other dialogue people and some users as well.
00:01:28.799 --> 00:01:29.120
Awesome.
00:01:29.120 --> 00:01:30.319
Yeah, I've seen a couple of those.
00:01:30.319 --> 00:01:33.439
I know I've bookmarked at least one of them.
00:01:33.439 --> 00:01:37.200
I think it was by Asher, but I could be wrong about that.
00:01:37.200 --> 00:01:42.480
I think he gave a talk on the latest and greatest things in dialogue APL.
00:01:42.480 --> 00:01:43.280
Probably most.
00:01:43.280 --> 00:01:45.280
Did he give a couple talks?
00:01:45.680 --> 00:01:53.439
Uh he did one that was sort of uh APL primitive developments um this century.
00:01:53.439 --> 00:02:01.599
And then leading up to the enhancements in dialogue version 20, which does include more than just primitives, but yeah.
00:02:02.000 --> 00:02:03.040
I can't remember which one I have.
00:02:03.040 --> 00:02:05.760
I've got them in a Google Doc.
00:02:05.760 --> 00:02:13.680
I love the feature in Google Doc where you you paste a link and then half a second later the YouTube icon with the name of the video replaces that link if you hit tab.
00:02:13.680 --> 00:02:23.599
Anyways, we will link those two talks, plus any of the other Dyna Talks that have come out if you weren't in New York for that uh meeting.
00:02:23.599 --> 00:02:28.240
And you can watch them on your own time, leave comments, get your questions answered.
00:02:28.240 --> 00:02:35.039
And with that announcement out of the way, I believe today, as we have been doing for the last couple episodes, we are going to live code some APL.
00:02:35.039 --> 00:02:41.360
I'm acting we actually didn't discuss is it gonna be Rich or is it gonna be Adam that's gonna screen share who's gonna who's gonna go first?
00:02:41.360 --> 00:02:45.280
Or maybe I'll just throw the problem out there and then whoever's more excited can screen share first.
00:02:45.280 --> 00:02:47.439
So I don't actually know.
00:02:47.439 --> 00:02:50.319
I guess you know, we we could be more prepared on this podcast.
00:02:50.319 --> 00:02:57.360
It's another Pearl Weekly Challenge, and I remember the problem very distinctly, uh, but I don't actually know the number.
00:02:57.360 --> 00:03:01.439
I think it was not today's because they usually drop on Mondays, but last week's.
00:03:01.439 --> 00:03:15.520
And the problem description is you're given a string, for instance, banana, and you're asked to sum the maximum count of a vowel, like the most frequent vowel and the most frequent consonant.
00:03:15.520 --> 00:03:19.360
Some sum the count of the most frequent vowel and the most frequent consonant.
00:03:19.360 --> 00:03:19.919
Yes.
00:03:19.919 --> 00:03:24.719
So for instance, if you have banana, that's what three A's and two N's?
00:03:24.719 --> 00:03:26.479
So the answer would be five.
00:03:26.479 --> 00:03:34.000
And you don't care about the B, because the frequency count of the B is one, and that's exceeded by the frequency count of the N, which is two.
00:03:34.000 --> 00:03:44.560
And if you've got a string like A B C, the answer is just going to be two, because you've got one B, one C for the consonants, one vowel, which is one plus one equals two.
00:03:44.560 --> 00:03:55.280
So a rather simple problem to state, and there's a lot of utilities in the array languages for generating alphabets and whatnot.
00:03:55.280 --> 00:04:00.479
But the interesting thing is that you have to split the vowels from the consonants, right?
00:04:00.479 --> 00:04:03.120
And need to keep the vocabulary.
00:04:03.120 --> 00:04:07.120
Yeah, we talked about that on the previous episode.
00:04:07.120 --> 00:04:11.680
So, anyways, now I get to kick my feet up and throw it over to both of you.
00:04:11.680 --> 00:04:13.039
I'm not sure.
00:04:13.039 --> 00:04:13.680
Yeah.
00:04:13.680 --> 00:04:15.120
Think a little bit.
00:04:15.120 --> 00:04:17.600
Or we can yeah, we can just chat before we show code.
00:04:17.600 --> 00:04:18.959
Or we don't even need to show code.
00:04:18.959 --> 00:04:22.240
We can make this an audio-friendly episode, which I'm sure we won't.
00:04:22.879 --> 00:04:24.160
Purely in the brain.
00:04:24.160 --> 00:04:29.360
Um, I mean, the first thing that's going to my mind is yeah, it's like you said.
00:04:29.839 --> 00:04:30.959
There's a definition question.
00:04:30.959 --> 00:04:33.600
Again, they're not so well spec'd, or at least not the way you described it.
00:04:33.600 --> 00:04:41.360
What happens if the if there's a word like uh where you have the same number uh of two different letters?
00:04:42.000 --> 00:04:46.480
Uh it doesn't matter because you you're only caring about the count, not the value.
00:04:46.800 --> 00:04:57.040
Yeah, but if it's the equal number of yeah, if the equal numbers of A's and E's, then do you need to count both of them, or is just how many there are one of them?
00:04:57.439 --> 00:05:05.199
No, like think about it as creating a frequency count of A E I O U, and then you just do a max across those.
00:05:05.199 --> 00:05:05.839
Okay.
00:05:05.839 --> 00:05:06.800
Yeah.
00:05:06.800 --> 00:05:26.240
So I guess actually that that comes from my let's see, I went to week 380, and the problem, the exact problem description is you're given a string consisting of English letters, write a script to find the vowel and consonant with maximum frequency, return the sum of two frequencies.
00:05:26.240 --> 00:05:28.959
I'm sure it should say, of those two frequencies.
00:05:29.360 --> 00:05:35.920
And there's also a question of what is a constant, what is a uh a consonant and what is a vowel, but okay.
00:05:36.560 --> 00:05:45.279
Yeah, let's just assume A E I O U are the vowels, and also it's not actually sorry, just just do one in lowercase.
00:05:45.279 --> 00:05:45.839
Yeah, yeah.
00:05:45.839 --> 00:05:50.160
It doesn't state it in the problem, but all the examples are lowercase, so I assumed lowercase.
00:05:50.160 --> 00:05:55.360
And it's an uninteresting complication to the problem, anyways, even if it were upper and lower.
00:05:55.680 --> 00:05:57.199
So I have I have a solution.
00:05:57.199 --> 00:06:02.879
I don't know if it's if it's good or not, but uh it is a solution that I can show.
00:06:02.879 --> 00:06:05.040
I can build it up if you want me to.
00:06:05.040 --> 00:06:06.399
Sounds like a plan.
00:06:06.399 --> 00:06:12.000
Okay, so let me just arrange my window here to kinda be like this.
00:06:12.000 --> 00:06:21.519
Okay, and then I need to share my screen and see if I can find the right one.
00:06:22.000 --> 00:06:30.160
And Asher says in the chat that he enjoyed this problem because they got to use their new favorite fork.
00:06:30.160 --> 00:06:30.560
Okay.
00:06:30.560 --> 00:06:33.600
Will we find our way to Asher's favorite fork?
00:06:33.600 --> 00:06:37.519
Stay tuned on episode 127 of a ray cast.
00:06:38.160 --> 00:06:40.959
So so I can build this up uh piece by piece.
00:06:40.959 --> 00:06:42.160
Here's the text.
00:06:42.160 --> 00:06:50.160
And what I would like to do then is for now, let's just look at the frequencies of the letters.
00:06:50.160 --> 00:06:51.839
So we do that with key.
00:06:51.839 --> 00:07:00.000
But we don't since we're going to look at uh consonants and vowels separately, we don't care which letter they are, then we can just look at the the frequencies themselves.
00:07:00.000 --> 00:07:06.319
I mean, we know this doesn't give us the information what they are, and this is just on the top like that.
00:07:06.319 --> 00:07:10.000
So saves a bit of framing there.
00:07:10.000 --> 00:07:13.120
Um and we want the maximum of that.
00:07:13.120 --> 00:07:19.519
But again, this is just looking at all the letters, but this is what we want to do on the vowels and on the consonants separately.
00:07:19.519 --> 00:07:31.120
So we can get the vowels by taking the intersection of the text with A E I O U, and we can get the consonants by removing the vowels.
00:07:31.120 --> 00:07:33.040
So we just need to sum all of that.
00:07:33.040 --> 00:07:37.439
We can build that up as a um as a nice over fork.
00:07:37.439 --> 00:07:53.279
Um, so we want to have the without uh plus over this thing here, so plus over the max of the tele key, we could call it over the intersection.
00:07:53.279 --> 00:07:57.519
And we want to bind that with a right argument of AEIO.
00:07:57.519 --> 00:08:00.319
So that means this is how the fork works.
00:08:00.319 --> 00:08:05.839
We get AIOU as a right argument of the intersection and as the right argument of the without.
00:08:05.839 --> 00:08:09.759
And then we sum the results, but of course they're the sets of characters.
00:08:09.759 --> 00:08:15.199
So before we sum them, we apply the max of the talia top right key on it.
00:08:15.199 --> 00:08:20.160
So this is this is the function, and we should apply that on button on the text.
00:08:20.160 --> 00:08:21.279
We have that already.
00:08:21.279 --> 00:08:22.399
We get five.
00:08:23.519 --> 00:08:24.639
Does that work though?
00:08:24.639 --> 00:08:26.480
I think there's a bug in that.
00:08:26.879 --> 00:08:27.759
Uh okay.
00:08:27.759 --> 00:08:29.199
What's the problem?
00:08:29.199 --> 00:08:34.720
I mean, there's a problem if we if there aren't any vowels, if there aren't any consonants.
00:08:35.120 --> 00:08:37.200
Uh that's not the problem.
00:08:40.480 --> 00:08:43.360
What about the word mommy?
00:08:43.360 --> 00:08:46.159
Which one of them doesn't make this?
00:08:46.159 --> 00:08:51.519
So it's three M's and one of U R Y, right?
00:08:51.519 --> 00:08:54.240
That's four, as far as I can tell.
00:08:54.559 --> 00:09:01.279
Okay, so I'm misunder I'm misunderstanding, but the bug that I thought is that you're doing without the vowels, but how do you get consonants only?
00:09:01.279 --> 00:09:02.559
That's the intersection.
00:09:02.720 --> 00:09:05.840
That's oh, but no, consonants only is without the vowels.
00:09:05.840 --> 00:09:09.039
Here, look, banana without vowels, B and N.
00:09:09.039 --> 00:09:09.759
Right?
00:09:09.759 --> 00:09:11.440
And and intersection.
00:09:11.440 --> 00:09:15.600
So even though the symbols don't resemble each other, they're sort of complementing each other.
00:09:15.600 --> 00:09:26.960
This one leaves behind from the left argument only the ones that are in the set on the right, and this one leaves behind on the left argument only the ones that are not in the set on the right.
00:09:28.080 --> 00:09:33.360
Well, now we have to have a discussion about these two glyphs, because that is very beautiful.
00:09:33.360 --> 00:09:35.519
And I did not think of that.
00:09:35.519 --> 00:09:39.759
And is this one of those things where I didn't think of it because it's not like symmetric?
00:09:40.080 --> 00:09:50.399
Um because I yeah, my my thing, I did do the without well, the set functions are fairly underutilized, like yeah, people always forget to yeah.
00:09:50.720 --> 00:09:54.480
So one thing I like to do is like the symmetric set difference.
00:09:54.480 --> 00:09:55.919
You can write like this.
00:09:55.919 --> 00:10:10.559
And so the union, that's all of the elements contributed by both arguments, and the intersections are the elements that are in both of them, and all of them without the ones that are in both, that's the symmetric difference.
00:10:10.559 --> 00:10:13.200
That's the ones that are only in one of them, not in the other one.
00:10:13.200 --> 00:10:15.919
And here we can sort of see the symmetries.
00:10:15.919 --> 00:10:20.480
You can even see that this shape is sort of related to these in a nice way.
00:10:20.480 --> 00:10:24.480
It's sort of a mixture of union and intersection symbols.
00:10:24.480 --> 00:10:34.639
So I don't, I mean, they are not symmetric in the sense that all three of them do not treat their left and right arguments the same.
00:10:34.639 --> 00:10:41.200
Without obviously cannot treat this left argument and right the same, where one of them has to be the data set, another one is the ones to remove.
00:10:41.200 --> 00:10:47.200
Intersection and union could have been symmetric, but it's it's more versatile that they're not.
00:10:47.200 --> 00:10:52.480
So they treat the left argument as the data set, just like without those.
00:10:52.480 --> 00:11:10.240
And the right argument is the uh the checking set, the lookup set, that that where we're keeping only the ones that are also in the right, or we take or we're keeping uh only the ones that are sorry, we're adding any that are uh missing that are that's for the union, right?
00:11:10.240 --> 00:11:14.320
And on the intersection, we're keeping only the ones that are also in the right.
00:11:14.320 --> 00:11:18.879
So we can give this a simple nice symbol.
00:11:18.879 --> 00:11:22.320
What uh what kind of solution did you have, Connor?
00:11:23.120 --> 00:11:28.799
Um well, this is like I said at the beginning, I'm always surprised, and this is another great example.
00:11:28.799 --> 00:11:31.759
Uh what's the best way?
00:11:31.759 --> 00:11:36.720
I'll drop it in this chat, and then you can uh am I imagining?
00:11:36.799 --> 00:11:41.840
I'm imagining like do the full keys and then split out.
00:11:42.240 --> 00:11:44.480
Oh wait, I just I just gave you the tiny apple.
00:11:44.480 --> 00:11:47.279
What language is the tiny apple?
00:11:47.679 --> 00:11:50.879
Well, I can try to translate it or go ahead and translate.
00:11:51.039 --> 00:11:55.360
Oh, actually, I did I is this is number one or number two?
00:11:55.360 --> 00:11:57.120
It was number one.
00:11:57.120 --> 00:11:59.919
I mean, I think did I see Madeline?
00:11:59.919 --> 00:12:00.960
Madeline's in the chat.
00:12:00.960 --> 00:12:05.120
Uh I mean also too.
00:12:05.120 --> 00:12:11.440
I can here, I'll give you a RaBox link and then you can uh parse it a little bit better.
00:12:11.440 --> 00:12:12.080
Okay.
00:12:12.480 --> 00:12:22.080
Well, still don't understand how a Raebox can uh can know which valence of primitive that it needs to translate to.
00:12:23.279 --> 00:12:26.559
I'll drop it in the YouTube chat as well.
00:12:26.559 --> 00:12:31.200
I don't know, maybe Madel Madeline can uh give us her solution if she wants.
00:12:31.200 --> 00:12:33.360
Although are you gonna be able to screen share this now?
00:12:33.360 --> 00:12:34.159
I'm not sure.
00:12:34.159 --> 00:12:35.120
Not really.
00:12:35.519 --> 00:12:41.200
Uh I mean I can, but then you're gonna lose uh it doesn't it doesn't actually translate very much.
00:12:41.200 --> 00:12:43.679
It it looks like this when it's translated.
00:12:43.679 --> 00:12:45.759
That's doesn't help.
00:12:45.759 --> 00:12:49.440
Um so it's a so but let's figure out what's going on here.
00:12:49.440 --> 00:12:51.919
Oh, this is the this is that count in or something like that?
00:12:51.919 --> 00:12:53.440
It's histogram, yeah.
00:12:53.440 --> 00:12:56.080
Yeah, so it's it's counting in itself.
00:12:56.080 --> 00:12:59.759
I mean we can define that, but it's basically a type of key.
00:13:00.720 --> 00:13:04.159
Uh yeah, it's a key specialization if you want to think about it like that.
00:13:04.399 --> 00:13:04.879
Yeah.
00:13:04.879 --> 00:13:07.919
Uh Silas asks if we need a quad C.
00:13:07.919 --> 00:13:11.679
I don't know what the problem specification was, so I did it just for lowercase, but yes, of course.
00:13:11.679 --> 00:13:19.440
If uh if it can take any case, then you have to throw a quad C on the right end of my solution.
00:13:19.440 --> 00:13:21.519
But that doesn't change much.
00:13:21.759 --> 00:13:29.679
Yeah, I think we we stated earlier in the in the podcast that well, let's just assume lowercase because the casing adjustment isn't that interesting.
00:13:29.679 --> 00:13:31.759
This doesn't even look right.
00:13:31.759 --> 00:13:49.360
Um but basically the the description of what this is doing is the underbar semicolon is uh pair and quad L is lowercase alphabet, and so we're doing C quad A and oops, quad C quad A.
00:13:49.600 --> 00:13:49.919
Yeah.
00:13:49.919 --> 00:13:56.320
And then we're we're binding that binding that with uh with the without.
00:13:56.320 --> 00:13:57.200
Yeah.
00:13:57.200 --> 00:14:00.159
And we're doing that on the left argument.
00:14:00.159 --> 00:14:08.000
So that's so this is uh this is a form here with all the right like that with a e i o u.
00:14:08.000 --> 00:14:13.600
But then um but then we are counting in each.
00:14:13.600 --> 00:14:14.960
Oh, okay.
00:14:14.960 --> 00:14:17.679
Oh, okay, I see what you mean.
00:14:17.679 --> 00:14:18.399
Right.
00:14:18.399 --> 00:14:32.159
So you you you have the vowels, the set of vowels, you have the set of um of letters, um, and then we're removing the set the vowels from the letters that gives us the consonants.
00:14:32.159 --> 00:14:53.200
Now we've got the consonants and uh and the vowels, and so for each one of them we uh want to remove, I believe, uh oh, for each one of them we're counting uh that's what it's doing, we're counting the occurrences in the entire um argument, and then we're taking the maximum of that.
00:14:53.200 --> 00:15:08.480
Okay, so I can I can restate this as we we do with it with uh so if we so the first thing is to generate the list of vowels and and uh we can write like this quad a quad C A I O U.
00:15:08.480 --> 00:15:10.240
This gives us the consonants.
00:15:10.240 --> 00:15:16.720
So um, and then we can pair this up with itself.
00:15:16.720 --> 00:15:26.480
So this is where we want comma over enclose um and we want uh behind here.
00:15:26.480 --> 00:15:29.759
This is not gonna work quite well, but let's just do it like this for now.
00:15:29.759 --> 00:15:32.000
Does this work?
00:15:32.000 --> 00:15:34.320
Uh what am I doing wrong here?
00:15:34.320 --> 00:15:35.200
Oh, okay.
00:15:35.200 --> 00:15:36.639
Sorry, I forgot the binding thing.
00:15:36.639 --> 00:15:41.200
But why is the without it's without yeah, judge without there you go.
00:15:41.200 --> 00:15:47.279
This is the consonants.
00:15:47.279 --> 00:15:49.679
We want that here.
00:15:49.679 --> 00:15:53.840
The problem is we need this, so it's better to do it like this.
00:15:53.840 --> 00:15:59.120
Okay, this gives us the uh the consonants and the vowels.
00:15:59.120 --> 00:16:10.399
Um and now uh for each of them we want to count the the occurrences of all of them in uh in the original.
00:16:10.399 --> 00:16:13.200
So let's just call this consonants and vowels.
00:16:13.200 --> 00:16:15.600
It's easier like to deal with like this.
00:16:15.600 --> 00:16:16.320
Right.
00:16:16.320 --> 00:16:25.840
So then we can say consonants and vowels, and we'll since we don't have the frequency count thing, we'll just do an outer product with the enclosed text.
00:16:25.840 --> 00:16:32.159
So this gives us this uh frequency table for each one of them, and then we can sum there.
00:16:32.159 --> 00:16:41.039
So if you bind this together for each of them, this gives us uh the sums for each one of them, and if you want the maximum, we can do that as well.
00:16:41.039 --> 00:16:43.679
Oh that doesn't work.
00:16:43.679 --> 00:16:46.960
Ah too many atops.
00:16:46.960 --> 00:16:52.080
So we use an inner product here, uh no.
00:16:52.080 --> 00:16:54.799
Okay, so one plus there.
00:16:54.799 --> 00:17:00.240
Okay, so this is this is the maximum uh occurrence of each one, right?
00:17:00.240 --> 00:17:04.640
Because there are two N's and three A's, and then we just need to uh sum all of that.
00:17:04.640 --> 00:17:08.160
That's that's essentially what's happening here.
00:17:08.160 --> 00:17:15.599
And the the thing about creating the consonants and vowels, that's just that's just a constant thing that gets bound inside the train.
00:17:15.599 --> 00:17:19.599
But it's largely the same thing as using key.
00:17:19.599 --> 00:17:30.960
What I did was I I gave key an operand that just counts the occurrences, right?
00:17:30.960 --> 00:17:37.920
So instead of doing doing this, we can literally replace this with um tally atop.
00:17:37.920 --> 00:17:45.519
This gives us um oh no, okay.
00:17:45.519 --> 00:17:47.200
We don't yeah, that's the problem with it.
00:17:47.200 --> 00:17:49.200
We want the key with a vocabulary, really.
00:17:49.200 --> 00:17:50.319
Right.
00:17:50.319 --> 00:17:52.880
So that's here's the problem.
00:17:52.880 --> 00:17:56.240
So we need C V and then we need to do uh intersection.
00:17:56.240 --> 00:17:59.279
Well, we can do intersection like this.
00:17:59.279 --> 00:18:08.960
There we go, and then the maximum getting rid of uh the maximum of the length area here.
00:18:08.960 --> 00:18:10.240
What?
00:18:10.240 --> 00:18:15.759
Oh, because binding there we go, and then we can sum this.
00:18:15.759 --> 00:18:26.880
So this is essentially the same thing as uh the as the tiny APL solution, but it's obviously very similar to uh to what I had.
00:18:26.880 --> 00:18:36.720
Because instead of I what I had was instead of taking the intersection of the consonants and the vowels, I just took the intersection of the vowels and the set difference from the vowels.
00:18:36.720 --> 00:18:44.799
And uh and the your solution that did a set difference with the vowels from the alphabet.
00:18:44.799 --> 00:18:48.640
So you just had went went via the alphabet for no particular reason.
00:18:49.599 --> 00:18:55.440
Well, the particular reason is that I didn't have the idiom of without union.
00:18:55.440 --> 00:19:10.720
Like it's it's uh I don't know, at least for me, it's a more natural step to start from like an alphabet than to make the jump that, like, oh, if I do without an intersection with just the vowel set, you can back your way into just the consonants and just the vowels.
00:19:10.720 --> 00:19:13.119
Like that's not an obvious uh thing.
00:19:13.119 --> 00:19:14.720
Or I don't know, maybe for some people.
00:19:15.039 --> 00:19:18.960
How far do you get I'm trying just prepend a IOU.
00:19:18.960 --> 00:19:21.759
In front of the text.
00:19:21.759 --> 00:19:35.839
Oh, the problem is that yeah, in front of the text, and then you can say, well, the first five results are from the vowels and do a segmented uh extrusion there, but the problem I but you don't know what the next ones are going to be.
00:19:35.839 --> 00:19:38.559
No, no, no, the key afterwards will do it, yeah.
00:19:38.559 --> 00:19:44.880
The key will sort that out, but you have to only subtract one from the first five results.
00:19:45.279 --> 00:19:51.599
Okay, so so if we if we do this, right, so we can see what they correspond to, but now we get rid of that.
00:19:51.599 --> 00:19:53.680
So that gives us all those counts.
00:19:53.680 --> 00:19:58.799
Then we do a a five take, yeah, comma drop, that's all of them.
00:19:58.799 --> 00:20:05.200
And here we want to say uh negative one plus the take.
00:20:05.200 --> 00:20:08.079
We can swap those afterwards, like that.
00:20:08.079 --> 00:20:13.119
And then we want the drop of that, but then we want the max of each of them separately as well.
00:20:13.119 --> 00:20:14.960
So you want this over max.
00:20:15.279 --> 00:20:16.319
Oh, yeah, okay.
00:20:16.319 --> 00:20:16.720
Right?
00:20:16.960 --> 00:20:28.160
I mean, I was looking at partitioning them, but that's and then we we change that to a plus, and then we swap these two sides so that we don't need the parentheses, we just do the tick on the right, like that.
00:20:28.160 --> 00:20:30.240
So this this works as well.
00:20:30.480 --> 00:20:38.079
I'm not sure if I like it particularly, but uh it looks like you would need of you know comments to tell you what what was going on.
00:20:38.079 --> 00:20:44.079
Yeah, it's really it's doing a lot, it's doing one key and a um uh far fewer set operations.
00:20:44.079 --> 00:20:45.119
That's true.
00:20:45.359 --> 00:20:50.240
But I mean if you're talking performance, this might be very expensive too.
00:20:50.640 --> 00:20:53.839
Uh I'll prepending some stuff.
00:20:54.079 --> 00:20:55.440
Yeah, copies, yeah.
00:20:55.680 --> 00:20:55.839
Yeah.
00:20:56.079 --> 00:20:58.000
I have a question for Madeline in the chat.
00:20:58.000 --> 00:21:04.799
Uh, how do you do uh how do you use histogram on a string for the character counts?
00:21:04.799 --> 00:21:06.319
Should it work naturally?
00:21:06.319 --> 00:21:13.759
But right now when I do because that's the nice thing about Tiny Apple is they have the primitive that like naturally your brain jumps to.
00:21:13.759 --> 00:21:25.359
Like here we have to use key, or you can use the other product fork, but like when you have the primitive, that's like my brain and my heart are both attracted to the language that has that primitive.
00:21:25.359 --> 00:21:30.640
Um but then I'm thinking about the the thing just there that has the country.
00:21:30.640 --> 00:21:32.000
Yeah, yeah.
00:21:32.000 --> 00:21:34.400
And so now, like honestly, it's so beautiful.
00:21:34.400 --> 00:21:40.559
Like if if you it says you'd want a version of histogram that gives you a dictionary and just takes any cell.
00:21:40.559 --> 00:21:44.160
Oh, so is there no way like to s to change a string?
00:21:44.160 --> 00:21:46.559
Because that's the thing, a string is a character array.
00:21:46.559 --> 00:21:48.480
Uh you have to give it a dictionary.
00:21:50.000 --> 00:21:52.240
Okay, so here's another one we can maybe do.
00:21:52.240 --> 00:21:53.039
One second.
00:21:53.039 --> 00:21:54.319
Instead of let's try it.
00:21:54.319 --> 00:21:59.759
I'm not really, I haven't worked this through, but but maybe what we can do is we say A E I O U.
00:21:59.759 --> 00:22:03.119
Martin will not be amused here.
00:22:03.119 --> 00:22:06.000
Um, and then sort by that.
00:22:06.000 --> 00:22:08.160
I was wondering about that as well.
00:22:09.359 --> 00:22:13.680
That moves them up from you still have to do the lookups after, anyway.
00:22:13.680 --> 00:22:14.640
Yeah.
00:22:14.640 --> 00:22:23.519
Because you don't like at least with the keyed version, you know beforehand, well, there's gonna be five at the front that you're interested in differentiating.
00:22:23.519 --> 00:22:26.000
Oh, one second, one second, one second, one second.
00:22:26.160 --> 00:22:27.200
I have a crazy idea.
00:22:27.200 --> 00:22:30.079
It might not work out at all, but I have an interesting idea.
00:22:30.079 --> 00:22:45.599
Okay, so what happens if we go in here and say look inside here whether the particular character uh is a vowel or not, and then we look at the count.
00:22:45.599 --> 00:22:57.519
Okay, so now for each one of them of the of the grouping zero and and and one, we want those uh we want those the largest number.
00:22:57.519 --> 00:22:58.880
So I have a trick for that.
00:22:58.880 --> 00:23:08.400
So if we say negative one to the power of this, then that gives us a sign, and then we can multiply that with the tally.
00:23:08.400 --> 00:23:20.720
And now all we need to do is add the largest and the smallest, but flipping the the smallest one is going to be negative, so we don't want to we want to add its magnitude, but that's the same thing as subtracting.
00:23:20.720 --> 00:23:24.960
So the largest minus the smallest gives us the the what we wanted.
00:23:24.960 --> 00:23:26.559
Did anybody follow that?
00:23:26.559 --> 00:23:27.920
What just happened?
00:23:27.920 --> 00:23:30.160
So this is the whole solution.
00:23:30.160 --> 00:23:39.599
So Madeline says in the chat that it breaks if there are no consonants or vowels, but at any way it's broken if there are no consonants or no vowels.
00:23:39.599 --> 00:23:41.759
So we don't specify what I mean.
00:23:41.759 --> 00:23:45.039
Any of these solutions are going to be bad, right?
00:23:45.039 --> 00:23:51.440
Because you're going to do a reduction, the maximum reduction over an empty vector is going to give you negative infinity.
00:23:51.440 --> 00:23:54.079
So you're bad off either way.
00:23:54.079 --> 00:24:04.799
Um and the key, like as soon as we reach like this and key on on an empty thing, and then we we try to right.
00:24:04.799 --> 00:24:06.559
That's it's not gonna work.
00:24:06.559 --> 00:24:11.680
So all of these solutions use that, and even the count in is not going to help anything.
00:24:11.680 --> 00:24:14.400
You're just going to get empty vector, and then you max over that.
00:24:14.400 --> 00:24:18.319
So I don't I don't know if the problems specify what should happen if there aren't any.
00:24:18.319 --> 00:24:26.079
I guess I guess the vowel, all the vowels A E I U appear with a frequency of uh with a count of zero.
00:24:26.079 --> 00:24:28.240
So it really should give zero, right?
00:24:28.240 --> 00:24:29.440
If there aren't any.
00:24:29.440 --> 00:24:30.000
Yeah.
00:24:30.960 --> 00:24:32.319
All right, check this.
00:24:32.319 --> 00:24:47.519
Uh you have to predefine a result vector of two elements, both zeros, fine, which say the first one is the count of uh vowels, and the second one is oh sorry, the first one is actually the count of consonants, seconds the count of the.
00:24:47.519 --> 00:24:49.440
I also have to set squad iO to zero, right?
00:24:49.440 --> 00:24:52.000
You also have to well you can put a one plus if you want to.
00:24:52.720 --> 00:25:04.640
Okay, so we set quadril to zero, and then we we um update the the the value here, and then there's missing uh the last statement, which is to sum, right?
00:25:04.640 --> 00:25:06.319
Uh yeah, the last statement is to sum.
00:25:07.839 --> 00:25:08.319
Yeah.
00:25:08.319 --> 00:25:17.839
Uh I actually have started to grow to like this pattern of doing weird um manipulation within operators.
00:25:17.839 --> 00:25:20.559
But functional programmers will cry in the corner.
00:25:20.880 --> 00:25:21.759
Yeah, well.
00:25:21.759 --> 00:25:24.559
I'll drink their tears.
00:25:24.559 --> 00:25:27.759
I mean, isn't that sort of similar to the what I did up here?
00:25:27.759 --> 00:25:30.160
But mine is yours are more generally applicable.
00:25:30.160 --> 00:25:32.000
You could have multiple groups.
00:25:32.000 --> 00:25:37.440
So Yeah, and you also had to well Well, not really, because it would be awkward to find out.
00:25:37.440 --> 00:25:40.400
You have to find is it in which group does it appear?
00:25:41.519 --> 00:25:46.160
Yeah, this one happens to come okay with two groups, but then so does with more groups it'll be.
00:25:46.400 --> 00:25:48.240
Parity is also a two-group.
00:25:48.240 --> 00:25:49.440
Yeah.
00:25:49.440 --> 00:25:56.319
But if you were if you had multiple different groups, then I mean this is a lot of updating, right?
00:25:56.319 --> 00:25:58.880
You keep adding add one, add one, add one, add one.
00:25:59.119 --> 00:26:04.640
This is uh That's uh oh yeah, well no only per key.
00:26:04.640 --> 00:26:08.559
Yeah, but that's once per no, it's not adding okay, it's updating.
00:26:08.799 --> 00:26:13.039
Yeah, it's it has to do with max max all the time.
00:26:13.039 --> 00:26:15.039
But the max is our scalar.
00:26:15.039 --> 00:26:16.079
It's when you say one.
00:26:17.440 --> 00:26:24.960
This is yeah, this is in principle more one potato, two potato, unless like array-oriented, I guess.
00:26:24.960 --> 00:26:26.079
Yeah.
00:26:26.079 --> 00:26:42.240
But it's something that when you uh learn about operators and stuff, tend to fall into a pattern initially of doing something, either doing like loads of stuff, I guess this is counts as doing loads of stuff in the operand.
00:26:42.240 --> 00:26:49.279
Or like getting the operand, like for example, in key, sometimes you're fighting with uh the fact that you get a matrix out.
00:26:49.279 --> 00:26:57.359
And either you'll I'll often do like a split transpose to get out uh what you call it, an exploded inverted table.
00:26:57.359 --> 00:26:57.920
Okay.
00:26:57.920 --> 00:27:00.640
As opposed to indexing into each of the columns.
00:27:00.640 --> 00:27:06.799
Whereas here you don't even have to worry about that because you're just dealing with the values directly, which I kind of like.
00:27:07.119 --> 00:27:10.319
So if I go and get key with a vocabulary, how does this look?
00:27:10.319 --> 00:27:16.960
And uh so I guess I should show the URL so people have a chance just to look at it.
00:27:16.960 --> 00:27:18.240
Does it fit?
00:27:18.240 --> 00:27:19.039
Not really.
00:27:19.039 --> 00:27:21.680
GitHub there, blob.
00:27:21.680 --> 00:27:24.400
This will be awkward for people to see anyway.
00:27:24.400 --> 00:27:27.279
Um okay.
00:27:27.279 --> 00:27:42.000
So now this takes the vocabulary uh on on the left, and and now we can take the vowels A U and key with uh key with vocabulary on the text.
00:27:42.000 --> 00:27:49.759
This gives me the indices and for each one of them, and we just need to count each and do the max.
00:27:49.759 --> 00:27:50.720
Right?
00:27:50.720 --> 00:27:51.680
Uh max.
00:27:51.680 --> 00:27:54.480
So this gives us that.
00:27:54.480 --> 00:27:59.759
And if you and then we can take the other part of the alphabet, uh, so we say here.
00:27:59.759 --> 00:28:07.279
And this gives us the max consonants, and then we can just combine all of that.
00:28:07.279 --> 00:28:11.200
So by running key with vocabulary twice, it's maybe maybe more expensive.
00:28:11.200 --> 00:28:14.960
I'm not even sure how much how much more expensive they would be in an actual good implementation.
00:28:14.960 --> 00:28:20.640
This is just a model, but the actual implementation would only look for those, it would never collect information about them.
00:28:20.640 --> 00:28:26.559
Um, as well, it would be nice if we could detect that we just want the count so we don't actually have to keep the indices.
00:28:26.559 --> 00:28:30.480
Um so how would this look in practice?
00:28:30.480 --> 00:28:35.680
Well, we have to we have to do the same sort of thing as we had before with uh creating the C and V.
00:28:35.680 --> 00:28:38.400
But let's just say we have the consonants and the vowels.
00:28:38.400 --> 00:28:55.680
So for each one of them, we do the key with vocabulary on the right, so and then we do tell each and do a max, and then we sum everything, which means uh yeah.
00:28:55.680 --> 00:28:57.759
Does this one work with each one of them?
00:28:57.759 --> 00:29:05.519
Yes, because no, uh if they're yeah, because this one will always give five elements and 21 elements, right?
00:29:05.519 --> 00:29:11.440
Because because we we're always looking for something, we'll just give empty lists, so then this will just give all zeros and all zeros.
00:29:11.440 --> 00:29:12.000
We can try it.
00:29:12.000 --> 00:29:18.720
So if we if we do it with something that is uh like this, it should give three, right?
00:29:18.720 --> 00:29:24.480
And if we do something that has uh like this, it should give one.
00:29:24.480 --> 00:29:28.640
So that's so the key with vocabulary running it twice like this, it actually works.
00:29:28.640 --> 00:29:31.200
We can also, I mean it's not doesn't help much.
00:29:31.200 --> 00:29:34.960
We save two here, it doesn't help making it tacit really.
00:29:34.960 --> 00:29:38.799
It's just uh no, you can't do that because it's a it's an operator.
00:29:38.799 --> 00:29:40.079
So don't mind.
00:29:40.079 --> 00:29:44.720
I think this is maybe the easiest one to understand.
00:29:44.720 --> 00:29:51.440
In general, key with vocabulary is easier to understand than the normal key, because there's no function application.
00:29:51.440 --> 00:29:55.200
We're just saying, okay, what are all the indices for these elements?
00:29:56.079 --> 00:29:59.039
Yeah, and it usually involves less faff afterwards.
00:29:59.039 --> 00:29:59.680
Yeah.
00:29:59.680 --> 00:30:02.799
Which had just adds basically noise.
00:30:04.319 --> 00:30:06.720
Yeah, let's add that in version 22.
00:30:06.720 --> 00:30:14.799
But it's yeah, in dialogue definitely we want to reach for key and for this sort of thing.
00:30:14.799 --> 00:30:18.960
Um oh, I mean we don't have to.
00:30:18.960 --> 00:30:21.039
We could okay.
00:30:21.039 --> 00:30:24.480
So here's okay, let's let's define sorting first.
00:30:24.480 --> 00:30:27.680
Now we got a sort primitive.
00:30:27.680 --> 00:30:29.119
I want I want that as well.
00:30:29.119 --> 00:30:33.279
Let's just call that A5 sending, as if we had a primitive for it.
00:30:33.279 --> 00:30:37.680
Okay, so now we have the text and we can we can sort it.
00:30:37.680 --> 00:30:39.039
That's banana sorted.
00:30:39.039 --> 00:30:40.720
Oh, it's my bad example really.
00:30:40.720 --> 00:30:47.839
We should have um uh an example where we have some some consonants first.
00:30:47.839 --> 00:30:52.240
Okay, we can do this one for now, but really what I want to do here is I want to take the vowels.
00:30:52.240 --> 00:30:54.799
Oh, is that is that even important?
00:30:54.799 --> 00:30:57.279
Uh yeah.
00:30:57.279 --> 00:30:58.480
Move them first.
00:30:58.480 --> 00:31:00.319
And sort sort with that.
00:31:00.319 --> 00:31:02.880
Why did we you sort it twice?
00:31:02.880 --> 00:31:03.759
You don't need to?
00:31:03.759 --> 00:31:06.400
Yeah, but why did I lose a an an N?
00:31:06.400 --> 00:31:08.000
What's T?
00:31:08.000 --> 00:31:09.200
Banana.
00:31:09.839 --> 00:31:10.720
Indeed.
00:31:10.720 --> 00:31:12.480
Forget it.
00:31:12.480 --> 00:31:17.279
Uh that shouldn't matter.
00:31:18.240 --> 00:31:20.240
135, those are the A's.
00:31:21.440 --> 00:31:22.480
And B and an N and N.
00:31:22.480 --> 00:31:23.599
Close that.
00:31:23.599 --> 00:31:26.160
That's fine.
00:31:26.160 --> 00:31:33.039
Okay, and the fact that uh does be kind not do the same?
00:31:34.319 --> 00:31:35.920
Oh duh, my bad.
00:31:35.920 --> 00:31:36.960
Stupid me.
00:31:36.960 --> 00:31:39.039
This sort function doesn't take a left argument.
00:31:39.039 --> 00:31:40.960
Yeah, yeah.
00:31:40.960 --> 00:31:41.759
We can't do that.
00:31:41.759 --> 00:31:42.000
Okay.
00:31:42.000 --> 00:31:44.559
It has to be I mean you can't even do this.
00:31:44.559 --> 00:31:49.759
I mean it'd have to be sorted as like this.
00:31:49.759 --> 00:31:50.799
Yeah.
00:31:50.799 --> 00:31:51.440
There.
00:31:51.440 --> 00:31:52.000
My bad.
00:31:52.000 --> 00:31:52.720
Really?
00:31:52.720 --> 00:31:57.599
Oh this is take the left argument if it's there, otherwise the right argument.
00:31:57.599 --> 00:31:58.640
No, we can't do that.
00:31:58.640 --> 00:32:00.319
It has to be grayed like this.
00:32:00.319 --> 00:32:02.559
Uh doesn't that normally work?
00:32:02.559 --> 00:32:03.440
Yeah, yeah.
00:32:03.680 --> 00:32:04.559
Here we go.
00:32:04.559 --> 00:32:05.359
Sorry.
00:32:05.359 --> 00:32:09.119
Uh, why was why was it getting rid of the No?
00:32:09.200 --> 00:32:17.759
Because think about it, it's it's pre-processing the left argument, so it's just sorting, it's just making the grade vowels that are has nothing to do with the right.
00:32:20.559 --> 00:32:21.039
Okay, yeah.
00:32:21.200 --> 00:32:21.440
Yeah.
00:32:21.440 --> 00:32:31.599
Okay, so um it would be nice to have a sort primitive, but the sort, but it's wouldn't work for the sort by any by the sort order that's very special for the grade primitive.
00:32:31.599 --> 00:32:32.960
Anyway, let's let's just continue.
00:32:32.960 --> 00:32:35.200
Okay, so now we now we sort like this.
00:32:35.200 --> 00:32:41.200
So it doesn't actually make a difference in this case because we have a vowel in banana that comes earlier.
00:32:41.200 --> 00:32:45.680
Um but if we write something like uh bikini.
00:32:45.680 --> 00:32:50.000
Yeah, so you get the i's first and then the uh the b.
00:32:50.000 --> 00:32:54.400
So then we should that gives us four, as that should be the result.
00:32:55.119 --> 00:32:55.359
Okay.
00:32:55.359 --> 00:32:57.599
You don't need two A's here, do you?
00:32:58.319 --> 00:33:11.519
Yeah, you do, but if I want because my my idea was to put Oh, you you sort Yeah, I want to put to sort them so that the consecutive elements are are next to each other, like identical elements are next to each other.
00:33:11.519 --> 00:33:15.920
Then I wanted to group it like that, but we don't know where to split anyway.
00:33:15.920 --> 00:33:22.000
So it doesn't have the problem with the whole yeah, the whole approach tend to think about places.
00:33:22.000 --> 00:33:25.759
Well we can what we could do is we could add alphabet, even at the end.
00:33:25.759 --> 00:33:27.839
That doesn't matter, because now we're sorting.
00:33:27.839 --> 00:33:28.400
Okay.
00:33:28.400 --> 00:33:37.519
So now we now if we look at at where they're different from each other, that's where we need to split.
00:33:37.519 --> 00:33:44.640
So we take this and sp uh split uh split on that.
00:33:44.640 --> 00:33:47.119
That gives us our groups like this.
00:33:47.119 --> 00:33:52.000
I'm not saying it's a good solution, it's to say it's a it's a one not using key.
00:33:52.000 --> 00:33:56.880
And then we get we get these counts here.
00:33:56.880 --> 00:34:11.599
This is the actual count because we injected one, and now we just need to take uh do the five take and plus over max with a five draw.
00:34:11.599 --> 00:34:15.280
Is it a is it good?
00:34:15.280 --> 00:34:17.920
It's long, but I'm not using key.
00:34:17.920 --> 00:34:24.079
So at least I could do it like this.
00:34:24.079 --> 00:34:27.360
And I got to use the added grade, so that's something.
00:34:27.360 --> 00:34:31.039
Yeah, you're following Connor?
00:34:32.800 --> 00:34:34.320
Uh not this last one.
00:34:34.320 --> 00:34:42.000
I uh kind of was I was working on figuring out how tiny STL worked, and so I uh I I wouldn't say I zoned out.
00:34:42.000 --> 00:34:42.480
Oh, yeah.
00:34:42.480 --> 00:34:46.400
I refocused my attention on uh tiny apple.
00:34:46.719 --> 00:34:49.440
Oh no, we saw oh no, it's a new one in the chat.
00:34:49.760 --> 00:34:52.719
Oh yeah, well, so uh I just got this whole thing.
00:34:52.719 --> 00:34:54.239
I went to the petition.
00:34:54.239 --> 00:34:55.760
Uh let's keep it flat.
00:34:55.760 --> 00:34:57.039
Keep it flat, keep it flat.
00:34:57.039 --> 00:34:58.320
That's what you want to do, right?
00:34:58.320 --> 00:34:59.840
So we keep this flat here.
00:34:59.840 --> 00:35:00.239
Huh?
00:35:00.239 --> 00:35:01.920
Are you talking me or you're talking to Rich?
00:35:01.920 --> 00:35:03.440
Um both of you, whatever.
00:35:03.440 --> 00:35:04.800
I just to myself here.
00:35:04.800 --> 00:35:05.679
One second.
00:35:05.679 --> 00:35:08.159
Uh so without an outer product.
00:35:08.159 --> 00:35:10.320
Without an out of product, of course, yeah.
00:35:10.320 --> 00:35:11.679
Flat without out of products.
00:35:11.679 --> 00:35:14.719
So we do we do comparisons like this.
00:35:14.719 --> 00:35:26.639
Um we actually don't we actually might want to put this at the uh put a one at the end here, um, and then we just need to find the the distances between them.
00:35:26.639 --> 00:35:43.039
So we can do a where on that, and then uh that gives us the indices where we where we split over, and then we want to find the distances between them, like this, and and then and that's the one-off counts that we had before.
00:35:43.039 --> 00:35:56.400
We see that line, that's the same line as up here above, and then we do this, and finally we just need to do the the five thing take over max drop.
00:35:56.400 --> 00:35:59.039
Take oh plus plus over.
00:35:59.039 --> 00:36:00.320
There you go.
00:36:00.320 --> 00:36:07.440
So here is a solution that does not use key and uh does not use any nested arrays at all.
00:36:07.440 --> 00:36:09.519
It's just good old APL.
00:36:09.519 --> 00:36:15.199
I mean, old APLs didn't have the pairwise thing, but you do like one drop, one take type thing.
00:36:15.199 --> 00:36:18.800
Sorry, one drop, negative one drop, and then compare them.
00:36:18.800 --> 00:36:21.440
Yeah, old school.
00:36:21.440 --> 00:36:24.800
Oh, so alphabet, oh it's Asher speaking about that.
00:36:24.800 --> 00:36:26.320
You can do an out of product.
00:36:26.320 --> 00:36:36.159
So we've got the T here, and if we do an outer product with uh quote C quad A, yeah, that gives us gives us this.
00:36:36.159 --> 00:36:42.880
And but we should probably put it the opposite opposite side, so we get like a lot of rows like this.
00:36:42.880 --> 00:36:53.199
Um, but then we the problem is we have uh AE Ae I O Uh Union with that.
00:36:53.199 --> 00:37:02.079
So this makes sure that the first five rows, so the union with the alphabet like this, make it's the alphabet, but the vowels are first, right?
00:37:02.079 --> 00:37:11.199
So now if we if we compare that with our text, then the first five uh why is that not?
00:37:11.199 --> 00:37:12.559
Oh, we forgot the quote C.
00:37:12.559 --> 00:37:24.719
First five rows are the are the vowels, so that means these are the counts for every uh everything, and now we can do our classic by now, take plus over max drop.
00:37:24.719 --> 00:37:26.000
There you go.
00:37:26.000 --> 00:37:34.719
But of course, I mean, sure, this sort of has the key in this this is key, yeah, just an inefficient one.
00:37:34.719 --> 00:37:39.039
But this one is nice because we don't need to split up into two groups.
00:37:39.039 --> 00:37:58.159
Um wonder now whether we can if you go back to to a normal T here, if we say A E I O U and Union with that, yeah, that doesn't work because we don't get duplicates anymore.
00:37:58.159 --> 00:38:01.519
Uh huh.
00:38:01.519 --> 00:38:12.639
Okay, so how about if we say t uh intersection comma uh without with a e i or u.
00:38:12.639 --> 00:38:16.400
This just puts the vowels first.
00:38:16.400 --> 00:38:19.280
Oh, but we don't know what they are.
00:38:19.280 --> 00:38:27.199
Um we fix that.
00:38:27.199 --> 00:38:30.000
I wanted to get all of them in first.
00:38:30.000 --> 00:38:36.239
So if you put the right right argument here, now we know all the vowels come in first.
00:38:36.239 --> 00:38:38.800
In fact, we don't need all of them.
00:38:38.800 --> 00:38:40.480
We can use all the set functions in one.
00:38:40.480 --> 00:38:41.760
How do you like that?
00:38:41.760 --> 00:38:48.320
And so the union between those, oh, but we don't know how many we're adding.
00:38:48.320 --> 00:38:49.440
That's the problem.
00:38:49.440 --> 00:38:52.239
Okay, so so this one is fine.
00:38:52.239 --> 00:38:55.280
Okay, now we know we're adding one of each of the vowels.
00:38:55.280 --> 00:39:01.199
So now when we do the key and the tally, we're doing the tally, top, right?
00:39:01.199 --> 00:39:11.280
Right, so we know that the first five are for the vowels, and the last two, uh the one remaining ones after the those five are for the consonants.
00:39:11.280 --> 00:39:24.400
So now when we do the five, uh oh, we don't actually need to do the negative one first because we know what it we could we we do stupid, all those cases before we did the max of the subtraction one.
00:39:24.400 --> 00:39:27.360
We can just subtract one the end because we know we're going to get to too much, right?
00:39:27.360 --> 00:39:36.559
So now we take five take plus over uh max with drop, and then we get one more than what we need.
00:39:36.559 --> 00:39:38.639
So all we need to do is negative one plus.
00:39:38.639 --> 00:39:39.920
We but we know that.
00:39:39.920 --> 00:39:42.000
I think that one's pretty neat.
00:39:42.000 --> 00:39:47.280
We then now we're only using one key, we're not doing anything nested.
00:39:47.280 --> 00:39:55.360
Uh, we are not doing it on a a on a huge uh added text.
00:39:55.360 --> 00:39:58.639
This is this is just a reordering.
00:39:58.639 --> 00:40:03.440
This this literally just puts all the uh the vowels first.
00:40:03.440 --> 00:40:06.000
Well, why hold on?
00:40:06.000 --> 00:40:07.440
Why do we even need that?
00:40:07.440 --> 00:40:12.239
We don't um that's the same thing as we did before, right?
00:40:12.239 --> 00:40:14.800
Just concatenating this in front.
00:40:14.800 --> 00:40:17.199
Isn't that doesn't that come down to the same thing?
00:40:17.599 --> 00:40:27.280
Uh no, the difference of catenating just that in front, I think, was that well, this is why I'm slightly wondering about do you were you supposed to subtract one or two?
00:40:27.280 --> 00:40:35.679
Because the problem with concatenate with prepending with just the vowels was that you only added one to just the vowels count.
00:40:35.679 --> 00:40:38.000
So you had to subtract one from the first five.
00:40:38.239 --> 00:40:39.920
Yeah, that's that's that's correct, right?
00:40:39.920 --> 00:40:43.360
This is a banana T, right?
00:40:43.440 --> 00:40:53.599
So so there are So I thought when you were doing all this set stuff that you were doing it so that you add it to both Yeah, but we no, we're not because I'm not going to add the consonants, there's no point.
00:40:53.920 --> 00:40:56.960
What was uh did we get to Ash's train?
00:40:56.960 --> 00:40:58.079
Or is that what we were looking at?
00:40:58.079 --> 00:41:05.599
It says well, he wish you came up with without G intersection, but I don't know what I don't understand what G is.
00:41:06.239 --> 00:41:07.599
Just a function.
00:41:08.400 --> 00:41:13.519
Oh, just the is this the is this the old stuff, the original, the uh yes.
00:41:13.679 --> 00:41:18.159
Well Max without Max asked earlier, did we get to Asher's Fork?
00:41:18.159 --> 00:41:22.400
And then I guessed it was probably the one that Adam mentioned, the with our media.
00:41:22.400 --> 00:41:24.320
Uh, but it was not.
00:41:24.320 --> 00:41:26.480
And what is Asher's fork?
00:41:26.480 --> 00:41:27.519
We don't know.
00:41:27.519 --> 00:41:34.400
There's a it looks definitely like a couple of his messages were eaten, and so potentially he messaged it and it's being eaten.
00:41:34.400 --> 00:41:39.199
I know we tried to do something with a GitHub discussion at one point, but no one ever used that.
00:41:39.199 --> 00:41:42.079
So if it's still their Ash is ping us on.
00:41:42.639 --> 00:41:48.880
I'll just write him in open internally because when it's a colleague, you can write to them directly with somebody out there on the internet.
00:41:48.880 --> 00:41:50.320
How do they perform?
00:41:50.320 --> 00:41:57.119
It's sort of hard to tell how they perform because we need a large text, but I guess we can we can try.
00:41:57.119 --> 00:41:58.239
Uh one second.
00:41:58.239 --> 00:42:02.559
Asher has just sent his solution to me as well.
00:42:02.559 --> 00:42:05.440
Uh it is loading.
00:42:05.440 --> 00:42:08.159
Let's go back here.
00:42:08.159 --> 00:42:11.519
And so Asher said this.
00:42:11.519 --> 00:42:14.719
Wow, that's why such a long name.
00:42:15.679 --> 00:42:17.920
That's the name of the of the towel.
00:42:17.920 --> 00:42:18.480
Oh, okay.
00:42:18.559 --> 00:42:19.599
This is just a test.
00:42:19.599 --> 00:42:22.320
Should we say hi to the people who say hi in chat?
00:42:22.320 --> 00:42:25.679
Marble Koma and Jacob Lookwood.
00:42:25.679 --> 00:42:31.199
Okay, so this is an okay, so he's doing the outer product, he's just implementing key here.
00:42:31.199 --> 00:42:37.199
Outer product with with the alphabet, and then yeah, it's essentially the same thing as we had before.
00:42:37.199 --> 00:42:41.360
But instead of doing set functions, it's implementing the set functions.
00:42:41.360 --> 00:42:42.400
Yeah, classic.
00:42:42.400 --> 00:42:47.519
So it's find the mask, do the do the two sets.
00:42:47.519 --> 00:42:51.519
Um, so it's really uh the same thing.
00:42:51.519 --> 00:42:54.159
So uh how do they perform?
00:42:54.159 --> 00:42:55.199
We can try.
00:42:55.199 --> 00:43:03.119
So if we all we need to do really is just create a giant thing to not print this.
00:43:03.119 --> 00:43:05.599
So this is a long text.
00:43:05.599 --> 00:43:12.400
Now we need to start defining these as uh we have to scroll back in the history to find all our definitions.
00:43:12.400 --> 00:43:13.599
Can we do that?
00:43:13.599 --> 00:43:15.840
Um where were we?
00:43:15.840 --> 00:43:17.280
There we go.
00:43:17.280 --> 00:43:26.239
So this was where the Asher says, isn't it nice to use replicate twice without needing to work around it the hybridness?
00:43:26.239 --> 00:43:27.679
Yes, that is nice.
00:43:27.679 --> 00:43:29.679
Okay, so this was the F.
00:43:29.679 --> 00:43:42.239
Doing this one, and then we had um the equivalent one of the tiny apple one.
00:43:42.239 --> 00:43:44.079
That's this one.
00:43:44.079 --> 00:43:47.119
Should we say TA on this one?
00:43:47.119 --> 00:43:48.960
Yeah, okay.
00:43:48.960 --> 00:43:54.400
And then we're gonna assume the constant of the and then yeah, because the CV only gets evaluated once, right?
00:43:54.400 --> 00:43:57.679
So that doesn't take any time.
00:43:57.679 --> 00:44:01.280
And then we had the key when we find Finally got this solution here.
00:44:01.280 --> 00:44:04.960
So this is a tiny apple with the key variant.
00:44:04.960 --> 00:44:06.480
Like that.
00:44:06.480 --> 00:44:09.519
Hopefully they will all work out correctly.
00:44:09.519 --> 00:44:11.679
What do we call this one?
00:44:11.679 --> 00:44:17.360
Oh that's the this one is is silly in this regard anyway.
00:44:17.360 --> 00:44:24.079
So this is the one that's single it's single key.
00:44:27.280 --> 00:44:29.199
Yeah, some powers.
00:44:29.199 --> 00:44:33.039
Yeah, this is the one that array oriented yeah.
00:44:33.039 --> 00:44:35.199
This is the one that used the negative numbers, right?
00:44:35.599 --> 00:44:37.360
Logic, arithmetic logic.
00:44:37.360 --> 00:44:38.239
Yeah.
00:44:38.239 --> 00:44:41.760
Sing single key with negative numbers.
00:44:41.760 --> 00:44:42.480
Okay.
00:44:42.480 --> 00:44:47.119
And then there was this one, the index index updating one.
00:44:47.119 --> 00:44:49.599
It's R gets zero zero.
00:44:49.599 --> 00:44:52.559
Quada well, we should say quad IO in the beginning, right?
00:44:52.559 --> 00:44:54.639
Oh, we already said it.
00:44:54.639 --> 00:44:55.360
That's fine.
00:44:55.360 --> 00:44:57.920
None of us really rely on it.
00:44:57.920 --> 00:45:01.119
And we update R with this.
00:45:01.119 --> 00:45:08.960
And then we return R uh plus slash uh R there.
00:45:08.960 --> 00:45:11.360
So that's the what do we call that?
00:45:11.360 --> 00:45:12.719
One potato, two potatoes?
00:45:12.719 --> 00:45:15.360
Potato solution.
00:45:15.360 --> 00:45:20.159
Yeah, so then there is key with vocabulary, that's this one.
00:45:20.800 --> 00:45:24.719
Um wrap it up again.
00:45:25.199 --> 00:45:28.960
Yeah, but how are we going to do that so that it's efficient?
00:45:28.960 --> 00:45:31.039
This is one function, this is one function.
00:45:31.039 --> 00:45:32.719
You just need to make another top here.
00:45:32.960 --> 00:45:34.719
Like what did I mess up?
00:45:34.719 --> 00:45:36.239
Interesting.
00:45:36.239 --> 00:45:38.400
Anymore to the right?
00:45:38.639 --> 00:45:39.760
No, no, it's okay.
00:45:39.760 --> 00:45:41.360
Oh good now.
00:45:41.360 --> 00:45:42.559
Key with vocabulary.
00:45:42.559 --> 00:45:44.320
I hope I'm getting all this right.
00:45:44.320 --> 00:45:48.559
Uh here's the here's the key with the vocabulary.
00:45:49.039 --> 00:45:53.519
Oh no, I gotta go in two minutes, so uh over both of them.
00:45:53.519 --> 00:46:00.320
I might have to watch the watch the watch the recording to see how this pans out.
00:46:00.320 --> 00:46:02.400
You're almost there, you're almost there.
00:46:02.400 --> 00:46:02.960
Yeah.
00:46:03.199 --> 00:46:04.880
And then we did the sorting.
00:46:04.880 --> 00:46:08.239
Oh, this is the this is getting silly, right?
00:46:08.239 --> 00:46:11.519
This is the flat sorting thing.
00:46:11.519 --> 00:46:14.880
What's the chance that I'm making a mistake here?
00:46:14.880 --> 00:46:20.480
So flat sort.
00:46:20.480 --> 00:46:26.239
And this is the but this is still doing yeah.
00:46:26.960 --> 00:46:28.400
Two sorts and all that.
00:46:28.400 --> 00:46:31.199
Is it worth adding the weird arithmetic one?
00:46:31.199 --> 00:46:34.159
I don't want completeness.
00:46:34.159 --> 00:46:35.920
What was the difference between these two?
00:46:35.920 --> 00:46:42.719
Uh you're finding indices and the differences the first one you uh what partitions.
00:46:43.039 --> 00:46:44.880
That sort indices here.
00:46:44.880 --> 00:46:46.880
This is not gonna end well.
00:46:46.880 --> 00:46:49.599
Are they finding all these lines at the same time?
00:46:49.599 --> 00:46:53.280
Uh this one is the out of product one.
00:46:53.280 --> 00:46:57.360
Uh that's sort of silly there.
00:46:57.360 --> 00:47:03.119
But this is going to be bad because we have to do this thing over over and over again, even though it's a constant.
00:47:03.119 --> 00:47:07.679
So we can fix that by saying here.
00:47:07.679 --> 00:47:11.440
Out of product.
00:47:11.440 --> 00:47:16.320
And then we have got this one, which is pre-penned.
00:47:16.320 --> 00:47:18.159
There's so many of them.
00:47:18.159 --> 00:47:21.360
Prepenned, and then finally the SOF.
00:47:21.360 --> 00:47:23.039
Hey, it all worked.
00:47:27.599 --> 00:47:29.599
It's only counting uh consonants?
00:47:29.599 --> 00:47:31.360
I was gonna say you didn't run any of these.
00:47:31.360 --> 00:47:32.480
How do we know that this worked at all?
00:47:32.480 --> 00:47:34.000
All we did is successfully stored.
00:47:37.440 --> 00:47:39.519
Well, I'll find out after the fact because I've got a lot of things.
00:47:39.519 --> 00:47:40.320
Oh, this is wrong.
00:47:40.320 --> 00:47:40.559
Yeah.
00:47:40.559 --> 00:47:42.320
Uh great to see you all.
00:47:42.320 --> 00:47:43.679
Yes, and this one is bad.
00:47:45.360 --> 00:47:46.000
Bye, Rich.
00:47:46.000 --> 00:47:49.119
I can no longer coast.
00:47:49.119 --> 00:47:50.559
I was coasting, folks.
00:47:50.559 --> 00:47:52.960
Rich and Adam were doing all the heavy lifting.
00:47:53.679 --> 00:47:58.559
I had a protein bar, and uh I have to be back in the game.
00:47:58.559 --> 00:48:04.079
Okay, so we've got uh we got all of these, and now we need to uh to try them all.
00:48:04.079 --> 00:48:07.039
So let's uh say the function names here.
00:48:07.039 --> 00:48:10.159
We got F, which was my original one.
00:48:10.159 --> 00:48:13.920
Uh T A was uh what was that about?
00:48:13.920 --> 00:48:15.119
Remember?
00:48:15.119 --> 00:48:18.079
Um yeah, there was the tiny APL.
00:48:18.079 --> 00:48:19.199
Tiny Apple.
00:48:19.199 --> 00:48:23.199
And then there was the tiny APL with based on key.
00:48:23.199 --> 00:48:29.119
Uh and then there was uh there was the S single key?
00:48:29.119 --> 00:48:40.480
SK single single key, single key with negative numbers, uh the one potato, two potato, one, key with a vocabulary, uh not number two.
00:48:40.480 --> 00:48:41.599
That's fine.
00:48:41.599 --> 00:48:50.000
Fs was the uh the flat sort, and then we got flat flat sort with indices.
00:48:50.000 --> 00:49:08.880
I don't know why the syntax coloring is all broken here, and then we got out of product, and we got asher uh we got pre, which was the pre prepending insertion thing, and then there was finally the the soft one, which was ashes.
00:49:08.880 --> 00:49:21.760
Okay, so these are all our functions, and for each function we want to pend it with long, so this gives us all the uh expressions that we that we want to run.
00:49:21.760 --> 00:49:32.239
Cmbx with cy DMBx uh those expressions are there it didn't actually work.
00:49:32.239 --> 00:49:35.119
What what's wrong with T A K?
00:49:35.119 --> 00:49:42.960
That's this one that works fine.
00:49:42.960 --> 00:49:44.960
T A K with a long one.
00:49:44.960 --> 00:49:47.280
Oh, I think I know what the problem is.
00:49:47.280 --> 00:49:50.400
Uh the long yeah, it's uppercase.
00:49:50.400 --> 00:49:52.400
I just need to make it lowercase.
00:49:52.400 --> 00:49:55.039
Let's try this.
00:49:55.039 --> 00:49:56.400
It's running.
00:49:56.400 --> 00:50:01.840
So meanwhile, while that's running in the chat, they're discussing whether you can you need multiple keys.
00:50:01.840 --> 00:50:04.000
Yeah, you can need keys inside keys.
00:50:04.000 --> 00:50:13.760
I've done that in like database queries, things like you are you want to group by and multiple times because key is really a group by.
00:50:13.760 --> 00:50:18.159
So inside the groups, you might want a a two-dimensional group by.
00:50:18.159 --> 00:50:27.199
So you want a table when one dimension you want the department in one dimension, you want the uh the quarter, something like that.
00:50:27.199 --> 00:50:29.599
So can't really see the graph here.
00:50:29.599 --> 00:50:32.400
Key with vocabulary looks like it gave the wrong result.
00:50:32.400 --> 00:50:33.199
Interesting.
00:50:33.199 --> 00:50:35.519
Big differences in the performance here.
00:50:35.519 --> 00:50:40.000
Um, we can look at that, but it doesn't really matter because the performance was so bad.
00:50:40.000 --> 00:50:45.599
Uh and key with vocabulary might have been the one we defined wrong, that's why it's only doing, but it doesn't matter.
00:50:45.599 --> 00:50:48.000
The fastest one is the preview one.
00:50:48.000 --> 00:50:58.320
Uh, but I mean it's tied with the SK was uh single key, and the tiny apple one that you came up with, Connor, is also very fast.
00:50:58.320 --> 00:51:01.840
Um and then the outer product one.
00:51:01.840 --> 00:51:05.920
So the problem the thing here is that the alphabet is very small, right?
00:51:05.920 --> 00:51:08.719
So that skews things a bit.
00:51:08.719 --> 00:51:12.639
If the alphabet was much smaller, then I think it would make a big difference.
00:51:12.639 --> 00:51:13.840
So we we can try that.
00:51:13.840 --> 00:51:28.239
So if we do um U is uh question mark 1E63 shape one one one four one one two.
00:51:28.239 --> 00:51:30.159
That's the number of characters in Unicode.
00:51:30.159 --> 00:51:33.119
This is the code points, and these are the characters.
00:51:33.119 --> 00:51:38.320
So here are a million Unicode characters, and then we're going to run it against Unicode characters.
00:51:38.320 --> 00:51:40.159
Oh, but this is not gonna work, of course not.
00:51:40.159 --> 00:51:46.000
We can't run it because now it's not well defined what is a consonant and what is a vowel, right?
00:51:46.000 --> 00:51:47.920
I can't tell you.
00:51:47.920 --> 00:51:58.480
So we it will for this particular problem we can't really say that the vocabulary is ever ever is ever big because it's really limited to the Latin alphabet.
00:51:58.480 --> 00:52:07.440
We can extend that to various other Latin alphabets that have got a few more characters each, but even if we do like Vietnamese, it's still a fairly small number of letters in the alphabet.
00:52:07.440 --> 00:52:13.119
If you want to do all of Unicode, then I mean it doesn't what is a vowel?
00:52:13.119 --> 00:52:15.039
It's not well defined.
00:52:15.039 --> 00:52:22.400
So there's no character class for Unicode, that's a vowel character or consonant.
00:52:22.400 --> 00:52:24.000
Don't work like that.
00:52:24.000 --> 00:53:00.480
It's not a real thing anyway, because the letter Y is sometimes one, sometimes the other, and silent letters, and um yeah, but it doesn't it doesn't so the the participant in the chat with the unpronounceable username uh something underscore underscore minus kd eight o z uh says call it unicode minus minus very loudly and just say the vowels but that still makes for very skewed here because it means one group of letters we're looking for is very small, the other one is is very large.
00:53:00.480 --> 00:53:15.039
And that that would mean that whenever any of the solutions that look up in the entire list of consonants is going to be very expensive, but the ones that look up in um just in the vowel list is going to be cheaper.
00:53:15.039 --> 00:53:22.079
So um we also have a request uh to look go over the solutions on ArrayBox.
00:53:22.079 --> 00:53:24.079
And you want to drive that, Connor?
00:53:25.039 --> 00:53:35.760
I can, but uh I'm gonna just have to overlay it on the uh screen you're looking at, and you'll have to switch to YouTube because uh I can't screen share on top of screen sharing.
00:53:36.159 --> 00:53:37.119
Don't worry about me.
00:53:37.840 --> 00:53:42.960
Um well actually, what did I uh let's see if we just do this.
00:53:42.960 --> 00:53:45.440
Will I get back the alright?
00:53:45.440 --> 00:53:46.400
That's the old one.
00:53:46.400 --> 00:53:48.639
Where's the one that I put in the chat more recently?
00:53:48.639 --> 00:53:51.360
I'm watching this episode on YouTube as we speak.
00:53:51.360 --> 00:53:54.000
Alright, so don't do that.
00:53:54.000 --> 00:53:54.880
Do this.
00:53:54.880 --> 00:53:56.719
I'll cover my face.
00:53:56.719 --> 00:53:58.320
Oh yeah, that's true.
00:53:58.320 --> 00:54:00.400
And uh look at that.
00:54:00.400 --> 00:54:03.199
It looks seamless, looks professional.
00:54:03.199 --> 00:54:11.199
And so, I mean, I went on a deep dive, which is why I missed like 80% of the solutions that uh you and Rich were covering.
00:54:11.199 --> 00:54:16.400
Because I mean actually, and we we can we can bring up this one as well, see if that works.
00:54:16.400 --> 00:54:21.199
So this was my original solution, which uh you covered and translated.
00:54:21.199 --> 00:54:27.440
But one thing that I realized, and we might need to zoom out a little bit, is that um might need to zoom out.
00:54:27.440 --> 00:54:27.840
You know what?
00:54:27.840 --> 00:54:29.760
We're gonna cover your face a little bit too, Adam.
00:54:29.760 --> 00:54:35.039
This is Prime Real Estate here, and uh you're still there, just hitting a little bit.
00:54:35.039 --> 00:54:41.440
And so this histogram primitive, let me go back here so I can monitor the chat still.
00:54:41.440 --> 00:54:46.719
I actually misunderstood what I was doing in this solution.
00:54:46.719 --> 00:54:53.679
I somehow magically stumbled into a working solution, but ultimately what I was trying to do.
00:54:53.679 --> 00:54:59.039
If we zoom back in on uh this, I was trying to do this.
00:54:59.039 --> 00:55:02.159
If we if we uh uncomment it.
00:55:02.159 --> 00:55:09.840
So I was I was trying, well, I mean actually, I wasn't trying to do this because I I didn't have the insight to do the without union fork.
00:55:09.840 --> 00:55:20.320
Very beautiful, and this is a famous, not famous, well, it it only really exists in my head and maybe like one other person because I've mentioned this like once or twice on YouTube videos or podcasts.
00:55:20.320 --> 00:55:24.320
This is what I call the the sci-fi tacit pattern.
00:55:24.320 --> 00:55:28.559
You've got a psi combinator inside a phi combinator.
00:55:28.719 --> 00:55:34.960
Wheo! And technically, it's a phi one combinator because it's a dyadic fork that we're partially applying.
00:55:34.960 --> 00:55:38.880
So that's not sci-fi like sci f I.
00:55:38.880 --> 00:55:46.000
It's a play on that, and it's P S I P H Y, P-H-I, aka the two combinators.
00:55:46.000 --> 00:55:59.440
Um, but ultimately, like when you think about this problem, you really just want to do a histogram count on the vowels that exist in your string and the consonants that exist in your string.
00:55:59.440 --> 00:56:01.920
And then you do a max reduce, you add them together, you're done.
00:56:01.920 --> 00:56:11.920
The problem is that there's no array language that has all of these primitives, which is why we're playing around with key, outer product, and then having fun and saying, what if we didn't have key, etc., etc.
00:56:11.920 --> 00:56:22.480
But really, like the simplest thing, and then also I show below here because Madeline in the chat, author of Tiny Apple, mentioned that this is coming, the quad V, aka lowercase vowels, is coming in 2027.
00:56:22.480 --> 00:56:24.320
May or may not have been a joke, nobody knows.
00:56:24.320 --> 00:56:27.039
But if we did have it, this would be even nicer.
00:56:27.039 --> 00:56:39.119
And then so we have, if you combine that with the without union, you then have your consonants and vowels, you call count, and that's the thing that I'll get back to in a sec.
00:56:39.119 --> 00:56:40.239
I wasn't calling count.
00:56:40.239 --> 00:56:46.079
Count just gets you the frequency counts of your individual characters or numbers in your array.
00:56:46.079 --> 00:56:49.920
I was actually calling histogram, which is the dyadic version of that.
00:56:49.920 --> 00:56:55.360
And uh, anyways, once you do this, you do your max, you call the psi combinator, add them together, you're good to go.
00:56:55.360 --> 00:56:58.239
I think I tried to do something like that.
00:56:58.239 --> 00:57:20.719
If you skip the fact that I missed the without union pattern, I was just trying to construct um a psi combinator, a sci-fi fork where you've got the vowels on one side, the count consonants on the other, and then I was trying to do I was trying to spell this pattern in the middle, but I could not for the life of me figure out how to get it to work.
00:57:20.719 --> 00:57:32.079
And I ended up, you know, you can tell I'm I'm you know twisting stuff around in order to do it in close, and then I've got this what I thought was count each, but it's actually a histogram each.
00:57:32.079 --> 00:57:37.679
And I guess the difference being if we if we open up a well, I guess we can do it below here.
00:57:37.679 --> 00:57:40.239
Um we comment this out for a sec.
00:57:40.239 --> 00:57:57.760
So if you've got I guess and so that's the thing, is banana, it doesn't work with it doesn't work with count, because it's apparently, and Madeline mentioned this in the chat, that uh it is defined as inverse indices or something like that.
00:57:57.760 --> 00:58:01.920
Um and and so yeah, that's the thing actually, Madeline.
00:58:01.920 --> 00:58:12.639
So I I missed the last couple um comments, but Madeline just mentioned you can actually do this with uh a selfie on count, which then comes in.
00:58:12.639 --> 00:58:15.519
How many A's are there, and you're good to go.
00:58:15.519 --> 00:58:24.400
The problem is that if you try to inject this into the middle here, you now no longer have the correct left and right arguments.
00:58:24.400 --> 00:58:39.760
And I am not a tacit ninja enough because like we have combined with we have we've partially applied like an argument on the right, and now we're like we're inside the fork and we're on the right tyne of the over combinator, the psi combinator.
00:58:39.760 --> 00:58:42.079
And so how how did that work?
00:58:42.079 --> 00:58:44.719
I understand how that worked because that's monadic, right?
00:58:44.800 --> 00:58:47.519
So count this is monadic and it doesn't work.
00:58:47.519 --> 00:58:49.360
But if we Yeah, it doesn't actually work.
00:58:49.360 --> 00:58:55.280
But if you put if you just put the the selfie there, it uh it's so now it becomes now it becomes histogram, like we saw before.
00:58:55.599 --> 00:59:09.760
Whoops, and if we zoom out a bit, and then I guess I it now it becomes histogram where we're providing I guess the values that you want to count in order, like it's so it's it's like the bins of a histogram that you want to count.
00:59:09.760 --> 00:59:13.920
And so now you have like the or wait, I'm still doing something wrong.
00:59:13.920 --> 00:59:18.800
Ruben uh Virg, aka Madeline's just saying, no, no, just replace in the first tab.
00:59:18.800 --> 00:59:19.920
Okay, I thought I did that.
00:59:19.920 --> 00:59:25.760
If this works, well actually, I guess we gotta so your code didn't run before?
00:59:25.760 --> 00:59:26.719
What?
00:59:26.719 --> 00:59:30.320
I swear to god, you know, maybe it's too early in the morning.
00:59:30.320 --> 00:59:31.360
That's it, that's it.
00:59:31.360 --> 00:59:33.119
It's not that early in the morning, folks, though.
00:59:33.119 --> 00:59:34.159
It's 1113.
00:59:34.159 --> 00:59:36.079
It's almost afternoon.
00:59:36.079 --> 00:59:38.480
Um, first line of the first tab.
00:59:38.480 --> 00:59:39.920
Which one is the first tab?
00:59:39.920 --> 00:59:40.880
This is the first tab.
00:59:40.880 --> 00:59:44.159
Oh yeah, she's just uh a couple seconds behind us.
00:59:44.159 --> 00:59:50.719
How I don't know what I did earlier, folks.
00:59:50.719 --> 00:59:54.960
Uh, but I swear to god I tried this and it didn't work.
00:59:54.960 --> 00:59:56.719
Well, actually, I didn't swear to god.
00:59:56.719 --> 00:59:59.760
I just uh pretty sure I I tried this.
01:00:00.159 --> 01:00:12.480
So there's a there's a backwards over, I think, in in tiny APL that allows you to get rid of the parentheses just because you can't use an atop operator here because of you need to parenthesize the right side.
01:00:12.719 --> 01:00:13.519
Is that gonna work?
01:00:13.519 --> 01:00:14.639
I don't think that's gonna work.
01:00:16.960 --> 01:00:18.079
We have to glue them.
01:00:18.079 --> 01:00:24.880
You have to put an uh top, explicit atop between the max and the and the count in.
01:00:25.199 --> 01:00:26.960
Oh my god, that apparently worked.
01:00:26.960 --> 01:00:28.000
Oh my god.
01:00:28.000 --> 01:00:31.119
Look at you, you're tiny APL Pro, Tiny Apple Pro.
01:00:31.679 --> 01:00:32.159
Wow.
01:00:32.400 --> 01:00:36.719
I mean, I came up with a few of the primitives in tiny APL.
01:00:36.719 --> 01:00:42.159
So and if we do this, we can almost get the 2027 version of this.
01:00:42.159 --> 01:00:44.239
There is no quad V coming.
01:00:44.559 --> 01:00:45.440
Is there no quad V?
01:00:45.599 --> 01:00:45.920
Was that a joke?
01:00:46.000 --> 01:00:48.400
I didn't confirm in the chat it's a joke.
01:00:48.400 --> 01:00:50.320
Um of course not, because it makes no sense.
01:00:50.320 --> 01:00:55.119
You can't say those are the vowels, and that's just that's just it makes no sense.
01:00:55.920 --> 01:00:58.159
Things have to make sense for them to come true, you know.
01:00:58.159 --> 01:01:00.320
I don't know, maybe not in tiny apple.
01:01:00.320 --> 01:01:05.599
Um, and so this is god, you know, what are we talking about, folks?
01:01:05.599 --> 01:01:06.400
This is beautiful.
01:01:06.559 --> 01:01:20.159
I can't believe though, how did I make I mean uh Madeline says that the the circle uh on the bar is uh is her own invention of a backwards over.
01:01:20.159 --> 01:01:30.159
I mean, I've mentioned in in chat, I think all a long time ago, that very often it's a simple function on the left of over and a complex function, composite function on the right.
01:01:30.159 --> 01:01:32.800
So really it would be nice to have it the other way around.
01:01:32.800 --> 01:01:34.639
Uh but yeah.
01:01:35.039 --> 01:01:43.760
But yeah, this is like uh this is what I was after when I started solving this, but then I failed to, you know, come up with this beautiful fork here.
01:01:43.760 --> 01:01:56.719
And so then I started messing around with stuff, and then I just ended up, you know, I ended up with this abomination, uh, thinking that, you know, I don't know, this was the best that you could do, but but boy oh boy was I wrong, folks.
01:01:56.719 --> 01:02:11.679
And this is you know, I was also thinking too, while you were doing that whole uh putting um all the previous defined solutions, like we gotta we gotta create, we gotta vibe code, a little other screen while we're working through the terminal.
01:02:11.679 --> 01:02:15.440
Whenever we have a solved solution, you just copy and paste it into like a little slot.
01:02:15.440 --> 01:02:30.239
And so like the five minutes that we spent going back and getting all the stuff, it was uh you know, there's a there's a nice, beautiful, you know, vibe-coded website where you can just drop them all in, hit a button, and uh hide the messiness of what we were doing there.
01:02:30.239 --> 01:02:32.880
But that's and it will just find all the definitions.
01:02:32.880 --> 01:02:48.800
No, no, just so like you're still working in the REPL, but if you just copy and paste each time you're done, like a little snippet, just copy it and paste to like okay, we're done with that, and then at the end you can come back and just then we hit a button, it rolls compare X, and uh and then it does some nice little whatever fancy animation.
01:02:48.800 --> 01:02:54.880
Um yeah, this is this is this is nice.
01:02:55.039 --> 01:02:58.800
It's not I mean, uh is it significantly better than the key one?
01:02:58.800 --> 01:02:59.440
Oh, of course.
01:03:02.079 --> 01:03:04.800
I'm a I'm a code golfer at heart, you gotta understand, you know.
01:03:04.800 --> 01:03:07.360
Like that's uh it's yes, I understand.
01:03:07.360 --> 01:03:15.920
You know, when you guys were getting rid of like you were like you were doing the what did they call it, the broken keyboard exercise, where it's like what's the best you can do without this, and I'm just like, what?
01:03:15.920 --> 01:03:19.280
That's that's like you're stabbing the code golfer in the heart right there.
01:03:19.280 --> 01:03:20.400
It's like you can't take my primitives.
01:03:20.800 --> 01:03:22.400
What do you do if you've got a broken keyboard?
01:03:22.639 --> 01:03:23.360
It's important.
01:03:23.360 --> 01:03:26.079
You just uh I don't know.
01:03:26.079 --> 01:03:26.800
That's the thing.
01:03:26.800 --> 01:03:28.960
Well, can I still get to every primitive?
01:03:28.960 --> 01:03:31.199
I think that's the thing, is I've got control space.
01:03:31.199 --> 01:03:35.840
As long as space isn't the broken key, I can always fuzzy find my way to the primitive key.
01:03:35.840 --> 01:03:41.599
Yeah, we've got things like I didn't actually know the name of uh so it's back tick back tick oh.
01:03:41.599 --> 01:03:42.239
Like I didn't know that.
01:03:42.239 --> 01:03:48.320
And even even pair, like I use pair all the time, but I can never remember it's back tick backtick semicolon.
01:03:48.320 --> 01:03:53.440
Literally, this is every time I want to type pair, I go back tick semicolon, and I'm like, oh, that's not it.
01:03:53.440 --> 01:03:54.960
And then I said, is it back tick, comma?
01:03:54.960 --> 01:03:57.360
That's not it, and I go, ah, whatever, I'll just I'll just do it.
01:03:57.360 --> 01:04:02.320
And then like I swear to god, every month I I learn it for like three days and then I forget.
01:04:02.320 --> 01:04:13.199
Um, because I guess like I said, I'm not I'm not coding in these languages on uh but the thing is is the broken keyboard, I got my I've gotten and even even if space is gone, I can do this, and then I can just fuzzy find my way, you know.
01:04:13.199 --> 01:04:16.639
There's multiple ways to get to these uh these primitives.
01:04:16.639 --> 01:04:19.039
Anyways, uh is it vastly better?
01:04:19.039 --> 01:04:20.159
I mean defined better.
01:04:20.159 --> 01:04:20.880
Is it more beautiful?
01:04:21.280 --> 01:04:26.639
You want to put in put in the you can just type in in normal in dialogue APL thing.
01:04:26.639 --> 01:04:30.400
And the normal the the equivalent thing.
01:04:30.400 --> 01:04:32.960
So you want to place it in chat for you?
01:04:32.960 --> 01:04:34.000
Or oh sure, yeah.
01:04:34.000 --> 01:04:36.320
Or you want to you can you can I can dictate it.
01:04:36.880 --> 01:04:37.760
Okay, what are we doing here?
01:04:37.760 --> 01:04:44.880
This is the this is the open paren without plus it's wait, is this is this gonna be a non this is APL, so we're just doing it.
01:04:44.960 --> 01:04:49.280
This is the dialogue APL one, but it might yeah, but just to compare what they look like.
01:04:49.280 --> 01:04:53.519
Uh open paren uh without plus over open paren.
01:04:53.519 --> 01:04:57.039
Uh without plus open paren.
01:04:57.039 --> 01:04:58.719
Oh over, yeah.
01:04:58.719 --> 01:05:04.880
Open yeah, you got that open paren here, and then uh max reduction.
01:05:06.639 --> 01:05:09.599
And I guess there's leg, that's why you're watching the YouTube channel.
01:05:09.599 --> 01:05:10.559
I'm watching the video, yeah.
01:05:10.559 --> 01:05:13.360
You can just keep talking, assume I'm doing it right, and then we'll correct it afterwards.
01:05:13.360 --> 01:05:20.239
Uh tally at top right tech, tally, top right tack, that's that one.
01:05:20.800 --> 01:05:26.480
And then after the key, you close the parent, and then you're missing the key.
01:05:26.559 --> 01:05:26.880
Yeah.
01:05:27.119 --> 01:05:28.159
Alright, I added it.
01:05:28.159 --> 01:05:28.480
Yeah.
01:05:29.280 --> 01:05:31.280
The latency here, it's it's messing with us.
01:05:31.280 --> 01:05:31.840
Yeah.
01:05:31.840 --> 01:05:33.199
The intersection.
01:05:33.199 --> 01:05:34.320
Intersection.
01:05:38.000 --> 01:05:38.719
Yeah, exactly.
01:05:38.719 --> 01:05:42.480
So then and then you finish the the rest, right?
01:05:42.480 --> 01:05:46.719
After the closing the parentheses, and then jot V for the vowels.
01:05:46.719 --> 01:05:58.480
Is that so what you mean you lose you are saving one character by doing the reverse and the reverse over.
01:05:58.480 --> 01:06:06.400
But other than And over the uh other than that, there's two characters less by having the additional primitive of the count in.
01:06:07.840 --> 01:06:18.000
Yeah, but so I this is a interesting, I guess for the last nine minutes of this conversation, it's an interesting discussion of like yeah, I see your point.
01:06:18.320 --> 01:06:31.280
This dialogue APL solution, so I guess maybe we can put uh you can also even it out a little bit by by if you don't define it with the vowels, but you just have the actual the actual function, right?
01:06:31.280 --> 01:06:34.400
So get rid of the outer parenthesis and the jot v.
01:06:34.400 --> 01:06:41.039
That makes that saves you two characters over a tiny APL that has to have its its white moons or whatever they're called.
01:06:41.440 --> 01:06:42.079
Right, right.
01:06:42.079 --> 01:06:42.719
I see, I see.
01:06:42.719 --> 01:06:44.159
But well, yeah, we'll we'll avoid that.
01:06:44.159 --> 01:06:45.519
But I definitely see your point.
01:06:45.519 --> 01:06:52.400
The the dialogue APL isn't much worse, or in other words, the tiny apple isn't much better.
01:06:52.400 --> 01:07:23.599
But I would my my affinity uh towards the tiny apple is that this primitive, even though I misunderstood it or misused it, I should say, uh, I'm still gonna go ahead and make the argument that the like if you were to measure the complexity, uh, which is obviously a very, very subjective thing, and you could argue that just like the the you know crescent parens and the tacit programming that exists in this, that could be the most you know complicated thing here.
01:07:23.599 --> 01:07:26.800
But I I'm a very I'm I'm a decent tacit programmer.
01:07:26.800 --> 01:07:56.000
Um and so when I look at the complexity in my mind of like the topics here, for me, like this is the thing that stands out as the most complex, or I don't know if complex is the right word, but you know, for plus or minus for some definition of the right word that I'm looking for, like I always, you know, there's so many things going on in here, like the key, the tally, the atop, the tack, when really all I want is frequency count.
01:07:56.000 --> 01:07:56.880
That's all I want.
01:07:56.880 --> 01:08:02.559
And like you can memorize this idiom as the frequency count that you want.
01:08:02.559 --> 01:08:09.440
Um, but like for me, having a single glyph, and I guess that's the thing, is this isn't even really fit frequency count.
01:08:09.440 --> 01:08:14.960
It's histogram with you know the uh well, yeah, it's it's it's four characters, right?
01:08:15.199 --> 01:08:17.680
Those are the that is really the difference in the length here, right?
01:08:17.680 --> 01:08:22.640
That we got taniotop right key, which I remember as a as a single thing.
01:08:22.640 --> 01:08:25.840
I know that that is exactly what's called histogram, right?
01:08:25.840 --> 01:08:32.800
Uh, and you got the epsilon over over.selfie, which is the histogram, right?
01:08:32.800 --> 01:08:37.359
Those those are two in either either way, you have to remember a phrase.
01:08:37.359 --> 01:08:42.800
You don't have a histogram primitive for self self-histogram or whatever you want to call it.
01:08:42.800 --> 01:08:44.720
Well, so the thing is he's doing here.
01:08:44.960 --> 01:08:51.760
Madeline early in the chat said that uh you know this doesn't work on uh Unicode strings.
01:08:51.760 --> 01:08:55.520
Uh it could, but I I think I don't know.
01:08:55.520 --> 01:09:06.720
I I might have missed I I might have missed part of the conversation, but if I recall correctly, like if we go over here, destroy this solution, and then we just go count on iota 4.
01:09:06.720 --> 01:09:08.560
It should just give us you know this.
01:09:08.560 --> 01:09:18.239
But if we go uh uh this it's not gonna work because the way that this is defined, I think, is the inverse of interval.
01:09:18.239 --> 01:09:20.319
Um and we could we could check to see if you can see.
01:09:20.560 --> 01:09:21.760
You can't use it on character.
01:09:22.239 --> 01:09:25.760
So uh inverse on where is this it?
01:09:25.760 --> 01:09:27.039
Is this how you spell it?
01:09:27.039 --> 01:09:27.920
Or indices?
01:09:27.920 --> 01:09:29.039
How do you spell indices?
01:09:29.039 --> 01:09:30.479
No, it's just a Yotanda bar.
01:09:30.479 --> 01:09:31.439
It's APL.
01:09:31.439 --> 01:09:32.319
Oh, right, right, right.
01:09:32.319 --> 01:09:34.479
I'm getting my I'm getting my languages mixed.
01:09:34.479 --> 01:09:40.399
Yeah, so it's just this, and then of course that makes sense uh that this doesn't work, right?
01:09:40.399 --> 01:09:47.279
But if this did work, you know, if this did work for your um, so what what would it it it would give?
01:09:47.279 --> 01:09:49.039
Yeah, I guess I don't know.
01:09:49.039 --> 01:09:51.520
I guess it's a little bit uh it's a little bit that and that's the thing.
01:09:51.520 --> 01:10:07.359
I've had this discussion as well um with uh Elias, creator of Cap, that I I lean probably not even arguably, definitely, it's just a fact that I lean like past pragmatic, way far to just like I just want things to work.
01:10:07.359 --> 01:10:22.880
And so one of the things that works in Tiny Apple is that if you lowercase, uh or if if you lowercase, if you use the max glyph, the min glyph on a string, but like technically, I asked Elias if he could implement this for cap.
01:10:22.880 --> 01:10:29.359
And he looked into it and considered it, but then said it it kind of breaks when you go to certain alphabets.
01:10:29.359 --> 01:10:39.520
And so like it's not a it's not a uh as as uh Marshall would say, it's not a very uh principled approach to implementing lowercase.
01:10:39.520 --> 01:10:51.439
And so I exchanged emails back and forth with Elias, it was just a couple, but he he said, you know, I I did consider it, but you kind of are doing something that's not you know holistically principled if you do this.
01:10:51.439 --> 01:11:00.560
That being said, I still like I still love this because the alternative in a lot of things, like I mean, I guess in in uh dialogue APL, it's quite nice, it's just quad C.
01:11:00.560 --> 01:11:08.239
But in I think Cap, it's like you know, you have to use like the system function, and then it's it's it's lower or something like that.
01:11:08.239 --> 01:11:17.840
And like, you know, like I said, I'm a code golfer at heart, and stuff like that, like when you can shave something down to a single character, and then it's also too it just it maps, you know.
01:11:17.840 --> 01:11:21.359
Uh I mean the the first I didn't invent this.
01:11:21.680 --> 01:11:36.079
Um uh the K language, at least some of them, uh, have the round down symbol, which is the underbar, does lowercase, it doesn't have round up, and therefore the problem doesn't exist so much.
01:11:36.079 --> 01:11:38.560
Why would you ever uppercase, right?
01:11:38.560 --> 01:11:42.640
In in high frequency trading land, why would you ever uppercase?
01:11:42.640 --> 01:11:50.239
Um, so and and notice all the K people tend to uh tend to write everything in lowercase, they never even use uppercase letters.
01:11:50.239 --> 01:12:02.560
Um so I extended that in like my extend uh or I took that idea into the extended dialogue APL many years ago now, and I used uppercase, lowercase, and more arithmetic.
01:12:02.560 --> 01:12:18.960
So I did things like minus would flip the case and um and the sign for monetic uh multiplication sign that that would give you the case, tell you which if it's uppercase or lowercase, and would give it like one for uppercase, negative one for lowercase, and zero for something that doesn't change case.
01:12:18.960 --> 01:12:26.239
Um and as uh as Jacob is saying, absolute value of a character is uppercase and negation is swap case.
01:12:26.239 --> 01:12:28.720
Yeah, but it doesn't it that's not quite right, actually.
01:12:28.720 --> 01:12:32.079
Absolute value, there are multiple issues with this.
01:12:32.079 --> 01:12:37.039
And I looked all into this when we were creating Quad C, and I I'll tell you a little bit about it here.
01:12:37.039 --> 01:12:43.680
Um the the problem so what Marshall complained about is they're not idempotent towards each other, right?
01:12:43.680 --> 01:12:51.039
Up um floor and ceiling, if you floor, then you have integers and they never change again.
01:12:51.039 --> 01:12:54.880
But if you lowercase, then you can uppercase afterwards.
01:12:54.880 --> 01:13:03.760
Never mind that there are strange things in Unicode where things are not mapping symmetrically, but even that that's already a warning sign that there's a problem there.
01:13:03.760 --> 01:13:06.079
Uh then the but there's actually different things.
01:13:06.079 --> 01:13:11.039
There's something called case mapping, and there's something called case folding, and they're not the same.
01:13:11.039 --> 01:13:16.479
So in most cases, you see case mapping and case uh folding to lowercase.
01:13:16.479 --> 01:13:18.079
So the case folding is just in two versions.
01:13:18.079 --> 01:13:24.319
There's fold to uppercase, fold to lowercase, that's actually another fold, but that that's so obscure, you don't care about it.
01:13:24.319 --> 01:13:36.800
Um but case uh fold to lowercase, which is what many people think of when they say lowercase, is not the same as uh as case sorry, case mapping to I mean I messed up.
01:13:36.800 --> 01:13:40.399
Um uppercase mapping, uppercase uh lowercase mapping.
01:13:40.399 --> 01:13:43.600
Mapping to lowercase is not the same as case folding.
01:13:43.600 --> 01:13:50.560
Case folding means unifying multiple letters that signify the same thing to a single character.
01:13:50.560 --> 01:14:03.600
So just like an uppercase uh A is the same thing as a lowercase a, linguistically speaking, we can fold the two of them together to become a single thing, which we choose arbitrarily that the lowercase form should be the standard form.
01:14:03.600 --> 01:14:11.600
Um but in some alphabet, some letters have uh variant forms.
01:14:11.600 --> 01:14:22.000
So for like in Greek, there's a final sigma, and the final sigma incre uh is the same thing linguistically sort of as the normal sigma, but it only appears at the end of a word.
01:14:22.000 --> 01:14:29.359
So if you want to unify all the sigmas, you take the uppercase sigma and the lowercase sigma and the lowercase final sigma.
01:14:29.359 --> 01:14:38.800
There is no uppercase final sigma, and they all get converted into um a single letter, which is the non-final lowercase sigma.
01:14:38.800 --> 01:14:44.560
Okay, but this doesn't map to floor and ceiling at all, you just can't do that.
01:14:44.560 --> 01:14:46.239
Um, so that's one problem.
01:14:46.239 --> 01:15:00.239
Another problem is that uh the Cherokee alphabet was originally defined only in uppercase, and then they added a lowercase form later, and therefore the normal form that when we fold is to uppercase, not to lowercase.
01:15:00.239 --> 01:15:11.199
And then there are other oddities like in uh in Turkish uh and I think also other Turkic languages, you got dotted i and undotted i.
01:15:11.199 --> 01:15:15.600
Um, so in English, uppercase i is not has no dot, lowercase i has a dot.
01:15:15.600 --> 01:15:25.039
But in Turkish, you've got uppercase i with a dot, and then lowcase form of that is lowcase i with a dot, and there's an uppercase i without a dot, and a lowcase form of that which is lowcase i without a dot.
01:15:25.039 --> 01:15:26.560
And they mean completely different things.
01:15:26.560 --> 01:15:30.079
And I believe somebody even got killed over the difference between them.
01:15:30.079 --> 01:15:36.159
Um so the mapping isn't actually as great as you might think.
01:15:36.159 --> 01:15:41.119
It seems cool at first, but it's not it's actually not that precise.
01:15:41.119 --> 01:15:50.239
Um, absolute value would be the normalization that would be the uh the case folding, and but it still doesn't quite work.
01:15:50.239 --> 01:16:03.199
Not to mention, if you're dealing with Unicode, there are actually different types of uppercasing, lower casing, and normalization things where do you allow a letter to become to change do you let do you allow a text to change length when you change the case?
01:16:03.199 --> 01:16:06.479
And you might think like what how does it change how does it change lengths?
01:16:06.479 --> 01:16:07.359
But that is the case.
01:16:07.359 --> 01:16:16.960
In in at least traditionally in German, if you take you know, you know, German has a double s or a set sharp s uh letter, it looks sort of like a Greek beta.
01:16:16.960 --> 01:16:21.119
And if you uppercase that traditionally it splits into two normal s's.
01:16:21.119 --> 01:16:25.039
But if you lowercase that again, you get two lowercase s's.
01:16:25.039 --> 01:16:35.039
Because you cannot auto-combine, it depends on the meaning of the word whether two uppercase s's combine into a single glyph, uh that is a lowercase uh double s.
01:16:35.039 --> 01:16:47.199
And then Unicode later added an uppercase double s and uh and that doesn't map from the lowercase one because Unicode has a stability policy.
01:16:47.199 --> 01:16:55.680
So all the tools that uppercase they tend to fail on that one letter because Unicode doesn't define it as being the uppercase of the its corresponding lowercase form.
01:16:55.680 --> 01:16:56.880
So everything is asymmetric.
01:16:56.880 --> 01:17:00.079
There's so many issues with this, and then comes the big kicker.
01:17:00.079 --> 01:17:02.560
Let's say you want to compare some data, right?
01:17:02.560 --> 01:17:11.279
Let's say you got a name of a person and an age, and you want to check, do some checking to see is are these two representations of the same person the same?
01:17:11.279 --> 01:17:15.680
So maybe it's spelled with uppercase and lowercase letters, and other ones only spelled in uppercase.
01:17:15.680 --> 01:17:28.399
And and when you've got these mixtures or maybe a nested form of uh of data, often you want to normalize all the character data, but you don't want to have to walk the whole structure to find the character data.
01:17:28.399 --> 01:17:37.119
So what Quad C does, which you probably never see, no pun intended, um is that uh it only touches character data.
01:17:37.119 --> 01:17:45.039
So you can actually uppercase lowercase numeric data or references or uh weird objects and things, and they will just stay as they are.
01:17:45.039 --> 01:18:01.119
And and if we if we overloaded the round up and round down primitives to touch letters as well, then you wouldn't be able to change the case of a whole structure, the character case of a whole structure of uh of data.
01:18:01.119 --> 01:18:06.720
You would have to walk walk it and single out the characters and convert only the those.
01:18:06.720 --> 01:18:08.159
Make sense?
01:18:08.159 --> 01:18:11.920
Or did I there was law and monologue here.
01:18:12.640 --> 01:18:22.880
No, I I mean uh a couple people in the chat are are saying that it does seem like Wewa uh supports the ability to do this stuff with uh custom fill values and whatnot.
01:18:22.880 --> 01:18:29.359
But I mean your long monologue does highlight the point that I understand Unicode is very complicated, but I just want nice things.
01:18:29.359 --> 01:18:30.640
And guess what?
01:18:30.640 --> 01:18:35.520
A couple languages that I never use are gonna fall by the wayside.
01:18:35.520 --> 01:18:42.319
If I ever have my own array language, it's gonna be optimized for golfing folks and speed as well.
01:18:42.319 --> 01:18:50.239
But if there's some like Greek letter that doesn't have something and uh, you know, it it's a character that goes to multiple code points, guess what?
01:18:50.239 --> 01:19:00.399
That that the for the Greek folks out there, I do apologize, but whenever you go to type that letter and you're using my array language that is optimized for golfing, it's gonna be uh it's gonna be a sad day.
01:19:00.399 --> 01:19:02.640
Hopefully it's only one day out of your entire life.
01:19:02.640 --> 01:19:14.319
But um, I do understand that there's all these things that um yeah, it's it's if you really want, like I say, like you know, the martial principled approach, you shouldn't do those things.
01:19:14.319 --> 01:19:27.600
But I am much more in favor, uh not so much in like I'm not saying it makes it a language better or not, but just if I had my own ideal language, I always prefer a single, you know, the quad V.
01:19:27.600 --> 01:19:28.880
I know it's like of course that's a joke.
01:19:28.880 --> 01:19:29.439
Is it a joke?
01:19:29.439 --> 01:19:31.119
Sounds great to me, ship it, you know?
01:19:31.199 --> 01:19:39.439
Like if you're making a golfing language, so something like jelly, jelly has, I believe, built-ins both for the vowels with and without y.
01:19:39.439 --> 01:19:48.399
And like uppercase and lowercase and both cases, and like so it's got all six combinations of those and the consonants with and without y, uppercase and lowercase in both of them.
01:19:48.399 --> 01:19:49.119
Yeah, sure.
01:19:49.119 --> 01:19:51.520
For golfing language, you want that.
01:19:51.520 --> 01:19:52.399
Yeah.
01:19:52.399 --> 01:19:58.800
Uh but in it, but for practical and and certainly dialect cannot become a golfing language.
01:19:58.800 --> 01:20:02.560
And for practical applications, it's very useful to do this sort of thing.
01:20:02.560 --> 01:20:11.920
And that we are um you could even say that floor and ceiling should skip character data, should skip non-numeric data and and just round things.
01:20:11.920 --> 01:20:17.359
Uh but maybe maybe all arithmetic functions should uh skip non-numbers.
01:20:17.359 --> 01:20:26.800
Um, there's a actually there's another objection to this sort of thing, and that is that your langu the definition of your language depends on Unicode.
01:20:26.800 --> 01:20:30.239
So the language itself isn't stable.
01:20:30.239 --> 01:20:45.520
Um and even more sort of broad is that um maybe in the future, when we have contact with aliens and things, and they've got writing systems that are completely different from ours, Unicode will be replaced with something else.
01:20:45.520 --> 01:20:49.279
Today Unicode seems so universal, but it wasn't always.
01:20:49.279 --> 01:20:52.159
There were different ways of representing things before.
01:20:52.159 --> 01:21:01.840
Um, yeah, and as as Madeline saying, maybe Unicode version 50 has negative code points, and you want minus A to give the negated A.
01:21:01.840 --> 01:21:03.039
Yeah, who knows?
01:21:03.039 --> 01:21:11.920
Maybe we find we discover a new dimension, and like text in this dimension needs to be like text that progresses backwards in time, or like anti-meta text, or who knows?
01:21:11.920 --> 01:21:14.319
Like we we don't know what's going to be in the future.
01:21:14.319 --> 01:21:26.000
Um imagine if we had made the language design uh way back in time when nobody in the West that designed these things cared about other alphabets and things out there in the world.
01:21:26.000 --> 01:21:33.760
And then we lock down the primitives, we can't change the meaning of the primitives, that then we don't have a language to communicate in anymore.
01:21:33.760 --> 01:21:44.560
So if we lock down the meaning of these primitives based on a limited vocabulary of characters, and later we discover we actually need more, and now we can't change things.
01:21:44.560 --> 01:21:46.079
You really have this problem, right?
01:21:46.079 --> 01:22:02.319
You've got things like Windows APIs and JavaScript that um that limit themselves to 65,536 characters in the character set, because it was originally thought even by Unicode, right?
01:22:02.319 --> 01:22:04.880
It was thought that, oh, that's that'll be enough.
01:22:04.880 --> 01:22:15.600
We don't need uh need more characters, and then we extended Unicode to go up to well, not quite four bytes, but almost, and 1.1 million characters instead.
01:22:15.600 --> 01:22:20.399
And all of a sudden, those APIs, those languages are broken, right?
01:22:20.399 --> 01:22:25.520
If if you actually try to deal with Unicode text in JavaScript, you'll see that it's plain broken.
01:22:25.520 --> 01:22:28.960
I'm sure there are other languages that I'm less familiar with that are just plain broken.
01:22:28.960 --> 01:22:37.199
And you can you can easily write some JavaScript that creates a string that is impossible, a string that must not exist.
01:22:37.199 --> 01:22:46.319
And then if you catenate two or join, I guess it's called there, if you can join two strings that must not exist, you can all of a sudden have a valid string again.
01:22:46.319 --> 01:22:56.960
You get all kinds of nonsense comes out of this, and it's a huge pain for every application because today Unicode is generally represented using UTF-8, at least when it's in text form.
01:22:56.960 --> 01:23:17.520
Um you have to do all these weird conversions to uh to two bytes with surrogate pairs, and there's a there are blocks, two blocks of the Unicode character set that contain characters that must never appear because they're reserved for the surrogates that are indicators that you're relying on the legacy system.
01:23:17.520 --> 01:23:18.960
It's a huge mess.
01:23:18.960 --> 01:23:26.640
And and but Windows defined its API based on an old version of Unicode before it appeared to people that it needed more than that.
01:23:26.640 --> 01:23:35.520
Are we really so haughty as to say that the current Unicode with UTF-8 and the 1.1 million characters, that is the final?
01:23:35.520 --> 01:23:37.680
That's it, that that's all there will ever be.
01:23:37.680 --> 01:23:48.640
And if we want an array language to last forever, to be like a legacy for for the ages, should we define as primitives in terms of some something as fleeting as a character encoding?
01:23:48.640 --> 01:23:49.359
I think not.
01:23:49.359 --> 01:23:54.079
So system functions they can come and go, they have a lifespan of some decades.
01:23:54.079 --> 01:23:55.760
But primitives there forever.
01:23:55.760 --> 01:24:07.359
So by defining quad C, you know, okay, maybe Unicode will go away, replaced by something else in Galactic Code, and and we'll replace Quad C with, I don't know, quad G, who cares?
01:24:07.359 --> 01:24:09.279
And deprecate quad C.
01:24:09.279 --> 01:24:18.640
But if we had defined it in with terms of the arithmetic functions, then yeah, that's uh it's it's goner.
01:24:18.640 --> 01:24:20.399
What it's a goner?
01:24:20.399 --> 01:24:22.079
Yeah, the language is a goner, right?
01:24:22.159 --> 01:24:22.479
Oh yeah.
01:24:22.720 --> 01:24:30.640
One day in the future, contact with aliens and things, and we need like a billion different characters to represent all the different languages in the galaxy, right?
01:24:30.640 --> 01:24:37.279
And Unicode has as as uh Madeline said, uh Unicode has said there won't be any 18th plane, right?
01:24:37.279 --> 01:24:45.520
We're cutting it off at uh at 1,114,112 characters.
01:24:45.520 --> 01:24:46.880
And that's it.
01:24:46.880 --> 01:24:49.840
We've a stability policy, and we're never gonna exceed that, right?
01:24:49.840 --> 01:24:52.000
640k is enough, folks.
01:24:52.000 --> 01:24:52.720
Go home.
01:24:53.119 --> 01:25:05.199
And you're the limits of your imagination are that you assume that the language and communication mechanism of these aliens is gonna be representable in some kind of uh you know written or printed language.
01:25:05.840 --> 01:25:09.840
We we we don't direct language straight to the brain, you know.
01:25:09.920 --> 01:25:10.960
There's no way to record it.
01:25:10.960 --> 01:25:17.119
It's just it's just alien, human, you know, even calling it a brain is limited, you know.
01:25:17.199 --> 01:25:25.680
There's just gonna be some way to you know, the best word that we have to describe is telepathy, but it's the like we think about the representing dates.
01:25:25.680 --> 01:25:28.159
The year is 1970, right?
01:25:28.159 --> 01:25:31.439
How many digits do you need to represent the the year?
01:25:31.439 --> 01:25:32.560
Two, right?
01:25:32.560 --> 01:25:33.760
70.
01:25:33.760 --> 01:25:36.000
What's going to happen in 30 years?
01:25:36.000 --> 01:25:37.760
We're not gonna be around.
01:25:37.760 --> 01:25:39.840
There'll be somebody else's problem to deal with that.
01:25:39.840 --> 01:25:45.039
So now the ISO standard is we represent years with four digits.
01:25:45.039 --> 01:25:47.039
That will be plenty, don't worry.
01:25:47.039 --> 01:25:49.920
Year 10,000, not my problem.
01:25:49.920 --> 01:25:53.520
And then all the software will break in year 9999.
01:25:53.520 --> 01:25:54.960
Man, this episode.
01:25:54.960 --> 01:25:55.760
Oh, right.
01:25:55.760 --> 01:26:02.239
So um in the chat, yeah, Jacob says uh assuming aliens will have case characters.
01:26:02.239 --> 01:26:03.199
Oh, we don't know.
01:26:03.199 --> 01:26:06.880
But but but Madeline is saying aliens actually have middle case as well.
01:26:06.880 --> 01:26:10.960
I mentioned it briefly before, but there are actually three cases in Unicode.
01:26:10.960 --> 01:26:12.000
Deal with that.
01:26:12.000 --> 01:26:20.319
Uh there's a middle case called title case, and there are only a handful of characters that have a title case, but they actually have three different cases.
01:26:20.319 --> 01:26:23.760
There's uppercase, lowercase, and title case on those characters.
01:26:23.760 --> 01:26:27.359
And Dimas's name begins with one of them.
01:26:27.359 --> 01:26:29.119
There you go, folks.
01:26:29.279 --> 01:26:30.800
What better way to end this?
01:26:30.800 --> 01:26:38.479
Definitely we didn't run off the Rails uh episode of a raycast talking about aliens and the cases.
01:26:38.479 --> 01:26:40.319
Yeah, we are the aliens.
01:26:40.319 --> 01:26:40.960
Yeah.
01:26:41.199 --> 01:26:42.079
Or these daimas.
01:26:42.079 --> 01:26:46.800
Look at the code you write, and the array languages that he implements like gotta be alien.
01:26:46.800 --> 01:26:49.039
It's got a title case character in his name.
01:26:49.359 --> 01:26:50.079
There you go.
01:26:50.079 --> 01:26:52.479
The things you learn on a raycast.
01:26:52.479 --> 01:26:55.600
Alright, well, this has been very fun.
01:26:55.600 --> 01:26:57.760
Didn't realize when Rich left.
01:26:57.760 --> 01:27:00.720
You know, he was the only thing holding us together, you know.
01:27:03.520 --> 01:27:06.479
Um Do you think we'll be able to do a next episode?
01:27:06.479 --> 01:27:09.199
Have you how many bits have you reserved for the episode number?
01:27:09.520 --> 01:27:10.319
Oh, it's fine.
01:27:10.319 --> 01:27:12.079
I think we've I think we can go.
01:27:12.079 --> 01:27:20.079
I mean, it's represented by ASCII, so even if we run out of numbers, which we won't, uh, we should be fine.
01:27:20.079 --> 01:27:23.119
I guess yeah, maybe we should do something special for next episode.
01:27:23.119 --> 01:27:27.920
It's not every it's not every episode you have a power of two, and they're becoming more and more rare.
01:27:28.239 --> 01:27:28.880
Yes.
01:27:29.279 --> 01:27:39.920
Anyways, we will leave links in the description to the Pro Weekly Pro Weekly Challenge, the Dyna videos, and maybe the other stuff that uh we mentioned in this episode.
01:27:39.920 --> 01:27:47.359
I guess with that, we will say Happy Programming and thanks everybody that uh participated in the chat.
00:00:14.160 --> 00:00:18.640
Welcome to episode 127 of Arraycast.
00:00:18.640 --> 00:00:22.480
I am your host, Connor, and today with us we have two panelists.
00:00:22.480 --> 00:00:24.879
I guess we can actually call that a panel.
00:00:24.879 --> 00:00:31.440
I've got Adam and Rich with us, so we're gonna go around and do brief introductions, and after that, we'll have uh a couple announcements, maybe just one.
00:00:31.440 --> 00:00:33.359
So we'll start with Adam and then we'll go to Rich.
00:00:34.320 --> 00:00:44.000
Right, I'm Adam Bossewski, and I do lots of APL things at Dialog Limited, where they gave me the title Head of Language Design 2.
00:00:44.640 --> 00:00:46.000
I'm Rich Park.
00:00:46.000 --> 00:00:50.880
I also do some APL things, uh including training and media at Dialogue Limited.
00:00:51.200 --> 00:00:54.479
And as mentioned before, my name's Connor, host of ArrayCast.
00:00:54.479 --> 00:00:59.679
Massive fan of all the array languages, and I think that's it for introduction.
00:00:59.679 --> 00:01:03.280
So I believe we've got just the one announcement, and we'll go over to Rich for that.
00:01:03.679 --> 00:01:15.120
Yeah, so this spring we hosted the Dialogue North America user meeting in New York, and recently we've been releasing recordings of the presentations from that conference.
00:01:15.120 --> 00:01:20.079
So if you go to the Dialogue User Meeting YouTube channel, I'm sure we'll put links in the appropriate places.
00:01:20.079 --> 00:01:28.400
Uh, you can watch presentations from myself and a couple of other dialogue people and some users as well.
00:01:28.799 --> 00:01:29.120
Awesome.
00:01:29.120 --> 00:01:30.319
Yeah, I've seen a couple of those.
00:01:30.319 --> 00:01:33.439
I know I've bookmarked at least one of them.
00:01:33.439 --> 00:01:37.200
I think it was by Asher, but I could be wrong about that.
00:01:37.200 --> 00:01:42.480
I think he gave a talk on the latest and greatest things in dialogue APL.
00:01:42.480 --> 00:01:43.280
Probably most.
00:01:43.280 --> 00:01:45.280
Did he give a couple talks?
00:01:45.680 --> 00:01:53.439
Uh he did one that was sort of uh APL primitive developments um this century.
00:01:53.439 --> 00:02:01.599
And then leading up to the enhancements in dialogue version 20, which does include more than just primitives, but yeah.
00:02:02.000 --> 00:02:03.040
I can't remember which one I have.
00:02:03.040 --> 00:02:05.760
I've got them in a Google Doc.
00:02:05.760 --> 00:02:13.680
I love the feature in Google Doc where you you paste a link and then half a second later the YouTube icon with the name of the video replaces that link if you hit tab.
00:02:13.680 --> 00:02:23.599
Anyways, we will link those two talks, plus any of the other Dyna Talks that have come out if you weren't in New York for that uh meeting.
00:02:23.599 --> 00:02:28.240
And you can watch them on your own time, leave comments, get your questions answered.
00:02:28.240 --> 00:02:35.039
And with that announcement out of the way, I believe today, as we have been doing for the last couple episodes, we are going to live code some APL.
00:02:35.039 --> 00:02:41.360
I'm acting we actually didn't discuss is it gonna be Rich or is it gonna be Adam that's gonna screen share who's gonna who's gonna go first?
00:02:41.360 --> 00:02:45.280
Or maybe I'll just throw the problem out there and then whoever's more excited can screen share first.
00:02:45.280 --> 00:02:47.439
So I don't actually know.
00:02:47.439 --> 00:02:50.319
I guess you know, we we could be more prepared on this podcast.
00:02:50.319 --> 00:02:57.360
It's another Pearl Weekly Challenge, and I remember the problem very distinctly, uh, but I don't actually know the number.
00:02:57.360 --> 00:03:01.439
I think it was not today's because they usually drop on Mondays, but last week's.
00:03:01.439 --> 00:03:15.520
And the problem description is you're given a string, for instance, banana, and you're asked to sum the maximum count of a vowel, like the most frequent vowel and the most frequent consonant.
00:03:15.520 --> 00:03:19.360
Some sum the count of the most frequent vowel and the most frequent consonant.
00:03:19.360 --> 00:03:19.919
Yes.
00:03:19.919 --> 00:03:24.719
So for instance, if you have banana, that's what three A's and two N's?
00:03:24.719 --> 00:03:26.479
So the answer would be five.
00:03:26.479 --> 00:03:34.000
And you don't care about the B, because the frequency count of the B is one, and that's exceeded by the frequency count of the N, which is two.
00:03:34.000 --> 00:03:44.560
And if you've got a string like A B C, the answer is just going to be two, because you've got one B, one C for the consonants, one vowel, which is one plus one equals two.
00:03:44.560 --> 00:03:55.280
So a rather simple problem to state, and there's a lot of utilities in the array languages for generating alphabets and whatnot.
00:03:55.280 --> 00:04:00.479
But the interesting thing is that you have to split the vowels from the consonants, right?
00:04:00.479 --> 00:04:03.120
And need to keep the vocabulary.
00:04:03.120 --> 00:04:07.120
Yeah, we talked about that on the previous episode.
00:04:07.120 --> 00:04:11.680
So, anyways, now I get to kick my feet up and throw it over to both of you.
00:04:11.680 --> 00:04:13.039
I'm not sure.
00:04:13.039 --> 00:04:13.680
Yeah.
00:04:13.680 --> 00:04:15.120
Think a little bit.
00:04:15.120 --> 00:04:17.600
Or we can yeah, we can just chat before we show code.
00:04:17.600 --> 00:04:18.959
Or we don't even need to show code.
00:04:18.959 --> 00:04:22.240
We can make this an audio-friendly episode, which I'm sure we won't.
00:04:22.879 --> 00:04:24.160
Purely in the brain.
00:04:24.160 --> 00:04:29.360
Um, I mean, the first thing that's going to my mind is yeah, it's like you said.
00:04:29.839 --> 00:04:30.959
There's a definition question.
00:04:30.959 --> 00:04:33.600
Again, they're not so well spec'd, or at least not the way you described it.
00:04:33.600 --> 00:04:41.360
What happens if the if there's a word like uh where you have the same number uh of two different letters?
00:04:42.000 --> 00:04:46.480
Uh it doesn't matter because you you're only caring about the count, not the value.
00:04:46.800 --> 00:04:57.040
Yeah, but if it's the equal number of yeah, if the equal numbers of A's and E's, then do you need to count both of them, or is just how many there are one of them?
00:04:57.439 --> 00:05:05.199
No, like think about it as creating a frequency count of A E I O U, and then you just do a max across those.
00:05:05.199 --> 00:05:05.839
Okay.
00:05:05.839 --> 00:05:06.800
Yeah.
00:05:06.800 --> 00:05:26.240
So I guess actually that that comes from my let's see, I went to week 380, and the problem, the exact problem description is you're given a string consisting of English letters, write a script to find the vowel and consonant with maximum frequency, return the sum of two frequencies.
00:05:26.240 --> 00:05:28.959
I'm sure it should say, of those two frequencies.
00:05:29.360 --> 00:05:35.920
And there's also a question of what is a constant, what is a uh a consonant and what is a vowel, but okay.
00:05:36.560 --> 00:05:45.279
Yeah, let's just assume A E I O U are the vowels, and also it's not actually sorry, just just do one in lowercase.
00:05:45.279 --> 00:05:45.839
Yeah, yeah.
00:05:45.839 --> 00:05:50.160
It doesn't state it in the problem, but all the examples are lowercase, so I assumed lowercase.
00:05:50.160 --> 00:05:55.360
And it's an uninteresting complication to the problem, anyways, even if it were upper and lower.
00:05:55.680 --> 00:05:57.199
So I have I have a solution.
00:05:57.199 --> 00:06:02.879
I don't know if it's if it's good or not, but uh it is a solution that I can show.
00:06:02.879 --> 00:06:05.040
I can build it up if you want me to.
00:06:05.040 --> 00:06:06.399
Sounds like a plan.
00:06:06.399 --> 00:06:12.000
Okay, so let me just arrange my window here to kinda be like this.
00:06:12.000 --> 00:06:21.519
Okay, and then I need to share my screen and see if I can find the right one.
00:06:22.000 --> 00:06:30.160
And Asher says in the chat that he enjoyed this problem because they got to use their new favorite fork.
00:06:30.160 --> 00:06:30.560
Okay.
00:06:30.560 --> 00:06:33.600
Will we find our way to Asher's favorite fork?
00:06:33.600 --> 00:06:37.519
Stay tuned on episode 127 of a ray cast.
00:06:38.160 --> 00:06:40.959
So so I can build this up uh piece by piece.
00:06:40.959 --> 00:06:42.160
Here's the text.
00:06:42.160 --> 00:06:50.160
And what I would like to do then is for now, let's just look at the frequencies of the letters.
00:06:50.160 --> 00:06:51.839
So we do that with key.
00:06:51.839 --> 00:07:00.000
But we don't since we're going to look at uh consonants and vowels separately, we don't care which letter they are, then we can just look at the the frequencies themselves.
00:07:00.000 --> 00:07:06.319
I mean, we know this doesn't give us the information what they are, and this is just on the top like that.
00:07:06.319 --> 00:07:10.000
So saves a bit of framing there.
00:07:10.000 --> 00:07:13.120
Um and we want the maximum of that.
00:07:13.120 --> 00:07:19.519
But again, this is just looking at all the letters, but this is what we want to do on the vowels and on the consonants separately.
00:07:19.519 --> 00:07:31.120
So we can get the vowels by taking the intersection of the text with A E I O U, and we can get the consonants by removing the vowels.
00:07:31.120 --> 00:07:33.040
So we just need to sum all of that.
00:07:33.040 --> 00:07:37.439
We can build that up as a um as a nice over fork.
00:07:37.439 --> 00:07:53.279
Um, so we want to have the without uh plus over this thing here, so plus over the max of the tele key, we could call it over the intersection.
00:07:53.279 --> 00:07:57.519
And we want to bind that with a right argument of AEIO.
00:07:57.519 --> 00:08:00.319
So that means this is how the fork works.
00:08:00.319 --> 00:08:05.839
We get AIOU as a right argument of the intersection and as the right argument of the without.
00:08:05.839 --> 00:08:09.759
And then we sum the results, but of course they're the sets of characters.
00:08:09.759 --> 00:08:15.199
So before we sum them, we apply the max of the talia top right key on it.
00:08:15.199 --> 00:08:20.160
So this is this is the function, and we should apply that on button on the text.
00:08:20.160 --> 00:08:21.279
We have that already.
00:08:21.279 --> 00:08:22.399
We get five.
00:08:23.519 --> 00:08:24.639
Does that work though?
00:08:24.639 --> 00:08:26.480
I think there's a bug in that.
00:08:26.879 --> 00:08:27.759
Uh okay.
00:08:27.759 --> 00:08:29.199
What's the problem?
00:08:29.199 --> 00:08:34.720
I mean, there's a problem if we if there aren't any vowels, if there aren't any consonants.
00:08:35.120 --> 00:08:37.200
Uh that's not the problem.
00:08:40.480 --> 00:08:43.360
What about the word mommy?
00:08:43.360 --> 00:08:46.159
Which one of them doesn't make this?
00:08:46.159 --> 00:08:51.519
So it's three M's and one of U R Y, right?
00:08:51.519 --> 00:08:54.240
That's four, as far as I can tell.
00:08:54.559 --> 00:09:01.279
Okay, so I'm misunder I'm misunderstanding, but the bug that I thought is that you're doing without the vowels, but how do you get consonants only?
00:09:01.279 --> 00:09:02.559
That's the intersection.
00:09:02.720 --> 00:09:05.840
That's oh, but no, consonants only is without the vowels.
00:09:05.840 --> 00:09:09.039
Here, look, banana without vowels, B and N.
00:09:09.039 --> 00:09:09.759
Right?
00:09:09.759 --> 00:09:11.440
And and intersection.
00:09:11.440 --> 00:09:15.600
So even though the symbols don't resemble each other, they're sort of complementing each other.
00:09:15.600 --> 00:09:26.960
This one leaves behind from the left argument only the ones that are in the set on the right, and this one leaves behind on the left argument only the ones that are not in the set on the right.
00:09:28.080 --> 00:09:33.360
Well, now we have to have a discussion about these two glyphs, because that is very beautiful.
00:09:33.360 --> 00:09:35.519
And I did not think of that.
00:09:35.519 --> 00:09:39.759
And is this one of those things where I didn't think of it because it's not like symmetric?
00:09:40.080 --> 00:09:50.399
Um because I yeah, my my thing, I did do the without well, the set functions are fairly underutilized, like yeah, people always forget to yeah.
00:09:50.720 --> 00:09:54.480
So one thing I like to do is like the symmetric set difference.
00:09:54.480 --> 00:09:55.919
You can write like this.
00:09:55.919 --> 00:10:10.559
And so the union, that's all of the elements contributed by both arguments, and the intersections are the elements that are in both of them, and all of them without the ones that are in both, that's the symmetric difference.
00:10:10.559 --> 00:10:13.200
That's the ones that are only in one of them, not in the other one.
00:10:13.200 --> 00:10:15.919
And here we can sort of see the symmetries.
00:10:15.919 --> 00:10:20.480
You can even see that this shape is sort of related to these in a nice way.
00:10:20.480 --> 00:10:24.480
It's sort of a mixture of union and intersection symbols.
00:10:24.480 --> 00:10:34.639
So I don't, I mean, they are not symmetric in the sense that all three of them do not treat their left and right arguments the same.
00:10:34.639 --> 00:10:41.200
Without obviously cannot treat this left argument and right the same, where one of them has to be the data set, another one is the ones to remove.
00:10:41.200 --> 00:10:47.200
Intersection and union could have been symmetric, but it's it's more versatile that they're not.
00:10:47.200 --> 00:10:52.480
So they treat the left argument as the data set, just like without those.
00:10:52.480 --> 00:11:10.240
And the right argument is the uh the checking set, the lookup set, that that where we're keeping only the ones that are also in the right, or we take or we're keeping uh only the ones that are sorry, we're adding any that are uh missing that are that's for the union, right?
00:11:10.240 --> 00:11:14.320
And on the intersection, we're keeping only the ones that are also in the right.
00:11:14.320 --> 00:11:18.879
So we can give this a simple nice symbol.
00:11:18.879 --> 00:11:22.320
What uh what kind of solution did you have, Connor?
00:11:23.120 --> 00:11:28.799
Um well, this is like I said at the beginning, I'm always surprised, and this is another great example.
00:11:28.799 --> 00:11:31.759
Uh what's the best way?
00:11:31.759 --> 00:11:36.720
I'll drop it in this chat, and then you can uh am I imagining?
00:11:36.799 --> 00:11:41.840
I'm imagining like do the full keys and then split out.
00:11:42.240 --> 00:11:44.480
Oh wait, I just I just gave you the tiny apple.
00:11:44.480 --> 00:11:47.279
What language is the tiny apple?
00:11:47.679 --> 00:11:50.879
Well, I can try to translate it or go ahead and translate.
00:11:51.039 --> 00:11:55.360
Oh, actually, I did I is this is number one or number two?
00:11:55.360 --> 00:11:57.120
It was number one.
00:11:57.120 --> 00:11:59.919
I mean, I think did I see Madeline?
00:11:59.919 --> 00:12:00.960
Madeline's in the chat.
00:12:00.960 --> 00:12:05.120
Uh I mean also too.
00:12:05.120 --> 00:12:11.440
I can here, I'll give you a RaBox link and then you can uh parse it a little bit better.
00:12:11.440 --> 00:12:12.080
Okay.
00:12:12.480 --> 00:12:22.080
Well, still don't understand how a Raebox can uh can know which valence of primitive that it needs to translate to.
00:12:23.279 --> 00:12:26.559
I'll drop it in the YouTube chat as well.
00:12:26.559 --> 00:12:31.200
I don't know, maybe Madel Madeline can uh give us her solution if she wants.
00:12:31.200 --> 00:12:33.360
Although are you gonna be able to screen share this now?
00:12:33.360 --> 00:12:34.159
I'm not sure.
00:12:34.159 --> 00:12:35.120
Not really.
00:12:35.519 --> 00:12:41.200
Uh I mean I can, but then you're gonna lose uh it doesn't it doesn't actually translate very much.
00:12:41.200 --> 00:12:43.679
It it looks like this when it's translated.
00:12:43.679 --> 00:12:45.759
That's doesn't help.
00:12:45.759 --> 00:12:49.440
Um so it's a so but let's figure out what's going on here.
00:12:49.440 --> 00:12:51.919
Oh, this is the this is that count in or something like that?
00:12:51.919 --> 00:12:53.440
It's histogram, yeah.
00:12:53.440 --> 00:12:56.080
Yeah, so it's it's counting in itself.
00:12:56.080 --> 00:12:59.759
I mean we can define that, but it's basically a type of key.
00:13:00.720 --> 00:13:04.159
Uh yeah, it's a key specialization if you want to think about it like that.
00:13:04.399 --> 00:13:04.879
Yeah.
00:13:04.879 --> 00:13:07.919
Uh Silas asks if we need a quad C.
00:13:07.919 --> 00:13:11.679
I don't know what the problem specification was, so I did it just for lowercase, but yes, of course.
00:13:11.679 --> 00:13:19.440
If uh if it can take any case, then you have to throw a quad C on the right end of my solution.
00:13:19.440 --> 00:13:21.519
But that doesn't change much.
00:13:21.759 --> 00:13:29.679
Yeah, I think we we stated earlier in the in the podcast that well, let's just assume lowercase because the casing adjustment isn't that interesting.
00:13:29.679 --> 00:13:31.759
This doesn't even look right.
00:13:31.759 --> 00:13:49.360
Um but basically the the description of what this is doing is the underbar semicolon is uh pair and quad L is lowercase alphabet, and so we're doing C quad A and oops, quad C quad A.
00:13:49.600 --> 00:13:49.919
Yeah.
00:13:49.919 --> 00:13:56.320
And then we're we're binding that binding that with uh with the without.
00:13:56.320 --> 00:13:57.200
Yeah.
00:13:57.200 --> 00:14:00.159
And we're doing that on the left argument.
00:14:00.159 --> 00:14:08.000
So that's so this is uh this is a form here with all the right like that with a e i o u.
00:14:08.000 --> 00:14:13.600
But then um but then we are counting in each.
00:14:13.600 --> 00:14:14.960
Oh, okay.
00:14:14.960 --> 00:14:17.679
Oh, okay, I see what you mean.
00:14:17.679 --> 00:14:18.399
Right.
00:14:18.399 --> 00:14:32.159
So you you you have the vowels, the set of vowels, you have the set of um of letters, um, and then we're removing the set the vowels from the letters that gives us the consonants.
00:14:32.159 --> 00:14:53.200
Now we've got the consonants and uh and the vowels, and so for each one of them we uh want to remove, I believe, uh oh, for each one of them we're counting uh that's what it's doing, we're counting the occurrences in the entire um argument, and then we're taking the maximum of that.
00:14:53.200 --> 00:15:08.480
Okay, so I can I can restate this as we we do with it with uh so if we so the first thing is to generate the list of vowels and and uh we can write like this quad a quad C A I O U.
00:15:08.480 --> 00:15:10.240
This gives us the consonants.
00:15:10.240 --> 00:15:16.720
So um, and then we can pair this up with itself.
00:15:16.720 --> 00:15:26.480
So this is where we want comma over enclose um and we want uh behind here.
00:15:26.480 --> 00:15:29.759
This is not gonna work quite well, but let's just do it like this for now.
00:15:29.759 --> 00:15:32.000
Does this work?
00:15:32.000 --> 00:15:34.320
Uh what am I doing wrong here?
00:15:34.320 --> 00:15:35.200
Oh, okay.
00:15:35.200 --> 00:15:36.639
Sorry, I forgot the binding thing.
00:15:36.639 --> 00:15:41.200
But why is the without it's without yeah, judge without there you go.
00:15:41.200 --> 00:15:47.279
This is the consonants.
00:15:47.279 --> 00:15:49.679
We want that here.
00:15:49.679 --> 00:15:53.840
The problem is we need this, so it's better to do it like this.
00:15:53.840 --> 00:15:59.120
Okay, this gives us the uh the consonants and the vowels.
00:15:59.120 --> 00:16:10.399
Um and now uh for each of them we want to count the the occurrences of all of them in uh in the original.
00:16:10.399 --> 00:16:13.200
So let's just call this consonants and vowels.
00:16:13.200 --> 00:16:15.600
It's easier like to deal with like this.
00:16:15.600 --> 00:16:16.320
Right.
00:16:16.320 --> 00:16:25.840
So then we can say consonants and vowels, and we'll since we don't have the frequency count thing, we'll just do an outer product with the enclosed text.
00:16:25.840 --> 00:16:32.159
So this gives us this uh frequency table for each one of them, and then we can sum there.
00:16:32.159 --> 00:16:41.039
So if you bind this together for each of them, this gives us uh the sums for each one of them, and if you want the maximum, we can do that as well.
00:16:41.039 --> 00:16:43.679
Oh that doesn't work.
00:16:43.679 --> 00:16:46.960
Ah too many atops.
00:16:46.960 --> 00:16:52.080
So we use an inner product here, uh no.
00:16:52.080 --> 00:16:54.799
Okay, so one plus there.
00:16:54.799 --> 00:17:00.240
Okay, so this is this is the maximum uh occurrence of each one, right?
00:17:00.240 --> 00:17:04.640
Because there are two N's and three A's, and then we just need to uh sum all of that.
00:17:04.640 --> 00:17:08.160
That's that's essentially what's happening here.
00:17:08.160 --> 00:17:15.599
And the the thing about creating the consonants and vowels, that's just that's just a constant thing that gets bound inside the train.
00:17:15.599 --> 00:17:19.599
But it's largely the same thing as using key.
00:17:19.599 --> 00:17:30.960
What I did was I I gave key an operand that just counts the occurrences, right?
00:17:30.960 --> 00:17:37.920
So instead of doing doing this, we can literally replace this with um tally atop.
00:17:37.920 --> 00:17:45.519
This gives us um oh no, okay.
00:17:45.519 --> 00:17:47.200
We don't yeah, that's the problem with it.
00:17:47.200 --> 00:17:49.200
We want the key with a vocabulary, really.
00:17:49.200 --> 00:17:50.319
Right.
00:17:50.319 --> 00:17:52.880
So that's here's the problem.
00:17:52.880 --> 00:17:56.240
So we need C V and then we need to do uh intersection.
00:17:56.240 --> 00:17:59.279
Well, we can do intersection like this.
00:17:59.279 --> 00:18:08.960
There we go, and then the maximum getting rid of uh the maximum of the length area here.
00:18:08.960 --> 00:18:10.240
What?
00:18:10.240 --> 00:18:15.759
Oh, because binding there we go, and then we can sum this.
00:18:15.759 --> 00:18:26.880
So this is essentially the same thing as uh the as the tiny APL solution, but it's obviously very similar to uh to what I had.
00:18:26.880 --> 00:18:36.720
Because instead of I what I had was instead of taking the intersection of the consonants and the vowels, I just took the intersection of the vowels and the set difference from the vowels.
00:18:36.720 --> 00:18:44.799
And uh and the your solution that did a set difference with the vowels from the alphabet.
00:18:44.799 --> 00:18:48.640
So you just had went went via the alphabet for no particular reason.
00:18:49.599 --> 00:18:55.440
Well, the particular reason is that I didn't have the idiom of without union.
00:18:55.440 --> 00:19:10.720
Like it's it's uh I don't know, at least for me, it's a more natural step to start from like an alphabet than to make the jump that, like, oh, if I do without an intersection with just the vowel set, you can back your way into just the consonants and just the vowels.
00:19:10.720 --> 00:19:13.119
Like that's not an obvious uh thing.
00:19:13.119 --> 00:19:14.720
Or I don't know, maybe for some people.
00:19:15.039 --> 00:19:18.960
How far do you get I'm trying just prepend a IOU.
00:19:18.960 --> 00:19:21.759
In front of the text.
00:19:21.759 --> 00:19:35.839
Oh, the problem is that yeah, in front of the text, and then you can say, well, the first five results are from the vowels and do a segmented uh extrusion there, but the problem I but you don't know what the next ones are going to be.
00:19:35.839 --> 00:19:38.559
No, no, no, the key afterwards will do it, yeah.
00:19:38.559 --> 00:19:44.880
The key will sort that out, but you have to only subtract one from the first five results.
00:19:45.279 --> 00:19:51.599
Okay, so so if we if we do this, right, so we can see what they correspond to, but now we get rid of that.
00:19:51.599 --> 00:19:53.680
So that gives us all those counts.
00:19:53.680 --> 00:19:58.799
Then we do a a five take, yeah, comma drop, that's all of them.
00:19:58.799 --> 00:20:05.200
And here we want to say uh negative one plus the take.
00:20:05.200 --> 00:20:08.079
We can swap those afterwards, like that.
00:20:08.079 --> 00:20:13.119
And then we want the drop of that, but then we want the max of each of them separately as well.
00:20:13.119 --> 00:20:14.960
So you want this over max.
00:20:15.279 --> 00:20:16.319
Oh, yeah, okay.
00:20:16.319 --> 00:20:16.720
Right?
00:20:16.960 --> 00:20:28.160
I mean, I was looking at partitioning them, but that's and then we we change that to a plus, and then we swap these two sides so that we don't need the parentheses, we just do the tick on the right, like that.
00:20:28.160 --> 00:20:30.240
So this this works as well.
00:20:30.480 --> 00:20:38.079
I'm not sure if I like it particularly, but uh it looks like you would need of you know comments to tell you what what was going on.
00:20:38.079 --> 00:20:44.079
Yeah, it's really it's doing a lot, it's doing one key and a um uh far fewer set operations.
00:20:44.079 --> 00:20:45.119
That's true.
00:20:45.359 --> 00:20:50.240
But I mean if you're talking performance, this might be very expensive too.
00:20:50.640 --> 00:20:53.839
Uh I'll prepending some stuff.
00:20:54.079 --> 00:20:55.440
Yeah, copies, yeah.
00:20:55.680 --> 00:20:55.839
Yeah.
00:20:56.079 --> 00:20:58.000
I have a question for Madeline in the chat.
00:20:58.000 --> 00:21:04.799
Uh, how do you do uh how do you use histogram on a string for the character counts?
00:21:04.799 --> 00:21:06.319
Should it work naturally?
00:21:06.319 --> 00:21:13.759
But right now when I do because that's the nice thing about Tiny Apple is they have the primitive that like naturally your brain jumps to.
00:21:13.759 --> 00:21:25.359
Like here we have to use key, or you can use the other product fork, but like when you have the primitive, that's like my brain and my heart are both attracted to the language that has that primitive.
00:21:25.359 --> 00:21:30.640
Um but then I'm thinking about the the thing just there that has the country.
00:21:30.640 --> 00:21:32.000
Yeah, yeah.
00:21:32.000 --> 00:21:34.400
And so now, like honestly, it's so beautiful.
00:21:34.400 --> 00:21:40.559
Like if if you it says you'd want a version of histogram that gives you a dictionary and just takes any cell.
00:21:40.559 --> 00:21:44.160
Oh, so is there no way like to s to change a string?
00:21:44.160 --> 00:21:46.559
Because that's the thing, a string is a character array.
00:21:46.559 --> 00:21:48.480
Uh you have to give it a dictionary.
00:21:50.000 --> 00:21:52.240
Okay, so here's another one we can maybe do.
00:21:52.240 --> 00:21:53.039
One second.
00:21:53.039 --> 00:21:54.319
Instead of let's try it.
00:21:54.319 --> 00:21:59.759
I'm not really, I haven't worked this through, but but maybe what we can do is we say A E I O U.
00:21:59.759 --> 00:22:03.119
Martin will not be amused here.
00:22:03.119 --> 00:22:06.000
Um, and then sort by that.
00:22:06.000 --> 00:22:08.160
I was wondering about that as well.
00:22:09.359 --> 00:22:13.680
That moves them up from you still have to do the lookups after, anyway.
00:22:13.680 --> 00:22:14.640
Yeah.
00:22:14.640 --> 00:22:23.519
Because you don't like at least with the keyed version, you know beforehand, well, there's gonna be five at the front that you're interested in differentiating.
00:22:23.519 --> 00:22:26.000
Oh, one second, one second, one second, one second.
00:22:26.160 --> 00:22:27.200
I have a crazy idea.
00:22:27.200 --> 00:22:30.079
It might not work out at all, but I have an interesting idea.
00:22:30.079 --> 00:22:45.599
Okay, so what happens if we go in here and say look inside here whether the particular character uh is a vowel or not, and then we look at the count.
00:22:45.599 --> 00:22:57.519
Okay, so now for each one of them of the of the grouping zero and and and one, we want those uh we want those the largest number.
00:22:57.519 --> 00:22:58.880
So I have a trick for that.
00:22:58.880 --> 00:23:08.400
So if we say negative one to the power of this, then that gives us a sign, and then we can multiply that with the tally.
00:23:08.400 --> 00:23:20.720
And now all we need to do is add the largest and the smallest, but flipping the the smallest one is going to be negative, so we don't want to we want to add its magnitude, but that's the same thing as subtracting.
00:23:20.720 --> 00:23:24.960
So the largest minus the smallest gives us the the what we wanted.
00:23:24.960 --> 00:23:26.559
Did anybody follow that?
00:23:26.559 --> 00:23:27.920
What just happened?
00:23:27.920 --> 00:23:30.160
So this is the whole solution.
00:23:30.160 --> 00:23:39.599
So Madeline says in the chat that it breaks if there are no consonants or vowels, but at any way it's broken if there are no consonants or no vowels.
00:23:39.599 --> 00:23:41.759
So we don't specify what I mean.
00:23:41.759 --> 00:23:45.039
Any of these solutions are going to be bad, right?
00:23:45.039 --> 00:23:51.440
Because you're going to do a reduction, the maximum reduction over an empty vector is going to give you negative infinity.
00:23:51.440 --> 00:23:54.079
So you're bad off either way.
00:23:54.079 --> 00:24:04.799
Um and the key, like as soon as we reach like this and key on on an empty thing, and then we we try to right.
00:24:04.799 --> 00:24:06.559
That's it's not gonna work.
00:24:06.559 --> 00:24:11.680
So all of these solutions use that, and even the count in is not going to help anything.
00:24:11.680 --> 00:24:14.400
You're just going to get empty vector, and then you max over that.
00:24:14.400 --> 00:24:18.319
So I don't I don't know if the problems specify what should happen if there aren't any.
00:24:18.319 --> 00:24:26.079
I guess I guess the vowel, all the vowels A E I U appear with a frequency of uh with a count of zero.
00:24:26.079 --> 00:24:28.240
So it really should give zero, right?
00:24:28.240 --> 00:24:29.440
If there aren't any.
00:24:29.440 --> 00:24:30.000
Yeah.
00:24:30.960 --> 00:24:32.319
All right, check this.
00:24:32.319 --> 00:24:47.519
Uh you have to predefine a result vector of two elements, both zeros, fine, which say the first one is the count of uh vowels, and the second one is oh sorry, the first one is actually the count of consonants, seconds the count of the.
00:24:47.519 --> 00:24:49.440
I also have to set squad iO to zero, right?
00:24:49.440 --> 00:24:52.000
You also have to well you can put a one plus if you want to.
00:24:52.720 --> 00:25:04.640
Okay, so we set quadril to zero, and then we we um update the the the value here, and then there's missing uh the last statement, which is to sum, right?
00:25:04.640 --> 00:25:06.319
Uh yeah, the last statement is to sum.
00:25:07.839 --> 00:25:08.319
Yeah.
00:25:08.319 --> 00:25:17.839
Uh I actually have started to grow to like this pattern of doing weird um manipulation within operators.
00:25:17.839 --> 00:25:20.559
But functional programmers will cry in the corner.
00:25:20.880 --> 00:25:21.759
Yeah, well.
00:25:21.759 --> 00:25:24.559
I'll drink their tears.
00:25:24.559 --> 00:25:27.759
I mean, isn't that sort of similar to the what I did up here?
00:25:27.759 --> 00:25:30.160
But mine is yours are more generally applicable.
00:25:30.160 --> 00:25:32.000
You could have multiple groups.
00:25:32.000 --> 00:25:37.440
So Yeah, and you also had to well Well, not really, because it would be awkward to find out.
00:25:37.440 --> 00:25:40.400
You have to find is it in which group does it appear?
00:25:41.519 --> 00:25:46.160
Yeah, this one happens to come okay with two groups, but then so does with more groups it'll be.
00:25:46.400 --> 00:25:48.240
Parity is also a two-group.
00:25:48.240 --> 00:25:49.440
Yeah.
00:25:49.440 --> 00:25:56.319
But if you were if you had multiple different groups, then I mean this is a lot of updating, right?
00:25:56.319 --> 00:25:58.880
You keep adding add one, add one, add one, add one.
00:25:59.119 --> 00:26:04.640
This is uh That's uh oh yeah, well no only per key.
00:26:04.640 --> 00:26:08.559
Yeah, but that's once per no, it's not adding okay, it's updating.
00:26:08.799 --> 00:26:13.039
Yeah, it's it has to do with max max all the time.
00:26:13.039 --> 00:26:15.039
But the max is our scalar.
00:26:15.039 --> 00:26:16.079
It's when you say one.
00:26:17.440 --> 00:26:24.960
This is yeah, this is in principle more one potato, two potato, unless like array-oriented, I guess.
00:26:24.960 --> 00:26:26.079
Yeah.
00:26:26.079 --> 00:26:42.240
But it's something that when you uh learn about operators and stuff, tend to fall into a pattern initially of doing something, either doing like loads of stuff, I guess this is counts as doing loads of stuff in the operand.
00:26:42.240 --> 00:26:49.279
Or like getting the operand, like for example, in key, sometimes you're fighting with uh the fact that you get a matrix out.
00:26:49.279 --> 00:26:57.359
And either you'll I'll often do like a split transpose to get out uh what you call it, an exploded inverted table.
00:26:57.359 --> 00:26:57.920
Okay.
00:26:57.920 --> 00:27:00.640
As opposed to indexing into each of the columns.
00:27:00.640 --> 00:27:06.799
Whereas here you don't even have to worry about that because you're just dealing with the values directly, which I kind of like.
00:27:07.119 --> 00:27:10.319
So if I go and get key with a vocabulary, how does this look?
00:27:10.319 --> 00:27:16.960
And uh so I guess I should show the URL so people have a chance just to look at it.
00:27:16.960 --> 00:27:18.240
Does it fit?
00:27:18.240 --> 00:27:19.039
Not really.
00:27:19.039 --> 00:27:21.680
GitHub there, blob.
00:27:21.680 --> 00:27:24.400
This will be awkward for people to see anyway.
00:27:24.400 --> 00:27:27.279
Um okay.
00:27:27.279 --> 00:27:42.000
So now this takes the vocabulary uh on on the left, and and now we can take the vowels A U and key with uh key with vocabulary on the text.
00:27:42.000 --> 00:27:49.759
This gives me the indices and for each one of them, and we just need to count each and do the max.
00:27:49.759 --> 00:27:50.720
Right?
00:27:50.720 --> 00:27:51.680
Uh max.
00:27:51.680 --> 00:27:54.480
So this gives us that.
00:27:54.480 --> 00:27:59.759
And if you and then we can take the other part of the alphabet, uh, so we say here.
00:27:59.759 --> 00:28:07.279
And this gives us the max consonants, and then we can just combine all of that.
00:28:07.279 --> 00:28:11.200
So by running key with vocabulary twice, it's maybe maybe more expensive.
00:28:11.200 --> 00:28:14.960
I'm not even sure how much how much more expensive they would be in an actual good implementation.
00:28:14.960 --> 00:28:20.640
This is just a model, but the actual implementation would only look for those, it would never collect information about them.
00:28:20.640 --> 00:28:26.559
Um, as well, it would be nice if we could detect that we just want the count so we don't actually have to keep the indices.
00:28:26.559 --> 00:28:30.480
Um so how would this look in practice?
00:28:30.480 --> 00:28:35.680
Well, we have to we have to do the same sort of thing as we had before with uh creating the C and V.
00:28:35.680 --> 00:28:38.400
But let's just say we have the consonants and the vowels.
00:28:38.400 --> 00:28:55.680
So for each one of them, we do the key with vocabulary on the right, so and then we do tell each and do a max, and then we sum everything, which means uh yeah.
00:28:55.680 --> 00:28:57.759
Does this one work with each one of them?
00:28:57.759 --> 00:29:05.519
Yes, because no, uh if they're yeah, because this one will always give five elements and 21 elements, right?
00:29:05.519 --> 00:29:11.440
Because because we we're always looking for something, we'll just give empty lists, so then this will just give all zeros and all zeros.
00:29:11.440 --> 00:29:12.000
We can try it.
00:29:12.000 --> 00:29:18.720
So if we if we do it with something that is uh like this, it should give three, right?
00:29:18.720 --> 00:29:24.480
And if we do something that has uh like this, it should give one.
00:29:24.480 --> 00:29:28.640
So that's so the key with vocabulary running it twice like this, it actually works.
00:29:28.640 --> 00:29:31.200
We can also, I mean it's not doesn't help much.
00:29:31.200 --> 00:29:34.960
We save two here, it doesn't help making it tacit really.
00:29:34.960 --> 00:29:38.799
It's just uh no, you can't do that because it's a it's an operator.
00:29:38.799 --> 00:29:40.079
So don't mind.
00:29:40.079 --> 00:29:44.720
I think this is maybe the easiest one to understand.
00:29:44.720 --> 00:29:51.440
In general, key with vocabulary is easier to understand than the normal key, because there's no function application.
00:29:51.440 --> 00:29:55.200
We're just saying, okay, what are all the indices for these elements?
00:29:56.079 --> 00:29:59.039
Yeah, and it usually involves less faff afterwards.
00:29:59.039 --> 00:29:59.680
Yeah.
00:29:59.680 --> 00:30:02.799
Which had just adds basically noise.
00:30:04.319 --> 00:30:06.720
Yeah, let's add that in version 22.
00:30:06.720 --> 00:30:14.799
But it's yeah, in dialogue definitely we want to reach for key and for this sort of thing.
00:30:14.799 --> 00:30:18.960
Um oh, I mean we don't have to.
00:30:18.960 --> 00:30:21.039
We could okay.
00:30:21.039 --> 00:30:24.480
So here's okay, let's let's define sorting first.
00:30:24.480 --> 00:30:27.680
Now we got a sort primitive.
00:30:27.680 --> 00:30:29.119
I want I want that as well.
00:30:29.119 --> 00:30:33.279
Let's just call that A5 sending, as if we had a primitive for it.
00:30:33.279 --> 00:30:37.680
Okay, so now we have the text and we can we can sort it.
00:30:37.680 --> 00:30:39.039
That's banana sorted.
00:30:39.039 --> 00:30:40.720
Oh, it's my bad example really.
00:30:40.720 --> 00:30:47.839
We should have um uh an example where we have some some consonants first.
00:30:47.839 --> 00:30:52.240
Okay, we can do this one for now, but really what I want to do here is I want to take the vowels.
00:30:52.240 --> 00:30:54.799
Oh, is that is that even important?
00:30:54.799 --> 00:30:57.279
Uh yeah.
00:30:57.279 --> 00:30:58.480
Move them first.
00:30:58.480 --> 00:31:00.319
And sort sort with that.
00:31:00.319 --> 00:31:02.880
Why did we you sort it twice?
00:31:02.880 --> 00:31:03.759
You don't need to?
00:31:03.759 --> 00:31:06.400
Yeah, but why did I lose a an an N?
00:31:06.400 --> 00:31:08.000
What's T?
00:31:08.000 --> 00:31:09.200
Banana.
00:31:09.839 --> 00:31:10.720
Indeed.
00:31:10.720 --> 00:31:12.480
Forget it.
00:31:12.480 --> 00:31:17.279
Uh that shouldn't matter.
00:31:18.240 --> 00:31:20.240
135, those are the A's.
00:31:21.440 --> 00:31:22.480
And B and an N and N.
00:31:22.480 --> 00:31:23.599
Close that.
00:31:23.599 --> 00:31:26.160
That's fine.
00:31:26.160 --> 00:31:33.039
Okay, and the fact that uh does be kind not do the same?
00:31:34.319 --> 00:31:35.920
Oh duh, my bad.
00:31:35.920 --> 00:31:36.960
Stupid me.
00:31:36.960 --> 00:31:39.039
This sort function doesn't take a left argument.
00:31:39.039 --> 00:31:40.960
Yeah, yeah.
00:31:40.960 --> 00:31:41.759
We can't do that.
00:31:41.759 --> 00:31:42.000
Okay.
00:31:42.000 --> 00:31:44.559
It has to be I mean you can't even do this.
00:31:44.559 --> 00:31:49.759
I mean it'd have to be sorted as like this.
00:31:49.759 --> 00:31:50.799
Yeah.
00:31:50.799 --> 00:31:51.440
There.
00:31:51.440 --> 00:31:52.000
My bad.
00:31:52.000 --> 00:31:52.720
Really?
00:31:52.720 --> 00:31:57.599
Oh this is take the left argument if it's there, otherwise the right argument.
00:31:57.599 --> 00:31:58.640
No, we can't do that.
00:31:58.640 --> 00:32:00.319
It has to be grayed like this.
00:32:00.319 --> 00:32:02.559
Uh doesn't that normally work?
00:32:02.559 --> 00:32:03.440
Yeah, yeah.
00:32:03.680 --> 00:32:04.559
Here we go.
00:32:04.559 --> 00:32:05.359
Sorry.
00:32:05.359 --> 00:32:09.119
Uh, why was why was it getting rid of the No?
00:32:09.200 --> 00:32:17.759
Because think about it, it's it's pre-processing the left argument, so it's just sorting, it's just making the grade vowels that are has nothing to do with the right.
00:32:20.559 --> 00:32:21.039
Okay, yeah.
00:32:21.200 --> 00:32:21.440
Yeah.
00:32:21.440 --> 00:32:31.599
Okay, so um it would be nice to have a sort primitive, but the sort, but it's wouldn't work for the sort by any by the sort order that's very special for the grade primitive.
00:32:31.599 --> 00:32:32.960
Anyway, let's let's just continue.
00:32:32.960 --> 00:32:35.200
Okay, so now we now we sort like this.
00:32:35.200 --> 00:32:41.200
So it doesn't actually make a difference in this case because we have a vowel in banana that comes earlier.
00:32:41.200 --> 00:32:45.680
Um but if we write something like uh bikini.
00:32:45.680 --> 00:32:50.000
Yeah, so you get the i's first and then the uh the b.
00:32:50.000 --> 00:32:54.400
So then we should that gives us four, as that should be the result.
00:32:55.119 --> 00:32:55.359
Okay.
00:32:55.359 --> 00:32:57.599
You don't need two A's here, do you?
00:32:58.319 --> 00:33:11.519
Yeah, you do, but if I want because my my idea was to put Oh, you you sort Yeah, I want to put to sort them so that the consecutive elements are are next to each other, like identical elements are next to each other.
00:33:11.519 --> 00:33:15.920
Then I wanted to group it like that, but we don't know where to split anyway.
00:33:15.920 --> 00:33:22.000
So it doesn't have the problem with the whole yeah, the whole approach tend to think about places.
00:33:22.000 --> 00:33:25.759
Well we can what we could do is we could add alphabet, even at the end.
00:33:25.759 --> 00:33:27.839
That doesn't matter, because now we're sorting.
00:33:27.839 --> 00:33:28.400
Okay.
00:33:28.400 --> 00:33:37.519
So now we now if we look at at where they're different from each other, that's where we need to split.
00:33:37.519 --> 00:33:44.640
So we take this and sp uh split uh split on that.
00:33:44.640 --> 00:33:47.119
That gives us our groups like this.
00:33:47.119 --> 00:33:52.000
I'm not saying it's a good solution, it's to say it's a it's a one not using key.
00:33:52.000 --> 00:33:56.880
And then we get we get these counts here.
00:33:56.880 --> 00:34:11.599
This is the actual count because we injected one, and now we just need to take uh do the five take and plus over max with a five draw.
00:34:11.599 --> 00:34:15.280
Is it a is it good?
00:34:15.280 --> 00:34:17.920
It's long, but I'm not using key.
00:34:17.920 --> 00:34:24.079
So at least I could do it like this.
00:34:24.079 --> 00:34:27.360
And I got to use the added grade, so that's something.
00:34:27.360 --> 00:34:31.039
Yeah, you're following Connor?
00:34:32.800 --> 00:34:34.320
Uh not this last one.
00:34:34.320 --> 00:34:42.000
I uh kind of was I was working on figuring out how tiny STL worked, and so I uh I I wouldn't say I zoned out.
00:34:42.000 --> 00:34:42.480
Oh, yeah.
00:34:42.480 --> 00:34:46.400
I refocused my attention on uh tiny apple.
00:34:46.719 --> 00:34:49.440
Oh no, we saw oh no, it's a new one in the chat.
00:34:49.760 --> 00:34:52.719
Oh yeah, well, so uh I just got this whole thing.
00:34:52.719 --> 00:34:54.239
I went to the petition.
00:34:54.239 --> 00:34:55.760
Uh let's keep it flat.
00:34:55.760 --> 00:34:57.039
Keep it flat, keep it flat.
00:34:57.039 --> 00:34:58.320
That's what you want to do, right?
00:34:58.320 --> 00:34:59.840
So we keep this flat here.
00:34:59.840 --> 00:35:00.239
Huh?
00:35:00.239 --> 00:35:01.920
Are you talking me or you're talking to Rich?
00:35:01.920 --> 00:35:03.440
Um both of you, whatever.
00:35:03.440 --> 00:35:04.800
I just to myself here.
00:35:04.800 --> 00:35:05.679
One second.
00:35:05.679 --> 00:35:08.159
Uh so without an outer product.
00:35:08.159 --> 00:35:10.320
Without an out of product, of course, yeah.
00:35:10.320 --> 00:35:11.679
Flat without out of products.
00:35:11.679 --> 00:35:14.719
So we do we do comparisons like this.
00:35:14.719 --> 00:35:26.639
Um we actually don't we actually might want to put this at the uh put a one at the end here, um, and then we just need to find the the distances between them.
00:35:26.639 --> 00:35:43.039
So we can do a where on that, and then uh that gives us the indices where we where we split over, and then we want to find the distances between them, like this, and and then and that's the one-off counts that we had before.
00:35:43.039 --> 00:35:56.400
We see that line, that's the same line as up here above, and then we do this, and finally we just need to do the the five thing take over max drop.
00:35:56.400 --> 00:35:59.039
Take oh plus plus over.
00:35:59.039 --> 00:36:00.320
There you go.
00:36:00.320 --> 00:36:07.440
So here is a solution that does not use key and uh does not use any nested arrays at all.
00:36:07.440 --> 00:36:09.519
It's just good old APL.
00:36:09.519 --> 00:36:15.199
I mean, old APLs didn't have the pairwise thing, but you do like one drop, one take type thing.
00:36:15.199 --> 00:36:18.800
Sorry, one drop, negative one drop, and then compare them.
00:36:18.800 --> 00:36:21.440
Yeah, old school.
00:36:21.440 --> 00:36:24.800
Oh, so alphabet, oh it's Asher speaking about that.
00:36:24.800 --> 00:36:26.320
You can do an out of product.
00:36:26.320 --> 00:36:36.159
So we've got the T here, and if we do an outer product with uh quote C quad A, yeah, that gives us gives us this.
00:36:36.159 --> 00:36:42.880
And but we should probably put it the opposite opposite side, so we get like a lot of rows like this.
00:36:42.880 --> 00:36:53.199
Um, but then we the problem is we have uh AE Ae I O Uh Union with that.
00:36:53.199 --> 00:37:02.079
So this makes sure that the first five rows, so the union with the alphabet like this, make it's the alphabet, but the vowels are first, right?
00:37:02.079 --> 00:37:11.199
So now if we if we compare that with our text, then the first five uh why is that not?
00:37:11.199 --> 00:37:12.559
Oh, we forgot the quote C.
00:37:12.559 --> 00:37:24.719
First five rows are the are the vowels, so that means these are the counts for every uh everything, and now we can do our classic by now, take plus over max drop.
00:37:24.719 --> 00:37:26.000
There you go.
00:37:26.000 --> 00:37:34.719
But of course, I mean, sure, this sort of has the key in this this is key, yeah, just an inefficient one.
00:37:34.719 --> 00:37:39.039
But this one is nice because we don't need to split up into two groups.
00:37:39.039 --> 00:37:58.159
Um wonder now whether we can if you go back to to a normal T here, if we say A E I O U and Union with that, yeah, that doesn't work because we don't get duplicates anymore.
00:37:58.159 --> 00:38:01.519
Uh huh.
00:38:01.519 --> 00:38:12.639
Okay, so how about if we say t uh intersection comma uh without with a e i or u.
00:38:12.639 --> 00:38:16.400
This just puts the vowels first.
00:38:16.400 --> 00:38:19.280
Oh, but we don't know what they are.
00:38:19.280 --> 00:38:27.199
Um we fix that.
00:38:27.199 --> 00:38:30.000
I wanted to get all of them in first.
00:38:30.000 --> 00:38:36.239
So if you put the right right argument here, now we know all the vowels come in first.
00:38:36.239 --> 00:38:38.800
In fact, we don't need all of them.
00:38:38.800 --> 00:38:40.480
We can use all the set functions in one.
00:38:40.480 --> 00:38:41.760
How do you like that?
00:38:41.760 --> 00:38:48.320
And so the union between those, oh, but we don't know how many we're adding.
00:38:48.320 --> 00:38:49.440
That's the problem.
00:38:49.440 --> 00:38:52.239
Okay, so so this one is fine.
00:38:52.239 --> 00:38:55.280
Okay, now we know we're adding one of each of the vowels.
00:38:55.280 --> 00:39:01.199
So now when we do the key and the tally, we're doing the tally, top, right?
00:39:01.199 --> 00:39:11.280
Right, so we know that the first five are for the vowels, and the last two, uh the one remaining ones after the those five are for the consonants.
00:39:11.280 --> 00:39:24.400
So now when we do the five, uh oh, we don't actually need to do the negative one first because we know what it we could we we do stupid, all those cases before we did the max of the subtraction one.
00:39:24.400 --> 00:39:27.360
We can just subtract one the end because we know we're going to get to too much, right?
00:39:27.360 --> 00:39:36.559
So now we take five take plus over uh max with drop, and then we get one more than what we need.
00:39:36.559 --> 00:39:38.639
So all we need to do is negative one plus.
00:39:38.639 --> 00:39:39.920
We but we know that.
00:39:39.920 --> 00:39:42.000
I think that one's pretty neat.
00:39:42.000 --> 00:39:47.280
We then now we're only using one key, we're not doing anything nested.
00:39:47.280 --> 00:39:55.360
Uh, we are not doing it on a a on a huge uh added text.
00:39:55.360 --> 00:39:58.639
This is this is just a reordering.
00:39:58.639 --> 00:40:03.440
This this literally just puts all the uh the vowels first.
00:40:03.440 --> 00:40:06.000
Well, why hold on?
00:40:06.000 --> 00:40:07.440
Why do we even need that?
00:40:07.440 --> 00:40:12.239
We don't um that's the same thing as we did before, right?
00:40:12.239 --> 00:40:14.800
Just concatenating this in front.
00:40:14.800 --> 00:40:17.199
Isn't that doesn't that come down to the same thing?
00:40:17.599 --> 00:40:27.280
Uh no, the difference of catenating just that in front, I think, was that well, this is why I'm slightly wondering about do you were you supposed to subtract one or two?
00:40:27.280 --> 00:40:35.679
Because the problem with concatenate with prepending with just the vowels was that you only added one to just the vowels count.
00:40:35.679 --> 00:40:38.000
So you had to subtract one from the first five.
00:40:38.239 --> 00:40:39.920
Yeah, that's that's that's correct, right?
00:40:39.920 --> 00:40:43.360
This is a banana T, right?
00:40:43.440 --> 00:40:53.599
So so there are So I thought when you were doing all this set stuff that you were doing it so that you add it to both Yeah, but we no, we're not because I'm not going to add the consonants, there's no point.
00:40:53.920 --> 00:40:56.960
What was uh did we get to Ash's train?
00:40:56.960 --> 00:40:58.079
Or is that what we were looking at?
00:40:58.079 --> 00:41:05.599
It says well, he wish you came up with without G intersection, but I don't know what I don't understand what G is.
00:41:06.239 --> 00:41:07.599
Just a function.
00:41:08.400 --> 00:41:13.519
Oh, just the is this the is this the old stuff, the original, the uh yes.
00:41:13.679 --> 00:41:18.159
Well Max without Max asked earlier, did we get to Asher's Fork?
00:41:18.159 --> 00:41:22.400
And then I guessed it was probably the one that Adam mentioned, the with our media.
00:41:22.400 --> 00:41:24.320
Uh, but it was not.
00:41:24.320 --> 00:41:26.480
And what is Asher's fork?
00:41:26.480 --> 00:41:27.519
We don't know.
00:41:27.519 --> 00:41:34.400
There's a it looks definitely like a couple of his messages were eaten, and so potentially he messaged it and it's being eaten.
00:41:34.400 --> 00:41:39.199
I know we tried to do something with a GitHub discussion at one point, but no one ever used that.
00:41:39.199 --> 00:41:42.079
So if it's still their Ash is ping us on.
00:41:42.639 --> 00:41:48.880
I'll just write him in open internally because when it's a colleague, you can write to them directly with somebody out there on the internet.
00:41:48.880 --> 00:41:50.320
How do they perform?
00:41:50.320 --> 00:41:57.119
It's sort of hard to tell how they perform because we need a large text, but I guess we can we can try.
00:41:57.119 --> 00:41:58.239
Uh one second.
00:41:58.239 --> 00:42:02.559
Asher has just sent his solution to me as well.
00:42:02.559 --> 00:42:05.440
Uh it is loading.
00:42:05.440 --> 00:42:08.159
Let's go back here.
00:42:08.159 --> 00:42:11.519
And so Asher said this.
00:42:11.519 --> 00:42:14.719
Wow, that's why such a long name.
00:42:15.679 --> 00:42:17.920
That's the name of the of the towel.
00:42:17.920 --> 00:42:18.480
Oh, okay.
00:42:18.559 --> 00:42:19.599
This is just a test.
00:42:19.599 --> 00:42:22.320
Should we say hi to the people who say hi in chat?
00:42:22.320 --> 00:42:25.679
Marble Koma and Jacob Lookwood.
00:42:25.679 --> 00:42:31.199
Okay, so this is an okay, so he's doing the outer product, he's just implementing key here.
00:42:31.199 --> 00:42:37.199
Outer product with with the alphabet, and then yeah, it's essentially the same thing as we had before.
00:42:37.199 --> 00:42:41.360
But instead of doing set functions, it's implementing the set functions.
00:42:41.360 --> 00:42:42.400
Yeah, classic.
00:42:42.400 --> 00:42:47.519
So it's find the mask, do the do the two sets.
00:42:47.519 --> 00:42:51.519
Um, so it's really uh the same thing.
00:42:51.519 --> 00:42:54.159
So uh how do they perform?
00:42:54.159 --> 00:42:55.199
We can try.
00:42:55.199 --> 00:43:03.119
So if we all we need to do really is just create a giant thing to not print this.
00:43:03.119 --> 00:43:05.599
So this is a long text.
00:43:05.599 --> 00:43:12.400
Now we need to start defining these as uh we have to scroll back in the history to find all our definitions.
00:43:12.400 --> 00:43:13.599
Can we do that?
00:43:13.599 --> 00:43:15.840
Um where were we?
00:43:15.840 --> 00:43:17.280
There we go.
00:43:17.280 --> 00:43:26.239
So this was where the Asher says, isn't it nice to use replicate twice without needing to work around it the hybridness?
00:43:26.239 --> 00:43:27.679
Yes, that is nice.
00:43:27.679 --> 00:43:29.679
Okay, so this was the F.
00:43:29.679 --> 00:43:42.239
Doing this one, and then we had um the equivalent one of the tiny apple one.
00:43:42.239 --> 00:43:44.079
That's this one.
00:43:44.079 --> 00:43:47.119
Should we say TA on this one?
00:43:47.119 --> 00:43:48.960
Yeah, okay.
00:43:48.960 --> 00:43:54.400
And then we're gonna assume the constant of the and then yeah, because the CV only gets evaluated once, right?
00:43:54.400 --> 00:43:57.679
So that doesn't take any time.
00:43:57.679 --> 00:44:01.280
And then we had the key when we find Finally got this solution here.
00:44:01.280 --> 00:44:04.960
So this is a tiny apple with the key variant.
00:44:04.960 --> 00:44:06.480
Like that.
00:44:06.480 --> 00:44:09.519
Hopefully they will all work out correctly.
00:44:09.519 --> 00:44:11.679
What do we call this one?
00:44:11.679 --> 00:44:17.360
Oh that's the this one is is silly in this regard anyway.
00:44:17.360 --> 00:44:24.079
So this is the one that's single it's single key.
00:44:27.280 --> 00:44:29.199
Yeah, some powers.
00:44:29.199 --> 00:44:33.039
Yeah, this is the one that array oriented yeah.
00:44:33.039 --> 00:44:35.199
This is the one that used the negative numbers, right?
00:44:35.599 --> 00:44:37.360
Logic, arithmetic logic.
00:44:37.360 --> 00:44:38.239
Yeah.
00:44:38.239 --> 00:44:41.760
Sing single key with negative numbers.
00:44:41.760 --> 00:44:42.480
Okay.
00:44:42.480 --> 00:44:47.119
And then there was this one, the index index updating one.
00:44:47.119 --> 00:44:49.599
It's R gets zero zero.
00:44:49.599 --> 00:44:52.559
Quada well, we should say quad IO in the beginning, right?
00:44:52.559 --> 00:44:54.639
Oh, we already said it.
00:44:54.639 --> 00:44:55.360
That's fine.
00:44:55.360 --> 00:44:57.920
None of us really rely on it.
00:44:57.920 --> 00:45:01.119
And we update R with this.
00:45:01.119 --> 00:45:08.960
And then we return R uh plus slash uh R there.
00:45:08.960 --> 00:45:11.360
So that's the what do we call that?
00:45:11.360 --> 00:45:12.719
One potato, two potatoes?
00:45:12.719 --> 00:45:15.360
Potato solution.
00:45:15.360 --> 00:45:20.159
Yeah, so then there is key with vocabulary, that's this one.
00:45:20.800 --> 00:45:24.719
Um wrap it up again.
00:45:25.199 --> 00:45:28.960
Yeah, but how are we going to do that so that it's efficient?
00:45:28.960 --> 00:45:31.039
This is one function, this is one function.
00:45:31.039 --> 00:45:32.719
You just need to make another top here.
00:45:32.960 --> 00:45:34.719
Like what did I mess up?
00:45:34.719 --> 00:45:36.239
Interesting.
00:45:36.239 --> 00:45:38.400
Anymore to the right?
00:45:38.639 --> 00:45:39.760
No, no, it's okay.
00:45:39.760 --> 00:45:41.360
Oh good now.
00:45:41.360 --> 00:45:42.559
Key with vocabulary.
00:45:42.559 --> 00:45:44.320
I hope I'm getting all this right.
00:45:44.320 --> 00:45:48.559
Uh here's the here's the key with the vocabulary.
00:45:49.039 --> 00:45:53.519
Oh no, I gotta go in two minutes, so uh over both of them.
00:45:53.519 --> 00:46:00.320
I might have to watch the watch the watch the recording to see how this pans out.
00:46:00.320 --> 00:46:02.400
You're almost there, you're almost there.
00:46:02.400 --> 00:46:02.960
Yeah.
00:46:03.199 --> 00:46:04.880
And then we did the sorting.
00:46:04.880 --> 00:46:08.239
Oh, this is the this is getting silly, right?
00:46:08.239 --> 00:46:11.519
This is the flat sorting thing.
00:46:11.519 --> 00:46:14.880
What's the chance that I'm making a mistake here?
00:46:14.880 --> 00:46:20.480
So flat sort.
00:46:20.480 --> 00:46:26.239
And this is the but this is still doing yeah.
00:46:26.960 --> 00:46:28.400
Two sorts and all that.
00:46:28.400 --> 00:46:31.199
Is it worth adding the weird arithmetic one?
00:46:31.199 --> 00:46:34.159
I don't want completeness.
00:46:34.159 --> 00:46:35.920
What was the difference between these two?
00:46:35.920 --> 00:46:42.719
Uh you're finding indices and the differences the first one you uh what partitions.
00:46:43.039 --> 00:46:44.880
That sort indices here.
00:46:44.880 --> 00:46:46.880
This is not gonna end well.
00:46:46.880 --> 00:46:49.599
Are they finding all these lines at the same time?
00:46:49.599 --> 00:46:53.280
Uh this one is the out of product one.
00:46:53.280 --> 00:46:57.360
Uh that's sort of silly there.
00:46:57.360 --> 00:47:03.119
But this is going to be bad because we have to do this thing over over and over again, even though it's a constant.
00:47:03.119 --> 00:47:07.679
So we can fix that by saying here.
00:47:07.679 --> 00:47:11.440
Out of product.
00:47:11.440 --> 00:47:16.320
And then we have got this one, which is pre-penned.
00:47:16.320 --> 00:47:18.159
There's so many of them.
00:47:18.159 --> 00:47:21.360
Prepenned, and then finally the SOF.
00:47:21.360 --> 00:47:23.039
Hey, it all worked.
00:47:27.599 --> 00:47:29.599
It's only counting uh consonants?
00:47:29.599 --> 00:47:31.360
I was gonna say you didn't run any of these.
00:47:31.360 --> 00:47:32.480
How do we know that this worked at all?
00:47:32.480 --> 00:47:34.000
All we did is successfully stored.
00:47:37.440 --> 00:47:39.519
Well, I'll find out after the fact because I've got a lot of things.
00:47:39.519 --> 00:47:40.320
Oh, this is wrong.
00:47:40.320 --> 00:47:40.559
Yeah.
00:47:40.559 --> 00:47:42.320
Uh great to see you all.
00:47:42.320 --> 00:47:43.679
Yes, and this one is bad.
00:47:45.360 --> 00:47:46.000
Bye, Rich.
00:47:46.000 --> 00:47:49.119
I can no longer coast.
00:47:49.119 --> 00:47:50.559
I was coasting, folks.
00:47:50.559 --> 00:47:52.960
Rich and Adam were doing all the heavy lifting.
00:47:53.679 --> 00:47:58.559
I had a protein bar, and uh I have to be back in the game.
00:47:58.559 --> 00:48:04.079
Okay, so we've got uh we got all of these, and now we need to uh to try them all.
00:48:04.079 --> 00:48:07.039
So let's uh say the function names here.
00:48:07.039 --> 00:48:10.159
We got F, which was my original one.
00:48:10.159 --> 00:48:13.920
Uh T A was uh what was that about?
00:48:13.920 --> 00:48:15.119
Remember?
00:48:15.119 --> 00:48:18.079
Um yeah, there was the tiny APL.
00:48:18.079 --> 00:48:19.199
Tiny Apple.
00:48:19.199 --> 00:48:23.199
And then there was the tiny APL with based on key.
00:48:23.199 --> 00:48:29.119
Uh and then there was uh there was the S single key?
00:48:29.119 --> 00:48:40.480
SK single single key, single key with negative numbers, uh the one potato, two potato, one, key with a vocabulary, uh not number two.
00:48:40.480 --> 00:48:41.599
That's fine.
00:48:41.599 --> 00:48:50.000
Fs was the uh the flat sort, and then we got flat flat sort with indices.
00:48:50.000 --> 00:49:08.880
I don't know why the syntax coloring is all broken here, and then we got out of product, and we got asher uh we got pre, which was the pre prepending insertion thing, and then there was finally the the soft one, which was ashes.
00:49:08.880 --> 00:49:21.760
Okay, so these are all our functions, and for each function we want to pend it with long, so this gives us all the uh expressions that we that we want to run.
00:49:21.760 --> 00:49:32.239
Cmbx with cy DMBx uh those expressions are there it didn't actually work.
00:49:32.239 --> 00:49:35.119
What what's wrong with T A K?
00:49:35.119 --> 00:49:42.960
That's this one that works fine.
00:49:42.960 --> 00:49:44.960
T A K with a long one.
00:49:44.960 --> 00:49:47.280
Oh, I think I know what the problem is.
00:49:47.280 --> 00:49:50.400
Uh the long yeah, it's uppercase.
00:49:50.400 --> 00:49:52.400
I just need to make it lowercase.
00:49:52.400 --> 00:49:55.039
Let's try this.
00:49:55.039 --> 00:49:56.400
It's running.
00:49:56.400 --> 00:50:01.840
So meanwhile, while that's running in the chat, they're discussing whether you can you need multiple keys.
00:50:01.840 --> 00:50:04.000
Yeah, you can need keys inside keys.
00:50:04.000 --> 00:50:13.760
I've done that in like database queries, things like you are you want to group by and multiple times because key is really a group by.
00:50:13.760 --> 00:50:18.159
So inside the groups, you might want a a two-dimensional group by.
00:50:18.159 --> 00:50:27.199
So you want a table when one dimension you want the department in one dimension, you want the uh the quarter, something like that.
00:50:27.199 --> 00:50:29.599
So can't really see the graph here.
00:50:29.599 --> 00:50:32.400
Key with vocabulary looks like it gave the wrong result.
00:50:32.400 --> 00:50:33.199
Interesting.
00:50:33.199 --> 00:50:35.519
Big differences in the performance here.
00:50:35.519 --> 00:50:40.000
Um, we can look at that, but it doesn't really matter because the performance was so bad.
00:50:40.000 --> 00:50:45.599
Uh and key with vocabulary might have been the one we defined wrong, that's why it's only doing, but it doesn't matter.
00:50:45.599 --> 00:50:48.000
The fastest one is the preview one.
00:50:48.000 --> 00:50:58.320
Uh, but I mean it's tied with the SK was uh single key, and the tiny apple one that you came up with, Connor, is also very fast.
00:50:58.320 --> 00:51:01.840
Um and then the outer product one.
00:51:01.840 --> 00:51:05.920
So the problem the thing here is that the alphabet is very small, right?
00:51:05.920 --> 00:51:08.719
So that skews things a bit.
00:51:08.719 --> 00:51:12.639
If the alphabet was much smaller, then I think it would make a big difference.
00:51:12.639 --> 00:51:13.840
So we we can try that.
00:51:13.840 --> 00:51:28.239
So if we do um U is uh question mark 1E63 shape one one one four one one two.
00:51:28.239 --> 00:51:30.159
That's the number of characters in Unicode.
00:51:30.159 --> 00:51:33.119
This is the code points, and these are the characters.
00:51:33.119 --> 00:51:38.320
So here are a million Unicode characters, and then we're going to run it against Unicode characters.
00:51:38.320 --> 00:51:40.159
Oh, but this is not gonna work, of course not.
00:51:40.159 --> 00:51:46.000
We can't run it because now it's not well defined what is a consonant and what is a vowel, right?
00:51:46.000 --> 00:51:47.920
I can't tell you.
00:51:47.920 --> 00:51:58.480
So we it will for this particular problem we can't really say that the vocabulary is ever ever is ever big because it's really limited to the Latin alphabet.
00:51:58.480 --> 00:52:07.440
We can extend that to various other Latin alphabets that have got a few more characters each, but even if we do like Vietnamese, it's still a fairly small number of letters in the alphabet.
00:52:07.440 --> 00:52:13.119
If you want to do all of Unicode, then I mean it doesn't what is a vowel?
00:52:13.119 --> 00:52:15.039
It's not well defined.
00:52:15.039 --> 00:52:22.400
So there's no character class for Unicode, that's a vowel character or consonant.
00:52:22.400 --> 00:52:24.000
Don't work like that.
00:52:24.000 --> 00:53:00.480
It's not a real thing anyway, because the letter Y is sometimes one, sometimes the other, and silent letters, and um yeah, but it doesn't it doesn't so the the participant in the chat with the unpronounceable username uh something underscore underscore minus kd eight o z uh says call it unicode minus minus very loudly and just say the vowels but that still makes for very skewed here because it means one group of letters we're looking for is very small, the other one is is very large.
00:53:00.480 --> 00:53:15.039
And that that would mean that whenever any of the solutions that look up in the entire list of consonants is going to be very expensive, but the ones that look up in um just in the vowel list is going to be cheaper.
00:53:15.039 --> 00:53:22.079
So um we also have a request uh to look go over the solutions on ArrayBox.
00:53:22.079 --> 00:53:24.079
And you want to drive that, Connor?
00:53:25.039 --> 00:53:35.760
I can, but uh I'm gonna just have to overlay it on the uh screen you're looking at, and you'll have to switch to YouTube because uh I can't screen share on top of screen sharing.
00:53:36.159 --> 00:53:37.119
Don't worry about me.
00:53:37.840 --> 00:53:42.960
Um well actually, what did I uh let's see if we just do this.
00:53:42.960 --> 00:53:45.440
Will I get back the alright?
00:53:45.440 --> 00:53:46.400
That's the old one.
00:53:46.400 --> 00:53:48.639
Where's the one that I put in the chat more recently?
00:53:48.639 --> 00:53:51.360
I'm watching this episode on YouTube as we speak.
00:53:51.360 --> 00:53:54.000
Alright, so don't do that.
00:53:54.000 --> 00:53:54.880
Do this.
00:53:54.880 --> 00:53:56.719
I'll cover my face.
00:53:56.719 --> 00:53:58.320
Oh yeah, that's true.
00:53:58.320 --> 00:54:00.400
And uh look at that.
00:54:00.400 --> 00:54:03.199
It looks seamless, looks professional.
00:54:03.199 --> 00:54:11.199
And so, I mean, I went on a deep dive, which is why I missed like 80% of the solutions that uh you and Rich were covering.
00:54:11.199 --> 00:54:16.400
Because I mean actually, and we we can we can bring up this one as well, see if that works.
00:54:16.400 --> 00:54:21.199
So this was my original solution, which uh you covered and translated.
00:54:21.199 --> 00:54:27.440
But one thing that I realized, and we might need to zoom out a little bit, is that um might need to zoom out.
00:54:27.440 --> 00:54:27.840
You know what?
00:54:27.840 --> 00:54:29.760
We're gonna cover your face a little bit too, Adam.
00:54:29.760 --> 00:54:35.039
This is Prime Real Estate here, and uh you're still there, just hitting a little bit.
00:54:35.039 --> 00:54:41.440
And so this histogram primitive, let me go back here so I can monitor the chat still.
00:54:41.440 --> 00:54:46.719
I actually misunderstood what I was doing in this solution.
00:54:46.719 --> 00:54:53.679
I somehow magically stumbled into a working solution, but ultimately what I was trying to do.
00:54:53.679 --> 00:54:59.039
If we zoom back in on uh this, I was trying to do this.
00:54:59.039 --> 00:55:02.159
If we if we uh uncomment it.
00:55:02.159 --> 00:55:09.840
So I was I was trying, well, I mean actually, I wasn't trying to do this because I I didn't have the insight to do the without union fork.
00:55:09.840 --> 00:55:20.320
Very beautiful, and this is a famous, not famous, well, it it only really exists in my head and maybe like one other person because I've mentioned this like once or twice on YouTube videos or podcasts.
00:55:20.320 --> 00:55:24.320
This is what I call the the sci-fi tacit pattern.
00:55:24.320 --> 00:55:28.559
You've got a psi combinator inside a phi combinator.
00:55:28.719 --> 00:55:34.960
Wheo! And technically, it's a phi one combinator because it's a dyadic fork that we're partially applying.
00:55:34.960 --> 00:55:38.880
So that's not sci-fi like sci f I.
00:55:38.880 --> 00:55:46.000
It's a play on that, and it's P S I P H Y, P-H-I, aka the two combinators.
00:55:46.000 --> 00:55:59.440
Um, but ultimately, like when you think about this problem, you really just want to do a histogram count on the vowels that exist in your string and the consonants that exist in your string.
00:55:59.440 --> 00:56:01.920
And then you do a max reduce, you add them together, you're done.
00:56:01.920 --> 00:56:11.920
The problem is that there's no array language that has all of these primitives, which is why we're playing around with key, outer product, and then having fun and saying, what if we didn't have key, etc., etc.
00:56:11.920 --> 00:56:22.480
But really, like the simplest thing, and then also I show below here because Madeline in the chat, author of Tiny Apple, mentioned that this is coming, the quad V, aka lowercase vowels, is coming in 2027.
00:56:22.480 --> 00:56:24.320
May or may not have been a joke, nobody knows.
00:56:24.320 --> 00:56:27.039
But if we did have it, this would be even nicer.
00:56:27.039 --> 00:56:39.119
And then so we have, if you combine that with the without union, you then have your consonants and vowels, you call count, and that's the thing that I'll get back to in a sec.
00:56:39.119 --> 00:56:40.239
I wasn't calling count.
00:56:40.239 --> 00:56:46.079
Count just gets you the frequency counts of your individual characters or numbers in your array.
00:56:46.079 --> 00:56:49.920
I was actually calling histogram, which is the dyadic version of that.
00:56:49.920 --> 00:56:55.360
And uh, anyways, once you do this, you do your max, you call the psi combinator, add them together, you're good to go.
00:56:55.360 --> 00:56:58.239
I think I tried to do something like that.
00:56:58.239 --> 00:57:20.719
If you skip the fact that I missed the without union pattern, I was just trying to construct um a psi combinator, a sci-fi fork where you've got the vowels on one side, the count consonants on the other, and then I was trying to do I was trying to spell this pattern in the middle, but I could not for the life of me figure out how to get it to work.
00:57:20.719 --> 00:57:32.079
And I ended up, you know, you can tell I'm I'm you know twisting stuff around in order to do it in close, and then I've got this what I thought was count each, but it's actually a histogram each.
00:57:32.079 --> 00:57:37.679
And I guess the difference being if we if we open up a well, I guess we can do it below here.
00:57:37.679 --> 00:57:40.239
Um we comment this out for a sec.
00:57:40.239 --> 00:57:57.760
So if you've got I guess and so that's the thing, is banana, it doesn't work with it doesn't work with count, because it's apparently, and Madeline mentioned this in the chat, that uh it is defined as inverse indices or something like that.
00:57:57.760 --> 00:58:01.920
Um and and so yeah, that's the thing actually, Madeline.
00:58:01.920 --> 00:58:12.639
So I I missed the last couple um comments, but Madeline just mentioned you can actually do this with uh a selfie on count, which then comes in.
00:58:12.639 --> 00:58:15.519
How many A's are there, and you're good to go.
00:58:15.519 --> 00:58:24.400
The problem is that if you try to inject this into the middle here, you now no longer have the correct left and right arguments.
00:58:24.400 --> 00:58:39.760
And I am not a tacit ninja enough because like we have combined with we have we've partially applied like an argument on the right, and now we're like we're inside the fork and we're on the right tyne of the over combinator, the psi combinator.
00:58:39.760 --> 00:58:42.079
And so how how did that work?
00:58:42.079 --> 00:58:44.719
I understand how that worked because that's monadic, right?
00:58:44.800 --> 00:58:47.519
So count this is monadic and it doesn't work.
00:58:47.519 --> 00:58:49.360
But if we Yeah, it doesn't actually work.
00:58:49.360 --> 00:58:55.280
But if you put if you just put the the selfie there, it uh it's so now it becomes now it becomes histogram, like we saw before.
00:58:55.599 --> 00:59:09.760
Whoops, and if we zoom out a bit, and then I guess I it now it becomes histogram where we're providing I guess the values that you want to count in order, like it's so it's it's like the bins of a histogram that you want to count.
00:59:09.760 --> 00:59:13.920
And so now you have like the or wait, I'm still doing something wrong.
00:59:13.920 --> 00:59:18.800
Ruben uh Virg, aka Madeline's just saying, no, no, just replace in the first tab.
00:59:18.800 --> 00:59:19.920
Okay, I thought I did that.
00:59:19.920 --> 00:59:25.760
If this works, well actually, I guess we gotta so your code didn't run before?
00:59:25.760 --> 00:59:26.719
What?
00:59:26.719 --> 00:59:30.320
I swear to god, you know, maybe it's too early in the morning.
00:59:30.320 --> 00:59:31.360
That's it, that's it.
00:59:31.360 --> 00:59:33.119
It's not that early in the morning, folks, though.
00:59:33.119 --> 00:59:34.159
It's 1113.
00:59:34.159 --> 00:59:36.079
It's almost afternoon.
00:59:36.079 --> 00:59:38.480
Um, first line of the first tab.
00:59:38.480 --> 00:59:39.920
Which one is the first tab?
00:59:39.920 --> 00:59:40.880
This is the first tab.
00:59:40.880 --> 00:59:44.159
Oh yeah, she's just uh a couple seconds behind us.
00:59:44.159 --> 00:59:50.719
How I don't know what I did earlier, folks.
00:59:50.719 --> 00:59:54.960
Uh, but I swear to god I tried this and it didn't work.
00:59:54.960 --> 00:59:56.719
Well, actually, I didn't swear to god.
00:59:56.719 --> 00:59:59.760
I just uh pretty sure I I tried this.
01:00:00.159 --> 01:00:12.480
So there's a there's a backwards over, I think, in in tiny APL that allows you to get rid of the parentheses just because you can't use an atop operator here because of you need to parenthesize the right side.
01:00:12.719 --> 01:00:13.519
Is that gonna work?
01:00:13.519 --> 01:00:14.639
I don't think that's gonna work.
01:00:16.960 --> 01:00:18.079
We have to glue them.
01:00:18.079 --> 01:00:24.880
You have to put an uh top, explicit atop between the max and the and the count in.
01:00:25.199 --> 01:00:26.960
Oh my god, that apparently worked.
01:00:26.960 --> 01:00:28.000
Oh my god.
01:00:28.000 --> 01:00:31.119
Look at you, you're tiny APL Pro, Tiny Apple Pro.
01:00:31.679 --> 01:00:32.159
Wow.
01:00:32.400 --> 01:00:36.719
I mean, I came up with a few of the primitives in tiny APL.
01:00:36.719 --> 01:00:42.159
So and if we do this, we can almost get the 2027 version of this.
01:00:42.159 --> 01:00:44.239
There is no quad V coming.
01:00:44.559 --> 01:00:45.440
Is there no quad V?
01:00:45.599 --> 01:00:45.920
Was that a joke?
01:00:46.000 --> 01:00:48.400
I didn't confirm in the chat it's a joke.
01:00:48.400 --> 01:00:50.320
Um of course not, because it makes no sense.
01:00:50.320 --> 01:00:55.119
You can't say those are the vowels, and that's just that's just it makes no sense.
01:00:55.920 --> 01:00:58.159
Things have to make sense for them to come true, you know.
01:00:58.159 --> 01:01:00.320
I don't know, maybe not in tiny apple.
01:01:00.320 --> 01:01:05.599
Um, and so this is god, you know, what are we talking about, folks?
01:01:05.599 --> 01:01:06.400
This is beautiful.
01:01:06.559 --> 01:01:20.159
I can't believe though, how did I make I mean uh Madeline says that the the circle uh on the bar is uh is her own invention of a backwards over.
01:01:20.159 --> 01:01:30.159
I mean, I've mentioned in in chat, I think all a long time ago, that very often it's a simple function on the left of over and a complex function, composite function on the right.
01:01:30.159 --> 01:01:32.800
So really it would be nice to have it the other way around.
01:01:32.800 --> 01:01:34.639
Uh but yeah.
01:01:35.039 --> 01:01:43.760
But yeah, this is like uh this is what I was after when I started solving this, but then I failed to, you know, come up with this beautiful fork here.
01:01:43.760 --> 01:01:56.719
And so then I started messing around with stuff, and then I just ended up, you know, I ended up with this abomination, uh, thinking that, you know, I don't know, this was the best that you could do, but but boy oh boy was I wrong, folks.
01:01:56.719 --> 01:02:11.679
And this is you know, I was also thinking too, while you were doing that whole uh putting um all the previous defined solutions, like we gotta we gotta create, we gotta vibe code, a little other screen while we're working through the terminal.
01:02:11.679 --> 01:02:15.440
Whenever we have a solved solution, you just copy and paste it into like a little slot.
01:02:15.440 --> 01:02:30.239
And so like the five minutes that we spent going back and getting all the stuff, it was uh you know, there's a there's a nice, beautiful, you know, vibe-coded website where you can just drop them all in, hit a button, and uh hide the messiness of what we were doing there.
01:02:30.239 --> 01:02:32.880
But that's and it will just find all the definitions.
01:02:32.880 --> 01:02:48.800
No, no, just so like you're still working in the REPL, but if you just copy and paste each time you're done, like a little snippet, just copy it and paste to like okay, we're done with that, and then at the end you can come back and just then we hit a button, it rolls compare X, and uh and then it does some nice little whatever fancy animation.
01:02:48.800 --> 01:02:54.880
Um yeah, this is this is this is nice.
01:02:55.039 --> 01:02:58.800
It's not I mean, uh is it significantly better than the key one?
01:02:58.800 --> 01:02:59.440
Oh, of course.
01:03:02.079 --> 01:03:04.800
I'm a I'm a code golfer at heart, you gotta understand, you know.
01:03:04.800 --> 01:03:07.360
Like that's uh it's yes, I understand.
01:03:07.360 --> 01:03:15.920
You know, when you guys were getting rid of like you were like you were doing the what did they call it, the broken keyboard exercise, where it's like what's the best you can do without this, and I'm just like, what?
01:03:15.920 --> 01:03:19.280
That's that's like you're stabbing the code golfer in the heart right there.
01:03:19.280 --> 01:03:20.400
It's like you can't take my primitives.
01:03:20.800 --> 01:03:22.400
What do you do if you've got a broken keyboard?
01:03:22.639 --> 01:03:23.360
It's important.
01:03:23.360 --> 01:03:26.079
You just uh I don't know.
01:03:26.079 --> 01:03:26.800
That's the thing.
01:03:26.800 --> 01:03:28.960
Well, can I still get to every primitive?
01:03:28.960 --> 01:03:31.199
I think that's the thing, is I've got control space.
01:03:31.199 --> 01:03:35.840
As long as space isn't the broken key, I can always fuzzy find my way to the primitive key.
01:03:35.840 --> 01:03:41.599
Yeah, we've got things like I didn't actually know the name of uh so it's back tick back tick oh.
01:03:41.599 --> 01:03:42.239
Like I didn't know that.
01:03:42.239 --> 01:03:48.320
And even even pair, like I use pair all the time, but I can never remember it's back tick backtick semicolon.
01:03:48.320 --> 01:03:53.440
Literally, this is every time I want to type pair, I go back tick semicolon, and I'm like, oh, that's not it.
01:03:53.440 --> 01:03:54.960
And then I said, is it back tick, comma?
01:03:54.960 --> 01:03:57.360
That's not it, and I go, ah, whatever, I'll just I'll just do it.
01:03:57.360 --> 01:04:02.320
And then like I swear to god, every month I I learn it for like three days and then I forget.
01:04:02.320 --> 01:04:13.199
Um, because I guess like I said, I'm not I'm not coding in these languages on uh but the thing is is the broken keyboard, I got my I've gotten and even even if space is gone, I can do this, and then I can just fuzzy find my way, you know.
01:04:13.199 --> 01:04:16.639
There's multiple ways to get to these uh these primitives.
01:04:16.639 --> 01:04:19.039
Anyways, uh is it vastly better?
01:04:19.039 --> 01:04:20.159
I mean defined better.
01:04:20.159 --> 01:04:20.880
Is it more beautiful?
01:04:21.280 --> 01:04:26.639
You want to put in put in the you can just type in in normal in dialogue APL thing.
01:04:26.639 --> 01:04:30.400
And the normal the the equivalent thing.
01:04:30.400 --> 01:04:32.960
So you want to place it in chat for you?
01:04:32.960 --> 01:04:34.000
Or oh sure, yeah.
01:04:34.000 --> 01:04:36.320
Or you want to you can you can I can dictate it.
01:04:36.880 --> 01:04:37.760
Okay, what are we doing here?
01:04:37.760 --> 01:04:44.880
This is the this is the open paren without plus it's wait, is this is this gonna be a non this is APL, so we're just doing it.
01:04:44.960 --> 01:04:49.280
This is the dialogue APL one, but it might yeah, but just to compare what they look like.
01:04:49.280 --> 01:04:53.519
Uh open paren uh without plus over open paren.
01:04:53.519 --> 01:04:57.039
Uh without plus open paren.
01:04:57.039 --> 01:04:58.719
Oh over, yeah.
01:04:58.719 --> 01:05:04.880
Open yeah, you got that open paren here, and then uh max reduction.
01:05:06.639 --> 01:05:09.599
And I guess there's leg, that's why you're watching the YouTube channel.
01:05:09.599 --> 01:05:10.559
I'm watching the video, yeah.
01:05:10.559 --> 01:05:13.360
You can just keep talking, assume I'm doing it right, and then we'll correct it afterwards.
01:05:13.360 --> 01:05:20.239
Uh tally at top right tech, tally, top right tack, that's that one.
01:05:20.800 --> 01:05:26.480
And then after the key, you close the parent, and then you're missing the key.
01:05:26.559 --> 01:05:26.880
Yeah.
01:05:27.119 --> 01:05:28.159
Alright, I added it.
01:05:28.159 --> 01:05:28.480
Yeah.
01:05:29.280 --> 01:05:31.280
The latency here, it's it's messing with us.
01:05:31.280 --> 01:05:31.840
Yeah.
01:05:31.840 --> 01:05:33.199
The intersection.
01:05:33.199 --> 01:05:34.320
Intersection.
01:05:38.000 --> 01:05:38.719
Yeah, exactly.
01:05:38.719 --> 01:05:42.480
So then and then you finish the the rest, right?
01:05:42.480 --> 01:05:46.719
After the closing the parentheses, and then jot V for the vowels.
01:05:46.719 --> 01:05:58.480
Is that so what you mean you lose you are saving one character by doing the reverse and the reverse over.
01:05:58.480 --> 01:06:06.400
But other than And over the uh other than that, there's two characters less by having the additional primitive of the count in.
01:06:07.840 --> 01:06:18.000
Yeah, but so I this is a interesting, I guess for the last nine minutes of this conversation, it's an interesting discussion of like yeah, I see your point.
01:06:18.320 --> 01:06:31.280
This dialogue APL solution, so I guess maybe we can put uh you can also even it out a little bit by by if you don't define it with the vowels, but you just have the actual the actual function, right?
01:06:31.280 --> 01:06:34.400
So get rid of the outer parenthesis and the jot v.
01:06:34.400 --> 01:06:41.039
That makes that saves you two characters over a tiny APL that has to have its its white moons or whatever they're called.
01:06:41.440 --> 01:06:42.079
Right, right.
01:06:42.079 --> 01:06:42.719
I see, I see.
01:06:42.719 --> 01:06:44.159
But well, yeah, we'll we'll avoid that.
01:06:44.159 --> 01:06:45.519
But I definitely see your point.
01:06:45.519 --> 01:06:52.400
The the dialogue APL isn't much worse, or in other words, the tiny apple isn't much better.
01:06:52.400 --> 01:07:23.599
But I would my my affinity uh towards the tiny apple is that this primitive, even though I misunderstood it or misused it, I should say, uh, I'm still gonna go ahead and make the argument that the like if you were to measure the complexity, uh, which is obviously a very, very subjective thing, and you could argue that just like the the you know crescent parens and the tacit programming that exists in this, that could be the most you know complicated thing here.
01:07:23.599 --> 01:07:26.800
But I I'm a very I'm I'm a decent tacit programmer.
01:07:26.800 --> 01:07:56.000
Um and so when I look at the complexity in my mind of like the topics here, for me, like this is the thing that stands out as the most complex, or I don't know if complex is the right word, but you know, for plus or minus for some definition of the right word that I'm looking for, like I always, you know, there's so many things going on in here, like the key, the tally, the atop, the tack, when really all I want is frequency count.
01:07:56.000 --> 01:07:56.880
That's all I want.
01:07:56.880 --> 01:08:02.559
And like you can memorize this idiom as the frequency count that you want.
01:08:02.559 --> 01:08:09.440
Um, but like for me, having a single glyph, and I guess that's the thing, is this isn't even really fit frequency count.
01:08:09.440 --> 01:08:14.960
It's histogram with you know the uh well, yeah, it's it's it's four characters, right?
01:08:15.199 --> 01:08:17.680
Those are the that is really the difference in the length here, right?
01:08:17.680 --> 01:08:22.640
That we got taniotop right key, which I remember as a as a single thing.
01:08:22.640 --> 01:08:25.840
I know that that is exactly what's called histogram, right?
01:08:25.840 --> 01:08:32.800
Uh, and you got the epsilon over over.selfie, which is the histogram, right?
01:08:32.800 --> 01:08:37.359
Those those are two in either either way, you have to remember a phrase.
01:08:37.359 --> 01:08:42.800
You don't have a histogram primitive for self self-histogram or whatever you want to call it.
01:08:42.800 --> 01:08:44.720
Well, so the thing is he's doing here.
01:08:44.960 --> 01:08:51.760
Madeline early in the chat said that uh you know this doesn't work on uh Unicode strings.
01:08:51.760 --> 01:08:55.520
Uh it could, but I I think I don't know.
01:08:55.520 --> 01:09:06.720
I I might have missed I I might have missed part of the conversation, but if I recall correctly, like if we go over here, destroy this solution, and then we just go count on iota 4.
01:09:06.720 --> 01:09:08.560
It should just give us you know this.
01:09:08.560 --> 01:09:18.239
But if we go uh uh this it's not gonna work because the way that this is defined, I think, is the inverse of interval.
01:09:18.239 --> 01:09:20.319
Um and we could we could check to see if you can see.
01:09:20.560 --> 01:09:21.760
You can't use it on character.
01:09:22.239 --> 01:09:25.760
So uh inverse on where is this it?
01:09:25.760 --> 01:09:27.039
Is this how you spell it?
01:09:27.039 --> 01:09:27.920
Or indices?
01:09:27.920 --> 01:09:29.039
How do you spell indices?
01:09:29.039 --> 01:09:30.479
No, it's just a Yotanda bar.
01:09:30.479 --> 01:09:31.439
It's APL.
01:09:31.439 --> 01:09:32.319
Oh, right, right, right.
01:09:32.319 --> 01:09:34.479
I'm getting my I'm getting my languages mixed.
01:09:34.479 --> 01:09:40.399
Yeah, so it's just this, and then of course that makes sense uh that this doesn't work, right?
01:09:40.399 --> 01:09:47.279
But if this did work, you know, if this did work for your um, so what what would it it it would give?
01:09:47.279 --> 01:09:49.039
Yeah, I guess I don't know.
01:09:49.039 --> 01:09:51.520
I guess it's a little bit uh it's a little bit that and that's the thing.
01:09:51.520 --> 01:10:07.359
I've had this discussion as well um with uh Elias, creator of Cap, that I I lean probably not even arguably, definitely, it's just a fact that I lean like past pragmatic, way far to just like I just want things to work.
01:10:07.359 --> 01:10:22.880
And so one of the things that works in Tiny Apple is that if you lowercase, uh or if if you lowercase, if you use the max glyph, the min glyph on a string, but like technically, I asked Elias if he could implement this for cap.
01:10:22.880 --> 01:10:29.359
And he looked into it and considered it, but then said it it kind of breaks when you go to certain alphabets.
01:10:29.359 --> 01:10:39.520
And so like it's not a it's not a uh as as uh Marshall would say, it's not a very uh principled approach to implementing lowercase.
01:10:39.520 --> 01:10:51.439
And so I exchanged emails back and forth with Elias, it was just a couple, but he he said, you know, I I did consider it, but you kind of are doing something that's not you know holistically principled if you do this.
01:10:51.439 --> 01:11:00.560
That being said, I still like I still love this because the alternative in a lot of things, like I mean, I guess in in uh dialogue APL, it's quite nice, it's just quad C.
01:11:00.560 --> 01:11:08.239
But in I think Cap, it's like you know, you have to use like the system function, and then it's it's it's lower or something like that.
01:11:08.239 --> 01:11:17.840
And like, you know, like I said, I'm a code golfer at heart, and stuff like that, like when you can shave something down to a single character, and then it's also too it just it maps, you know.
01:11:17.840 --> 01:11:21.359
Uh I mean the the first I didn't invent this.
01:11:21.680 --> 01:11:36.079
Um uh the K language, at least some of them, uh, have the round down symbol, which is the underbar, does lowercase, it doesn't have round up, and therefore the problem doesn't exist so much.
01:11:36.079 --> 01:11:38.560
Why would you ever uppercase, right?
01:11:38.560 --> 01:11:42.640
In in high frequency trading land, why would you ever uppercase?
01:11:42.640 --> 01:11:50.239
Um, so and and notice all the K people tend to uh tend to write everything in lowercase, they never even use uppercase letters.
01:11:50.239 --> 01:12:02.560
Um so I extended that in like my extend uh or I took that idea into the extended dialogue APL many years ago now, and I used uppercase, lowercase, and more arithmetic.
01:12:02.560 --> 01:12:18.960
So I did things like minus would flip the case and um and the sign for monetic uh multiplication sign that that would give you the case, tell you which if it's uppercase or lowercase, and would give it like one for uppercase, negative one for lowercase, and zero for something that doesn't change case.
01:12:18.960 --> 01:12:26.239
Um and as uh as Jacob is saying, absolute value of a character is uppercase and negation is swap case.
01:12:26.239 --> 01:12:28.720
Yeah, but it doesn't it that's not quite right, actually.
01:12:28.720 --> 01:12:32.079
Absolute value, there are multiple issues with this.
01:12:32.079 --> 01:12:37.039
And I looked all into this when we were creating Quad C, and I I'll tell you a little bit about it here.
01:12:37.039 --> 01:12:43.680
Um the the problem so what Marshall complained about is they're not idempotent towards each other, right?
01:12:43.680 --> 01:12:51.039
Up um floor and ceiling, if you floor, then you have integers and they never change again.
01:12:51.039 --> 01:12:54.880
But if you lowercase, then you can uppercase afterwards.
01:12:54.880 --> 01:13:03.760
Never mind that there are strange things in Unicode where things are not mapping symmetrically, but even that that's already a warning sign that there's a problem there.
01:13:03.760 --> 01:13:06.079
Uh then the but there's actually different things.
01:13:06.079 --> 01:13:11.039
There's something called case mapping, and there's something called case folding, and they're not the same.
01:13:11.039 --> 01:13:16.479
So in most cases, you see case mapping and case uh folding to lowercase.
01:13:16.479 --> 01:13:18.079
So the case folding is just in two versions.
01:13:18.079 --> 01:13:24.319
There's fold to uppercase, fold to lowercase, that's actually another fold, but that that's so obscure, you don't care about it.
01:13:24.319 --> 01:13:36.800
Um but case uh fold to lowercase, which is what many people think of when they say lowercase, is not the same as uh as case sorry, case mapping to I mean I messed up.
01:13:36.800 --> 01:13:40.399
Um uppercase mapping, uppercase uh lowercase mapping.
01:13:40.399 --> 01:13:43.600
Mapping to lowercase is not the same as case folding.
01:13:43.600 --> 01:13:50.560
Case folding means unifying multiple letters that signify the same thing to a single character.
01:13:50.560 --> 01:14:03.600
So just like an uppercase uh A is the same thing as a lowercase a, linguistically speaking, we can fold the two of them together to become a single thing, which we choose arbitrarily that the lowercase form should be the standard form.
01:14:03.600 --> 01:14:11.600
Um but in some alphabet, some letters have uh variant forms.
01:14:11.600 --> 01:14:22.000
So for like in Greek, there's a final sigma, and the final sigma incre uh is the same thing linguistically sort of as the normal sigma, but it only appears at the end of a word.
01:14:22.000 --> 01:14:29.359
So if you want to unify all the sigmas, you take the uppercase sigma and the lowercase sigma and the lowercase final sigma.
01:14:29.359 --> 01:14:38.800
There is no uppercase final sigma, and they all get converted into um a single letter, which is the non-final lowercase sigma.
01:14:38.800 --> 01:14:44.560
Okay, but this doesn't map to floor and ceiling at all, you just can't do that.
01:14:44.560 --> 01:14:46.239
Um, so that's one problem.
01:14:46.239 --> 01:15:00.239
Another problem is that uh the Cherokee alphabet was originally defined only in uppercase, and then they added a lowercase form later, and therefore the normal form that when we fold is to uppercase, not to lowercase.
01:15:00.239 --> 01:15:11.199
And then there are other oddities like in uh in Turkish uh and I think also other Turkic languages, you got dotted i and undotted i.
01:15:11.199 --> 01:15:15.600
Um, so in English, uppercase i is not has no dot, lowercase i has a dot.
01:15:15.600 --> 01:15:25.039
But in Turkish, you've got uppercase i with a dot, and then lowcase form of that is lowcase i with a dot, and there's an uppercase i without a dot, and a lowcase form of that which is lowcase i without a dot.
01:15:25.039 --> 01:15:26.560
And they mean completely different things.
01:15:26.560 --> 01:15:30.079
And I believe somebody even got killed over the difference between them.
01:15:30.079 --> 01:15:36.159
Um so the mapping isn't actually as great as you might think.
01:15:36.159 --> 01:15:41.119
It seems cool at first, but it's not it's actually not that precise.
01:15:41.119 --> 01:15:50.239
Um, absolute value would be the normalization that would be the uh the case folding, and but it still doesn't quite work.
01:15:50.239 --> 01:16:03.199
Not to mention, if you're dealing with Unicode, there are actually different types of uppercasing, lower casing, and normalization things where do you allow a letter to become to change do you let do you allow a text to change length when you change the case?
01:16:03.199 --> 01:16:06.479
And you might think like what how does it change how does it change lengths?
01:16:06.479 --> 01:16:07.359
But that is the case.
01:16:07.359 --> 01:16:16.960
In in at least traditionally in German, if you take you know, you know, German has a double s or a set sharp s uh letter, it looks sort of like a Greek beta.
01:16:16.960 --> 01:16:21.119
And if you uppercase that traditionally it splits into two normal s's.
01:16:21.119 --> 01:16:25.039
But if you lowercase that again, you get two lowercase s's.
01:16:25.039 --> 01:16:35.039
Because you cannot auto-combine, it depends on the meaning of the word whether two uppercase s's combine into a single glyph, uh that is a lowercase uh double s.
01:16:35.039 --> 01:16:47.199
And then Unicode later added an uppercase double s and uh and that doesn't map from the lowercase one because Unicode has a stability policy.
01:16:47.199 --> 01:16:55.680
So all the tools that uppercase they tend to fail on that one letter because Unicode doesn't define it as being the uppercase of the its corresponding lowercase form.
01:16:55.680 --> 01:16:56.880
So everything is asymmetric.
01:16:56.880 --> 01:17:00.079
There's so many issues with this, and then comes the big kicker.
01:17:00.079 --> 01:17:02.560
Let's say you want to compare some data, right?
01:17:02.560 --> 01:17:11.279
Let's say you got a name of a person and an age, and you want to check, do some checking to see is are these two representations of the same person the same?
01:17:11.279 --> 01:17:15.680
So maybe it's spelled with uppercase and lowercase letters, and other ones only spelled in uppercase.
01:17:15.680 --> 01:17:28.399
And and when you've got these mixtures or maybe a nested form of uh of data, often you want to normalize all the character data, but you don't want to have to walk the whole structure to find the character data.
01:17:28.399 --> 01:17:37.119
So what Quad C does, which you probably never see, no pun intended, um is that uh it only touches character data.
01:17:37.119 --> 01:17:45.039
So you can actually uppercase lowercase numeric data or references or uh weird objects and things, and they will just stay as they are.
01:17:45.039 --> 01:18:01.119
And and if we if we overloaded the round up and round down primitives to touch letters as well, then you wouldn't be able to change the case of a whole structure, the character case of a whole structure of uh of data.
01:18:01.119 --> 01:18:06.720
You would have to walk walk it and single out the characters and convert only the those.
01:18:06.720 --> 01:18:08.159
Make sense?
01:18:08.159 --> 01:18:11.920
Or did I there was law and monologue here.
01:18:12.640 --> 01:18:22.880
No, I I mean uh a couple people in the chat are are saying that it does seem like Wewa uh supports the ability to do this stuff with uh custom fill values and whatnot.
01:18:22.880 --> 01:18:29.359
But I mean your long monologue does highlight the point that I understand Unicode is very complicated, but I just want nice things.
01:18:29.359 --> 01:18:30.640
And guess what?
01:18:30.640 --> 01:18:35.520
A couple languages that I never use are gonna fall by the wayside.
01:18:35.520 --> 01:18:42.319
If I ever have my own array language, it's gonna be optimized for golfing folks and speed as well.
01:18:42.319 --> 01:18:50.239
But if there's some like Greek letter that doesn't have something and uh, you know, it it's a character that goes to multiple code points, guess what?
01:18:50.239 --> 01:19:00.399
That that the for the Greek folks out there, I do apologize, but whenever you go to type that letter and you're using my array language that is optimized for golfing, it's gonna be uh it's gonna be a sad day.
01:19:00.399 --> 01:19:02.640
Hopefully it's only one day out of your entire life.
01:19:02.640 --> 01:19:14.319
But um, I do understand that there's all these things that um yeah, it's it's if you really want, like I say, like you know, the martial principled approach, you shouldn't do those things.
01:19:14.319 --> 01:19:27.600
But I am much more in favor, uh not so much in like I'm not saying it makes it a language better or not, but just if I had my own ideal language, I always prefer a single, you know, the quad V.
01:19:27.600 --> 01:19:28.880
I know it's like of course that's a joke.
01:19:28.880 --> 01:19:29.439
Is it a joke?
01:19:29.439 --> 01:19:31.119
Sounds great to me, ship it, you know?
01:19:31.199 --> 01:19:39.439
Like if you're making a golfing language, so something like jelly, jelly has, I believe, built-ins both for the vowels with and without y.
01:19:39.439 --> 01:19:48.399
And like uppercase and lowercase and both cases, and like so it's got all six combinations of those and the consonants with and without y, uppercase and lowercase in both of them.
01:19:48.399 --> 01:19:49.119
Yeah, sure.
01:19:49.119 --> 01:19:51.520
For golfing language, you want that.
01:19:51.520 --> 01:19:52.399
Yeah.
01:19:52.399 --> 01:19:58.800
Uh but in it, but for practical and and certainly dialect cannot become a golfing language.
01:19:58.800 --> 01:20:02.560
And for practical applications, it's very useful to do this sort of thing.
01:20:02.560 --> 01:20:11.920
And that we are um you could even say that floor and ceiling should skip character data, should skip non-numeric data and and just round things.
01:20:11.920 --> 01:20:17.359
Uh but maybe maybe all arithmetic functions should uh skip non-numbers.
01:20:17.359 --> 01:20:26.800
Um, there's a actually there's another objection to this sort of thing, and that is that your langu the definition of your language depends on Unicode.
01:20:26.800 --> 01:20:30.239
So the language itself isn't stable.
01:20:30.239 --> 01:20:45.520
Um and even more sort of broad is that um maybe in the future, when we have contact with aliens and things, and they've got writing systems that are completely different from ours, Unicode will be replaced with something else.
01:20:45.520 --> 01:20:49.279
Today Unicode seems so universal, but it wasn't always.
01:20:49.279 --> 01:20:52.159
There were different ways of representing things before.
01:20:52.159 --> 01:21:01.840
Um, yeah, and as as Madeline saying, maybe Unicode version 50 has negative code points, and you want minus A to give the negated A.
01:21:01.840 --> 01:21:03.039
Yeah, who knows?
01:21:03.039 --> 01:21:11.920
Maybe we find we discover a new dimension, and like text in this dimension needs to be like text that progresses backwards in time, or like anti-meta text, or who knows?
01:21:11.920 --> 01:21:14.319
Like we we don't know what's going to be in the future.
01:21:14.319 --> 01:21:26.000
Um imagine if we had made the language design uh way back in time when nobody in the West that designed these things cared about other alphabets and things out there in the world.
01:21:26.000 --> 01:21:33.760
And then we lock down the primitives, we can't change the meaning of the primitives, that then we don't have a language to communicate in anymore.
01:21:33.760 --> 01:21:44.560
So if we lock down the meaning of these primitives based on a limited vocabulary of characters, and later we discover we actually need more, and now we can't change things.
01:21:44.560 --> 01:21:46.079
You really have this problem, right?
01:21:46.079 --> 01:22:02.319
You've got things like Windows APIs and JavaScript that um that limit themselves to 65,536 characters in the character set, because it was originally thought even by Unicode, right?
01:22:02.319 --> 01:22:04.880
It was thought that, oh, that's that'll be enough.
01:22:04.880 --> 01:22:15.600
We don't need uh need more characters, and then we extended Unicode to go up to well, not quite four bytes, but almost, and 1.1 million characters instead.
01:22:15.600 --> 01:22:20.399
And all of a sudden, those APIs, those languages are broken, right?
01:22:20.399 --> 01:22:25.520
If if you actually try to deal with Unicode text in JavaScript, you'll see that it's plain broken.
01:22:25.520 --> 01:22:28.960
I'm sure there are other languages that I'm less familiar with that are just plain broken.
01:22:28.960 --> 01:22:37.199
And you can you can easily write some JavaScript that creates a string that is impossible, a string that must not exist.
01:22:37.199 --> 01:22:46.319
And then if you catenate two or join, I guess it's called there, if you can join two strings that must not exist, you can all of a sudden have a valid string again.
01:22:46.319 --> 01:22:56.960
You get all kinds of nonsense comes out of this, and it's a huge pain for every application because today Unicode is generally represented using UTF-8, at least when it's in text form.
01:22:56.960 --> 01:23:17.520
Um you have to do all these weird conversions to uh to two bytes with surrogate pairs, and there's a there are blocks, two blocks of the Unicode character set that contain characters that must never appear because they're reserved for the surrogates that are indicators that you're relying on the legacy system.
01:23:17.520 --> 01:23:18.960
It's a huge mess.
01:23:18.960 --> 01:23:26.640
And and but Windows defined its API based on an old version of Unicode before it appeared to people that it needed more than that.
01:23:26.640 --> 01:23:35.520
Are we really so haughty as to say that the current Unicode with UTF-8 and the 1.1 million characters, that is the final?
01:23:35.520 --> 01:23:37.680
That's it, that that's all there will ever be.
01:23:37.680 --> 01:23:48.640
And if we want an array language to last forever, to be like a legacy for for the ages, should we define as primitives in terms of some something as fleeting as a character encoding?
01:23:48.640 --> 01:23:49.359
I think not.
01:23:49.359 --> 01:23:54.079
So system functions they can come and go, they have a lifespan of some decades.
01:23:54.079 --> 01:23:55.760
But primitives there forever.
01:23:55.760 --> 01:24:07.359
So by defining quad C, you know, okay, maybe Unicode will go away, replaced by something else in Galactic Code, and and we'll replace Quad C with, I don't know, quad G, who cares?
01:24:07.359 --> 01:24:09.279
And deprecate quad C.
01:24:09.279 --> 01:24:18.640
But if we had defined it in with terms of the arithmetic functions, then yeah, that's uh it's it's goner.
01:24:18.640 --> 01:24:20.399
What it's a goner?
01:24:20.399 --> 01:24:22.079
Yeah, the language is a goner, right?
01:24:22.159 --> 01:24:22.479
Oh yeah.
01:24:22.720 --> 01:24:30.640
One day in the future, contact with aliens and things, and we need like a billion different characters to represent all the different languages in the galaxy, right?
01:24:30.640 --> 01:24:37.279
And Unicode has as as uh Madeline said, uh Unicode has said there won't be any 18th plane, right?
01:24:37.279 --> 01:24:45.520
We're cutting it off at uh at 1,114,112 characters.
01:24:45.520 --> 01:24:46.880
And that's it.
01:24:46.880 --> 01:24:49.840
We've a stability policy, and we're never gonna exceed that, right?
01:24:49.840 --> 01:24:52.000
640k is enough, folks.
01:24:52.000 --> 01:24:52.720
Go home.
01:24:53.119 --> 01:25:05.199
And you're the limits of your imagination are that you assume that the language and communication mechanism of these aliens is gonna be representable in some kind of uh you know written or printed language.
01:25:05.840 --> 01:25:09.840
We we we don't direct language straight to the brain, you know.
01:25:09.920 --> 01:25:10.960
There's no way to record it.
01:25:10.960 --> 01:25:17.119
It's just it's just alien, human, you know, even calling it a brain is limited, you know.
01:25:17.199 --> 01:25:25.680
There's just gonna be some way to you know, the best word that we have to describe is telepathy, but it's the like we think about the representing dates.
01:25:25.680 --> 01:25:28.159
The year is 1970, right?
01:25:28.159 --> 01:25:31.439
How many digits do you need to represent the the year?
01:25:31.439 --> 01:25:32.560
Two, right?
01:25:32.560 --> 01:25:33.760
70.
01:25:33.760 --> 01:25:36.000
What's going to happen in 30 years?
01:25:36.000 --> 01:25:37.760
We're not gonna be around.
01:25:37.760 --> 01:25:39.840
There'll be somebody else's problem to deal with that.
01:25:39.840 --> 01:25:45.039
So now the ISO standard is we represent years with four digits.
01:25:45.039 --> 01:25:47.039
That will be plenty, don't worry.
01:25:47.039 --> 01:25:49.920
Year 10,000, not my problem.
01:25:49.920 --> 01:25:53.520
And then all the software will break in year 9999.
01:25:53.520 --> 01:25:54.960
Man, this episode.
01:25:54.960 --> 01:25:55.760
Oh, right.
01:25:55.760 --> 01:26:02.239
So um in the chat, yeah, Jacob says uh assuming aliens will have case characters.
01:26:02.239 --> 01:26:03.199
Oh, we don't know.
01:26:03.199 --> 01:26:06.880
But but but Madeline is saying aliens actually have middle case as well.
01:26:06.880 --> 01:26:10.960
I mentioned it briefly before, but there are actually three cases in Unicode.
01:26:10.960 --> 01:26:12.000
Deal with that.
01:26:12.000 --> 01:26:20.319
Uh there's a middle case called title case, and there are only a handful of characters that have a title case, but they actually have three different cases.
01:26:20.319 --> 01:26:23.760
There's uppercase, lowercase, and title case on those characters.
01:26:23.760 --> 01:26:27.359
And Dimas's name begins with one of them.
01:26:27.359 --> 01:26:29.119
There you go, folks.
01:26:29.279 --> 01:26:30.800
What better way to end this?
01:26:30.800 --> 01:26:38.479
Definitely we didn't run off the Rails uh episode of a raycast talking about aliens and the cases.
01:26:38.479 --> 01:26:40.319
Yeah, we are the aliens.
01:26:40.319 --> 01:26:40.960
Yeah.
01:26:41.199 --> 01:26:42.079
Or these daimas.
01:26:42.079 --> 01:26:46.800
Look at the code you write, and the array languages that he implements like gotta be alien.
01:26:46.800 --> 01:26:49.039
It's got a title case character in his name.
01:26:49.359 --> 01:26:50.079
There you go.
01:26:50.079 --> 01:26:52.479
The things you learn on a raycast.
01:26:52.479 --> 01:26:55.600
Alright, well, this has been very fun.
01:26:55.600 --> 01:26:57.760
Didn't realize when Rich left.
01:26:57.760 --> 01:27:00.720
You know, he was the only thing holding us together, you know.
01:27:03.520 --> 01:27:06.479
Um Do you think we'll be able to do a next episode?
01:27:06.479 --> 01:27:09.199
Have you how many bits have you reserved for the episode number?
01:27:09.520 --> 01:27:10.319
Oh, it's fine.
01:27:10.319 --> 01:27:12.079
I think we've I think we can go.
01:27:12.079 --> 01:27:20.079
I mean, it's represented by ASCII, so even if we run out of numbers, which we won't, uh, we should be fine.
01:27:20.079 --> 01:27:23.119
I guess yeah, maybe we should do something special for next episode.
01:27:23.119 --> 01:27:27.920
It's not every it's not every episode you have a power of two, and they're becoming more and more rare.
01:27:28.239 --> 01:27:28.880
Yes.
01:27:29.279 --> 01:27:39.920
Anyways, we will leave links in the description to the Pro Weekly Pro Weekly Challenge, the Dyna videos, and maybe the other stuff that uh we mentioned in this episode.
01:27:39.920 --> 01:27:47.359
I guess with that, we will say Happy Programming and thanks everybody that uh participated in the chat.