All right, so welcome to Steal This Talk. Today I hope to give you some of my thoughts about how we can make Ruby more fun by learning from other languages that have also tried to make fun a priority. A couple of notes before we begin. It is impossible for me to sit up here the same conditions that make me really well lit and have this natural glow also make it impossible for me to see anyone in the audience. So if you have your hand raised or anything like that I'm absolutely not gonna be able to see you. So please feel free however to use my Twitter handle to tweet me questions. I will get a buzz on my phone when that happens and I will respond to the question that way. Hopefully that will make for a engaging session as people have questions. And if I don't get to your questions during the talk I promise that I'll respond to you on Twitter afterwards. If you hate Twitter or just don't wanna use it or don't have a Twitter account, that's 100% fine too. Please feel free to email me and I'll also respond to your questions in the same way. All right, so just really briefly about me. I work for a wonderful company called Pivotal. We have some of my fellow employees up here in the front two rows. Props for fellow pivots. And what I do there is work with enterprise companies who face a lot of challenges with how they build, deliver, develop and design software because doing that is difficult. It's hard to write software. But when we're doing that we get exposed to a lot of different ways that people write software or a lot of different languages, a lot of different assumptions about what is and isn't okay to put into software. And that I think has formed the basis for this talk and that it's exposed me to a lot of different ways of thinking about software and the tools that we use. So I'd like to cover basically four themes. One is where do we come from as Rubyists? What are sort of the ancestors to Ruby and how have those languages influenced not only Ruby but also the broader programming language community? Second is given that sort of background tapestry where might we be going in the future? What aspects of Ruby were probably gonna be around for the long haul? What might be more flexible and change? And this is all speculation, of course. I'm not a dictator with respect to the direction of the Ruby programming language. But what could we speculate on and what are some of the things we're seeing in other programming languages that might be applicable or useful for Ruby to adopt and also in the same spirit as Ruby's current set of features and goals? And then what are some ways that we could get there? So I'll show you some reference implementations of these ideas that are certainly not production ready but there's a GitHub repo for it where I basically modified parts of the Ruby source code to produce these effects or some facsimile of them at least. And then I'll close with a discussion about how we can do it and to hopefully motivate you to try out these sorts of experiments on your own. All right, so let's start with where we are right now. So the best way to kind of understand where Ruby might be in the future is to look at how it got where it is now, I think. And so let's maybe go back to the history books and they say that he who, there's a powerful quote for George Santayana where he said he who does not learn from history is doomed to repeat it. So let's make sure we learn our history with respect to Ruby. So we use programming languages for all kinds of reasons. Some people wanna just do work and clock in and out. Some people are using it for fun. Some people are using it to do science. And some people are just using it because Ruby is fun to use. So we use programming languages for all kinds of reasons whether that's self-discipline or to like people or anything in between. But that means that programming languages are not, they don't exist in isolation. They're as much cultural artifacts as they are technological ones. They're a product of the time, the assumptions that were made when they were designed, the problems that their designers faced in the moment and so on. And of course in the people who actually contributed to the language and wrote it in the first place. Now the chief advantage of programming language over programming languages over other kinds of tools is that they're malleable, they're mutable, they can change over time. If you mass produce a million screwdrivers and then it turns out that those screwdrivers were actually going, were supposed to be hammers, like that's a big problem. You just wasted a lot of metal for no reason. But programming languages don't have this problem. There's, or we don't have it as strongly because if there is a problem we can change it, we have the power. So there's a question of can we make those properties better for the tools that we have? Is there a way that we can get there? And if so, how? And in order to explore that, I wanna explore another programming language that's much older in Ruby, but is also still around. And it's the Massachusetts General Hospital Utility Multi-Programming System for mumps for short. And mumps is pretty much the opposite of Ruby in the sense that Ruby is what we might call a general purpose programming language. Mumps is general purpose with respect to it's picturing completeness, but it is very specific with respect to the kinds of business problems and domains it's trying to solve. So it turns out nobody likes saying the whole acronym, so it actually now goes by M. It turns out that mumps being used in a medical field, naming it after a deadly disease was not the greatest thing in the world. So mumps looks really archaic by today's standards. If you sort of rewind the clock and you could time travel back to 1966 when mumps was written, it would look comparatively modern then, but relative to today's standards, mumps looks very archaic. But at the same time, it has some of the most intriguing and I would dare say novel features from the programming language archeology that certainly I've ever seen. And it's difficult to find some of these features anywhere else. And to see how it solved the business problems that it was originally designed for, I wanna kind of take a little trip back to about 50 years ago to 1966 when mumps was first made. So in 1966, just to sort of set your frame of reference, that's when NASA had just finished the first ever space docking. The U.S. Supreme Court had just decided on the Miranda case, which is the case that gave us the Miranda warnings and the Miranda rights. You have the right to remain silent, all of that stuff. And the Batman series starring Adam West had just debuted on television value. That's the pow biff Batman, not the Batman cartoon. So and here in New Orleans, the New Orleans Saints were created in the same year. It turns out that the NFL needed an antitrust exemption to merge with the AFL and the two most powerful senators who were blocking it were both from Louisiana. So they said, if you create the New Orleans Saints, if you give us a franchise here in New Orleans, we'll go ahead and vote for your deal. And so that's how you got the New Orleans Saints. But you don't care about any of that because you are a technology director for the Massachusetts General's University Hospital system. And for you, something much more important happened in 1966, which is that transistors, which had been around for a while. The first transistor was invented about 20 years before that in 1947, but transistors had started getting miniaturized and cheaper and they were starting to find their ways into sensors and small devices were capable of taking readings, for example, on patients. Now, doctors love these sensors because it means that the information that it used to take, say, a team of nurses to gather on a routine basis once an hour from a patient can now be done by effectively a robot, a set of wires and some recording instruments that just measure the values of those sensors. So doctors love this because it means each doctor can see many more patients per hour than they could before and they're able to provide better care. But there's a problem, which is how are you gonna implement that in a hospital your size? How are you gonna take all of these data points that are being measured once, multiple times a second, maybe multiple times a minute? And how are you gonna record this in a way that is suitable, that will be readable by humans later and accessible to practitioners that are providing care? How do you do that? And it turns out that it was almost like an IoT-like challenge, but in 1966 where these sensors were sort of distributed all over the place, they were really dumb. You couldn't do anything, they couldn't report their status, you could just write data and that was it. And you just have to make sure that you got the data that they were writing or else. Because if you miss even one or two of these or you record the wrong value, that might lead you to a false diagnosis or to prescribe the wrong treatment or to, in the worst case, not even notice that someone was having a problem at all and have some kind of serious consequences for patient health. So how do you get that really wide pipe of data into some system that's going to record that data? So that's the problem that Mumps was trying to solve in people's lives around the line. And they had some thoughts about how to do that. So in Mumps, it turns out that there is a built-in database. Now when you hear built-in database, what you might be thinking of is, like maybe there's a standard library function for talking to databases over like a primitive version of ODBC or some kind of specific communications protocol. But that's not what it's, you might be imagining maybe something like this where you have like, something that opens a connection and then something that does something on that connection.  That's not actually what I mean at all. What I mean is that the memory model for Mumps programs is not a continuously addressable chunk of linear memory the way it is in, I would say virtually every other modern execution environment. And it's actually a key value store. So that means that you read and write variables and memory by effectively addressing and querying them inside of this database. So essentially all Mumps programs had like a tiny version of MongoDB inside of them before 50 years, before MongoDB was cool. So it's like ultimate web scale, but for patients. So that's a bit hard maybe to wrap our heads around because we don't have any frame of reference for stuff that looks like that today. So what would that look like maybe in a pseudo version of Ruby that was trying to do the same thing? So a normal sort of assignment might look a non-Mumps type assignment, might look something like this. We have a couple of variables and you assign the right-hand side to the left-hand side, then you do some operations and if you want a more complex assignment you can take previous primitive assignments and put them together. With Mumps it's basically a very different version of that. So instead of regular assignments you get awesome extreme assignments and the way Mumps works is you are again setting keys and getting those keys later in this database. And you can perform operations on the keys to produce new keys or some set of values. That doesn't look appreciably different than assignment. That looks like it's maybe could almost be, like the equal sign could almost be syntax sugar for that. But what's different about Mumps is that you can do things like this. Show me all the variables that start with the letter S. Like that's somewhat harder to do in Ruby or other modern programming languages. It's hard to go into say C-sharper Java and say please enumerate all the variables in this program that start with the letter S. A lot of that information is lost at runtime or doesn't exist and so on. That's something you could do in Mumps. That's not actually Mumps. This is a Ruby-like version of Mumps. If I showed you Mumps it's basically unreadable. But that's a really interesting property because it's almost like a primitive version of metaprogramming. Remember this is 1966, right? Like metaprogramming, I don't even know if that was a word at that point in widespread use. So you can find these elements of your program almost dynamically which is really interesting. And that's a very different model than I think we're used to today. And so that's a really neat way to solve some of the problems that they were having because they basically just took all of this data and were dumping it directly to this database. There was no intermediate remote connection. The database was the program. It was one and the same thing. So that's actually kind of a really neat way to solve the program. If you need a database you put one inside of the same executing process that you're actually running the program in. So it's actually more like Mumps is a database that happens to have a programming language. So you don't need ActiveRecorder SQL or any of these ORMs. And so are there things that we can learn from Ruby's predecessors in the same way? Mumps did what it did because that was the best solution given the constraints of the time. I think we can say the same for every programming language that came after. The reason it was designed in the way that it was designed was because those were the constraints of the time. That was the context in which it was built. There were no frames of reference of things that came after that point. And so again, programming languages don't exist in isolation. They're as much cultural as they are technological. So Ruby's ancestors, if you go to the Ruby website or you sort of stare at Ruby long enough and adjacent to other programming languages, you'll see that it has a lot of similarities to aspects of these other programming languages. Now these are the five that are sort of explicitly stated as being historical ancestors and influences of Ruby. But all languages I think are inspired to some degree by this stuff that came before them. Everybody sort of stands on the shoulders of giants to some degree, especially in this field. And it could be helpful to kind of see the context here from Ruby's past. Lisp was basically the second oldest high level language in existence and widespread use only for Tran, which came one year before that is older. It's still in use. Smalltalk gave us this idea of dynamic objects whose not only their state can be mutated, but also their behavior can be added to or subtracted from at runtime. So if you've ever opened up a object in Ruby and added more methods to it, you are basically doing what Smalltalk did in 1969. Ada, Eiffel, Pearl, all of these sort of added more structural ideas, structural elements to the way that we design and build our programs. And then Ruby got to benefit in some sense from all of the work that had been done before. So those are its predecessors. What about Ruby's contemporary? So things that are roughly around the same time as Ruby were the JVM-based languages of Java initially, then later on followed by more modern successors like Scala and Kotlin, Clojure, et cetera. And then right around slightly before, Ruby were common Lisp, which was a standardization of Lisp. Remember, Lisp had been around for a really long time. There were like 300 different versions of it. Everybody got together in a room and said let's make one kind of version we all agree on. I mean Haskell has some of the same ideas as well. What about the things that came after Ruby? So there are things like Elixir, Swift, and Elm, languages that actually took some inspiration from parts of Ruby or their developers, or other their first few developers were often Rubyists to begin with. And so it was a really broad ecosystem of sort of before, during, and after that Ruby influenced or was influenced by. And some of the things I wanna talk about today are what are the aspects that those languages have that might be interesting to bring back to Ruby? And I'm gonna divide that into a few different segments. So if you can imagine a landscape of possible choices we could pick from to add to Ruby, where the things, this axis on the left represents things that are better for Ruby in some subjective measurement. So more payoff for doing these things. And then on the bottom axis, the left to right one, we have things that require more work. So stuff that's harder to put into Ruby, something like gradual typing might be a lot of work relative to something like changing a few error messages. So you can think of a line of possibilities where you have a pretty even trade-off between the amount of work you have to do and the payoff that you get for doing that work. Everything that's on the line is a pretty fair trade-off. Stuff that's above the line is more a payoff for less work, and stuff that's below the line is more work for not as much payoff. So we wanna try to find the things that are above the line and hopefully to the left, as to the left as possible. And we'll start off with some things that I think are pretty easy, at least based on my sort of very simplistic implementation of them in the variant Ruby in the GitHub repository that I'll show you. The first thing we need to take a look at is error messages.  It's probably the REPL or the first Hello World program that you wrote or whatever your interface to the programming language is. But the second thing you see is when you screw that programming up and then you get an error message. And then your first negative experience will be defined by how helpful that error message is as fixing or finding the problem for you. So let's start with C++, for example. This is a very simple but incorrect C++ program. It is not syntactically valid. The type of this variable needs to be defined and it also doesn't declare a main or anything like that. So if you had to guess, this is a line which will compile this program and then send the standard error, which is where errors would normally go from a compiler to standard out. And then we're gonna count the number of error lines that are generated by trying to compile this program. So how many errors would you guess that there are? So just order of magnitude. Raise your hand if you think the number of errors is between zero and 10. As you like, this is obviously a trick question, it wouldn't be that easy. Raise your hand if you think it's between 10 and 100. How about 100 and 1,000? How about 1,000 to 10,000? How about 10,000 to 100,000? All right, you are not nearly pessimistic enough. So I know you're not gonna believe me, so we're just gonna pop over to the demo here. So here's that same file just to prove it was gonna nothing up my sleeve, right? There's the same file that we saw before and now let's try to compile it. Well, I'll show you what the errors are first so you can, oops, well, that's obviously an error because I didn't type it correctly. There's a lot of stuff about the type not being named if anybody gets confused because it thinks that this is basically a template instantiation and it wants to, it wants you to, okay, so there you go, 20,702 lines. All right, this one says to 20,701 lines, so maybe I had an extra no by there or something. So a lot of lines and it all looks like that. So it all looks like this. It's the same error of 5,000 times. So now that's a pretty unreasonable, like that's cheating, right? Like probably your first program's not gonna look like that unless you made a horrible typo and then you'd be like, obviously that's not correct or it shouldn't look like that. So it's cheating a little bit, but I think it illustrates the point that that's not a great user experience to show you the same error 5,000 times. So in Ruby, a really simple program, A, B, two arguments to this add function and we're gonna add them together and return the value. All right, so if you do something, and forgetting about the function itself for a second, if you do this, so if you add the string one plus the integer two, you'll get told that there is a type error, right? There's no implicit conversion of integer into string. So that means that this value is, this is really calling a plus method that's on string and expecting that there is a string on the other side of that plus and there isn't, it's an integer and there's no implicit conversion of integer into string. So the first piece of this error message is, hey, here's the problem. This is the thing that you need to fix. Now, if you change the order of the arguments, if you change it to one plus the string two, you get a different error message, which is string can't be coerced into integer. So, okay, that's good that we're being told what the problem is and it seems relatively clear, but I wanna compare that to Elm where a similar function that I define bit is an add function that takes two integer arguments. I get a really nice message that says, hey, type mismatch, the second argument to this function named add is causing a mismatch. Here's the line that caused the mismatch. Here highlighted in red is the thing that is the problem that you need to fix and here's what I was expecting to happen, but here's what actually happened. So, spraking that down again, there's a piece that says, here's the problem that you need to fix. There's a piece that says, here's the context for that problem. There's a piece that says, here's the, here's what you have to do. Here's what, here's the mismatch in my expectations that you need to resolve. So, it was integer or it's supposed to be integer, but I received a string. Now, when you go to Ruby and you look at real problems, so here's an actual stack trace from a project that I'm working on. This is from Honey Badger, which is a SaaS service that will take your exceptions and provide you a nice wrapper around them. And that's often necessary because you don't wanna have like monitor the exceptions yourself and some production system so you offload that to somebody else's responsibility and you pay the money, which is what we do for Honey Badger. So, this line caused a no method error because the method map is not defined for no values. So, this is what Honey Badger is telling me, but what Ruby told me was just really a stack trace. All Ruby told me was this and oh yeah, there's a problem on line 46 of this file. Now, what would be great is if Ruby told me, hey, this value, consolidated history, that's nil, that's the nil thing. This is the line that is the problem. I'm gonna print it out for you and I'll highlight the part of the value that's the problem, which is this consolidated history part. What would be awesome is to see how the consolidated history get to be nil. It's obviously defined somewhere else on this block because it's not a name error, it's just a nil error, it's a name error, so if consolidated history wasn't defined anywhere, I would get a different error, but it is defined somewhere else, so I'd like to see why was it nil, how did this happen? So, there's context that could be added to that message that would be helpful for me. So, a suggestion would be a way to improve these error messages would be, what if we could clearly identify these salient values that are participating in the error that's just been raised? If we could state the difference between expectations and reality, we'd have a lot clearer picture of what we need to fix. We could provide context and related values for the problem and then we can tell the story of the problem by putting all those pieces together. So, right, so exception handling. So, Ruby has this idea of sort of bipartite exception handling of two chunks. You've got the part where you have a thing that you want to happen and then there's a part where that thing goes wrong, let's branch into this other block of code to try to solve the problem and that's bipartite exception handling, two parts. Lisp and some other kinds of similar languages, Haskell among them has a different concept of tripartite handling, what they call condition. So, you have a, rather than having a, this is what happens when everything goes right and this is what happens in branch to one or more of these blocks when something goes wrong, that's the sort of Ruby, Java, C sharp, OOP, more flavored approach. Functional programming is sort of a different take on that which is condition. So, you have a thing that you'd like to be true. I mean, if that invariant is violated at some point, so it's, if that invariant is no longer true, then we're going to compensate for that by branching into this piece of code and then we're going to do something based on that that preserves the invariant or tries to preserve the invariant. I mean, at that point, you can actually go back to the state where the invariant was broken because now the invariant's true again. So, if, so in other words, it gives you a chance to kind of repair the situation in a way that's different from like, began rescue and then like finally or recover or those kinds of blocks. That was the first thing. The next thing I was going to talk about was pattern matching. So, in Ruby, you have case statements, right? You have, you have a switch in case as a construct is pretty popular, not just in Ruby but in many other languages. And the general idea is that you have like an object or a condition and you're saying, okay, given this object, what would, what are some of the possible values or states that it could have and then I'd like to take a different action depending on whether it's in one or more of those states. Well, with pattern matching, it's a much more structural approach rather than you having to define the individual states and say, well, this, you know, if it's this then do that, if it's this then do that rather than having effectively what's a series of if then blocks, you instead have an object and then you're required to enumerate all of the possibilities that that object could take on. So it, you're guaranteed that no state is, no stones left unturned effectively. So you can't have an error where you've forgotten about a state. So it's almost like a form of static type checking but doesn't require having a static type system to do that. Just requires you being able to say, here's all the cases and if I don't handle anything, I, if I don't handle anything, I want, I want that to be an error. I want you to tell me. So this is to be like, if you know that the value is an integer, you say, I expect this to be an integer. Then immediately, if it's not an integer, you get an error and then you'd be required to handle every integer case. So if there's a possible value that that integer could take on but is not accounted for in the statement that would also be an error. So you can get more complex than just the values though because you could talk about the relationships that the types have to each other. So for example, if a, if you have an object that is say, some kind of person, I hate to use the person hierarchy, but let's just say it's some kind of person and let's say it's some kind of profession. So, and a profession could be in this type hierarchy, either a doctor, a lawyer, a nurse, or a sports ball player. So if you're, when I get an object of type profession, my pattern matching can tell me, okay, I know that this is an object of that kind and therefore it must be one of these four subtypes or the original higher level type.  And if I haven't declared or described one or more of those cases, that's an error. Right now, if you can't really do that, there's nobody kind of getting your back, certainly not the interpreters, not getting your back in terms of, oh yeah, I forgot that or I left that out. So this would be a way of introspecting the combination of a type hierarchy plus the values that are being defined in the suite that are provided to the switch statement and then branching to one or more of the cases as a result. So that's super popular and very useful, I would say, and anytime you're working with a DSL, which is very, very aligned to what I think a lot of people would say ruby strengths are the utility of having pattern matching at your disposal is so high that it's a pretty common feature even in relatively newer languages like Swift. It's like Elixir has this, Swift has this, Erlang has this, Haskell has this. So it's pretty popular in the functional approach. All right, so next is the idea of explicit module shadowing. So this is where you have an object that mixes in some modules. So this is a ruby class and it's mixing in like say module A and module B. Now you need to override a method that is called in one of those modules. And later, so what you do is you say, okay, I know that that module definition is out there in the original module file, but I need a different definition. I need that method to behave differently. This is super common in Rails, this happens a lot where you include some other module and it gets included into your class that you own but you don't own the module. And then you want some behavior to happen and the way that the owners of the module allow you to change that behavior is for you to define your own methods. So the problem is that later, when someone's reading the class that you wrote that shadows that module method, they have no idea where that method came from or why it's useful. You just have this method that's called like Foo and they don't understand that Foo has anything to do with the module. It's just a method that's floating around in the class that happens to be later called by the module. So there's no explicit connection there. So a really simple thing to do which I guess I'll send the slides afterwards and maybe we record this thing. And I'll show you the GitHub repo but a really straightforward thing you can do if you want to mutate your own local copy of Ruby is you can require that classes, sorry, that methods explicitly state what, when they're overriding that they're doing that. So for example, you can make it an error. In the example I have, you can make it an error to override a method that's already defined without annotating it in some way, without providing a sort of a special marker which says, hey, hold on, just so you know, if you're reading this later, I overwrote this method. This method actually already exists in the method lookup chain for this particular object and I'm replacing its method to lookup with the one that's here instead. So that's called explicit module shadowing in the case of a module. So this is required, it's much more likely to be seen in languages that give you a really strong type hierarchy, a very opinionated type hierarchy like Java or C sharp where there's very strong likelihood that you're going to override behavior in an explicit way and they want you to be super, super obvious that you're doing that. So Java has like this override annotation. I don't think an annotation is really the right way to do that but doesn't look very Ruby-ish to see like annotations all over your code but I think it is kind of Ruby-ish to put like def, this is from some module dot, the name of the method you're actually defining because you can already do that. So this is just requiring you to be explicit when you do do that so there's no confusion or no possibility of confusion. Another thing I was going to talk about was type inferencing. So this is not a new idea and implementations of it are cropping up more and more in different languages but type inferencing as an idea that's been around in academic programming language circles has been around since the 1970s and it's basically this idea that you like types but you also don't want to rewrite everything that you've already written just for the sake of getting types and at the same time you don't want to have to say what type everything is so you don't want to have to, let's say imagine a future version of Ruby that has something like gradual typing in it or maybe even like static typing where you're required to describe exactly what type each value that you're assigning to is in a future version of Ruby that looks like that all of your code is now broken because you'd have to say what type everything is all of a sudden and that's not fun or at least it's not as fun as almost everything else. So the way around that and one way around that is to use what's called type inferencing where if the compiler or interpreter or whatever the execution engine for your programming languages if it can determine that type of something then it should use that information in whatever way it can. So if for example Ruby knows that you've just done i equals 42 then the compiler knows for sure that i for everything after that point until it's assigned to you at some later point is an integer or is a number and if that's true then it can also make assumptions about everything that i touches and see if it also is going to be problematic in that way. So that provides the sort of bedrock that's necessary to do a lot more powerful things like maybe gradual typing but without requiring you to do a whole lot of work it's just the compiler taking advantage of what's already there and saying let me add a lot of metadata to what I know about what you've written and then say what would that metadata tell me about the future state of your program and how can I help you understand more about the program? So this syncs really well with a lot of the stuff we talked about previously with the error messages like imagine Ruby being able to tell you oh yeah that thing that you thought was a person you actually passed me like a rabbit so I don't know what to do with that even though they have a similar kind of type signature and a similar duck typing it's not really the same objects even though I was like halfway able to invoke some of the same methods on it without blowing up that probably isn't what you meant to give me you probably meant to give me a person so those were the four big ones that I can remember off the top of my head but the idea is that I think all four of those ideas and again I'll talk to Abby and get everyone on the slides later but all four of those ideas combined with kind of a healthy appreciation for the fact that other languages can have something to teach Ruby and that the predecessors of Ruby also can still have something to teach Ruby I think we'll go a long way to ensuring that Ruby is as vibrant and as exciting and fun to work with as it is today and has been for a really long time so that's everything I had to say thank you sorry about the technical difficulties and I'll get a new laptop all right let me see if there are any more Twitter questions okay all right is the mic still on yes okay Keith Walsh asked per type inference have you checked out crystal oh not on tests yeah okay Keith Walsh asked have you checked out crystal language so crystal is basically it looks exactly like Ruby not exactly it looks almost exactly like Ruby but it's strongly typed and it has a lot of really interesting features that I think Rubyist would be attracted to if you like static typing but you're like I also like the way Ruby looks and feels when I write it crystal is extremely appealing in that respect I think I don't think it's for everyone like for example none of the libraries that are Ruby libraries work in crystal it's not a they're not binary compatible we don't one-to-one map or anything so you'd have to rewrite everything you already had but it's a really cool alternative to it's a really similar Ruby flavor in the same way that like Elixir is you know sort of similar to Ruby and clearly inspired by it in many respects and if you know if you know anything about the creator he's been very heavily affiliated with Rails and done a lot of work there and devise so those those sort of different facets of Ruby I think really reflect that like Ruby at its core is really awesome and interesting and that people are just kind of taking that awesome and interesting centerpiece and saying what can I kind of add to or modify to make this even more awesome and interesting so yes Keith I have heard of crystal I think it's really cool have not used it in production don't think you I don't know of anyone who currently is but I expect that maybe to change as the ecosystem grows other questions I feel like another question about the font yeah again the font is Fanta Skew's Sans Mono I love I hope your favorite part of this wasn't the font that I use but thank you so I didn't see any other big questions on Twitter I'll follow up with folks afterwards thank you again for sitting through the technical difficulties and have a wonderful rest of RubyConf


Hello and welcome to NewsClick. Today we would be discussing about tuberculosis, a communicable disease the incidence of which has acquired serious proportions, being one of the top 10 causes of deaths worldwide and becoming a global epidemic. The year 2018 alone saw 1.5 million TB related deaths. In the same year, 10 million people fell sick with TB and nearly half a million developed drug resistant TB. To discuss this further, we have today with us two guests, Lina from Medicine's Frontier and Gina who is with the Delhi Network of Positive People. Both of our guests have been closely following the issue and have been at the forefront of dealing with various issues pertaining to TB, be it the policy framework or access on the ground. So welcome Lina and Gina. So Lina if you could please start with taking us through the enormity of the challenge that we face at the hands of TB globally and especially the rise of drug resistant TB. Yeah you know when we had first line TB treatment, the combination of four drugs in the 90s, the world health organizations and governments like India thought that you know they've just overcome TB. And there was a complacency among governments and the WHO that we are just going to be able to treat everyone with those drugs. But you know the bacteria has been there for millions of years, it evolved and developed resistance to the drugs we were using and today it's one of the biggest public health emergencies that we have globally, particularly in India. Yeah so I mean if I can get Gina into it, I mean what are the issues that you face at the ground level when you are there providing services to the people? Some of the issues, what I can cite here is that recently, I'll just compare between some of the things we face before and some of the things we face now. Before two years back like there was no proper diagnosis of like MDR, there was no like everyone feel HIV I'm just linking my like things with the people living with HIV. CVNET was not there at that time but now the CVNET is there. Every PLHIV who are symptomatic is like written by the doctors for CVNET. But the thing is that the challenges we face here is that the basic thing we need to get tested to collect the sample, the fulcrum tube like in and out, like stalk out from the stairs clinic. This is one of the issues that we come across last two, three months back. And some of the issues we come across is the side effect management for both like first line TV or for MDR, there is no proper side effect management. And side and there is no proper counseling in the system, TV system. This is the some of the challenges we face. So I mean if I can get Lina into it, perhaps I should have asked this first. So WHO had called for a move from injectables to oral therapy. I mean why was that and what were the problems? What people didn't realize was that when drug resistance came about, there were no new drugs. So people started to scramble around and use the older antibiotics that had been actually abandoned as to toxic. So majority of the drugs that we're using for drug resistant tuberculosis are drugs that actually doctors did not want to use. So you had older antibiotics like PASS, cyclocerine, many of these drugs being brought back and used for DRTB. And extremely toxic, they caused a lot of side effects. And particularly the injectables, the class of injectables, for example, streptomycin and the other injectables also caused hearing loss. So you had a lot of people living with HIV who had psychosis, depression, extreme nausea, but they had lifelong disabilities. So they lost the hearing or partially lost the hearing. And in many ways, the life was completely changed by DRTB. And maybe the HIV positive people who are more vulnerable and more at risk, I think they face much more problems. One of the cases we closely follow is about one of our colleagues last year, back when we come to know about her, we really closely follow up all the process. Even diagnostic takes too much long time, too much long time. Before she was diagnosed with typhoid, after that, after one month of eating medicine, she suspect about TB, after that she was written for CBNET. And it takes a lot of process even to diagnose. And when she started mediciin, she just feared that six months of injecting drugs, but after that slowly she lost her strength. And she started like suffering from all the side effects like nausea, this even lost her hearing. And one this is hear me, I just want to run away from here. I just don't want to live now. This is the condition of this certain medicine, like huge side effect. This is a certain medicine which like now is going on. So this would be faced out because we have seen closely the tremendous side effect that bear by the people living with HIV from this current mediciin of the drug resistance. So there have been some improvements in the drugs and some new effective drugs like bedaquilin and the laminate have come about. So how effective they are. See, I think what is very important to understand that we were dealing with a public health emergency. We had older toxic drugs which are being used prolonged use without any clinical trials and safety trials. And then you had two new drugs bedaquilin and laminate who went through phase two B trials. So the decision had to be made by governments and WHO would we allow the use of these two new drugs without full phase three data coming in. And our decision was made whether rightly or wrongly that these two new drugs would be provided to people living with DRTB. What is very interesting is that South Africa started to collect data very systematically and they realized that mortality was down, efficacy was up to 70%. Now if you compare efficacy of the older regimens it was less than 50% for MDR and for the extremely drug resistance it was less than 30%. And then you had efficacy of you know adding bedaquilin to regimens through 70%. So South Africa actually changed the whole system by saying bedaquilin should be available to all people living with DRTB. And that's when actually governments started to move and WHO started to move saying we can remove injectables. South Africa has done it and we can put bedaquilin as a core drug in the regimen of DRTB. So that's essentially how it all happened. But we see that there are still problems in access to these medicines I mean maybe prices and so if you could tell us about this entire thing. Yeah so there are three top access barriers for people who have drug resistance tuberculosis. For children the safety data is coming in quite late. So you know one of the newer drugs delimited which is approved for children age three and above is very rarely available in the country. That is one of the reason is because the pharmaceutical company Otsuka was late in providing data. Even today they haven't provided data from three to six years to the Indian FDA. But it's also partially the government's own reticence to allow generic manufacturer of these drugs. So we have highly dependent for bedaquilin and delimited on the two big pharma companies. One is a US pharma company and one is a Japanese pharmaceutical company. So they are holding us hostage on the supply of these drugs. So what do you think that can be done? I mean the first thing that can be done easily if the access to these medicines needs to be increased as Gina has mentioned that there are a lot of problems in terms of access to these medicines on the ground. I think two issues are very very fundamental. I think community monitoring of DRTBE. You know where actually for example organizations like Delhi network of positive people ensure that all people living with HIV who have DRTBE have bedaquilin as part of the regimen. I think that's not happening. So even though the WHO said all people with DRTBE should have bedaquilin as part of the regimen. It's not happening on the ground. So I think community monitoring of the DRTBE program is essential and number two is this that you know J&J and Otsuka's donations will go only so far. At some level India plays a role in global health and the alternative suppliers have the raw materials. Why not bring them to fight this global health emergency? Absolutely. And so I was also wondering that largely the treatment is dependent upon donations and even the government doesn't do much more than receiving donations and so how is that is that sustainable at all in the coming I mean that we have the target of removing TB by 2025 in India for that matter. So I mean is it sustainable at all? No donation is not sustainable and all we like government have to look some long lasting sustainable things like to provide the medicine to the people's donation will go post-denation can be cut at every any time. Yeah absolutely. In fact you know at the beginning of the eighth response we saw some donations and charity from Pfizer and GSK and you could only treat a handful of of patients and that's why actually you know as treatment activists we've been saying that you know the first phase of rollout has been dependent on donations you know now you're tendering for these drugs. Now a tender system is dependent on multiple suppliers if you just have a single source then you're going to pay the price the company demands of you. So I think the tendering system fails when it comes to monopolies and single source suppliers you know. So this is the problem that to today we have is the government has been trying to negotiate lower prices but have been finding it very difficult because you know obviously they know that there's no competition so you know they will not lower the prices beyond what they have already decided globally. Yeah so I was also wondering I mean there was this recently concluded the executive board meeting 146th executive board meeting at the WHO and so they presented one progress report and the other was draft global strategy on TB but do you think it actually addresses the issues that are there and I mean because the issue of trips flexibilities and all use of those trips flexibilities has hardly been perhaps pointed out in these documents. You know you rightly pointed out something you know strategies are laid out at the global level and governments then tend to implement them. What happens with the global strategy is ironically it says that we need to protect IP. Now the intellectual property system for the last 50 years has failed to deliver for tuberculosis. Why will we increase intellectual property protection? It hasn't given us the antibiotics we need let alone for TB for many other infections. So I think this is where I think globally the strategy fails on that count. I think we have to recognize that the intellectual property system has its serious limitations today. It is not being able to address antibiotic resistance in TB and many other areas. So you know if we keep going back to the older intellectual property system and hope that somehow innovations will come and then you know somehow we'll manage to lower prices by negotiations. It's just too late for patients. I think we have to have a collaborative model of R&D and the collaborative model of R&D also means that actually public funded research and institutions contribute to that process and have ownership and responsibility to ensure that the end product is available to patients. So I mean in India for instance I mean we are approaching the world's TB day 24th March but we see that recently one of the parliamentarians has also written in terms of access to TB drugs that should be made available in India and it's still not on the national list of essential medicines the TB medicines. So in in that scenario I mean what would you like to send a message to the government that this should be done immediately and as a long-term strategy also maybe we can take G9. To like this as a long-term strategy like those old like fulcrum tubes stock out medicine stock out means like should not be there one of the things if like we really want to eliminate the TB by 2025 this shortage should not be there and the systems everything this side effect management even the the counseling system which is leaking in the system should like put in the guideline and should be implemented properly this is the thing. Yeah and in fact you know just highlighting by Gina's raising the point today we want to roll out injection-free regimens for children you can't do that without delimited and today we have a country wide shortage of delimited because months were spent negotiating with utsukha and myelin to provide the drug at an affordable cost so I think this is the time actually and I would say this particularly as I've seen many you know women and very young women actually have DRTB and I realize that you know our lives are so badly compromised forever because we have hearing loss we can't go to work we are we are asked to leave our families you know marital homes we lose custody of our children this is happening to women with DRTB on a daily basis and if we could provide a safer and more effective treatment we could address some of these issues that women face so I think at this point of time I think the next step is towards making sure that these are produced by and manufactured in the country and available to the TB program true I guess I mean there are lots of issues which are unadressed and as you rightly pointed that the first thing is that we start producing them and through generic coming ways and hope that some concrete steps would be taken by the government soon thank you for being with us and watching news click


Good morning. I hope everyone had a nice weekend. Do we have any announcements from the TAs? Do we have any TAs? The TAs had a nice weekend. This is the second of our two lectures on memory and learning. Ralph gave the first one. I'm giving this one, and Ralph will give the third one. So this one is on synapses and synaptic plasticity. A more reductionist viewpoint. We start with this interesting vignette that occurred at Harvard in the late 40s and the early 50s in the 20th century. This was a discussion between B.F. Skinner and D.O. Hebb. You've all heard of Skinner boxes, presumably. Skinner was the psychologist who said, We can't know what goes on in the brain. So we are simply going to look at behavior. We're going to put animals in boxes that reward them for some behavior or critique them for other behavior or punish them for other behavior. He actually did this with his children as well. And so his book was entitled, The Organization of Behavior. His colleague at Harvard, Donald O. Hebb said, No, we actually do need to understand the physiology of behavior. And so his book was entitled, The Organization of Behavior Rather than the behavior of organisms. Hebb said, What is learning? Skinner said, We can't ever tell what learning is. We have to put people in boxes and reward them and punish them. Hebb had an idea. The synapse was just being discovered, was just being studied. It was about the same time that Roger Sperry was working on his experiments to cut axons to the optic tectum, et cetera. So Hebb had an idea that perhaps synapses were involved in memory and learning. And so his formalism, now called the Hebbian synapse, basically we knew about axons then we knew about synapses. And so Hebb basically said, Well, if axon A fires is near enough to excite cell B, and this takes place a whole lot of time, then there is a growth process or a metabolic change that occurs so that A's efficiency is increased in order to fire B. So this was pretty much the same time period that Sperry was thinking about this vague term, chemo-athenity. And so Hebb had this vague term joint firing of synapses. And this of course said, Hebb could be the basis for learning. And so now we would call a Hebbian synapse a coincidence detector. Two events occur at the same time, the presynaptic axon and the post-synaptic cell A and B. And we know that in many cases, not all cases, the coincidence detectors in MDA receptors, backpropagating action potentials into dendrites, and summation of excitatory post-synaptic potentials, all of which were just being discovered, well, we knew about synapses back in the late 40s, early 50s, the rest were discovered later on. And so these are the components that confer Hebbian behavior on the synapse. Now, there are lots of molecules involved, lots of ips, ands, or butts, lots of places in the brain, and we're going to talk about them today. We usually think of synaptic plasticity. Plastic, of course, means changeable, changing form. We usually think of synaptic plasticity as occurring in the selected regions of the brain. In the hippocampus, in the cerebral cortex, and the striatum are the best places we know that plasticity occurs. This cerebellum, which has lots, which probably has a plurality of synapses in the brain, is not strongly plastic. So I've been telling you at the beginning of the course about the synapse being a biophysical machine, specialized function on a time scale of milliseconds, distance of microns, all that is true. However, the synapse also needs to adapt to the changing needs and requirements of the organism and its changing activity levels, and therefore synapses need to be regulated in almost every brain region in order to maintain homeostatic balance. Now, homeostatic, and of course, at the same time, this regulation of the synapses allows the synapses to change so that they're storing information in neural circuits. I don't know if I've given you my rant about homeostasis yet, but I will do so now. There are terms that we throw around in neuroscience, homeostasis, adaptation, plasticity, compensation. These are very general concepts, but they really are summaries for a large number of processes. They are not mechanisms in themselves, and so I like to use those words more as adjectives. There is a homeostatic process, there is a compensatory process or mechanism, and so I have had very distinguished neuroscientists say to me in the last year, well, the brain changes because of homeostasis or because of plasticity. Well, we could say the brain changes because of homeostatic processes, and during this century, I do believe, and other neuroscientists believe, that we're going to continue to discover the molecular and mechanistic instantiation of homeostatic processes. Okay, rant has ended, you can take notes again. The key organ that is very often involved in memory and in learning is the hippocampus, which Ralph introduced to you in the previous lecture, and I have mentioned to you several times as well. You remember HM's brain and HM's hippocampus, which proved really elegantly that the hippocampus is required for memory. Now I'm going to give you a little more detail on the hippocampus. Remember that hippocampus itself means seahorse, and so this wound around region looks like a seahorse. The region of the hippocampus that looks like a tooth here, called the dentate region, is called a tooth-like region. Dentate means tooth. The region that looks like a ram's horn, so part of the hippocampus that just has one curve, is indeed named after Amon, the Egyptian ram-like god, and so it is called Amon's horn, and the later neuroanatomists gave it a Latin term, cornus amonus, which means simply Amon's horn. We abbreviate that term these days into the three subregions, CA1, CA2, which is rarely shown because it's rather small, and CA3. Now on the slide at the bottom, there's been a slate of hand, it's been flipped right to left. So here on top, the entorhinal cortex is at the left, but at the bottom, the entorhinal cortex is at the right. Another interesting aspect of the hippocampus is that it's so easy to picture because actually, it curves around so that you can take a coronal section or a sagittal section, and it still looks like a seahorse. So that's a little confusing because it looks slightly differently in each way. In any case, there is a famous circuit in the hippocampus called the trisynaptic circuit. The input from the entorhinal cortex, that part of the cortex that's a little lower than the rest, that's why it's called ento below, into the dentate region, also called the dentate gyrus, synapsing onto the granule cells. The granule cells send mossy fibers that not shown in this picture, but they are sort of wisp-like with lots of projections into the CA3 region, and the CA3 region send the axon collaterals to the CA1 region. Now for today's quiz, who discovered the Schaefer collaterals? So, there is another input to the hippocampus from the dentate gyrus. It is the direct input, and this input is also called the perforant pathway because it actually runs directly from the neocortical region, the entorhinal cortex, to the archicortical region, the hippocampus, which is only three-layered cortex. In order to do that, it needs to cut across a structure, it needs to perforate that structure. Alright, I've given you a little more anatomy than you thought you knew until now, and the reason that we are so interested in the hippocampus is that, of course, as your elf explained to you, it is very important for spatial memory. Now, what does it mean that an organ is important for spatial memory? Well, that's the 1914 Nobel Prize for Physiology or Medicine. And in the hippocampus, there are so-called place cells and grid cells. The place cells are in CA1, the largest of the regions. The grid cells are upstream in the entorhinal cortex. This is an experiment that was first done by John O'Keefe several decades ago in which he implanted electrodes into the CA1 region of a rat. At the time, it was easier to use rats than mice. TV had been invented, but I think he just looked at the rat at that time and led the single unit recording to an oscilloscope and noted that when the rat took a defined trajectory in the field, the particular cell that he was recording from fired. And so this would not be a Morris water maze because it's a little tricky to record from a rat or a mouse while it's swimming. You don't want to get the electrodes wet. So this was in a box that had landmarks around the edge of the box. But the rat knew where he was and lo and behold, these place cells fire when the rat is only in a specific position in the environment. Now later on, within the last 10 years, the Mosers in Norway, who shared the Nobel Prize with O'Keefe, found that in addition in the entorhinal cortex, there are cells that fire in a grid. Now what is this picture? This picture, the black lines show the trajectory of a rat walking through an environment. In a place cell in CA1, there's only one region in the environment where that cell fire. And the red is the particular cell that's being monitored and every time the cell fires a spike, there's a red dot. So here's a place cell in CA1. In the entorhinal cortex, the cells actually define a grid so that here is the rat's trajectory, the fine black lines. As the rat moves through the environment, this one cell, which is being monitored, fires here and then over here and then over here. And so it fires along a grid. Now the grid, the coordinates and granularity of the grid changes from dorsal to ventral, medial to lateral. In fact, this is usually called, you usually see this abbreviated MEC, medial entorhinal cortex. And the grid also expands when the rat or the mouse is in a different environment. So there's obviously a whole lot of interesting processing that relates grid to place and back and forth. And the processing there is about as interesting as the processing that leads from simple to complex cells and visual cortex. The key is that this gives us the physiological slash anatomical substrate for an animal to process place in the hippocampus. And these inputs are known to be plastic and depend on experience. And so the stories I'm going to tell you about synapses now have a lot to do with animals modifying their place fields. In fact, the stories I'm going to tell you about synapses revolve around a picture that you've already seen. Now we go into the hippocampus. We go into the CA1 region. We look at the dendrites of the CA1 pyramidal neurons. And they are very complex machines. So this is a single neuron. We're not even seeing the cell body. We're seeing only the dendrites. The dendrites expand out and they also have spines on them, little protrusion from each dendrite, which vastly increases the area of the dendrite and allows a single neuron then to synthesize inputs for many different regions and for many different inputs. And as we'll see the size, shape of the dendrites, as well as the molecules in the dendrites change during synaptic plasticity. Any questions so far? All right. This is a blow-up, again that I've shown you in previous lectures, of a dendrite. Here's a dendrite. Here is presumably a spine. Two spines on the dendrite. Here's one of them. Here's another one. They have these dark regions here. An electron micrograph. These dark regions are the so-called post-synaptic densities. These post-synaptic densities, you may remember, are chock-full of interesting proteins. That's why they stand dark. In the pre-synaptic terminal, we have the synaptic vesicles, which you know well. There are mitochondria that make sure that we have enough energy. There are probably glia around. Microtubules in the dendrite. Now, in the pre-synaptic, the post-synaptic density are the molecules thought to be responsible for most of synaptic plasticity. And of course, the hero of this story is the NMDA receptor. And the hero of the NMDA receptor story is really calcium. We've come back to calcium again and again in this talk. During the very first lecture, we reminded you that organisms, once they decided that they were going to be using high-energy phosphate as energy, had no choice but to keep intracellular calcium on average very low. This then allowed organisms, cells, to signal by transient local increases in calcium with an enormous number of signaling molecules that take this calcium. So that naturally there is a fairly well-understood and well-proven calcium hypothesis that controls synaptic plasticity. And I've shown you examples using either small molecules or proteins of measuring calcium influx into cells, mostly using fluorescence. And we're going to talk a little bit about the control of post-synaptic calcium using spike timing later on. I'm simply going to give you a quick review of the NMDA receptor as a coincidence detector. Remind you that it is permeable to sodium and potassium like most excitatory ligand transmitter-gated channels but also to calcium, that its kinetics are slower than those of AMPA receptors, that it has a special pharmacology. Indeed, NMDA is not a natural transmitter. It is N-methode aspartate. And the natural transmitter is glutamate. A subset of glutamate receptors are activated by NMDA. And as we'll see, the NMDA receptor has this enormous intracellular region that seems to act as a scaffold for assembling other proteins, some of which are involved in sensing the calcium that flows through the NMDA receptor. We're going to introduce the term long-term potentiation and long-term depression as very much the physiologist's instantiation of the Hebb's rules. And we're going to show that the calcium comes in through the mouth of the NMDA receptor. And then we're going to talk a little about the biochemical pathways that do mediate synaptic strength. So just a reminder that the NMDA receptor is a coincidence detector, that the two coincidences are number one, that glutamate binds. And number two, that there is a strong post-synaptic membrane depolarization. That strong post-synaptic membrane depolarization, this part gets positive, kicks magnesium out of the channel, where it's there as a blocker. And you will remember that magnesium gets stuck in the channel for this weird, fundamental biophysical reason, that it can't exchange its waters of hydration. So it cannot flow through the channel. It simply gets stuck in the channel. So naturally, magnesium is this channel blocker that gets stuck in the channel, and that is very useful for the body and has the selective advantage that it's part of the coincidence detection. And the result is that NMDA receptors flux calcium into the cell when these two events occur simultaneously. Now, the post-synaptic density, here is the NMDA receptor. It's one of the glutamate receptors. There are also amper receptors, which are glutamate receptors as well. The amper receptors lack this intracellular region that helps the NMDA receptor serve as a scaffold for assembling other proteins. And then there are also metabotropic glutamate receptors, GPCRs, that have their own signaling apparatus. But it's really the NMDA receptor that we want to follow today. And in particular, the two molecules that seem to sense the calcium that comes in through the NMDA receptor. One of those molecules is CAM kinase 2. I'll give you the definition for CAM kinase 2. The other is called calcium neuron. CAM, of course, is calmodulin. So CAM kinase is a calmodulin-activated kinase. Calcium neuron is another calcium-activated kinase. Now, the CAM kinase is a rather interesting molecule, as discovered by Mary Kennedy, because it gets activated by binding calmodulin. So here is a calmodulin molecule. You may remember that calmodulin is the universal, very well-conserved calcium binding protein in all of life. It has four calcium binding sites. I know that Albert's made calmodulin look a little bit like two schmoos joined together. But in fact, these are the four calcium binding sites. When calcium binds, when calmodulin binds calcium, it undergoes a conformational change, which allows it to wrap around many molecules, including CAM kinase. This allows CAM kinase to become phosphorylated and activated at its active site. It's as though the inhibitory domain of CAM kinase gets pushed aside by calmodulin. CAM kinase becomes activated either partially or fully. It allows CAM kinase. Remember, a kinase is a molecule that phosphorylates another molecule. In this case, CAM kinase phosphorylates itself. That is, it autophosphorylates. And this stabilizes CAM kinase in the active form so that CAM kinase can now go and phosphorylate other molecules. So this calcium influx hits CAM kinase at the mouth of the NMDA receptor. The CAM kinase actually hits the calmodulin. The calmodulin wraps itself around the CAM kinase. This activates the CAM kinase, which has now been switched on because it autophosphorylates itself. And so we have a calcium-independent activity, calcium-independent kinase activity. And as you've learned, kinases are very important switches inside neurons. Ultimately, the activity does die away, hours or so, depending on how strongly it was activated. Any questions? Okay, so we've said all of that. So now we talk about the fact that synapses can actually be modulated either presynaptically or post-synaptically. We can modulate the number of vesicles released. Remember, they're called quanta. We discussed this when we discussed the nerve muscle synapse. Or we can also regulate the quantal size, the effect, the post-synaptic effect of every quanta. Now, at the nerve muscle synapse, the only way to regulate the best way to regulate the amount of calcium released, sorry, the amount of acetylcholine released, the number of vesicles released, is by changing the calcium in the external solution, which changes the amount of calcium that comes in presynaptically. At the neuromuscular junction, the only way to modulate the sensitivity to an individual quantum that is post-synaptically is by putting a blocker, a partial blocker, such as curary on the synapse. But the nerve muscle synapse really exists to be an all-or-none synapse. It doesn't have to grade itself, whereas synapses in the brain do need to grade, modulate, et cetera. So synapses in the brain control either the number of vesicles released or by regulating the quantum size. There are several components of this modulation. They are usually divided into short-term and long-term.  It could range from picoseconds, if you're that kind of biophysicist, to millennia, if you're a geologist. But we're talking about short-term from milliseconds to minutes. Usually, these short-term plasticities are presynaptic. In turn, the short-term modulation is divided into numerous subtopics that the physiologists have discovered. There is so-called paired pulse facilitation, which I will show you. That's the briefest. There is synaptic depression, which takes a little longer. And there's potentiation. And in almost every case, the synapse can be either depressed or potentiated. And this varies with the synapse and varies with the stimulation. And then we talk about long-term plasticity. And typically, to a neuroscientist, long-term plasticity is something longer than 30 minutes. There is long-term potentiation. Here, the P means potentiation. And long-term depression. And as Ralph told you, LTP, when it lasts for more than a couple of hours, is usually associated with protein synthesis. We'll get to that as well. So the briefest part then of synaptic plasticity is so-called paired pulse facilitation. Probably the best example of paired pulse facilitation is if we look at the trace at 25 milliseconds. We've given two pre-synaptic stimuli in the cortex. This is a layer 2-3 cortical neuron. It's one of the densest layers in the cortex. We've given two stimuli. Now, you'll remember, when we discussed integration at synapses, we discussed purely electrical stimulation that two post-synaptic potentials that occurred near each other could integrate simply because of the currents. Or if they were far from each other, they were at other ends of the cable. Here we're talking about more subtle processes in which the numbers of pre-synaptic quanta are released are different. So you can see pretty easily that post-synaptic potential number 2 is larger than post-synaptic potential number 1. And this continues to be true for about 100 milliseconds. And then, after about 100 milliseconds, there is no residual effect of stimulus 1 on stimulus 2. And it's been shown pretty much consistently that this residual effect, so-called paired pulse facilitation, has to do with the fact that that pre-synaptic terminal has calcium left over inside it from that first pulse. So the pre-synaptic terminal has more calcium. There's a very nonlinear relationship between the amount of calcium and the amount of transmitter release. As I think I mentioned earlier, it's probably something like the fourth power. And so a little bit of calcium left over produces a big change in transmitter release. Any questions? Of course, if one goes too heavily, the other aspects of transmitter release, the releasable pool of vesicles, for instance, begin to be fatigued during mini-stimuli, and so if one stimulates quite rapidly, one actually sees the opposite, short-term synaptic depression. This varies among synapses, whether one is going to see facilitation, potentiation, or depression. And here is a graph of the EPSP amplitude as a function of the rate of stimulation at a low rate of stimulation when gets a normalized amplitude, whatever they're measuring here, 0.8, but with higher and higher frequencies, the amplitude of an individual post-synaptic potential decreases remarkably. And so the pre-synaptic terminal gets tired, people have studied whether it gets tired because the vesicles can't be filled, that usually doesn't happen because there are a few vesicles around to be released, that does happen. And you may remember that when we studied the visual system, we had a structure in the photoreceptor called the ribbon. The function of the ribbon is to line up those vesicles near the synapse so that lots and lots of them are available, and that's appropriate because in the retina, the photoreceptors are constantly releasing transmitter and what the rodopsin does eventually is to stop releasing transmitter by hyperpolarizing the membrane because the cyclic GMP-activated channels are no longer activated. So varying with the synapse, we have various kinds of potentiation and depression. And probably the most famous example of potentiation is so-called post-titanic potentiation. Remember, a tetanus is a train of stimuli at something like 50 hertz or 100 hertz or a couple of 100 hertz. Their post-titanic potentiation is the earliest manifestation of giving a very strong stimulus. The EPSPs are highly potentiated for the first few minutes after the tetanus. This dies away, but one is left with a post-titanic potential that's greater than the control period and that's called long-term potentiation. So here we are back in the hippocampus. We are at the CA-3, CA-1 synapse. Here's the CA-3. Here are the Schaefer collaterals being stimulated by a presynaptic wire. And we are recording actually extracellularly the synaptic currents in CA-1. This is the classical hippocampal preparation in which we stimulate the Schaefer collaterals and record in CA-1. There are these two phases after a tetanus. Even though the tetanus lasts for just a couple of seconds, we then test the post-synaptic currents every two or three minutes so that the tests themselves do not evoke any changes in plasticity. It's only the tetanus at the very beginning, the tetanic pulse at the very beginning that provokes a change. Gradually then the potentiation dies down and one is left with long-term potentiation. So the post-tetanic potentiation right here again is presumably an accumulation of calcium but the LTP long-term potentiation which is very interesting is a model for memory and learning. It's different processes. So again, recording long-term potentiation in a hippocampal slice, so one takes a slice from an animal, puts it in a special bath, stimulates the CA-3, the Schaefer collaterals, records the post-synaptic currents in CA-1. Now the way this is typically done is not intracellularly but extracellularly actually recording the currents and there are technical reasons why this is easier. So from about 50 to 200 hertz, one gets this brief rise but then the long-term rather stable increase in post-synaptic potentials and after about two hours results say that this probably depends on new protein synthesis. So what's going on here? It's frequency dependent. There are probably many mechanisms and lots of neuroscientists spend their careers very happily tracking down mechanisms of LTP after titanic stimulation. Again, LTP lasting 30 minutes to a few hours don't require a new protein synthesis after a few hours new proteins do need to be synthesized. In addition to the LTP, which is produced by a high-frequency training, 50 to 200 hertz, there is another phenomenon called long-term depression. Again, many mechanisms, again it modifies circuits to store information and we're going to see that long-term depression actually typically occurs for stimulus frequencies that are lower than LTP. So we usually, neuroscientists usually talk about LTP as titanic stimulation, 50 to 200 hertz, LTD as 1 to 10 hertz. You can't keep on increasing your synaptic transmission all the time. You can't keep on learning. You have to forget some things too in order to sharpen up the learning. Now we're going to talk about actually the mechanism that Heb really postulated, which is coincidence, not frequency. Coincidence, we call these days, we measure it as spike-timing dependent plasticity, but it presumably arises from the same set of mechanisms as LTP and LTD. In every case, it is thought oversimplified that post-synaptic calcium levels are controlling LTP and LTD. So here is rest. When calcium levels rise very high post-synaptically because of tetanide, titanic stimulation, we get LTP long-term potentiation. When they rise less strongly, we get LTD, which is long-term depression. That's an oversimplified view, but it seems to hold more or less, especially for experiments on hippocampal slices. So, is that all of that? Okay. So when we record LTD in the hippocampus, we again use this extracellular field recording. We give stimuli at moderate frequencies 1 to 10 hertz, and after a moderate frequency stimulation, for just a couple of seconds, we then record at much lower rates so we don't perturb the system. We get a decrease, and then this decrease reaches a steady state that seems to represent depression. So what we're actually doing here is to say that the strength of synaptic transmission is what underlies memory and learning. There are very good experiments with mouse genetics and pharmacology suggesting that this is true, and so we are using synaptic plasticity, either potentiation or depression, as a proxy for memory and learning. It's a simple proxy. It doesn't always work, but it is remarkable the extent to which it does work. So the two cellular processes that seem to underlie the major changes during LTP and LTD are, first of all, that the post-synaptic cell inserts new amper receptors into the membrane right at the synapses or withdraws them from the synaptic membrane in LTD. Remember, amper receptors are a type of glutamate receptor. And then in addition, the entire spine can grow or shrink changing the size of the post-synaptic potential. There have been some remarkable facts discovered about LTP. One of them is that it's probably input-specific as it needs to be for the Hebbian hypothesis. There are thousands of synapses on a given neuron, and we're talking about only one. And so if we have normal synaptic transmission with a weak active input, we do not get LTP. If we have some cooperativity between neighboring synapses that are all weak, we begin to get LTP, but they need to be near each other so that the molecules produced can indeed communicate with each other. There is perhaps some associativity in LTP in the sense that a strongly-potentiated synapse may also potentiate a weakly-activated synapse next door. But if two synapses are far apart, they do not potentiate each other. They have LTP separately. And so these are ways in which the Hebbian rules get down to the level of individual synapses. In terms of Hebbian rules, this very interesting neuroscientist, Mooming Poo, who now directs the Shanghai Institute of Neuroscience, found a phenomenon called spike-timing-dependent plasticity. Spike-timing-dependent plasticity is really a refinement of Hebb's rules. The natural synapse has the presynaptic cell firing before the post-synaptic cell. And so if you were Hebb, you would say, well, the natural course of events needs to take place pre-before-post. And under some circumstances, this so-called spike-timing-dependent plasticity holds. That is, if the Hebbian situation were pre-fires-before-post, but they both do fire, if that occurs, then the synapse gets potentiated. But in the anti-Hebbian situation, where the post actually fires before the pre, see here's the little post-synaptic potential, but the post-synaptic spike is coming first, this oftentimes, not all the time, but oftentimes produces LTD, long-term depression. And so if the experiment is done under certain circumstances, then one can embroider the Hebbian rules with additional timing rules that appear to make sense in terms of what the organism needs to know. So if the pre-fire is 5 to 30 milliseconds before the post, one gets LTP. If the pre-fire is 5 to 30 milliseconds after the post, one gets LTD. Another refinement on Hebb's rules or on the calcium hypothesis is supra-linear influx of calcium. So here is a case where the experimenters produced glutamate locally by uncaging photo-activated glutamate. They also produced glutamate locally with pre-synaptic stimulation. They asked about using calcium measurements, a calcium dye. They asked whether you could get a linear sum of the calcium influxes produced with those two simulations or a non-linear influx. And it turns out that you can get a greater than summed influx of the calcium. And so this is thought also to play a role in the important elements of synaptic plasticity. Again, by saying that calcium is the major intracellular messenger for synaptic plasticity. So I told you about insertion of new receptors. Now I've actually modified the picture that's in Candela a little bit here to make it clearer. Here again is the experimental setup where we have a hippocampus. We're stimulating the Schaefer collaterals in CA3, recording in CA1. And in early LTP, and what we're doing here is to record the quantal size, the amount of current produced by a single quantum, the miniature post-synaptic currents. In early LTP, which typically arises from more quantum being released, the quantal size does not change much. But in late LTP, we do have a vast increase in the quantal size, and that is thought to be a post-synaptic mechanism where the cell actually puts more receptors in post-synaptically. So as you can see, I've added a receptor here. In late LTP, you know why I'm going to skip this because I think it's wrong. We'll just skip it. So the overall view of LTP is fairly complex, although calcium is involved. This now is one of the figures in the book. It is practically the last figure in the main text of Candel. Synaptic plasticity is Candel's Nobel Prize. He likes to think about it, and he likes to go even beyond the experiments that gave him recognition. And so, although we all love Candel and think he's very important, sometimes when he's writing a book, he does go a bit beyond the experiments. So this is his view, Candel's view, of the sum of synaptic plasticity. There is involved in addition to the synapse here and the calcium influx, which activates Cal modulant. There is a retrograde signal that goes back to the presynaptic terminal. There needs to be a retrograde signal if synaptic plasticity is also going to increase the amount of transmitter release. This is typically thought to be nitric oxide, the gas, but in some cases, the opposite occurs with endocannabinoids. There is also dendritic protein synthesis, which we recalled is very important for the late stages of LTP, and that is thought to be due to RNA in the dendrites engaging ribosomes in the dendrites making new proteins, which can be inserted into the synapse. There is thought to be cytoskeletal changes that expand the spine. And finally, the longest stages of synaptic plasticity are thought to involve new activation of genes. So the longest stages actually do get back to the nucleus, it is thought. To activate proteins like CREB, we discussed CREB when we discussed the G-protein pathway, calcium and cyclic AMP binding protein, which activate new genes, produce new gene products, and strengthen synapses. So all of these very definite, very widespread effects are thought to play a role in memory and learning and in synaptic plasticity. And just briefly, how these two types of calcium are sensed through the NMDA receptor. Remember, we have a weak calcium influx causing LTP, sorry, a weak calcium influx causing LTD and a stronger calcium influx causing LTP. It is thought that there are actually two types of calcium receptors that look at the calcium in the post-synaptic density and respond to those calcium. I circled them on the map of the post-synaptic density. Both of them depend on CalModulin. One of them is CampKinase2, the other is CalCneurin. So, CampKinase2, I showed you a map of CampKinase2 in which it autophosphorylates itself. That's CampKinase2. And it then can also phosphorylate the subunits of the amper receptor. Apparently, the phosphorylated amper receptor has a larger current, so that's a post-synaptic event. And this is likely short LTP. And then in addition, CampKinase2 apparently activates a process of inserting new amper receptors, also a post-synaptic event. And possible that this takes place in development as well. So, CalCneurin, which responds to smaller influx of calcium in LTD, again, calcium flows in. CalCneurin is a protein phosphatase, also called protein phosphatase 2B. If those of you who are at the symposium around a little more than a month ago remember that I gave the crystal structure, a glass cube with the crystal structure of PP2B to one of my former post-docs, because he studies that molecule intensively. It is a calcium-calmodulated, CalModule-independent protein phosphatase. That is, it takes phosphates off proteins. And it regulates an inhibitor called phosphatase 1. And the result is that amper receptors get removed from the post-synaptic membrane. And so it's a convenient hypothesis, and there's probably some truth in it, that the direction of long-term changes, LTP, LTD, depends on the relative levels of activating CampK2 and CalCneurin, in turn, because of the relative amounts of calcium that flow in. And so this slide really gives you a little bit more detail. Calcium flows in, activates CalCneurin, regulates an inhibitor. I've told you this, so I won't bother going through it again. Are we done? No, we are not done. And the reason we are not done with the effects on synaptic plasticity is that Candela and others have reminded us that there are other types of long-term potentiation. The CA3-CA1 pathway is the most famous, and I've given you that one. There are also involvement of calcium channels in the perforant path synapse. And there's also an involvement simply of amper receptors in the mossy fiber pathway. So, for instance, in the hippocampus, each of the three different types of synapses has a different molecular route of potentiation and depression. It typically involves calcium, typically flowing in through receptors, sometimes through calcium channels. But we're not even done yet, because there are epigenetic changes that also are involved in synaptic plasticity. So, this again is reason work from Candela, and it's not clear whether this will stand the test of time or not. Epigenetic typically means changes in the structure of DNA or of chromatin. And so, the most famous example, so here we have DNA wound around nucleosomes. And the basic idea is that when DNA is available, not wound around chromatin, it can be activated, and when it is covered by other proteins, it cannot be activated. So, we begin with phosphorylation of CREB. This, again, this recruits a protein called CREB binding protein. This acetylates lysine residues on histones. So, here we have the DNA wrapped around histones. We get a post-translational change, which essentially release the DNA. We get DNA released from the histone. This allows transcription during the later phases of LTP. And so, the way that CREB is said to work is by allowing histones to be deacetylated and allowing DNA to be revealed. In addition, LTP changes DNA methyl transferases. So, now we're talking about methylation of DNA. So, DNMT is a DNA methyl transferase. This recruits methyl DNA binding proteins to the DNA, which can now see the methyl where they couldn't before. This recruits histone deacetylases, which remove the acetyl groups, and this allows the binding of another CREB binding called CREB2, which can repress transcription. So, as a result of calcium influx, activating CREB, either CREB1 or CREB2, we can have further changes in gene activation. Well, all I can say is that this has been a whirlwind tour of a enterprise that occupies many neuroscientists trying to understand the mechanisms of changes in synaptic transmission. And we'll stop here and I'll be available for office hours today and Friday. Jared, any announcements? Okay, thanks.


Because I don't think the motherfuckers in Minnesota that say it's slob, they were just brilliant.  Yeah. Yeah. Got a whole word. Real talk. Because you broke it down for people to know. I think people... I think people saying it for their own reasons, though. People, nobody's... I don't think that... You know, it's just like the inner circle, like the ones that's like literally right here that know my meaning. You know what I'm saying? That was presented, the opportunity to be a part of the family.  Other people that wasn't even presented the opportunity that just feel like they're in the family. I feel like every one of the individuals got their own meaning. They main meaning might be the same thing, but you got your own meaning of why you...  But I feel like the biggest meaning is because we family-oriented. You know what I'm saying? We locked in, so people just be like, damn, I feel like most of our fans come from respect.


Hello friends and how are you all doing today? My name is Priyanka and that is just us a question. It says if tan A plus B is equal to root 3 and tan A minus B is equal to 1 by root 3, because B is less than equal to 90 degrees but greater than 0 degrees and if A is greater than B then we need to find A. Let us rewrite whatever is given to us in the question. Before that we should be well versed that the value of tan 60 degrees is equal to root 3 and the value of tan 30 degrees is equal to 1 by root 3. Right? Are given that tan root 3, isn't it? But we have learned in our previous classes that the value of root 3 is equivalent to tan 60 degrees. So this implies we can write that is equal to degrees. So this implies that the value of A plus B will be equal to 60 degrees, isn't it? Let us take this equation as 1. We are given that tan B is equal to 1 by root 3 but 1 by root 3 is equivalent to tan 30 degrees. So this implies that tan A minus B will be equal to tan 30 degrees and this further implies that A minus B is equal to 30 degrees. Right? Let it be the second part, the first equation and the second equation we get plus B plus A minus B is equal to 60 degrees plus 30 degrees. Simplifying, we have 2A equal to 90 degrees. This further implies we have the value of A as 45 degrees and if A plus B is equal to 60 degrees and A is 45 degrees then that implies the value B is equal to 15 degrees, isn't it? So the answer for this question is the value of angle A is 45 degrees and the value angle B is equal to 15 degrees. Right? So hope the solution is clear to you. Do take care of your calculation and hope to see you next time.


how you teach in that manner, some tips as to how you can make people learn to trade faster. So for working hard, we gotta work hard. Again, we gotta work hard. Of course, that's of course, we all know that. But then when it comes to working smart, that's actually a faster way to learn trading and that is to find a proper mentor. And not just any mentor because there are some good mentors out there, there are some bad mentors out there. When you find a good mentor, focus on that strategy and then just trade using that. And it's especially effective if that mentor strategy fits your own trading personality.