the 40 or T podcast. And for us autistic people, we are extra prone to burnout, because it affects not just our energy and the traits that I mentioned earlier, the sort of feeling exhausted and cynical and everything being just so much harder than it usually is. But it also affects our ability to communicate completely can going non verbal. And it just makes it hard to take care of our basic needs. I think two things that contribute to us being very, very prone to that burnout is masking and sensory issues. Yeah, totally. I'm not sure if I should define masking. I don't know if it's how familiar with people are with it as a term. Yeah, that's the thing is is that's it's not a very defined term is it? I mean, you could say that it's hiding your autistic traits or social camouflaging. The specifics of it tend to vary very greatly from person to person. Definitely. I find in myself that it can either be conscious or subconscious. I often find myself thinking even though I'm very open about being autistic, I will sometimes think, okay, these are new people. Let's not flap our hands. Yes. But then a few minutes later, I can feel the pressure in my chest start to build when the lights are too bright and I can feel my head getting foggy. And at that point, I generally slap myself over the head with a newspaper. Just chill, it's fine. You can move your hands about to stop the stop this feeling of pain from the lights just be open about being autistic. It's fine. Nobody, nobody is going to care at all. And generally they never do. But masking can also be not just subconscious, but also conscious, not just masking can be not just conscious, but also very subconscious, where if you spent your entire life trying to fit in and appear normal and copying people's behaviors, then it's going to take a lot of effort. And all masking just takes so much energy. Yeah. I talked to the creator Paul Michele from autism from the inside when we're talking about sort of the differences between the ways that the autistic people sort of go about things like socializing and small things. And I really empathize with it a lot because when I was younger, I used to be extremely confused about how neurotypicals would just kind of go about and do things without like contemplating and thinking over and having a reason to do it. And it makes makes sense because we do have two modes of being one is that kind of unconscious like going with your gut kind of emotionally based decisions and behaviors. And then you also have the the more higher cognitive aspects of analyzing and like, you know, something something that's really sort of key to be being a human. And a lot of autistic people, we don't use that sort of lower emotional brain to do things. And so we end up expending a lot of energy for things that other people might not spend hardly anything. Like good example is, you know, you decided to go out for a run today and you're going to start running every day for a week.  And I feel that that transfers a lot into social situations as well. Like if you're thinking about social situations and masking to such a large extent, it's obviously going to cause you to be a lot more taxed and tie in the aspects of having like a lower social battery. It just sets you up for getting completely overwhelmed by very short situations. Do you do social scripts? I don't because my waking memory in social situations is not very good. No, that's interesting because recently as my working memory has been improving with time, I'm not depressed anymore. It doesn't wonders for you. That helps. I've been using it more because but in a sort of, they help me make fewer decisions in life in my daily social communication. At work, I've got these little notepads on my screen, different colors for different topics and they just filled with blank sentences to fill in. So some sentences like, thank you for reaching out. I currently cannot do this because blah blah and then there's like a pick list for me. It just helps automate all of that. And I feel like they're social scripts but they just help reduce the amount of energy I've got. I can definitely see myself using that kind of thing, especially through emails and social media. I've only just realized that you can have saved replies on Instagram. You can just send a reply that it'll pick up if someone's asking you a similar question to what the other person asked and you can save that and then the next time that question like that comes up, you can just click the button. I haven't started using it yet but I'm excited to building it up a little bit more. All this automation makes so much sense, right? But then if a neurotypical person comes along and sees all my notes, they're just, why is it like a psychopath also? They just think, hey, how do you manage to use all this? Isn't that a lot more effort? But for me, it's actually less effort to have that all prepared. What you were talking about there, the fancy biological word for that is habituation. That's the word from animal behavior science, ethology, that describes how animals, we're animals as well, get used to stimuli in their surroundings. So every time a plane goes by, generally animals will look up and see what the plane is, see what the noise is, where the noise is coming from and eventually they'll just learn to tune it out. Whereas us autistic people, we don't have that habituation effect. We don't know how to do that. We will always be looking at what the sound is, my fridge, my mortal enemy in the room behind me. I can always hear it. It's unplugged today. I'll put it back on later when I'm upstairs but we just don't have that habituation. Which brings me nicely onto sensory issues. The other thing which I feel cause is autistic burnout because we don't have that habituation, we can't ignore sensory issues. If you're forcing yourself to withstand painful environments purely because you think everyone else can do this, then that's going to have a massive negative effect. Schools, workplaces, just going on public transport, all of that is really, really hard. And I think there's something that I was talking to Natasha from I want to tell you books. She does neurodivergent affirming parenting. We were talking about how weird it is that teachers and parents think that it's a bad thing to offer autistic children sensory supports because they have to expose them to it. They're not going to have that in the real life. They're not going to be able to use the headphones and the shades and things like that. And I'm like, really? Because I use them all the time. It doesn't impact my day from using those sensory supports. No. I was very worried about starting to wear noise counsellors and some others in public because for some reason, and I've had it for my whole life, I attract the odd people on public transport. I generally go out and sit and do some drawings of some interesting landscapes or any interesting buildings and people come up and chat to me. I don't know why, it's just my vibe. And I was kind of worried that I'd lose that because it's a really wonderful way to bring a little bit of joy into my world and meet people who I'd never wear to usually. So I was concerned about it, but actually nobody cares. Especially those people who come up just for a chat whilst you're drawing. They don't mind you wearing sunglasses and noise counsellors at all. And at work nobody notices. In the workplace, you've got the equality act you're allowed to wear whatever you need to help. And so it's just, that's just odd to me, especially because it is backed by scientific evidence, habituation. We literally cannot learn to deal with the stimuli. Yeah. Hey, YouTube. Hope you have enjoyed this podcast clip so far. If you want to check out the full episode, you can find it here on my YouTube channel under the podcast section. Or you can go to Spotify, Apple, Google to check it out on different podcasting streaming services. If you have enjoyed this video this far, please make sure to like, perhaps drop me a subscribe if you want to see some more content from me, and drop a comment down below, even if it's something simple like an emoji or a heart. It really does help satisfy those big YouTube algorithm gods in the sky. Anyway, I'll let you get back to it. It is insane. I think I'm very much happy with the noise-canceling aspect of things. I think the only reason why I don't wear shades is because, I don't know, I feel like people can very easily paint a picture of me if I'm, you know, I'm a tall man and I have a beard at that point and I'm wearing sunglasses. It's kind of like a bit of a stereotype for like, there's alpha male, red pill people. I just can't get around it because, you know, I'm always self-conscious about wearing them. Especially because you're autistic and then if they make that assumption and you start having a shutdown and a meltdown, or start losing your ability to communicate or you need help from them because it's an invisible disability, you might need that extra support in a public area and they've got a bit of prejudice against you that would go against you. And so I completely understand why you made that choice. That's exactly why. It's kind of one of the, you know, among the large list of positive things. You know, it is definitely a negative to me going to the gym so often as well because it's almost like people are less likely to think that I'm capable of struggling and having negative experiences. Whether it's men or women, it just tends to be the case that, you know, if I dress my very goffy as my very goffy self and, you know, I look like I go to the gym, it's like I come up and say that I'm struggling. It's almost like people just kind of double take and they don't really go into like caring mode. It doesn't happen a lot but when it does, it's a bit hard. I feel that. Well, I think there's, you know, perhaps another aspect to autistic burnout that I wanted to touch on and I can't remember it right at this moment because it's gone as it does. I think another aspect of autistic burnout that might be quite important, I think, is stuff around sleep as well because, you know, reading some of like the research behind like, I think the circadian rhythms and like melatonin and stuff, it does seem that, you know, from statistics and from talking to people that a lot of autistic people struggle with their sleeping aspect of things. Struggling to get off to sleep, not having very high quality sleep, not being able to wake up as easily and sort of get straight into life. And I know that sometimes if that happens and you kind of, you have a plan for the day and you kind of wake up late, it's kind of like you're always running behind and you kind of stressed out and then it gets to the evening and you've got stuff from the previous day that you need to do the next day. I know that's something that can be quite a vicious cycle. And I think as well, you know, a large part of us performing well, being well, is aspects to do with diet and hydration, which is something that, again, I feel like a lot of autistic people struggle with keeping on top due to things like inter-reception. Like, it's such a massive, massive part of like your blood sugar levels and how that impacts your well-being. I think it's quite a big contributor to that. You know, if you're very stressed and you're very hyper-focused throughout the day, you might forget to drink as much water as you should do.  Same with food. I think it's, I suppose these are more kind of indirect sort of additive things to the experience. I found it really, I found it was really helpful with anything to do with stuff to do with your mood and stuff to do with your like productivity and overall well-being. Understanding things from like a neurochemical or hormonal sort of set point is really important. I did a podcast, not a podcast, I did a post about trigger stacking in dogs and how that, I feel like it can help explain a lot of the experiences that autistic people have when we have meltdowns and shutdowns and things like that. It's kind of going off the principle that it's the same in humans. Cortisol is released when you experience like a stressor. But the cortisol, it doesn't just like rise up and then die down really quickly. It can, I think the half-life of it is like, an hour, two hours, something like that. So it sticks around for quite a while after the events.  And so you chuck the bag to the side and you get overwhelmed and you have a difficult time with that. Whereas usually you would just be like, okay, my bags, my keys are going to be in there somewhere. I'm going to check that. And so I think that that really has helped me to be more aware of sort of the small daily things that would cause me stress and how that would impact whether I need to relax or whether I can work and search in sort of the evening. It's very interesting that you've mentioned cortisol there. And previously, a few sentences ago, you mentioned how difficult it is to get going in the morning. So exactly as you were saying, exactly as you were saying that cortisol for us is spiked by when we've experienced something stressful. And like we were discussing before with the habituation, we struggle with not becoming calm with we just can't ignore these constant stresses, whereas neurotypicals can the fridge, they just tune it out, a calendar change. They've had it a thousand times before. For us, it's still a stressful thing every single time. And so our cortisol will be spiked every single time. And stronger than most as well. And then if you combine those factors together, you are, you've got a situation where a person has very high cortisol all the time. And it is going to cause exactly what we're talking about today, burnout. It's mentioned in the book that I recommended, how to calm your mind. If you enjoy the chemical and science understanding of things, it's not neurodivergent specific, but it's still a really well written science book. There he talks about how burnout is you losing the ability to create the stress hormone just because you've had it so high the whole time. You get like, what's the opposite of ever sensitized? Desensitized. You just don't respond to it as much anymore. And in the mornings, cortisol and adrenaline and all of these stress hormones is what gets you up and out of bed. And if we're just not responding to them anymore, you're going to physically struggle getting out of your edge. So it's literally chemically not your fault. Yeah, I think that there is a tendency, I think that I've seen a lot of people to separate out psychology from physical things. Like, I think people forget sometimes that your brain is an actual organ that it does, it is impacted physically by things. You know, I feel trying to, you know, a lot of the ways that I feel like I've been able to understand my mental health conditions and things like burnout a lot more is by actually looking at, you know, what are the physical things that are happening at the moment? Because it kind of keeps you a bit more grounded, you can be like, hmm, cortisol is very high. Got a little bit of adrenaline coming through because there's a deadline coming. Right. How do I deal with this rather than, you know, sort of staying very in the moment and obsessed and like, hurrying and like playing into the adrenaline and the cortisol and it's just not very, very good. I think it kind of goes back to the reason why we have these systems because it's originally used, as you said, for wake sleep, sometimes a bit to do with appetite, sometimes to do with avoiding dangerous things and having like the energy to do things.  It's not like you're going about your day chilling and then the line pops up and you have to run away from it. It's, oh, there's this deadline and there's that thing and then I've got this thing that I have to reorganize for that thing and there's these things and there's some papers that have come through and they need to read those letters and then, oh my god, the fridge is broken. It's making a horrible buzzing noise. There's so many things that we should do that we could do that we might do and that choice, isn't it? What is it that choice? Paralysis. Choice process, yeah. And there's so many of these things that we should be doing that either we think that ourselves or we have been told that this is important to somebody else. Expectations. Expectations are very high and I don't know if it's just me and my black and white thinking but I am very, very hard to myself for those reasons because if somebody's told me this is important to them, can I help? I put myself into it 100% even if I don't necessarily have the energy and that's not because I don't recognize I don't have the energy. I know I'm tired but I'm really, the dog's barking. Obviously, yes somebody closed the car door. He just runs halfway down the stairs and stares at me. Quarters all is going. Adrenaline spike. There you go, nice. The thing is dog then just goes back upstairs to sleep whereas I just, yeah, that's my car, do you? I don't even know what I'm talking about anyway.


Our next speaker is Sindhu Chengad. She heads the open source business for Microsoft's APEC region and has been with Microsoft for four years. She's responsible for defining Microsoft's open source strategy and for growing cloud business in the APEC region through key partnerships. Has a B2B background across process consulting, marketing, and strategy in the cloud, and to many other words, spreading much of the world. She's going to speak to us at greater length than we heard this morning about Microsoft's commitment to open source. Please go ahead. Hello, everybody. Good afternoon. I'm super excited to be here this afternoon with you. Now, before I go into Microsoft and our commitment to openness and collaboration, I quickly want to show off hands on how many of you have doubts about this. Okay. Great. So I actually think my work might not be that hard or that hard to cut out this afternoon. I didn't see that many, but great to see that. So let me share some more about what we've been doing the last couple of years. Okay. I have a quick pop quiz before we start. Okay. I do have a couple of t-shirts to give away. So let's see who's been catching up on Microsoft or what's been happening latest in the open source world. So which popular Windows app did Microsoft open source last week? Okay. That was too many. You should have put your hands up. Now I don't know who answered. Can I have one person say that out loud, please? Okay. Great. So I'll get you a t-shirt there. Can we pass that on, please? All right. One more. By the way, the calculator has been part of Windows since version 1.0 since 1985. So we just decided that we want to open source the application. The second, what percentage of virtual machines on Azure are Linux today? Okay. I have, so let me ask him. 80. Okay. Anyone else? I had one here. How much? 80%. Okay. Any other? Okay. So I think we have the closest one here. That's 60% today. So 80 is where we'd like to get to, but we are about 60% today. There we go. And the last one. How many patterns did Microsoft bring to OIN in October 2019, 2018? Okay. There we go. So let's pass this on, please. So as you can see, Microsoft's been taking steps towards getting more open and making sure that the Linux community is getting all the support it needs. We have been working very closely with the open source community in general, and the 60,000 patterns that we made available to OIN was to ensure that the Linux community does not have any more patent infringes or cases that they have to spend additional effort on. So let's move on. These are a couple more interesting facts. So we just covered these. So given the direction that our new CEO, Satya, has been taking, in the last few years, since he came in, he has been saying that we need to work a lot better with the developer community. That's been very core to Microsoft since its inception, and especially the open source community. So his belief is actually that judges by the actions we've taken in the recent past, our actions today, and what we will take in future. And if you've been keeping up, as I just showed you, a couple of them, lots, lots of action happening. So for me, in fact, as the open source lead, it's been super exciting, because it's hard for me to catch up what's happening internally. Now, this is, let's go back, sorry. So since 2014 is where we've seen a lot more momentum happening, which started with Satya embracing very openly that we do love Linux and the open source ecosystem is important for us. He did, so the .NET Foundation was created then. .NET Core, as you probably know, and the 2015 VS Code was released. I think that was one significant milestone that happened in 2015. Today, as of last year, that's in 2018, VS Code was announced. I think it was by the Stack Overflow Developer Survey that happened last year, and it was unanimously selected as the most popular editor. So I think it's done, it's gone leaps and bounds since then. HG inside, so I don't want to go through every single one of them, but the more important ones were when we joined the Linux Foundation in 2016, when we announced SQL on Linux, I think that was never expected. For years, we said that SQL is going to run only for the Windows ecosystem and nobody else. And when we eventually launched SQL on Linux, I think a lot of things changed. We've actually seen the biggest uptake for SQL and the growth for SQL since we went supportive of Linux. So I think that that's definitely the way we see, and in SQL 2019, there'll actually be a lot more features that would be Linux and open source friendly that are going to be shared very soon. So 2017, the Azure Kubernetes service was launched. So this is making, so the co-founder of Kubernetes, Brendan Burns, joined Microsoft as one of the engineers. And he's helped improve the Kubernetes experience on Azure, which means, from a developer's perspective, it's just going to be a lot more easier for you to use Kubernetes on Azure. And what else here? We joined the Cloud Native Computing, the Cloud Foundry Foundations, the database for Postgres, MySQL. So these are managed services for Postgres and MySQL community versions. So which means you get the benefit of what you've been using already. But with Cloud, so you get high availability, as well as the scale, and the ability to scale out whenever you need. So it just means you have that added advantage to the Cloud. And we had Databricks, Azure Databricks was announced last year. And then the biggest one, I think, which was last year, the biggest shocker was the GitHub acquisition. We did finish that last year. And I think initially I was at another event. And the first question I got asked was, oh my God, GitHub got acquired, what are you going to do with it? I even read about a lot of people saying, I'm going to switch to GWTLAB tomorrow. And all of that happening. But I think eventually we just let people wait it out and see how it goes. I think today the change has just been that, yeah, we're still going to stay the same, GitHub doesn't change. In fact, you do have private repos available for users right now. So that's probably one of the bigger changes that's happened. I think the last one, which I don't have up there, 2019, that happened in January this year was the Citus acquisition. So we acquired a company called Citus, so that our Postgres managed service performance could be a lot better. Microsoft does believe, one of the core, what he said believes is that we need to make sure that the experience is good. And if one of the feedbacks we got was the performance hasn't been that great, the next steps by engineering was that, okay, let's see how we can improve that. So this acquisition was one step in that direction to see how we could improve our performance of Postgres. I'm not allowed. Let me move on. So it's a good segue to my next slide, which talks about how we think about open source internally, and I just want to share that with you. So when we look at open source for us, it's about innovate, contribute and enable. What we mean by that is, I will go into some details about this. But it just means that we not only want to be part of the community to give, but we also want to be contributing. We did, I think before the GitHub acquisition, the largest contributor, in terms of code, number of lines of code was Microsoft. So I think it's just been a logical move in that direction that we want to keep contributing, but also make sure that we have people using our open source software as well, and that that's a continuous cycle. So let me go into the next slide, I'll go into why innovate. So I think the one biggest thing I want to call out here is VS Code. When it was outsourced in 2015, I think there was people still associated with Visual Studio and said, okay, I'm not touching it by a crowbar. But I think we didn't have to, right now, just going by last year, Stack Overflow, developer results. It's quite obvious that people have been picking it up from the open source community and the popularity has been growing. Just because it is super easy to use. And Sudhir here, my colleague, will be giving us a little demo in a few minutes. And you can see how VS Code works with Python, specifically. So I think among the other things, we've also contributed to other open source languages like R-TypeScript, PowerShell, originally from Microsoft, but these are open source today. And if you look at some of the other things like it's leading to Linux Innovator, we have been contributing a lot to the Linux kernel as well since we joined the Linux Foundation, so on. So that's on the innovation piece. So again, contributing. We did contribute a lot of lines of code to GitHub. We see that as something that needs to keep going on. Which means we not only take the best from the open source world, and we see that as important for our own software, but continuously contributing and giving back. And hence, being platinum members of foundations like the Linux Foundation or the CNCF, and lots of communities, again, which have been built up. So that's from a contribute perspective. Let's move on to the last one, which is Enable. And so when I spoke a few minutes ago about services like MySQL or Postgres, the whole idea is to give developers the freedom to choose what they want. So it doesn't matter what operating system you're using or what device you're using, it could be a Mac or it could be Windows device. But give you the choice, give you the freedom to decide what you want to use. And use it the way you'd like it. So we've been trying to make sure that we not only have our first party services, but also enabling a lot of the third party and the open source services today that are available on Azure. So that the experience is seamless. So MySQL or Postgres is one of them. It's one such example, Databricks and other Kubernetes. And then we did recently also announce that OpenShift, Red Hat's OpenShift, will be a pass offering on Azure. So you will see that coming very soon. It was announced last year and you'll see OpenShift on Azure as a managed service as well. And let's see if there's anything else. So I think I've covered that. We'll go on to the next one. This is just a quick snapshot of all of the technologies that are supported. This is not the end of it, but this is just a quick summary of the most popular technologies that are supported on Azure. But it's a lot beyond what this is. And I want to reiterate that when we say we talk about Azure, we talk about Azure as a cloud for all, for everybody. And to bring whatever you are currently using, whatever, like I said, technologies or platforms you already invested in and bring that to Azure to get the scalability, the hyper scalability, or the high availability. Everything that, every benefit that you can get by using the cloud and running your applications in the cloud. So that's what we want you to benefit from. So from a productivity standpoint, it just means that we want to make all of the tools, the best tools available, the best services available. As well as the management, make sure that from a productivity standpoint, developers are able to get their applications out there to the market and to their users as soon as possible without wasting time in unnecessary operational stuff. From a hyper perspective, I think it again, it extends to the same thing. That means you get the best of both worlds. So if your applications have been on-prem, and you're trying to move to the cloud, you get the seamless experience of, let's say you don't want to move everything, you want to just move some things, because it's not an easy move. You have data, you have security, you have management. You have a lot of issues to deal with when you move from on-premise to cloud. And the idea is that you may not be able to deal with everything together. But you choose what you want to keep on-prem, what you want to move to cloud, and you get the best of that seamless experience. Intelligent, because there are a lot of today, like the services that Azure provides you from a data perspective, or from, let's say, machine learning cognitive abilities. You will have AI embedded into everything. So AI or machine learning embedded into every service that that's being offered. So which makes it a lot intelligent for users to be able to improve their applications. You get a lot more than what you're bargaining for. And then trusted, because I think from our perspective, without customers asking us, it's super important for us to make sure that a privacy or security is very, very top-notch. So we have a lot of ISO certifications, regional or even country-specific certifications, just to make sure that a privacy or security standpoint, that that's not compromised on the cloud. So that's in short on the cloud. Can we just move to the next slide, so we want to wrap this up and give some time for the demo. I've talked about this already. So from a GitHub or an Azure perspective, both of these are just ways for you to have the better experience and that freedom. So it means whether you want to develop or you want to operate and finally deliver your application, it just means use both. You can bring your own tools. We can go to the next one. Next slide. So bring your own tools as well. So either use the services that Azure provides you or bring your own tools, whatever you've been using, and you'll still have that seamless experience. That's the way it's intended to be. So now let's move on to the demo. And these are some quick numbers, but I want to go to the demo right away. All right. Cool. Good afternoon, everyone. My name is Adil. So what I'm going to talk about is how we can use one framework or one platform or one tool, you know, to write a course, which we love. Some of you may be a Python developer or maybe you love Node.js or maybe, you know, some of you, I'm assuming that, you know, love.NET as well. So how we can have a one tool which we can actually leverage to write, you know, our lovable code, which we do. So let me just go ahead and put my screen. Okay. So why we use Studio Code? The first one is you can actually have Studio Code installed on your Windows box. You can have it on your iOS box. Or if you have a Linux box, you can actually go and install it. So it's a cross-platform tool which is available, which is easier for you if you move from one platform, you know, one open system to another. You can still use this tool. The second good thing about the Visual Studio Code is it's lightweight. It starts really quick. And for example, if I just say, go ahead and use Visual Studio Code. And I'm going to run it as administrator. And it's going to ask for permission. That's fine. And boom. Right? Because what happens is, you know, it doesn't have, the capability that it has is all with the extension that it provides. And that's the other capabilities of Visual Studio Code. So what you can do is you can actually go ahead and add various extensions that you are working on. For example, on my screen on the left-hand side, you can see I have extension for the communities. What happens is, as soon as I install this extension on my Visual Studio Code, and once I configure, it basically shows all my clusters. I can actually go ahead and manage my cluster from here. Or maybe if I want to run my kubectl command, I can actually go ahead and do it from here itself. Right? One of the services that we have on the Azure is your machine learning services. So that's also having extension. So what I can do with this extension is I can actually go ahead and manage my machine learning services experiment. And I can actually go ahead and, you know, do some coding against it. Docker. All my Docker images, my containers, my registries from here itself. All right? Now, what all extensions that are available, they are on the left-hand side. You can search for the extension. Whatever you prefer, you can actually go ahead and search for it. If not, you can go for this site, which basically shows all the extensions that are available for Visual Studio Code. Go ahead and search, install it, and you're good to go. Right? I'll be good. Cool. So now what I'm going to do is, for .NET, I love Python most. Right? And I think most of you agree because it's very simple. So what I'm going to do is, I basically got a Python script. So what this Python script does is, it's basically behind the scenes, I'm using a multi-model database in Azure Postmode DB. And what I'm doing is, I'm basically connecting from here to create some databases, some collections, and I'm storing my most simple JSON type documents into my Cosmos DB account. Right? And all the development, debugging, everything I'm going to do for Visual Studio Code itself. So I've already have my code ready on the center of the screen, just to save some time. And you can see I'm leveraging all the libraries, providing the configuration, initiating a client, and creating a database, creating a container, and then creating a JSON document, and then once I insert those documents, I'm querying back those documents. Right? So this is the code. So what I'm going to do is, as you can see on line number two, I'm going to take code. I have some orange or red lines which you can see over here. Right? Now what I'm going to do is, I can actually, I'm actually going to debug the code in the Visual Studio Code itself. Right? Which is this capability provided by most of the advanced editors. Right? Now that's available in the Visual Studio Code itself. So for example, if I just go ahead and say, one thing is, before I go ahead and run that, I'll take the code, say, P, and it's going to tell me which interpreter you want to select. So as you can see, in my Anaconda, I have two environment setup. So just so you guys can trust me, you guys can use that to environment, Fonda environment. My hand speaks more so. Okay, alright. So, I have two environments over here, and what I'm going to do is, when I'm going to select, control C, I'm good without mic, right? Okay. Okay. So, control shift P, and I'll select my interpreter, and I'm going to say, I'm going to select my base, Fonda. Once I'm done with that, I can right click and say, go ahead and run this file in the Python interactive windows. Okay. As soon as I did that, it basically went on a run, and it gives me the output on the right-hand side. And I'm going to do that. But more interesting is, as a developer, when I write this code, I want to debug it, right? I want to see which values those variables are holding, how my call traces are happening, and if I want to, you know, figure out something at a runtime, I should be able to do that, right? So, what I'm going to do is, real quick, and say, let's go ahead and debug. And now you can see, it stopped at the line number two, and on the left-hand side, it basically shows me all the variables, right over here. Okay. And I can just say, step over, step into all the stuff I can do. So, and let's say if I want to add, I want to watch something, some variable, for example, what's there in the config, and I'll get the information. Right? So as a developer, I can actually go ahead and troubleshoot, and figure out what's happening, and let's go ahead and run this. And if I go back, right, so as you can see in the bottom, on the terminal itself, I get the response back, that means all the documents get inserted. So if I go back into my Cosmos DB account, and refresh the page, and you have to trust me that earlier there was no database in the collections. So you just create it now, okay? So I should have all the documents over here, right? So I have both the documents, right? Now, apart from that, if I'm a Node.js lover, what I can do is I can actually still use the same Visual Studio Code editor, and I can run my Node.js code, and once I've done that, I can actually go ahead and run it. So I'm going to say Node, that's the intelligence auto-correct intelligence feature of Visual Studio Code.  So I'll just go ahead and raise that, and let's go ahead and run this guy, and say Node.app.js. Hello from VS Code to the first Asia 2019 attendees. You want to say hi? Yeah, okay, cool. So the last thing is, I do have, so if you have your Jupyter Notebooks, you can actually go ahead and run it over here as well. Simple code. What I can do is, I can say, again, I'll select my Python interpreter, and I can say right click, run this in a Python interactive window, because Jupyter is already started, as you can see on the right side, I'll get the output then and there itself. Right? So entire experience, whatever you want to do, whatever you want to develop. I think we are on time. Cool? Maybe we can take up one or two questions if time permits. Thank you. Cool. So I could take one question while we hook up the next speaker. That there's really one statement that it could make for that, and that's to open source windows. So the question is, so here's the thing, it's like clearly the elephant in the room, right? So what is Microsoft's thinking around this? I mean, you guys could have commercial distributions. I mean, it seems to me that, you wouldn't instantly lose your customer base overnight, so I'm just curious what that conversation looks like internally. Microsoft has done the unthinkable in a couple of years. Honestly, so when I joined four years ago, I used to be part of the compete team. So I was like, wait, open source is part of compete? So, and then, you know, it's changed today completely. So what I see internally as well is what's been happening like with SQL and other things. So I wouldn't be surprised if it does. I can't comment on that today because I'm not the person who decides. But I would just say, wait and watch. All right, and I do hope that we've managed to change some of your perceptions, the ones who raised your hands today. But feel free to reach out to any of us if you have any other questions. We'd love to get, you know, we'd love to support you. Thank you, Microsoft. Next speaker.


I started today now that you don't have to see a purple screen. Actually, on the way over here, I made a note on my phone to buy a new adapter when I get back. But I clearly didn't buy it yet.  Really fun. OK, any questions before we start on the homework or projects? Homework 1, project 2? No questions?  Easier. Easier? Well, you don't have any questions, which means that it must be going fine. And I had one person in office hours yesterday. Also means it's going fine, right? Yeah, office hours. Sure. Are you in office hours again after class right after today? No. Whenever it's on my schedule, the TA has office hours today. OK. So yeah, on the website, I think all five days a week we have office hours. If he has Monday, Wednesday, Friday, I have Tuesday, Thursday. So this is why you need to start early, right? Because if you have any problems after Friday, you're going to be on the homework. You're going to be kind of on your own until Saturday. I may, maybe your other students will help you out. Maybe I can help you out. But really, this is why you've got to start these things early so that that way we can answer all questions and help you out and make sure you're successful. Cool. All right, so this is where we left off, right? Oh, I thought I was going to do this wrong. So what? Oh, no. OK, let's try to recap and get us back to where we were. So what do we call these things that I've written here? Or some of the terminology here that we've been using. What is it? Production. Production, yeah, the production rules. Production rules of what? Tokens. Context free. Context free grammar. Yeah, exactly. A grammar, right? Specifically a context free grammar. What does context free mean? Doesn't have context. Yes, very good. How did you come to that conclusion? Genius?  Yes, very good. Yeah, so the idea is the difference between context free and not context free grammars, it has to do with the thing on the left. So the idea is if we, I don't know, if we maybe chose a different rule depending on where S was, if S was here or if S was here, something like that. So this would be where the rule we choose is dependent on the context that S appears in. So depending on the context, we would choose different rules. But talking about context free grammars, we're actually going to have to worry about that. Know that that's what it is. It is kind of weird to talk about something as being free of context without understanding what it means to have context, right? OK, so I want to find out a possible string that this can generate. So what do I do to try to create one of those strings? Pick a rule to start with. Yeah, so I start with E, right? So I start with the starting non-term, the starting non-term, which in this case is E. I choose a rule. So choose a rule between one and two. E times E. E times E, do you say times? It's a lot harder to write a time symbol than it is. That's why I was letting you get it out of the way early. Sweet. No, you just have to write it a single time now. Now what do we do? Now you apply choosing a rule to each of these on the other side. So choose an E, which E? Say, take this E. Let's first E, and let's go with E plus E. Plus times E, something like that. It makes it really bad today. It's because it's cold. I'll play it on that. OK, and let's choose another E. Let's choose the middle E. Let's take that to a number, let's say. We have E plus num times E. And then which one? Let's just make it all numbers. So we'll do it step by step. We'll do E plus num times num. And then we'll do num plus num. OK, simple enough. So what did we just do? What's this process called? Good guess. It's a good app description, I guess, of what's happening. It's Russian or something. Oh, it was the D word, it's something that D. Derivation, yeah, we're deriving, right? We're deriving a string that's in the language described by the context regrammer by starting with the starting non-term rule and simply applying one of these production rules over and over again until we end up with all terminal symbols here in our resulting string. All right, so one of the different types of derivations that we've talked about. Leftmost, rightmost. So is this a leftmost derivation? No, no. We started in the left, and then we went in the middle. This step here? So it's not a leftmost derivation? Is it a rightmost derivation? No, no, it's a derivation. Right, yeah. So this is just an example that a derivation doesn't have to be either leftmost or rightmost. They can be neither, yeah. In programming wonders, just do they choose one or the other, or does it flip flop? Or does it do both? That's a very good question. We're going to come back to that. So derivations, to me, are actually a little bit easier to understand for humans, right? So it's pretty easy to see exactly what things, what rules were chosen at each step. Programming languages, though, want to do the reverse, essentially. A programming language doesn't start with a non-terminal. It doesn't start with a starting non-terminal. The programming language, when we get in our compiler, gets in a sequence of tokens. So it's actually starting here at the string and trying to go backwards, in essence. But we need to know how to do this to understand how can we generate strings. So if I say, if we want to answer the question, hey, is num plus star num, does that exist in the language described by, let's say, that context for grammar g? Does it? No, it's not possible to derive that string applying the rule starting with a starting non-terminal and applying those rules. Yeah, so it definitely doesn't apply. But yeah, hold that thought. We'll come back to that. OK, because the idea is, right? We actually want, what we really want is we want to think about it in terms of parse trees. Because if we go back to what we talked about when we started all this, we said, OK, our lexer gets in bytes, right, bytes. And the lexer, using tokens, which are defined using regular expressions, is able to essentially group those random bytes into tokens. And then that sequence of tokens is fed into the parser, which then is going to create a parse tree from that. That's what we'll look at, a parse tree. Let's change our language a little bit. I'm kind of tired of that example. A goes to a B or a C. And B goes to a little B. All right, was it farming? Or so how do we read that rule? Big A equals A capital B or C. Yeah, so it's essentially two rules, right? So there's two rules there. A can either go to A can produce little A big A or A can produce little C, as little C. OK, so we can quickly do a fast derivation here, right? We can go S goes to, we only have one choice, right? Small A big A. And then we have, we can expand, let's just expand A to C. So we have A, C. And then we're done. That's a string that's in our grammar. OK, let's try to think about, how can we represent this derivation in a different way? How can we represent that in a different form? So let's think about, let's start at S, right? Let's think about a tree. So what are the important properties of a tree? Branches? Parents and children. Parents and children? So you have basically what? Nodes and edges, yeah, nodes and edges. You can't have any cycles that's going to go from the top down, right? You just have a root. So the root of our tree will make sense to think we're starting from the starting on terminal S.  So what would my children of S be? Little A is 1. Yeah, why?  It's going to end the big A. Yeah, so we're just applying this rule. Exactly, we're applying the S. And we say, S can be turned into a little A big A, right? And then we say, so are we done here? Is this a complete tree? Does it represent the string that this S could possibly generate? Why not? Because A can also be AB 4C. Exactly, right? Because we have a leaf. What does a leaf in a tree mean? Falls to the ground. Do you write poetry about it? It's the F. It's a last node. Has no children. Exactly, the node that has no children. But here, well, this A, we said S can be something. So we represent that something as its children. Here, A can be something. So let's do the same example. So let's choose the rule A goes to S. So what would the child of AB be? C, AB. C. Yeah, I said S, but you're correct. S. So can I expand this out? Can I expand this out? So then once I have this tree structure, that represents my derivation here, now what happens if I take all the leaves and concatenate them together in order? I get the string. Yeah, I get the string AC that's in the, that is the string that's generated by this grammar. I do it again. Let's see. So let's draw another tree. So do I have any choice here? No. So how many children is the S node going to have? Two. Little A. And write it like this? No. Why? Because A comes first. Technically, you can as long as you're consistent about it being backwards. I guess. It's like saying, yes, as long as I'm constantly wrong all the time, if you just take the opposite and not whatever I do, then I'm right all the time. Yes, theoretically, yes, you could if we were drawing trees like this. But it doesn't make sense intuitively, because at the end, we want to take all the leaves and go left to right as they appear in the tree and to be able to create that string. Unless you come from a culture that reads right to left. Which we do not. I mean, maybe you do. It's totally cool, obviously. But we, as a culture speaking English right now as the dominant language that I'm teaching you in, we're going to go left to right. That way, there's no question. I don't think you like this. All right, A goes to, so let's choose a different rule here, right? So how many children would I give A to? What's the left child? A. The right child? Big B. Big B. Am I done? Nope. Big B's can be not a term. So then what's the string here? A. Let's look at it with expressions. It's very quickly. And hopefully, this will show some of the benefits of, you know, I'm going to be, I'm just going to call this adopt, I think that's a lot better. And I'm also going to get rid of num because num is too many words, so I'll just do one. All right, we'll start at E. So how many children is E going to have if I choose rule 1? 3. 3? 3? Why 3? You're the tiebreaker. Because the plus is going to be 1? Right. The plus is a terminal in this language, right? It's a symbol in the language. So the left child is going to be an E, right? What's the middle child going to be? The plus. And the right child? Awesome. OK, let's expand this out by applying rule 2. So how many children is this E going to have? All right, do I expand this? Does this have any children? Nope. Why not? Because it's a plus sign. It's a terminal. A terminal. Yes, a terminal, exactly. OK, so think about a tree, right? Does the order that I add children on here make any difference to the final tree? Right, so when I'm done, so when do I know what I'm done first? When you have all leaves or terminals. When all leaves or terminals, yeah. So I know I'm done when all leaves or terminals. So then I can decide, OK, let's create this one. So what's this going to go to? Well, let's stop. So let's say this goes to 1. So how many children is it going to have? 1. 1 with the number 1. All right, let's just do this one and this one. So how many derivations can we do that results in the string here 1 times 1 plus 1? So this we can easily see, right? This is the resulting string. So the string that this represents is 1.1. How many derivations are there of that string? I can say at least two. At least two? Yeah, you could do a leftmost derivation or a rightmost derivation. I think we also showed that you can do it with neither, right? So there's probably at least three, maybe more. Probably a lot more depending on which way you switch. When you get to two E's at each point, you can choose one way to the left or one way to the right. Are there any other ways to write this tree? Our current context for grammar doesn't have a way of representing grouping. Like parentheses, brackets, curly braces. So there's not really an order of operation. Yes. OK, that's definitely true. We're going to hold that. We're going to get to that, I think, today. The key thing I want to point out here is that there are multiple derivations of the string. But there's only a few ways we can do. Like you can do a leftmost derivation and a rightmost derivation. And both of them are going to be the same tree. So if we start with this, we can say, OK, we start with E. Then we apply E plus E. And leftmost, which one am I going to apply? Put the E times E. Put it on the left. Yeah, so it'll be E dot E plus E. Thank you. Then we do leftmost, which would be that one. 1 times E plus E. I'm going to do this again. We'll do leftmost dot 1 plus E. I'm going to do this again.  And we can do the same thing with rightmost. And we'll end up with two different derivations, leftmost and rightmost, but one parse tree from that. Let's look at some more examples. Goes by a little quicker. So this is our example. So we have the expression. We have expression plus in here. I'm just using a different color for the terminal symbols. And we can expand this out, as we've seen, kind of in whatever way, just as long as at every place, just that every leaf in the tree is a terminal symbol. And then we know we're done. We've finished parsing. And obviously, as long as the parent-child relationships respect the rules, that was the other thing. OK, let's look at why we want to use a parse tree. So let's talk about that. Let's get into this idea of precedence. So if I ask you, if I say, OK, this is a mathematical equation. This tree represents the mathematical formula, some kind of mathematical operations. What would you compute? What makes sense to compute? Seven. Walk us through. What's the first thing you do? First character is two. Two? Second character is a multiplication sign. Multiplication sign. Third character is a three. And so I would compute those. OK, two times three, which is? Six. Sorry to put you on the spot. So if you're doing math right there, it's.  That's why I like you guys to do it. OK, so six plus one, what about if I wrote the tree like this? So the first thing, right, is this a parse tree? Yes. Each layer, we're applying one of the rules. All the leaf nodes are terminals, right? Verify, yes, terminal, terminal, terminal, terminal, terminal. Is it the same string? So what's the string of this that both of these trees represent? Two times three plus one. Yeah, the tree looks a lot different, though, right? So if you're going to compute this tree and use this tree to perform the operations, how would you do it? What kind of information is it essentially encoded in this tree? It's three plus one times two instead of two. Which would be eight instead of seven. Why three plus one first? Why are you doing three plus one first? Because that's just how the expressions break down. That follows the order of operation. What about the tree? What about the tree? Yeah, the closest one. I would say the closest one, the closest operator, the top. This one? Yes. So two times three. So look at this, right? We just looked at this sub-tree in isolation. Would you know how to compute that? If I looked at this expression in isolation, this sub-tree, would you know how to calculate that? Two. If you look at this sub-tree in isolation, would you know how to compute that? Two plus one, yeah. So then if I could look at this whole tree, how would you compute that using what we just said? Two plus two times four. Two times the result of three plus one. Yeah. Whereas this one is? The result of six plus one. Exactly. Two times three plus one. And see, it's encoded in the tree structure, right? Farther down here, each sub-tree represents a specific thing. This says, hey, this expression is a three plus of one. And this expression is the expression two times the expression three plus one. So just expanding on this. So in a partial tree, in a proper partial tree, like down the line, would the partial tree automatically adjust it or create itself in a way that it follows order of operations? Yes, we will get into that. There are lots of ways you can do that. That's not cool. Yes, it is. It's very cool. Yeah, the point is, well, actually we're going to see grammars in a second. We're talking about grammars in a bit. So for now, if I give you either of these trees, you can compute. So you can compute whatever expression is no matter how complicated or how far this thing goes down. So this is why the goal of the parser is to take in the string. So the parser doesn't get this. But the rest of the program sure would like a partial tree, because then it can perform some computation. It's structured. It's very clear what things are children of other things. All these issues of order of operations or whatever have already been dealt with so that everything else is simplified. So we can say, OK, if I know how to just evaluate an expression, then I can evaluate this tree of expressions. Because everyone is just, I know how to evaluate a sub-expression. Expression is either a single number or an expression is another expression added to another expression or an expression multiplied by another expression. So the goal of parsing, what we want to do with parsing is our input is this string. So what we know, we know 2 times 3 plus 1. We also know our grammar. Our goal is to create a tree from this input string of tokens. Does that make sense? Parsing, that's all we want to do here. And this is part of the reason why I really like talking about compilers from a software engineering perspective is all these problems are broken down in the distinct components that each do one thing. So the lexer just gets tokens from the bytes. But it's cool because it uses regular expressions and it uses all the regular expression and language theory stuff here. And here, when we're doing parsing, we take the input as a series of tokens and then we're going to create this tree out of them using the context-free grammar and all those types of things. So yeah, our goal, we want to get to that parse tree. And so parsing is essentially determining either the derivation, but really derivations are for us to think about trying to understand how these grammars work. Really, our end goal is we want a parse tree because as we've seen, we can compute something on it. We can compute. There's two major parsing problems. So one is the thing we've just seen. If the grammar that we just defined, if we have two times plus one, there's two possible parse trees that can be generated from that. Equally valid based on our context-free grammar. What else do we care about a lot of times with programs or parts of, this is something, your compiler, your interpreter, is something you use every single day. Every time you compile or if it's an interpreter, every time you interpret and execute your program, it's running and going through all these steps. So you want it to be super slow? Would you be super stoked if it took like a day to compile your code? Would you ever finish your projects? No. Or you'd learn how to be a much better programmer, I guess, or maybe you'd move into hardware because it talks to hardware people and that's what they say is the big problem, that you design this whole thing, you get to it and you're like, oh, it doesn't work. I'm gonna go back and change things. So we want it to be efficient. So these are the two problems and the two questions we're gonna ask ourselves to drive why does it work like this? How does it work like this? What kind of things can we pull from the grammar? Can we do some kind of cheats? Do we wanna accept every context-free grammar and be able to parse it? Are there some way we can window that down so that we're only thinking about efficient grammars, grammars that we're able to efficiently parse? Okay, so we looked at ambiguity, right? So this is pretty much the exact same example. So here's two derivations, each with different strings. So this is the definition of an ambiguous grammar. So an ambiguous grammar means that there are either two leftmost or two rightmost derivations or two parse trees, all those things are equivalent. So you can take a leftmost derivation, you can turn it into rightmost derivation, you can take either of those and turn them into a parse tree. So just like we looked at, right? Both of these trees represent that string, one plus two times three. When we're thinking about execution, right, and we're thinking about interpreting that tree, what is the tree on the left compute? Which is? It's three, nine. Nine? What about the tree on the right, somebody else? Close it? Seven. Seven? Two times three and then plus one. Two times three, six plus one, seven? Yeah, exactly, right? But because of the way our language is written, both of these parse trees are valid for that string, right? If you only have that string, trying to derive, you could derive either of these parse trees. Okay, so the formal definition, right, is if there exists two different leftmost derivations or two different rightmost derivations or two different parse trees for any string in the grammar. So is English ambiguous? Absolutely. Absolutely? How do you say absolutely? They are there and they are. Okay. So if you think about written English, right, that's, I don't remember the word for it, but it's when words sound the same. It would be ambiguous, verbally or auditorily. You got it right, homophone. Homophone, that's what it is, yeah, sweet. That's good. What about just grammar-wise? I mean, the sentences has some things that it's supposed to contain, subject to verb, but there's all these exceptions that's the problem. Rules and exceptions. Naturally. So is this, is this sentence ambiguous? Yes. Saw a man on a hill with a telescope. Seems pretty straightforward, right? What's this straightforward interpretation? You saw the telescope. Yeah, so like, I'm there. I'm off the hill. I saw a man on a hill with a telescope, with my telescope. I use my telescope to see the man on the hill. The question is, does the man have a telescope or does the hill have a telescope? Why is that a question? Because the helmets are placed. Right, so what are the other interpretations? Let's go through this. I like this exercise, it's a lot of fun. Yeah. I saw the man on a hill with a telescope. So you saw him, you saw him in half. That's the first one you went to. With the telescope. With the telescope. With the telescope. Break it in half to maybe get a little jagged edge so it can help you with your song endeavors. It's not in the sentence. It's not in the sentence. Yes, very true. What else, yeah. Could it be like you're on a hill looking at someone or you're looking at a man on a hill? Yeah, so like you could be on the hill. I saw a man while I was on the hill with the telescope. Right? What else? It's a fun game. Yeah. You could see the man on the hill and he has a telescope. Yeah, right, does that change the definition? Yes. Yeah, it changes the idea you're trying to convey. Just like if I were to tell the computer one plus two times three and it gave back nine instead of seven, that completely changes everything. Telescope. Maybe the hill has a telescope, maybe the hill. Is a telescope somehow or something, right?  Are there anything else? We could go back to the, you know, and you can all do all kinds of combinations, right? You can go back to the actually sawing a person in half. Like you're sawing them in half and the man has a telescope. He's like holding on to it for your life. Or you saw him with the telescope. Right, yeah, or you saw him with the telescope. Yeah, exactly. Or you saw him with the saw on a hill that has a telescope. Yes, also that option as well. Or you saw him with the telescope. Yeah, he has a break in half or something. Don't anybody go out and saw anybody with the telescope, please. I feel like that's not the tool for the job. All right, we're gonna leave the dexter ideas for later. All right, so do we want this in a programming language? No. Why not? Because for that exact reason you never know what you're actually trying to convey to the computer. Right, yeah, this is why natural language processing is so difficult and it's such, we're just now kind of making strides in that direction, but does stupid Siri understand me all the time? No, or Cortana, whatever the thing is, right? Like it frequently misunderstands you or gets, and that's audio, right? But even text parsing, that kind of stuff, right? But, you know, we're not talking about that. We're talking about programming. So why don't you want that in your programming language? What's so special about programming? We do it, right? We're humans. I think society's kind of functioned fairly well with us speaking this ambiguous language. Like unfortunately a computer isn't as versatile as like, you know, we understand what you do. Yeah, so part of what I can do, right, what we can do, right, when I make like a joke about dexter or something, right, I'm using our shared cultural knowledge, and I'm assuming that you'll be able to know what I mean or refer what I mean based on, you know, our context and our common sense and our shared experiences. Yeah, language kind of leaves all that out. It would be, I don't know if you think about communicating with a human as if without any ambiguity, go crazy, right? And it probably would have no jokes. Or maybe it would be funny because you're explaining the jokes. What else, is that the only reason why? Because you don't want the computer deciding, well what does a programmer mean today? You want repeatability and get the same result every time. Yeah, so what if you compiled it today and then tomorrow the computer decides, I actually think they meant something else, so I'll compile it differently. Yeah, right, so think about like the compiler every time it's like, oh, did you mean this or this? You're like, oh, I guess that would be, I don't even know if that's, I don't know if that's worse than it just deciding or let's give me the option to choose. Yeah, it's probably to choose at once. Yeah, so basically, we don't want the compiler to have to try to read our minds, right? I think somebody briefly mentioned that the computer is fundamentally stupid, right?  But it only does exactly what we tell it to do, right? So remember that when you're working on projects and it doesn't work, you're trying to pull out your hair why, right? It's only doing what you told it to do or actually it's more like you and the thousands and thousands of other programmers that went into all layers of the computing stack between you and the CPU, but still, it's mostly you. So let's think about, we'll deal with the ambiguity stuff a little bit later. So we have a string A, B, B, B, B, B. So now in the parser, we have this input string. It's not really a string, it's a sequence of tokens but you can represent a sequence of tokens as a string, right? So I wanna turn this into a parse tree. How do I do that? What are some ways you could think about trying to do that? See if one of the roles, one of the characters you have, there's only one way to get it. So like with that little A at the beginning, we can only get that through S. That's the only way that we're gonna get it. That's what we're gonna say. Yeah. But how do we create that into a tree? What would, what would we do? You know that one of the, yeah, that's not gonna help me a whole lot. It can help, but it's not gonna get you. Right, end goal tree. Yeah. You can start at the leaves if you work your way up. So we can start at the leaves, so what does that mean? So we get here, kind of how would that work? We do things. Get here and say, okay, it's got to be, so yeah, essentially kind of what you're saying is we can start something like this, these as nodes. What's the easy way, right? So on a programming interview, usually when they ask you a question, your first thought should be, what's the stupidest, simplest way to solve this problem? What's the simplest way to answer the question or to create a parse tree from this? What's usually the stupidest, simplest way? Group force. Group force. How would you group force this? It's a tram or possible solution. Yeah. Right, please. Yeah. Load up these rules, start generating and cranking out parse trees until you get a parse tree that matches this and then you found the string, right? Job done, yeah. And oftentimes, you know, in the real world, those solutions really work because you only have 10 things to iterate over. So it doesn't matter that your solution isn't doing it and log in, right? It just matters that you're actually doing something that's correct but does what it needs to do, right? So the first thing, that's what you could do, right? You just, let's, we know how to create parse trees from the grammar, right? We just choose rules and we can iterate over all possible strings. What's the downside there? It's kind of getting something. Computationally expensive. Yeah, computationally expensive. It may never finish. How do you decide that you're actually exploring all of the space? It could be the very last string that you find. And it's clearly, it violates one of our properties we want from our parse tree, right? Fast. Fast, efficient, exactly. So now we're looking at the leaves, right? Can we build the tree from these leaves? How do we do that? Let's do it. Start with the very last V. I want to make that one into a V. You want to make this one into a G? How do you know how to do that, though? Why don't you choose? It's the only way you can get to it. Because of magic. Because of magic. So let's go down magic and erase your magic. So let's look at this A, right? We can look at this A. A can only be gotten from the big S, so it has to go up to a big S. So there's only one way to produce an A here, right? And that's if its parent is an S. If its parent is an S, then what does that mean about its sibling? It has to be an uppercase A. It has to be an uppercase A, exactly. So then what do we know about this little B? So we've started, we've found S, right? So what does that mean about our tree and all the nodes in this tree from S? They're all children of A. They all have to be, so first they all have to be children of S, right? We start from the start, right? Every node in our tree has to be a child of S. And we look here and we say, okay, well, this A, so all the rest of the nodes in this tree must be a child of that A, right? Because there's nothing else here possible in this tree, right? There's no other nodes in this tree that we know about. We know that for this string to actually, for this parse tree to generate a string that starts with A, the first thing has, and the first thing has to be a small A, then everything else has to be Bs. So then what would be maybe the next rule after this? Or how can we connect this big A to the small B? Well, big A can be little B, big B, so there's your first little B, that's the second, especially because A only has one child, one potential, yeah, one potential, that makes perfect for more seconds. Right, yeah, so it has to be, yeah, right? We don't have a choice, there's no or there. Whenever we see an A, it has to be a little B and a big B. So what if this had been, what if this had been an A? Yeah, right? We'd say this doesn't parse. There's no possible way that we could generate a string, a parse tree from this input string. Now, this B, what could be the children of this B? Little B and another big B. Why not, what about this? Can we do that? Yeah, because it's a problem with your B. Bang, we're done, not done here? We just do this? Go home? No, because we still have to extra B. No, because we still have more class. Looks like you can't go home. That's it. That's it. All right, so yeah, so we can choose this one, we can go little B and big B here. And then for this one, which one do I choose? The exact same thing over again? And now what about for this one? Just for little B. Little B, yeah. I don't like that tree either. I don't like that tree either. And I don't want to redraw it, it's the problem. If you think about it, if you pull the S up, you'll get a better tree, everything will kind of fall out a little bit better. Maybe someday one of you can create some software so that as I write this tree, I can like drag them and move them so that way that it knows that it's nodes and it'll know the lengths between them so that I can just drag it and move the tree and it will do that. It should do that at some point, that's cool. I'm fairly certain that already exists somewhere. It's probably a JS library. Ah, but as I write it, that's the thing. I want it to interpret and understand my writing and as I create this tree, then be able to move it and treat it as one object. Yeah, I know people, there's actually some people that do it on whiteboards, which is super cool. Guy Newet, you see Santa Barbara was doing that where you record, like camera record this and then as you're drawing it, you could draw like an NFA or a DFA like an automata and then it would understand that and interpret it and then you could press a play button to start the automata and it would like move throughout it and parse strings and all that kind of stuff. Neither here nor there, but very cool. Okay, so here we kind of started. So in this approach, right, we kind of started from, I wanna make it terrible too, right? So on the tree, where did we start? We started from the bottom, right? Now we're here. Now we're coming up. Okay. Sorry, I had to do that. That's okay. Thank you. Okay, but we have this string. What's the other way we could start if we're not starting from the bottom? On the top, we can start born rich. We know, what's the one thing that we know about a tree? A few things that we know about this tree. We can know how many leaf nodes we have. We know how many leaf nodes we gotta have. Yeah, exactly. We definitely know that based on our string. We also know what? That has to follow those rules. It has to follow those rules and so what does that mean about the root of the tree? It has to be S. It has to be S, right? It has to be our starting non-terminal, right?  Is that something that language can generate? Does context-free grammar can generate? No. No, right? It has to start with S. Exactly, so one way to do it, we could start with S at the top and then we can try to draw down, essentially down the tree to see if we can match our input. So first we can use the fact that we have how many choices for S? One, how many choice, well I guess okay, we have one choice. We have no choice to make, I guess, right? So we have to always be this rule. Whenever we have an S, we have to have a little a and a big a, right? And then what about for this a? How many choices? Just one, right? We can do little b, big b. And we can see we've actually started generating non-terminal, right? So we've got this a, we've got this b. Now we have a choice, right? So now it's rule that we choose and why? The question is why? Not just what, but why? Big b, little b, so we can get all the bs into research, little b, big b. Right, little b, big b, because we know there's more into the strength, right? If this was for some reason the last b here, and we try to look and see, look ahead and say, okay, we're at the end, so it can't be, it can't be big b little, or little b, big b, it has to be little b. So what about this b? So I've parsed up to here. Little b, big b. What's that? And now what about this last rule? Can I do this again, little b, big b? No, just do a little b. No, just do a little b, because you want to end on a terminal. So here we have a nicer tree, right? So the purpose of this is to show that they're in different parsing methods. They all have pros and cons in various strengths. We saw bottom up where we started from the leaves and tried to grow the tree up. Top down parsing is where we start from the starting on terminal, and we're going to try to work our way down, essentially trying to get to the strength, yeah. Is one way more efficient than the other, or is it dependent on what you're trying to do? It's dependent on the language. They each have different approaches based on what types of context-free grammars they will efficiently parse, so they have different rules there. So for this, you know, we're trying to learn this stuff. The ideas here are very similar. So we're going to focus exclusively on top-down parsing. So this is the only thing we're going to talk about. And so, there we'll kill it, and when we come back, we're going to see what techniques we need to develop to actually do this efficiently. And actually it's really cool. We'll be able to develop some algorithms to look at a context-free grammar and make some claims about it, about what symbols it can generate, what, which will help us in our parsing.


I'd like to call the second regular meeting of the shabuigan city common counsel to order for the 2013-2014 year Next with a clerk, please give us the quote of the day Certainly Today we close the door to the past open the door to the future take a deep breath step through and start a new chapter Thank you very much Next we'll go on to roll call Bellinger Born here Carlson here Decker here Donahue here Hammond here Heidemann here Herman Lassard absent Lewandusky here Maduchek here feel here Ben Akron here Vanderweal here Percy excused and Wolfe here 14 present next please stand and join me in the Pledge of Allegiance Of the United States of America and into the Republic for which it stands one nation under God and Indivisible with liberty and justice for all Next item on the agenda is approval of the minutes from our last meeting Thank You mr. Mayor I move to approve the minutes of the previous council meeting second Thank you for that motion in second those minutes are before us. Is there any discussion Alderman venak? okay and Before we vote we have a matter to take care of we have two Alderman who weren't able to make the last meeting And we need to swear in Alderman Jeremy Decker and Alderman David van Akron Jeremy's done Okay Okay, now we're ready to vote on the the motion to approve the minutes from our last meeting All those in favor please signify by saying aye Opposed motion passes Next is the confirmation of the mayor's appointments to the standing committees Alderman Hammond Thank You again mr. Mayor. I moved to confirm the appointments to all standing committees second Thank you for that motion in second any discussion Seeing none all those in favor, please signify by saying aye. Okay. I'm sorry.  Hi Decker. Hi, Donahue. Hi Hammond. Hi Deman. Hi Herman Lewandowski. Hi Maddochek feel Ben Akron. Hi Vanderwill. Hi and Wolfe. Hi 14 Gonna be all night like this Thank You Thank You next we'll move on to the confirmation of the mayor's appointments to special committees boards and commissions Alderman Hammond Thank You mr. Mayor will take special committees first I moved to approve the confirmation of the mayor's appointments to special committees second It's been moved in second to approve the confirmation of the mayor's appointments to special committees roll call Carlson. Hi Decker. Hi Donahue. Hi Hammond. Hi Deman. Hi Herman Herman yes Lewandowski. Hi Maddochek. Hi feel Ben Akron. Hi Vanderwill. Hi Wolfe. Hi John. I'm sorry Bellinger. Hi and Boren. Hi 14 Okay, next we'll move on to the confirmation of the mayor's appointments to boards Alderman Hammond. Thank You mr. Mayor I moved to confirm the mayor's appointments to the various boards and commissions Second. I moved in second to approve the mayor's appointments to special boards and commissions Roll call Decker. Hi Donahue. Hi Hammond. Hi. Hi Deman. Hi Herman Lewandowski. Hi Maddochek. Hi feel. Hi Ben Akron. Hi Vanderwheel. Hi Wolf. Hi Bellinger. Hi Boren Hi And Carlson. Hi 14 Okay, that confirms the items on our agenda and entertain Alderman Boren Thank You mayor I just wanted to make an announcement before we adjourn that The first committee of the whole meeting will be a week from tonight the 29th at 515 And the agenda will be coming out in a day or two. I'm still working with Mary on that Okay, thank you for that announcement Alderman Hammond Before I make the motion to adjourn just want to remind everybody in case you didn't get emails There's a little powwow tonight at the Blue Harbor if you go in the conference room Take a right and go all the way to the back It's back over the by the Lani overlooking the lake so hope everybody can make it and certainly spouses and significant others are Certainly welcome. So with that I'd make a motion to adjourn. Thank you for that motion in second All those in favor of adjourning please signify by saying aye All right, all right, all right. Opposed? Stasses. Thank you much. We stand adjourned.


my little head when preparing it I looked at the title I sent back in May or somewhere it was when we did the call for papers and I said you know you want to talk about Weyland protocols but as well you want to talk about XP and XP so exigitus the protocols which I will talk about they're not exactly something about they're not really Weyland standard right so I went about okay let's send up any mail to the organizers and ask them to change the name of my presentation to the program because not entirely right so I went yeah it should be something like talking to apps on Weyland right like what we're doing like David was saying was let's be talking to the apps that is much more understandable but then on Weyland we're not talking about apps right like there's a lot of things that your compositor is going to be talking about so it's not really apps we talk about we talk about clients right and then we were already on a very weird title that doesn't make any sense to anyone that isn't in my little head like I said before and then I said all right let's like forget about this thought and just keep with the original title it's not 100% precise and don't worry I already introduced myself yesterday my name is still the same and I am the same person more or less so we can move on from that like David was saying we're still transitioning from a slightly similar but not entirely state where we are in X11 many of you still are on X11 normally okay let's let's do a little game that you all love raise your hand if you're normally using Weyland nowadays see it's probably 50% so when you have this feeling that everybody's still using X11 it's not really the case I understand that we are these special ones in charge of actually making this Weyland thing happen but I guess that you cut my drift one of the important things that we need to understand about what we're doing right now is that we're working from a shared code base so on X11 we had this humongous code base that is the Xorg Xorg server or Xorg X server that had or all of the features or was supposed to have all of the features and we had to like implement our software in a subset of those features that were over there so we're moving from that from this implementation plus the protocols to talk to that implementation into just a set of protocols so it was talking about we have all of the applications slash clients talking to the compositor in a specific way and then it's up to the compositor to do the right thing this is important in many ways it's important because we get to standardize what we do but also we get the freedom as a compositor to do the right thing and by the right thing being whatever Queen slash Plasma developers want to do because we know better so what does this mean this means that we're turning what it would have effectively been merged request kind of of conversation I mean it's a much request it's a good implementation details but before you are discussing over C code right or how as a feature is is talking about the graphic graphics card it's talking to the different applications right you have to also get this implementation right for everyone on otherwise you would have messed up and and we've all seen this kind of problems especially those of us who were trying to make things work a little bit more well on the development side like it's not like everything was roses over there and now since we're not talking about an implementation itself but we're talking as compositors we have this conversation about how our applications talking to the compositor and back which is a slightly different conversation right like you have to be thinking in terms of which features you have which features you mean to be supporting which features others want to do right and like this big balling of new protocols that you should be having there for example right now the one about the virtual desktop right like virtual desktop one good thing it's a simple concept but it's also something that since it's virtually it can mean anything to anyone right so if you want to standardize that or this kind of thing you need to do it's well freeing to everyone and everybody can do their own thing but it's well constraining enough so that it has an actual meaning right because if you do a super generic protocol then you're actually not well generalizing anything and I'm not gonna say it's easy in the end is well hackers like us talking to each other which is well often not the nicest picture but it has worked quite alright and I think that we're doing great why didn't it change it changes on my laptop so what I want to talk to you about today is the all the upstream aid I did for two specific protocols or implementations on Wayland I will base myself on the experience of upstreaming the activity activation protocol which David flew by and then on the exit desktop portals I'm gonna focus on the global shortcuts which was merged only last week and it's not even entirely deployed just yet but what it's there so I'm gonna take that win and present it at the academy this is my awkward sketch of how these communication would work right like you were saying before it's not just green with apps we have green with the entity desktop protocols for example they can be talking you can have other demons for example running on on your on your system Quinn can be talking to them as well effectively this this wayland thing is a socket that you listen you send messages and receive them from much like you would do in an HTTP server or something like that right and then you have the apps the apps could be sent about it which I tried to symbolize with a box but they don't have to be and they sometimes are not and something we actually do leverage in in plasma as well is that if you don't sub box something in a specific way you can even give some clients specific privileges like you wouldn't let everyone do screencasting of your system but if if I really really know you then you get to have that privilege this is very very roughly what the well and protocol looks like and this is what people will be discussing over I tried to make something stupid here but so you get an idea of what I'm talking about we're we don't need to understand it you don't to feel like you have to understand it but basically what you would be seeing here is the protocol which would be a number of objects an interface which would be an object and then there's requests which is a method and an event which is a signal and they all can have arguments right like this is the big picture I think that it's maybe understandable enough so that we see what what we're talking about now when do we want a new protocol so that there is not like a black and white kind of thing it is a continuum and also we have a number of different IPC systems on on linux we have debuts we have while we learn we have x11 xcb is etc and we have others right we're gonna want a protocol when we want to leverage these connection that we already have between the compositor and the application I think that is one of the most important things like the compositor already has a connection with an application and if you are talking things that are important in the context of that community of that relationship it does make sense right like for example we can think about if Quinn wants to talk to power devil like the power management system we could be talking about it through Divas which is how we've been doing this kind of things we could have a way a wayland socket over there does it make sense for for us to be implementing it through well and maybe now if the Divas position is there what are we does it make any sense to to use one to one relationship with power devil if any everybody else is also talking to power devil like we're using we're using power devil as a service for those of you you don't know so I would say I think that the best way to see how we're using protocols anyway is to look at the protocols so up there you can see the ones that we're keeping for ourselves because we're selfish people and down there you can see the ones that we're all working on together obviously and as discussed earlier the our own will be always more specific and targeting to a very specific kind of feature probably also things that need more like tight handling and making sure that like there's no information getting leaked whereas the generic ones they're all more complex I must say I showed them and was talking about how simple well and protocols are some of the standard ones are easily like few thousands of lines of XML code talking about signals back and forth it can be complex but you get idea now instead of talking about how to use a protocol I am referring to you to the presentation I did on alias 2020 but if you didn't watch it and have no intention the version would be there is this tool that you pass the XML code into it and produces C++ code that you can call and does the right thing you need to tune it a little bit to make it work with the rest of our things but it's it's fairly simple actually if you look at how we've been doing it in in KD over the last few years we've actually gotten quite better in that we used to meet a big big loads of sorry about that of code to do to do one way on protocol implementation and now with a few tens of lines you can you can do it like I still remember the first times I was talking about this with Martin Grasslin and it kind of felt super well hard so now I'm gonna talk about something very similar because it's the application wanting to have some presence in in the operating system but it's not such like direct conversation between the the application and the compositor we have something in the middle which we call the XDG desktop portal service just to simplify and then so you understand how this works the XDG portal service is it's a diva service and nothing more it's something that you can like call from your command line right now you can create you don't can talk to a number of interfaces that are available over there then you can have applications talk to the XDG desktop portals and the XDG desktop portals will be talking to the back end in the case of plasma which is what we all use then it will be to the KD implementation event which will be talking about Quinn if we're doing graphical things or I don't know screencasting or stuff but it can be talking about other things you could have a portal about I don't know accessing your address book right then that wouldn't make any sense to be talking to Quinn but it's a way for application especially sandbox applications to be to be accessing information that is not available to them for security reasons but our implementation can find ways to figure out whether it made sense more often than not by just asking the user if it makes sense to like offer this information and move on with it so how it is implemented both at an application site and a portal site it's just implementing a diva service I guess you've all used it who has never used divas in the room and is a developer okay so we can have above you and you and you don't leave until you know everything that is to know I'm joking but we can look into it if you find it interesting but otherwise it's it's fairly simple right I was saying it just implementing this divas thing if you're implementing a new XDG desktop portal on like the shared thing that we share between us and no man everything it's you need some glib code that isn't super beautiful but it's still well necessary that communicates well the interface that your application will be talking to with the portal that is well specific to your implementation so this code needs still to be writing which is basically boilerplate code that that you'll find you get to copy and paste very effectively so yes as you can see it's easy is it scary no but maybe a little bit but you don't need to be like put up by that it's something that it's that needs to be doing sometimes and if we I think that if we're in the right mindset and if you see that the use case is there it's something you should be doing something that I found very interesting or very useful for for example working especially on the XDG activation protocol was to just research what people were had been done over there so what happened over there was that there were when we are using Waylon back then we needed this activation protocol right like you sometimes need your clients to be popping up on the user's attentions and what it was something that everybody knew that you had to do everybody was kind of frustrated and there had been tons of conversations over the Internet about how this should be done but nobody had sat down and said okay let's write the protocol the protocol right now it's maybe I don't know 50 lines of these XML code I talked about right it's not nothing complex or or anything like that so it was mostly a matter of seeing what people said I want this this this and this I'm putting it into an interface and say okay now review this it was probably my first or second Waylon protocol I wasn't even that good at it not that I am right now but I think that it was what the community needed to get the conversation started and on and somebody who like pushed through all of these reviews and you should change this letter for from these to that because some people are more nitpicky than others and that's it talking to people is also important and it's also something that we don't do enough and I am talking about for example reaching out to the different communities for example talking to the no maintainer it's it's something we did for example for the activation protocol as well we have the meeting with them and said all right you want this we want that how do we do it you get to talk about other things and it don't need to have a five minute discussion you can talk about whatever other problems you might have and it's always always a good thing and it's also a good opportunity to to get other problems addressed right yeah I see we had once and yeah talk to your your people like it's it's something that can easily happen to us that we're very focused on the problems that we have in ourself and we really want to fix this but having the conversation with others and for example using academy to see I need this protocol I need this this way of doing this thing because it's important for my use cases for whatever I think that it's what it's gonna make the well the standards the better and the easy to the easier to be adopted and and did it and since it's mostly about talking then just remember to be nice to ask to try to empathize with the others before trying to do your thing if you want to do your thing anyway you can create just a plasma protocol right when we're standardizing it's to make something for for everyone and and to do it we need to be like good human beings not that we are not or that I have seen anything that was terrible right but I think that it's always a reminder now if you have any question for me and for David it's probably good moment to do that one thing one thing I realized is that many times the protocols before they are standardized they are so yeah no yeah so before a protocol is made standard usually there's an implementation that only Queen supports and many times there are two competing implementations or even three for example ya quake cannot position itself on the top of the screen on genome but wake can but wake won't work on plasma and ya quake can so there are two protocols the two different protocols for doing that you know no there's even more actually why we are standardizing like layer shell is because you we want to be able to do this kind of thing right so you need you need to have some time to get there but it's also good thing right like if we got one implementation super quickly because it's super important to have ya quake work on one oh then we might get it wrong and for no reason so I think it's a good thing actually well I'm worried that it will fragment the desktop like I mean it certainly has fragmented the community of sliding from the top terminals but if it's for the best of the community I think that we can do it anything updates takes screenshots like many many things broke well I mean it's a good thing like screenshots do you really want every application to be taking screenshots of your application that's what we're running out again away from we don't want every application to be spying on what our users are doing so like it's very on purpose that we don't have these features now if you call that broken it's maybe because you want like more maybe liberal operating system that like lets you do all kinds of shit we're working on this direction and all of the things can be done right is it fragmentation or is it us doing things properly for the first time on the next well no no no no try it the the reason it's not something you can do I cannot you cannot create an application a third party application for plasma today and take a screenshot without either having to like come from the show or having to be popped up and say do you really want this application to be taking pictures of your stuff and this is what we've been working for a question from the online audience are there any legacy wayland decisions that were taken in the early days which were later determined to be mistakes we're living with now I don't think mistakes but but but things that some you would do different now because make some stuff harder like the big point is fractional scaling and how it currently works is that you tell a app render at two times scale and then your compositor will scale it down and it's people sometimes claims it's bad or wrong but it isn't it's like how make us works they do it the same but now we are we are wanting to do proper fractional scaling like like rendering at 1.5 scale and that's a bit complicated because everything before is always in integers and maybe a way of looking this up in a bigger hand side is the execution protocol I think that it's at the 7th version if it's at the 7th version it's because it became the stable one yeah but like the 6th before that somebody probably fucked up or forgot about something and that's that's perfectly fine I mean we're all live any other questions from the audience okay thank you very much Alex and David