 This is a video about the verb note. But before I begin, I respectfully acknowledge that I'm standing on the unceded traditional territory of the Comox First Nation. Now about note. Note is a verb that allows you to do comments. So for instance, if I wanted to add 2 plus 4 and I decided to put a comment, I can put in quote comment. Oh, I'll just say addition. And now when I return note, it's just going to do the 2 plus 4 part of it and return that. And this will just become a comment for posterity saying that what I'm doing there is addition. Not a big surprise. But note has other tricks up its sleeve. So I'm going to say multi. It could be anything. It's just a single argument, but what it does is as soon as I hit that it takes me right over to the left margin and I can go line, and I can go line, and then when I finally decided I've had enough putting in lines, I do a right parentheses and I'm back to where I was before. So it's a way of doing a multi-line comment in J. Now, I don't find it the most useful thing. I said before in a previous video that I find NB period much more useful in terms of commenting, but what's fascinating about note is the way it's defined to do all this work. So you see all the things it's doing here. If it's given two arguments, 2 plus 4 on one side addition on the other, it just returns the left argument, the answer to left argument. If it's got one argument, it does this fancy stuff and gives you a multi-line. So you'd expect something kind of wild or probably pretty complicated. Maybe a lot of lines have used other languages. When I type in note and I don't give it any argument and hit return, it gives me the definition of note. And there it is. And when I didn't know much, J, I'd look at a definition like this and just go, I have three colons, I have four zeros, I have a dollar sign, I have two quotation marks, I have a left bracket and a number three. And that is a program that will do what note does. And it does. But you kind of have to know what you're looking at. So let's take a look at note. And when I look at note in this definition, I'm going to take a look at this specific colon to start with. And what I see here is on one side, I've got a verb, and on this side, I've got a verb. So I have a verb and another verb, and I have a colon. And when I have a verb on one side of a colon and verb on the other side of a colon, it means something. And what it means is I am defining a new verb composed of these two verbs. Well, let's just take a quick look and we can play around a bit and try and figure out how it uses these two verbs to make a new verb. So if I take a verb like square, this is the verb for square. If I just put in a number there, it's going to give me the square of the number. So that's a verb. And then I do the colon on its own. And I'm going to do the left bracket again. And now I'm going to give it an argument, say 6. And when I hit this, it looks like what it's going to do is it's going to execute this verb. It's going to square it. But when I give it two arguments, so I can do a 4 here and a 6 here, and in between I've got this verb, it returns 4. Well, when it's got two verbs, it's working on this one. And what that verb does, if I do 5, anything, it's always going to return the number to its left. That's what that verb does. So going back here, now we've established that this would be a monadic side. So monadic verbs, they only take one argument. And this would be a dyadic verb. It takes two arguments. So on this side, you've got a dyadic verb. And on this side, you've got a monadic verb. And our next part is going to be on this colon here. Because we're pretty comfortable with what's happening on the dyadic side. But what's happening on the monadic side now? The format we've got here is we've got a noun, like the 3, and we've got another noun, which is this string here. And now we've got a colon between the two nouns. So it's different. It's a different format than what we saw between the v colon v. Now it's a noun colon noun. And that's significant. That changes what the colon does. It's still going to do a definition. It's going to do it in a different way. So what is the way that it's going to do it? Well, a clue. And I'll kind of come through this backhanded. Because the language has already defined a few things for you. So if I type in the word noun, I get zero. And if I type in the word adverb, that's another part of speech for j, I get one. Conjunction, I get two. Verb, I get three. And if it was a dyad, which is a verb that takes two arguments, I get four. So now, looking back at this again, this three is what tells me that I'm defining a verb. So this whole side here is a definition of a verb. And it's defined, it knows it's a verb because of the three. And the rest of this is what the definition is. So that string is the definition of a verb, which brings us to this last colon, that one there. So what's happening with that colon? Well, let's play around a little bit with it. So back to j. And let's start out with the zero, zero, shape, I don't know, four, five, six. I just get the next line. It's like nothing happened. Well, something did happen. Because if I type four, five, six, I get four, five, six back. But because I had zero, zero, shape, it means I'm not going to get four, five, six back. I'm going to get zero items and zero rows, which is going to look like I got nothing. So zero, zero shape is a way to make sure that you don't get anything back. It's sort of like a no op. It's going to do work, but it's going to nullify it. It's not going to give you any results. It's just a quick way of saying, I just discard whatever it was going to throw me. I don't care about it. It's nothing. It's nothing to me. Okay, so that takes care of the zero, zero, shape part. What about the zero colon zero part? Let's look at zero, colon, zero. Now we know zero is a noun and zero is a noun, so we're in the noun, colon, noun form. So we're back to this form here. Noun, colon, noun. And because we've got zero, we know we're defining a noun. Nouns are zero. So we're defining a noun, but we don't have a string here anymore. So where we had a string before, which was this between the two quote marks, we don't have that anymore. We just got a zero, a zero on its own. And what a zero on its own does is it says, stop everything. What's the next line? And I am going to define this as a noun, because that's what the first zero tells me. And any line I want to put in here, I'm going to keep feeding it. So it's a way of doing multi-line things until when I want to stop, I hit write parentheses, and now I'm back to where I was. Now notice that it echoed back. It said the line I typed in, and then it typed it back. How would I get rid of that? How indeed you ask? Well, the answer is zero, zero dollar sign. And now I'm going to get the same effect. I've entered multi-lines in, but now when I close it off, it's going to take those two lines and fire them into the void. They never existed because that zero, zero shape is now under effect. It's going to be able to absolutely nullify whatever I've typed in. So it's a way of doing a multi-line comment. So now when I look at note, and I look at this, you go, wow, it's amazing that that set of characters could create a verb that does that. But the way it does it is if I gave it two arguments, it's always going to take the left argument, which is the part that I want to execute, and if I only give it one argument, it's going to say take whatever you want, make it into a noun, multi-lines, and when you're done, you hit the right parentheses, and I'm not going to do anything with it. And that's note. I always found that pretty amazing, and it's a mind-bending, but it's the way that J works. It's entirely consistent with all the definitions, and that's why it works. But pretty amazing the stuff you can do with it.