Hello friends, let's work out the following problem. It says using differentials find the approximate value of the following up to three places of decimal so let's now move on to the solution and Let us first define y as a function of x So we define y as x to the power 1 by 2 and here we choose x in such a way So that we can easily find out its square root and that is also near to 0.0037 so we choose it to be 0.0036 and since we need to have x plus delta x as 0.0037 we choose delta x as 0.0000 1 right So x plus delta x is equal to 0.0037 Now we know that delta y is equal to f of x plus delta x minus fx So this is x plus delta x to the power 1 by 2 minus x to the power 1 by 2 So this is equal to 0.0037 to the power 1 by 2 minus 0.0036 To the power 1 by 2 so this implies 0.0037 to the power 1 by 2 is equal to delta y Plus 0.0036 to the power 1 by 2 Now 0.0036 can be written as 0.06 square It's power 1 by 2 2 to get cancelled and this is equal to delta y Plus 0.06 Now we know that Delta y is approximately equal to D y and D y is D y y dx into delta x. So delta y is equal to D y y dx into delta x Now a y is x to the power 1 by 2 So D y y dx is equal to 1 by 2 into x to the power minus 1 by 2 into delta x and delta x is 0.00 0 1 Now this is equal to 1 by 2 into x to the power 1 by 2 into 0.000 1 let's now substitute the value of x here. So we have 1 by 2 into x is 0.0036 and 00.36 can be written as 0.006 square It's power 1 by 2 into 0.000 1 This is equal to 1 upon 2 into 0.06 which is equal to 0.12 Into 0.0001 and this is equal to 0.00 083 so delta y is this now we know that 0.0037 To the power 1 by 2 is equal to Delta y plus 0.06 and delta y is this it is delta y plus 0.06 This is equal to 0.060 8 3 Approximately hence the value of 0.0037 to the power 1 by 2 is 0. 060 So this completes the question and the session bye for now take care have a good day


What do you think is the most popular one? Get to the chopper, Austin. Get to the chopper! I am with the one and only Arnold Schwarzenegger. My dad and I's biggest idol growing up and we're in the kitchen here. We've been having an amazing conversation, talking about stuff we can't share, but let's talk about total recall. I have it recommended in my top best books. So good taste. Good taste. You know the first thing I would say about the book is we're just talking about this. What did you think? Do you think it was important your upbringing to reprogram your mind? Because in the beginning chapters you talk about how your dad made you work out before you ate. What was all about being useful? He also felt that you should earn your breakfast. So he had me go and do push-ups and do sit-ups and knee-pants and all kinds of things. All he would just send me down to the basement in the chopped wood for half an hour and then he says, now you can come up and have your stets, which is coming back as a breakfast dish that they serve in Austria in some hot chocolate or whatever I had in those days. And then we would go to school. So I mean you earn your breakfast. I think all of this stays with you for the rest of your life. Because so many people procrastinate. You don't seem to have a problem procrastinating. No, I don't procrastinate because I see very clearly a vision of certain things, a certain goal, and then I go after it because you snooze, you lose. So to me, there's no such thing as like, you know, I like to take a vacation and I like to go and rest and all those kind of things. But when I'm on a mission and then I go after something, I go after the inventions. I mean, there's no stopping. Yeah. Now, number two, three points. So number one, your upbringing. Number two, and we talked about this a little earlier, what is the secret for somebody watching?  When it was bodybuilding, you were saying you didn't just try to become Mr. Austria, you want to be Mr. Olympia. When it came to movies, you didn't just want to be in a movie, you wanted to be the biggest, highest grossing movie star of all time. What can somebody do watching to overcome the fear of thinking big? Most people are just too afraid to think big. Well, the reason why I was never really afraid of thinking big was because, I mean, how far can you fall? I mean, it's six feet down, it's the ground, so then you get up again if you fall, and you're going to start all over again. So that's number one. So I'm not afraid of failing. Number two, I think in bodybuilding, with the age of 20, I became Mr. Universe. I accomplished my course. I knew that through hard work and the various different rules that I applied to become the world champion and having a very clear vision that I'm going to be that world champion just like Reg Park, that was important to me. So when I did that, I realized that you can do this with anything. It takes just as much effort. It doesn't take any more effort.  And then it becomes such a pleasure to work with that goal no matter how big the struggle is because you know that every struggle and every effort you put in takes you one step closer accomplishing that goal. That's amazing. Now, number three, my biggest takeaway from the book was reps and sets, repetitions. So many people want to do big things, but they're not willing to put in that repetition like obviously lifting weights, but how do you apply repetitions to other things you did? Like acting, you talk about things. What were some specific techniques? Let me just give you an example. I mean, you know, in bodybuilding and in lifting and in sports, you learn about the reps. The more often you do something, the better you get. So the same is also with the scene. If I study for a scene in a movie, then I do a rehearsal, not just three times. I do it 20, 30, 40 times that scene. So when I get to the set, I know the dialogue and I then can move around freely and just be at the character rather than having to worry about the dialogue and the sentence and the way the structure and all those kind of things. So it's reps. And the same thing is with everything else. Look, in skiing, the more you ski, the better you get in skiing, the more you play the piano. Look at these little girls that we see sometimes on stage. They practice seven hours a day, piano. I mean, it's reps. It's reps, reps, reps. That's why I say the people that said the key thing is in one of the rules of success is to work your ass off. Reps, reps, reps. There is no shortcut. Forget about the shortcuts.  It's amazing.  You talk about this in the book. Daily routine. It's important that people have a good daily routine. What's a rough outline without getting into everything that you think a routine, when you talk about this in the book, total recall, a routine people can emulate that you kind of pioneered? Well, I just have a simple routine. They get up early in the morning. I believe what Ted Turner said, early debate, early to rise, work like hell and advertise. This is what I believe in. I go and debate early. It's around 10 o'clock. Then I wake up at four o'clock in the morning, which is six hours of sleep. That's all you need. If you need more, then just sleep a little faster and then just get going. Then I read. I read the newspaper. I read articles. I go on the Internet and I read. Then by the time comes six o'clock, I get on my bike. I ride down to the gym. I work out for an hour. Then I ride back again at my breakfast. This is a routine just to get the day going before I ever go to the office or before I start some serious work. It's a routine. An empty. You like the empty stomach workout?  Trust me.  I'm the 15% body fat kind of a guy.  I know that for sure. So far, I've never fallen off the bike and never worried about that.  Well, mentors is extremely important. We talked earlier about reading books. I mean, it is great to read about great people, about great presidents, about great athletes, about great business leaders and so on. Because you can learn and you can emulate and you can shoot for the same kind of course because you know it has been already done. So therefore, why not do it the same thing again? And they may be going even beyond that. So I think that motivations and having idols, you know, to me, having like someone like Nelson Mandela that is a great idol of mine about forgiveness and about bringing people together. I mean, who is a better teacher than him? Yeah. Or the courage of a, you know, Gorbachev, for instance, the guy that grew up on the communism and then dismantled communism.  When he was president because he realized it didn't work. How great is that?  So to me, I admire people like that. Or Ronald Reagan, who was a conservative, but he was able to work with Democrats and Republicans in order to get things done. He brought people together. I admire that. So this is the kind of idols that I have. Or yesterday, we put the rest of Muhammad Ali. So I was there at the funeral. He was an idol of mine because he was not only the greatest in the ring, but he was the greatest also with the greatest heart, who was always giving, giving, giving, because he believed that they'd be going to be judged not by how much we make, but by how much we give. So let's give something back. So that's a great lesson for the rest of the world. So there's the islands of mine. Yeah. Well, you're an idol. I did, I have a TEDx talk. It's one of the top 15 and I named you as the top five mentors. So I appreciate this kitchen talk and this was amazing. My dad, my dad was a pro body builder. If he knew I was here, my dad would have a heart attack, but thank you so much. That was amazing. Now go out. I'm telling you this, people know me for having the biggest book club in the world. Top 10 books. Aaron Schwarzenegger wrote a book. It's called Total Recall. It's his autobiography from start to finish. I am not being paid to recommend this book. I am telling you it is one of the great ones out there. So click the link. I'll put a link straight to Amazon. Please buy it. Ask the Levista, baby. On you and I, we're going to the raw report. We're going to be judges. We're going to be driving the Guides and Ferraris and Fortunes and everything. So your favorite book is? My favorite book of all time. Cervantes, obviously. Why? I would just have this. His book is his life. His life is most incredible. Oh, what's the best book you've read in the last 10 years? Instrumentally, in the last 10 years. I can tell you something that I have written a difficult time and someone says it's the best. Someone says it's the best book I've ever done. I could never come up with one, but I can tell you, I enjoy general autobiographies. I enjoy reading about things that I'm interested in. I'm interested in political leaders, if it's Churchill, if it's Reagan, if it's Clinton, if it's no matter what the party is, I like to read history, American history and in general history. So, you know, and then I read a lot of books. Think big. My mind's still running through all the conversations I had with Arnold Schwarzenegger last night in his kitchen. Talked to him for about an hour. It was one of the greatest conversations I've ever had and that's one of the takeaways. Think big. You know, he told me, he said he always thought big. He said, don't worry about failure so much, Ty. How far can you really fall? We're all only a few feet from the ground and I was thinking mentors. You know, he told me about his mentor, Reg Park, his first mentor and I thought, that's what's wrong in the world. That's why it's so easy to feel lost. Who do we have guiding our way? You know, you got to go out and you have to find people. You have to find people who have done it before, who can shorten the path, who can keep you from failure. He told me, he said, don't fail too much. One of the reasons he doesn't procrastinate and can think big, he said, is because he at 20 years old won Mr. Olympia. So he said he got used to success and he tasted success.  Don't always lose. It's a myth that you only want to learn from mistakes. What do you learn from mistakes? They don't have to be yours though. And you can also learn from wins. You know, Arnold learned from his wins. There's my dad. I told him, I said, my dad was a pro bodybuilder. My dad would love that. I'm in here talking with you, Arnold. There's Arnold. Seven-time Mr. Olympia, multimillionaire before he was 30 in real estate, two-time California governor, not a man without flaws. We all have flaws. Always think of that saying, let he who is without sin cast the first stone. But what he's achieved is something you and I can learn from, you know?  He's not perfect there. I'm like, yeah, but have some respect, have some respect for somebody who did stuff.  And he genuinely cares, took the time out to talk to me and have to talk to me. I wasn't paying him to talk, you know? He told me, he said, Ty, he likes to work out on an empty stomach. I said, why? He said, because he always figured he had a little bit too much fat. So I'm in here in the gym. He'll follow his level. He said he didn't procrastinate. He learned from his father the value of not just being lazy, always having something to do. He says he likes to wake up.  Keep yourself, I wouldn't say entertained, it's important to sit back and think. And he told me he likes to do that early in the morning.   Think big. It's all I could think, you know? He's a big dude, strong, but his life was big. Made some mistakes, made a lot of great attempts and successes. Yeah. I'm gonna propose the full talk we did here soon, but just thought I would post that while I was walking in here, get a little weights going. Whenever I learned something from a mentor, I tried to immediately put it in practice.  You hear something, you read a book, do it. Try it. Arnold Schwarzenegger tells me he likes to work out before he eats breakfast.  So who's your mentor? How big you think and how much do you fear falling? Watch from my video. I'm gonna post the full talk, most of it, some of it's private, but I'll post a good, good bit of it. All right. Oh, by the way, leave me a comment.  Some area you're not thinking big that you know you can think big in now.


I've never tried to use one of these things, there's nothing useful for it. I've got to put that on for you. Alright, give me a sec, I'm just going to get out those small pieces. I think I need some number of these. I was wondering if you could see that, can I? I'm going to try to close out what I've got. So one of the speakers in front of the lecture.  I think it's the preferred option. So try using the one you've got. Wasn't HD mic preferred? No, a bit like VJ, do we? It didn't just go on. Perhaps I should plug into a different one, I can plug into something else instead. So if you want to try your... My doggles thing. Yeah, right. I'll try this display port one. Alright, that's about as much as I know about computers. Try your one. That one. This is the VJ port, isn't it? Look at that, there was an insufficient amount of DRM in my other choice as a dongle. Alright, good. Yeah, and then what's after me, there's like nothing after me. Okay, I've got a bit of talk about this, and then Rust, which I could just talk to, people told me to stop. So I can fill up whatever they told me about. So when do you want me to finish? Three o'clock? Okay. Three o'clock's enough. Wow, that looks really big and red. I've got a Mac this week because my Lenovo died and is in repairs at the moment, and I have no idea how to use it. I got as far as installing VirtualBox with Debian on it, and that's all I've got now. So this is just a talk about some things I've been trying the last couple of weeks. It's a talk with sort of more questions rather than answers. But I thought it might be interesting, some of the things I've discovered along the way might be interesting for people. I'm certainly no expert in any of these areas, and I haven't finished packaging Rust for Debian, so this is all very much kind of what I've learnt so far, and I think is accurate. So please tell me where I'm wrong or where I should do something better. First of all, Rust. Rust is a new programming language being developed by the Mozilla folks. It's really interesting. A lot of interesting ideas. I think it's very interesting community developing and very interesting attitude behind the development. So I'm very keen to see what happens with it, and I've been looking at it for close to a year now. I've been following along with development and trying out the nightly snapshots and the pre-releases they've made. They're building up to a 1.0 release very soon now. They've just shipped 1.0 Alpha, I think last week or something. Two days ago, yeah, their original timeline that I saw in December had them shipping 1.0 in February, and it looks like they're on track to doing that. So very soon now we'll have 1.0 release. It's a compiled language. It's a little like CC++. It's down that end of things. Compiles to an executable that you run. It's strongly typed. It's not at all like Python and Perl and Ruby and those things. It's down the C end. For the purposes of the first half of this talk, which I'll be talking about the packaging, the Rust compiler is written in Rust. This is actually not unusual for languages. The Haskell compiler is written in Haskell. The Python compiler requires some Python to get going. The C compiler, of course, is written in C. So this isn't actually that unusual, but it's what makes the packaging a lot more interesting. At the end of this talk, I'll give a little bit of a blurb about Rust, the language itself, and just talk to people to tell me to stop, basically, at that point. So we'll see how we go. But if you've got any questions, just shout. It would be a reasonable... Sorry, the question was somewhat jokingly, when are you proposing Rust as an official language for OpenStack? The answer would be never, given that the OpenStack community is strongly Python-figured biased. It would be suitable for those problems after the 1.0 release is shipped. Anyway, so the challenge is in packaging this. So when you're packaging a new toolchain, how do you get the first package? You need to somehow miraculously break the circular build dependency and cause the first package to come fully formed out of nothing. And then somewhat related to that, there's what happens when a new architecture comes along. Once you've got it working on one architecture, how do you get it on another one? The advantage there is, of course, you can cross-compile from your first architecture, is basically the answer there. Some unique challenges with Rust. Rust knows about cross-compiling and has multi-arc support built into language. And all of the Rust toolchain and the various features around that do a lot of string matches against the GNU architecture triple. And it really wants exactly that architecture triple. And of course, the official architecture triple for a Linux system as generated by the GNU config.guest and sort of related scripts is X8664, unknown Linux GNU. And on Debian, we decided, well, we're not unknown. We know what we are. So we're just going to be X8664, Linux GNU. At the moment in my packaging, I'm just blindly glossing over this and saying, I'm just going to insert the string unknown in there off we go. But I strongly suspect that will come back to bite me at some point. The worst that happens there is I have to define a new architecture as far as Rust is concerned, which is called X86 Linux GNU. That won't be so bad, I don't think. But so far, I'm just ignoring that problem. The more interesting complication is Rust is still a very fast-moving language. And from the conversations I've had with the upstream devs, even after 1.0, they still want to be very agile and be very unrestrained in what they can do with language. They've tagged certain language features as stable. They basically have better call on that. There's basically a stable, testing unstable kind of split of language features. And when you're writing Rust code, you can tag it and say, I only want to use stable features. And the compiler will tell you, and when you're writing a library, you can say, this is still experimental. This particular function call, I'm not happy with that API just yet. And the compiler can tell you, you know, error, you tried to use some experimental features in the program you said you only wanted to be limited to the stable subset. So the Rust compiler itself, they don't want to be limited to only the stable subset, which I think is something they're going to have to change. But so far, they don't want to do that, and we'll see how they go. So currently, they have an incompatible change to Rust about several times a week, sometimes several times a day at the moment, which when you're writing Rust is fine because you're only using a smallish set and you probably won't have to change anything in the Rust code that you've written yourself. But the Rust compiler itself is a very large project that uses all of the Rust features. I don't know the numbers off the top of my head. It would be in the tens a day of commits and the ones that have the breaking change are realistically probably a few a day on a bad day. Post 1.0, I suspect that won't be the case. The language features they break won't be the stable ones, obviously. They'll be the features that will take experimental anyway. Sorry, the question there was what about post 1.0? So anyway, for the purpose of packaging, what this means is you need to build depends on a very narrow and very recent Rust compiler. And you can only really use that to build the next compiler and no other one. And then you have to use that compiler to build the next one and no other one. So it's an extra challenge. Some terminology which I'll be referring to later on. The compiler is broken out into stages like many other compilers. GCC uses similar terminology. The stage 0 compiler is the one they just expect to already be installed. The one that's already available. When you start compiling, you somehow magically acquire a stage 0. And then you use that to compile stage 1, which is a very simple minimal compiler. It doesn't have any libraries built in in GCC. You can't use floating point and things like that in stage 1. In Rust, you don't have any of the support languages. So you can't use a number of exotic language constructs. But it's a basic Rust compiler. And then you use that to build stage 2, which is effectively a full compiler with libraries and everything. In Rust, they use the stage 2 to build stage 3. And stage 3 is theoretically identical to stage 2. They do that mostly as a test to check that they converge at that point. And then stage 3 is what gets shipped, what gets installed on your system is user bin Rust C, the Rust compiler. So again, the interesting part here for Debian packaging is stage 0. And where do you get this from? So normally when you type make install, or when you type make off the upstream source, it goes and downloads a pre-built stage 0 minimal compiler off the internet. You know, Wget in the middle of the script there somewhere. And it uses that to build the rest. As someone using the upstream source, it works perfectly fine. It's very easy. It's simply make, make, install, and done. But for Debian packaging, that's not so good. We don't want to build these downloading binaries on the fly. We generally as a community don't like the idea of blobs that we can't point to the source for and build ourselves. But for the very, very first package, there's no other way around this. You must have a Rust compiler somehow that has appeared. So our choices really are download like the upstream source does. That's not so nice in an auto build environment like Buildies. I could as a Debian package download it beforehand and ship it in the Debian source alongside the Rust source I'm about to compile. Here's the Rust source. Here's the compiler you should use. That would work from a hermetic sense and a reproducibility sense and not require network access while building. In Debian again, we really don't like binary blobs. And even though we can tell ourselves that we could possibly go and build every version of these Rust compilers back through history, it doesn't feel very nice. So what I think I'm going to have to go with is the third option which is simply I make sure every version of Rust compiler that is required is uploaded to Debian and is it unstable and is used for the next version of the Rust compiler. And if I was doing that right now, that would mean shipping a new Rust compiler to unstable several times a day or certainly several times a week. But I don't see a fourth choice here. I had a little bit of thinking about the option number two there and thought does that mean I should go in contrary because I've got a perhaps a non-free binary or perhaps a binary that we're not happy with. But then it's a bit strange too. If we were another distribution, I think you'd be very happy with either one or two and we just ship it if we were less demanding of ourselves. And the output is still the same. The final compiler is still the same no matter which one of these you choose. So here's what it looks like in Debian terminology. So you have a Debian control file that lists all your metadata about your package. The general problem is that first box there where you're going to have I'm going to build a Rust C package and it's going to build depend on a Rust C package. That's what the circular dependency looks like. And in particular it's going to be a particular version of it. So I went looking around as to how to do this. For other languages, C, this is still a problem. But the problem arises less often because the languages are moving as much slower. And for GCC, they're very liberal and they say you can compile with any C compiler, not just another GCC. But the same problem still exists.  Here, have some files on disk and an editor. Enjoy. And you would open up Debian control in your favorite editor and you would just comment out the bits that build depend on itself. And then you would get a C compiler from somewhere and you would magically or a better example of your Haskell compiler you get from somewhere and then you would use the Haskell compiler already installed and use a local bin to build the Haskell compiler package that you're about to build. And then you would uncomment the bits from the Debian control file. That's where you go. Now there's some new features coming somewhat through Ubuntu and somewhat through various Google Summer of Code projects over the last year. As far as I can work out, these aren't used anywhere in the packages yet, but they exist in the tool chain and they're documented. And so this is what I'm trying to use now, these very, very new features. So the first one is build profiles. You can see on the right-hand side box there, you put some little angle brackets things and you can list profiles in your build depends. And it's basically a filter for if you're building with the, in this case, not with the Stage 1 profile, you should consider this build dependency. So in this case I say I would like to build with the Stage 1 profile and that looks like that DPKG build package command there. And then that says, right, I'm going to ignore those build dependencies. That's all done automatically. You don't have to use an editor to achieve the same result. Now the way I've chosen to do this as well, I'm going to build a Rust C bootstrap package, which I only build if I'm building in the Stage 1 profile, build profile. And I know that that's a minimal package that is not fully featured. I'm only going to build the Stage 1 compiler. I could build the full compiler, but I'm not going to bother wasting that much CPU. I only build the Stage 1 compiler. I put that in a package and I intend to never upload that to the archive. So you would build this, it spits out a Rust C bootstrap.deb. I would DPKG-I that, and then I should be able to immediately go and build the full Rust C package using a normal DPKG build package, because the build depends on how satisfied using the Rust C bootstrap package. That's the theory anyway. I haven't quite got that far in the packaging, but I'm pretty sure that'll work out as described there. So that's one new feature. This turns into just a bit more detail there. This turns into setting the DebBuild profile environment variable. So in your Debian rules or anywhere else, you can check that environment variable and enable or disable certain features, depending on what you want to do with that. So I'm changing the build target that I build later on. And DPKG build package has support to pass through the right flags and environment variables down through the various DPKG tools and your Debian rules file. So that tool chain is, as far as I can tell, all there. And even apps, in fact, can run feedback source, dash dash compile. It will also set the flags to DPKG build package appropriately. So that feels like it might work okay. So far, I've got most of it through the packaging and it seems to be working out okay. This one I know much less about, and it's something I've never tried with or without the new way of doing things. So I'm much less certain about this part of it. New architecture. New architecture comes along. The theory is very simple. The theory is you use a cross compiler on an existing architecture. You have all of the appeal dependencies installed on the local architecture. You use the cross compile to make the first couple of packages for the new architecture. And then you can install them and away you go. And again, in the past, that used to involve running editors and hacking things around and using a cross compiler that you might have got from some other source. It might even have been Yocto or Open Embedded or something. And you use your cross compile environment to bootstrap that first build essential set. There are also some new features here, which again, nothing that as far as I can tell uses yet, but the pieces seem to all be there. The idea is to use multi-arch support. So you know nowadays, Debian can install more than one architecture on your local system. This is usually only used for AMD64 and i386, being installed simultaneously, so you can run one. That's about the only use for this rather complex feature. But you can do this as well. You can get any architecture. You can tell your local DPKG about it, and then you can install packages from that architecture. You might not be able to run the binaries from it, but you can install the packages on disk. So in this case, we say, I'm going to tell about the new architecture, and that way the various libraries can be installed from that architecture. And you can do that to get source, and it'll pull down the build dependencies from that other architecture, but run the compile using binaries from your local architecture. And hopefully that'll all just work out. Under the hood, this sets these environment variables. There's a family of environment variables about the builds, environments, and the target environment that you're trying to work on. I did try to build four. And yeah, so long as you've built your Debian rules, set up, and your upstream source deals with cross-compiling, which Rust does, and my packaging hopefully does, that should all work out just okay. I'm a lot less certain about all that part. So if anyone knows about these pieces, I'd be very interested in talking to you after this. And again, this is still, I don't see any existing packages from my look-around at GCC and Haskell, and the very slightly suspects. There's some experimental packaging that's taken advantage of these, which are proof of concepts. But again, as far as I can tell, the pieces are actually in the base system, so I should be able to use it. And there are the two sort of documents that I've built a lot of this on and am learning from as I work this out, particularly the first one has a lot of information. The second one talks a bit more about the Ubuntu features and the Debian features, and it's a bit hard to tell what's landed where and things, but I think we're good. Yeah, and that was that part. Is there any sort of questions about that? There's not a lot of information there I know, but mostly because it's something I'm still learning about. But that's the principle of it. The previous world was a lot more packed up and using pre-existing cross-toolchains, typically open embedded or something like that to make magic happen, and then you would rely on a clever person to make magic happen and it would just work. Yeah. So there's another thing that someone was working on to do the stage 0, stage 1, stage 2 automatically to teach the archive machines about the different stages. Did you look into that? I don't think it's sort of polished in the tool chain yet. I'm just curious if you looked into it and whether you think it would have worked for Rust. I don't know what you're referring to there, so no I haven't. Teaching the archive. Oh, you mean breaking out separate packages for stage 1 versus stage 2? That was... There were a couple of implementations discussed on dDevelop. I'll take it to the hallway, I think. Yeah, I've got to cut up. I have messed quite a bit with open embedded previously and open embedded or Yocto as a lot of that community has regrouped around is a really impressive piece of work and it's designed for embedded uses where cross-compiling is normal. You often can't or certainly don't want to run your tool chain on your microcontroller or even an ARM phone or something. You really want to do it on your powered machine and then build binaries for your ARM that you then run there. So they have a very strong, very clever, very powerful set of packaging, essentially. They've got all of the upstream sources and patches to them where it didn't already work to make it work with cross-compiling and they can do things that we know and they're close to being able to do like Canadian cross-compilers where you're building I'm running, I was actually using this once. I was building an unofficial Android tool chain and I was building on Linux building a compiler that would run on Windows that when you run that compiler would produce executables for Android. So that's called a Canadian cross-compiler where you have three architectures involved and the Opera stuff deals with that just fine. It's very, very impressive, whereas the Debian stuff we're only really getting to the point of thinking of the two architectures but still better than before. So, I'll jump on to some Rust language stuff. There's another talk later on in the main conference about, by someone a lot more qualified to me, talking about using Rust in the how you would use Rust in the Mozilla sort of rendering engine. So I'm certainly no expert here but I'm just going to talk about it anyway because I can. I've got a microphone. So it looks like CC++ it uses LVM underneath so it's got quite sophisticated optimization and cross-compiling and all the sort of features it gains from LVM including a debugger, the LVM debugger LDB which can be used to debug Rust binaries. It unashamedly borrows lots of ideas from all around what's going on at the moment with language development. It gets a lot of strong type system from Haskell all it gets some of the interfaces and channeled ideas from Go and from other languages like Haskell. It has a very strong, the sort of new thing it brings is a very strong ownership of data. Every piece of data is owned by exactly one owner at any point in time. And when that owner is finished with the data, we're finished with that structure, it's deleted. No exceptions. The compiler to help you with this, the compiler has a very you can annotate things as pointer lifetime and I'll show examples of this later. You can say I'll accept any pointer, my function can accept any pointer to this thing as long as it has a lifetime of at least this and you can name the lifetimes and then I'm going to return a pointer that has the same lifetime as that. So the compiler can make quite strong assertions about when a pointer is valid and the memory that it points to is valid. So you should always have safe memory in your Rust program. A segfault or a dangling null pointer should be something that is impossible to happen. Assuming the Rust compiler actually compiled your code. The other thing that interests me particularly about Rust is that it has a very minimal run time. All the cleverness happens in the compiler. When the compiler is finished and given you an executable it looks a lot like what a C compiler would produce. It has almost no run time, a couple of libraries that might get deal opened but there's nothing very clever anymore at that point. So it's very easy for example to call into a Rust program from C or the other round. You can create a .so from Rust and then deal open it from a C program and call functions in it just like it was a C library. You can even go as far as doing embedded programming in Rust where the embedded program itself doesn't have any of the cleverness and doesn't need any of it but you've got a very safe program that is now running on that embedded program. Theoretically I don't think anyone's tried it yet but it's something they're aiming towards is you should be able to write a kernel module in Rust that then gets loaded up in what is otherwise a very C program. You can tag your structs and your functions are saying these should be C compatible and it makes sure it doesn't mangle the function name and it makes sure that the struct padding and field ordering is the same as what a C compiler would do so you can pass these straight through you can get pointers from your C program pointing into struct members and it should all just work. Which is for me quite interesting because it makes it suddenly a very useful language for real-world problems unlike some of these new ones like Go is a nice language as well in a lot of ways but you can't mix it well with existing code quite to that extent. I started putting bits of programming language in here and realised that there was already a website that did that better than I could in particular it has syntax highlighting in a way that looked better than I could do in my own slides so I'm just going to borrow from here in the world slash slash comments they look just like normal it looks like C++ or something like that we'll see from a first glance fn is a function declaration main is the main function statements end in semicolons you'll notice there's an exclamation mark after printlum that means printlum is a macro it does a bit more than just a regular function call you can treat it like a function call you should be slightly aware that it does a bit more in the compiler in Rust's case you can do things they're not the same as printf format strings but they achieve the same sort of results you can put curly braces in there and you can refer to arguments and substitute them in nothing very exciting as I said because this is a macro that's not being done at run time it's actually done at compile time the compiler will parse the string during its compile and it will break it up and it will generate instead convert what's a good example the second line there, the second printlum that will actually turn into make31i as a string and then print of space days it's not trying to actually interpret the format string at run time like a regular cprintf would do so you get very accurate compile errors of course because it's already tried to do the hard work at compile time there's a wonderful example of what macros can do which this site doesn't have examples of which is the regex macro there's a regex library which is just like an language which would use a regex library but it includes a regex column macro and if your regex is a literal that's already available at compile time it will parse that and generate it at compile time so you're getting a full not only do you get first of all the compile error out if your regex is not valid so you're getting checking at compile time of your regular expression but you're also getting optimization of the VLVM engine as applied to your regular expression after it's been converted to all this code so you don't even have to re-compile the regex at run time it's already happened for you which is actually pretty impressive and you can implement your own macros but that's experimental they still haven't worked out what they want the API to be like and how they can guarantee forward compatibility so it's a little questionable right now and of course running the Rust Compile is very simple, it's just Rust C in the name of your source usually ending in .rs there's nothing very interesting there there's things like in compassion query things like that yes, I'll get them a little later they work kind of the same way so variables look literals look like C operators look like C there's all the usual things you use to one slight difference is you introduce a variable with let you define a variable with let and they're all read only by default unlike C everything in Rust they try to make the laziness the lazy version of typing it is the most flexible for the compiler so it is read only by default and you have to type something extra to make it mutable the MUT in that second variable of that fields in a struct can be reordered by default and if you don't want that you have to type something extra and similar there's lots of similar decisions like that all the way through where the laziest option is the most safe and the most aggressive for the compiler option which is interesting choice any unused variable is a an error or warning unless you prefix it with underscore and you see the mutable example they're in that they're trying to modify mutable variable which works because we've tagged it but if you try to modify the other one it throws a compiler right there are the usual types there's string types which is actually a pointer to that's not the example I wanted but anyway there's a string type which is a pointer to a string kind of like a C string and then booleans and various types of integers and floats as you'd expect there's a unit type which only ever has the value antiprints it's used in some places in the templating engine later on where you don't really want to put a type in type inference you very rarely have to actually say what type you're using whenever you're declaring a function you have to give types for the arguments and the return value almost everywhere else you don't need to mention types the compiler can work it out the compiler goes oh I see you declared a variable there oh I see you passed that function down there that function takes a float therefore your variable must have been a float and similar sorts of things this example is an interesting one the VEC here is a vector, one of the built-in libraries and it's a generic type it's like a template type in C++ so it's a vector of something you didn't say what type it was as part of the declaration but later on you've pushed elements on there and that element was an unsigned int thanks to the U8 suffix or an unsigned 8-bit int so the compiler can then work out that a VEC must have been a vector of unsigned U8 types so if you tried then to do something that conflicted with that assumption you'd get an error because it would be now a type conflict so it's interesting and you very rarely have to actually mention types everything is an expression which is another way of saying everything returns a value there's no such thing as like in C you have an if lock and then you have a separate thing which is that question mark column the turn operator in Rust both the things are the same there's no question mark column you just use if else and if else blocks have return values the last statement in the if block is it's a value so if you want to do the equivalent of a ternary you do that's not an example of it you do the same thing so there's one being treated like a regular if block there's no kind of return value that's interesting there it's returning actually the unity type which is just discarded this one down here is returning a value here and a different value here so this is acting like the C ternary construct and compiler will verify that both branches return something of the same type now this one needs they didn't have to have this in the language but they chose to make it sort of this version where you're returning a value need the semicolon at the end to make it look like this whole thing is a statement here let begin equals something something semicolon and if you this one doesn't need a semicolon and that's they didn't have to do that in the language and they chose to because that's now a hint to the compiler to say hey I actually wanted to use a value from this and the other one is hey I didn't want a value from this and so if you mix up the two uses it actually throws an error it's able to tell based on the presence of a semicolon how you intended to use this if block yeah well it can but it's always safe to throw away a value and in the second example the question was why don't you just infer that and you certainly could have but in the second example I could have I could have missed some syntax up here and I would have gone to all this work here and then discarded the 10 times n or the n-2 value and the compiler couldn't have told me I was wrong because it's still valid you're allowed to throw away the value so they make this if you put a semicolon after it says oh I meant to use that value tell me if I didn't use it for some reason for some reason it's just a thing there are looping constructs like C they're not very interesting there's a 4 over an iterator loop and there's a loop which is for infinite loops and you've got continue and break like normal and you can break more than one level using a little label to refer to the one you want to break out of again not anything particularly novel compared to some other languages here's the hash includes part instead of includes you have modules which are more like to use them they're a little bit more like python where you use a module up atop there you use a module and it gets entered into your namespace and you can refer to things in there you're defining them they get defined like this with a mod keyword and it's not worth going to details here but you can declare kind of namespace functions and that sort of things when you, when these get compiled they call the compilation unit the .so or the .a is called a crate in C and particularly in sort of packaging experience that deviance had you remember a few examples like OpenSSL where for a while there was two versions of OpenSSL floating around and they had various other things that would depend on one of those two particular versions but the two versions of the library had the same symbols in them the same I don't know what OpenSSL symbols are OpenSSL sign this thing for me function and this brought all sorts of very subtle problems because when you're in C you've got one sort of symbol namespace you can do lots of tricks with the down at linker but the fundamental problem is you have you don't know whether you mean the symbol from OpenSSL1 or the symbol from OpenSSL2 and one of the ways around that probably the better way around that is symbol versioning where you can tag all of these symbols in the dynamic linker as you know with the particular version you want and then when you link your program you say link against exactly this version and then if later on you deal open another library that linked against the old version they're both referring to just their version of OpenSSL and that was kind of the solution that Devian had to go through Rust has that same thing but from the beginning because they've learned from that experience so every library gets built with it doesn't put a symbol on it puts a like a checksong of the ABI effectively the compiler used to compile it and grows things about the library and that's your SO name and all the symbols are tagged with that so it's very straightforward to have somewhere in a Rust program two versions of the same library loaded up and used by different pieces of that Rust program and the symbols won't conflict it'll all just work out which is interesting yeah pattern matching a good example of this pattern matching was actually on the Rust front page so I'll use this example here's another example of a Rust program which shows up a bunch of other features so there's a for loop going over an iterator there the for token in chars so it has iterators built in they're very simple you can define your own and very nice syntax to use and then this match operation matches sort of like a select in C a switch statement sorry in C except normally it's exhaustive it makes sure that every single case is covered if you're matching over a new meta type it'll say are you matching every value without a new meta type and give an error if you're not matching the wild cards so the underscore at the bottom is the anything else match which will work fine and it's a lot more powerful you can do a lot more things than what's in a simple example but you see the match key would use a lot in Rust and so this example here is we're declaring in a mutable program we have a mutable accumulator and then we're going over each of the tokens in this string and if it's a plus we're matching the accumulator by one if it's a minus we're decrementing if it's a 2 and skipping over so this will skip over the spaces in particular the spaces between the characters and project out so when you similarly get 0 then you divide by yep, good question minus divide is that right? would that have done 0? yep divide 0 by 2 is the most fine oh divide 0 by 2, yeah so let's, alright fine there you go um so by example that one there yeah there are structures, oh so pattern matching in the match statement you can actually match on all sorts of interesting things, you can match on literal values, you can do structure like tuples for example here you can do a lot of very powerful things which you certainly won't understand from my simple, I'll show you an example there there's structures, structures are boring they're just like C structs there's generics, so these are like the templates in C++ they're more powerful than templates in C++ and not quite as powerful as what you can do in Haskell there's somewhere in the middle um but yeah, whatever, so you can say a list of something or a list of something that implements this particular behaviour for example, so you can have um abstract types that build on other abstract types and they don't care what that other one is, so long as that other one also implements certain types of behaviour um, so you can build quite complicated things all around abstract types um here's where the memory ownership comes in, so you can have if you're a struct, you can have another structure inside you and you obviously own that quite clearly because it's embedded in your larger structure you could also have a reference a pointer to that structure stored somewhere else um, and you can have a box is an owned pointer so you're pointing to it and saying and I also own this, so again if I get destroyed you should also destroy that other thing over there um and this is where some of the real type safety comes in, if you end up passing this watch this trick, we're borrowing they call it, so taking a reference to something is known as borrowing and you can pass a read-only reference to something as many times as you like you can have lots of read-only references and they're all pointing to the same thing you can only have one mutable reference and if you have a mutable reference while that's in scope you can't have any other reference, mutable or readable read-only so this is where a lot of the type safety comes in one and only one owner and if you pass by value to a function you are passing ownership of that whole object to that function and if you try and use it later on in your line of code you'll say no, sorry, you've given it up you've handed it over to someone else um, so this leads to an interesting effect of what's a good example here, ownership so the most surprising thing probably coming from a C background is it equals, doesn't mean what you might think it means on a complex object if you do let A equals B you are passing ownership of everything that was in B to A you are moving B to A and you can no longer use B anymore let A equals B print B compile error which is probably the most surprising thing about this language coming from a C-like language now if that type implements a copy operator which of course ints does and lots of your basic types then let A equals B is fine, what it actually does is a copy and you now have two copies which are just fine but for a big complex type it'll be a move um, you never get caught by surprise there because the compiler knows very well which one of those two is done and will give you compile errors if you expected the wrong behavior than what it implemented um uh, lifetimes lifetimes are a little quirky to explain so I don't know how this is going to go but you say things like I have a reference to something and that something must last for at least this long and then you can say my function takes a pointer that must be some lifetime and then it returns a pointer of the same lifetime might be a common thing to do you're basically taking a pointer and doing something then probably returning the same pointer and then your compiler who calls you knows that argument you passed in that point you get out is valid for just as long as that thing I put in there so I can use it in some surrounding code quite a bit um, and there's lots of stuff around it but the compiler can make very strong assertions about how long, how much of your program a certain pointer is valid for which is quite powerful and again you never end up with dangling pointers it's just not allowed to construct them there's a you have closures, you can create functions and callbacks which is something that Go can do but something that other C-like languages have a pretty tough time with they use the slightly unusual pipe symbols to introduce the closure arguments and that's most of the interesting features, the rest is getting very esoteric you'll see things like results, no I wanted option, where's option option is used frequently it's a type that has something or none and to use this often where you might use a null pointer in C you might say it's a pointer to something or it's null in Rust you have the option type which is the same sort of idea except now when using a match statement you have to include a case for none or it's a compiler so you have to have thought about none case you have to do something sensible and in particular you can't get a pointer to what's inside the option structure unless you've got some code that has said is it some and not none so it's always safe you can never get a null pointer where you want weren't expecting one a null value where you weren't expecting one from an implementation point of view it has an unsafe idea you can say this bit of code is unsafe and then all these checks are out the window you do anything you like and so a lot of the standard library the hairy bits of the standard library is implemented using unsafe blocks so the library itself is implemented in fairly straightforward Rust even when it's doing something amazingly scary like atomically reference counted shared objects and all it is is a little unsafe block that goes okay increment the value increment my reference counter get the pointer to the value inside now exit the unsafe block everything is safe again now I know it's not going to be freed because I took care of that with the reference counter and return a pointer again so as long as the memory safety is guaranteed again once you exit the unsafe block everything is fine so it's very powerful and very easy to do something get it out of the way if you need to do something scary when you have threads you have tasks which are normally threads and you can't share anything between tasks which is interesting unlike Go again very strong ownership this bit of data is owned by that task and now the guy can't even look at it you can pass objects between tasks and if you want to do something like a shared cache that's when you use this ARC atomically reference counted type which uses a little unsafe bit of code to say okay I'm going to cheat I'm going to look at my bit of memory and go yeah yeah whatever it's read only but it's reference counted and you can get a reference and you can get a reference and when you've all got rid of your references then I'll free up the shared object but unless you use one of those sorts of unsafe options or one of those options that uses unsafe to do something scary you've got every thread owning one bit of data and you can pass them explicitly and send channel idea to another thread so you'll never have should never have data races of those sorts you can still of course have races to external resources if you're creating files on disk and someone else is deleting them you can still confuse this off that way but hopefully it won't be a memory corruption type of race so this is why I quite like it it's got some really interesting ideas it has the only other bit not mentioned here which is a rust packaging tool that helps you build it takes a place of make an autoconf and distribution sort of channel and all those sorts of those problems and it's quite interesting it has a few interesting ideas of its own it's designed to be portable even to non-posixy places like windows so it doesn't call out to make it has that functionality itself it has an autoconf like idea but they said shell is a bit hard to guarantee it's going to be everywhere what can we assume exists on the target platform only a rust compiler so it has the ability to run some compile and run some rust code which may in turn use lots of other libraries so it doesn't have to be simple rust code that then gets run works out some things about your platform you're on and then easy use to influence the actual build proper for your package on that platform which sounds weird but it's quite novel, interesting anyway if you have questions come and ask me don't know why I should stop talking now but by all means tell me about the ask me questions and I'll tell you about it I've been trying to write a bit of code in rust over the last couple of months and I've been using both Python and rust and they're kind of completely opposite languages in everything they do thank you


Hi, I'm Zor. Welcome to Unisor Education. Today we will solve some problems about prisms. Obviously, this is part of the Advanced Mathematics course on Unisor.com. The problems are actually described on the corresponding webpage as notes to this lecture. And solutions I'm going to discuss right now. So it's not really a lecture, it's kind of a problem-solving exercise. Alright, so let's just go. The problem number one. You have a cube which is just a particular case of a prism. So this is our cube. What's known about this cube is the length of its main diagonal from A to C prime. Which is actually the same as from B to D prime. Doesn't really matter. So let me put it this way. This is my main diagonal. So this is what's known about this cube. It's equal to D. What I have to find out is its volume and the total surface area. Well, obviously, if I know the side of the cube, then I can always find the area of each face. Now there are six faces. So it's time six. So that's our total surface area. And the volume is equal to area of the base, let's say A, B, C, D, which is also known if I know the sides of this square, times the altitude, which is just another edge on this prism, which is again the same thing as every other edge. So everything goes into knowing the edge. Now we don't know the edge. We don't know this A, B or B, C or whatever. But we do know the main diagonal. And now let's resort to what is the main diagonal of a right rectangular prism in terms of its three sides, which are going from the same point. Let's say this is A, this is B and this is C. Well, for a cube, they're all the same. But let's just consider it's a general right rectangular prism. Now in terms of these, we can approach this problem. Actually, we did solve this problem before, but I'll just remind the solution. If I will connect B and D, I will consider first I would like to find out what's the BD. And BD is just diagonal in this rectangle. So BD square is equal to A square plus B square. Now if you consider a right triangle BDD prime, well, it's right because DD prime is perpendicular to DD, obviously. So in this right triangle, the square of the diagonal BD prime is equal to BD prime, BD square plus DD prime, which is C square. And substituting BD square with this, you will see this. So my main diagonal square is equal to sum of the squares of three sides, three edges, which are originated at the same point. Now back to the cube, D square is equal to, this is A, this is equal to A, and this is equal to A because all edges are the same in the cube. So it's 3A square from which A is equal to D divided by square root of 3, right? So now knowing the diagonal, the main diagonal, we have determined the edge. Now knowing the edge, we can very easily find the volume and the square and the surface of the prism. So the volume is equal to area of the base, which is A square, obviously, right? Times the height, which is D, sorry, which is A, which is A cube. So the volume of the cube, as we know, is equal to a cube of its edge. And now I know what A is in terms of D. So it's D cube, square root of 3 in cube, it's 3 square root of 3 and divided by 3 cube 27, right? Which is D cube square root of 3 divided by 9, am I right? D cube 3, yeah, it's about right. Now the total surface area of the cube is equal to 6 areas of each base. They're all the same and they're A square, which means it's 6 times D square times one-third, right? Which is 2D square. That's total area. Remember this, total area of the cube is equal to double square of the main diagonal. We will refer to this a little later in another problem. So that's it for this problem. Now, next problem. Let's consider a hexagonal prism, which is number one, right? Which means all the side edges are perpendicular to the base. And it's regular, which means that the hexagonal in the base is the regular six-sided polygon. So let me, well, now I'm challenged by this picture. So let's consider this is the plane where the upper base is and this is the plane where the bottom is. Now here we have, now, yes, my graphical abilities are not that good. How about this? Something like this. And let's connect it. No. All wrong. Sorry about that. Let me do it without these planes. So this will be my first and this will be my second. Something like this. And now let's connect it. Does it look like a hexagonal? Yes. Let's consider. Now, right? Because all the edges are perpendicular and regular hexagonal because this is a regular six-sided polygon. Now, what I do know about this is I know that all edges are equal to D. This is G, although it doesn't look like they're equal to each other in my picture, but they are. So question is again, we have to determine the volume and total surface. Okay, now let's start with the area of the base because we need it to calculate the volume, right? Now the base is the right hexagonal. Now, this is easier. And I know that all sides are equal to D. Now, since it's hexagonal, the whole 360 degrees divided in six parts, which means that every angle is 60 degrees and obviously we have the equilateral triangle, so these are all D as well. Now, the area is six times the area of a triangle. Six times S of triangle. Now, this is a base. Now, what is the area of triangle? Well, if you have a triangle, equilateral triangle with a side D, then D, well, this is obviously 30 degrees and this is 30 degrees, this is 60 and this is 60. So this is the right triangle. If this is 30 degrees, this is D, this is D. So this is D over 2 and this is D square root of 3 over 2, right? So the area is equal to D times D square root of 3 divided by 2 and times 1 half because it's a triangle, right? So it would be square root of 3 divided by 4 times D square. So that's the area of this triangle. So this one, therefore, is equal to 6 times greater, so it's 3 seconds square. So that's my base. Great. My altitude is D, which means that the volume is equal to 3 square root of 3 D cube divided by 2. I think it's right. Okay, so that's the volume. How about the total surface area? Well, total surface area is two bases, the bottom and the top, which is this times 2, which is 3 square root of 3 D square, plus six sides. Now, each side is actually a rectangle D by D, which is a square. So it's 6 G square. Or if you wish, you can factor out 3 G square root of 3 plus 2. So that's the formula for the total surface. That's it. Next problem. Okay, we have a right rectangular prism. Let's say A, B and C. Right rectangular prism with any lengths of the edges. Now, let's say this is main diagonal and its length is G. So my problem is I have to prove that D square is greater or equal than one half of the total surface of the prism. Now, first of all, in terms of A, B and C, we have just calculated in the previous problem that D square is equal to A square plus B square plus C square. So that's what we can substitute here. Now, how is area expressed in terms of A, B and C? Well, two bases, each one has A times B, right? So it's 2AB. That's the area of the two bases. Now, left and right are BC, right? So it's 2BC. Now front and back are AC. So what I have to do is I have to prove that double this or half of this is D square, which means this is greater than half of this or double of this is greater than this. Let's put it this way. 2 times A square plus B square plus C square is greater than equal than 2AB plus 2BC plus 2AC. Now, is that right? Well, let's rewrite this differently. A square plus B square plus B square plus C square plus A square plus C square. Now, that's the same thing, right? 2A square, 2B square and 2C square, that's the same thing. Now this and this. Obviously, we all know that A square plus B square is greater than equal to 2AB, why? Well, because if you will do it differently, this is an obvious inequality because on the left you have A minus B square. Square is always non-negative. So A square plus B square is greater than 2AB, B square plus C square is greater than 2BC So each member is greater than corresponding and that's why the whole inequality is proven. Now, when is the equality? When the equality comes to this being equal all the time, which means A should be equal to B, B should be equal to C and A should be equal to C, which means it should be a cube. And if you remember, just in one of the previous problems, we had an equality that the square of a diagonal is equal to double total surface. I told you to pay attention to this. That's exactly what happens. So this is a general inequality and the equality is reached when it's a cube. Okay, next we will have a couple of problems with prism which is not right prism. I mean we all kind of used to think about prism as right prism. But if you remember, the definition of a prism doesn't really imply it's being right. So the age is not necessarily perpendicular, I mean the side age is not necessarily perpendicular to the base. So these two problems which I'm going to talk about, they are related to this case when it's a slanted prism. So let's consider a slanted triangular prism. And what's interesting about this prism is that it's not slanted enough. This would be slanted enough. And this is my side ages. Alright. So it's slanted. But however what's important is the following. Now I actually draw a triangular prism. It doesn't really matter. Whatever I'm going to talk about is related to any prism. So let's assume that I have cut the prism by a perpendicular section to the side. So it would be something like this. So now I know that this is perpendicular. This is not. Although it looks like a perpendicular but it's not. I intended to do it in a slated fashion. You know what? Let me just do it a little bit more slanted. A little bit even better. Something like this. And here I will do the same. Maybe this looks like more like slanted. So what I'm going right now to do is I'm cutting the prism with a plane perpendicular to the side age. Well, to all side ages, obviously. Because they're all parallel to each other. Now, the point which I would like to make is that the side area is equal to, which means area of all side faces, bases we are not including. It's equal to the side age, which is A A prime, times P, which is a perimeter of whatever the polygon comes when I cut the whole prism with this plane. So this section is some kind of a polygon because we are in the plane, which is cutting perpendicularly to edges. So whatever the perimeter of that thing is would be this way. Now, let's just put some letters. In this particular case I will put M and P, let's say. Now, it's actually a very simple problem. I mean, I'm talking about the conditions for a long period of time, but the problem is actually very simple because we know that every face, every side face of this prism is parallelogram. Now, the side is, the face is a parallelogram and its area is equal to one side times the altitude to this side. Now, M and N, since the whole plane, which is cutting my prism, is perpendicular to all side edges. So M and N is perpendicular to A A prime, which means that the area A B B prime A is equal to A A prime times the altitude M N. Similarly, the next face B C C prime B prime is equal to what? It's also a parallelogram, right? Now, it's B B prime times altitude towards it, which is P N, since P N is perpendicular to B B prime. Finally, A C C prime A prime is equal to C C prime times M P. Now, if you will add these together, what will you have on the left? Sum of the areas of all side faces, which is basically as a side. What do you have on the right? Well, A A prime, B B prime and C C prime are all equal exactly the same. So that's why I can put A A prime. This is also A A prime and this is A A prime because all side edges are the same in the prism. So I can factor it out and what's inside of the parenthesis? M N plus P N plus M P. M N plus P N plus M P, which is perimeter of this, in this case triangle, but in general case it can be prism with any number of vertices on the base. That's it. This is our first problem with a slanted prism. And here is another problem, the last one for this lecture. So again you have a slanted, in this case I'm specific, this is a triangular prism and it's slanted. Now, what's important about this prism is the following. First of all, base is a socialist triangle. These are equal. Obviously both bases because they are congruent to each other. What else is important is that this particular H, A A prime, has the same angle with both this and this. So it's kind of equally slanted towards both sides of this isosceles triangle. So the whole prism, if you consider first the right prism and then you slanted, so you're slanted towards middle basically between these two sides of the isosceles triangle. So that's how these two angles are equal to each other. So angle A prime A B equals angle A prime A C. A prime A B is equal to A prime A C. Now, what you have to prove is the following. That A A prime is perpendicular to B C, which again seems to be intuitively obvious because again, if this is your prism and these are two equal sides of the isosceles triangle and you are slanting it this way. So basically this used to be vertical, now it's tilted forward but still it will be perpendicular to the opposite side. So that's what we have to prove. Okay, how can we do it? Well, and then there is another little side theorem about this but I will mention it later on. Here is what I'm suggesting to do. First of all, let's draw a perpendicular from A prime to A B within this front face. So from A perpendicular to A B within the A A prime B. That would look like this. Yeah, not very straight. It would be nice if it's also a straight line. Let me try again. Okay, now let's drop a perpendicular from A prime to the plane A B C. It's somewhere here. You're dropping the perpendicular. Okay, so let's say this is P and this is Q and connect them. Now what can we say about this? So Q is a projection from A prime down. It's a perpendicular to the plane. Now A prime P is perpendicular to A B. What I would like to say is the following. Since A prime P is perpendicular to A B. I'm stating the following property. PQ, the projection of A prime P, right? Since A prime is projected to Q then the whole A prime P is projected to A prime Q because P is projecting to itself on the plane. So this line A prime P is perpendicular to this line. Then I'm stating that this projection which is PQ also is perpendicular to A B. So A A prime P is perpendicular to A B by construction. Now I would like to prove that PQ is also perpendicular. Now how can it be proven? Well, actually it's very simple. Consider a plane A prime PQ and the line A B. Now line A B is perpendicular to one line which is A prime P because that's how we constructed it, right? But it's also perpendicular to A prime Q because A prime Q is perpendicular to the triangle at the base and therefore it's perpendicular to any line on the base, right? So it's perpendicular to A B. P is perpendicular to both A prime P and A prime Q which means it's perpendicular to an entire plane A prime PQ and therefore to every line on this plane including PQ. So as a consequence we see that PQ is perpendicular to A B. Now if I will do exactly the same towards AC which means first I will put a perpendicular to AC. Let's call it M and connect it with Q. Similarly again A prime M is perpendicular to AC by construction and as a consequence I see that MQ is perpendicular to AC. So again if the line is perpendicular to a line then its projection is also perpendicular to the same one. Now let's talk about triangles. Now A A prime P is a right triangle, right? Because this is perpendicular and this is an angle which we will consider. Now A A prime M on that side of the prism on the back side is also a right triangle with a Q-tangle A prime AM and since these angles are equal to each other A prime AP and A prime AM they are equal to each other. Therefore the triangles are congruent, right? We have a hypotenuse and an acute angle in the right triangle that's sufficient to congruence of the triangles which means the length of A prime P and A prime M is exactly the same. Now we go into another pair of triangles A prime MQ and A prime PQ. So we have two right triangles, hypotenuse A prime M and A prime P are the same and casualties A prime Q is common, they share it which means triangles are the same, which means these two are the same. So MQ is equal to PQ. Finally I connect A and Q and I will consider everything in the area, in the plane of ABC. So I have ABC, I have Q in the middle and I have two perpendicular from Q, M and P and they are equal to each other. Obviously the triangles AP, Q and AMQ are congruent because they share hypotenuse and one is equal to another. So triangles are congruent which means these two angles are the same which means Q is on the angle bisector of this triangle ABC, angle bisector. And we know that in a socialist triangle, angle bisector on the top is actually the same as median and is the same as altitude of this triangle which means that this line which is basically a projection of AA prime is perpendicular, AQ is perpendicular to opposite side to BC. This line is perpendicular, this is right angles, which is actually what we wanted to prove. And now since we have proven that AA prime is perpendicular to BC we can also say that AA prime is parallel to BB prime and to CC prime, right? Which means these two lines also perpendicular to BC. Which means that BC, C prime, B prime is not just a parallelogram but it's a rectangle since these angles are perpendicular. These lines are perpendicular, angles are right angles, 90 degrees. That's the end of it. So not only this line is perpendicular to the opposite side on the base but also one particular side face remains a rectangle as it was if it was not slanted. So whenever we are slanting right in the middle of this isosceles triangle this particular face remains rectangular. Well, that's it for today. Thank you very much. What I suggest you to do right now is, and that's a very, very important exercise, write down a proof in every case of these five problems especially the last one. It's a little bit more involved. Well, actually if you do it only for the last one that's also very useful because when you are writing your thoughts using whatever the symbology, letters, signs of mathematics, etc. it actually contributes to develop the clarity and the rigid logic whatever logic you're using in this case. So I do suggest you to just write it down in a piece of paper and if you want you can send it to me and if I consider it really to be the really good explanation I'll just put it as a solution offered by somebody and somebody I'll put it on the website. Basically that's it. Thank you very much and good luck.


This is business. It is the only on Y244 channel. My name is Maryam Massava. And today we are going to discuss matters branding. How do you brand your business? So you started your business, but it also needs to be marketed. We need to market this business. And the first step to marketing is branding. How do you brand your business and how do you go about it? Do you need a professional or not? Yes, you can interact with us. How you did and how you branded your business on a social media platform that is Y254 channel. It cuts across. So our handle is Y254 channel. Yes, or you can tweet me directly at Miriam underscore Massava. The hashtag to use is Y254 updates. And to bring this into perspective for us to understand how to go about it is Cherustin Mengo, a personal branding specialist. Did I get it right? Cherustin, right? Yes, thank you for getting it right the first time. Not many people do. Sure, come on, you hear Cherustin, you're like, okay, that is a company or that is a name? It's a language name, but I try to avoid using it. I like to use Mengo. It's simpler, easier. Cherustin is more like a tongue twister. People are not sure whether they are shrubbing it, whether they are saying it right. It's very true, very true. You are not sure whether you are shrubbing it or just pronouncing it correctly. Yes, yes. Otherwise, Karibusana, thank you for making time. So like I said, here I have started this business of maybe selling something and I've gone through the process of naming the business, registering the business. And now I'm thinking of the process of marketing. And you know the first step I'm thinking is branding this business. So people who are just watching us for the very first time that they don't know what branding is. So can you explain to them what branding is? To start with, I would say a brand is not a logo. A brand is not what people call merchandise. A brand is a promise. A brand is reputation and a brand is identity. A brand is a differentiator. So now when you're taking your business out there, you want to come out with a difference. You don't want to be like all the others.  What makes me different from other businesses that do similar things as myself or other businesses that produce products similar like mine? So a brand is a promise. What is the promise you're making to your client when you're starting your business? There are those who promise that I will give you quality products. So that is your brand.  Your products are quality products. So it's about making a promise and not only making a promise but keeping that promise. That is what a brand is. It's also for a startup, for a beginner. So he is selling something in a certain location. Does the name really matter of the business? If I'm selling rice, should I call it rice in Y-254? Well you can call yourself rice king. Rice king in Y-254? You're the king of rice but the name you have at best describe what some people use the name to give the promise as I said before. When you say rice king you're giving a perception that you have all the rice in this world. Any kind of rice I want I will find it with you. So it's best that your name describes what you do or at least the promise you want to make to your client. So from branding what I'm getting is your identity, the commodity, the naming. So how do you connect those things to ensure that your message is past or is the message is similar to what you're selling? I'll put it this way. You will start with the name first of all. Some people like to name their businesses after themselves like me. I am that gotistic. I like my business to come with my name. Why would I do that? I would do that because I want to be held responsible for anything that happens in my company. Therefore I am holding myself to the highest levels of trust and reputation. Therefore I have to ensure that everything that goes out is quality and it's value. There are those people who want to name their businesses after their initials and everything but the backbone is the promise. Talk of your tagline. What does your tagline say? There are people who choose for their tagline to say what they do and who they do it for. There are those who choose the tagline to give the promise of their products or the promise of their service or the promise of what they are going to provide. So these are some of the steps you will take. Then there is your brand colors. It means something different and most graphic designers that professional ones you talk to them they will tell you what each color means. Like you go to many hotels you will see orange. Orange gets you hungry for some reason. Corporate colors you want miss a blue. Blue is stability. So all these colors have their meanings. What does your logo communicate? There are people who use their names just the brand name as the logo. There are those who use initials, there are those who use pictorials but when you talk to a professional graphic designer they will be able to help you go through all these steps. Yes. Okay, you've talked about the promise, the person giving the promise of products or services. One thing that is actually coming out is the market research. Does one need to do market research before even starting a business so that you can be able to do a good branding of your business? Market research is indispensable for any business unless you want to launch something that nobody wants. So you look at, let me use the example of big corporations. They spend a lot of money in market research. That is why you see them launch a product and it picks up like this because they have spent time and money on market research. They have found out what exactly the market needs, what exactly the market wants to consume and sometimes what the market is looking forward to maybe they are bored with what is in the market already. So it will help you to be futuristic also to understand what the market really wants. There could be what it is in the market but maybe the market doesn't like it or is looking forward to an even better product or service. So market research will save you a lot of money market research will save you a lot of time and effort. So it's indispensable. So you've done your market research you've identified what exactly is needed in the market you've identified your target audience now you want to start a business. Where do you start from? Is it graphic design, communication expert where do you start from in market branding? Yes, all these are elements that you need when you talk of graphic design when you talk of your target market something we had not discussed your target market will determine so much of your branding because your branding will create a certain perception before your market. Your market will respond to the kind of branding you will do because there are people who use branding even segment their market to keep away some people and attract some people. So your audience will determine a lot about your branding the people you want to target and the people you want to attract. Now I don't know how I would give that sequence but I think it begins with you the entrepreneur when you're starting. Why exactly are you doing this? You need to put all these things down. Why am I doing this? Who am I doing it for? You describe your client in detail so that you know what their needs are what are their edges, where do they live what do they do in what quantities do they even consume your product or service then once you've done this introspect you have questioned your business now go out and find the professionals to help you bring out this image or let me say put out this business professionals including graphic designers people get professional business coaches get a mentor that is something that I wouldn't forget to say that we young people need mentor someone who has succeeded in your area or in another area but can hold your hand and show you the things that you have not yet experienced.  Let me say sometimes you don't have to spend a fortune to get this kind of services there are different professionals at different levels if you do your research well there are different levels of professionals there are those who are at the level you can be able to afford if they aren't then sometimes you can teach yourself these skills it's YouTube, we are going to the Olympics from YouTube so I think you can learn these things and do them for yourself but if you can afford a professional please involve a professional but if you can't teach yourself these skills and make use of them Yes, and for someone who wants to start the process of branding how can they find genuine professionals and avoid frauds there are so many frauds out there do you have branding companies or individuals like yourself? Yes, there are many and today in the online world everyone is an expert even someone who has worked with only one person is an expert but I would say investing your time in research and then ask these people what they have done before it will help you to understand if they know what they are doing or they are just phonies so take your time to research take your time to find out who they are and at least let them show you who they have worked with before or what they have done before then you can be able to gauge their skills and whether they are able to help you Yes, and you can tell us more about your organization Yes, my company is called Mengo Concepts I deal specifically with personal brands because I believe in people I believe in people more because you are the owner of the vision you are the driver of your mission so I help you to understand yourself why you are doing what you are doing and help you to put yourself out to the market so that the market can trust you because they know who is caught they can hold in case anything goes wrong so personal branding helps you to inspire trust Yes Maybe you can mention some of the common mistakes that startups make up when looking for branding and they can avoid actually One of the mistakes I would say is going straight to a graphic designer you don't do that Do serious introspect sit down with yourself if you have a team sit down with your team understand why you are doing what you are doing who you are doing it for find out exactly who your ideal client is if I ask you today who is your ideal client if you want to meet that client that you would say yes this is the one what are their characteristics list them down all of them talk about your market, your geographics get all these details before you go to a graphic designer you make his work easier and you will help him do a better job for you so first of all I would say is introspect seek mentorship even in terms of branding look at some of the best brands in your industry understand what they have done and why they have done this and learn from the best and your business has grown it has grown like for 2, 3 years do you need to do rebranding again after a few years rebranding is a somewhat difficult decision the way I see it because now it is like you are starting a new you see so think of it in a way that you know it is a risk you are taking your market could totally misunderstand what you are doing you could lose customers but I say that there is always a new customer out there but ask yourself why are you rebranding in the first place why do you need to read some people rebrand because they feel like they are not attracting the right kind of clients or they are not making the right gains market share but really question it and if you feel like it is the best decision for your company to take then go ahead and do it but at least understand why exactly you are doing it thank you so much Mengo any final comments before we end the show I will repeat the same thing for young people especially seek mentorship thank you so much Mr Mengo for making time to join us here one thing that I can say is branding is not a logo and seek mentorship before you start a business well that was Mr Mengo a branding specialist well thank you so much for tuning in and for staying with us here on Y254 today being business Tuesday my name is Miriam Masawa and also I want to thank Flo and Elvis who are behind the camera and Hilary your director and the rest of the team thank you so much for making this production and well thank you for always staying tuned in and sending in your feedback using our social media platform that is Y254 channel and my handle is MiriamMasawa well good night until next time God bless you don't go anywhere because the buzz is coming up next