So, this talk is basically about a project that I announced a long time ago in March. And I've been working on it not as full-time as I would have liked, but I'm finally at a point where I feel like I can show off some of what I've been doing, so I'm going to be doing a little bit of that today. But I think more importantly, I'm going to talk about the architecture, what parts of what I did were hard, and what sort of the scope of the project is. So, first of all, we have a logo, it's cool, awesome. So we have a logo now, this is cool, I'm pretty excited about it. It took us some time to get this straightened out, and talk is over now. Okay, so we have a logo, and believe it or not, little things like having a logo really impact how much it feels like a real project, so pretty excited about this. So I want to start by talking about sort of how we got to here, where we are today, and how that impacts what I've been working on. So first of all, in case you don't know what Tokaido is, I announced a project called Rails.app, which I renamed to Tokaido at some point along the lines. And the tagline of Tokaido was, let's make Rails and all is 10 easy again. And interestingly, this was very controversial. And the reason why it was controversial was that a lot of people who saw my proposal did not think that what I was tackling was a real issue. So this is one comment that someone said as much as I like Huda, he's tackling a non-issue here. Here is a more colorful, so installing Rails on a Mac is largely trivial, it's five shell commands depending on the current level of breakage of RubyGems, that's a different story, write a tutorial on your blog. And I think what was kind of interesting about this for me, this is basically how I felt. What was kind of interesting about it for me is I don't actually, my full-time job is not really building Rails apps, I write a lot of Ruby code, and I write a lot of Rails apps, but I write a lot more JavaScript code these days. And what that ends up meaning is that I end up building new Rails apps on new systems for new clients all the time. So I don't bootstrap a Rails system and then use it for two years, so all the pain is in the past, every few months I have a whole new system I need to bootstrap. And so it's very clear to me that when Homebrew is doing a weird thing or Apple shipped a new version of GCC or SQLite.h is not on my system or this stuff happens to me as a relatively advanced user. And another sort of interesting anecdote, there's a guy on TC39 who is not a Ruby guy at all, TC39 is the JavaScript committee, but he's a badass JavaScript guy. He has a, I think a PhD in computer science, works on TC39 and he was trying to use Octopress, and he offhandedly mentioned to me at one of the committee meetings like, I can't get Octopress working, it used to work and I'm trying to edit my blog post and it's completely not working anymore. And I was like, oh, I'm sure I can get it working, ping me a few weeks later, he pings me on IRC, and he's like, oh, I'm trying to get Octopress working, here's the error, and I'm like, oh, I'll take a look at it. And like two hours later, he was like, I just give up entirely, I cannot do this. So as much as you as a programmer who at some point went through the pain and got everything working and now your system works, so you think everything's great as much as you feel that way, in practice, huge numbers of people, including I am guessing most people who feel like it's not a real problem, go through a fairly significant amount of pain. And to make matters worse, I know a lot of people like Homebrew, I use Homebrew. Homebrew is not exactly a repeatable, reliable package manager. So lots of little things about how Homebrew work and change over time could impact the five quick steps that you just pasted into your terminal. And in fact, do impact that, especially when you take and do operating system upgrades into consideration. So here's sort of the overview, I'm not gonna talk about any of these items because I'm gonna go into them in more detail. But the overview of what it ended up meaning to build something like Tokaido was basically thinking about dynamic loading versus static loading. The fact that Ruby normally builds binaries with hard-coded absolute load paths and how to make statically linked stuff in the first place. And then somewhat importantly, and this is something that I think people just forgot about when they were originally thinking about the problem, is how do you set it up so that the steps that you say that work in October 2012 will probably work in October 2013, right? How do you make it so that every single time there's a new release of Ruby, you don't have to go dig up the script and figure out again how to do the entire thing from scratch. I mean, that would already be better than what people are doing today, which is that every single Ruby user has to do it. But still, it would probably mean that we wouldn't get timely updates of Tokaido as there were new patch releases because someone would have to go figure out what's going on with Libyaml, what URL was that at that again, etc., etc. So for me, the last bullet point turned out to be more of a headache and I think more of a triumph at the end than a lot of the other parts. So let's start with something simple. RequirePsych. In between those two lines, there's a lot of stuff going on that you don't see. But something simple like this, you requirePsych and you get back a true and now you have a psych miner. So what exactly is going on? How many people here know what dynamic linking or dynamic loading is? And how many people know how it is different from static linking or static loading? Okay, so like half the room, so that's already a good step. So OS 10, first of all OS 10's dynamic linking and dynamic loading are not the same as the dynamic linking and dynamic loading on Linux. They're similar, they bear a family resemblance, but I'm going to show there are some differences. One interesting thing that OS 10 provides is there's a lot of environment variables you can set that will dump out information about what's going on. So that actually turned out to be very useful for both figuring out what was going on in the first place and also figuring out whether what I had done to improve the situation was actually successful, whether it was effective.  And what you can see here is that libyaml02.dialib is being loaded dynamically. So there is a libyaml dialib that's somewhere in the system and a dialib is basically just a bundle of executable code that instead of being hard coded into your executable inside of Ruby, it's actually just sitting there on the side in the system somewhere and the system will go find it. I'm not going to talk at all about how the system actually finds it, which again is a little bit different from how Linux works and has its own share of craziness. Mainly because I just decided I'm not going to bother with this at all. I'm going to eliminate all the failure scenarios that come from the craziness around dynamically linking code. So you can also, if you look and do the same thing with OpenSSL, you get actually a bigger list. So there's libz, libcrypto, libSSL. You can see that it's actually loading a private framework called Trust Evaluation Agent. It's loading libz again for reasons unknown. And why does this happen? So the reason why it happens is that if you go and you look inside of psych parser.c, you'll see some stuff like yaml parser t, yaml parser t, yaml parser initialize that obviously Aaron, so Aaron wrote psych. Aaron obviously did not write the right libyaml, but he wants to be able to in his C code call out to libyaml. So basically the way that you do this in C is you say, you tell the linker, hey, I need libyaml. Please make sure that you remember to tell the program that's going to run later, like please load in libyaml. So instead of having to essentially what you could imagine, copy and paste all the C code, instead of doing that, you basically say, hey, later on, the place where you're going to find this code is in libyaml, and there's usually a .h file involved that actually lets the compiler know what those declarations are doing. Another tool that OS X provides, which is pretty cool, is called O-Tool. And O-Tool lets you see for a given executable unit what dependencies it has. So you don't have to actually run the code and see all the spewage that spits out what's going on. You can actually just say, hey, OS X, please tell me what the dependencies of openssl.bundle are, and here you can see the same list, right? libssl, libcrypto, libz. There's no crazy private framework, but in fact that is a dependency. Okay, so what actually happens at runtime? So what happens at runtime is you load Ruby, and when you load Ruby, it dynamically links openssl. Dynamically linking openssl is pretty fine. It doesn't really introduce any problems, because openssl.bundle is part of Ruby. So Ruby knows where to look it up, where to find it, and it doesn't really introduce any external dependencies.  These other things, libssl, libcrypto, and libz, are actually external dependencies. So each one of those three things is something that, when you compiled Ruby in the first place, it found on the system somewhere, and now when you run it again, it wants to find it in the same place. So that's an external dependency. So based on what I just said, which is that it expects to find it in the same place, you could already start to understand why distributing a binary distribution of Ruby might be a problem, because maybe it found libz on my system in a particular location, and then it said, okay, this is where you're going to find it later, but then when I give the entire package to you, it happens to be in a different location.  You can just, the system will take care of it. The system will find libz. That is not how OS 10 works. OS 10 needs you to hard code exactly where the location is into the bundle. There's ways around it with a special ad executable path and some R path stuff, but this is a rabbit hole. You don't really want it to go down. OS 10 basically doesn't give you the tools that are necessary. And I think even if all that worked, relying on the user to have installed and put Libyaml somewhere in the load path is an external dependency that easily causes pain. So I'm sure some of you have seen, at some point, using something like RVM, like could not install Psyche, does, do not have Libyaml. And that's because Psyche was not able to find Libyaml, and now there's an external dependency. You are required to install it first. And every, so I only showed a few external dependencies. Ruby has many more. Every single external dependency is an opportunity for something to fail. So even something that you would expect to be relatively stable, like OpenSSL, Apple deprecated OpenSSL and will probably remove it at some point in the future. So you can't really rely on OpenSSL to exist.  Apple does all kinds of crazy shenanigans with it. So even relatively stable things, Apple does not promise will exist forever. So you might upgrade to Mountain Lion, try to run something, and now, whoops, OpenSSL does not exist anymore. Libzy is no longer included in the distribution in a place the linker can find it. So that has not, neither of those have happened, but OpenSSL is deprecated. So I would imagine in the next release it will probably be removed. So here is an interesting, another interesting anecdote. So here's a Stack Overflow post, how to solve Ruby installation is missing Psyche. And someone said, hey, have you tried to install Libyaml following these instructions? So first of all, this is a fail for me already. The fact that someone tried to follow the easy five instructions and got a fail and had to go to Stack Overflow, obviously bad. So this guy provided a link and he said, yes, I have, no luck, and that's the end of the thread. Right, so, so some guy, there's some poor soul who was trying to do something with Ruby and was unable to because there was an external dependency that for some reason that it's impossible for us to divine exactly what failed, failed. So what is the solution to these problems? The solution to these problems is to not rely on a compiler to compile and find the bundle on the, or dial up on the file system and to not rely on finding it again when you run it. So both of those are, that's a brittle association, but even just finding them in the first place involves things like, Libyaml does not exist on my file system, how do I make sure it's there in an appropriate place? And basically what that ends up looking like is that instead of Ruby opening OpenSSL, which then loads a shared LibSSL, you basically just essentially copy and paste LibSSL, LibCrypto, and LibZ into the OpenSSL bundle. And once upon a time when memory and file space was limited, people really didn't like this, they wanted to be able to share LibSSL across as many parts of the system that use this. When they tried to do that on Windows, that ended up with DLL, and on most systems where you distribute like an app package, either as an MSI or a .app, people tend to move away from shared libraries because there's just too much likelihood that something will have gone wrong between the time that you package up your .app and the time that the computer goes to look for it. It could be something like, you ran some bad homebrew uninstallation and it removed user local or something. Anything could happen, crazy, crazy stuff happens. So basically the idea is that you get LibSSL, you get LibCrypto, you get LibZ and you just put them in the OpenSSL bundle and now you don't, someone like me does it for you and now you have it in a bundle and you never have to worry about it again and your system doesn't have to go looking for it. And the way that this works in practice is LibSSL, LibCrypto and LibZ, when you compile them, you can compile them in a special mode called static and it will give you what is called an archive file, a .a. And the goal of an archive file is to be able to take the actual binary and again essentially copy and paste it into another binary. So it's not exactly a copy and paste, I would not recommend using cat or something like that. But the basic idea is that it's a relocatable binary that you can just put inside of something else. Now, the cool thing is that once you get this working, do O2 again, these things go away and now you have only LibSystem and LibObsc which Apple is extremely, extremely stable about. So if they made LibSystem go away that would be extremely bad. That has not changed since OS 10.000. Definitely stable.  Now the problem that I had here is I was like, okay, so how do I actually statically compile? And there's a lot of documentation and good tutorials for Linux and there are fewer good tutorials for OS 10 and when I went to read the linker documentation there are many, many lines of it and it changes across different versions of OS 10. So I'll just save you some time and this is the part that you care about and the part that you care about is that there's a setting that is only the default since Xcode 4 so you actually cannot compile Tokaido in Xcode 3. And basically I will show you how this works but the idea basically is here is how you tell OS 10's linker to statically compile. Again, if you're familiar with Linux you're probably familiar with like dash, B static or something like that. No, this is not how it works in OS 10. The way it works in OS 10 is that when the linker is told to find Libyaml it is not told whether it wants to do it statically or dynamically, it is just told Libyaml is, this program is interested in Libyaml linking. So for every item that is in the linker path it goes and it says, is there a Libyaml.a? If the answer is yes, then it statically links. If the answer is no, it goes looking for a Libyaml.dialib. If it finds a Libyaml.dialib, dynamically linked. Otherwise, go to the next LD path. So what you have probably noticed is that there is no way to set up a .slash configure to say I would like to statically link Libyaml. That is a thing that is determined purely dynamically when the linker happens to go looking in the file system. So when you want to build a static distribution you have to make sure your path is properly configured or else. It's easy to, this is one of these, it must be repeatable. If you don't make sure that the process that you're using to build it on an OS 10 system makes sure that the LD path that contains the .a files is at the front and does not have dialybs in it, you're going to mysteriously start dynamically linking instead of statically linking. So this is not desirable, this is not what you want. Now there's another sad story here which is that there is no standard way that you ask when you configure a UNIX program to give me a .a file. There are many, many different solutions. So Libyaml uses disabled shared, open SSL is no shared without a dash dash, SQLite you often will say enable static and disable shared. So basically, and there's more, basically every single one does a slightly different thing. And when I found this out this also made me very sad. That is a lion face bombing. And what I learned is that I decided to write Tokaido at the right time because there is this thing called SM. And no, no, no, SM is not what you're thinking. It's the system management framework, but this is the logo. So anyway, so the idea behind the system management framework is to provide a standard way of talking about things like I would like to compile a static version of Libyaml.  And I would not use this as your standard package manager. It's more like a package manager for package managers. What you'll find is that you have the current version of Libyaml, where to download it from. And then if you say please compile a statically, what is the flag? And SM doesn't have this static for everything. It mostly has them for things that Tokaido needs because I went around and said, hey, can you have this static thing? Otherwise it assumes it's that static, which is basically never the case. But basically, this provides a way for us to talk about this. It provides a way for us to say in open SSL, it's no shared and here are some configuration flags that you're going to need. It provides a way for us to talk about it. And basically what that means is that there's an easy way to build local.aarchives for packages using a static flag, a flag that's just static, and then there's going to be a thing that actually abstracts that away. And one of the really awesome things about using SM is that Tokaido's distribution itself can be compiled for Linux for Windows for whatever because I'm just using, under the hood, I'm using the standard, some standard tools that work in environments with a C compiler. So I don't actually know how well it will work on Windows, but it definitely works on Linux. We've tested it on Linux and obviously the UI parts don't work, but the static distribution works. And SM also manages the LD path. So SM makes sure that if you have created an archive or something, that that is going to be at the front of the LD path when you try to compile something else. So this is how we manage to do this repeatedly, is that I am not actually in charge of this. There's another thing that's in charge of it and it offers me this guarantee. SM is by the RVM guys, so RVM, they're building the next version of RVM on top of SM. So it's pretty well maintained. It's, they're smart guys. It's based on shell scripts, which definitely not my cup of tea, but reliable. And another really cool thing about all this is that because I work closely with the RVM guys to use SM, RVM eventually realized that actually reliably compiling Ruby on OS X is as hard as it looks like, as I said it was. Now RVM always had a slight leg up, which is that they could just, oh, you need Libyamo. We'll just go download it and put it in a directory and then we'll link against that and we'll hard code that path and they could do hacks. But over time, what RVM realized was that some non-zero percentage of RVM users would simply fail for reasons unknown. They would try to add more hacks, but eventually RVM realized, you know what, Yehuda and us are together building this thing called Tokaido. Why don't we just download the binary that we have built together and use that. So at some point in the near future, when you say RVM use 193, you're going to get a statically linked, reliable build that came out of this process, which is, I think, a nice thing. There's another thing which I sort of hand-waved over a bit, which is that if you actually do this O-Tool, you'll see that it is relying on, I snipped this out before, but it's relying on a full absolute path to Ruby. Obviously, this is not going to work for me to give you a copy because you don't have a user's lycats. And apps in everyone creating a user's lycats seems bad. So you can see there's a hard-coded path here, which is not great. And the cool thing is that Ruby has a feature called enable load relative, which is completely undocumented. But basically what it does is, is when you load Ruby, if you have compiled with enable load relative flag, instead of it having hard-coded the exact path, it basically says, okay, where is the Ruby binary? And, ah, the Ruby binary's here, so go dot dot, go into lib, and that's where you should find the standard library. And that basically means that there's a little bit more cost to that than hard-coding the paths, but it makes the whole binary relocatable, which is really great. There have been a wide variety of bugs in enable load relative, which is why it would be impossible to ship Tokaido for Ruby 187 or even 192. Probably the most important bug that exists with enable load relative is that OS10 does not actually provide a mechanism for getting the location of an executable that was not dynamically loaded. So if you run Ruby, that's not dynamically loaded, that's just like the path looked it up somewhere, and OS10 does not provide a mechanism for getting that. So it would always just look at ArchV and completely fail. And what Ruby 193 does, which is pretty awesome, is it basically just looks in the path for where Ruby came from, and then that's gonna be where it is. So if you dynamically load Ruby, that's fine, but we're not doing that here. And if you statically load Ruby, then it has a hack, basically. It looks in the path from whence it came. And basically what that means is that I can't even make Tokaido for 192 because enable load relative doesn't actually work on OS10 on 192. So 193 is actually the first version of Ruby that for all these various reasons actually works reliably. And if you actually look at it, you'll see that instead of, so why did Ruby want the Ruby to have the dynamically loaded? It wants to not have to smash the dial up for Ruby inside of the binary. Basically the solution is if you say enable load relative, it's like, well, I guess I have no choice. I'll just smash the entire Ruby executable into the binary. So the actual Ruby binary gets bigger, but the only cost is that now you don't have Ruby dial up that you're loading. It's instead in the Ruby binary. It's not clear to me why this is not the default. It's not clear to me why there's a Ruby dial up. Okay. And now if you run O-Tool, we already talked about the fact that we removed lib SSL, libCrypto, and libZ, and we also now remove libRuby, which basically means, again, no external dependencies. I hand waved over the libRuby one before. So another thing that is, so sort of along the same lines, if you actually go to the Ruby bug tracker, there's like fix enable load relative on systems with lib64. I'm pretty sure Tokaido is the first time anybody has tried to use enable load relative for anything. So Mpappus, who did a lot of the work on building the statically compiled Ruby using SM, has been filing a lot of tickets against enable load relative. So hopefully, enable load relative will turn out to have worked reliably on 193. Hopefully I won't have to say use 20, seems great. Okay. So that's basically statically compiled Ruby. So now that I'm done with all that, now there is a way to actually build a package, which is a Ruby that doesn't have any hard-coded pass, that doesn't have any weird external dependencies that actually works like a regular Ruby. So how do we actually get this onto people's system? So how do we deliver it? So I'm going to just show you a quick demo of what is already working. So let me do that real quick. So mirror displays. So here's Xcode, I'm going to boot it up. And the first time it ever boots up, it asks for your password. I'll explain why in a bit. So you type in your password. And here's Tokaido. So nothing really is going on here. I'm just going to add an app, which is Ember. And then I'm going to open it in terminal. And now we have it open in terminal. So obviously there's a little bit of unpolish in some of how this works. But if you go which Ruby, you'll see that it's the Ruby that came with application support. So this is basically, I consider this the MVP of Tokaido of you can add things and there's a statically compiled Ruby that comes with the app package that will work. And so why did I do it like this? Why did I ship it as part of an application instead of installing in the system? So the problem with installing in the system is that it will probably work immediately after you install in the system. But it's basically a fixed point in time. And if someone screws up the system after that, it's basically game over. So the cool thing about how this works is that what open in terminal does is it opens a terminal. And then once the terminal is open, it basically makes sure the path is set to the right place, make sure the gem home is set to the right place. So it basically guarantees that all the environment variables are set correctly. And there's no way to screw it up because we're running after your system that may be screwed up is running. So we'll definitely, I don't think I have a slide for this, but we're gonna have a way to run it as your system Ruby initially through RVM and possibly through other ways. But I think for, even for me personally, I like knowing that when I open a terminal window, it's definitely, it's basically guaranteed to work. It's not going to have weird system stuff. It's not gonna mess it up. And another thing worth pointing out here is that there's a reason it opens a terminal window. I'm not trying to write a GUI for Rails or a GUI for Ruby. I'm just trying to make a much more, much less error prone way of getting Ruby to people's machines that will work reliably. This is a tool that I personally would like to use. Okay, so let me un-mirror it. So that's a quick demo. Now if you looked closely, you would see that there's a thing there that says ember.js.tokaito. So what is that about? And what it's about is that as part of this process, I have also written what is essentially a pure Ruby version of PAL. I'm gonna talk next about how that is working. So the main difference between PAL and my pure Ruby version of PAL is that my version works with a proc file. So instead of it relying on a rack app to boot up, it basically will just run the web section of your proc file with a port and it will then connect to it. So you don't have to, if you want to use like Jekyll or some other program, or if you happen to use Formen already, basically it'll do the right thing. It'll allow you to boot stuff up with a port instead of requiring a configure RU. I know I personally can't always figure out how to get like a Jekyll configure RU or a static-matic configure RU. It's probably usually possible, but it's not always obvious how to achieve that versus I already know how to run this program, so please just do it. So here's what a proc file looks like. I think this was invented by Heroku. And basically the idea is that you just have different sections. So here I only have a web section and $port is basically just the way of saying I would like to use this port. This is also what Heroku uses. So if you're already using a proc file for Heroku, everything will work fine with Tokaido. So let me show a quick demo of the pure version of PAL. This is not integrated into Tokaido yet. So I will, I appear to have closed. Here we go. Okay, so here I'm just going to bootstrap. So, oh, seems very bad. Okay, mirror displays. Okay, so here's my terminal and I'm basically just bootstrapping it. You can see I'm setting some environment variables here for where some sockets should go and I'll talk more about this architecture in a minute.  And I'm going to open IRB over here. So let's require socket and then I'm going to get a new socket. So basically the idea behind this is that this socket is at a place determined by the environment variable and this is something that the Tokaido UI will set up for you. So obviously, oh, this is in. To the code, bootstrap slash temp slash muxer. Okay, so now I have a socket and I can write, I can write to the socket. Here I'm writing, please add this program that is at some location with this host and this port. So I'll do that and you can see over here that it received a message. There's obviously more verbose logging. This is still in a not fully complete state and you can see it booted up WebRick which is basically what the proc file told it to do which is just to run rackup.  So let's just curl http colon slash slash. We asked the for temp.tokaito. So now we got hello world which is great. And if we want to run, we can do the same thing. We can run a different thing and we'll put it at a different port. And again, you can see it got the message. And now if we curl temp2.tokaito, it works. So I'll talk about the architecture in a second but basically the idea is it's a system that works similarly to PAL except using a proc file. And it's written in Ruby. I didn't want to have to ship Node with Tokaito. So that's the demo. So how does it work? So basically the way it works is when you say give me an app.tokaito, it goes into etsy resolver slash tokaito. So OS 10 has this feature called etsy resolvers and basically you can say inside of etsy resolvers like hey for this domain which is tokaito, please go get the name server at this particular port. So there's a project that I created called Tokaito DNS which basically lives at that port and it will say okay, local host. The answer is local host. And then there's a way to create a firewall rule in OS 10 which requires pseudo permissions, pseudo IPFW, blah, blah, blah. And that will basically say okay, don't go to port 80, go to port 23456 and that will go to another project that I created called MUXER which is basically doing the proxying which will then say go to local host, the whatever port that you told it and then that will go to your app. So that's basically the architecture. It's a little bit crazy but it's actually almost identical to Paus architecture.  So how does this actually get delivered? So obviously people are not going to be opening IRB and typing stuff in. So basically the way it works is that the first time you load Tokaito it's going to install a firewall rules launch daemon. And basically this launch daemon, the reason you need a launch daemon is that IPFW requires pseudo and you don't want to have to be typing in your password every single time you open Tokaito. So we create a launch daemon that has pseudo permissions that we can talk to. And the way this works is that there's a socket that it listens on and you can, I'll show you in a second how that works. And then another thing that Tokaito does when it boots up is it boots up Tokaito Bootstrap and creates a manager and listens on the Tokaito socket. So basically it runs on only the first boot it launches the launch daemon otherwise it launches the manager and the manager loads Tokaito DNS and Muxer which are the two programs I talked about and manager is basically in the same memory space as Muxer. So the first thing now when you boot the application it just sends a message called enable firewall rules slash end to the launch daemon which will actually go and now that it has pseudo control it can do the IPFW command so the idea here is that unlike PAL I don't want this running all the time I only want everything running when you actually have the app open so that way when you close the app everything continues to work as expected. So that's just a philosophical Tokaito is supposed to be self-contained it's not supposed to take over your system. So the next thing so now after it does that now it just goes off it stays off in the side and listens for things at localhost 80 calls it a day. And now the first thing that's going to happen is it's going to go and it's going to send all the it's going to send a bunch of commands to the manager which are basically add these add these applications at these ports so it's like a little line protocol and the manager is going to go and add the application which is in Ruby and then eventually immediately assuming that there were no errors like you didn't try to find to the same port multiple times or use the same host otherwise you get an error response you're going to get a thing that says added and the idea here is that Tokaito can use this information to like show that it's loading right and then at some later point you'll get a ready message which allows you to show like a green button. Yeah that happens because that happens it's backwards and you can also go if the user says I actually don't want this app anymore to be on disable it where you can call remove and that's going to call remove app and then at some later point it's going to say okay I remove the app and that's going to send removed and that's how the application is aware so one really cool thing about this project is that because the point of the project is to have a reliable version of Ruby I can actually write a lot of Ruby code with not a lot of stress because I know that I can test on the exact Ruby that I'm shipping and if it works I don't have to worry that the user has some crazy Ruby so I'm writing a lot of sort of network code that would normally give me heartburn like who knows what kind of crazy stuff is going on but I know exactly what kind of crazy stuff is going on because I already shipped it so it's cool so that's sort of the architecture of the PAL stuff I think it's pretty cool I think it will I think people like PAL and I think they will like a more scoped version of it I think this is cool and finally I want to show some mockups of what the full UI is going to look like so this is what we showed already this was the original mockup it was replaced with a Ruby icon which you saw in the quick demo before and you can see the little green icon there and there's like a drop down stuff like that so this is like the new app screen this is the logger so basically specifically for Rails apps there will be a visual logger that you can use for to see what's going on and the idea basically is now that you're using Tokaido like you would be using PAL you don't really have a terminal tab open with your logs so you would like to see some logs somewhere and I guess we could just dump your logs or we could spend some time to make something that actually adds some value and I did a lot of thinking about what makes sense to be in a UI and I think I came to the conclusion that people are not particularly attached to their like tailing log workflow so if I provide something that's better than the tailing log workflow I don't think I'm going to get a lot of pain like for example if I added a run this rake task I think people would be very emo about that because I would be taking over something that really belongs in the command line I don't think tailing the logs is a thing people are particularly attached to so you can see here there's some stuff there's some cool stuff I think the top thing is going to change because the exact response time in development mode doesn't really matter but you can see like you can see which which request came from the parent so if you hit a page and that asks for a bunch of assets you can see that they're nested together you can see whether things were errors how long things took what the whether something was a 500 or 200 or whatever and additionally there will be a bunch of notifications so obviously like your page had an error as a notification but also will periodically run stuff like bundle outdated for you and give you a yellow notification that says like hey this is outdated maybe you care about it and the X will basically be like I actually don't care about this particular bundle outdated and then if it changes you'll get the message again things like deprecation warnings things like maybe even like code climate right so things like running code cleanliness against your app and then telling you like hey you should maybe look at this here's some code to look at basically just having a place to put notifications that are either urgent the red or more just like this might be something you're interested in and I think we won't initially but we'll eventually have a plug in architecture so people can add their own notifications like the compass deprecation warning we probably won't ship with but it should be easy to add also this screen is it's the only part of the OS 10 app that will be written as a UI web view and again the idea is that if you're SaaS and you want to provide your own logging view that's not going to be the exact same thing as a Rails view you should be able to drop that in there'll be some kind of JavaScript to OS 10 protocol for like you'll get notified when there's a request that came in etc and then finally this is just the creating of the application editing screen and the idea here is you can do stuff like choose an icon or we'll find one for you whatever that's great change the host name you can see it tells you what if you want to share so one cool thing here is that because every single app has their own port it's easy to share over a local network like hey check this out and it tells you like austin.local, colon, blah you can choose to auto assign to public port or not we also want to support people who don't want to use Tokaido Ruby sandbox so like if you want to say I'll just use rvm that's great we want the UI to work for you and then we also want to have these settings should be should be configurable via yaml file so that people can say like I always want this icon I always want auto assign public port I want this to be my application name and have that checked into source control so everybody is basically on the same page so that's basically that's basically where we're heading I think we'll probably have something in between what we have now and this in within a month or so so I don't want to announce any specific dates but we're making good progress I want to say thank you to some awesome people so MPAPIS was the one who helped me initially with all the SM stuff getting it to a reliable place so really big thanks Wayne helped me with some SM stuff that MPAPIS was not sure about so SM is definitely not a a thing that regular mere mortals want to be using but I think it provides a lot of value for our use case Austin Bales did all the mockups that you saw and it's driving basically the implementation Patrick who works with me at Tilda is working on the cocoa app and Terrence front row he's been doing a lot of testing so something I didn't talk about is Terrence has actually been taking the static build bringing it to Rails Girls not without the UI and just seeing if the static build actually holds up to a tutorial and we got really really good feedback I think there were a couple of issues that we hit early on with ZSH or something but by and large it was a massively improved experience versus the just follow these five steps for people who are just starting so that's really great and Terrence thank you for that so thank you very much and I actually want to close by saying one thing which is when I started I think it's there's a tendency to look at this tool and say this is mostly a tool for noobs it mostly solves a pain point that I don't have and it is a very important goal for me for at least me to use it I want to use it so we're not really making trade-offs where if you're a noob it's going to be great but then oh I want to build real stuff with this this is impossible like and I think DHH says this right which is everybody has to cross a barrier between being a noob and being an advanced user and if suddenly they fall off a cliff because the tool stops working that's terrible so you should build tools that are good for real developers and they and if you do a good job they'll happen to work well for noobs so that that's my philosophy on the project thank you very much


Hey Psych2Goers, welcome back to another brand new video.  Are you someone who easily gets tired and doesn't feel like doing anything? Do you label this kind of behavior as mere laziness and nothing more? There's actually a lot of overlap between laziness and burnout that can make it difficult to differentiate between the two. Burnout is a negative state of emotional, physical, and mental exhaustion caused by excessive stress and inability to cope with it. And as of 2010, a survey reported that approximately 75% of adults in the United States alone have experienced symptoms of burnout, with over 40% of cases being more severe. Now, more than ever, it's become imperative to educate and better understand the nature of burnout. So, with that said, here are six tell-tale signs that what you're experiencing right now isn't actually laziness, but burnout. Number one, you feel disconnected from everything. Are you going through the motions of every day as if on autopilot? Is there a persistent feeling of being detached from your own self? If you're suffering from burnout, one of the things you might be experiencing but don't quite realize or understand is depersonalization. People experiencing depersonalization most commonly though struggling with trauma report feeling a strange sort of emotional numbness or emptiness. As if they were watching life from outside of themselves. They don't feel like themselves anymore. They don't feel engaged by anything and they constantly struggle with the overwhelming sense of helplessness and inability to take back control of their lives. Number two, you used to be motivated. Laziness is a character trait, and character traits tend to remain stable over time.  But if you used to be self motivated and high achieving, often excelling in certain areas and have only recently become exhausted, apathetic and unmotivated, then it's more likely that you're suffering from burnout and not laziness like most people would think. Number three, you used to be passionate. A clear difference between someone who's burnt out and someone who's lazy is that the former used to have things they were passionate about, but may now be struggling to find interest or enjoyment in anymore. Whether it's a talent, a sport, or just your academic or professional performance in general, burnout can make it hard for you to do the things you once loved or felt passionate about. You might even come to hate or resent it because of how much you overworked yourself and pushed yourself to the brink because of it. Ouch. Number four, you've become moody and irritable. Do you suddenly find yourself snappy and easily irritated? Do you often feel emotionally out of control nowadays and don't know why? Lazyness and irritability are common but often overlooked signs of burnout. So if you start to have trouble controlling your emotions, especially when it never used to be a problem for you, this might be the reason why. Lazy people, on the other hand, are a stark contrast to this because they're often very relaxed, laid back, placid, and unaffected by things. Number five, you've neglected your self-care. One of the most distressing warning signs that someone may be emotionally and physically burnt out is if you start neglecting your self-care and socially withdraw from others. There are concerning changes in your eating and or sleeping patterns.  The difference between being burnt out and laziness are starkly in the fact that you weren't always this way. And number six, these changes happened gradually. Finally, but perhaps most importantly, something you should know about burnout is that it develops in stages. So all the points mentioned before, losing interest and motivation, especially in things we used to love, feeling detached from yourself and disconnected from everything around you, socially withdrawing and neglecting your self-care, won't just happen overnight. Studies show that there are actually five major stages of burnout, each with increasing degrees of severity. The honeymoon phase, the onset of stress, chronic stress, burnout and habitual burnout. Many people begin to experience symptoms as early as the second phase. When there is still a moderate amount of stress, but optimism, interest, motivation and performance may already start declining.  Spotting the signs of burnout early makes it all the more easier for you to get help and recover from it. That's why it's so important to raise awareness about burnout, instead of simply dismissing it as laziness, like most people tend to do. So if you or anyone you know may be suffering from mental or emotional burnout, please don't hesitate to reach out to a mental health care professional today and talk to them about it. If you find this video helpful, be sure to hit the like button. Feel free to leave a comment down below with your thoughts, experiences and suggestions and share it with those out there battling the haze of burnout. Don't forget to subscribe to Psych2Go and hit the notification bell for more new videos. And as always, thanks for watching.


Anthony Davis the unibrow ad whatever you'd like to call him an otherworldly talented basketball player of the New Orleans Pelicans his agent rich paul who by the way also LeBron's agent Told agent will Jenarsky and we will have him on in a five o'clock hour a woe to we will That he will not sign a contract at the end of this deal So it behooves the Pelicans to trade him So now that opens up the dream portal for a lot of people First the Knicks dream portal. What would you give up if you were the Knicks and if I'm the Knicks? anything you want That's how good this guy. I don't think he has any attention in playing with the Knicks But the Knicks should do their due due diligence right and the most valuable item that they own is Their draft pick right would you give up a potential number one draft pick for Anthony Davis? And I would in an eye blink because as great as we think Zion Williamson will become Anthony Davis is that great now? He's one of the top three players in the NBA averages 28 and 12 if you could get Anthony Davis and make sure you're able to Sign him that's John draft pick and even if you have to throw in Kevin Knox I would do that too, but you have to make sure he's gonna sign with you Right to get him as a rental and then you go signs with the Lakers at the end of the season would be devastating So you have to have a guarantee that the second the deal is done You sign him to an extension he becomes a nick for the foreseeable future Because of the Knicks finish with the worst record. They're guaranteed one of the top three picks You can't give that up for a guy that's not gonna be here long term So I don't know how you get that done how you get that kind of assurance because everything seems to point to him Want to play with LeBron James with the Lakers right see the Lakers can make that deal and know that they're gonna sign them The Knicks aren't gonna know that and if they're not gonna be guaranteed that I can't give up the pick If I'm guaranteed that I give up the pick cuz you're right I don't know if any of these guys can turn out to be half the player the Davis is now The interesting thing is the gamble aspect of it because teams have gambled in the past and one One of them being the Oklahoma City Thunder they gave up a lot to get um Paul George a lot and everybody thought that Paul George was definitely gonna go to the Lakers He ended up signing a max extension after one year. He liked being in Oklahoma City so much Toronto Raptors, they're doing the exact thing everybody expects Kawhi Leonard to sign in LA They gave up DeMar DeRosan amongst others to get him for one year and convince him. This is the place to be Now if I'm the Knicks, I Would not give up that first pick on a prayer. I just wouldn't I'd have to have some assurances now Let's take the Knicks out of it the Celtics probably have more Capital to give New Orleans than any other team. I Mean they could trade Jason Tatum they could trade any of their great young players and it would be a great package for New Orleans Would you do it and they can't make that trade? Unless they trade Kyrie Irving back to New Orleans because there's a contract clause or CBA clause that says you can't trade one guy Who's do a max extension and you could you know above the bird rights for another guy? They can't both be on the same team at the same time So the only way the Celtics could get them is at the end of this year after they signed Kyrie But right now before he signed they can't do it So that that kind of leaves the Celtics out of it right now unless Kyrie is in that deal and Finally, you've got the LA Lakers Now you would say that LA probably has leverage, but they don't Because if they want them now and not waste another year of LeBron James You're gonna have to give up a kuzma.  It wouldn't be a real great first round pick You know reading the tea leaves it would probably be the Lakers But would they be willing to give up all that capital and that's why Stephen A. Smith said this earlier And it makes a lot of sense if in fact The Lakers were able to get Paul George like they thought they would they would have been able to have George LeBron and all of the good young players have on their on their roster But by missing out on George, which they thought was a sure thing That cost them keeping all of their players because if you want to get Davis before it becomes a free agent because if you wait Until it becomes a free agent with the Pelicans That's two years of the four years that LeBron is signed on for and all of a sudden He's a 35 36 year old player and really are you in the wheelhouse of him winning a championship? That's why if I really wants him they might have to give up all those players He's not that old is he? Oh how old Anthony? There's no, no, I'm saying LeBron LeBron. Sorry, sir I think all the idea is he's not already 35 years old now. He's 34 That's impossible. Can LeBron get older please doesn't even make sense You know I you could wait till he's a free agent and get him for nothing except the money But as you said you're wasting two more years of LeBron James, right? So I would think they'd They'd want to be in on him and they know that they're gonna have him for the two years plus beyond because he'll sign there Eventually because he wants to be a Laker Who else could be involved? You said the Celtics that cod a soul has probably knocked them out of it If let's say Trey Cary and the next can't why why would Davis get why would Davis not want to? At least test the freeage would he just he wouldn't I wouldn't think he would sign right away getting traded to the next What do you want to check it out play there? What can he do between if they traded for him today and the rest of the season to convince him to stay I Don't know if the next he get the guarantee that he would sign long term with them probably not and and since you know His agent is LeBron's agent it makes you wonder now He has come out and said it is not about money It's about the ability to win right because he's eligible at the end of this year For a five-year 240 million dollar extension and I used to always say baseball was the way to go Nobody's making 50 million dollars here in baseball. No the big stars in basketball are now making in the high 40s So they are taking care of their superstars in a baseball Harper and Machado still don't have a job So it tells you that basketball is looked at a little differently than any of our Oh, it's looked about differently because having that one great player Can get you into the playoffs every year make a run for a championship, but for some reason in New Orleans It hasn't he's been there. He's been great. He's one of the best players this year, and they're the third worst team in the last Usually when you have a player play at that level you're at least a playoff team So what's going on there? They can't seem to get any traction with this great player Nobody wants to play with them. Is that they that mismanaged that they can't put together a championship run with this kind of player? And it's interesting in LA. Do you want to give up all that draft capital to get AD? Or do you want to gamble that Kevin Durant or Kauai Leonard comes? Because they might not They might go to LA Clippers not LA Lakers So there's a lot of intrigue there, and I know a lot of Nick fans will be excited But I don't think the Knicks have a chance of getting them and and if they do I don't think they have a chance of of getting him to commit to a long-term extension now If he was going to commit to a long-term extension Anybody they want Poor thing is yep. Yeah first round draft pick. Yep knocks. Yep anybody Anybody he's better than everybody. He's better than your wildest dreams of what poor things can become Yeah, I think it's wildest you've been wildest dreams better than the wild He is the wildest dream of a poor thing is gonna become And that's fair. I don't know. I think he's better than what poor thing is gonna become I think I think you're probably right that he will eventually that that is what would happen One quick note though in terms of their level of success being third out of the playoffs or being third from the bottom In the east is the Bulls at 11 and 39 Okay, so before we bury him too bad being having a terrible year being third from the bottom in the West He's willed the team to 22 and 28. All right, so they win basketball games. This is not a team That's garbage there at the West is much more competitive than the East and a boogie didn't get hurt last year This whole story might change Exactly would have gotten a long extension and Davis might have stayed but the idea is to try to get Davis to play with someone You know, so you probably would like to hold on to poor zingas so you can get those two together You don't want all of a sudden making New York into New Orleans where you've got this great player He doesn't have anybody to play with and then you're missing the playoffs or barely making the playoffs No, I would give up the first round pick But when you say give up everything Michael, I got to have somebody to play with them Are we gonna play at Noxide give up? I get that but I'd like to be able to keep poor zingas to play with either whoever I draft or if I can go How to get Anthony Davis, but if you had to give up poor zingas you would But then I'm holding on the knocks that like I'm not gonna give them the first round pick knocks and poor zingas No, then you know that I have nothing Except one really good player that I'm that I'm New Orleans that I'm the Pelicans. I'm the Pelicans north Here's Brian win horse done. He was on get up and he said Opposite of what we're saying he believes the Knicks are true contenders for Davis if I am a New York Knicks Convening a meeting this morning Anthony Davis has some interest in playing for the Knicks It's not Lakers or busts although this is absolutely aimed at trying to get the Lakers the first crack The New York Knicks needed to decide whether they would be willing to make their number one pick unprotected this year available If they would I believe they can put together a competitive offer that would help the Pelicans do a rebuild and they could get Their hands on Anthony Davis in the next 10 days He would be a huge decision But I think New York would be one of the few teams Anthony Davis would be willing to sign an extension with so they Sort of the quiet lurker here. Yeah, the Lakers are gonna make their offer But boy, I think the Knicks are in the game Well first of all two things I can hear when horse ran an undershirt there and second of all that is Think about how quickly the season would change if all of a sudden instead of waiting for next year to see a draft pick You're getting a look at the future of your team right now But you know what would stink for New Orleans if you send Anthony Davis before the trade they start waiting a little bit They're not gonna have the third three, you know bottom three record They're not gonna have a 14% chance of getting that so he may as well just hold on though. That's a great point. Yeah That's a great if you hold on them to the end of the year Then the Celtics are in play with all of their draft capital the Knicks are in play you know exactly where the draft pick is and The only the only way I would trade him before February 8th. I think would be to the Lakers if you can hold them up They're not under any pressure because they have him for next year, too So his agents just giving them the opportunity get something for him now You probably could get more for him now than you could during the summer I think he had a lot for him for during the summer, too Yeah, and even even with the next deal like you said just wait see how good that pick looks yeah unless he goes on record and says I will sign with the Knicks the second I get dealt there. I'll sign an extension then you probably no No, no, no, I'm saying this but they can't do it because once I picked up yeah picks not gonna be worth this much Valikans are sitting back saying and so they should wait until the end of the season So this they'd be silly to trade them when the deadline is used at February 8th Actually, the deadline is before the all-star game, which is weird. So there's there's five God awful teams in the league right now You have to think that if the Knicks were to get Him to get Anthony Davis they instantly probably would end up being sixth Not this year no if they got him this year they'd end up being sixth the sixth worst Okay, maybe the seventh worst team right, which is a totally different ballgame and if you have Anthony Davis and whatever you can retain after the trade That is a great Come on for any free agent. Maybe kawaii wants to play with them and what's it would wouldn't it be I mean, it's like It would be the real it could be the beginning of something you get someone of that quality And you can't really I'll say the net's either What would they give up? I mean their young talent is not as Sexy, but they've got good players they can give up people and they've got their own draft fingers here It's interesting looking at the standings right Phoenix has 11 wins. Memphis has 20 All right, so that's too big of a gap Cleveland 10 New York 10 Chicago 11 then Atlanta 15 Orlando 20, I'm not sure even with Anthony Davis that you're gonna play well enough to catch up to to catch up Orlando Orlando, so you're looking to catch Atlanta three four Five you're probably still gonna end up with the in the top five, but that's not that's not getting Both of what percentage that's not getting Zion. It's like getting RJ. Barry. That's not getting one of these superstars From a lottery standpoint, what's the difference between the worst team and the fifth worst team? You've got to get into what the worst for three or small three is what you're looking at You still could do that with Anthony Davis. I don't know. I don't know well if you're stood if you really try if you're fizz Dale And if fizz Dale coaches to lose these games, but why would you coach to lose those games?  Yeah, so you're what you're doing is you're thinking So the pelicans would have to bank on do I still think the Knicks could finish right with the top three? Worst record if they've got Anthony Davis, right because you're right and fizz Dale is gonna want to coach to win


All civilians be aware. This message is from your national government. A government facility near you is activating a nuclear failsafe, and you must take shelter now. Please head to a nearby bunker, storm shelter, or structurally fortified building. The facility is isolated, and you should be safe from the blast, but precautions are essential. Please also ensure that you have enough supplies to last a week, if possible. This includes food, water, clothes, and toiletries. The blast is relatively small for a nuclear device, and therefore is predicted to create a relatively large amount of nuclear fallout. There are steps you must take to protect yourself from harmful radiation. Make sure that you remain in the center of your shelter, away from the walls and ceiling. If possible you should stay underground or above the ninth floor of a building. Try to keep your skin, mouth, and nose covered to prevent harmful radioactive particles from entering your body. You will receive a message via television or radio to announce when it is time to evacuate fully from the area. When this time comes move quickly. When you evacuate from the area, you will be provided with new clothing, and an opportunity to thoroughly clean and decontaminate yourself. You will then be given emergency medical attention. Thank you for your attention and cooperation. Please head to shelter and stand by for the detonation, then await further instruction.


Let us look at all these pratyankar or control of the senses that can be done by focusing on uniform impressions by creating positive impressions and by creating inner impressions. This is beautifully explained by David Frawley. This explains that many time because of the uncontrolled food intake that uncontrolled can be in the form, can be in the can be because of the poor timings. Because of this uncontrolled unregulated food intake, we suffer indigestion. When we suffer indigestion, what is generally recommended? We are asked to control our food intake or take that food which is uniform. So we take khichdi in all parts of India at least we are aware that when our digestion is not good, we are recommended some other form of khichdi which is generally the combination of pulse and rice. Nonetheless in the situation of indigestion, we are asked not to take variety of food but consistently one type of food only limited to certain fruits or certain form of grains in prepared in a specific way which is devoid of oil, which is which has less of spices etc. In the same way our mind also sometime feel indigestion, indigestion because of over exposure to the senses, over indulgence in the senses, over being because of this mental indigestion, we can feel unhealthy within ourselves. So if I have to get rid of this mental indigestion, what is the way? Pratyahar is the way, how it is done? By focusing uniform impressions meaning we do not let our mind vendor in ten different directions. We can focus on one thing, we can focus on pre, we can focus on flowing water, clear water, we can focus on sky, we can focus on Akash, we can focus on our breath, we can focus on our senses and by focusing on uniform impressions our mental indigestions comes under control and as a result of that our agitated mind becomes calmer and only calm mind can perceive with clarity and make right decisions, right which is right for not only for ourselves but good for others as well that is about focusing uniform impression. Then comes the next stage in the Indriya Pratyahar is creating positive impressions. Positive impressions can be attained through many practices. You must have seen prayers in various religious places or spiritual places that is a way of creating positive impressions. If you look at prayers they all talk about well-being for us, well-being for others, they all are about submitting to some supreme power which is embodiment of all good qualities. Prayers are also about asking to imbibe the best qualities, best humanly qualities. So, these are the ways of creating positive impressions. We have also seen Kirtan or Shabad, these are the methods of creating positive impressions because either we are remembering the great divine qualities of the supreme or we are asking supreme to give those qualities the quality of compassion, courage, wisdom, self-control, doing good for others, altruism we ask for those qualities. So, in this way we are creating consistent positive impressions that the second aspect of Pratyahar, the third aspect of Pratyahar is creating inner impressions just by focusing on our sensations. You can do it and experience it right away. If you are watching this video just start noticing and take your attention to your toes wherever you are sitting just bring your attention to your toes. You must have noticed that your sitting posture must have become better. Now, take your attention from your toes to your ankle. You can start this process with the right leg, you take your attention to the toes of the right leg or take your attention to the right ankle, right calf muscles, right knee, right thigh then you can take your attention to the left toes, left ankle, left calf muscles, left knee, take your attention to the stomach. Notice the movements going on in the stomach with breathing then you can take your attention to your chest and if you wish to you can close your eyes as well. From the chest you can take your attention to the right shoulder, relax your shoulder, left shoulder, relax the left shoulder, face, top of the skull, notice your breath. Now you can choose any sensation in the body from toe to head and be with that sensation. Even this simple practice would have brought some level of calmness within ourselves. This is an example of creating inner impressions. This is one way of doing Indriya Pratyahar. There is a vast field of knowledge and practice called Vipassana. Vipassana beautifully uses this practice. Vipassana incorporates Pratyahar into it. Of course it is more than Pratyahar, it is Samma Gyan, it can be Samma Samadhi, it can lead to Samma Samadhi. But Vipassana very beautifully starts and take into account of the process which we study in Pratyahar because it starts with focusing our attention to one or few sensations in the body. So, this is the Indriya Pratyahar. Very famous Mudra or practice for Indriya Pratyahar is Yoni Mudra. In the Yoni Mudra, we make the hand posture as mentioned in the as shown in the picture. The index finger on the eyelashes close our eyelashes. We put thumb on the ear openings, we close it with the sufficient pressure. We also put other fingers on our nose and the right below the nostrils. We focus on our breath and we continue to be in this posture and count the breath to 21 times minimum. That is a quick method of performing Indriya Pratyahar. Then there is a Prana Pratyahar, control of Prana, control of vital energy. This is preparation for the Pratyahar in fact. The Prana is gathered by taking our attention from the toe to head and then centering our attention on maybe in the stomach or between the eyebrows. In this way, we can perform Prana Pratyahar or control of Prana. Karma Pratyahar is about control of action. This involves Karma Yoga. Karma Yoga is deeply connected with our action, with our work, with our career and with our career choices. In nutshell, Karma Pratyahar is doing action necessary to life and avoiding those based on desire and self gratification. That means, looking at action or decision, whether it is arising from my desire, my lalasa or because of the sense of duty and for the well being of all, Swadham and Lokasangra. We will be discussing these terms in the upcoming sessions, but Karma Pratyahar is about controlling action and directing it towards the dharma and dharma is not religion, dharma is sustainability, dharma is harmony within and without. Whether my action is arising from that and leading from that or it is arising from my desire, self gratification and leading to desire and self gratification. That is the control of action. Manopratyahar is withdrawal of mind from senses. Unimudra can be helpful in Manopratyahar as well because when we perform Unimudra, we are not only controlling our indriyas by focusing our breath and focusing on the moments in the stomach, we are also performing Manopratyahar, withdrawal of mind from senses. Mind is the reen through which the horses of the senses are controlled. Reen is held by the mind, reen is held by the intellect or buddhi, reen itself is man. So, indriyas or senses follow man. It is also compared with the honey bee, queen honey bee and the worker honey bee. Queen honey bee is like man. Wherever queen honey bee sits or goes, that is where all the worker honey bees go and make their nest there. In the same way, wherever our man, our mind goes, our senses follow that. That is why you must have noticed that many a time your senses are here, but you are not able to see what is going on here because your man or mind is somewhere else that establishes that indriyas follow man. Manopratyahar is done with the help of breath, with the help of attention. That is why even in performing asanas, we do little bit of pratyahar, but there are some more intense practices of the pratyahar we are going to look at in the upcoming slides.


فشرف بل اشتغالي بالعلم ولا تبغي به ما عشت يا بابا دلا وياله من شراف عظيم الحمد لله رب العالمين والعاقبة للمتقين ولا عدوان إلا على الظالمين وأسلموا على من أرسله الله رحمة للعالمين سيدنا ونبينا محمد وعلى آله وأصحابه والتابعين لهم بإحسان إلى يوم الدين وإنهو الكتاب الورقات للإمام أبي معالي الجوين رحمه الله إمام الحرمين نحن نأخذ الثلاثة أقصام العلم أو نتحدث عن علم البروري وإذا شرح بابد الله ابن صالح الفوزان إن شاء الله تعالى ونحن نتحدث عن العلم النظري إن شاء الله تعالى إن شرح بابد الله ابن صالح الفوزان العلم النظري وهو أعمال رواحات الجديدة وعلم النظري ويو ثاما وعلم المقتسب أيضا إنه نظري وعلم اللوج which you gained وهو علم النظري وعلم المقتسب أنه ما يقاع ذلك which falls أن نظري وستيدلال يولد بجوء أنه ساعد نظر وحظة وحظة وحظة وحظة يتكلم لك ما أمام الحرمين يعني عندما يقعوا ما يقعوا أي ما يحصلوا هذا الذي ستأخذه من العلم في حال المعرفة لذا ما هي جينس جينس في التعريف يتفل في تجهة وقوله وقوله عن نظر لأنها سلورة عن غير نظر it occurs without you having to observe مثل العلم بأدنى المذي نجس such as the knowledge that the maybe is najس there are three things that come out from a person a male or a female what are they المذي وذي and وذي مذي and وذي these are the three those three that I just mentioned the many is not najس the many is not najس meaning if the many goes on your clothes the many will not make your clothing dirty you don't have to wash it off because it's not impure that is the many the maybe if it goes on your clothing or it goes on you you have to wash your private part the وذي the وذي also is the same as the maybe which is that if it goes on your clothing or on you it makes you it is impure you have to wash yourself from it you have to wash yourself from it pay attention the first one I mentioned from those three is many many comes after intimacy or a wet dream and it comes out with pleasure and you feel it when it comes out because it comes out with pleasure normally when it comes out it jumps it jumps out like in that's the many but it's not impure but you become impure you but you become you become impure the many when it comes out you become you become impure you have to have a bath it comes with that joint the maybe does not come out because of pleasure it is a after after the pleasure it comes out from you or it comes out if a man for example he erects and it goes down again it comes out and he may not feel it he may not feel it coming out okay the وذي the وذي it comes after working when you lift something up and you work a lot or the weather is very cold or you go to the toilet or you urinate when it just comes out like in the وذي comes out from when there was desires and nothing happened and it goes down the وذي comes out the person doesn't know that it came out but whenever they see it they have to wash their private parts so how do you know this knowledge it requires one that the وذي is impure how do you find out another observation you have to look at the text also وأن الطواف الودع the طواف الودع which is the طواف you do it's called the farewell طواف it is obligatory can somebody know that by ضروري knowledge or does he need observation into the text he needs observation also which is علم النظري is also what أن الإجارة that إجارة which is renting عقد is a contract which is لازم إن شاء الله تعالى when we come to and when we go to معاملات the chapter of معاملات in our book عمدة الاحكام which we are doing right now we will learn that the عقود the transaction that people do there is عقد which is called لازم الطرفاني لازم الطرف and لازم الطرفاني which means what there are عقود a transaction that two people do both of the two parties have to hold on to this contract they cannot leave it for example if a person rents a house to you he rents a house to you the house in which he has rented to you لازم and you signed that contract you signed a one year contract the day you signed it the next day the person who you rented it for or you rented it for yourself you passed away you died the owner of the house what does he do if he doesn't want to terminate that contract and he still wants that rent to be given to him or the money was already given to him he took it from you he can say to you I don't care I will not break the contract because it's لازم الطرفاني both parties have to stick to it so what is that person his children he's he's offspring they reside they reside in it they benefit from it if he chooses to say okay I understand your circumstances have changed here's your money you guys can leave now but what are they allowed they are allowed to rent the house they don't want to benefit from it they're allowed to sublet it in the الشريعة they let it if he forgives them insha'Allah we're going to come to it it's called إقالة it is called إقالة and when we come to the pub it could do إحتان the same way is when you marry a woman you can't just marry a woman and they just walk out the other day and say I'm not in this contract I'm not talking about divorce divorce is another matter but the man can't say take your daughter back I don't want her anymore if he say that divorce her that's something else that is nothing to do with the contract so there's something called لازم الطرفاني both parties have to stick mine you marry a man's daughter you can't say I'm not going to let her stay in the house I'm just going to walk around the block in the area and whenever I need her I'll call her until she comes over to me that wasn't the condition لازم الطرفاني every person who makes a contract with two parties if both parties have taken this contract together لازم that both parties have to hold it to the contract if a person allows the other person to break the contract then sometimes that contract can be one sided and it only obliges one person and not the other that person who signed that contract with that person who made the contract one sided he has to fulfill that contract he cannot break it so when do we fight علم النظري how does it occur and yeah لازم الطرفاني okay علم النظري what did he define it as عرث النظر والستدلال sorry he defined علم النظري and explain it to you and we'll join it but after that what did he do he now defined for you another anستدلال another means what observation and looking for evidence what are they what is another and what is anستدلال we need them because they are both present in which one علم النظري and they are both absent from which one علم الضروري لأنهما واقع علي في تعريف العلم ضروري نفيا والمقتصب اتبعت it's important so let's take each one what does another mean and what does anستدلال mean because why why do we need to know because another is anستدلال when negated from علم الضروري and they were for what علم النظري so you have to know what they are take علم النظري what does another mean what does another mean another means two meanings يطلقوا علام علي many meanings are given to it but we're only we're only going to take two you'll find the word نظر is used for many meanings but two so far are the most famous one is رؤية العين the sea with the eye is called نظر sea with something with your eyes is called نظر also الفكر your thoughts is called نظر as well and the second one is the one that is intended here observing it with your mind thinking about something pay attention this is a very important point very very important that is what it is linguistically the one another linguistically what is it technically mean technically the author I explain it to you what is it هو الفكروا it is to think في حالي المنظوري فيه it is to look at pay attention عبد الله صالحة والسلام الفكروا it is to think في الشيء in the matter which you are looking at you are taking this thing and you are looking at it and you are thinking about it your brain is working on the thing that you are going to pay attention why are you looking at why are you thinking of it بالا باللي معرفة because you are looking to understand the reality of it pay attention why would you do that لأن النظر because the thinking هو الطريق it is the past إلى معرفة الأحكام الشرعية it is to it is one of the ways to know or it is the way to know the أحكام of the شريعة the rulings of the شريعة the another is a way to know the rulings of the شريعة إذا تمت شروته but that is when the conditions are present in you what does that mean you are going to mention to us what are they and taking them one the person who is allowed to think by looking at an evidence is a person who conditions are present in him other people are not allowed to do that وهي أن it is أن يكون النظر the one who is looking is a person كامل العالة he has the instrumental knowledge what does that mean he has the twelve fields of the language he understands he knows نحوة he knows صرف he knows the three types of بلاغة علم البيان علم المعاني علم المعاني he has he has he has أدب he understands أدب he understands أدب he understands أدب he understands أدب he understands he understands he knows قراءات and the Qur'an and the sciences of the Qur'an and he knows أصول التفسير ها he is أقيد and his تحيين is our point that individual is a person who has he has the instrumental he is so that's one that's the fact that's the that's one of the conditions that is needed in him but then more of it will come to us in details so the first one is the individual he has to have the instrumental knowledge صحيح ها the second thing is second that he's thinking the look that he's doing in terms of thinking has to be في دليل in evidence what he's looking at has to be a دليل not a not a doubt so what he's observing has to be a دليل from the pay attention وأي يستوفي دليل ويعرف الشروط he also has to have what the third one is what he has to also be able to pay attention brothers all of the evidences regarding that matter have to be there for him he can't be taking part of the evidences from the شريعة and forsake the others are you with me so he brings up all the evidences he puts on the table he says are these all the evidences regarding this matter yes and then what does he do he looks at that he does it he observes another he thinks he works his brain he has the instrumental knowledge he applies all the sciences that he knows on it all of it he lets it go on it and then after that what does he bring out of it he brings out there the rolling good so do you know now what another means the second one is دليل دليل when is the دليل وقول the speech of the author when he said when is the دليل the دليل is looking for evidence is the دليل means looking for evidence pay attention is that because that's what I promised in the beginning اصين والتاء والتطالبي pay attention in Arabic language the scene and the mean request the word was what دليل it was what it was دليل it became what اصين the scene and the تاء meaning is not like the word is still صار can is still صار looking for victory how would you say it it means طالب النصر اي طالب النصر to look for victory it came from what is still صار came from what النصر victory how do you say looking for victory you say اصين اصين تاء before it it becomes what look طالب so what does it mean والمراد what is meant by دليل so we let what is meant by the scene and the تاء is تدلال we need to know what is دليل then دليل means what ما يستدل به it is what من نصر from a text نص here means كتاب and the sunnah it means the كتاب and the sunnah anything you will use as evidence from كتاب and the sunnah او اجباع او اجباع اجباع زي it is دليل او غيري ما او other than them او other than them is also قياس will also under fall and do it and under that which we will go into more details إن شاء الله وان نظر نظر وان استدلال وان استدلال بمعنى نواحي they have they have one meaning that's one view they mean the same another وان استدلال both of them mean what one thing that's one view and what is the one meaning that they both have وهو and that is أن كل من هما يؤدي إلى المطلوب both of them will reach you to what you are looking for looking at something will allow you to know what you are looking for looking for evidences will also allow you to know what you are looking for both of them have that meaning the same they're both the same وجمع بينهم المصنف أن المصنف he combined both of them في التعريف العلم ضروري والمكتسة متأكيدا and he said the author he combined بينهم when he was talking about the definition العلم ضروري did he not say it ما لا يقع النظر استدلال did he not say that about that which occurs without another an استدلال did he not negated from العلم ضروري both of them so did he bring both in there العلم ضروري did he also bring both of them in the definition yes you have put them both when he brought it in terms of negating it and when he brought it in terms of affirming it pay attention why did he do that عبدالله مصالح الفوزان said he only brought both of them to emphasize because they both mean the same that's why he did it that's one view who believed that they both mean the same and that's one view the second view is وقال بعضهم some of the علمان they said النظر is عم مومنة استدلال is more broader than استدلال نظر is more broader than استدلال is more broader لأنه because يقول فتصوراتي والتصديقات because نظر it falls in التصورات and التصديقات that's why that the نظر has a broader meaning than استدلال because in نظر تصور and تصديق for under it whereas what استدلال only تصديقات for under it only استدلال only تصديقات for under it whereas نظر تصورات and التصديقات both for under it whereas استدلال is only specific to تصديقات now the question is what is تصورات تصديقات I mentioned that last lesson to be honest there's no need for me to mention again but because I saw some of your faces drop I'm going to explain to you guys إن شاء الله تصورات means what ادراك الخالي عن الحكم it is a perception of something without giving any rule to it such as for example saying this is this is ساعة خلاص تصور I realized that this is ساعة no onion no one else ساعة ساعة this is him I know who he is I perceive him لكن تصديقات means what I know he's ساعة plus I have put a rolling on him and what is the rolling it is a reliable brother so now I added تصديق means rolling with it are you with me and that's why the line of poetry الإدراك من غير قضاء تصور ومعه التصديق وذاك مشتهر I mentioned that line of poetry good so never it encompasses both of those meanings that I mentioned what does it encompass تصورات and تصديقات and that is by the way تصور and تصديق is mainly spoken about the علماء of they are the ones that speak about it whereas تصديقات is specific to what تصديقات تصديقات means rolling تصديقات is only rolling whereas another is of his perception plus rolling so who's more brother another another that is تصديق what does it mean technically when دليل or دليل means what هو المرشدو دليل means something that makes you reach who guides you مرشد it guides you مرشدو it guides you to what to the thing that you want to know or the thing that you're looking for or the thing that you're requesting that دليل is what guides you to it دليل is فعيلون بمعنى بمعنى فعيلون it's a the wisdom that it comes in terms of صرف it's فعيل and the meaning that is meant by it it's فعيل which is from what من الدلالة وهي الإشاد it comes from دلالة which is فعيل so that the word دليل can be anybody who guides you anybody who guides you so sorry what we just took now was نظر and استدلال now we're taking دليل what we're taking now is دليل دليل is فعيل بمعنى فعيلون and it comes from the word دلالة الدلالة وهي الإرشاد linguistically the word is general and it means anybody who anything that guides you to what you're looking for I can be a دليل right now I'm a دليل if I take our brother سعد by the hand and I take him to a destination he's looking for I'm a دليل why because I've guided him to something which he's looking for correct but then technically that's not what it means


This paper investigated the effects of lubricant degradation on spur gear wear. Macroscale tests were conducted using both conventional and artificially degraded lubricants, while microscale tests were done using tools such as pheasant analysis. The results showed that lubricant degradation caused increased wear and decreased lubricant quality. Additionally, it was found that the pH meter could be used to measure lubricant quality and detect degradation.