 I'm Justin Weiss, and I lead the web development team at AVO where we get people the quality legal help they deserve. Before we get going, at the bottom of these slides, that's my Twitter name. Feel free to ping me with any questions or feedback, and I'll check it out afterward. And there's also a hashtag over there, tinyobj, free to use if you tweet about or take any pictures or anything like that. Now, I guess most of us are here because we love Ruby. I mean, this slide kind of says it all for me. But I mean, how many of you have started to wonder what your next favorite language is gonna be, right? I mean, this isn't a totally new thing. One of the biggest things that stuck with me after reading the Pragmatic Programmer so many years ago was this idea of learning a different language every year. So I did, and I still do. After I read that book, I decided that Ruby would be the language that I'd learned for the year. I built everything in it. I felt like it was my new language. So naturally, I thought that next years would also be my new language. But year two, I learned another language, and I went back to Ruby. Year three, I learned another language, and I went back to Ruby. And here I am, over 10 years later, and my primary language is still Ruby. And this kind of bothers me a little bit because I wanna think of myself as open-minded. Like, I wanna be more flexible than that. I don't wanna identify myself by the language I write in and I don't wanna do automatically default to one just because it's the one that I'm most familiar with. But why doesn't anything else stick quite as well as Ruby did? If you think about this a little bit, you come to this question. What makes Ruby Ruby? Why do you use it? When you think about Ruby, what comes to mind? What about programmer happiness? I mean, if Ruby was designed to make programmers happy, I feel like it's wildly succeeded. I've never had a language fit my brain so well or help me turn my thoughts into code so easily. And that's really cool. But there's also something else. Like, what do you think about if you think about language features? And just like you might think Erlang equals actors or Haskell equals Monads or Lisp equals parentheses. Sorry, macros. With Ruby, I think about metaprogramming. So what do you think? Like, is Ruby happiness or is it metaprogramming? Why not both? I think the metaprogramming part, in a way, leads to the happiness part. I can see by some of your faces that you don't totally agree, but I do. With metaprogramming, you can craft the language to you and what you need to do. You aren't stuck with what the language gives you and the language doesn't fight you. Those things, they make the language feel like a part of you, like your favorite jacket or your laptop covered in stickers of your favorite things. Not just a tool that you use to get through the day. That's how I feel metaprogramming leads to happiness. Ruby helps you feel joy by getting work done more quickly and having a lot more fun while you do it. And in my experience, metaprogramming plays a big part of that. But what if you wanted to know what else is possible? What if you wanted to do more than what metaprogramming allows you to do? What if you wanted to change how a language works at a deeper level? Ideas like basic inheritance, like when a method is called, if it doesn't exist in your class, call it in your superclass, those patterns are usually hard-coded into a language and they can't really be changed easily, even if sometimes you want to skip a generation. But what if you wrote code in a language using the same pieces you used to build that language? You'd be able to change almost anything about how the language works. You'd be able to mold the language to the ideas and to the mental models that your app uses. And you can learn about a language at a deeper level that you normally have access to. The neat thing is, we can get there. And to do it, we'll try building a brand new object model on top of Ruby. Okay, object model is a little bit jargony. What I mean by that is the core concepts, the data structures, the methods you use to build things in your language. Do you have classes, objects, method missing, inheritance? All of these things are pieces of an object model. If a language is how it looks, you can think of an object model as how it works. And if our object model is flexible enough, it can change itself and that's what we're going for. So what would that flexibility look like? There's a paper I found called Open Extensible Object Models that describes how to create a flexible object model like this from only a few small parts. And we'll follow along, but we'll also take advantage of some of the flexibility that's already built into Ruby so we won't follow it exactly. And all of this starts with a question. If you're given a method name and you have some arguments, how do you know which version of the method or which code to call? So many interesting differences between languages, like whether it has inheritance or pattern matching or prototypes or proxying, they all come from answering this question in a little bit of a different way. But what if you could describe in code how to find the right method? And what if you could change that code to act differently in different situations? You could change the entire style of your language just by overriding a method. In a language with simple single inheritance, that lookup code might look something like this. You look up a method by name in your object. If it doesn't exist, you find it in your parent instead. But already we're starting to assume some things like object, class, parent. Do we really need to lock those ideas down already? What's the bare minimum that we need in order to really be an object model? It helps to think about what an object actually is. It needs to keep track of some state, like a person's name or their favorite food. And it needs some way to access or change that state, like a set name or an eat method. Those methods make up the object's behavior. So state and behavior, those are really the two kinds of things that we need. There's a big difference between state and behavior, though. You can share behavior between a set of objects, like every person object might have an eat method. And that method would run the same code, no matter who calls it. So, but state is specific to a single object. So for instance, while two people could have different favorite foods, that food could be eaten in the same way. This is an important part, and it kind of drives a lot of the rest of the stuff that comes in here. So it's good to solidify. State is unique to an object, but behavior is shared between a set of objects. So what is behavior then? If you think of behavior as a group of methods shared by a bunch of objects, the answer starts to solidify a little bit. A group of methods is state, right? It's just a collection. So what if behavior could be an object itself? It might look something like this. It has a set of methods that could be used by another object that points to it. You could even call this kind of object a class, you know, like a person class, because it acts a little bit like a Ruby class. Different objects that use it can all use its methods. But if a class's state is a set of methods, what would a class's behavior be? What if you went one step further? This is where it starts getting a little bit tricky, because it's a little bit beyond what we're used to day to day. Remember, behavior helps you access and change your state. So if you wanted to add a method to something we're treating like a class, where would that add method come from? How would that class know how to look up methods that are on it or its inheritance tree? Just like how the eat method on a person object comes from its behavior, the add method method on a class object comes from its behavior. You just follow those arrows, those links. You could think of this object, this one on the far left over there, as the class's behavior or the class's class. This is a little bit weird, and it gave me a headache at first, because what is the class's behavior's behavior, and then what is the class's behavior's behavior, and so on. But eventually it all goes recursive, and you can stop thinking about it. What's cool though is that classes, class objects, and behaviors, they're all kind of at their core, the same thing. They're just state and behavior. But you start to extract these kinds of patterns as you start playing with them and hooking them together and filling them out. Even though they're all the same thing though, here I'm going to describe them as a few different things, because if you think too abstractly, this stuff is impossible to keep in your head. Trust me, I tried. So for now I'm going to call an object any of these things. A class, a thing that builds objects, holds methods, has a parent, like one level abstracted from your objects, and a behavior, a thing that holds specific methods, like lookup and add method, that make up the core of this object model. So what do we have so far? We have a simple object, we have a way to add methods to an object state, and we have a lookup method that you can use to find methods given a name and some arguments. And there are really only a few more things that we need. You know, if you have a class, you need some way to create objects from it, like .new, objects that can use that class as methods. So we'll write a method for that that we'll call build object. And you'll also need to create new behaviors or subclasses so you can override methods. For now, basic inheritance is enough to get things started, so we'll need a method to handle that. We'll name that one delegate, because after calling it, unknown methods get delegated to the thing that's linked as the parent, the class that you call delegate on. And then the last thing we need is a way to actually call methods by name. So we'll name that one send. So we have five methods, add method, lookup, build object, delegate, and send. And one super generic object layout. And with just those parts, you have a healthy object model you can use to build in almost any language and extend in almost any way that you can imagine. So I said we can build it in almost any language. We're at RubyConf, so let's build it in Ruby. To keep Ruby's helpfulness as far away as possible, we'll define our object as a basic object. If you haven't seen basic object before, it's just like a normal object, except it's missing all of the methods that make object useful. So we wanna keep ours small and simple. We don't wanna accidentally run into that stuff and cheat a little bit, so this is a good fit. And by the way, don't feel the need to remember or completely understand fully all of this code. I'll include a link with it just for all the sample code in it towards the end. So we'll need to write those core methods, those ones that I just described. Once that's done, we can use those core methods to start creating objects and hooking everything together. The first one we need is add method. This one defines a method by adding it to a class. Remember, classes store methods in their state. So this one is pretty easy. It just adds the method implementation to the state under a methods key. For all of these methods, as you can see by my beautiful ASCII art arrow up there, we passed the thing the method was called on as the first argument. So if we're calling person.add method or like justin.hello or something like that, justin would be passed as that first argument and person would be passed as that first argument. The next one we'll write is the lookup function, at least the default one. This is one that's fun to override. This one's kind of big, so we're gonna take it in parts. The first thing we'll try to do is find the method that we're trying to call in the current behavior of the current classes state. Remember an add method, we just put it in there. Here we're just pulling it right back out. If it can't find it, it'll go through the parents and all of the rest of its ancestors by calling itself recursively. So here's what that looks like all put together. We try to pull the method out of the behavior state and then if we don't find it, we call itself recursively on the parent to try to track it down somewhere in our parent hierarchy. The next one is build object. This one is the one that's kind of like .new. It creates a new object from a class or from a behavior. This creates a tiny object object, one of those ones that we just defined earlier. It sets an empty state, so we don't have to worry about initialization or anything like that. And it points the behavior to the class that we're calling build object on. So if you call person.buildObject, it's going to take your new object and it's going to say this is a person, it has access to those person methods and so on. The last one we'll need to build is our delegate method, our inherit from a class, create a subclass, that kind of thing. This one is probably the trickiest out of all of them, so we'll start with a diagram. In this example, say we wanna create a baby subclass. This baby subclass needs to have access to our core methods like add method, lookup, all that stuff. But how do we get that? Maybe we need to create somehow, so we have to call buildObject on something to create it. But what do we call buildObject on? Well, just like we just saw, you call buildObject on a class or a behavior and it links to there so it has access to all those methods that you can see that arrow pointing over to it. So we wanna call buildObject on this default behavior way up in the upper left. The problem is, we don't really have direct access to that. We're not calling delegate on that default behavior, we're calling delegate on the person. But the person has a reference to that behavior. So what we wanna do, all put together, is we want to grab the default behavior from the person, call buildObject on that to build the baby object and then set up the parent link and that method's hash. And so you can see from the code up here, we do exactly that. We get the behavior from the parent class, we call buildObject on it and we get our new subclass. The rest of the method is the easy part. We set the parent class in the state, we set an empty methods hash to the state so we don't have to worry about like lazy initialization or anything like that. And then we return the new subclass. And again, that's what that looks like all put together. There's a little edge case up the top that don't worry about. Again, we grab the parent class behavior, buildObject from it, get the subclass, initialize it and then return it. So this has been pretty fast but we've built our object structure and most of the methods we need. We still need the send method so we can call methods by name. But because we can call each of these things manually for now, we actually have enough to set up the kernel of our object model. So we'll do that. When we're done, it's gonna match this diagram. We have our default behavior, which is gonna hold all of the default implementations of the methods that we just wrote. And we have a root object class which you can think of like object and Ruby that all other classes in the system are going to ultimately inherit from. So if you want something to be on all objects, you would add it as a method on the root object class. We'll build this step by step. The first thing we need is a thing that we can start hooking all of our methods on, that default behavior. We'll create one by calling behavior delegate because this is going to set up that methods hash and the parent link. In this case, we don't have a parent because there are no objects in the system to inherit from but we'll fix that later. The next thing is this default behavior needs a behavior, right? Like you need to be able to add methods to it. You need to be able to look up methods on it. And so where is that going to get its add method and look up methods from? Well, if it's the thing that holds those and you follow those behavior arrows to figure out which object you need to, you know, or where your methods are, then you should just cycle back around to itself. So we'll do that by setting default behavior dot behavior equals default behavior. I know. Next thing we'll do is we'll define the root of our object tree. Like I said, this is kind of like Ruby's object class. This one doesn't have a super class. It'll never have a super class because it's where inheritance goes to die. So we'll set its method to that, so we pass nil again. And then it'll need access to add method and look up and all of those other methods that we're putting on the default behavior. So we'll point over to that default one that we just created. Okay, so we have a root object. We have our, links to our default behavior. We have our default behavior. We can start hooking methods onto. But there's still one thing missing. I said we were gonna fix up that default behaviors parent thing later on. So this is a good place to do it. We want our default behavior to act like an object if we define in a method on object, default behavior should be able to use it. So this is pretty simple. We'll just set it manually for now. So this is actually all the code that we just saw for hooking up our object model. It's like five lines of code. We create our default behavior. We set it to loop back to itself, get a root object class, point it to our default behavior, and then hook that parent link back up. We're still missing those important methods though. You know, like add method, look up, all that kind of stuff. So here we're going to use add method to attach each of those to our default behavior. So we have something that holds those default implementations to the system. And that's pretty much it for setting up this object model. This is an example of how you might use this. So imagine that you have a, that you wanted to create a Greeter class. You could call delegate on the root object class that would point Greeter class's behavior to the default one. It would point the parent link up to root object class and you have a class that acts like a class. Then if you wanted to add that hello method to Greeter class, you could call add method on it. It's gonna find the add method implementation from its behavior and it's going to add that method into its state. You could call build object on Greeter class to create a Greeter, which is going to then be able to use that hello method because again, you just follow those behavior lines to figure out where your methods are. And then you could set some state in your Greeter object which could then be used by your hello method or any other methods that are defined on that Greeter class. Remember, it's all about what's shared and what's not. And that's what drives a lot of this implementation. State is unique, so state exists on an object. Method implementations are shared and so that's why you find them through that behavior link because many objects can all use that behavior link to link to a single class or behavior. But we still need to be able to call those methods. You don't wanna have to pass around actual objects that you then call as methods, you just wanna be able to say, hey, I wanna call a method named whatever. So for that, we need to define send. Send uses a helper method called find method up there which takes an object and a method name and it returns the right code to call. Then if it finds it, it's going to call it with the right arguments. If it can't find it, it's going to throw an error. Pretty simple, all the complicated stuff is in find method, just kidding. Find method is also really easy. It calls lookup to find the right method and this is where you get your power. Because that lookup method, it could do anything. I mean, you could append in a two to the end of all your methods before you find it and look them up that way. I don't know why you would, but you certainly could. But you might have noticed a problem with this. Find method calls object send. Object send calls find method, which means that you have an infinite loop over here. You might be able to tell from that suspicious white space that there is a little bit more to add. So if we know that we're going to call that default implementation of lookup, we'll hard code it. So in this case, we say, hey, if this is the, if we're trying to find a lookup method on the thing that forms the kernel of our object model, just call the method manually, that behavior lookup that we defined a few minutes back. Okay, we're done with setup. But before we try this out, it'll help if you get a little bit more comfortable with each of these core methods. So just to quickly review, we have add method, which adds a method to a class, lookup, which will find an implementation from a method name. We have build object, which, like new, it'll build an object from a class or behavior. We have delegate, which inherits from a class or behavior, and we have send, which calls a method by name on an object. Now let's try this out. The first thing we'll do is we'll call delegate to subclass the root object. This is like in Ruby doing the less than object when you're defining a class. You can see this is a little bit, the syntax is a little bit wonky because we're calling methods manually. This is using object send to call a method by name. That method it's calling is delegate and it's calling it on the root object class. This is gonna return a subclass of the root object class that greeter class. The next thing we'll do is we'll add a method onto that class that'll print hello world. All of our methods take at least one parameter, which is the center of the method. You can think of that as a way to access like self in Ruby or this in JavaScript. Actually, don't think of it as a way to access this in JavaScript because that's just gonna get confusing. So think of it as self in Ruby. That's how you get your object state. So you can think of it, you can access the object state off of that object parameter. The next thing we'll do is we'll create a greeter object from the greeter class using that, again, object send to call a method by name. It calls build object on the greeter class and that's gonna return a new greeter object that has access to all the methods that that greeter class defines. And then we'll call the hello method on the greeter object and we get our output. So here's what we just did. We subclassed root object to create a greeter class. We added a hello method to it. We built an object from it and we called hello on that object. We called hello, it followed that behavior line to find the hello method on greeter class and it called the implementation and printed out our message. This code looks terrible, I know. We did a lot of work to create an object model that looks a little bit more functional than it does object D. We've dug ourselves into a pretty deep hole of awful, awful syntax. So how are we gonna get out of it? We'll dig our way out. What could fix bad syntax except adding a whole lot more metaprogramming? So we're gonna go straight to method missing. Luckily, it doesn't take much. This looks big, don't try to completely get it right now. All this does is it walks through our object's ancestors looking for an object send method. Once it finds it, it calls it passing our method name and arguments. It's just a fancy way of turning a code like this into this much, much, much nicer code. So instead of calling object send call greeter hello, we can just call greeter.hello. It's gonna make the rest of this much, much easier. Finally, we'll add object send to our root object so that all of our classes in the system have at least one that they can fall back to. So it might seem like cheating, and it is, but I figured the syntax is, or the stuff is hard enough to understand without the syntax fighting you the whole way through. Now remember, objects can have their own different state. So let's try that out and let's write a method that accesses the object state to print out a different message depending on what kind of thing is in that object state. We'll create a few objects, Alice and Bob. We'll give them names, Alice and Bob, and we'll call that new method hello name. You can see hello name, even though it's the same implementation, reaches into the object state to print out different messages. So now that we have this object model, what kind of stuff can we do with it? I mean, you can define classes and add methods in C++ and that was invented like forever ago. Seems like we've done a lot of work and just ended up making the same kind of stuff that we could always do a whole lot harder. But remember, what we're trying to get out of this is flexible method dispatch. So let's take a look at some interesting new models that we can build on top of our basic one. What if you wanted to log all of your method calls to an object? Like, every time you make a method call, you wanna print some information about that method call. That's not that hard to do. We can write a new lookup method that uses the old lookup method to find a method, wraps it in some function that can do anything and then returns that function so that any method we call goes through that interceptor function on the way through. A method that wraps another method, we'll call it that interceptor method, it might look like this. You pass it a method name, a method implementation and some arguments. It prints out some stuff and it calls the method as part of its implementation so that we do the work that we were planning to do. Now, if you wanna override a method on a class, you subclass it and then override the method, right? It works the same way on a behavior. If you wanna override one of those core methods, you can just subclass that default behavior, add a method implementation and point the new behavior to it. So now, like I said, if you follow those behavior lines, you should be able to see that the person class and anything that comes from the person class is going to use that new lookup method on the intercepting behavior to do our intercepting stuff before the method is called. Remember, you just trace those lines. So here's what this looks like in code. First, we'll use delegate to inherit from the default behavior to create our intercepting behavior and then any methods that we define on that intercepting behavior are going to override anything on our default behavior for anything that points to that behavior. This is our new lookup method. Again, it's big, so we'll take it in pieces. First, we need to be able to find our old lookup method. So we need something that acts kind of like super. So how do you find that old version? Well, if sender is our person class, like we're calling lookup on our person class, you can once again just kind of like try to navigate that to find that lookup method on our default behavior up in the upper right over there. So if we want the old version of that method, that's sender.behavior to get to our intercepting behavior, you go through the parent link to find the lookup method defined on its parent and it'll find it that way. So that's what that code does. You can see it grabs the super behavior from sender.behavior.stateparent. It grabs the lookup method from that super behavior and then it calls that old lookup method to grab our original implementation. If we find a method, we'll wrap it in a new interceptor function. You define that function, so you can do whatever you want in it. You can log method calls or do something totally different. Then we pass some details like the method name, the original method so we can call it and the arguments so we can call it and then we'll create a person class that will use that new behavior. Just like in Ruby, our person class inherits from the root object class. Again, this is like saying person less than object. Next, we'll manually point the person class to our new intercepting behavior. This is kind of cool, so take a look at what's happening here. With a single line of code, we've changed how method lookup works for anything created by that class. You see, like use the old method, use the new method, use the old method, use the new method, use the old method, use the new method. So here's that logging function again. Same thing as before. In the last line, we make it the interceptor method for that class. We'll define a few methods on this class, name and location, so we can test it out. And then we'll create a person object using build object on the person class and call those two methods. There's our logging. Now what happens if you reset the intercepting class's behavior back to the default one at this point? Check it out, logging goes off. So it's not only you can change fundamental ways of how methods are found and called. You can change it on the fly. You can change it at runtime just by pointing to a different behavior. One more quick intercepting example. What if you have a method that sometimes randomly fails? I mean, I know nobody in this room has that problem, but I hear of developers that have this problem of methods randomly failing sometimes. So here's one that fails two-thirds of the time. What if you could automatically retry this method until it succeeds? Here's an interceptor function that does just that. It's going to try to call the method every time it returns false, which will consider a failure. It's going to sleep a little bit until the method succeeds. What happens when we try it? Hey, it worked, eventually. Okay, now we're gonna move on to something completely different. But before we do, let's take a second to let this intercepting method stuff drop out of our heads so that we're ready for the next one. Take a sec, all good, let's go. Last example, we're gonna build multiple inheritance where a class can have more than one parent class. If you can't find a method on your class, it'll search all of the parents to be able to find a method implementation. So let's draw this out again. I always find it easiest to start with diagrams. We'll start with this object in this example, the very well-named Justin object. This object has a class, and it's this class that will have multiple parents. So how would you build something like that? Our class with multiple parents will look just like a normal class. It still has the methods hash and its date. But instead of a parent class, it has a parents array. Those parents could be anything. They could be normal classes or interceptor classes or basically whatever. But in order to get those multiple parents, we need to be able to add parents to that parent list. So where is it gonna get that? I mean, we said that any of these objects are going to be able to get their methods from their behavior, but there's no add parent behavior except for that suspicious-looking blank space in the lower right-hand corner, which I'm going to fill. So since methods come from a behavior, we need a behavior that can do two things. We need it to be able to add a parent to that class, and we need a way to be able to look up a method from all parents in that class, which our original implementation doesn't do. So we'll write an add parent method, and we'll override the lookup method with a new one. Once again, you subclass the default behavior to get your new one, and then we'll write the add parent method. This one looks big, but that whole first section there is just for initializing it if we don't already have a parents array. At the end, it appends the new parent to that parents array. So you'll end up with your original parent plus a new one, and then any time you call this afterwards you're just going to end up appending that new one to the end of the array. And now here's the new lookup method. This is almost exactly the same as our original one with just one change. Instead of looking up methods in a single parent, it's going to loop through all the parents and it's going to break when it finds the first one. So let's try this out. Here's two normal classes, a person class and a greeter class. Nothing special about them, they just inherit from our root object the same as anything else would. And then we're going to define name on the person class and greeting on the greeter class. And here's a class up the code at the top that inherits from both person and greeter. To get that add parent method at the end there, we need to point the behavior to the new one, otherwise that method isn't going to exist. So this inherits from the person class and then it adds the greeter class as a second parent to the social person class. And now if we try it out, it fails. I'm just kidding. It gets both the name and the greeting method from both of its parents. So it gets the name method from the person method and the ancestor and the greeting method from the reader ancestor. So this is a lot of flexibility. We built three different styles of objects, basic single inheritance, two kinds of method interception and multiple inheritance. And it all came from a class and five methods. Lookup, add method, build object, delegate and send and our little tiny object. And each piece of it is simple enough that you could build it in almost any language from C all the way to Ruby. But Ruby is also a really flexible language. I mean, you could write a lot of these examples straight in Ruby using things like modules and method missing and basic objects. So what's the difference between this object model and Ruby's? I see it as intent. Just like how Ruby makes metaprogramming a normal thing to do, this object model makes changing things at a deeper level a totally normal thing to do. And even though all of this eventually becomes a bunch of binary code running on a processor on our machines, the language you use and what's normal inside it, it changes your brain. It makes some things more natural and other things more difficult. That's why I love playing like this. That's why I love learning new languages even if they don't stick with me. These experiments, they help you think in a totally different way. You try on a new way to see your code and you keep what works and you drop what doesn't. And so after these examples, as I can see some of you looking at me, like, why would you do something like this? It's that. How many of you learn best when you break something? You know, when you test the boundary, when you're not sure that it's gonna work, when you're pretty sure that it's not going to work. I strongly believe that the best way to understand a system is to test it, to push it, to break it. And metaprogramming is a fantastic way to break all of the systems that you depend on. When you push the boundaries, you'll be more confident with the language. You'll understand at a deeper level how it all works. So try writing code that might seem weird or irrational because who knows, you'll probably learn something new. And at the very least, at least you'll have a good story to tell. It could be a mess of metaprogramming spaghetti code that would generate active record models on the fly based on entries in a config file. That was a bad idea, don't do that. But it could be an entire object model built from five methods in a class that helps you understand how object-oriented programming actually works. And when you learn something like that, when you learn a tool that you can use to investigate more tools, like that's a platform you can use to learn new things by building them, like building multiple inheritance or building prototype object cloning or building pattern matching. And when that happens, not only do you learn new stuff, but you also increase your rate of learning new stuff. And I really can't think of any better ways to become a better developer. So what I'm asking of you is to give this a try. Take a look at the sample code that I'm about to give you and try to understand it, not by reading, but by playing with it, by trying to maybe reimplement one of these examples to take it a step further or build something totally new. And if you're anything like me, as I was several times when putting this together, you're gonna fail miserably a few times. I failed way more than a few times. But eventually it'll click and you'll get it. And when you're done, you'll understand a lot more about metaprogramming, syncing classes, like these deep levels of object models that you never understood before. And so if you wanna get in touch about that or I wanna talk programming or really anything else, I would love to talk with you. My email address is up there, use it. I read and respond to everything. And then if you're ever in Seattle, let me know. I would love to grab a copy with you in chat programming. I'm also on Twitter at Justin Weiss where I share programming and other tech related articles. And that last link points to a list of resources for this talk. It's an important one. You can think of it as like the show notes. It has a just for the sample code with some stuff I couldn't fit in like prototype object cloning. And it also includes like the slides for the talk and some other articles that are kind of in the same vein. And I know I have some time, I think about 10 minutes. So I'm happy to answer any questions or go deeper into any of this stuff as you're interested. The first time I thought about this, so the question was have I thought about using things like define method and method missing to try to override Ruby's implementation with something more flexible like this, right? And when I first read the paper, I was so fascinated by this that I decided that I was going to try that. And then I had second thoughts when I realized just how awful the performance is likely going to be if it's not built into the language. So the question was how do other languages compare with Ruby and metaprogrammability? There's a huge spectrum and it's also hard to tell because it's not until you really start to get deep into a language that you really start to make use of that. Like for instance, my language for this year is Elixir and Elixir has a lot of heavy macro support which can be used for some really interesting metaprogramming stuff. But I haven't got to a point where I've been using it enough to really be able to have a solid opinion on it. Definitely by, I think the most metaprogramming-ish languages that I've run into recently have been, or I mean over those years, have been surprisingly Objective-C. I actually tweaked this talk using some of that. And Lisp, but yeah, those are probably the two biggest. All right, well thank you once again for the time. Yeah.