I'm back again guys today got some free stuff for you And I got a giveaway, so let's get right into this First thing you saw at the beginning of this video two more intros we've created here at freedom Those are yours. They're free if you like them download them. You'll never be charged for them done deal Secondly guys the last video I made I told you I was gonna announce three new custom intro winners And here they are in no particular order Brantle for dawn 13 Hayden Kent and Armor guy X if you're one of those three guys you win Congratulations or gals, but I think those are guy names, but whatever you win. Congratulations. Send me an email Curtis at freedom.tm. Let's do this get your free intro Lastly guys, I've got another 3m giving away. That's right. I can't stop myself These videos that I've been making are getting thousands and thousands and thousands of views and hundreds and hundreds of comments And it's awesome, so I'm gonna give away another three now All you got to do to get into this competition is two things one have freedoms heartbeat Installed if you've got that installed in your browser, no problem second thing leave a comment leave a comment about anything Anything you'd like about freedom anything you like about these intros some intros you'd like to see maybe you want a Pokemon Intro or you want a Minecraft intro or you want some more Black ops 3 intros whatever it is. It doesn't matter guys leave a comment. That's it. That's how you get involved That's how you get into the giveaway now. I will be back tomorrow.  I'll be back soon. Check it out big C


Thanks, Mark. So, let's see, is it, what do I do to advance this one? Okay, we'll find the button here. Okay, so this is going to be a little repetitive, I mean, sort of to continue on a little bit repetitive but some additional suggestions and I will say this workshop was really, I thought a really good one. It had about twice as many people or it was pretty big. Lots of outsiders and insiders and it was very helpful and when we say should and recommendations, there was no consensus about everything. I mean, you already have heard some things that are, and so they're just suggestions. I think it was really good to have that to be able to discuss it. So, one of the things, and this is partly, I think the original title of the workshop or at least the way many of us came in thinking what should an HGRI do next, you know, now that we've grown up, what's the next type of stuff. So, a lot of identity discussions about what is the institute. So, clearly it supported large scale projects and these have been extremely important for a lot of reasons. Obviously, the standardization, I'm not talking about just ENCODE here, I'm talking about everything that the institute has done from the beginning, including the Human Genome Project. What comes out of this are quality control metrics, all sorts of things having to do with the processes that you use, economies of scale, the way you share data, really relatively different here than it would be for a small grant or small projects. And it allows you to at least start thinking about integration more. This is not the only place that you see that, but it allows that. So, the smaller, medium-sized projects, of course, are critical as well. It's not either or. They really should go hand in hand. Obviously, with smaller ones, you get much more detailed knowledge and focus and interest in a particular biological problems, which, of course, is what NIH is about in general. It's often much more mechanistic. Well, and often that is the goal, is mechanism.  We should have some discussion. I think Frank Pugh will probably bring this up about that being potentially something that we should think about integrating into larger-scale projects, too. And for testing specific hypotheses, obviously. And also, obviously, the smaller ones support a large number of researchers, but I will say the big projects do, too. I mean, NCODE has a huge number of people in it. I don't know how many all told, and the genome project had even more. So, I'm just going to go through some of the cross-cutting themes that were at the workshop and then a little bit more about, I guess, recommendations and quotes. So, clearly, a big part of this is genome biology itself is important. We can't forget that. We haven't figured it all out. It needs to be something probably that the institute should continue to lead in. Evolutionary genomics is really important. This has been extremely valuable, not just for this one point here about finding conserved elements by comparing our nearest relatives, but for almost every step of the way. And, obviously, RO1s, many other institutes do this, use this, but it's been a pretty critical part of NCODE and some other parts of the NHGRI. And I just want to emphasize that we have learned a lot about from before the genome project even started. There were about 100 Mendelian diseases that were understood. There are now 4,000 or 5,000, some very large number, and growing. And they really teach us a lot about knockouts, because most of them, of course, are recessive loss of functions, mutations. Some of them are dominant mutations, and they're interesting. So, these are suggestions, not recommendations. That's the word that we're using. So, again, just echoing what a couple have said. Don't try to, NHGRI probably shouldn't try to do everything in genomics, and clearly it's not. I mean, all the institutes, or many of the institutes, are using genomic tools, especially in the genetics arena, but in others as well. So, and this is actually not a suggestion to partner with other institutes, because it has been since the beginning, but probably need, there's probably opportunity to do even more. And I will say that I do remember in 1990, that was a big deal to start trying to get the institutes to interact more, and I think it's been pretty successful. So, many whole genome sequencing projects, especially, and even functional genomics, on a large scale, with really, really large numbers of samples, sometimes hundreds or thousands, are being done by other institutes, and will continue to be done. These are usually disease specific. That's not really a suggestion. This is sort of the background for it. But the suggestion is that NHGRI should still play a major role in those kinds of studies, but as you've heard, probably should not be the own, certainly are not expected to be the lead in those. So, here is some of the ways that we thought that, and these are from the workshop, they're from our colleagues, and partly just Mark and I talking about this over the last few days. So, one of the key things is, I mean, it's wonderful that we can sequence DNA for whatever we can, and don't believe $1,000, but whatever we can do a whole genome for, and maybe we can get better at even analyzing it too, so that it's even less. But imagine that being another 10-fold boost, or another 100-fold boost, and that's probably the only way that that will happen is for NHGRI to continue to lead in this, or at least support the development of this. And I will say, well, these have been companies, they've been academic company partnerships, and I've sat on lots of grants that Jeff Schloss and others led that for technology development, and a lot of the technology development comes out of sometimes wacky ideas in academia that end up leading to companies and sometimes monopolies, unfortunately. So, this is actually something I wish Evan Eichler was here, so he would see that I'm pandering to him, but we should support work to where we really don't give up on the hard parts of the genome. In fact, we almost did in the genome project, and Evan was one of the ones, but others as well, how critical those regions are, and so we really want to be able to look at every base pair in the genome, regardless of the context of it, and try to figure this out. And I'll bet you in all these big projects that many of us are involved in looking at undiagnosed diseases, et cetera, I bet you many of the ones that we're not seeing are ones that we're not sequencing well. I could do several slides on just saying this. You've heard a lot about it. I will say one thing about phenotypes. When we talk about all these high throughput assays for function, especially for transcription function, which Joe showed one, there are quite a few others, those are really valuable. They are ways of helping to link at least molecular function to a SNP or to a DNA sequence variant, but that ain't the organism, and I think we have to, I mean, that's an obvious point, so do you make a mouse, do you do whatever, but going from, I work on psychiatric disorders, which are the hardest and worst things to work on, and trying to link a promoter mutation that clearly affects transcription in maybe a big, big way to whether that's causing the phenotype is probably one of the hardest things that we need to do, and I don't think there are easy answers to that as Joe mentioned. And again, and I'm not pandering here because even though I'm not a bio informatics, clearly the rate limiting on most of the things and many of the things that we do are not the experimental wet lab parts. They still need to be done well, and they are still hard, they still need developments, but is figuring out how to handle the data, and that means every step of the way on that. And while this institute does support that in a quite a big way, it almost never is enough, and we need to probably get a whole lot better at that, and so part of that is supporting the development of new tools for that. But I will say this just from my own experience, that development needs to be hand in hand with the biologists because it does not do any good to develop algorithms if nobody needs them. And then systems biology approach, we've already talked about and others have talked about doing perturbations in a big way, and we all see that as happening a lot more. So sort of summarizing a couple of those is emphasizing integrating functional studies with evolutionary information. We don't do that very much, and it turns out to be very, very powerful. So that means not just measuring conservation, but looking at all of the parts of that and the population genetics folks especially, but then going back and integrating that with kind of understanding how transcription mechanisms work. You have a variant, you think it's, you know something about its conservation, and then you need to understand if we're talking about transcription, you need to understand transcription. And we'd also like to get better and better at predicting whether a variant is deleterious or not, and so there are these various methods that have been developed that are quite good, I think they can get better too, or we think they can get better. So this is starting to get into the mechanics of how you might do it, and I think we're going to probably have discussions throughout this workshop. How do you want to do this? And again, I'm not being self-serving here because I want every one of these, so I guess I am self-serving, but you want to, you'd probably still need to do some production size or some large to medium size projects like ENCODE so that you get the advantages of those, but you need lots of smaller grants, and especially to create the technology but to apply it as well, maybe partnering more. And I think this is just a general point about NIH, but certainly here as well, that those should continue to be probably an increased part of their portfolio, and that means things like these couple here, but many others as well. All right, so here's some of the more, less experimental, but more. So the idea that there's all these efforts that are going on, and they're not coordinated in any way, and there are different institutes, there are different countries. Some of them, I shouldn't say they're not coordinated at all. Dan and you guys talked a little bit about Mike, and Dan talked about all of those projects, and clearly there's some interactions between them, but you can't go to one place and get this region of the genome in all the different places and all the different projects. Here's what we've learned from it. I don't know how that might be so hard to do, but this whole idea of interoperability and cataloging them, integrating them, and somehow do that. The idea of the experimental and data analysis standards, having some set of standards, that's the only way you'll be able to integrate or make them interoperable. And this isn't just whole genome sequencing, of course. This is all the stuff that we've been talking about with functional genomics, et cetera, and metabolomics even, epigenetics. And then I just, one more pitch, which I hope we, I think we all should say something about this. One of the very powerful things about NHGRI, some of the other institutes, I guess, I know do this as well, but NHGRI from the beginning has taken a big, big effort in training genome scientists, because we didn't have genome scientists when the project started, and there have been lots of some of those are great success stories in this young folk, younger folks in this room and still up and coming. Here's one reason, Mark and his team got this together, and actually these numbers might even be underestimates. I don't know, he was worried about TCGA being so big, but this is just RNA-seq, and they're just giant numbers of data sets on those. I would love to be, and frankly we do use TCGA ourselves. We go and look at it and apply that back into ENCODE. It'd be nice if that was easier to do. I think that's probably the most important thing, and that's just one type of data. There are others as well. GTEX doesn't have a logo. I couldn't find it anyway, but maybe they do. And so here's one example and is that people have talked about the DCC, that Mike Cherry is running for ENCODE and the data DAC also, which is a data analysis center, and it's basically groups in ENCODE. A lot of people in ENCODE who get together and put all the data together in a high dimensional, high quality way, standardized, and in a coordinated way. And that's one reason why I think ENCODE data is valuable, because we've been able to do that. And if it was just, if it wasn't standardized, and we weren't doing things similarly, it would be much harder to do that. And it'd be nice to be able to do that worldwide and, you know, connect that to sequence variants. I mean, that's what Joe kept mentioning that Mark and I would talk about. That was a big part of the meeting as well as what we all think we should be doing, of course. And then I have standardized pipelines for everything that we do on that. Mark like this, I can't remember who proposed the Amazon model. Was it John? John, I think this was you, John. We'll blame this on John Stam that the idea that Amazon started out being really, really good at one thing and then expanded into everything. So, all right, so this is, Mark, you want to come up for questions? This is, that's what we had to say. I think key messages were here and hopefully will lead to discussion. The last part, I think it's really good and really positive the way, in particular the ENCODE 3 DCC has developed and evolved. But I think it's inevitable that all of biology interlinks and there's a point where you just want to traverse all datasets, you know, from structural biology through to ENCODE, through to something else, through to cell models, through to image datasets, etc, etc, etc. And that's a big role the, you know, NCBI and EBI play. And I, the good thing about the current model is that the way Mike does it is very much in line with these bigger aggregation points. But I think ENCODE's got to see itself in the context of all these other datasets. It's not the case that because of that interconnectedness, you know, you should try and organize everything because, because it's, that problem is just impossible, nor do we think that way at the EBI. It's really genuinely impossible. What you have to do is enable all these different communities to correctly link up across this information space. His, his, you know, he's run the Saccharomyces genome database since the 80s or 90s whenever it started. And it was, is, sorry, he still runs it, I think. It is that. They have whole teams of, of not just curators, but people who try to do that for lots of different types of data, including, I think, cell biology and imaging data. But this, I'm not sure if that's easier. It's a smaller community. I mean, I think it's a smaller community and more organized data, right? I just don't think, I would caution from trying to, trying to, trying to have the ambition to be all of that connected. I just think that it's just going to collapse on itself. You will, it won't work. I mean, that's, it's very clear it won't work in my head. Because that's kind of all of human biology and there's no way you can, you can handle that. One more, you probably answered the kinds of data broker and so forth. And I, I kind of think that, you know, one question is, how does EBI and NCBI see us? And obviously you're the person to answer that question.   I mean, what, what would be, I mean, in terms of making the ultimate knowledge base for biology or for science in the future, what, what is the right model actually?  This is quite annoying. Whoa, whoa. We use the word broker and, and a number of resources act as a broker. We have community driven resources that act as a broker, sometimes model organism databases, like fly base, like, like yeast, sometimes portals, like encode or, or organism encode. Other people completely back their whole limb system onto us. So, Sanger does that, TGAC does that, everything else. So we have a variety of different modalities about how that can be supported. So I do think the broker model is the right model. But that model suggests that a community has to say this is the data sets and the data items that we really organize. You know, this is the stuff that we as a community do. And this is the stuff that therefore we don't do. And this is the stuff that we want to broker back into the system so that everybody else can use it. And, and drawing those boundaries correctly is the, is the art of the game. And I think that it's quite easy because everything in biology is interconnected to suddenly not see any boundary. And then, and then it just kind of becomes a sort of, it becomes an impossible task to, to handle that. And I think you need to have the right boundary of the, of this, of that ambition. Yeah, I think, I think one, one thing is, you know, to start out, I think it's possible, but it's very hard, as you and said. But the first thing is to take similar data and get it in one place and interoperable. So you could just take the encode like data and get it somewhere in the world, in one place, right? In the next decade, that would be a good thing. I mean, I still, well, I think your mission one is to make sure that you continue to organize your own data and break it back into the system and make it, make that accessible. If you fail at that mission, then, then, then everything else is not, is not good.  That's the whole, the biggest point. The user might want, might be studying either a transcription factor or a cell type or something and not know about all those other ones though. So that's, that's the problem. So how, I thought that's what we were. Yeah. So, so, so those are the roles of the, of, of making sure all the data is registered and then people building other user-focused portals on top of those registries and schemes. And some of that, from a genomic sequence perspective, you call a genome browser. But from, you know, you think of genome browser not as a genome browser, but as a registry of interested experiments that you can look onto the genome. And, and so you shouldn't have one. You should have a big variety depending on the user group. And there should be a separation between the, the data flow coming in and the, and the portal that, that integrates data around it. And, and any other model, I don't think scales well. So I think, I think if you try and confound the portal and the broker in, you get yourself into a huge amount of mass. Well, practically though, do you think that, I mean, for the future genome browser, is that something that, for instance, for a future genome browser that takes in more than just encode data, it browsers all the genomic stuff or something like that. Is that something that EBI does? Or is that something that, is that a portal onto data in EBI? Or how does that work? Yeah. So, so that's, there are portals where EBI, so it's not just one portal, don't forget. Portals are really focused on user groups. So you might have a portal that's focused on people who want to start from structural biology and then go from there, or portal. It's really stepping stones from user groups. So there isn't, there shouldn't be one data broker, there shouldn't be one portal. All of these different ecosystem components of the ecosystem have to, have to work together. And, you know, UCSC Ensemble would, you know, they have forward plans, they want to keep serving their communities well. You know, if they were, they would, they would have ambitions for lots of these different things. That shouldn't prevent anybody else standing up and saying, I want to produce a portal around this, around some data sets as well. But you've got to be in a multi portal, multi data broker world. I'm just wondering whether I can sort of ask a different sort of kind of question. You raise obviously the issue of sequencing technology. And one part of sequence technology, classically has been more sequence, better, more accurate, faster, cheaper. But obviously it would be tremendously helpful because we are talking of cis elements for the most part to have long range, you know, contiguity. So where does, meaning where is that? And where does this fit in? Would it make some epigenomic analysis easier? I would, I could think of scenario as well. That's that's right. And where does this, where is the technology and how does it affect? So obviously, people are still working on this for that reason. And it is important when you do have it, it certainly helps with de novo genomes. There's still a lot of, there's still a few groups, not a lot sequencing a lot of hard genomes. But it's really paid off in RNA, I think more than anything because it get in the contiguity. Your point about really long range contiguity of putting in phase this element with this one in the DNA would be a really good one. There are, I mean, we, there are probably people in the room who know more about this than I do, but we use and are trying to stay on top of all of the different technologies and they're real error prone. They're not high throughput, they're expensive, but they could get a whole lot better. And I think that's, that's still the hope. Is that what you were asking or you were? Okay. Are there current error rates such? I can see that assembling a, you know, getting a new genome would be terrible. Even re sequencing, you know, genomes might be bad. But is there sequencing so, so bad that for many kinds of epigenetic analysis, it would be terrible? Yes. Yes. At least in our hands. I don't know. Jeff or somebody, I don't know. Maybe you guys know more. I mean, it and it and it's actually not just the error rate is that the throughput is, you know, 10,000th of the other technology. So it's really expensive. We done? Thank you.


Hi guys, we are right here at Nyakauza Batim, Madam President herself and we're here with someone who's been part of this organizing ata kwa na tuwambiai ni nami na nafanya ni ni, how are you? Hi, I'm well, how are you? We're good, what's your name? Okay, my name is Sara Sabina. Yes, I'm Sara Sabina. My tiktok name is Brina. Brina? Clearly we can see this place is looking amazing and we want to know how did you come up with the idea of doing all this because Naje you are behind all this. And also to Nyakauza also maybe utilize it how you met Nyakauza expressime kwa je ya take us through. Okay, thank you. Okay, I'm an event planner. I'm an event organizer. I'm a marketer about Nyakauza. Okay, first of all I want to welcome all of you here. You're welcome for this event. It's a dinner with the president as we all know Nyakauza is the tiktok president and there's no dispute about that. It's the first appearance after she took oath of office. Yes, she was sworn in when she was out of the country and being a Kenya, she had to come back and celebrate her first birthday after taking oath of office as the tiktok president in Kenya. We are so honored to host this here at Ole Sereni. All this came about Nyakauza for her style of fashion. Her passion in everything that happens around her she's so stylish and we thought it twice to look up to listening to what she loves most and what we have here is what she loves. She loves class, she's elegant and that's how we came about in pulling out this. So all of it is basically her idea.  We can confirm it's elegant, for sure you've done a great job. Thank you. Now have you worked with other celebrities in the past and who are they? Oh, wow. Yes, I have worked with a number and do you want me to mention names? I'd like to see the kind of work you did with them before. I've worked with Madam Boss, the president of Single Mothers in Kenya. We've done two projects with her and she's a wonderful woman and we did the first event at Kempinski sometime in 2021 when we were launching Akode Foundation the first anniversary. Then secondly I worked with her again at Eka Hotel sometime last year when we were launching her book Akode Quotes and also the EP. It was two in one event. Yes, yes. We know we are here because of Nyako but we would also want to know how is it working with Akode? She looks like someone who is working with her. It's my work that markets me. So they come for me. I don't know. It's my work that speaks. So yes, it's not so hard working with any celebrity. It depends with the quality of work that you do. If you do your work passionately and you're up to task then you can work with anybody. As we know working most of people ask themselves how is Nyako? But you're working with her maybe tell us the experience of you working with Nyako. How is Nyako? Nyako is a kind soul. She's a beautiful soul. Nyako is very generous and she's too real. She's too real to be a human being. Nyako is an angel. She's the best. She's understanding. She's too welcoming. She's very considerate. It's good to work with her. It's so beautiful. I can say everything about her like we can take a whole night talking about her. She's a kind soul. And she doesn't live here in Kenya. Why did you decide to pull her party here in Kenya? She's a Kenyan. She's a Kenyan. She's lived in Kenya and Nairobi for the longest time of her life compared to the time she has lived in Europe. So coming back home was the best thing. Actually it's an honor to have her event done here and especially in Nairobi. Even the Bible says that Nabi hapewi hapewi nini but at the end of the day what is the history of Nyako in Nairobi? She's talked about this over and over in her lives. She's told us her story. So coming back to Nairobi as the president of Tiktok is a big team. And we had to honor her in this city of Nairobi. Yes. Thank you so much for speaking to us. We can't wait to see how the day goes. Thank you so much. A message to Nyako. Madam president we honor you this day. It's a beautiful day that God saw it right to gift your mum and your dad. I'm sorry to mention them now that they are not here but life comes through a woman and a man. We commemorate this day and we want to say that God has been gracious to you. And even in this particular day I want to speak life and life in abundance. I know God has graced you I know His grace is still sufficient even today and I'm praying personally as Sabina I am praying long life and I'm praying that when God gives you this life it may be for our purpose. It is for our purpose and it shall be for our purpose that you shall bless many with this plus one that God is giving you. And I'm so much sure that you shall have more years to come. We shall celebrate more. Happy birthday madam president. You're welcome. We are waiting for you. Thank you so much.


always great when you start off Sunday morning by having to close the vlog because you forgot last night. Yeah, that's a thing. Anyway, I am up and I am showered and dressed. I ate a little bit too much dessert last night because I got on the scale this morning and went oops. So yeah, I might be drinking a lot of bone broth today and doing some intermittent fasting. So anyway, I need to go to the library today because I am sorry, I'm checking email while I'm talking to you. I need to go to the library today because there's a book that I asked for that's ready to be picked up. So I need to go that do that today. I don't know what else we're doing today. I don't think a lot. I do have a new style of knee brace on my leg and on my knee, obviously. And you know, we'll see at the end of the day what it feels like. But so far, it's the most comfortable feeling one I have. I have a lot of them. I've tried a lot of them. It feels very supportive, which is surprising because it's very thin. But it also has lots of non-slip stuff on the inside so that as you're wearing it, it doesn't roll down. Which is one of the things about the other knee braces that drives me up the wall. And if you have to wear a deep brace, you understand what I mean. It's like a compression sock for your knee and they roll. They just roll. Anyway, despite the knee, I like to stay active. So I need something that's going to stay in place. Anyway, we'll see how it goes at the end of the day. But so far, so good. Uh, something was missing out of my Amazon package yesterday. But I got on the chat with them last night and they're going to send me a replacement. The package came open. So yeah, anyway, I'm going to check my social media and get that done. Bob is actually working today. So um, his company does, um, he's in tech. He makes, he works for a company that makes capital semiconductor equipment. And yeah, they make the machines that make the wafers that make the chips that go in everything on the planet. And anyway, they have a software update website update thing today. I don't know. That's all I know about it. And he's got to be on the line with people and monitor what's going on to make sure everything goes smoothly. So we'll see. Anyway, so while he's doing that, I've got other, I have to finish laundry too. I got halfway through laundry last night and then forgot about it. So while he's doing his thing and working, I'm going to get on, get some chores done, run to the library, I'll maybe put some puffy eye gel on because holy cow. Anyway, that's it for the minute. I also have to do smart. So we'll do that too. All right, I'll be back. Hey guys, it is Monday, the 22nd, I think of August. It's only half past 10. I am in the midst of video editing vlog first and then I have a bunch of video that I shot with my phone vlog style, but that's for the patrons and mostly me working on different art projects and art foamy projects and they'll at least get first look. You all might see it at some point, but they're going to get first look. So anyway, and that squeaking is my feet on the stairs. Anyway, I'm going to make some bone broth. I already got the plants watered out back and all of that jazz. Today's just to stay at home Monday. So I'm okay with that. Lots of different appointments and things going on this week. So, you know, I'm going to take the relaxing moments where I can. So anyway, let's make some bone broth and then get on with our video editing because unfortunately I don't have an editor. I am my editor, so it's not going to get itself done. I'll be back. Morning, everybody. It is Tuesday morning, 10 30 ish, something like that. Hold on. Tuesday, August 23rd. Anyway, we're going to go for a little walk this morning because in the last month or so, I haven't gotten many steps in. It's been way too hot, but I also finally think I found a the perfect knee brace. So for those that don't know, I have a torn meniscus and I haven't had surgery on it or anything. I've had physical therapy. I've had a couple of cortisone shots. Most of the time it's okay, but sometimes due to my own stupidity, to be honest, I have to, I aggravated and then I need to wear a brace for a bit to get it to calm down. And finding the right knee brace or other, you know, appliance like that that you need to use, it's difficult and there's a lot of different ones out there. And let me go somewhere where it's less bright. It's not that there's anything wrong with them. It just takes time to find the right one for you and that means I have an excess. So I need to see if anybody else in the family needs them before I sell off the ones that don't work. But I did find this one. You can see that there it's actually sort of a nude color. So that actually works for me too. But it stays up, it doesn't roll down. It holds where I need it to. At least apparently I've had it for three or four days now. We're going to go for a little walk. We're going to see how it does and test it out. Bob's already been up for, of course, quite a while working. He had a dental appointment this morning that he went to. I've checked on social media and all that stuff. Of course, I have chores to do, but let's go for a walk first and get a few extra steps in. I'll be back. Back for my walk. The knee brace did great. I did film a little something while I was out and that will show up in a few weeks. But anyway, the knee brace were great. Does my knee feel like the right one? No, my left knee will never feel like the right one, but it feels pretty good. And then I was filming the ending clip for what I filmed when I was out. And let's see if I can turn the camera around to say that the phone was perched precariously for filming is probably an understatement. I had it clipped up there. Yeah, because I'm lazy and I want to get the tripod out. Or the actual camera. I filmed it with my phone. Anyway, I'm going to just sit and chill off because I got a little sweaty and have some bone broth and maybe some lunch. I think it's just about time. So I'll be back. Okay. I also spent a little bit of time painting and I think it might almost be done. It will be for sale. I have this one and another one that are currently for sale. If you're interested, I'll put the picture of the other one here. They're both the same price. Information will be down below. You can direct message me. And yeah, I think this would look beautiful in your house, in your space. I love the way it turned out. We're going to let it dry and then I'll take a second look at it. But yeah, I like it. I'm pretty happy. I'll be back. Hey, you guys. Good morning. It is 11 29 a.m. Wednesday, August 24th. I've been busy already this morning. I have made some overnight oats for the next few days. I've got a loaf of bread working in the bread machine. Laundry is working, dishes are working, all of that stuff. I also wrote a community post for our little communities here on next door. And I've been in communication with the former HOA board president and one of the current board members. We had one of our neighbors last night near the front of the community. Her garage was broken into last night and her car was stolen. So that's highly unusual for my community. I don't know specifics more than that, but that's not good. So we're trying to let the community know, find out who besides us has security cameras. And if they do, if they caught anything, we didn't catch anything. We're all the way in the back of the community. And if it's the house that I'm thinking of, they didn't really have need to come all the way back here if they were stealing the car on their way out. I mean, I don't know anything's possible. Anyway, I already checked. We didn't catch anything. I did send them the footage I did have because my cameras did go off about that time, but it didn't catch anything. Anyway, that's a fun way to start the day, right? I'll be back. As I ended up doing a lot of art and computer art. I created some new stickers and thank you notes for the patrons and supporters. And I've got some boxes here lined up that I need to finish packaging, write notes on the back of the card that they're going to get inside along with their custom art foamy. And it's quite a production.  Because it's a lot. Anyway, I created some new stickers too for them. At the moment, they're not available in the Etsy shop, but this is them. How cute are those? And I'll get one in their box at random. I'm also going to, of course, use them in my journals and stuff, but anyway. This is 26th, 10.01 a.m. That's right, Friday. I realized very late last night. I never vlogged yesterday. I just completely forgot to turn the camera on. It was a counseling day in my defense, so before and after counseling, I spent a lot of time journaling, obviously without the camera on. I will put some pictures here of the journal pages I worked on using my art foamies. Anyway, I am this morning working on finishing up the resin pieces that I made from the molds of the art foamies. I'm also prepping September journals. I'm going to do the September one a little bit differently slash old school. Sorry, getting a text message. Nothing but can't wait. Um, so yeah, I've listed some purge stuff on a couple of Facebook sites for purging art supplies and artwork and, um, yeah, it's all good. I don't know. It was a weird day. I never turned the camera on. That's just so strange and not like me. Okay. We need to go get some steps in, but we also need to grocery shop, so I guess we're getting said steps in at the grocery store. We've got to stop and drop off an Etsy order at the mailbox. Oh boy, another bin. I wonder if somebody's moving. Somebody else, maybe. Clean out their house. I'm glad I summed that. Anyway, a lot of changes going on in the neighborhood. Yeah, so anyway, we're going to go get that done. It's always a weird day when Letty comes. We love her coming, but it's hard for me, in particular, to like work around her, not get her her way and let her do her job, but today especially because I had Etsy orders coming in and questions from patrons and it was a little bit of a challenge, but we got it done. Anyway, we need to go get some groceries because the family's coming tomorrow and yeah, that's a thing. Need food. Need food. Mr. Bob needs a steak to barbecue or something. He's trying to for something. So we're going to go get it done and we'll be done. I do have a hobby mail address. It's down below. You all want to send me something, but you never do. That's okay. All right. Etsy order off now to the grocery store. Okay, so that was an interesting shopping trip. We were shopping in the bulk bins and which we do every time we go and I heard somebody talking. I heard voices. I know that sounds bad, but I heard voices. It wasn't all in my head. Somebody, evidently, I'm guessing was shopping and had some sort of podcast playing on their phone and they said their phone down on a bulk bin while they did their shopping and then they walked away and left their phone and left it on. It was a big Samsung phone. Yeah, it was a big phone and it was loud. It was on full blast. So that was strange enough, but I took the phone and I'm not the person who could just leave it there and walk away. I took the phone, I picked it up and I brought it up to the front to customer service because that's what I do and got some in my eye. The funny part is I said I know this is probably weird, but I found this phone over by the bulk bins.  In fact, this is my third one since five o'clock. It was only about six o'clock just FYI. You're walking away from people. I know something. I don't know how that happens, but we're going to go, after all the shopping, we're not going to cook dinner. We're going to go grab that express and go home. But anyway, I get the veggie bowl. All right, we'll be back. Good morning everybody. It is Saturday morning. August something. I don't know. It's about 10 30 a.m. Let's get the computer up. Bob is off to the eye doctor. He had to get new lenses put into his glasses. It's August 27th by the way. I've already got the backyard plants watered. Obviously I'm like dressed and stuff. I did sleep in a little bit this morning, but that's okay. Got the dishwasher running. All the chores. All the chores done. Family's coming over to dinner tonight. So kind of making sure things are picked up. I have art, of course, my downstairs art stuff on the sofa. So I've got to put that away before people get here. But first I'm feeling like I should be up here for a bit checking on email and social media. I don't know what else we're going to do today before the family gets here. Maybe nothing. Maybe go for a walk since we haven't gotten too many steps in lately because of the heat. When it's 100 degrees out, you just the last thing you want to do is go walking. At least for me. Anyway, trying to keep busy. I have a doctor's appointment next Friday for a checkup, which of course has me a little nervous. But you know, I'm dealing with it okay, better than in the past. Thank you medication and counseling. Thank you, Scarlett. Yeah, anyway, we're all good. So we have stuff to do, you know, it's a matter of picking which one to do at any given moment, right? All right. And yeah, that is probably done. I might, I don't know, we're going to sit with it for a few days. I might add one more thing to it, but we'll see. If you're interested in buying it or any other artworks, let me know. My contact info is down in the video description. So anyway, all right, YouTube just came up with news, like there's a reason I don't look at it. Anyway, that's it for the minute. And I think it's going to be a pretty good day, but we'll see. And I'll be back.  And they fight over this one dish, which is funny because there's another one over there. Where is it? Where is it? Where is it? Wait, there, there you go. But no, they fight over that one. Okay, we're going to go for a walk. It's only in the mid sixties or so. I've got a bunch of rocks I painted. I've got to put out while we're out. So I'm going to go see what we can see. It's been the first time in like, I don't know, forever, ever, and ever. So let's go see what we can see and what's happening in the neighborhood. I'll be back. Hey guys, upstairs closing windows for the evening. It's actually a little chilly outside. I'm not mad about it. Anyway, I almost forgot to close the vlog again. We had a family dinner. That was great. Becca and Paulie's came over. My dad is here. Jenny and Brian couldn't make it this week. Flipping through my journal to find the next page to work on. I'm trying to do two things at once and do one thing, one of them one-handed. I like to like, hold journals open when they start to get fat and chunky like that. Anyway, we had a good family dinner on Saturday. We bought barbecued some beef. We boiled some corn on the cob. We had some biscuits, gelato, iced coffee. Like it was really nice.  Anyway, it's been a fun week. It's been an interesting week. It's always an interesting week. Next week's going to be, there's not too much going on, but I have a doctor's appointment. And for those that don't know, I suffer from anxiety and depression. And I am medicated and in counseling. Still a challenge that doesn't solve anything, everything. But anyway, medical things are one of my triggers. And so I'm getting better, but they still make me nervous. And it's just a checkup, but yeah. And it's not until Friday. That's okay. I'm just going to keep myself busy all week. So, anyway, for those that don't know, my dad is a retired auto mechanic, locksmith and master machinist. Anyway, and Bob owns a hot rod. So, you can see here that my dad and Bob does their talking. I'm going to go finish my iced coffee and watch some YouTube before bed, do my daily puzzles. Yes, I do some online puzzle games to keep the old noggin sharp. Sometimes it works. Sometimes not so much. Anyway, I will see you all next week.  Please check out the video description, like, share and subscribe.  I'll see you next week. Bye guys. I got to go close the windows. I'll be back. I'll see you later.


Our next speaker is Sing Wei Su. It took me several tries over the course of knowing Sing Wei to get that name correctly. I'm really good at mispronouncing names, as it turns out, you will recognize her because she has too many H's on her name tags. In fact, all H's, actually. Her Twitter handle, I believe, is so many H's, if I am correct. So, Sing Wei is a Rubyist. She works primarily in Rails these days. She is particularly interested in parsing, probably in no small part due to the fact that she speaks four languages. Can anyone guess the four languages? French is one of them. Somebody already, there's a spoiler in the audience here. Somebody already knew all the languages. I'll give away the other ones too. Yes, she speaks Mandarin, Chinese, French, and English. If you speak Cantonese, do not talk to her. You are not welcome here. She is a Mandarin speaker, okay? She'll probably be nice to you anyway if you try and speak some Cantonese with her. And there's one last language that's super tough to guess, actually. Ruby, Dutch, oh, cheater.  I know you're cheating. Nobody just guesses Dutch first try. It's not a thing. So, Dutch, Chinese, English, French, and Ruby. And she's here to talk to you about parsing. Please, a round of applause for a round of applause. Oh, good. Yes, okay, good. So, my name is Sing Wei-Sue, and as Jonan said, it doesn't look anything like it sounds. A lot of Hs that are all silent, so go by so many Hs. And today I'm gonna talk about parsing. A little explanation about the title of the talk. I probably started first thinking about parsing when I was teaching English as a foreign language and had to explain things like why so many words in English have multiple meanings like flies. So, depending on the meaning of that word, the sentence can go in very different directions. So, when I first started looking into how computer languages are parsed, I noticed that there's actually a lot of similarities in how humans parse sentences in the language they hear and read every day. So, I'm a relative newcomer to the programming world, so I never actually learned about parsers or compilers or anything in school. So, I actually also have an alt title for this talk, which is how I accidentally eat a computer science, and so can you. So, of course, it's not gonna be a comprehensive talk on all parsers, but I wanted to share how I came to learn about them because honestly I really had no idea what they were until a couple months ago, and I feel like I came into them by accident. So, rewinding a few months back, I had just spent a year going through a program called Aida Developers Academy, and where I learned, among many other things, how to build Rails apps, and we were turning out new apps every couple of weeks, and one day I got curious about how things actually worked underneath all of that Rails magic. And specifically, I was trying to figure out how routing worked, so I went to GitHub and started poking around some of the Rails source code and came across a file called parser.rb, and I was like, okay, cool, I'd written a kind of mini parser to better understand what a language interpreter does before, so I thought I probably knew what it would look like. And it turned out it was nothing what I expected. I didn't even recognize this, so I was like, okay, I have to look a little bit deeper, and I saw this file was actually generated using a different file called parser.y, so I was like, okay, let's look at that. Still didn't make any sense, and barely even looked at any kind of Ruby code that I recognized, so I was trying to figure out the best way to get myself to learn this. And I've been told that a great of terrifying way to make yourself learn something is to submit a talk on it, so I was like, okay, sure. What's the worst thing that can happen if I submit a talk? Either I get accepted and I have to talk about it or I get rejected. So it turns out the worst thing that can happen is to get rejected and accepted, so thanks a lot, Josh, for putting me through all of that. But anyway, here I am. And to get warmed up to the idea of parsing, let's play a game with some audience participation. I hope most of you have played it before. It's where I ask for a type of word and you have to fill in the blank to make a sentence, so I need a verb. Anyone? Okay, drink. No audience plant or anything. So the young man drank. This seems like a perfectly valid sentence. If you can all remember middle school grammar lessons, you can diagram the sentence into a subject and a verb, where the verb is drank, and since all sentences need a subject to actually do the verb, we know that the subject is the young man, so it makes sense, right? But are there any other possible sentences that could have started with the young man? So for example, the young man did something, so I need a noun and a verb. We can use the same verb, drank, but drink what? Beer. Beer, great. I didn't anticipate that one at all. So also grammatical, this time instead of just subject plus verb, we have subject plus verb plus object, which abides by the rules of English grammar. If we interpret the young man as subject, drink as the verb, and the beer as an object, which we know makes sense, because objects are nouns. But still, can we come up with even more possibilities for a valid sentence that starts with the young man, either using subject verb or subject verb object? So for example, can you fill in this blank with a noun? Anyone? Well, you can try the boat. So the young man, the boat. Is this grammatical? Or is the young man beer, is that grammatical? You think not, right? Because you think, based on the previous sentences, we assume that the young man is a subject, and then you have a direct object, and we think, no, this is not grammatical. But it turns out you can actually parse the sentence in a different way. So if we interpret the subject as the young, as in like the young people, we see that it still follows the same rules as the sentence of the young man drank beer, which was subject verb and then object. And we were initially led astray because we tend to think of man as a noun, and therefore in the previous sentences as part of the subject, and not a verb. And so this kind of sentence is called a garden path sentence. Garden path sentences are sentences that contain a word that can be interpreted in more than one way. So that you think the sentence is going in one direction and then it pivots on that ambiguous word and goes in a completely different one. So time flies like an arrow and fruit flies like a banana is an example that follows that pattern. Another example is the man who hunts ducks out on weekends, sort of led astray by like thinking of ducks as the direct object. We painted the wall with cracks. You might expect paint or something after width, but crack describes what's on the wall. When Fred eats, food gets thrown. Mary gave the child the dog bit a bandaid. And the woman who whistles tunes pianos. So this kind of ambiguity and sentences can also be seen in hilarious actual headlines such as grandmother of eight makes a hole in one. Man-eating piranha mistakenly sold as pet fish. Eye drops off shelf, performances I guess. Complaints about NBA referees growing ugly. And my personal favorite, milk drinkers are turning to powder. So regardless of the ambiguity in natural languages like English, we can all agree that as speakers of A language, there are certain grammar rules that we are aware of that allow us to make decisions as to whether or not a sentence is a valid expression in that language. So as we've seen with the last couple examples, we know that one possible kind of valid English sentence consists of a subject plus verb plus stuff. Most of us probably did that sort of thing in middle school and we know that like a sentence diagram tree looks something like this. Where at the top level you have the sentence which can be broken up into its constituent parts. So here the noun phrase and then verb phrase which can then be further broken down until every word of the actual sentence is added as a leaf of the tree. So in this sentence we have John lost his pants as the leaves of the tree. But the same tree could apply to the young man, the boat. So these kinds of trees are constructed based on grammar rules. The convention used to describe grammars in the computing world is a notation called back is now a form or sometimes extended back is now a form, BNF. So in the BNF notation you have a series of rules that together constitute the language or in other words can define every possible sentence in that language. There are two kinds of symbols that are used to express each kind of production rule. And those are terminals and non-terminals which we'll get more into. The basic format for each production rule is that there's a left hand side which produces a right hand side or can be rather rewritten as what's on the right hand side. So on the left hand side you have a single non-terminal symbol or token which produces either a terminal or a sequence of terminals and non-terminals. So what does this mean? For example, a super simplified subset of production rules in English. Sentences based on what we saw before might be something like at the top level a sentence produces a subject plus predicate and the predicate is verb plus stuff. So here is an example of 10 production rules that can possibly describe both of the sentences we created earlier. The young man drank beer, the young man, the boat. And these rules make use of six non-terminals, sentence, noun, phrase, verb, phrase, noun, verb, and article. And seven terminals which are just the words the, a, young, man, boat, beer, and drink. And obviously some of those fall into different production rule categories. So using this grammar we can start at the top level and keep applying production rules until we generate the full sentence. So we start with sentence becomes a noun, noun, phrase, and a verb, phrase. And then the noun phrase becomes an article and a noun which in turn hit the terminals of the and young for the article and noun respectively. And similarly the verb phrase can then be broken down into verb and noun phrase and so forth until you finally get the whole sentence. So pretty straightforward. The same thing can be applied, the same production rules can be applied to the young man drank beer, but just in a different order. So you get the same sentence so we know it's valid. But what does this have to do with computers? This is just grammar, English grammar. When it turns out the process by which we parse and understand sentences in a natural language isn't that different at an abstract level from what a computer language parser does. So here's the basic flow chart of what happens to your code. You have the source code which gets passed into something called a lexer or tokenizer which produces a bunch of tokens. It reads the sentences and figures out like recognizable units. And those tokens in turn get fed to the parser which in most computer languages spits out a syntax tree which then your compiler or your interpreter walked to output CPU instructions. So but of course most of us don't spend a lot of time implementing new programming languages but by better understanding the lexer and parser steps we may be able to see how to use parsers for simpler situations. So rather than a Ruby script you can feed anything.  It could be just a different data structure or even something as simple as a Boolean. So starting with lexing or tokenizing. All this means is turning your input into a sequence of tokens that your parser can recognize. These tokens can then be matched to the grammar that describes your language you're parsing. So let's look at a really simple example. Let's build a parser that can handle super basic binary operations in math such as addition, subtraction and multiplication. The entire language will consist of an integer followed by an operator then by another integer. So the grammar rules here are pretty simple. We only need three of them to describe every possible sentence in our many math language. The start symbol here is the expression which constitutes a three non-terminal symbols, a number token, then an operator token and then another number token. And the number token can then be rewritten as any digit and then the operator token can be rewritten as either a plus, minus or multiplication sign in production rules two and three. So here's a really simple implementation of a tokenizer in Ruby using the string scanner library and just regular expression matching. Pretty much identical to the ones that we saw in our production rules to grab tokens of either type number or operator and then it returns them all in an array. So when we input the string three plus seven, we should get a three element array as your output tokens. So number three operator plus and number seven. And now we wanna pass that those tokens into the parser and ultimately you want to end up with a tree that looks something like this so that when you feed it to the interpreter it looks at the head and knows to execute addition on the left child and right child. So a really trivial implementation of this parser might look something like this. You have a parser that only expects three tokens and outputs a tree with single node containing the operator and the two children which are the number tokens to be operated on which is really simple. But now for some slightly harder math. So take for example this expression. You have two times parentheses three plus seven. So with this expression we need slightly more complicated rules to describe it. Whereas before our first production rule was expression equals number followed by operator followed by number. Now we have at the top level expression equals number followed by operator followed by expression where the expression can be then rewritten as either an expression in parentheses or just a number. And then the number in operator non-terminals still translates as they did before in the previous production rules. So we tokenize for saving space it just outputs the two times and so forth. And this is ultimately the tree that we wanna build but how do we tell the parser to construct the tree correctly? So one common approach is to use a top down parser that looks ahead one token to decide what grammar rule to follow. So like garden path sentences we need to know what comes after the current token to know what kind of rule to use to understand the sentence. So for example knowing that the young man is followed by the boat allows us to know what the subject and the verb of the sentence are. If you can adhere to a grammar rule when you consume each token then you're good to go and you can keep parsing but if you don't then you hit an error state and then you can't continue parsing a syntax error. So here we start with the first token which is a number token. Since peaking ahead at the next token it tells us we have an operator coming up we know that the only possible rule we can follow is the one that says an expression is a number followed by an operator and then another expression. So start building our tree with node two. Shifting over to the next token we have an operator peaking ahead we know that the next token is the parentheses and the only grammar rule that has an operator followed by parentheses is still the first one since we know that an expression can also start with the parentheses. So so far we're still in the realm of grammatical correctness and we can keep parsing and we can set the operator as the head of the tree. So now we consume the parentheses and we see that the next token is a number. Since we know that a valid expression can either be a number or a number plus an operator plus an expression we still haven't violated any grammar rules so we can continue parsing and update the right child of the tree to be potentially an expression in parentheses. So then we consume the number token holding the value three. Previously we knew we had two options either interpret the number as just terminating into a three or as part of the first production rule which states that an expression can either be a number, an operator, an expression. So since we can peek ahead at the next token which is an operator that gives us enough information to know which rule to follow which is the first one and not the second one. So now we have the expression so now we have an expression that will turn into a binary operation and using the same parser we know that three will be the left child of that subtree. So now we consume the operator token and see that it's a plus peeking ahead to the seven. We know that it here's to the first production rule which tells us we're good to keep parsing and we can add the plus operator as the head of the subtree. Then we reach the seven. We know from the previous step that has to be an expression of some sort. Look ahead tells us that we have a parentheses which completes the expression, sorry, it completes the rule of expression equals parentheses expression. So now we can build our complete tree. If on the other hand there had been no parentheses at the end then the second rule, production rule would have been violated and we would not have been able to complete a valid syntax tree. So building from the top down. Looking at the summary of steps we took to build our syntax tree you might have noticed that we often had to call expression from within an expression call. In other words the process that we went through to parse the sentence was recursive and since we were building the tree from the top down this method of parsing is also called recursive descent. This is probably the most common type of parser that people might try to write by hand but there are a number of problems with recursive descent. For one, the recursive nature of the process makes it relatively inefficient because you might end up checking a token against every single grammar rule that you have before you can parse it or if you're not careful with how you write your grammar rules you'll end up in an infinite loop. For example, if you have a production rule that says an expression equals expression of expression then you hit the first token you go back to expression which produces special op expression which goes back to expression and so forth and so on out of an item. Finally, you sometimes have limitations in the way you can order or write your grammar rules for a language that uses recursive descent parser. In the case of the calculator language like this one depending on the order that you write your grammar rules you'll potentially run into issues with associativity that is like if you say two minus three plus five how do you know, how does the parser know whether to give precedence to subtraction or addition? So another approach to parsing instead builds the parse tree from the bottom up. The key difference here is that this approach makes use of a stack that you can push tokens onto until there are enough tokens on the stack to fulfill a rule at which point they get reduced and popped off. So for that reason this kind of approach to parsing is also called shift reduce. So going back to our slightly hard math example here we start with the first token two we push it into our stack for the moment and based on the grammar rules we know that two is a terminal for a num token. So the stack reduces it to the left hand side symbol for a num. Then we set aside the two as a building block for our eventual tree. So then we shift over and consume the next token which is a time sign. This gets pushed onto the stack and then we look at the grammar. The rule that matches is operator equals multiplication so we reduce it in the stack and move it over. Then we shift again and grab the parentheses. We add it to the stack and since this looks like it could be covered by the rule where expression equals parentheses expression we keep it in the stack for now and just keep shifting. The next token is now three which we push. Again applying the first grammar rule we reduce the three to a number on our stack set it aside again. Shifting over to the plus line we add it to the stack as usual. We look at the grammar and know that this is an op token so a next action is reduce and once again we set it aside. Our next action is to shift. We push the next token onto the stack, apply our production rule which is num7 and expression is num which recognizes the seven token and reduces it to expression and then set it aside. At this point the tokens on our stack have fulfilled a rule that our grammar recognizes namely that expression equals number followed by operator followed by expression. So now the stack takes the three tokens involved in the rule and reduces them to simply an expression which can be shown now on the stack in green. So now our parser knows what to do with those elements involved and can create a subtree from the three, the plus, and the seven in the same way that we saw previously in the top down parser. That's all the reducing that can be done for now so again we shift to consume the last token. Again we push it onto the stack and now again the tokens at the top of the stack have fulfilled another grammar rule which is expression in parentheses. So since those three tokens at the top of the stack fulfill a rule, the stack reduces them into simply an expression and puts on the stack. And so now on the stack we have left number operator expression. But now we're at a state again where the tokens at the top of the stack have met another grammar rule which is expression is number operator expression. This allows the first tokens we set aside to be added to the tree at the proper level above the subtree construct from the previous reduction. So again we can reduce the tokens at the top of the stack into the top level expression on terminal. And so now we've reached the end of our tokens and since we were able to perform a valid reduction we know that the input was valid. It was a valid grammatical sentence in our math language and we can accept it and create the final tree. So those are two types of approaches to parsing. Top down or recursive descent which is again most commonly written by hand whereas the bottom up which you might sometimes hear here called LALR and they're much, much harder to write by hand. So unsurprisingly the more grammar rules you have the harder it is to construct this parser. But fortunately there are tools that make parsers for you. These tools are called Yak, Rack and Bison. They're called parser generators and all they need is a grammar file with all the rules that determine the language that you wanna parse and it'll spit out a parser for you which then you can feed in any input to do the right thing. So those grammar files were like the wacky.y files that you saw at the very beginning of the slide Jack but now you can understand how the grammar rules are written but now that you understand how the grammar rules are written we can see it's not that different from the BNF notation that we've been using. So here you can see that the rule for a non-terminal symbol expression consists of a number token followed by an operator token followed by a number. And when this sequence gets hit by the parser it executes what's in the Ruby block about send the first and second index in your match. So the grammar file also comes with the tokenizer but it's pretty much the same thing that we saw before so I'm just leaving off the slide. So again the grammar rule is defined here as just num and the block is very similar to that trivial parser that we saw from the very first simple math example. So all that's left is to pass your grammar file into Rack or Bison and it should generate a file that can now parse whatever input for the language that you specified. So you don't even need to look at the output of what your parser generate generates but if you did it would look something like this. The numbers in the various tables here are simply correspond to the different actions that the parser needs to take such as shift or reduce or go to such and such rule but for the most part you don't even have to worry about it and you already have a parser. By H's you might ask, when would I actually use a parser? It's a great question because there's a lot of situations which you can use a parser. So for example you could use one if you're validating a string such as a URL or an email address or maybe extracting information from the body of an email or a log file or even converting some kind of formatted document. So for example like markdown to HTML. But now I'm thinking well I've validated strings before and I've just used regular expressions so why can't I just use that? And it's true for some simple string input you might just use a regular expression but has anyone here actually tried to validate a URL using a regular expression? Because if you did you might have ended up with something like this which is terrible. You pretty much never want something like this in your code because it's hard to read, definitely hard to maintain and probably doesn't even cover all the cases that you need it to and the reason for this is because there's a really important distinction in languages, even string languages that to take into consideration and that is that all languages belong to a hierarchy. The established hierarchy for languages was first introduced by Noam Chomsky and it has four types. The first type is unrestricted and this is the category that most natural languages fall into. There are languages, these are languages that don't have regular or consistent grammars and can therefore be ambiguous as we saw with all those headlines and garden pass sentences. Type one is called contact sensitive which we don't really care about for the purposes of this talk. But then we get to type two and three. Type two languages are what are known as context free languages based on context free grammars. Most programming languages are type two but you don't even have to be a language as complicated as Ruby to be considered context free as we'll look at in a minute. And finally type three languages are what are called regular languages and these are the only kinds of languages that can be properly parsed by a regular expression engine. But what does it really mean for a language to be either regular or context free? For the most part it just boils down to your grammar rules. For regular languages all grammar rules can be expressed as a single non-terminal symbol on the left hand side and either a single terminal or nil on the right hand side. This terminal can sometimes have a non-terminal either before it or after it but not both.  On the other hand context free languages have much more flexible grammar rules. While the left hand side is still a single non-terminal the right hand side can be a sequence of terminals and non-terminals in any order. So as it turns out most languages aren't regular. So let's take a really simple example language that you think you could just parse with a regular expression. So this is the AB language which consists of a series of A's followed by a series, the same number of B's. So valid sentences are AB, AA, BB and so forth. Whereas an invalid sentence would be something like AA where you don't have B or vice versa or where they're interspersed or they don't match. So if we were trying to write a grammar for a language like this you might start with something like a non-terminal A becomes the string A and similarly you have the non-terminal B which becomes a string B. So then you can construct a sentence as A followed by B. But that only produces a single sentence AB. So in order to produce anything else you might have something like AB becomes AA, BB and then AA becomes BBB and so forth at infinitum and that doesn't work because then you have an infinite number of grammar rules. So what's the grammar? Thanks to parser generators you don't normally have to do much more than come up with the grammar but sometimes the grammar itself can be a little bit tricky. So this particular problem actually reminds me of a logic problem that I'm sure some of you have heard before.  And some of them they have their foreheads painted red to be eaten right away and some of them have their foreheads painted blue to be eaten later. However, the ogre gives them one chance at saving themselves which is the gnomes are allowed to exit the cave one by one and without communicating or speaking to each other in any way that they have to sort themselves into a contiguous line with the red painted gnomes on one side and the blue painted gnomes on the other. They don't know what's on their foreheads themselves because the cave is pitch black. So does anybody know the answer to this one? I know some of you do. So the answer to this one is that the gnomes as they exit the cave they insert themselves in between the red and blue ones. And if you think about it this is actually how this grammar ends up working. To use BNF notation that means a sentence or a statement S is basically an A or a B with another statement token inserted in between the A and B. And if we specify that the statement token can also be nil then that provides the only terminal that we need that will cover all cases of the deceptively simple seeming AB language. So remembering that a grammar rule for a regular language can't have a sequence of terminals and non-terminals on the right hand side we see that this language already is a context free language. So as we've seen we don't really need that much complexity before you get out of regular expression parsable territory. Because of that you usually are gonna be better off figuring out the grammar rules for the thing you're trying to parse and using a parser instead. This also ensures greater accuracy in what you're trying to parse. So for example there are a number of web servers that use a parser for HTTP requests such as Raggle or Jetty which is used in Mongrel and Java. But even as recently as last week there was actually a vulnerability that was uncovered in Jetty which is again using Java server that prints debug information in the HTTP response which is bad. So the other thing about parsers is that they're often a much faster way of getting what you need done done. So for example in a web framework if you use a parser for your routes then you can build a tree for your routes which makes your lookup much faster than just a linear look through. Extra credit points for whoever can tell me the complexity of that. Of course parsers are hard to write but thanks to parser generators all you need to figure out is the grammar. So there were a ton of resources that I used to prepare for this talk and I couldn't list them on one side but here are two links if you actually want to see an implementation of an actual recursive descent parser. This one happens to be in Python and stuff for shift reducing. And once again I am Singh Wei so many Hs on Twitter on GitHub, Elfers. I am a Rails developer at Karazhan and we're hiring so if you want a job come talk to me. Thank you.


We started three or four days ago in our first soybean patch and they were bumping the 60s and 70s, so that was pretty nice. We are running across a few paths that are touching 100. And our combine's been calibrated, so that's exciting. If they'll stay in the 60 to 70 bushel range, that would be just fine. We've got a lot of money in this crop. Of course, like everybody, the fertilizer prices have been awful. We pumped, July and August was pretty tough. We've watered most every week, electric rates are high. Diesel's ridiculous, 13, 50, $14 beans, $15 beans are a necessity to keep our soybean farmers in business for another year. Where you've had water, we're doing fine. But anything outside of the polypipelines, our soil textures here in this part of Woodruff and Monroe counties, we have a thin topsoil and water is our limiting factor. If you were able to get water across in a timely manner, I think this year's crop would be okay. Compared to the last couple years, we've generally had a rain in July. You know, that fourth of July rain is what people always beg for. We just did not have it this time, just not enough to really count. And I would think where you had water, this crop could be better because we had a lot of heat units, a lot of sunshine and it looks pretty good for now. My son Zachary, he started his first harvest when he was 14 and from that day forward, he's just been here ever since. He's brought me kicking and screaming into the technological side of the yield maps and monitoring and we did some grid samples back earlier before he was around, but he's brought us into the yield mapping and it shows where I have failed in years past with our irrigation, where the water's not getting to the end. The yield map will tell you exactly what you've done wrong. And when I'm at a Farm Bureau meeting or off somewhere, I can pull up my laptop and I can see what he's doing and to see the highs and the lows. And on all our irrigation, we use the computerized hole selection and that's just been a game changer, money saver. Less fuel, less water. Less water in the ditches, it'll give you a 24 hour or a timeframe as to how far and how long your irrigation needs to run. If you're pumping in a ditch or overnight or there's things you can change with that computerized hole selection, it just makes money.


We just wrapped up an integrated fire drill with the MSC personnel and the Navy personnel from Repair 4. We actually conduct these drills every time we pull out a port after we've been in port for quite a bit of time so we can go ahead and be effective in case a scenario happens. Right now we have 12 personnel on the Repair 4 and we conduct training. As you can see with my red cover, I'm also part of the Damage Control Training Team members. We would like to get the actual investigators to be in the Repair Locker ready to go within three minutes and the actual fire party within five minutes all suited up and ready to go. They will report to the Repair Central and they will give them guidance on where to go, what route to take and who to relieve. The most difficult part of our job pretty much is the communication, making sure that we get the right communication to the right personnel so we can effectively fight the fire.