 Hello, everybody. Hello. Good morning, Jeremy. How you guys doing? Hi. Doing good. I got a APL thing just pushed a couple minutes ago, so it's perfect timing. Let me see. Notebook one of the FASTAI numerical linear algebra course, but APL-ified. Oh, it's not on the forum yet. Where do I find it? I just posted in the chat here. I literally pushed it like two minutes ago, so I haven't even had a chance to post it on the forum. I just got it done. But I will make a forum post after the call. Okay, so this is about the numerical computational linear algebra course, which we did, oh my god, five years ago? Well, three days short. Nearly five. Oh my gosh, that's amazing. I started going through it when you mentioned it just the other day, and it seems like a great course. I don't know why I didn't do it sooner. Oh, thanks. Fantastic. We like to think so. I mean, it's not as like obviously immediately applicable kind of a thing, but you know, it's interesting. Okay, so you've taken the first notebook from it. And here we go. Ah, APL. Look at that. We've got those two ones, and then I calculate the answer using our matrix multiplication. Oh, nice. I see this is like a little just empty thing to fill in the space, I guess. Yeah, I'm not really sure how to make tables look good in APL. I came up with. Together, but one more section. A couple more sections here. I got to learn a bunch of new glyphs doing this. Nice using the power operator. I'm glad we did that. And I didn't know how to calculate them a smart way, but I got them calculated and hopefully I'll learn a smarter way later in the course. All right, great. That's the last of it. This is my favorite bloom filter joke. It's also the only one I know. It's a good one. Nice job, Isaac. That's cool. Thank you. It's not going to get any easier. Well, I mean, in theory, this should be exactly what APL is good at, right? Yes, absolutely. I mean, the bits we have to start like opening JPEGs and stuff might get complicated, but. Oh yeah, I spent some time trying to figure out how to open images. I don't have a super easy way of doing it as far as I can tell, so I'll have to take another stab at that later. And then Molly's posted something. You can talk, Molly, you don't have to put stuff in the chat. We like hearing from people. Oh, no, the conversation was already going, so I was waiting for it to be over. Yeah, so a few videos ago, Euler's formula was talked about just a bit and Euler's identity. Um, yeah, the Khan Academy one shows like the power series of the power, sorry. McClure, McLeodian, I forget. Is that like a Taylor series? Oh yeah, I guess it must be like a Taylor series. Yeah, like a Taylor series. It shows it for sine cosine and E, and then inserts I into the one for the exponential. Yeah, that one inserts I into it and shows how it's a combination of the sine and cosine with an I in it. Great. Yeah. Thanks for the tip. And then you can split and then it shows how you can split them up into the one for sine and cosine and how it ends up looking like. Yeah, Euler's formula. Excellent. Thank you. Anything else that's come up. I was just going to say, Jeremy, I listened to some more of the array broadcast content. The array cast, or you made my particular wonder or just I listened to yours too, which was great for the other. What shocked me was that how deeply embedded APL is in Wall Street. Yes, that's amazing. I didn't realize that that was such a long legacy there with trading. Yes. Yeah, I mean, mainly nowadays it's K and KDB, which I think most of the big sense hedge fund trading folks use. But that itself came from a plus, which Arthur Whitney built at Morgan Stanley, and I discovered the other day that it actually exists as an open source thing nowadays. Not exactly. Yeah, historical interest. I think there was some kind of who was the interview talking about one of the reasons that the APL community is a bit cloistered as you said last time is that a lot of them didn't open source their presentations. They really built around proprietary applications and that limited the exposure, which is really interesting compared to something like Python. Yeah, exactly. And it's also interesting how proprietary trading shops like secrecy is so important to them, but also they don't care about following cultural trends. They tend to like pick things that are good regardless of whether they're popular. So, like Jane Street, for example, uses a camel. And yeah, Morgan Stanley had a plus and lots of them use APL. Yeah, it is. It is interesting. I know a lot of them have been moving towards using more Python in recent years though, which I think, you know, partly that might be because Python is much better for working with accelerators. This one with Aaron was like one of my favorite episodes if you haven't seen it. And then this one with Brooke was interesting. It doesn't actually talk about APL that much, but just like your screen. I figured it out you're doing this so that you get us to talk. Whatever works. Great. So that means that whole discussion about rolling this in the chat. Yes. Isaac's thing you didn't actually say it. No, we saw that. I don't even remember pressing the stop sharing screen button. Okay. Fine. Yeah, okay, so this is Kay. And this is a plus. And this is this. Yeah, public. The available implementation. And yeah, this is the one with Aaron who built a GPU compiler in APL. And yeah, this one with Brooke, I thought was cool. Each other ones are good. There was also one with Eric Iverson, which was good. Yeah, this one is good. It's a kind of a weird podcast because the first few episodes. Kind of like assume you don't know anything about array programming. So it's like, why would you be listening to an array programming podcast if you didn't know anything about programming. Yeah. Anyway, I felt about the point where they talked to Eric and talked about tacit programming was where it started getting interesting. Yeah, I didn't know about it until until you mentioned you were going on. Thanks for telling us. All right. No worries. Okay, should we do some calculus then? Okay, going into calculus. Yeah, so this is where we got to yesterday, right? We were doing rows over run the slope. So this is a numerical approximation of a derivative. And it's an approximation because like, the smaller you get this, the closer you get to the slope at this exact point. But it's never, you know, quite short enough to be perfect. Yeah, I thought it'd be nice if we could create something that would calculate this for any function, which we can do. And the way you do it is by creating a custom operator. So we could create something called gradient. We could kind of copy and paste all this. And let's say we put X on the left so that'll be our alpha and our difference will be on the right. So that'll be our omega. Okay, so that's going to be a gradient of a particular function. Right. So the gradient of F at X, which is three. Well, let's write it at three with a difference of 0.01. Oh, I've got to run everything. I didn't know I'd restarted my notebook. I'm surprised how long it takes to run. Actually, it's happening. Slowly, it comes. There we go. Okay. So that number is the same as that number. So the thing is, we want to replace F with, oh, and let's simplify this. We don't need these parentheses, right? Because plus happens first. There we go. So in order to pass in a function, we can turn this into an operator. And so if you look at the help for an operator like star diarisis, you've got up to five things around it. You've got the two arguments of the function it creates. And one or two arguments of the functions that you pass to the operator. So there's five things. So if you want to create a custom operator, this thing's going to be omega. This thing's going to be alpha. And then there's two more things. This thing is going to be called omega omega. And this thing is going to be called alpha alpha. So if we replace F with double alpha, we've now created an operator. And so that means we now have to tell it what function to take the derivative of. Oh, omega omega. So I'm going to put it on the right. Okay. I'm not aware of needing to put it in parentheses, but what did I do wrong? Why you still keep the F. Why, why is there an F here? Yeah. Because I got to say what, what am I taking the gradient of? So I'm taking the gradient of this function. So that's the thing that omega omega is going to be replaced with. So this is kind of where I find the quad operator really nice because right in the function, you can add your print statements to, you know, So like take that first, that alpha that it's pointing at and assign that to the quad operator and the function and then it'll print out where it's there hopefully. Okay, which is that should run before most everything else. Okay. So it should print that before it fails. No, that didn't work. All right, let's try making something simpler. We're going to create an operator which just calls the function. Okay, so there's the world's dumbest operator. So we should be able to go G of plus, which would be plus apply that to two. Okay. Plus. All right. So that did not work how I expected. Does it need to be alpha alpha the other way around? So normally you do like plus slash. So it goes on the right. I don't think this is right. So maybe if we search for this, I haven't normally found this search very useful. Let's give it a try. Dops. Yes. Okay. So it does expect to have just alpha alpha. If it's magnetic. So that means. Oh, it goes, I think the opposite way around the way I expected. All right. So let's change this to alpha alpha. And that would mean I think it's plus G. Ah, okay. So I guess that makes sense. Other operators work that way, like plus slash. Yeah. Yeah. It goes. They do. No. All right. Yes. Yeah. Somehow I had it backwards in my head. Okay. All that. Fine. By the way, Isaac, for your flashcards, it occurred to me that a lot of these things don't really make sense as flashcards. And for those like it occurred to me that something that might be useful is. If you. Added tags to the ones that you want to be exported as cards. Then you could go through in your script and just add cards for those that have like a card tag on it or something like that. That would be a way to avoid having lots of crap. You don't need. Yeah. I quickly learned the shortcut to suspend the card. But that would probably be a better way to do it. Yeah. Okay. Great. Yeah. So it's a bit, I don't know. It's a bit weird in some ways, but I guess it kind of makes sense. This is how you create an operator. So this is a monadic operator because it only has alpha, alpha. It doesn't have a mega, a mega. And it's a monadic operator that creates a dyadic function. Because it's got an alpha and a mega. And so I don't think we actually need the parentheses anymore. Yeah, we don't, because operators bind more tightly. So it's as if this is parenthesized. Does that make sense? So a monadic operator takes stuff from the left. If you give it an alpha, alpha, it would take stuff on the left. I mean, I assume we could go omega, omega, although as Isaac said, that's not quite what you would expect given how other ones work. Let's see if it works. Nope. You can't. Okay. So yeah, it goes on the left. If you say alpha, alpha. And if it's on the left and the right, then you would do both. Okay. So that's our custom derivative. And that's a numeric approximation of a derivative to be more precise. All right. So, okay, we've got a whole list of operators here. Wait. So left arrow is considered an operator. Has anybody figured out what the curly brackets means yet, by the way? I'll tell you an operator I'd quite like to do is this one, Tilda diresis. I think that can save a parenthesis in the one we just did. Correct. Tilda, Tilda diresis. Okay, which is a monadic operator. So it's going to take one function on its left and it produces a dietic function. Hence there's the one function on its left and that's results in a dietic function. It's got a bit of a strange name commute. But all it does is it takes X and Y and it returns a function that actually calls Y FX rather than X F Y. So if we do, okay, what's the letter for that? Yeah. Shift T. And that's called Tilda diresis. Monadic. Shift T. Diadic. Shift T. Oh, there is no monadic. Okay. So then there's commute. You could say, yeah, 3 minus 2 is that. So that would be putting X on the left and Y on the right. So it's 3 minus 2. But if we do it the other way around 2 minus 3, we could also write like this 2 minus, so 3 minus, what was the letter again? T. Yeah. And then commute means switch the order of the arguments. Does that make sense? So just flip them around. Oh, just one moment. My daughter wants me. Sorry. We had a missing computer problem. So Marty found a link for. Brackets. Curly braces. Great. I thought they might be optional arguments, but it didn't make sense for results. So it can indicate shy results. And did you find out what a shy result is? I've heard that word before. APL shy. Result. Ah, okay. By default functions print their result. Unless they're shy. Okay. So that's an optional argument. And that's a shy result. Great. How do you define a shy result in a function? No idea. Okay. So this is a dyadic. Tilted irises. And so we can now redefine gradient. So. So because the right hand side is handled first, we can now say, and I find it's really helpful to like. Find a way to. Say this. Which is I would say Omega. Divide it into. The right hand side. So I wouldn't say. Divide. Commute. I would say divided into like normally there's some way you can like express the idea of these things being backwards in a. Reasonable math or English expression. So that does make it a bit more clean. Which is nice. And then there was another version of each of. Tilted irises, which is constant. And so constant just always returns its argument. So we could create a function. Called zero. Zero. And so this. This is a function. And so we can apply it to anything we like. And I believe we can even do it diatically. So that's just a function that returns zero. And that's it for tilted irises. This form I see a lot. People use it very frequently. In APL. Jeremy, when are they using it? They use it for exactly this kind of purpose. Okay. APL is hate parentheses. And they hate. Unnecessary symbols. Which I kind of get like it's. This is certainly. By having less stuff to read. I find it easier to read. You know, the other one I think we might want to do. Is each which one of these is each. Does anybody remember this one? Yeah, this one. Okay, so this is just diarieses. And here it is. It's a monadic operator. Oh, this word here. Means can be either monadic or dyadic. It's not ambivalent as in I don't care, but it's ambivalent as in either valence. Where valence is handedness. Yes. This is. This is a list of. Okay, this is a list. This is an array of arrays. So it's an array with two elements. And. If we try to do plus slash of that. It's going to get upset because it's trying to do. It's trying to insert plus between its arguments, which would be the same as typing one, two, three, four, plus five, six, seven. The each operator. Takes the previous function, which in this case is itself. Been defined with an operator. And it means some. And it applies it over each of its arguments. So plus slash. Each means apply plus slash to this. And then apply plus slash to this. Thus giving us the results 10 and 18. So it makes sense. And I think. That might work for. Like. It's creating an array. A matrix. Which is a two rows by three column. Array. Six rows going to go between them. Thank you. So if I try to do. Two, three plus. Matt. Something like that can work in NumPy. It would broadcast the. Maybe like this. Broadcast this over each row. But it doesn't add it also, I think, can work in J. But I don't think by default it works in APL. But I think if we. Say that it applies to each element of Matt. Each column. Something like that. I think the problem is that it's going through each of two. Yeah, I think it's. Yeah, I think a problem is it's going through each of. Two, three, four separately. What does this look like plus slash. Okay. So it doesn't actually work that way. The correctly. On a, on a matrix. Third place. I think this is. This might be related to when we were looking at. The IOTA before where we were. Searching for. Using it to find values in the, in the matrix. It was. You wouldn't find individual values. You'd find all rows at a time. Yeah. I think the issue is it's not going over cells of an array, but going over. Items. So I'm guessing. If we. Like this. Do like. Oh, not Matt. Okay. Yeah. So that's going to go over each of these. It's going to go over. Two plus this. And then it'll go three plus this. And I assume there must be some way to. Make that apply over. A rank to array, but I don't know what it is. So I guess. Anybody fingers that out. Let us know. Otherwise, I guess we'll probably come to it at some point. Put the syntax for defining a shy function. And the chat. Okay. And one of the structure flow, but. I don't know. Shy. This is not shy. Let me copy them. I don't really have much of a flow. I got to be honest. Oh, it didn't work. It seems like you're on a roll to me. Okay. So. I'm going to guess. Is it. Yep. And this one's not shy. So when you actually signed it to the function that makes it not print out. Cool. Thanks. Yeah. Not sure when I would want things not to print out, but. Okay. So none of their examples are using matrices. The only other place that could be helpful to look at is to look at the APL wiki. It's only defined in nested APLs. I think that means things where you can have an array in an array. Okay. I don't know what I knew that means. I don't know. I don't know. I don't know. I don't know how to search an APL card. That would be nice if you can search for symbols. So I assume there's going to be some magic incantation that basically turns a matrix into. An array of arrays of rows. And that you would do it. Do it that way. I assume. Okay. So you can search for a. An APL symbol on APL cart. We'll give you everything that's in. Okay. That's a good idea. Most of them are to me, but. I mean, now it's not a bad idea to learn how to use this thing. Because when I was on the podcast, they seemed to think it was thing worth learning about. Okay. Here it is. Each. Now how do I. I see. So typing comma each ensures all events vectors. Join items. I see these are like idioms, I guess. Yeah. Like one that I found, I was, when I was working on this computationally, I wanted to type in like calculate the determinant. And they've got a big long. Thing for that. And so some of them. I think for most of them, the ones at the top seem to be more simpler than the ones down below. Okay. They are sorted. And actually this, this table's, it lives in a. Text file. This is a repository. Here is Conway's game of life. That's great. I'm going to be really happy when I can read all this. Yeah. This is intense. That's cool. I only see one thing that mentions in matrix. Can you try adding matrix to the search? Oh, I can search here. That works too. Pept to diagonal matrices. And I believe there are, he does have additional. That's not shown here to help with the searching. On diagonal matrix. Matrix. So if I copy this. And saying at the top that. What each thing is. And it's a matrix. And capital N is in numeric array. I was just saying it's a numeric array, which is a matrix, I guess. So I guess that means in theory. We could type mat here. We can. Okay. This is. Okay, this is the each which is flipped. Okay. I'm going to try to do this just now. All right. I see slash bar and slope bar a lot. I didn't know this is called slope. I always call it backslash. And I have no idea what they are. So maybe we should learn. It's as an operator. It's a monadic operator. And we type it with a slash. Makes sense. Slash. And this is called. Replicate first. No, it's called. Reduce first. Reduce first. Oh, my daughter wants me again. So if you do with a. Some plus slash. And a matrix. Versus this one, one will some column wise and one will some row wise. Okay. Cool. We had a matrix ready to go then. Okay. And is that literally all it does. This is okay. So in J. J has a rank operator, which is actually the double quote sign. Where basically you can just always say what axis you want to use. So that would be reduced over over the zero axis. And that would be reduced over the one axis. But I'm not sure if you can do anything quite the same. There is a thing called rank. We should see how this is different. So that's this one here, which is called jot diresis. I assume. J. Jift J. Classic edition. It doesn't have the same like usual information. Anyway, it's called rank. I already forgotten what letter I said. J. I guess this is called jot diresis. But I didn't see a thing for it on attic. And if I say do it over this axis. Well, that sure didn't work. Oh, I need this. Hey, look, it is the same. So wait, no, that's the same as some. And what if we put a zero? Okay. I don't know what I'm doing. Let's come back to that one and make sure we okay. So it sounds like slash bar. There's not much to learn, which is it's just the same as slash. But it does it over a different axis, which I assume is going to be the same for backslash bar. Except they didn't call it backslash. They call it slope. And that's probably going to be back to backslash. I'm guessing. Nope. It's not. All right. So we can, we can specify the access. Plus slash. Yep. By adding like bracket one, the right after the operator. I believe and then bracket. Like that. No square brackets immediately after the operator. So it's like that. Okay, so. Does that apply for like, does that apply for like everything or is that just this particular. I feel like I've seen that mentioned in the docs. Yeah, it's called a function access. This is like operators. Can you put it on all functions or. I think it's all functions. Okay, so why on earth do we need. Slash bar. Access. This is what I was looking at here. F must be a monadic primitive. Mixed function taken from these. Or function. Okay. No, I can't apply to many things. It's just slash. Or slope. Or these. I wonder why there's a bunch of. And then you've also got access with dyadic operand. It must be a dyadic primitive scalar function. Oh, well, that's good. So any dyadic scalar function. Primitive scalar function. Or a mixed function, which I see means one with an operator. Where they've used one of these. Okay. So it actually does sound like you can do a lot of things with it. That's good. Yeah, there's a, there's a wiki I put on the chat about the function access specifically and kind of covers both. I think it's kind of a combination of these two. Okay, cool. I see a few other people. Is there anything we wanted to. Talk about or ask about. Anybody wants to speak up. Function access. Mine was, was not specifically related to the content we were discussing, so didn't want to bring it up. Oh, no, please do. We're so like, not at all focused Molly. As you'll see. This is just a like, yeah. I'm just chatting about whatever seems interesting. And formula is definitely interesting. Oh yeah, so I came for it. So I first came across Euler's formula in a paper that I was reading on positional embeddings. So I had no idea what it was. I actually use this to figure out the fundamentals I was missing. Yeah, it was rotational positional embeddings is what it was called. Yeah. So for those of you who are interested in transformer models, there's like literally no sense of like the order of things in a vector. And so it's like literally impossible for it to learn anything that requires order and language is ordered. So we use these things called positional embeddings. Is it this rotary position? A rotary positional. It's been a while. Yes. That's it. And then there is a proof. Yeah, this was the actual proof I was going through. Trying to figure out what they were talking about. All right. Yeah. And then I was missing a lot of the fundamentals. So I just go down to where they're doing the actual proof. And then you can just click on the very whatever you do not understand like the proof or what you don't understand. So if you don't understand complex cosine, like how they're able to get the complex cosine function. And it's not like infinite. You don't find yourself clicking. Come back to where you started. Some what that can happen. But yeah. And then I just start looking up the various things they're talking about here until I understand it. So. Okay. That's cool. It's just one way I was able to understand papers, like the math behind papers and stuff. So. Thanks. That's great. All right. We might stop now and probably talk about axis next time. Something's going to be there. I just put a number. We can do that next time. That's going to be super handy. All right. Thanks everybody. See you next time. Bye. Yeah. Good one. Bye.