Hello and welcome to NewsClick. I am Paranjoy Guha Thakurtha and today's topic of discussion is the politicization of India's armed forces. Once upon a time, we in India used to consider it a matter of pride that our military, our defence services, our armed forces were far less politicized. They were far more insulated from the political leadership, even as they acknowledged the leadership of the civilian political leaders. Why has this come to pass? Why has psychofancy become rampant in the armed forces? And then why are so many senior officers increasingly identifying themselves with the Hindu nationalism of the Bharatiya Janata Party that unashamedly, unabashedly seeks to exploit military achievements for political gain? I'm very happy to welcome Rahul Bedi from Chandigarh. Rahul Bedi has been a senior journalist for over 40 years. He's specialized in writing on military matters and the defence services. Thank you so much, Rahul, for giving me your time. And I was reading the article that you recently wrote for The Wire and what you mentioned is that we are having this huge debate today in the mainstream media as well as the social media about how there has been the nexus between the military and the political leadership that has become stronger and that what, to use your words, guarantees reciprocal benefit. Please elaborate on what you mean. Well, it's a complicated situation because I think we first have to go back in history to 1947 and the experience of Pakistan and for some years in Bangladesh. Let me at the onset state that we are nowhere close to where Pakistan is as far as the military ascendancy is concerned. But what has happened over the last 15 or 20 years and particularly over the last five or six years is that the military and the political class have used each other for mutual profit. The military class has used the politician to climb up the promotion pyramid, which is a very narrow pyramid and is a very greasy pyramid and a very slope up the pyramid. And the politician has used the military to tom-tom national security and not only that, but more dangerously to tailor operational responsibilities of the military to suit political ends. So it's in a sense a symbiotic relationship between the two and both profit from it, but I think the loser in this case is the country. Rahul, you know what you mentioned is that very often what is happening today in the military is justified.  But what you've been particularly critical about is senior military officers lobbying, lobbying with politicians. And you've used very, very strong language, but at one level, you've also put forth the argument that this, if this is true for Indian society as a whole, if corruption is rampant, if this kind of psychofency is rampant, then how can you expect the army, the navy, the air force to be, you know, insulated or divorced from what's happening around all over in our society? Well, you know, this is a double edged argument, which is used at times by the military to say that since the military also comes from Indian society, can it be any different? But the other side of the argument is that the military sets different standards for itself. It believes it is a lot superior. The justice system in the military is swift, discipline is greater, and therefore it's more ethical and it comes from a different sort of background and ethos. Now, you can't really have both those arguments at the same time. Either the military is superior and therefore it should behave better. Or it's part of the same venal corrupt nepotistic civilian setup and behaves that way. But it can't be a combination of both. And the military really tries to fall between two stools because it's hypocritical when it wants. And it takes a high moral ground when it wants. So it really, I would accuse the military of very severe double standards. Rahul, you know, you talk about how the military no longer holds that high moral ground that it used to hold once upon a time. All the way through till the late 80s, military officers were held in high esteem by society. They were upright people. They were respected, as you say, eagerly sought after by parents as suitable matches for their daughters. And even the fancy perks, the colonial era perquisites that they get was kind of said, Okay, we tolerate that because after all, you're fighting for our country. And so what, once in a while, you go for horse riding and shikar and mountaineering and golf, etc, etc, etc. But over the years, and you're really seeing this, there's been a deterioration. That the very politician that once upon a time, the military officers and I'm using, I quote you, Generations of soldiers had vilified politicians for duplicity, ineptitude, and for completely misreading military matters has today emerged as his patron and is being manipulated cynically for political ends. That's very strong language you're using. Would you like to explain and elaborate and maybe even give us a few examples? I think examples are a little difficult because that would entail naming people and I don't really intend to do that because it's firstly libelous and secondly, I think there's no counter-defense on the other side. But actually, there's a historical reason for this because military service was one of the few avenues of advancement in colonial India. And a lot of people in those days did join the military and did extremely well and they carried on the traditions after independence. And life was generally a lot more, I would say, a lot more honest, a lot more decent and there was decency in society and the army in fact represented that. And I think the army conducted itself extremely well in all the wars that it fought in 1947, in 1962, in 65, in 71. And it was held in high regard and it was a political army, I mean even in messes, I remember as a young boy, I had friends whose parents were in the army and politics was never really discussed in the mess. It was sort of a free masonry of soldiery as it were. So, but unfortunately, all that changed over the years because there was profit to be hired, there were promotions to be hired, there was money to be made. And the politicians realized that the soldiers were exploitable and therefore it exploited them. And I think this really reached a crescendo during the Kargil war when the National Democratic Alliance headed by Prime Minister Vajpayee was in office. I mean the Kargil war was unabashedly used by the BJP led government to push its own agenda and to return to power soon after the Kargil war was over because a lot of people tend to forget that during the Kargil war the NDA government was a caretaker government. So, and that trend has continued in the last five or six years under Prime Minister Modi. For example, we had the so-called surgical strikes across the Pakistani border in 2016 and then we had... Just before the Uttar Pradesh elections. Just before the elections stood the BJP in extremely good stead. I mean everybody expected the BJP to lose because it had come soon after demonetization but the BJP won. And in fact, all the posters at that time during the elections featured the military. Subsequently, there was the airstrike in Balakot last year and we all know the outcome of the general elections. Mr. Modi won over 300 seats. So, and as a consequence, a lot of people who were around in those days or who were in senior military positions have also profited in terms of getting jobs after retirement. I think it's hardly a secret that General V.K. Singh is a union minister. I mean, so that's how everybody knows about him. We didn't have... I think one thing we must say about General V.K. Singh, I mean here was a general who went and I think disgraced himself by going to court over a alleged wrongly attributed date of birth. And even if he had prevailed, he would have served for another four or five months. But he brought the office of the army chief down by several pegs by following that route. And then subsequently went into politics and is currently a minister. I think the profile and dignity of the army has been significantly solid over the last 15, 20 years. Rahul, I'm going to come back to you on some of the points that you made. But before that, let me step a little back. You yourself talked about how the Indian army and the armed forces did incredibly well, not just in 47, but in 71. But the 62 was the war with China was terrible. Now, once again, the military brain, the political leadership were long decisions. And you have argued in your article, I was reading that it's about time that we released a report that was presented way back in 1963. The Henderson Brooks Inquiry Report. And you know, I mean, everybody is wondering, why is it that after so many years, we haven't released that report? And you point out there just two copies of that report. I mean, what is it so sensitive about that report that it should be still kept under wraps? Actually, I mean, that's a million dollar question. Nobody really has an answer to it. And a lot of what was in the report, in fact, has been has been published in a book called India's China War by a former foreign correspondent called Neville Maxwell of London Times. But again, it's not authenticated because the report has not been released. I think over the last 30 or 40 years, there have been two or three official commissions, which have examined the feasibility of releasing the Henderson Brooks report. But I have all for some strange reason decided against it. And the reasoning that is that is relevant to these committee reports is that it is operationally sensitive. Now, I really don't know what that means because what happened in 1962 is very little, if any relevance in 2020, which is, you know, almost 60, 70 years ago. So it really is mystifying why the Henderson Brooks report is still not being released. And I would be very, very, I'm sure there would be millions of scholars who would be very interested in reading the Henderson Brooks report. And I'm given to understand that one reason why it's not been released is that it vilifies the politicians and blame the politicians more than it does the soldiery. But that again is speculation. All right.  And this pertains to the timing of moving into what is today Bangladesh, what was then East Pakistan. And he actually told the then Prime Minister Indira Gandhi that no, I don't want to do it now, wait for winter. And that's how this entire the Indian Army and the Indian armed forces moved into Bangladesh. And then Bangladesh came into being only in December 1971. So I suppose what you are suggesting is that the military leadership had the guts to tell the political leadership straight on their face what they felt. And you believe that this kind of independence, this kind of autonomy, this kind of spine is lacking among the present generation of leaders of the armed forces. Is that correct? Absolutely, absolutely. And but I mean, I think to be fair, we must also give credit to the political leadership of the time. We're talking about, you know, 1970, early 71. When Mrs. Gandhi asked Manikshaw to move in and Manikshaw basically told her, he said the monsoons are coming up. And he says, I can't ensure that my troops will be able to survive. And also he said, we don't know about the Chinese. And he told Mrs. Gandhi very firmly. And according to people who were at that meeting and there have been several accounts, people were a little taken aback because Mrs. Gandhi again was a very autocratic leader. But she realized the wisdom of what Manikshaw was saying and she agreed. Unfortunately, that quality of officer is missing now. Most of the people who are in top positions of authority at military headquarters and then the higher command are of, to put it very bluntly, poor caliber, and have got there purely through their obsequious behavior and through, you know, sort of reasonably unfair means. And no dissident is tolerated. No differences of opinion are encouraged. And it's basically a yes man army. And once you have a yes man army, then you're going to have a yes man leadership. And when you have a yes man leadership, it's going to be subservient to the political leadership. So therefore, there's going to be very little difference between the military and the politician. So that's the stage where we are at. Rahul, Admiral Arun Prakash has declared and he said that we all know that age, rank and financial status demand much more difference in India than anywhere in the world. And he's been very critical of what the culture of upseekersness, of servility, of plain simple cham-chagiri in the armed forces. And Admiral Arun Prakash has acknowledged that there were very, very fine officers who did not get promoted. Why? Because they did not want to conform. And they put forth their views in a forthright manner, in a blunt manner. And he actually goes on to say that the evil of psychophancy will undermine the roots of India's military unless, and you say he states wishfully, that the senior leadership curbs it ruthlessly. Your views? I think Admiral Prakash, who I know well and respect, is whistling up a gum tree. I don't think, and I think the fantasy that he's perpetuating is not going to happen. And the only certainty is that it's going to get worse because the human resource that is going into politics as well as the military is of a very poor quality. There is very little uprightness left and the only thing that matters is excess and money. So I don't think the dissidents or any kind of good quality officers are going to make it beyond the rank of colonel or maximum brigadier in the army. And the equivalent in, of course, the Navy and the Air Force. So, you know, you have made another point in your article and you said that there was a bargain and there was a creation of the post of the chief of defense staff, the CDS. But you say the military remains utterly clueless about the tasks, the responsibilities of the chief of defense staff. Would you like to elaborate and add to what you have written? You know, the military has been saying that there's a one point formula or magic bullet that they have, which is called the CDS. And if the CDS comes in, everything is going to work very efficiently. And they've been demanding it for the last, in fact, 25, 30 years. A lot of the political leadership has been very wary of creating post of chief of defense staff because they look at Pakistan and of course they look at Bangladesh and they look at other countries in this region. But anyway, the recommendations of the Cargill Review Committee in 2001-2002 were responsible for the creation, for wanting the creation of a CDS who eventually came about. And General Rawat, who was the army chief, became the first, India's first chief of defense staff. But despite having lobbied for it, despite having agitated for it for the last 20 years. The military has spent no time in trying to figure out a priority or an agenda or a program or a timetable for the chief of defense staff. And even the notification that came out early this year in January, appointing General Rawat as the chief of defense staff. Sorry, it came out in December of last year because he took over on the, I think in the first of January. Doesn't really outline what his responsibilities are likely to be. So again, it's just yet another sort of jobs for the boys. And operationally, the CDS is not responsible for the Army Navy or Air Force. But it seems that General Rawat having been army chief is exercising some amount of operational responsibility in the army, overriding the current army chief. So, you know, there is a problem, there is a clash. So it's a bit difficult and it's a bit tenuous as to how this is likely to be worked out. And I think the next few years and particularly the next few months, given the crisis we're facing on the Ladakh border with China, it works itself out. You know, I'm glad you mentioned Ladakh. I mean, that's been occupying everybody's mind. And people are complaining that we don't know, we don't have enough information. The line of action control was always never clearly demarcated. We know there have been 20 casualties on our side, including commanding officer Babu. We don't know what has happened on their side. There are all kinds of claims and counterclaims including the claim that the Chinese have encroached into territory which we thought belonged to us. But I come back to the point with which I started. The politicization of India's armed forces, the politicization of India's military. You write that there's been a Faustian bargain between the soldier and the politician. And increasingly, the top military personnel are identifying themselves with this jingoistic, ultra nationalist, this Hindutva line that seeks to achieve, you know, seeks to exploit whatever military achievements that have taken place for political gain. Now, we've talked about what happened, the surgical strike and then the outcome of the assembly elections. In Uttar Pradesh, we've talked about Balakot, Pulwama, February 2009 and the looks of our elections. But sometimes these things take you by surprise. I mean, see what happened in Ladakh. Prime Minister Narendra Modi said, made a statement and then later when people asked him about it, you know, that statement. I mean, there were all kinds of clarifications issued. So I'm saying post Ladakh, do you think Mr. Narendra Modi's government will continue to be successful in using the armed forces? And I dare say with the complicity of some of the top individuals in the armed forces and to reap more political gains in the near future. Most definitely, most definitely. I think if you for this, again, in this, there's no straight answer, but I think we, if you go back to the Kargil war, after the Kargil war ended, Prime Minister Vajpayee to his credit ordered an inquiry into the Kargil war within three days of the Kargil war coming to an end. We know, know fairly, fairly firmly that the Chinese Chinese intrusion into Indian territory was also due to an intelligence failure. The army was army was deployed there. So the army is in a sense culpable. But I think the army and the politician are working in tandem with each other to sustain a sort of a workable solution, which I think they will present to us. And therefore this partnership between the army and the politician, not the army so much as the military and the politician will proliferate and will continue and will grow. And I think it's a very, very dangerous thing because the army has to stand up to the politician at some point. And I think the politician also has to, has to make the army a lot more accountable than it has. So I think there are a lot of ifs and buts. And like Admiral Prakash says, the higher political leadership will have to take action. But unfortunately I don't think the higher political leadership in this case is either going to take action or is capable of taking action or even which is even more disturbing wants to take any action. Well thank you so much Rahul Bedi for sharing your views candidly and explaining to the viewers of NewsClick how the Indian military, the Indian armed forces, the defense services have been increasingly politicized under the Narendra Modi government. Thank you once again and keep watching NewsClick.


We were still there six days, and each day I would go out. Well, we were near the end of the island, about a half mile back. And my battalion commander called me in, who's now Garrison. He said, teacher, I want you to go out. It's daytime, and I know you never go out daytime. And see what's at the end of the island. I don't think we have any opposition. So I said, OK. Well, we went out, and on the way over, I showed you a picture of a cliff. In the bottom of the cliff, there's a cave inside. And I didn't pay attention. I didn't use my head, because you should have cleaned it out. But we went beyond it. And on our way back, and jeez, we got to check that hole out. Well, there's this immaculate dressed Japanese officer with field glasses. I brought up my rifle.  He goes, no, no, no. He's going to give me the glasses. So I walked up to him and said, where'd you speak English? United States. You're assigned to the ambassador in Washington in San Francisco. So anyway, I said, tell your men to come out of the cave. He said, they're not going to come out. They're going to die for the emperor. And I said, why don't you? Because you think I'm crazy? I will get on your stomach if you move your dead. But it took us about a half hour to clean the cave out. We cleaned the cave out, and everybody got guns, whatever they wanted. But there are two suitcases, about like this. I picked them up, brought them out, showed them to him. He says, they're mine. He says, no, they're not. They're mine now. Are they triggered? He said, no. I opened them up, and it was all full of Japanese money. Now, he was in charge of all the airplanes from Japan all the way back to Pearl Harbor. That's how high he was. Well, anyway, I turned them into the battalion commander, went back to the front, and a runner came running up, said they want that money. So I took the money, took it back, and asked him what the story was. He said that he wants that money, and he thinks he can negotiate taking that money and shipping it to Switzerland or Spain. See, Spain wasn't involved in this too much. And then after the war, he and his family would go overseas. Well, anyway, I turned them in, and I left. Now, that's the end of the story. The war has been over 70 years. But when I got back, I'm going to say for 30, 40 years, I've tried to find out what happened to that man. No one knows what happened to him. They say they shipped him to Pearl Harbor. They say he was killed. Nobody wants to talk about the story. And I've had this Cointo group that's been coming to the United States for 60, 70 years, digging up American bodies and shipping them back. And I got to be friendly with them. And when they went to Japan, they went to the little town where he was born. They went looking for it and it was disappeared. They took it and dismantled it, gone completely. But anyway, no one wants to talk about it. And when I wrote this book, I sent it to my general. And he wrote me back and said, Tom, send a copy of that to Quantico, Virginia. Well, later on I talked to him and I asked what the story is. I can't talk about what happened to Vice Admiral. This is backing you up, but your story is true. Well, anyway, I've had this guy, Wayne Madsen. He's got four or five letters in there he wrote me. He's looked into it and he finally said to me, Tom, I think whoever got him, higher up, killed him and kept the money. And that's about the best we can do.


Well, hello everyone around the world. Thank you so much for having me here today. When I work with someone who is just learning Rust, they sometimes question whether the Rust Borrowchecker is their friend or their foe. If you take a look at the Rust subreddit, it's common to see posts with headlines like this. Newbie or question regarding the Borrowchecker. Help fighting the Borrowchecker. And does it ever get easier fighting with the Borrowchecker? However, as you watch people get more experience in Rust, they tend to come around to the Borrowchecker and realize what it protects them from doing. So in answer to the question, is the Borrowchecker a friend or a foe, I say the Borrowchecker will become your friend through experience. And along with gaining experience with it, it's also very helpful to understand how it works and why it does the things it does. We're going to dive deep into that, but before we do, let's briefly cover who I am. I'm Nell Shamerell Harrington. I'm a principal software engineer at Microsoft. I'm also a board director of the Rust Foundation. I'm the lead editor of This Week in Rust. If you're not subscribed, I hope you subscribe right after this to keep up with all the wonderful things the Rust community is doing. You can also tweet at me at at Nell Shamerell if you wish to get in touch with me or just say hi. And to set expectations, we will first do a bit of background on the Rust compiler in order to put the Borrowchecker in context. Then we will do a deep dive on the Borrowchecker. And let's go ahead and start with an overview of the Rust compiler. Let's take a look at a code example. This Rust function declares a vector composed of the integers 1, 2, 3, 4, and 5. After it declares this vector, it then uses a for loop to iterate through each integer in the vector and print it out on a new line. So let's go ahead and run this code using cargo. And as expected, we see the numbers 1 through 5 printed out on the screen. This seems pretty simple. Cargo builds and runs the piece of code for us. But there is a lot that happens underneath the surface in the compiler when cargo is building it. There are five general stages to compiling a piece of code. It starts with the lexical analysis of the code, then parsing of the code, semantic analysis of the code. This is where the Borrowchecker comes in in the Rust compiler, optimization of the code, and finally code generation, where the compiler creates the executable binary of our code. When we look at the stages laid out in a list like this, it seems like they will run linearly. And in some compilers, they do. However, if you've delved it all into the Rust compiler internals, you might be thinking, wait a minute, isn't the Rust compiler at least partially query based rather than linear based? And the answer to this question is yes, but that is out of the scope of this particular talk. For the sake of clarity, I'll speak to the internals of the compiler as if they were functioning linearly. However, if you want to delve more into how the Rust compiler is query based and what that means, check out the guide to Rust C development for more information. This guide has been a big help to me as I've learned how to hack on the Rust compiler. Going back to the stages of compilation, let's start with the first one here, lexical analysis. During lexical analysis, a program within the compiler called a lexer takes the raw Rust source code called a lexeme and analyzes it, then splits the code into tokens to make it easier for the compiler to parse. And that brings us to the next stage of compilation called parsing. In this stage, a program within the compiler called a parser analyzes the tokens generated by the lexer and translates them into an abstract syntax tree or AST. Having the tokens in this data structure makes it much quicker and easier for the compiler to do the rest of its work. At this stage, before it moves on to the next stage of compilation, the Rust compiler takes that abstract syntax tree generated by the parser and first expands any macros included in the code. If we look back at our code example and let's zoom in on this line. Print line is a macro, which means this line would be expanded to this. This is what the full print line macro looks like and how it will be represented in the ACT. This is part of me. This is what the full print line macro looks like and how it will be represented in the AST. It also de-sugars some of the syntactic sugar that makes writing Rust so delightful. For example, in Rust, the for loop is a piece of syntactic sugar for an iterator. If we were to de-sugar this section of code, it will consist of both a match statement and a loop. The functionality of this code is identical, but de-sugaring it makes it easier for the compiler to understand it and optimize it. At this time, the compiler also resolves any imports in the code. So if you are bringing in an external crate or using internal crates or modules, those will be resolved here as well. After these steps, the compiler takes that AST, that abstract syntax tree, and converts that AST into higher level intermediate representation, or HIR. Let's pause here and take a closer look at that HIR. It helps to understand the data structures that make it up. The first data structure is a node. This corresponds to a specific piece of code. This is identified by an HIR ID, and that node belongs to a definition. A definition is an item in the crate we are compiling. These are primarily top-level items within the crate. This is identified by a def ID. And a definition is owned by a crate. This is the crate we are compiling with Rust. It stores the contents of the crate we are compiling and creates a number of maps and other things that help organize the content for easier access throughout the compilation process. This crate is identified with a crate num. This is the original Rust source code we are compiling. And let's take a focus on this section here, the for loop that iterates through the numbers vector. Remember, this for loop d sugars into a match statement and a loop. If we look at the node in the HIR that represents this match statement, we would see something similar to this. It's a little hard to read for humans, so let's go ahead and break it down. This arm structure represents a single arm of the match statement that our for loop d sugars into. And first, we have the HIR ID for this piece of code. This identifies a node within the HIR. And that node is owned by a definition. The definition is some top-level item in the crate. And that definition data structure is owned by a crate data structure. So our for loop is a node within a definition within our crate. That's how we can identify where this node corresponds to our original code. What this also helps us do is we use something called a span. This span stores the file path, line numbers, and column numbers of the original source code. This will be very important in the future as we optimize and desugar the Rust code. If we encounter a problem with the code after it is desugar and optimized, we still want to be able to show the user where in their original source code that the error was generated. If we were to show them the desugar code, which is different from the code they wrote, it wouldn't mean much to them. The compiler then takes the HIR and lowers it into the mid-level intermediate representation, also known as the MIR. The MIR is constructed as a control graph. The units within this graph are called basic blocks, which identify with values like BB0 and BB1. Within these blocks, each has a sequence of statements that execute in an order. The very last statement is known as a terminator. This controls when and how the program proceeds to another basic block. This is a pretty simple example. There's only one direction the basic blocks can go. But if our code had an if-else statement, then the terminator of BB0 would have the option to either proceed to BB1 or to BB2. In this case, there is more than one path that the program can take when it encounters the terminator in BB0. And there are definitely more data structures involved in the MIR. If you're curious about them, definitely check out that guide to Rust C development. Again, it's a great resource for learning how the Rust compiler works underneath the surface. Let's go back to our D-sugar code. And let's focus on this match statement, which is assigned to a variable called result. If we looked at the MIR for this piece of code, it would look similar to this. I've simplified it for the sake of appearing on a slide. Up here on the top left, we have our basic block identified here as BB2. And then we have what is called a local. A local in the MIR represents a place in memory or, more specifically, a place on the stack frame. In this case, underscore five corresponds to the value of the variable result. And like in the nodes in the HIR, we have a span. The piece of the original Rust source code that each node in the MIR corresponds to. Again, if we encounter an error when we're operating with the MIR, we can still easily refer to what lines in the original source code cause the error. And that brings us to this third stage. And this is big in the Rust compiler. Semantic analysis. This is where the compiler tries to figure out what the programmer is trying to do in a way the compiler can understand it and then translate it into machine code. And at this point, after it's lowered the HIR into the MIR, the compiler will run several checks, including the borrow checker. And we'll come back and dive deep into the borrow checker in just a few minutes. But for now, let's focus on these last two stages of compilation. Optimization and code generation. These stages are where the code is transformed into an executable binary. And the Rust compiler, we use LLVM to do this for us. LLVM is a commonly used collection of modular and reusable compiler and tool chain technologies. The Rust compiler uses it to further optimize the code and generate the machine code to run it. Before it uses LLVM, the Rust compiler takes the MIR we created earlier and lowers it into the LLVM intermediate representation, or LLVM IR. And the LLVM IR honestly is pretty unreadable to humans, but it looks something like this. As you can see, it's organized into basic blocks like the MIR. We then use LLVM and pass it the LLVM IR, and then it runs more optimizations on it and emits machine code. It then links the machine code files together to produce the final binary. And that's why when we call Cargo Run, we see all those numbers printed out. So yay! That gives you a bit of an idea of how the compiler works to take your Rust source code and make it into something a computer can execute. And at this point, I do want to go back and take a deeper look at that borrowed checker because this is really where the magic of Rust happens. And in order to do that, let's use a different piece of code. If you have some experience with Rust and you're looking at this code and thinking it will error out, you are right. We'll see how and why that happens in just a moment. First, let's go through this code line by line. We declare the variable X and give it the type string. And then we set the value of X in the string to high cloud native Rust day. Then we say that the variable Y's value is equal to the value of X. And then we attempt to print both variables. If we tried to build this code with Cargo Build, we would get an error. And this error is a result of the borrowed checker. Let's go through how the borrowed checker identified this error. The borrowed checker does several things, including tracking initializations and moves. How this plays out in our code is when we start with this first line where we declare the variable X with the type of string, X is not actually initialized at this point. It won't be considered initialized until it is assigned a value. If we look at the MIR for this line of code, we see that X is represented by the local underscore one. And local underscore one is assigned the type of string. Now let's look at this line of code where we create and assign the high cloud native Rust day string. Now that X has a value, it is considered initialized at this point. If we look at the MIR, we create a new place in memory, local underscore two, where we store the high cloud native Rust day string. Then we move the value stored at underscore two to underscore one. Remember, underscore one corresponds to the X variable. So we have created the string in memory and moved it to be the value of X. Now let's look at this line where we attempt to create the variable Y and assign it to the value of X. This line is where the value of X is moved to Y. If we look at the MIR created for this line of code, we will see that Y is assigned to the local underscore three. Remember, a local represents a place in memory. And underscore three is given the type string. And then the value at underscore one, remember that represents X, is moved to the value of underscore three, which represents Y. This means when we get to here, this means when we get to here, when we try to print X, X is not initialized at this line. So we cannot print it. And that's what generates this particular error. We're attempting to use a value of a variable after it has been moved and the Rust compiler says you cannot do that. Something I'd like to specifically call out is how the compiler shows where the error was generated from in the original source code through a span. Even though we had lowered this code to MIR or mid-level representation, we still tracked what items in the MIR corresponded to what places in the original Rust code. This is very helpful to the end user. What is also helpful is this. Remember, the Rust compiler not only tells you what the error is and where it is, it gives you a command to get even more information about the error so that you can fix it. If we run this command, we see not only an explanation of the error, but also a piece of example code that would generate it. Then the message gives you even more information about how to fix it. This suggests using a reference to borrow a value rather than attempting to move the value, which is what we saw done in the MIR representation of our code. So let's do this and change this line so that Y is assigned to a reference to the value of X rather than moving the value of X into Y. After we've made this change, if we run our code again using Cargo Run, the compiler will build the code and execute it, and we see the message High Cloud Native Rust Day printed out twice. Rather than fighting the borrow checker, we used it to make our code even better. Along with tracking initializations and moves, the borrow checker also deals with lifetime inference. And let's go over what this means. Rust uses the word lifetime in two distinct ways. The first is to refer to the lifetime of a value. That's the span of time before the value gets freed. Another word for referring to the lifetime of a value is referring to the variable scope. Let's see how this plays out in our code. And let's start with this first line, where we assign the value of X as this string. At this point, X is live. Its lifetime begins here. When we get to here and move the value of X into Y, this is the end of X's lifetime. When we get down here and try to use X again, X is dead. Its lifetime is no longer in effect, which is why this program as it's written now will error out. The other way Rust uses the term lifetime is to refer to the lifetime of a reference to a value. This is the span of code in which the reference can be used. Let's take a look at our corrected code, where we assign the value of Y to be a reference to the value of X. If we look at the MIR for this line of code, we remember that the local underscore one refers to X, and the local underscore three refers to Y, and we see that underscore three, that underscore three local is assigned a reference to the value of underscore one. Looking back at our code, let's alter this slightly and try to drop the value of the variable X before we try to print out the value of Y. After we make this change and try to build this code using cargo build, we get an error. We can't drop X because it is borrowed, and that borrow is used later. The borrow checker tells us that X, because it is referenced by Y, needs to stay alive for at least as long as Y needs to stay alive. X's lifetime must be greater than or equal to Y's. Looking at this line in the code, or looking at these lifetimes in the code, again, this is X's lifetime, and this is what needs to be the lifetime of Y, which is a reference to X. Notice that even though they overlap, X's lifetime ends before Y's lifetime is supposed to end. Y can no longer reference the value of X after this line, and at this point, Y along with X would be dead. In order for this code to compile, the lifetime of Y X must last at least as long as the lifetime of Y. The overarching way the scope and the lifetime of a reference relate to each other is that if you make a reference to a value, the lifetime of that reference cannot outlive the scope of the value. As I move toward concluding this presentation, I want to make sure that you know there is so much more to the Rust compiler and the borrow checker. Again, please, if you want to know more, check out the guide to Rust C Development. It's a fantastic resource. Going back to this question from the beginning, is the borrow checker a friend or a foe? I say it's a friend, though a very strict one, but the best thing about this friend is it will not only tell you when something is wrong, it will also tell you how to fix it, and I find that to be one of the best qualities I can find in a friend, as well as one of the best qualities I can find in a compiler. Thank you.


And our first speaker is Seth Dobrin. He's VP of data and AI and Chief Data Officer for Cloud and Cognitive Software with IBM. Seth is not physically with us today, but he has recorded his presentation. So we're going to play that recording momentarily. And because he's not here, we won't really have an opportunity to do a live Q&A at the end of his presentation. So just be aware of that. So I guess without further ado, we'll go to Seth's presentation. We're in the midst of an AI revolution, but people are still too suspicious and too fearful of AI. And this is the time for us to fully unleash the potential of AI to reinvent our future. But to do that, beyond the advancement in research and technology, what we really need is for people to trust the algorithms that impact their lives. But actually, let me start from here. The biological circuits of neurons help to explain a popular machine learning technique at the heart of deep learning, artificial neural networks. Yes, today, as the IBM Global Chief AI Officer, I'm here to talk to you about machine learning, algorithms, and AI, but not from the perspective you might expect. Trust is the real driver of AI adoption. And it's critical to begin to approach this technology from a human perspective by actually taking a step back. This image is an analogy from the field where I started my career, human genetics, specifically psychiatric genetics. And I bet by now you might be wondering how a human geneticist became the first-ever Chief AI Officer in one of the world's biggest companies in the realm of AI. And in fact, this is precisely what a lot of people ask me. Believe it or not, there's a lot in common between being a human geneticist and leading data and AI transformation for enterprises, even if it doesn't seem like it. For instance, in the late 1990s, at the time of my early academic career was the time of the founding of what we know today as big data, which is not a term I like, but one that everyone knows. And if you think about it, the origins of big data come from hard sciences such as astrophysics and genetics. Additionally, the applications of tools that are so popular today in solving math problems like R and Python arose during this time. And throughout my entire career, from human genetics to plant genetics to academics, startups to multinational corporations, it's all been rooted in pushing the boundaries on the combination of advanced automation methodologies at scale, leveraging data and math. All with the aim of creating better, faster, and cheaper solutions that solve real human problems and could be trusted by people across the organization. In fact, trust is crucial when it comes to scaling AI. Trustworthy AI and AI ethics are among the most discussed topics today, and there's many frameworks, guidelines, assessments, and regulations that are being provided and proposed. And I know what companies have to deal with. It's pretty complex. And if we're honest with ourselves, at best, it's a mess. But people tend to forget that ensuring the design and development of trustworthy AI systems that are fully integrated with a company's business processes requires much more than technologies to mitigate bias or address regulations. The matter is much more complex than that. Operationalizing trustworthy AI at scale starts from growing and maintaining an open and diverse culture that fosters inclusiveness, a culture where AI is human-centered. It's the culture in an organization that allows it to set a proper data and AI governance that ensures the development of AI solutions that are grounded in ethical principles. And the path towards trustworthy AI is long. It requires a human-centered approach rooted in the value of diversity to use AI to solve humans' problems to generate real, tangible value. And I realize that with time, that almost every initiative I led from the beginning of my career has laid the foundation for the creation of this human-centered culture I'm talking about. A culture that is essential for putting trust at the core of AI technologies and generating value for organizations. And it's through this lens of my journey in data and AI that I'm going to talk to you about how to set the basis to instill trustworthy AI technologies in an enterprise. And to be honest, making the transition from hard sciences like genetics to heading AI transformations is not as much of a leap as it may sound. Taking a big step in a totally different direction. That's the challenge. And this is precisely where the perceived leap comes in. If you think about what's at the heart of data science and AI in the enterprise, it's basically applying the scientific method using math and computer science to solve business problems at scale all with the goal of creating new value. And ultimately, with a slight step to the side here and there, I've brought the application of the scientific method in a field very far away from genetics by completely changing industries when I joined IBM. This is how innovation happens. By putting ourselves at the intersection of different fields and making an effort to connect the dots along the way to draw a bigger picture. In my case, that picture was cross-functional data-driven solutions that helped companies to reinvent their business models. That's why one of the first initiatives I led when I joined IBM was the creation of a new team, the data science and AI elite team. I designed this team as a pool of experts that had deep skills in machine learning, deep learning, data engineering, data visualization, optimization research, and data journalism to help IBM and our customers successfully execute, operationalize, and scale AI in the enterprise. Through my journey, I've realized how companies invest heavily in software, hardware, and time hiring top talents. And yet despite all this effort and money, many of these companies get back little to no value. This primarily happens because they spend all the resources on too much experimentation and projects with no clear business purpose set up front, which as a result, they don't align with the organization's strategic initiatives. With the data science and AI elite team, I wanted to turn data science from being a scam into a source of value by showing enterprises how they need to consider turning their data science programs from research endeavors into integral parts of their business processes. The experiment of the data science and AI elite team resulted in huge business success. The team acquired more than 110 client references and has completed more than 260 client engagements. The way the team operates has profoundly changed even in IBM the mindset of how to approach data science and AI and how to use it to generate new business value. A year after the creation of the data science and AI elite team, we started another team designed to help to accelerate AI driven value creation. This is a team of domain specific chief technology officers who also had a deep expertise in a given industry sector. These CTOs helped to tie AI to business outcomes in order to accelerate the generation of value for their specific industries through AI. Although the actual strength and immense success of these teams truly dwell in its diversity. Think of a menu.  Absolutely not. You pick and choose, right?  Long before joining IBM, while working at a previous company I was trying to find simply one good data scientist to add to my team. One, not more than 100 as it was with the data science and AI elite team. So not only was I having trouble finding qualified candidates but I also realized there was zero diversity in the candidate pool. Tired of my frustration and complaints, my life helped me to realize that the job description I had written contained more than two dozen qualifications. To frame it in her words, it was too much of a wish list and she was right. Most of the criteria were not skills necessarily required for success. She suggested reframing the job description as a short menu of desired attributes. And that's where that there's what I want and there's what I need. For instance, I don't need someone with Python, R, Julia, Scala, Java and JavaScript skills. I need someone with Python or R plus one other language. I don't need someone with an understanding of every database known to humankind. I need someone with experience in three of the following. I shouldn't care about the number of years of experience. What I really care about is the demonstrated level of mastery. Well, after doing that, I suddenly had twice the number of qualified interview candidates including women, people of color and other represented groups. There's an entire body of research out there explaining why diversity increased so much with this approach. And when it came time to begin assembling the IBM Data Science and AI elite team I adopted the same strategy to ensure that it was highly diverse. And with some of my then colleagues, our HR partner, our talent acquisition partner we reevaluated the entire hiring cycle from writing the job descriptions to making the candidates an offer. The main rule we established was no conducting interviews until we had a diverse pool of qualified candidates. An approach we drew confidence in from many studies and research in the field. Following these practices, we minimized bias during the hiring process and created a diverse team of highly technical and highly talented individuals from 21 different nationalities speaking 27 different languages of which more than 40% were women. I did this not only because it was and still is the right thing to do but because diverse teams drive better business outcomes and this is proven by top academic and real world research. There's ample evidence that diversity is good for business. A Mackenzie report found that companies ranking in the top quartile for racial and ethnic diversity were 35% more likely to have financial returns above their respective national industry medians. But diversity is not just about hiring diverse talents. It's also about establishing forward thinking policies and processes to nurture and preserve diversity within an organization. With this belief in mind, I drove a number initiative in IBM to support different communities and grow talents in data science. For instance, together with several female senior leaders, we co-founded the diversity network called GROW, Guidance Resource and Outreach for Women in IBM, to advocate for women, and to retain and grow talents in data science, I started leading the IBM Data Science and AI Profession Board, of which I'm the executive sponsor. Through the board, we've provided a clear career path for data scientists through a skills-based assessment and qualification program inside IBM as well as via the open group. Also, as part of the data science and AI elite team, I started the first-ever apprenticeship program in data science to give people with zero background in this discipline the opportunity to learn a high-demand skill and develop a career in tech. Along with these initiatives, I also tried to change the old-fashioned way of mentoring diverse communities because mentoring is important, but it must be backed by sponsorship and advocacy. Diversity and inclusiveness spur innovation. Innovation generates concrete business results.  It's also differences in backgrounds, socio-economic, cultural, language, skills, training, cognitive processes, and so on. In fact, multi-disciplinary was one of the facets of diversity and inclusiveness that we included in the data science and AI elite team. Prior to joining IBM, while leading one of our digital transformation, I remember taking part in a project about implementing a mobile experience to interact with farmers in India through an app. To everyone on the team, it sounded like a brilliant idea. Everyone was really excited about the project until after a design-thinking workshop, we discovered that actually the farmers, which are end users, could only use the SMS service on their phone, meaning an app was worthless. If we had pursued what we thought was a great idea, without thinking about the user first, we would have wasted time, resources, and money. Approaching AI from a human-centered perspective is fundamental. We only provide tangible business value to organizations when we create solutions that solve real human problems. Remember, AI is only a means to an end. The ultimate goal is to help and to augment humans. In fact, another choice I made was to equip the team of data scientists with data journalists and data designers in order to radically change the traditional data science practices applied to business problems by rooting them in a human-centered approach. Throughout my journey from data scientist to business leader, I've learned several lessons. One of them is that by bringing a diverse cross-section of wild ducks together with purpose, we create innovation. And innovation has indeed been the objective of my entire career in an effort to bridge the gap between business, AI, and human needs. And the focus on humans brought into the data science and AI elite engagements led to the adoption of design-thinking workshops in data science which were even more radically innovated by adopting them to data and AI in order to better serve both the end user and the data scientists. In addition, the human approach revealed the importance of adequately communicating AI outcomes to the end user. And this promotes an adoption of data storytelling to transform algorithms into actionable knowledge and concrete business results. Ultimately, the attention to the users uncovered the need for having a well-defined data and AI strategy to craft an overarching story that helps to envision a new AI scenario and explain how this scenario may play out. The experience of the data science and AI elite team made me realize that what I had accomplished throughout my career has always been directed towards the creation of a human-centered approach for data and AI business practices. In fact, to lead a portion of my company's digital... former company's digital transformation, I created a framework I called the Decision Portfolio to identify the company's strategic initiatives in data and AI based on the user's needs and to assess those initiatives by aligning them to business value. Yet once I joined IBM while leading the digital transformation of the cloud and cognitive software organization, I realized that the framework I created couldn't really help me as it didn't scale. I needed a way to fasten the time to gather user requirements on the data they needed to run the business efficiently. Also, I needed a way to make sure to develop solutions that would make a real impact. Therefore, the team started adopting the design thinking practices and reinventing them through the lens of this Decision Portfolio. We used design thinking to identify business problems from a human perspective through a data-driven approach. This was groundbreaking. We used it to identify real user problems to uncover all the critical business questions they have and to use those questions to extract the information they need. We then turned the information into data sources the data scientists could use to design and develop solutions that solve the user's problems. By approaching digital transformation from the human needs and unknowns hidden in the business strategy we provided the business a tool carefully designed to transform data into actionable insights explaining the business dynamics and answering all the critical questions that users have through trusted data at their fingertips. Through an IBM-wide effort across finance, sales, designs, development, and product teams we're able to create a management system that today is IBM's single source of truth for business and is adopted by every senior executive in the company. This methodology changed the way data is used for business by teams in accelerated IBM's digital transformation. By re-engineering the decision portfolio through the lens of a human-centered approach using data-centric design we sparked an innovative collaboration between IBM Design and our organization. The outcome of this work is what is today called IBM Design Thinking for Data and AI. And this tool, IBM Design Thinking for Data and AI is a human-centered methodology that illuminates how to employ data and AI to build an AI strategy and an execution plan for trusted AI solutions. This is done by bridging the gap between strategy and execution. And this framework enables teams to design and build solutions that provide concrete business value to their organization while solving human-centric problems. It puts up front who will be using the data or AI how they will be using it what they will be using it for and why they even need it in the first place. With this framework which is divided into a strategy session and a series of technical sessions the teams transfer the business attempts into concrete action. In addition, by the use of specific AI ethics and AI explainability activities this methodology enables the design of an AI strategy that puts trust at the core of every solution that is ultimately implemented and operationalized in the company's business. In fact, this is one of my missions as IBM's first-ever chief AI officer helping companies design an AI strategy that aligns their business needs and puts trust at the core. Once companies achieve a mature digital transformation it's time to focus on strategy to industrialize the data and analytics to enable AI to reinvent the core of the modern enterprise. Trust is vital in this process. We started the journey from here from this image about the three pillars of trustworthy AI but you've probably gathered at this point trustworthy AI is the result of different integrated processes tools and technology that cross the cultural fabric of an organization. The level of maturity of enterprises in the AI realm with the operationalization of AI models has promoted the need to trust the AI's outcome. And this is possible by creating a data and AI governance framework through which monitoring the entire AI lifecycle to ensure that models are compliant with AI ethics principles. For us, these principles are transparency meaning AI is easily inspected. Explainability, because people are entitled to understand how an AI arrived at a decision. Fairness, AI should always help people make fairer choices. Robustness, as AI has to be robust enough to handle exceptional conditions effectively and minimize security risks. And finally, they need to preserve privacy because AI solutions must preserve the privacy and security of users' data. These five principles guide the development of trusted and responsible business outcomes driving more value for companies by making them more profitable, more efficient, and more secure. In fact, companies cannot generate business value through AI unless they can trust the outcome of their AI systems. Think about the recommendations or the information we provide to our customers when we employ AI. If AI is not trustworthy, the link between business strategy and AI strategy inevitably breaks. Because of the urgent need for companies to define what trustworthy AI represents to their organizations and integrate that knowledge into actual business operations, we started an IBM-wide effort around creating a trustworthy AI set of solutions. Through these solutions, we help customers deliver trustworthy AI systems and put AI ethics principles into practice through an execution model focused on four different areas that reflect the different needs of organizations today. These areas encompass a mix of tools, IBM technologies, as well as the expertise of our services organizations that help companies with AI governance frameworks by building with them from scratch the conditions to develop trustworthy AI systems. The monitoring of full AI lifecycle, we partner with customers to plan, build, deploy, and manage new AI solutions while we ensure the trustworthiness of the AI. The ability to assess, audit, and mitigate risk, meaning we offer guidance and tools to help customers assess, audit, and mitigate risk in their AI solutions. And ultimately, we also help with education and guidance by providing best practice for building trustworthy AI solutions through an education and guidance for data scientists, developers, and decision makers, and also by offering standard courses and certifications. Now, this was quite a journey, but it doesn't have to end with this talk. Actually, I hope it's only the beginning of a new conversation. There is still a lot to do to make AI responsible and fair. That's why it's crucial that experts in this domain make sure to focus their work on changing the narrative around AI by putting a genuine effort into creating trustworthy solutions that can truly help human beings to reimagine a better and fairer future. Thank you.


This is Bill McKibben in the incredible broadcast studio at 350.org Well, not quite so incredible.  It works just fine I've done about 200 talks and speeches from down here this year on the days when not on the road The point I'm trying to make is not that we need some money for a new studio We don't this is great. The point. I'm trying to make is We can do an awful lot with the little if you can send us some money Ideally if you can send us a little bit of money every month, we will make it go a long way now I hate asking for money one of the reasons is most of the people and most of the places where we work are very poor and If it would deprive you in any way to send us money then do not do it And of course the thing we most need from you is involvement and action But we know that not everybody can climb into the paddy wagon every month Maybe you can send a little bit of money so we can keep doing the kind of things that we've done in this last year I guess the most interesting and important were the big global power shift that brought young people from 135 countries to Istanbul the launch of this divestment campaign all over the world Oxford University just said it was the fastest growing corporate campaign in history and The the kind of zenith of this fight against the keystone pipeline, which is going to get decided in the next six months or so Look We'll do everything we can with what you can send us. We're so grateful. Happy holidays. Thank you very very much


Hey everyone and welcome back to yet another Backrooms Level Explanation on the channel. In this video I want to go over a level that you all requested for several months to say the least. And I mean months. Which is of course level 94. If that sounds interesting to you, stick around for the explanation. If it doesn't, well then your parents don't love you. Just kidding. Or am I? Let's get into it shall we? But first sub the Tugli, my second channel. Because it's almost a 10k subs, so why not? Programs level 94, aka level motion, is classified as a survival difficulty of 3 and is overall pretty unsafe in general. It takes the appearance of a couple of different things ranging from a big town to a stone castle to green rolling hills and all of the level is covered in a retro grainy type effect. Kinda like an old movie or a video game. And the entire level is almost like Dreamcore in a way. I know some of y'all like that. So part of the level where the main town is is pretty safe, especially during the daytime since there aren't any entities here, but at night time it can get pretty dicey. In the various center of this town in the main area, there's actually a fountain that's flowing with almond water, which is kinda cool, I'm not gonna lie. Wonders have described the feeling of this town as kind of a 1930s stop motion background, which is pretty campy and cool to say the least. In the outskirts of the town, there are small houses with furniture and other normal house stuff. There's also retro cars and vans from the 1930s time period.  Scattered around the town's roads, there are these things that look like siren poles, but they're actually speakers, and they play really old campy cartoon music sometimes. Usually the sirens only play the music during these safe times, which is daytime on the level, and then the music will play until night time when it gets really unsafe and unstable and lots of entities start to come out. But I'm gonna explain those entities during the entity explanation section of the video. The grassy hills of the level are actually infinite and they just keep repeating themselves over and over again, but sometimes there will be like a random car parked on the side of the road, or you might run into a water tower that's just there. And sometimes on the top of the hills themselves are just random pieces of furniture, like chairs or tables, just sitting there, which is pretty unsettling, I gotta be honest with you. But it's not as unsettling as the transparent hills that are there, hills that you can literally see through that have castles sitting on top of them. That's terrifying. I mean that'd be pretty trippy, like just imagine walking up to an invisible hill that you can see through and seeing a whole castle just on top. I'm not even sure how like my brain would process that, but whatever. You can actually walk up the Invisihill, get it, Invisible Hill, and get to the castle. But the castle area specifically is known for draining sanity, so be sure to carry almond water with you so you don't go off the deep end. Inside of the castle you'll notice that there is a huge funhouse area, in fact the entire castle itself is a funhouse, playhouse, whatever you wanna call it. It's full of play sets, slides, ballrooms, ball pits, and the other typical funhouse stuff. If you wander through this castle enough, you'll actually run into a huge doorway that opens into the throne room where of course the entity called the Animated King lives. Now you'll be tricked into a false sense of security by the Animated King because he seems nice and stuff at first, but he'll actually try to control you instead of helping you. So watch out for that. The Animated King will put you through a test before he turns you into an animation entity. Which I'll get into what an animation is in a second. But if you pass this test, you might be sent out of the level and if you fail, well you're probably not going to be leaving anytime soon. Now let's get into some creatures, shall we? So there are actually a lot of entities and creatures here and they're very dangerous, especially in nighttime. As per usual, you got your regular entities like Smilers, Skinstealers, Hounds, and Male Deathmoths, and even Deathrats, which are slightly less common, but still pretty common. But the level-exclusive entity, like I said, is called an animation.  And they attack victims based off of what they look like themselves. So like if an animation entity is a claymation character, then it will try to drown its victim in clay, what? Or if the animation entity is like wood or something like that, then it will try to hit its victim with blunt force, and so on and so forth. You get the point. They aren't very smart though, so you can pretty much avoid them with ease, just make sure you don't get caught by them or, you know, you'll drown it in clay.  The other level-exclusive entity is called the Roboman, which are just retro robot toys from the early 1900s that live inside the castle, and they kind of act like the guards of the castle, and they're really hostile, and will instantly attack you if they see you. So just avoid the large walking robots. To enter this weird place, you have to successfully escape the end level, and then go to the hub level right after. When you're there, a rectangle hole will just manifest itself in the ground inside of the hub, and it'll slowly start to close over time. And if you want to exit, you can either complete the Animated King's trial and pass it by conquering your fears in animated form, or you can get teleported into level 7, 9, or 53 by randomly going into one of the houses on the hills in the level. So to summarize this pretty interesting level, pretty cool level as well, it's pretty much just a Dreamcore world filled with weird animated and glitchy type things that kind of makes you feel peaceful and at home until you get to the literal invisible hill with a castle on it, where you'll be forced to watch your biggest fears unfold in animation. If you pass, then you can leave, and if you don't, then you're condemned to stay here forever as an animation entity. Pretty neat. And yeah, that is it for the Backroom's level 94 explain. I do hope you enjoyed it. If you're a fan of Dreamcore, like I said, then I'm pretty sure you'll like it. And even if you don't like Dreamcore, it's still a pretty decent level. Thanks to everyone for supporting me. Comment illgurb if you're still watching. That's just brutally spelled backwards, but if you're still watching, you need to comment that.   The last video on the channel is actually blowing up and is actually crushing every view record on the channel. It's got like 200,000 views in one day, which is just, thank you so much. Just that's insane. Thank you so much for that. Thank you to my patrons and channel members for supporting me extra, as always, and thank you to everyone for everything you do for me. I'm actually about to upload a storytime video with Facecam over on the second channel, Tugli. Get ready for that. It's the first in a long series of storytime videos I'm going to do about a huge trip that I took out west. It's going to be awesome. Enjoy that. It's got like, we got like almost 10k subs over there. It's going to be lit. And speaking of subs, we're on the road of 200k here. I mean, we're really close to, we're only like 20k, 30k away. Like, wow. That's insane. Road to 200k is on. Let's get it. Thank you all for watching and supporting me, and I will see you all in the next video. Peace out.


Okay, so in this video, we're going to talk about some of the basic statistical functions in R. It's not advanced statistics, but just, you know, the functions you're going to be using on a daily basis to get what you want from data and do all the basic stuff. So we're still sort of getting our C legs, so to speak. We'll talk about more advanced stuff, data frames in the next video. But here we're going to talk about all the functions that you really need to have as a reflex if you're playing around in R and just the kind of stuff that you can generally do. So I'm going to start out just by giving us some data. I'm going to randomly make a data frame of, you know, it's going to be called eBay. And we'll say hypothetically that this is the income we made in an eBay business over several months. So each one of the values in here is monthly income from eBay or something like that. I'm actually going to hide that because we don't need to see it because we're going to be running some functions on it. Okay, so basic stuff.  Let's say you want to count up all the money you've made in your eBay business. So you can use the command sum on any vector and that will sum up everything in the vector, simple enough. If you forget how many elements are in that vector or how many months we were earning eBay income, you can actually just type in length. So length six, so that's six months or whatever. And as you would, you can probably guess, you can take sum of eBay and divide it by length of eBay. And that is going to give you what is effectively the average or the mean. So this is the average monthly income from eBay. But of course, R makes everything easier. So they're not going to make you type all that. You can just type mean and you'll see that these are exactly the same. So R theoretically does know exactly what it's doing. So you can also know more specific things about your data, like what is the least amount we earned in a month? What's the minimum? Well, you can run min. What's the maximum number? That's you can run max simple enough. You can also calculate the median, which I don't think it's going to. OK, yeah, it will give us, even though we do have an even number here. So notice, of course, in the situation of median, if there's an odd number, it's going to pick the actual median. Since there's an even number, it takes the two closest values and it averages them. So 230 and 270 just happened to be a very clean number here. So that's some basic stuff. We can also take our data frame. Notice that we're not always increasing in the money we make on eBay. But if hypothetically we want to see all that data sorted by how big it is or how small it is, we can run the sort command. And you'll see now that we're actually we start with the lowest value with men and end up at the maximum value. So you can actually see that this would a change in number. If you want, actually, you can also run the rev command. And what rev does is actually reverses any vector. So if we rev the sort function, what we're doing is taking the now we have the greatest value decreasing to the smallest. Of course, you don't just have to run that on the sort command. You could run rev on the day itself. And what this would be giving us is basically monthly income, but starting at what June, I guess, and then going to January. You might want to do that for some reason. But anyway, so these are some of the basic functions and I'll also say one of the things one of the I don't want to say most important functions, but one of the functions that everyone runs on our whenever they import data is this nice handy thing called summary. Now, summary actually has does a couple things. It gives you the median. It gives you the mean minimum maximum. Also gives you some the first and third quartiles. So just if you want to get a general idea of what your date is looking like, a summary is a good command to play around with. OK, so that said, these are some of the basic commands. Now, you can also, of course, graph things and are very easily. We're not going to talk about the more advanced like Gigi plot and stuff like that in this video. But just so you know, there you can plot things pretty easily. In fact, you can plot them with just the plot command. And there's your plot. Let me give it in my face here for a second. So you'll see by default, well, you'll see down here on the X axis, we have index. So this is basically months, so like January, February, March, whatever. And we have eBay up here. It's labeled as eBay, but this is really just the dollar amount. Now, of course, by default, plot just sort of randomly names these. What it thinks it should not randomly, but it names them what it think they think what it thinks they should be called. But we can rename these.  And you can also change. You can also put a title up here and that's called a main. And we can say, you know, eBay, monthly revenue or something like that. And that will automatically change our graph. So plot is one of the basic graphs. It's really easy to use the, of course, the output isn't super pretty, but, you know, it's nice having if you want to just visualize stuff, if you don't want to use or at least you don't want to get into more advanced stuff like GG plot yet. Now, for any of these commands, I think I might have said it before, but it's important to say it again. And if I did, you can check to see all the specifics by just running question mark and then the command. So this will bring up a manual page that you can scroll through and it'll tell you all the different variables you can give this stuff, you know, so Y label, X label, main title, sub title, all the kind of stuff that you can play with. And this is extremely important, especially like with more advanced stuff. You want to be able to know what exactly the function is doing when you're running it and stuff like that. So this is plot. Another very simple graphing command is hist. This is another one that's pretty important to know, which makes just a histogram of your data. So just to make sure we're all on the same page, right? So what this says is, you know, there are two instances of monthly incomes between 200 and 300 and two instances between 100 and 200, et cetera, et cetera. So it's a histogram. So plot or histogram might be more appropriate for whatever data you're playing with, but of course, both have different ways that you can modify the X and Y values and stuff like that. Now R, as you notice from these commands, R will sort of automatically calculate what it thinks like the scale should be here, but you can like set that automatically. You can ignore outliers. You can do lots of other stuff. Just check the manual for that. Okay. So this has been, oh, there's one other command that I really like that I should throw in just because it's pretty cool. So we have eBay. Let's say you want to know like Delta eBay, like the change, the monthly change in income. So we talked about some eBay and that will sum everything up, but you can also have Diff of eBay. And what Diff does, notice that it's going to return five values and these five values are the difference between each of the two months that are next to each other. So, you know, we, a first month is 121, then you add 109 to get 230. So that's what Diff is. And it's really nice. I mean, if you're, I don't know, calculating GDP and you know, you want to know the change in GDP or something like that or anything, you can do it in any matter of thing. Diff is a really helpful command. I only say that because there's one time I needed to do it and I didn't know the command existed. So I like sort of built it myself and then I realized it was already there. Um, okay. So that, that's about it. These are the basic functions. Again, we're just playing around with vectors so far. So in the next video, we're going to be dealing with data frames, specifically how to play with raw, uh, raw columns and codes, uh, columns and rows and really get the kind of functionality. I think after that video, you're going to be, you're never going to want to use Excel again. Uh, that's the selling point. But anyway, so this has been just an introductory to the, oh, one, one last hemp. If you want to check the, um, uh, excuse me, the, the, uh, fact of variables you have out there, you can just type LS.  I'm going to get rid of it. So now eBay is gone. Okay. So that's it. I hope you guys learned something and I'll see you guys next time.