 Where are you joining us from? Oh, I'm doing from Iran. Iran, right? Yeah, 4.30 in the morning. Oh, wow But it's good, yeah Thanks for joining session It goes goes 67 miles from from capital. Yeah Well, look at that only three of us Lots of people watching the YouTube videos, but not so many people joining us live. I guess it's a Hard to maintain the consistency. Well, thank you for joining That's a Certain thing you wanted to talk about or should we keep going? Oh Oh Yeah, see me. Both of you Okay, I Think you were about to finish the glyph. Yeah, I think you finish the glitzy. Let's go have a look and then Share my screen So I guess we're doing this one. Were we the rest Were we in the middle of something let's see I Guess not. Is this different to up shoe? Is this like a bigger version of it or something? Oh, it's up shoes That is up shoe. Yeah, we've already done that, right? I Think so, yeah. Yeah, I think so I'm just gonna type help just in case it's some weird different version of it. Oh What has happened that's strange, okay Never mind And if we definitely not done Iota under bar, I guess if we did it would have been probably here Okay dialogue language elements and try and remember what Iota under bar does where interval index Let's put it next to Iota. Okay, so I'm gonna guess that it is shift I correct Iota under bar. All right, we've already got row at this point. So that's good be Matt is two by three all right, so I Order under bar. I guess pretty clearly is showing us the locations of the binary trues And more than that it is replicating them the number of times according to what the number is Doesn't work on negative numbers Doesn't work on floats Okay It's easy enough and then for Matrices It's telling us the coordinates of each of the binary trues. It would be easier if this is printed out Row one column two two one two three. Cool. So Anything else I should add or anything that makes sense What's this one? We won't put it in our notebook, but Should we try if we can figure out what this is? Iota row omega. Oh Okay, so Oh, why is that here? Hi, Isaac. I see so I order I order a row of omega is the indices that Yeah correspond to that to that array and Okay, so That's very important That's a function. That's a function function operator Function, okay, so that's a function. That's a function. That's a function. So this is a book With three functions. Does that sound right? I'm right right so we go Row of This And then we go slash over comma Now there's no reason to use over right because it's monadic. So we could just use jot and get the same thing Yes So first so It's this the commas not necessary is it? Haha, it's not. I guess this is in case. It's like a scalar or something Okay, and then Can anyone remember what slash does The replicate I Guess that's the monadic great Overdue my addict slash is not defined. Oh So Wait, how is this working because one addict slash is not defined that's a syntax error. Oh No, no, no, it's dyadic Because there's a omega here Okay So it's dyadic Okay, we've got a okay, we've got a fork slash Iota row and a dyadic fork applies the outside functions to both outside arguments So Here. Yep. So this is a dyadic fork and it applies the outside functions to both outside arguments So were they just recreating the monadic Iota underbar Let's see. So this is going to be oh I see I think you're right So the reason this works is that slash means replicate and And The left-hand side tells you how many things times to replicate the right-hand side Omega slash omega Okay, so there's a mega slash omega. So that's doing the replicate and then you've got Row of Omega as we discussed Okay, and then dyadic Iota index of So wait, what did I do wrong? Oh It's It's This row is applied to the left down the right. So it's a mega row omega So, right, so I could put parentheses here, right? No, okay, so I'm parsing it wrong. Oh I'm parsing it wrong because of the amegas This is not in parentheses. It's not a fork. So I'm totally wrong So we actually have to be careful about precedence here Without parentheses, it's going to be there's actually no operators in this version. So we Find it most tightly on the on the right So this is actually simply going to be row of omega, which is four and Then Iota which is one two three four So it's just going to be that Which does give us the answer okay Gotta be careful of Precedence and I guess you could do that tacitly by doing Jot and then what a dumb cause selfie. Oh Look at that. Awesome. Yay Okay that was a bit of a Digression a single line in the docs to say This is how you can define Iota under bar. We've made that a bit faster, but I guess it'd be less fun Okay, yeah under bar. Thank you for your fast cable stuff. By the way, Isaac. Hey There's something I wanted for myself. I Think a lot of people are gonna find it really useful. Yeah, I hope so. I'm right now trying to Fight with get her back to him. I'm trying to get it scheduled so it'll Run update if any of the libraries are if any of the libraries are The great idea not the latest it'll just update. I mean then I can Have a big repository that people can just Point to so you don't have to upload their own once they want to Now this one I Remember doing with Claire. It's a bit of an odd one Oh, we're on Okay so Hey, are you? Well, there's two things. Yeah, what's it doing? Okay, so the number of our results is the same as the number on the right-hand side Let's start with a numeric one Because I think I know this one. So what the two four six does is it creates a number of groups? The first group it creates is less than two and Then two to less than four and then four to less than six and then greater than or equal to six And so less than two will become zero Two to less than four will become one four to less than six will become two Greater than or equal to six will become three So that's why one is less than two so it becomes zero two is Two less than four so it becomes one and so forth. So just tell to these to find breakpoints And then it just applies these to those breakpoints and gives you the results But be very careful because it's a bit weird that it Starts at zero instead of one which When I asked about this on the APL discord Marshall Lockburn told me he considers this an off by one error in APL Although somebody else pointed out it does have some convenient properties So you can think of it as like the first group number one is the bit defined by When you actually get greater than or equal to two so zero is like Less than the minimum value Does that make sense? Okay, so this is exactly the same thing That for letters these letters are in alphabetical order So D is between A and E so it's one Y is later than U so it's five Gotcha Okay rank two arrays Interval index works with major cells Okay, so this is one of these ones with broad broadcasting built in Wait, is it higher rank left argument? It compares sub arrays NY Which is the right argument With the major cells of X I'm not quite following What are sub arrays of this I guess three three is a sub array So it's not broadcasting Length just three or three three three would give errors right But what if we did Uh Two rows two columns of three three Three five Yeah, so it's This is sub array one. I guess this is sub array two. So this is the same as as This result concatenated with this result How does it decide that three three is one? I guess it's looking through here to find like a row that contains What exactly Would zero three give you the same result? No I think it's like it's trying to it's basically like looking for the first Okay, I think the issue is It's it's it's comparing column one and then column two And column two would only matter if there was a tie So I think if we went Um, okay one two three four three five So three three Is not bigger than three four Three four is But then the three five is higher still And then four five is off the end Oh greater than or equal to is always going to be there Yeah, so it's saying what row which would this slot into By first of all making sure that it's greater than or equal to the first column And greater than or equal to the second column. So this one Would have to go here because the second is not greater than or equal to But if either of them are greater than the second and it would slot them after right so yeah, but I think it's I think it's exactly the same as doing 12 34 35 All right, that's basically the same thing right same results And if people you want to learn more about this, they've got quite extensive examples Which I suspect means that this is fairly important I guess and you know anytime you're trying to Place a continuous number into a bunch of buckets You would use this kind of approach like plotting groups or something like that Molly, you're very quiet. I can't quite hear you properly Oh, uh, yeah, my mic was long ways away uh histograms. Yeah Yeah circle Okay, I wonder if circle should go in the basic math section Because that's circle functions. I can't imagine we're going to need other Stuff Much a bit of a big topic, I guess circle functions Uh circle here it is right Circle, how do we write circle? Hey, yeah, just remember I've actually installed the APL keyboard. I don't need this thing anymore. Oh, I guess it's useful to see what button to press anyway Okay, so it's Oh, so I can just press alt o. Oh, maybe I need to do this Alt o There we go. Cool Alt o Which I guess it's just called circle. Yep Circle monadic circle I times So I guess that means we could just go What at a circle one? And can we do like that? Yeah, okay Seems easy enough Okay, nothing weird fun oilers identity so I hi I A to the pi I Yeah, this identity Although at this point we haven't done any kind of Trainy things so maybe we should do that in two steps equals Oops, what did I do wrong? Oh, it's not exact. Is that what it's saying? Something weird going on here Have I done something weird? So this is Pi I This is pi I And then this is either the pair of that Yeah, that's definitely pi I That's strange Oh I see It's minus one plus 10 to the negative 16 I Which is basically zero So I think what's happened is My guess is that This is special case or something in APL dialogue APL To remove the annoying floating point residue left over bit here And basically this is close enough to zero I For some reason when we do it all in one go it's Gets it exactly right Right, well, maybe we won't show that then Okay There isn't really a short way to do this so I'm inclined to just provide a link Um, so basically the idea is you Put something on the left And whatever you put on the left to find what function you get And cos is two And presumably we can do both Yep, and can we do it to multiple things? What does that do and not quite clear on what happens when Alpha is An array Oh, I guess it's but well, no, okay, that makes sense. So If we do Pi Okay, so that's basically zero zero or maybe point five So then what happens if we And what does that do Because you kind of I was expecting four results I was expecting sine and cos because If we do sine and cos is zero Or sine and cos Of half pi So why do you So what are the two numbers been? I I think you're applying each function to each of the er sorry Each straight function to each of the ones in the right side I need better vocabulary You think it's broadcasting over the scalars Yes Yeah, I think uh Oh, right, that's exactly what happens by default in apl right is uh A scalar broadcast over an array But if they're both arrays then they just broadcast to each other. Yes Yes, yes, yes, you're exactly right Okay Great, okay Element of we should put with our kind of set related stuff Which I guess is where uh Up and down she were epsilon Why not epsilon Means enlist because ml for us is one I remember And it's just called epsilon Yes Epsilon epsilon Enlist And dyadic epsilon is member of Oh, okay, okay. See what's going on here is two by three Row I o to six So what it's doing is it's got zero that's got a matrix from one to six That's got an array with seven and eight that's got a scalar nine And it just Platons them and sticks them all together flatten can pattern out. I wonder if that does that for More axes Yes, it does Seems easy enough. Uh, okay, so this is interesting Yeah, so this is two by three But this is a single this is oh, sorry, and then this is Ranked this is a shape three So I guess this is um During the broadcasting thing kind of it's Applying it to each row all the elements in ravel order So this flattened that method arrays Yes, so Yeah, it is And also higher anchor arrays But yeah, this last one's interesting and that it's uh Combining these different shapes and actually We've ended up with less ones than we started with right So it's doing something slightly weird here Oh, no, uh, wait, am I doing this right? Okay. No, I'm reading it wrong So actually Yeah, sorry, I forgot I got confused by the precedence Yeah, so Even though there's no space there we have to remember this is actually that right Okay. Yeah, so it's just flattening it out. So it's not weird Yeah, so you got to be a bit careful to remember that although it prints this like a word nine It's actually These are just characters n i n and a that's why this shape is 13 Okay member of abc four Is that Is it an ella? Okay. So is abc an element? Of this set No, it's not Is for an element of this set? Yes, it is So we get zero one and then this is just saying is Each element of the matrix an element of Is set and it puts them in the same order. So One is not an element two is an element three is not an element so forth Makes sense. So if you If you kind of reversed that and did Like one two three epsilon mad Would it be searching like the major cells of if mat was on the The right hand side. Yeah, so it's saying Okay, so still looking cell wise. It's not looking at major cells Saying is six anywhere in that matrix And it's two anywhere in the matrix. Yeah, exactly So I think the right the the rank of the right hand side seems totally meaningless It's just traded as a set I I also tried with two matrices and got the same behavior that you would expect there. Cool Thanks molly All right epsilon underbar Just dyadic Okay, where is a in Oh is a no Is b and A and a is a and a is and I think it's going Okay Wait No, because n is in both and that would be zero And that's zero. So it should be So I was wrong Huh Santa compelling Yeah, worked for the first two It finds occurrences of x within y Okay The whole of x Anna is here And Anna is here And we're going to try to give the easy examples Okay Okay, how do we create this thing x is Okay x1 Is Two by two Oh one One oh two Four by four One one That's what we want. Uh, wait, what's oh, that's x and y Never mind x. All right Oh, I see so it's finding where is like this Oh, where is this like one one diagonal? And you can find it here Here and here Because they're the ones Okay, makes sense Yeah, I think the the the apl wiki seems to have a kind of a I think a better explanation of it, but The inquiry maybe you guys already talked about that. I've been I've been in and out of the discussion Um, no, we hadn't thanks buddy Great Why is there an n here? Is that actually the other end? Oh, no, let's see the other shoe on that one And till do we've done this first two might go under the math I think might go in math Yeah, I think there's the circle star is log and natural log And the domino looking thing is matrix division and matrix inversion. I think Okay matrix we're going to have to do after we've done rank Certainly log we can do circle star Oh, that's easy Do you know how to type it? I think it is The back tick star Oh Or alt star now to me Not a great rendering here. I think rather than writing that I'd rather write e to the power of one There we go domino quadtivo Matrix inverse and matrix division by Okay But I'll write them down and then we can put them somewhere And how do I take this one molly to know or anybody? I believe it's um The um plus So it's the same as division, but with the shift key I think That one I think so that doesn't quite look right does it that was sorry? Sorry, that was alt shift slash Uh, alt shift plus or oh Oh shift plus sorry Is there some way to get a What's a good easy way to get an identity matrix? I did that in a blog Oh Well, I used it. I don't know that I uh doing how I got here was um I'll put in the chat when my identity function was why is this not working? Have I got it the wrong way around? I think I do actually Yes Oh, there's a few things happening in the chat I noticed I guess it's fine. Anyway, we can see easily enough. It's That's the inverse. That's the identity Oh I'm not really sure what matrix division means anybody of you now Oh, I think you're using x instead of the dash How do I do that? Okay I haven't quite heard that expression matrix division before but it makes sense It's just the opposite of matrix multiplication Oh cool. There's pseudo inverses as well If there's more rows and columns the least squares result So I think that's just what's called the pseudo inverse It's neat Okay, linear regression on complex numbers. Why not? Oh lots of things to study there Probably a good time to stop I thought we've done dot Or if we only done it in this one situation What do we not do it at all? I'm not sure that we've done it No, that's bad because I've definitely referred to it Yeah, I think we talked about it a bit Um, okay. Well, let's pop it underneath a ray rank But I don't know that we Linear algebra Let's quickly do this then But we finish dot Rich is a operator. Oh, it's an operator So we can't do it here Let's put it over here All right Okay, so this is a dot product One times four plus two times five plus three times six This is Interesting So this is some and isn't it? So this is three equals three and three equals three and three equals three and three equals three If I did this would be zero That's cool For example Okay You know when I was playing with this inner product I was thinking that using it with the up and down styles for min and max was Could be useful as well Right Go on. I can see where you're heading Uh So you could um I'm reading my own blog post trying to figure out what it means. So Oh, let's maybe just put it in the Forms right after we do it And so then they had uh Oh, yeah, then they got the special case actually Didn't we do that in The competition thing Because we were doing that. Oh, or maybe we just played with it, but we ended up getting rid of it I remember we talked about outer product for that gene example But um, yeah, I think I messed it up and didn't quite get it working So that's fine. All right I think that's it Thanks all Good to see you All right, thanks a bunch. Bye Okay, bye