of this workshop after the meeting is over. So Rudy is the editor of the Journal of Biological Physics. So we are going to have, I mean, you can write new articles, review articles, short one, long one. But we tell you about the deadline. Rudy will communicate with each of you about the proceeding. OK, so let's start. The first talk of the day is Arne. He is going to talk about Arne versus ideal randomly branch polymers. And you change the title. And Rupert Shuffle. I change the title, I don't know. OK, so let's start. Good morning. I thank all three organizers for this invitation. And being here, I think I'm the oldest in the audience. So I said I'm the oldest. I know. It's not really directly about viruses. It's a little piece of theory that I will tell you that we were doing for about 10 years. And starting with the thesis on your first UCLA. And it was done with my good friend Bill Gelbot, who is sitting here. Actually, we started working on viruses around the year 2000, first on the theory of phage ejection. And in fact, I wanted to talk about phages and loading. Because I like the stories about entropy and energy, which I like very much. But I saw Rudy in Israel a few months ago. I said, no, that's too complicated. Talk about RNA. So we'll see. The work was done with students of Bill Gelbot. Because I quit taking students about 10 years ago. But I get the manpower from UCLA. They visited me in Jerusalem. In reverse chronological order, Walter Sohenda Shingaram, who is now with Mike Hagen, a J who is a company in Los Angeles, who did beautiful work, especially cryo-electron microscopy, Lee Tai, who is somewhere in San Francisco, who visited me and we did some theory after he did experiments with Bill. And the first was Aaron Yoffe, as I told you. And the plan of the talk, I will try to finish on time. I will first compare viral RNA to random sequence RNA. This was one of the first exercises we checked years ago. Then I will mention, in one or two slides, the work of Luca Tubiana, who will talk later in more detail, which is relevant. And then I will go from viral versus synonymously mutated RNAs, a few words. And then I will try to see whether random sequence RNA, which set an upper limit on viral RNA, upper limit in the sense of the radius of gyration, as you will see, I will check with you whether it is similar or different from randomly branched polymers. The key words you can see here, MLD, maximum level distance, RG, Cramers, a theory of calculating RGs. I'll talk about three graphs, vertex degree distribution. And I'll tell you about the profile shuffle. I guess most of you don't know what it is, but it's a nice trick that we have recently used. It's in Hebrew. It goes right to left here. So we started long ago when we learned, I learned, that there is correlation between the size of the RNA and the size of the capsule. I think is a very nice example where the virus divides its genome into three pieces, all about 3,000 nucleotides, all packaged in identical T equals 3 cup seeds. Then what you see here at the bottom is a cup seed. That's now yesterday in Christian poster. You could see much more advanced cryo-EM pictures. But what you see here is a RNA packaged inside, what is it? BMW or CCMV cup seed? You see the RNA outside. And you see that in order to put it into the cup seed, you don't have to squeeze it very much. You have to, but not very much, not like DNA in phages. A more recent example also from the lab at UCLA, at least three of the people who did the experiments are sitting here or should be sitting here. And here you take RNA of different lengths. And you see that if you take 3,000 nucleotides, it forms the expected T equals 3. It takes 6,000. And they form a dimer, take 9,000, a dimer. Take 12,000 and they form a tetrahedron of identical cup seeds. That's just to ensure that there is a correlation, of course, between cup seed size and RNA length. And people here did theories about the relation between the size of the RNA, the curvature, the spontaneous curvature of the proteins, et cetera. So to characterize the size of RNA, first we start with a secondary structure. Here is a simple example that you see. And we adopted from Bunchu and Noir paper, 2002, what they call the ladder distance. The ladder distance is you take two base pairs and you count how many ranks, how many base pairs you have between them. And in particular, we looked at the maximum ladder distance that's the largest herping to herping distance. But that's a measure of the size of the RNA. Here you have an example. This is a viral. I should use this one, I guess. This is a viral RNA. And you see that it's MLD, about 200. That's how many base pairs you have from this point to this point, the longest. It's comparable to what you have between here and here, here and there. But if you go to a non-viral RNA, in this case, it is a random sequence. You take the same base composition of this RNA. You shuffle it randomly. You go to one of these softwares, RNA fold or M fold. You calculate the secondary structure and you see that it's a big increase in the size, suggesting that indeed viral RNAs are more compact than non-viral RNAs. It holds also for biological non-viral like yeast, et cetera, RNA. Now, this is from the thesis of Aaron and paper we published together. These are different viruses that are MLD as a function of sequence length. And what you have here is you take the sequence. You randomly shuffle it and you get a very nice straight line with a slope of 2-thirds. The MLD scales like n to the 2-thirds n being the number of nucleotides. These guys here sit on the random sequence line, but they are not icosahedral. So why are they here? Here I come to the work done by people sitting here in the audience. What they did is a very elegant idea, we think, takes a secondary structure, say, this is an example that I made before this talk. You have a duplex. Now, suppose you do a synonymous mutation. You replace some of the nucleotides by others, but without changing, you see the serine and arginine, still serine and arginine. But instead of base pairs, you spoil the structure. It's becoming unstable and the structure opens. The genome is still the same, but the structure is different. Seems bigger here. But it can go the other way around, too. And this is what they did a few years ago. These are the viruses, the MLDs. You synonymously mutated them, and they go on the line of the randomly branched RNA slope 2-thirds again. And you will hear more about them soon. As a measure of the size, we want to go for the secondary structure, which if you want is 2D size to the 3D size. And what we did, we asserted, we assumed, we conjectured. We took the MLD. We could take this one, we could take this one, we could take anything. By the way, the scale is the same. If you take the average helping to help in distance, it will also scale like 2-thirds. And we said that to get the 3D, the radius of generation, all we need to do is take the square root assuming ideal polymer behavior, namely, ignoring extrude volume interactions. Years later, is Shura here? No, he's here. Shura, that's from your book. You recognize. But years later, I saw that you have this argument to prove the scaling 1-fourth. I'll show you if we have time. Anyway, what they did here, they also said, not they also said, we also said, but we didn't know that they also said. Anyway, you take the helping to helping, you calculate the distance here. It's a tricky method. You do a random walk around, doesn't matter. And then you take the square root and you get the end to the 1-fourth, which is the scaling of a randomly branched polymer. OK, that's also a recent paper from these people. Some of them we heard about the work yesterday morning. And what they did, they measured the radius of generation by fluorescence correlation spectroscopy. And Walter calculated for them RG from the same idea that we did. There are two methods, one of them is to take the square root of the secondary structure and the other one is a method that I'll show you soon. And you see good correlation between the experiment or reasonable correlation between experiment and the calculation. What do I have here? Now the question is, what is the origin of the difference between random sequence or random sequence RNA and viral RNA? Is it due to different fraction of base pairing? Is it due to different duplex lenses? Is it due to different order of the loops? By order, we mean how many like here? You see many duplexes emanate from the loop. So this is a high order loop. Herpins are 1, Balges are 2, et cetera. And this one I don't know which is degree 5. So we wanted to check this. And Aaron already did this calculation. I'll tell you shortly. None of these parameters is very different between random sequence and viral RNA. They have about 65% of base pairing. Duplex lens is somewhere between 4 and 5. And even the energy, the energies are also very similar. So we concluded that most likely it is something that has to do with the branching pattern of the molecule. What do we mean by the branching pattern? To analyze the branching pattern, we made a simplification. We take the secondary structure. We map it to a tree graph. It's very good, very coarse grained. But you'll see it works nicely. So we assume that all these loops are flexible joints. And all the duplexes are stems. Very simple mapping. Just we want to understand the qualitative behavior. So there are some simple relationships. So by the way, the average degree is always 2. Well, it's 2 minus 2 over L. L being the total number of loops. It's about 2. LD, I will use it, is the number of vertices of degree D. Here you have 1, 3, degree 3, degree 2, degree 1. Let's see what we get. These two guys have different degree distribution. And obviously, it doesn't take much. It takes a different conformation, assume freely jointed chain behavior. And obviously, this one has an RG, which is smaller than this one. That's OK. Look at these two guys. They also appear to have very different RGs. However, if you look at their degree distributions, they are exactly the same. I made them to be the same. You have eight hairpins, no second order vertices. You have four, one, two, three, four of order three, and one of order four. Yet the RG is obviously different. If you don't remember what RG here, it is reminded here. Here is another example. Three graphs on the left and right have the same vertex degree distribution, but very different RGs. So the difference between viral and non-viral three graphs is not simply the vertex order distribution. What can it be? Here is a three graph corresponding to the secondary structure. And we take the square root. Remember the MLD, take the MLD first. It was scaling two thirds, assuming ideal behavior. You get that it is scaled like one third. One third is like a collapsed polymer, but remember, we ignore extreme volume in this case. But the scaling of RG that we get for the random RNAs is n to the one third, not n to the one fourth like randomly branched polymer. That's another elegant way to calculate RG for a freely jointed chain. Here is our RNA. We map it to a three graph. And this is called the Kramer's formula. What you have to do is very simple and elegant. You take your polymer. You cut it everywhere. You count how many you have on one side, how many on the other. You multiply one by the other. You do all divisions. You average. You divide by the total number of square. And that gives you the root mean square RG. We call it the Kramer. We used it to calculate RGs. And what you see here, again, now the RGs. And frankly, I forget whether it was, I think, one of the, no, I forget. This is a function of loops. The number of loops scales linearly with chain lengths. May sound strange, but it can be proved. You see that that's the random ones? And the scaling is one-third, both here and here. These are the viruses. So we wanted to understand the one-third. By the way, I didn't tell you, but we get exactly the same scaling by a very simple model. What time is it? Because I want to get to the more important stuff. In which case, I may skip this one. I don't understand you. Oh, that's wonderful. I never have enough time in my talks. Anyway, we suggested a very simple, we wanted to understand what we played with all kinds of models. One model, which we called SFM, it was first a simple folding model, but then it's not nice to publish a paper with simple, so we call it sequential folding model. It is indeed sequential. If you want, you can even call it fractal, if you want. Take the RNA. And what we suggested, take the longest duplex you can form. There can be more duplexes of the same length. You pick one randomly. So you form a duplex. Now you have two loops, and you keep repeating it here, here, here, until you get the final structure. You stop when the loops get too small to form a duplex. So using this very simple model, we generated structures. By the way, they look, you must admit, they look not very different. So this comes from M-fold, or RNA-fold, and this comes from the same sequence, SFM, we did many of them. And even the scaling is similar. It's not exactly one, so both of them, but very closely, within error bars. And I can also tell you that this simple sequential model gives correctly, you can, in an approximation on the simple model, when you always divide into loops of the same size, you can analytically calculate the average duplex length, the average base pairing fraction, and so on. And it is like random RNAs that you do with RNA-fold, and NM-fold. However, so the scaling is also the same. What unfortunately is not provided by the SFM is a one-third scaling. We get it numerically. When Littai took the sequence and started folding it, using RNA-fold, calculating RG, we got the one-third. But from the analytical approximate formula, we couldn't get it. It's something different. The mathematician in Jerusalem, he likes it, he's an expert on combinatorics and graph theory, and he's now very much interested in trying to help the game. So the next question we ask, is it a randomly branched polymer? Sure, that's a elaboration on your model. Not in your book. I mean, not in this form in your book. I do it for laymen. It's a very nice idea. It's not mine. So I'll tell you, you take the randomly branched polymer, a K-Littery in this case. You pick a point. We want to calculate, first of all, the contour distance. If we calculate the contour distance, then we take the square root and we get RG. So to calculate the contour distance here, what they suggested is take a random point here and start moving either away from the point. This is in red, or coming back into the point in blue. And altogether, you have two n steps if you have n bonds. And that's like a random walk of length to n. The distance, you diffuse two n steps. You go square root. So you get the square root for this length. So this length is square root of two n of n. And then to get RG, you take another square root and you get the one-fourth. Very easy way to get the one-fourth at Stock, Meyer, and Zimm did. I struggled with it. And there are papers by Degener and many others. But I think I found a problem here. It's so elegant, let's not look for problems. OK, you didn't give me anything. What? When you do scaling, I don't know. Ask Sure, I don't know. He's a polymer expert. Look, now we wanted to understand the difference. We wanted to know what's going on with a degree distribution. Oh, I have 10 more, no? It's plenty. The idea first came from a J who visited me in Jerusalem. And he discovered something called the proofer method. I bet most of you don't know about the proofer method. The proofer method is a mapping of a tree graph to a sequence and vice versa. You can go both ways. Take a tree graph here. And what you do, you label the vertices. And you start plucking leaves here. You see the leaves are green. And you start plucking one after the other. So you start with the one with the smallest label, smallest number, this one number seven. You see, here you can randomly label them. But here what we did is we took the smallest inside. And the leaves are all the larger number. In this case, we have 12 vertices. So you pluck number seven. Here you pluck number seven. You are left with this one. And when you pluck seven, you get three. So you put three. Now the smallest is three. You pluck three. And what you get is five. And then you continue. And you get the sequence. OK? Very good. You can go backwards. You can have the sequence and go backwards. But what is interesting about, oh, you see here, in the sequence, none of the leaves appear. Because remember, you pluck them one after the other. And what is left? You are left only with skeletal vertices. All of them appear here. And moreover, a skeletal, say, a vertex like this one, number four, which has a functionality of four, will appear three times, four, three times. It's every vertex of degree D will appear D minus one time, because it takes D minus leaves to be plucked until you get to it. So you see in the series, the series reflects the degree distribution. Like this four, which appears four times, is of degree four. Vertex number one appears twice. It's of degree three, where is number one? Here you see, one, two, three, et cetera. Altogether, there are n minus two elements in the profile sequence of n, n minus two. Because you are left with the last two, you don't need to do any more. Now, remember, this is a reflection of the degree distribution. Suppose you permute the sequence, shuffle it. It's the same degree distribution.  You shuffle the sequence, you get another sequence. You go back to the graph, and it's different. So you take the original one, you map it, you shuffle it, you get another one with the same degree distribution. And then it's like cutting and sticking differently. So we did that. Let's not bother with this one, and that's how to go back from the sequence to the graph. We did it. Walter did it. And using the sequence, we also wrote a paper devoted to our friend Bill Gelbart in his first script, where we show also that from the sequence, you don't have to generate trees or anything. You generate sequences, which is much easier, right? You do it not for me, but for Walter. It's easy. And when you have the sequences, you can calculate herping to a leaf-to-leaf distance. You can calculate graph diameter, which is the maximum distance between leaves, et cetera. You can calculate the analog of LDs. You can calculate everything. And then when you have all these distances, you can use kramers, for example. Or you have MLDs. You take the square root, whatever you want to do. And you do the scaling. And look, you do the shuffling. And you calculate Rg. We did it by several different methods, Rgd. All of them, you do the shuffle, the proof of shuffle. But you calculate Rg by different methods. Graph diameter, there is a program in Mathematica, a built-in program. You can do, that's equivalent to the graph diameter that we got from the sequences. You can go the average leaf-to-leaf distance also from the sequences.  The square root is about 20. So your three graphs are huge. It is slow because it's not optimized, but you can go to huge entities. And you see that no matter what you do, once you shuffle, in this case, you shuffle for what is it. That's RNA, like the composition. You take RNAs. You start, they have 26, 75, 14. That's the ratio of the degree of the vertices in a random RNA. Or maybe a viral RNA, it doesn't matter. And this one is another case where a randomly branched polymer, you start with equal numbers of hair pins, second order and third order. In both cases, no matter what kind, we have more examples. They all scale like n to the one fourth. In other words, they all become randomly branched polymer after you do the sequence. Yes. What? Rg? It is here. It is here. It is here. Is that in the square? Yes, it's hidden under this. Trust me. I looked for it yesterday, too. No, no, you're in good company. I think so. Anyway, so let me, let me, I'm almost done. No, I'm almost done to the 35 minutes. But listen, I'm done. But no, I can talk more. But I think it's a good point to summarize. So what I showed you, we took viral RNAs. They were compact. We randomized the sequence. They became bigger. They became bigger and they scale like n to the one third. We want to understand why it is n to the one third. Maybe it's not relevant for viruses. But it's a puzzle we want to understand. And so far, we don't. Maybe my mathematician friend, maybe smarter people, can understand it. But it has to do with the folding of the RNA. It's not a simple randomly branched polymer. It's something in the sequence. Yes, Robin? No? Yes, in the last. After I shuffle, because Roya is getting an important call from somewhere here. No, it's not, it's just that. I, it's a time. Robin, can we wait a second? You will be the first to comment. Throw it away. So I get 20 seconds more. Look, I remind you. The viral RNAs have small MLDs. You shuffle the nucleotide sequence. You get what we call random sequence or random RNA. They scale as n one third. Now we do the same if you do a synonymous mutation on the viral, but that's not what we did. Now you take the random sequence RNA. You first shuffle it. You keep the vertex degree distribution. And they become n two, one, four. They behave like a randomly branched polymer. In other words, the random sequence RNA are subset of the ensemble of randomly branched polymer of the same vertex degree distribution. Why? I don't know. So the conclusion is simple. RNA is not, well, I told you there were more conclusions along the way, but the final one is that RNA is not a randomly branched polymer. It's different. And why for random sequence RNA, RG is scaled like n to the one third and not. Otherwise, I don't know. It's a challenge. And I thank you for your attention.


Obrigado muito. Eu acho que este é o auditorium de fãs que eu nunca falava. Eu espero que esteja em cima. Então, tipo protocolo, tipo hints, como o Guido entende. O título do talk é uma referência a este t-shirt, que eu espero que eu tenha, mas eu não. Programando o way Guido indentou. Então, é meu livro. Quase tudo que vou mostrar para vocês hoje, veio de um monte de pesquisa que eu fiz enquanto escrevi o livro. A segunda edição tem mais de 100 pages sobre tipo hints e outras coisas. Então, vamos falar de quatro coisas. O que é um tipo? Os quatro modes de tipo. Algunas exemplos de tipo protocolo e a conclusão. Então, o que é um tipo? Então, este é um quotes direto da PEP 483, a teoria de tipo hints, que foi escrito por Guido Fernossum e Ivan Levinsky. Então, há muitas definições do conceito de tipo em literatura. Aqui, nós assumimos que o tipo é um sete de valores e um sete de funções que um pode aplicar a esses valores. Para mim, o meu primeiro entendimento de tipo foi muito muito fócuo sobre o sete de valores, porque você pensa sobre, ok, você tem o sete de números complexos e então você tem os números reales e então você tem os íntegros e etc. Mas isso é no mundo pura da matemática. No mundo real, há algumas pequenas questões, a realidade é complicada. A realidade é mais complicada do que a matéria. Então, tenho um íntegro e converto em uma flor. Parece tudo bem, excepto que um não é igual ao outro. Na verdade, no sete de valores, não há valores que representam exatamente esse número. E se você importar o módulo decimal, quando você cria um instante decimal, ele mostra você, então, uma representação de estrangeiro com prédio completo. E, como você pode ver, eles não são realmente o mesmo número, ainda que eles são bem próximos, né? Então, um pouco de módulo do lado, é interessante que o tipo de flor que tem sido, tem sido por um tempo, é basicamente embedido em todas as cpus modernas, né? Todas as operações básicas com flor estão embedidas em cpus, mas é um tipo que é mais útil para cientistas e engenheiros que para pessoas, por exemplo, que vivem dinheiro, né? Que é, eu acho, a maioria dos nós, ou muitos dos nós, eu não sei. Então, eu sempre pensei que isso era meio estranho que a maioria das línguas mainstream não tem uma maneira muito boa de representar dinheiro, e as pessoas tentam usar flor para isso, mas isso não é ótimo. Então, o décimo é uma alternativa em Python para fazer isso. Mas o sete de definição de valores não é útil para outras razões também, porque Python não dá práticas formas para especificar tipos como setes de valores, excepto por um ano. Em prática, no Stander Library, nós temos muito pequenos setes, como o sete de non-types, que tem apenas um, um estresse, um bul, que tem dois estresse, e ஆ que, no outro lado, temos extremamente grandes estresse um com milhões dos estresse. Os int e os string types, por exemplo, os valores possíveis são apenas limitados pela metade da **** na máquina. Então, e também, nós não temos maneira de dizer, Por exemplo, um tipo de quantidade que eu gostaria de usar, por exemplo, em uma aplicação de e-commerce para validar que os ordens não são colocados com zero de um item ou mais de 1.000, isso poderia ser uma medida de segurança, né? Normalmente, é raro que você ordem 1.000 ou mais de algo em um store de retail. Então você não pode dizer isso. Não há um jeito, em Python, de dizer isso em um tipo de sistema para expressar isso, né? Por exemplo, também não há um jeito de dizer que o clube do aeroporto é o sete de todas as 17.576 combinações de 3 letters de asquias de uppercase. Nenhum desses setes podem ser expressados em um tipo de sistemas. At least not in the type systems of mainstream languages and certainly not in the type system of Python. So in practice it's more useful to think that int is a subtype of float because it implements the same interface. Basically the interface of float has to do with arithmetic and all the operations also apply to integers, right? But ints also have a few other methods, like for instance those that do bitwise manipulation, shift right, shift left, things that wouldn't make sense in a float. So that's the main reason why we can think of int as a subset of, not a subset, a subtype of float because it implements all the types, all the entire interface of float and an additional few methods. I put a couple of asterisks here because just yesterday I discovered there are a few float methods that int does not implement, okay, but they're kind of bizarre. One of them is one that generates an hexadecimal representation of the float. But anyway, as a good approximation we can think of subtypes and in general that's true for subtypes, that they implement the entire interface of the supertype in addition to more methods, right? So for instance, here I continue that example by showing that the pipe operator, which is the bitwise OR, you can use it with an integer but you cannot use it with a float, right? Another example of how it's more useful to think about the interface is that in Python's static type system, we have now the any type. And basically, because any value can be assigned to an object variable and any value can be assigned to an any variable, you can say that they are like the universe types, right? But the super important difference between them is that the object type implements a narrow interface, right? Pretty much every sub... Most subclasses that we create from objects add methods, right? That don't exist in objects. And but any, on the other hand, is this magical type that is required because of the nature of the gradual type system that we have, which means that, you know, sometimes you may have a piece of code that is not annotated or you're using a library, a third party library that is not annotated, so you get a result from there and all that the type checker can infer is that the return is any, right? And any satisfies every interface. It's like this magical interface that contains all possible methods that exist today or that will ever exist, right? So this is a crucial difference between them. So in general, if you think of subtypes as sets, you get the biggest set is in the top, right? Object is the set of everything. And then you go down, down, down, down to more specific types, more specialized types that usually have fewer instances. But on the other hand, the interface grows, right? At the top of the class hierarchy, the interface is narrower.  So from that definition of PEP483, we are going to adopt that point of view that a set is a set of functions that one can apply to those values. A set is defined by the set of functions that you can apply to an object, right? And then here's another quote from Smalltalk. And I'm not talking about Smalltalk just because I have a gray beard. I'm talking about Smalltalk because it's really very, the type system of Smalltalk is very similar to the type system of Python. Just like the type system of Ruby and the type system of JavaScript. And in the Smalltalk community, they use this term protocol, right? So this quote is from one of the designers of Smalltalk. Every object in Smalltalk, even a lowly integer, has a set of messages, a protocol that defines the explicit communication to which that object can respond. In Smalltalk, there was no explicit way to declare a protocol. But some browsers that you use to code in Smalltalk did present clusters of methods as a protocol. And of course, a class could implement several protocols. So that was the way they used it more as metadata for the programmer than something that was checked, right? So the main takeaway from this first part is that types are defined by interfaces. And protocol is a synonym for interface. So that's where the name of the typing protocol class that we're going to talk about comes from. Now let's talk about duck typing. So last time I looked, Alex Martelli, who is my friend and also one of the reviewers of the first edition of my book, was credited by Wikipedia for being the first person who used in a written message that you can find online, this duck metaphor. I don't know if he invented it, but he was the first one who used it in a Python mailing list to respond to a question about polymorphism that had to do with type checking in Python many years ago when there was no static typing. So the idea is that you don't check whether something is a duck. You check whether it walks like a duck, etc., depending on exactly what subset of duck-like behavior you need, right? I started using Python in 1998, and at the time there were no ABCs in the standard library. So in the beginning I was a little bit mystified by the appearance of phrases like, oh, this function takes a file-like object. Okay, what is that? There was no definition anywhere, right? But it was a common practice to have these kinds of expressions. I think there are still phrases like that in the documentation. A buffer-like object is another thing that is super important for data science. Then there was some formalization of what that means, but the interesting thing is the precise meaning of a file-like object depended on the context, right? Sometimes all you needed was, I need something that has a read method that returns bytes, for instance. That's file-like enough for me in this moment. Does that make sense? In another situation, maybe you need something that has a close method and a write method, things like that, right? But it was always very informal, similar to how it was informal in small talk as well. So one definition that you can give if somebody asks you what's the difference between a protocol and an interface. If we are not talking about static typing, you can say that protocols traditionally were informal interfaces that were not defined explicitly in code, but where the code depended on one of those interfaces on a few methods to do something, right? So, for instance, I've taught Python to lots of people and most of my students over time came from statically typed languages like Java, mostly in C++, C sharp. E, so, I always like to show them this example of a very simple function double to illustrate duck typing, right? So I create this single function double and I can use it with an int, with a float, with a complex, with fractions, and those are all numbers, but I can also use it with sequences, right? So what is the idea here? What is the protocol that double expects x to fulfill? Double expects that the argument x is able to multiply itself by an integer. That's what is implicit in that code and this is why all of those objects support that, because under the covers, they implement a method called dundermoo, right? So dunder double underscore in front, behind, and some special name. Dundermoo is actually the method that any class that you write can implement to support the multiplication sign, this operator, right? Now here's another example, a more dramatic example. So I have this simple class that represents a train, okay? And its only attribute is a length that is established when it's constructed and so then we have the dunderlan method that returns the length and we have the dunderget item method and basically it checks whether the i is within the range, right? From 0 to length minus 1 and if it is, then it returns a string saying car number, such and such, right? Or, otherwise, it raises index error. So, for instance, if I have, if I build a train with three cars and I ask the length of the train, I get three. So this is duck typing, right? Notice this class inherits implicitly from objects. There's no other special class that I'm using here. So what makes something work with length in Python is, basically, for built trains, Python has a shortcut, okay? Built-in and extensions, like extensions written in C or Rust or other languages can implement in those lower level, using the Python CAPI, what is called a slot, that will respond to the length. E, even if you don't do that, there is also, you know, some, it's funny because the C code of Python is kind of object-oriented C, okay? Not C++, object-oriented C. There's this kind of nested structures in which the, everything that has a length, everything that has multiple items in it has a field that Python can inspect to know how many items there are, okay? So that's very fast because it doesn't involve any method call. But if that field doesn't exist, then Python will try and find whether there is a dunderlan implementation either in the low-level language or in Python if it's a Python object, right? So that's how LAN works. And it's an example of duck typing, right? You don't need to inherit from anything to implement, to support LAN, you just implement that method. The second example is what triggers the dunderget item method, right? And again, another example of duck typing. But the third example is really dramatic because the target of a for loop, in this case, the T, is supposed to implement an interface of iterable, right? And how do you implement the interface of iterable? Formal, you implement a dunderiter method that returns an iterator, which is another interface that implements a dundernext method. However, I didn't implement dunderiter here. Okay? Well, anyway, in a regular duck-type language, any class that would implement dunderiter would work for iteration. But Python goes even further than that because that's so fundamental, iteration is so fundamental to the language e also to support legacy code. It just so happens that the Python machinery, this is actually built in the iterability function. The iterability function looks to see if the object implements dunderiter, but if it doesn't, then there is a fallback and the fallback is, does it implement the dunderget item e then it tries to send a zero, it tries to call the dunderget item with a zero argument. And if that works, then it starts iterating by providing more indexes until the dunderget item returns index error, right? So this is kind of an extreme example of duck typing, right? Of the machinery of the language trying to use the object even when the object doesn't implement one particular interface, it falls back to another interface and there's what you expect, right? Okay, so now I'm going to show the first example of a protocol. And this I think is the best example of a protocol in the whole talk. It's the most similar to the kinds of protocols that you are likely to use in your job. So what I'm saying here is I have a function called run file and it takes one argument called source file, which is a text reader. And then immediately above, there's a definition, right? Of a class that inherits from protocol, right? And that definition is exactly like I wrote it here. The ellipsis in line 203 is part of the syntax, okay? The ellipsis is telling you that the body is omitted. Instead of pass, which explicitly says, this doesn't do anything, what this is saying is the body will be defined somewhere else. It doesn't matter what the body is. So in order to satisfy that protocol, an object, any object in the world can satisfy that protocol by implementing a read method that returns a string. That's it, okay? So and often you will see code like that where the interface is defined right above the place where it's used. This is common. We see that a lot in Go code. And why am I talking about Go code? Because Go is the first mainstream language that is statically typed but also supports this idea of declaring protocols. Notice that whatever class I use to pass, to produce a text reader doesn't need to inherit. In fact, they won't inherit from text reader. All they have to do is to implement the interface, okay? So the benefits of using typing protocol are that you can preserve the flexibility of duck typing. So you can let your clients know what is the minimum interface expected regardless of class hierarchies. You can support static analysis, right? Ideias e nintas can verify that an actual argument that appears in a call site for the run file function does satisfy the protocol, right? And you reduce coupling because the client classes don't need to subclass anything. Just implement the protocol. And this also makes testing easier, right? Because if you need to create some kind of mock to test, all you have to do is implement that one method. You don't need to inherit from anything, right? So let's talk about the four modes of typing. We all know there's this duality between static typing and dynamic typing. And this has to do with when the types are checked, right? Static typing is designed to support static checking, which is checking then by tools and compilers and so on. And runtime checking is... I mean, dynamic typing was invented to support runtime checking, right? The authors of the type hints, PEP, promise that Python will remain dynamically typed. But actually the situation is more interesting than this. The situation is that we have these two axes. Where besides static checking and runtime checking, we also have the issue of how the types are defined or identified. So in static typing of languages like Java, you have nominal types. Things belong to a type because it's explicitly declared. You inherit from something or you implement an interface, right? But with static typing, what we have is structural types, which means objects belong to a type because they implement a certain interface. But they don't need to explicitly declare anywhere that they do implement. They just have to actually implement it, right? So these are like the two opposites. But this diagram actually has other areas. This area, Alex Martelli, when he was reviewing the first edition of my book, he invented this term goose typing. I don't have time to talk about that. But basically that's the use of ABCs to do explicit type checks at runtime. And then Lukash Lange and others. Lukash is speaking right now at another room here. They proposed PEP 544, which implements structural typing or the idea of, I mean, structural subtyping or the idea of static duck typing, right? Duck typing, static duck typing. So, and that's supported by typing protocol. Okay? There are other languages that support things like quadrants. See, Go appears in the static duck typing quadrants. But also in the goose typing quadrant because it has mechanisms for type assertions at runtime and so on. Okay? So let's see some more examples. We were talking about the double function. How could we annotate that with a protocol? So can we do that? Yeah, okay. This has a serious problem. The problem is the type checker will complain that the object type doesn't implement the undermove. Does that make sense? So this code, without looking at anywhere else, the type checker knows that this code is invalid. Okay? Can I use any? Yes, but it's useless because it's the same thing as no annotation. Any annotation pretty much defeats type checking. You have to use it very carefully and like an emergency exit. I could do this and say that X is a sequence of T. And here I have to introduce this idea of the type var, right? Because sequences is a generic. I'm sorry, base class. So I'm saying this. If I get a sequence of floats, I'm going to return a sequence of floats. If I get a sequence of strings, I'm going to return a sequence of strings. This is what the type variable is doing. Right? When the type checker analyzes this, it gets a concrete example of a call site. It looks at the type of the elements in the sequence. E then it binds T to that type. And then it will infer that the return is a sequence of that same type. Okay? So this only works with sequences. It doesn't work with numbers. So the solution is to create a repeatable protocol. So the repeatable protocol is saying that is anything that implements the undermoo and that takes a repeat count, which is an integer. Okay? And now I can say that X is a repeatable and this returns a repeatable. Are we done yet? No. Because now when I call double, the result that I get is inferred to be something that only implements the undermoo. And if you need to do other kinds of operations with the object, you won't be able to. The type checker won't let you. Of course, at runtime everything happens, right? Because that's the characteristic of the gradual type system of Python. At runtime only the dynamic types exist. There's no constraint. But the type checker will point out that if you try to do something else with this result, no, this result only supports the undermoo because that's what it says. So, the way to solve this is a little bit more involved. You need to create another type var. So, the protocol is the same. Okay? The new thing here is this type var here. And here I'm saying that RT can be bound to any type, but it has to be limited by... I don't like the keyword argument bound. I think they should have used another word for this. Maybe limited, or upper bound, or something. But because there's this... the binding of the variable and the bounds, which is kind of a boundary, right? What this is saying is that RT can only accept something that is repeatable. But because of the way that this variable is declared, the actual type of it will be preserved as well. So, if I pass a float, the type checker will be able to infer... First, it will accept the float because the float implements the undermoo. And it will understand that this returns a float. Okay? So, that's one thing that we need to do in this case. So, when I discovered these things, I was doing research for the book and that was the time of Python 3.8 when typing protocol was introduced. There's this project called typesheds, which has the type annotations for the standard library and other projects. And I contributed several fixes by implementing protocols there. So, for instance, there was this bug that I found that there's a... The medium-low function in the statistics module actually works with strings, with a list of strings. Okay? And there's an example just like that in the documentation. So, but it wasn't... But at the time, we had a false positive, which was that if I pass... If I submitted this code to a type checker, I would complain. And why is that? Because the annotation at the time was saying that the arguments had to be uniterable of a number. And number was a type that they invented there, which was the union of int float and complex, int float and fraction, I think. Anyway, it didn't work with strings, the annotation, although the function did work with strings. So, the solution was to create this sortable protocol. And again, you see the same formula that we saw before. You have a protocol, and you have a type var, which is bound to that protocol. And then I can use that type var to say that medium-low accepts an interval of sortable t, which is the type var bound to sortable. And it returns a sortable t. Right? When I contributed that, I looked around and I found many other places in the Python 3.9 standard library where we could improve the annotations by using protocols. Okay? And then there was the biggest challenge for me at the time was the max function. The max function is super powerful, right? Like I said, I've taught Python many times. I never saw a student say that, oh, max is super complicated to understand. No. It's pretty simple. You can pass an iterable or a series of arguments. And then, if it's an iterable, then it will return the biggest item in the iterable. If it's a series of arguments, it will return the biggest of the arguments. Right? But then there's some optional arguments and so on. So it's very flexible, easy to use. I like this API. Okay? But then somebody posted a bug about that and I tried to fix it. The old type hints were like that. So overload is something that comes, this decorator comes from the typing module and its mission is to allow you to do... do multiple type annotations to different ways of invoking a single function. Right? So it was already pretty complicated. My time is running up, so I'm not gonna delve into the details here. But this wasn't working. This was producing that bug that this person reported. The bug was that if you passed five and top where top was none, it exploded. And the solution was this. It took me several hours, actually a couple days, and with support of people more experienced than I in the type system to get to this. My first attempt had eight overloads, then one of the maintainers of typesheds showed me how to simplify and reduce it to only six. Okay? In order to do that, because Max is written in C, I wrote it in Python to test and so on. And what caught my attention was that my implementation was shorter than the declarations to satisfy the type checker. Okay? So there was a lot of stuff that happened after that. If you go look at the code, it's not like that anymore. I won't go into these details here, but it's just for you to know that with time, supports less than became supports greater than and then they invented another name and then they created. Now what they are using is supports rich comparison, which is a union type of supports ThunderLT and supports ThunderGT, which means that in most of those functions that appear in this list here that have to do with ordering stuff, what they do is they accept, the current annotations accept something that supports either less than or greater than either way it will work. Okay? There are some protocols in the standard library. Most of them have to do with numbers because unfortunately the numeric tower, remember the numeric tower, it's completely broken for use with typing. And why? Because the base class of the numeric tower, which is called number, has no methods, which means that objects of that class are useless. You can't do anything with them. So, but anyway, so they invented those protocols that have to do with whether something supports a conversion, right? And one of them, for instance, I use in one example in the book, which is supports index. Supports index is a particular protocol that means that the object implements the under index, which as opposed to the under int, which floats also support to convert to int, the under index is supposed to be implemented only by integral types. So, for instance, if you use numpy, all the integral types of numpy supports implement the under index method. So they can be used as indexes. OK. So, to summarize, I recommend that you use typing protocol to build pytonic APIs. In fact, you can see that the standard library is very pytonic, although there are parts of it that I don't consider very pytonic, but most of it is very pytonic. And the standard library really cannot be annotated without the use of typing protocols, right? So, you should use typing protocol because then you can support duck typing with type hints, and duck typing is the essence of Python's data model and standard library. This allows you to follow the Integrate Segregation principle, the I in the solid principles, which means that client code should not be forced to depend on methods that it does not use. You know, I remember when I used the code in Java, sometimes you had to implement methods to satisfy the compiler, right? And this is a recommendation that I learned from studying Go, okay? Narrow protocols are the best, okay? Most protocols that come in the Go standard library have only one method, and that's how your protocol should do as well. That's why trying to think of an interface in terms of an ABC or a Java interface with many methods is not a good way of getting started with designing a protocol, okay? Closing words, I have to say these things and every time that I talk about Python typing, okay? Being optional is not a bug or a limitation of Python type hints. It's the feature that gives us the power to cope with the inherent complexities, annoyances, and limitations of static types. So please do not decide in your team that everything has to have type hints always, okay? That's the only way to use a type checking is in the strictest possible mode. This is really bad. It's like deciding that every code has to be a 100% test covered. No, 95% is good enough a lot of times, okay? So that was my talk. Thank you so much. I don't know if we have time for questions. Maybe one question. Yes. Thank you very much. We have time for one question. Just remember to go to the microphone so that everybody can hear it. Yes, please. Obrigado. Thank you for your talk, Lucian. Asking as a beginner in typing. I could not follow why when we define the repeatable protocol. Why do we say that more will return something that's also repeatable? Why don't I say that I'm just returning anything? Let me see. So the repeatable protocol this? Yeah, yeah, exactly. So what's the specific question? Why am I saying that the under mode will return t?  Yes, it's something that you decide. But this is how this is how I see the because the idea of this double function is that it repeats something. If it's a number that means multiplying by two but if it's a sequence it's repeating it. And that's actually why I called it repeatable and repeat count. In both of those cases the output type will be the same as the input type. Does that make sense? Yeah. Actually this is the right solution, right? Sorry. That one has the problem and this one is the one that is correct because it uses the bound type var. Okay? Okay. So you can catch up with Luciano Well, during coffee break or during lunch. Thank you very much for the presentation and let's give him round of applause.


This video is going to be in my workflow when I actually have to accomplish something on my computer Because believe it or not, I do have to get stuff done So those of you who've seen my videos before know This is parabola, which is basically arch and I run i3 or specifically i3 gaps So you'll notice the gaps if I have a couple windows So first off I use a tiling window manager because I I cannot understand why you would ever use anything Else if you like that kind of stuff, that's fine. But like all the time when I was a kid I always wanted my windows to tile. I didn't even know what tiling was But having a tiling windows manager just makes so much sense to me So this is what I use actually for everything, but it's really nice when I'm actually getting stuff done So let me show you how I do it. This is ranger the file manager I have a bunch of shortcuts to all my key folders I'm gonna go to the folder where I keep my qualifying paper It's just two key presses away So I actually started rewriting my qualifying paper earlier this week from the beginning I only have about five pages written right now But let me open up the source file and Vim. This of course is LaTeX Now I have the Vim LaTeX live preview or is it Vim live? I was getting confused, but as you can see on the right So this automatically updates when I make changes to the source file And this is basically where I do the actual writing of the document and all that stuff So if you've seen my other videos on Vim I have all like all the syntax that you have to write for LaTeX or really any other language I just sort of keep them stored in different keyboard shortcuts So I don't actually so for example if you see all this stuff here Looks like a whole bunch of you know crap to write I didn't write any of this all of this was just keyboard shortcuts I just type the keyboard shortcuts and they do exactly what I want So I mean I can basically get to the point where I forget how to even write LaTeX because it's all automated But anyway, it's updated automatically over here. I'm very convenient Other general notes so I can easily shift the gaps The you know my i3 gaps if I press control shift or excuse me Super shift D gets rid of all the gaps if I need some more room Or I can just increase or decrease them with other keyboard shortcuts You know so I can sort of get the feel I want I do like having gaps pretty much at all times Unless I'm like on my laptop screen only so right now. Let me do my Neofetch I am on a ThinkPad X200 but I'm hooked up to a screen so I have a much bigger screen than usual and when I'm at home I actually usually have my ThinkPad in a dock and All on that I'll have like I might have like a music player and then on the screen. I'll be doing actual work Or something like that I mean I might have some other kind of decoration on the the actual computer screen and you know But I do all my actual work on the screen So anyway, that's usually how my screen one looks I'll have other tools open on other windows. So for example one of the tools I'm using is What folder is it in the phenology folder? So one of the things I've been using for my qualifying papers this tool called OT help So I might as well explain it just because why not so my qualifying paper is basically on Word order differences in languages like you know where you put your subject subjects objects of verbs and I'm Arguing effectively that differences and where languages put subjects and objects is a function of their different prosodic constraints So I'm using OT help. This is a tool. It stands for optimality theory help. It's a tool for doing optimality theory, which is a tool Basically for doing sort of constraint based neural net like analysis of traditionally phenology, but of course I'm using it more for syntax I can actually think well, I'm Why are you even looking for? Oh, yeah So anyway, how this program works Let me go ahead and pull it up over here, too I have a CSV file and this CSV file lists out different word orders and it lists out different prosodic constraints and then for each pair it tells you for example SVO violates the contour constraint contour is like you don't want to have a subject and an object in the same phonological phrase And they're both in the same brackets here So basically I I make a little tablet or tablet tableau. It's not really a tableau It's really just the CSV file here And I feed it as a program and what the program does is sort of Decides of the constraints you feed it. What kind of languages are possible? And it gives you this nice little interface where you can compare Okay, is it possible to have the language with transitive sentences like this and in transitive sentences like that if it's no it turns red but it's a very helpful tool that I've been using and I've I sort of had a breakthrough last week and I'm getting answers that I really want so that's been pretty helpful That's why I started rewriting this thing because I Sort of have a new analysis But anyway relevant to my workflow, I will for now I do have this open on usually a workspace I'll have another one for sort of references So if you've seen my other videos on LaTeX I keep one file where I have all of my all the things I've ever cited in LaTeX And this is what all of my LaTeX documents refer to when they're looking for citations So I don't really have to worry about you know keeping different files for it. So The first part of this file is out actually alphabetical, you know, these are all entries for different References or whatever and it's the syntax that Bib LaTeX will call The first part is alphabetical. That's because the alphabetical ones I used in my What is it my thesis But afterwards I just started adding stuff in whatever order I read it in which is actually nice I thought about doing the whole thing alphabetical just you know for autism's sake but it's actually better like this because If I forget, you know, let's say I'm looking for something and I forget who wrote it or Even what it was called if I look in you know, if I remember when I read it I can sort of figure it out Where it is and find it here. I also will sometimes keep like quotes If there is some particularly important quote in it, I would just sort of mark it as You know some other non so something else that Bib LaTeX won't read So that's another thing and of course, you'll notice that all of them are named By you know the last name of the first author and the year it was written in the last two digits of the year And those are the tags. I have to remember when I'm actually writing my document That's what I call them as and of course LaTeX, you know, puts them in the references and everything all automatically So that's usually how I call my references But also recently I now have an articles folder and I don't have all the articles on the left in here But in here I keep as I download them I'll keep all articles in this folder and of course, they're sorted by you know last name and a year as well Which is very obviously last two digits. So Anyway, so this is another thing that's pretty convenient And so I do this for a couple reasons one, you'll notice I don't have internet here And that's just because I don't have internet at my actual house. That's the life I chose for myself I haven't had internet here for two years Which actually helps me in a lot of ways but you know if I So I just download all the articles and I keep them here And it's also just much more efficient to have them on your computer because otherwise I'd have to go on the My university's library whose website and you know You know search for and put in my password and search for these articles that are behind paywalls or whatever So it's much better just having them there. So I usually have a window open for that kind of stuff as well So anyway, it's a more like aesthetic stuff if I want to go super simple You know if I don't need it if I needed just write pros I'll usually not have The preview open and I'll have this thing full screen and I also use Goyo sometimes which is a I forget who wrote it, but it's a plug-in for them. I have a map to F10 So if I press that Goyo is supposed to be Sort of gives you a more intuitive more distraction free writing environment. So that's what this is about And I'll write like the pros in this environment where I don't necessarily have to look at a preview or you know Anything else I can just sort of write it from memory So that's where I get all my hardcore work done and again I might do these in like the TTY without a graphical environment if I really want to so I also do Depending on what I'm doing. I'll do some work in splits. So I might have you know split open You know if I need to modify, you know move from Move something from one paragraph to another. It's very efficient to just have splits So I do that as well But in general I'm general. I guess this is pretty much it This I'm not gonna go too much into what I'm actually doing right now But this gives you should give you an idea of the kind of setup I'm using So yeah, I guess thanks for watching if you have any questions about the setup or just in general feel free to ask So thanks for watching. See you next


Mark Schwab, the host of Think Tech Hawaii's Law across the Sea program. Today, my guest is Paul Brennan. And our program is about the history of hope. Paul has traveled across the sea from Ohio to India and New Guinea, finally settling in Hawaii with his wife, Dottie, about 40 years ago. Paul is a student of history. He's the president of the Kailua Historical Society, and the lead author of the award-winning book titled Kailua. He's a retired pastor and a master woodcrafter. Paul and Dottie live in Manawili, where they have taken in 20 foster children over the years. In these times of stress and strain, many people feel hopeless and they worry about the future. I've heard it from lots of folks. Paul has told me that the history of hope in Hawaii provides contemporary value for us. I've asked Paul to share this history of hope with us. Paul, welcome. It's good to see you. Thank you. My pleasure. Now, please, what is your definition of hope? What are your concerns about the current COVID-19 pandemic, the economic problems we're having, political problems in Hawaii, and is there hope? Please tell us. What is the history of hope and what are your feelings? Please. The concept of hope is more foreign to me. I've been aware of my need to rely on it again and again. My wife and I just celebrated 60 years of marriage. If I took the definition of hope to be a wish, well, then those wedding bows would not have meant very much. Hope is much more than a wish. Since I have been in Hawaii, living in Manawili, and being able to interview many people myself about Hailewa's history, I have learned so much about the true meaning of hope. To me, it's a feeling of trust. It's a confidence that there is a reason to believe that good expectations can take place. I have thought about the environment of Manawili. Manawili has good soil. Manawili has ample rainfall. Manawili has a good combination of light and dark. For me, hope is like a garden where different energies converge to create new life. It's that confidence in positive outcomes, all the while realizing that there will be challenges that will be coming along. So, hope has a very noble kind of respect for me. It's very personal and it also relates a great deal to my vocation. When I moved to this place, I had no job, but I came here on a hope and a prayer and I believed that that was rewarded. I would do it all over again. I have just been so fortunate in being able to find not only work and to be compensated for my work, but especially to be rewarded by being in contact with people of hope. I would be happy to share with you what some of that has been. I want to hear what your relationships have given you and how that provides hope under these strange circumstances and for the future. Although I never had the privilege of interviewing her, I feel like I know her on a personal basis. And that is this person who was born a century before me, 1838. We call her Queen Liliro Calani. And I have spent many hours in an area where I know she visited and she had some very significant experiences there. At the Queen's retreat, as we call it, there is a carriageway and there is a bath and there is the home of the Boyd family still standing. And often I have gone there as I have thought about how in the 1870s she began coming to this area. It was a retreat for her and she obviously loved to come there. And sometimes it was incorporated into round the island tours. In 1881, for example, we know that she came and she had this unfortunate experience of an accident where she tumbled out of the carriage and she said she thought she was going to die. And there were four men who put her on a stretcher and they carried her on the old government road over to Waimanalo and Mr. Cummins, who was the manager of the Waimanalo sugar company, fired up their steamer and they took this injured person at that time, the princess, and they took her around to Honolulu Harbor where she was able to find six weeks of very intensive rest in Washington Place and she was able to be given all of the healing processes. Fortunately, she broke no bones. Fortunately, it was mostly just bruises to her body. But I have thought about that in the context of her life and how for many of those experiences she had to retreat. She had to find hope. She had to be renewed. And likewise for me, I have gone to that same place because I have felt the manao of that area, the mana, which was so strong. And I have just been the recipient of so much renewal of hopefulness. This business of being able to find your balance, of being able to find creativity has been with me all of my life. And so Queen Liliu Polani in her many visits to Manabili have encouraged me to walk back to some of those same places and to try to feel the same renewal of energy. I think for example of her best known music, that popular love song which she was inspired to write there. It's all about renewal. It's all about the convergence of the expectations that we think we human beings can find. And so I have benefited from that, even though I never saw her in person, even though she was a century before me. But one of the things that I have taken from that area, thanks to the permission from the owners of the property, I took the tree that was planted at the end of the carriageway because the Weinberg Foundation had no desire to use it. And I milled it and I have made benches and other furniture from some of that wood, which to me seems penetrated with the hopefulness of that area. And once the termite holes have been able to be fixed and once we are able to expose the beautiful grain, then you can see the strength and the vitality that that area has to provide. So the spirit of our Queen continues is what I hear you saying and it lives on and it gives you personally an ability to revitalize. That's what I hear you say. That's exactly what I'm saying. And then subsequent to that awareness, I have been in contact with people who lived also in this area before us. One of them was Joseph Kanyalpil. And the Kanyalpil family have been very prominent in Manawili. They had a Kuliana and we began seeing their name appearing on some of the old maps just after the great Mithaili. John Kanyalpil and his son Joe Kanyalpil, one of 16 children became a very good friend of mine and I was fortunate to be able to be in his presence and learn about the journey of that family. They had four different residential areas and they were constantly being moved around from one to another. But there was always this hopefulness, this confidence that there would be enough, all the needs of their family could be met. And so Joe became one of my very good friends. Joe told me about what it was like to grow up in Manawili. There was a steel, I guess, behind their house and the Okoli how was being made. But Joe focused on his horse. He focused on his schooling. He focused on his family. He focused on what was happening and he was among many who had to adjust to the fact that Kailua was no longer going to be centered in Manawili. But about 1930, the great shift took place from Manawili, an agricultural sedentary kind of existential life shifted to what we know today as the Cosmopolitan center of Kailua. And so three miles down the road Joe had to get on his horse and continue his schooling in a very different place. And he had to find new friends. But always there was the confidence things are going to work out. It would be positive outcomes.  And now we have a question from a viewer. How can we learn from our past to find hope journeys, troubling times? Well, I think we can learn from their past by understanding what their past consisted of. They had skills. There was no question about that. Joe and the other Kaniyapios were not coming in like immigrants. But Joe had many skills. He did his work working for the city and the county. But he also, first of all, had many friends and community around him. And even when the war broke out, where did Joe go when he was in Queen's hospital? He was a relatively young man at that time. He came home from the hospital to find that the military had taken over their home. And so the place that he went was to Kauhau, Lanikai, where he had friends. And they helped each other in that newly formed relationship. That community was sufficient for him all the while that the war was going on. So I hear spirit, focus on your strengths and friendships are kind of important things about hope and maintaining hope and think about those things. Is that right? Do I have it right? Exactly right. And I have found that to be so true in my own life. And we have about 10 minutes left. Do you have any other experiences with people you've spoken with and that you can share with us, similar to those you've already done? Sure. Well, one of the immigrants who came here was not born in Hawaii. His name is Reverend Chimpei Goto. And Reverend Goto was the first pastor of what today we call the Kailua United Methodist Church. Reverend Goto was pastoring to basically a Japanese language speaking and a Japanese community of immigrants in Kailua. And the little white church as it was called was where Salvation Army is located today. On the day of the bombing, Reverend Goto was taken from the pulpit, incarcerated on Sand Island, and held there in Communicado until Christmas Day. And then the military believed that he was sufficiently trustworthy and they allowed him to go home and to find his own way to Kanioi where Ben Parker School and his family were. He walked in and his children have told me about that Christmas being unlike any that they had ever had before. He was still wearing the same suit that he was wearing on the 7th of December 1941 when the military took him. He turned out to be a very loyal friend to the government. He was calm in his own personal demeanor. He had these many contacts. He could share his sense of confidence that all would work out. And when the war finally was over, he was honored for the work that he had done in liaising with his people. That's just another example. And that one adds to what you've already said. I mean, don't let circumstances control you and maintain your hope, maintain your confidence, maintain your feeling of the spirit of hope. That if you proceed according to your beliefs, you'll be fine. And for me, it's also been strengthened by the biblical kind of concept of hope. It's this confident expectation of what God has promised and its strength is in God's faithfulness. We can believe that once we have done all that humanly is possible for us to do, things will work out. And we will be able to find at the end of the day, at the end of the night, at the end of the pandemic, the kind of resurrection that we all are yearning for. We call it normalcy. I think it gives us a new understanding of what normalcy really means. We have a few minutes left. Do you have any other examples of these type of local stories to share with us? Absolutely. I've interviewed 100 of these people. And Mary Wong Takahashi quickly comes to mind. Mary Wong was born in Monawili. She worked in her grandmother's store, which is where the Trinity Presbyterian Church is located just at the Pali light going into Kailua. And Mary Wong grew up there, realizing that there was the rice mill just across the street. Her uncle ran that rice mill, and she helped her grandma, although her formal education consisted of only about two years in school adjacent to where their little store was. But Mary Wong married a Japanese man, Koshiro, and that Chinese Japanese liaison became strong, and they had their family. And even though they could not afford to buy the land from Harold Castle when he told them, either you buy it or you move, well, they had to move. But Mary and her family were able in that transition as they went to Kanioi to find a new place. They were able to keep these relationships with friends. They were able to continue to create ways in which they could support each other. And I will always be less to remember people just like Joe and Chimpeh and Mary and the dozens of others who have contributed to my experience while I have been here. So you're really talking about people. You're really saying that we have hope because we are people and we should look for those relationships, those friendships, that spirit to share, and keep our friends close and talk to each other, spread the spirit. Two or three minutes we have left. If somebody is feeling down and feeling hopeless and feeling there's no hope, what words would you give them? What would you tell them? What advice would you give them now? Be truthful about the realities of where you are. Be honest about what your needs are and don't ignore any of them. And keep that honesty in your relationships with other people. If you have needs, express them. Spend time in reflection. Be creative with your hands. Build new expressions about your vitality. And don't check your pulse all the time about why you are doing what you are doing. Be confident that your therapy, your healing, your hopefulness is going to be able to bridge whatever troubled waters there might be underneath us. Sorry, go ahead. In my lifetime I've been privileged to meet Mother Teresa, Luther King, Jr. I never knew them very well, but now I understand after their lives have been portrayed before us. I never met Winston Churchill, but the spirit of their hopefulness, the spirit of their strong commitment to truth and confidence is something that I have been able to receive in great amount. And so I am grateful to be able to share it. You know, I really appreciate that. And it made me think as you were talking, especially about Manawili during this period of time, during the pandemic. As you know, I've been walking around Manawili and actually what has happened is the pandemic has brought out the people of Manawili. And everybody is where we never saw each other before, never talked to each other before. Actually, there's a lot more friendship and people are waving and walking and talking and it's kind of interesting, but you kind of made me think now that Manawili is kind of a connection point for my own experience. And it is hopeful. It is hopeful. So I appreciate, Paul, your insight into that. Well, thank you. And I also am happy that I know you as a new friend, too. I think that we are enlarging the net of strength, of friendship. There is more compassion towards each other. There is more of this very important interaction that can be taking place. And sometimes it takes a crisis like this to make it happen. Well, Paul, I want to thank you for being my guest today on the history of hope. Paul Brennan has shared his personal experiences and his insight into hope. And I want to wish everyone a hopeful day and aloha.